Skip to content

Commit

Permalink
include/bpf.mk: preserve the bpf .o file with debug symbols
Browse files Browse the repository at this point in the history
Makes it easier to analyze verifier complaints

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Nov 19, 2021
1 parent 7ae04d3 commit 98ef23d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/bpf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ define CompileBPF
$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
$(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
$(CP) $(patsubst %.c,%.o,$(1)) $(patsubst %.c,%.debug.o,$(1))
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
endef

0 comments on commit 98ef23d

Please sign in to comment.