-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
meson: use bpftool based strip when available #22317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
654c3eb to
a346667
Compare
|
Please rebase. |
This should be useable in bpftool v5.13 or newer based on: torvalds/linux@d80b2fc
a346667 to
deef159
Compare
| bpftool = find_program('bpftool', | ||
| '/usr/sbin/bpftool', | ||
| required : bpf_framework_required, | ||
| version : '>= 5.6.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to the full 3 part version string since that seems to match the format output from bpftool:
$ ./bpftool --version
./bpftool v5.16.0-c446fdacb10d
features: libbpf_strict
|
rebased |
yuwata
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
| 'g', | ||
| 'o', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'gen' and 'object' is probably better. It has nothing to do with -g and -o of llvm-strip, btw (pure coincidence).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the style from the gen skeleton command here, should I change both?:
systemd/src/core/bpf/meson.build
Lines 86 to 91 in e3759ac
| skel_h_cmd = [ | |
| bpftool, | |
| 'g', | |
| 's', | |
| '@INPUT@' | |
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed these to full names in #22330.
| 'g', | ||
| 'o', | ||
| '@OUTPUT@', | ||
| '@INPUT@' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is @input@ always a single file? bpftool gen object allows statically linking BPF application that consists of multiple .bpf.o objects, that's it's main purpose. Stripping out DWARF info is just a by product. So I'm wondering if ability to do multi-file BPF programs was added by this PR as well or it's purely about stripping out DWARF?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is @input@ always a single file?
Should be at the moment.
Stripping out DWARF info is just a by product. So I'm wondering if ability to do multi-file BPF programs was added by this PR as well or it's purely about stripping out DWARF?
I didn't make any changes for multi-file BPF program support.
This should be useable in bpftool v5.13 or newer based on:
torvalds/linux@d80b2fc