Skip to content

Commit

Permalink
bpf,loader: remove -mattr=dwarfris
Browse files Browse the repository at this point in the history
With the availability of BTF info and struct alignment checking now taking
place through cilium/ebpf's btf package, this is no longer required.

Signed-off-by: Timo Beckers <timo@isovalent.com>
  • Loading branch information
ti-mo authored and aanm committed Sep 20, 2022
1 parent cc37ec0 commit a62fd10
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bpf/Makefile.bpf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CLANG_FLAGS += -Wno-unknown-warning-option
CLANG_FLAGS += -Wno-gnu-variable-sized-type-not-at-end
CLANG_FLAGS += -Wdeclaration-after-statement
CLANG_FLAGS += -Wimplicit-int-conversion -Wenum-conversion
LLC_FLAGS := -march=bpf -mattr=dwarfris
LLC_FLAGS := -march=bpf
# Mimics the mcpu values set by cilium-agent. See GetBPFCPU().
ifeq ("$(KERNEL)","49")
LLC_FLAGS += -mcpu=v1
Expand Down
2 changes: 1 addition & 1 deletion bpf/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function bpf_compile()
-DENABLE_ARP_RESPONDER=1 \
$EXTRA_OPTS \
-c $LIB/$IN -o - | \
llc -march=bpf -mcpu=$MCPU -mattr=dwarfris -filetype=$TYPE -o $OUT
llc -march=bpf -mcpu=$MCPU -filetype=$TYPE -o $OUT
}

function bpf_unload()
Expand Down
2 changes: 1 addition & 1 deletion bpf/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CLANG_FLAGS += -Wno-address-of-packed-member
CLANG_FLAGS += -Wno-unknown-warning-option
CLANG_FLAGS += -Wno-gnu-variable-sized-type-not-at-end
CLANG_FLAGS += -Wimplicit-int-conversion -Wenum-conversion
LLC_FLAGS := -march=bpf -mattr=dwarfris
LLC_FLAGS := -march=bpf
# Mimics the mcpu values set by cilium-agent. See GetBPFCPU().
ifeq ("$(KERNEL)","49")
LLC_FLAGS += -mcpu=v1
Expand Down
3 changes: 0 additions & 3 deletions pkg/datapath/loader/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,6 @@ func compileAndLink(ctx context.Context, prog *progInfo, dir *directoryInfo, deb
}

linkArgs := make([]string, 0, 8)
if debug {
linkArgs = append(linkArgs, "-mattr=dwarfris")
}
linkArgs = append(linkArgs, standardLDFlags...)
linkArgs = append(linkArgs, "-mcpu="+GetBPFCPU())
linkArgs = append(linkArgs, progLDFlags(prog, dir)...)
Expand Down

0 comments on commit a62fd10

Please sign in to comment.