-
Notifications
You must be signed in to change notification settings - Fork 300
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
aya: Support multiple maps in map sections #181
Conversation
5bf1668
to
8536ec8
Compare
I'll review this soon but first - have you tried it with stripped binaries? |
I haven't, but I can do |
This forces all maps to the maps section so we remain compatible with libbpf. This requires aya-rs#181 to avoid breaking userspace. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
5cbcd5e
to
b34d0a1
Compare
@alessandrod ready for another look. This time around I decided to read into the section data from the address/size in the symbols table, so we can support definitions that are different lengths. The only drawback is that we don't verify all of the section data has been consumed... |
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.
couple of nits and fix tests pls
This commit uses the symbol table to discover all maps inside an ELF section. Instead of doing what libbpf does - divide the section data in to equal sized chunks - we read in to section data using the symbol address and offset, thus allowing us to support definitions of varying lengths. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
@alessandrod nits addressed... and while I was editing the test I threw in some padding between the last |
This forces all maps to the maps section so we remain compatible with libbpf. This requires aya-rs#181 to avoid breaking userspace. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This forces all maps to the maps section so we remain compatible with libbpf. This requires aya-rs#181 to avoid breaking userspace. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This commit uses the symbol table to discover all maps inside an ELF
section. We then divide the data in to equal sized chunks and parse them
using parse_map_def
Signed-off-by: Dave Tucker dave@dtucker.co.uk