-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for search in kernel modules #2496
base: dev
Are you sure you want to change the base?
Conversation
Can you uplaod a test file where this is necessary? It looks like you're dealing with kernel modules? |
Yes, I build it with v4.19.322. |
Great job! I never thought of Linux modules to be honest. IMO if this is to be useful, it should handle Note that relocatable object files in general lack segments, but contain some sections, and all sections are offset from zero. I believe Linux modules are the only relocatable ELFs where searching is useful for hacking, so hardcoding its linking behaviour seems right (e.g. if |
I think it is useful now text ret : 0xffffffffc0000013 [ 3.126233] test_data_addr :ffffffffc0002000 |
Co-authored-by: Arusekk <floss@arusekk.pl>
There is no standard page size (4K is common, but some systems use 16K for example M1 aarch64 cpus). Newest elftools removed the constant. |
There are so many parts related to the elf header, so I just put it at the end of the search function, which would be awesome if you had a better way to handle it.