-
Notifications
You must be signed in to change notification settings - Fork 156
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
read/elf: exclude zero sized STT_NOTYPE symbols from is_definitions #601
Conversation
We'll need this for testing at least, and it's probably better in general. Ideally there wouldn't be duplicates, but they do happen.
f8a0876
to
e95959c
Compare
This will also exclude hand-written assembly when written without directives.
However, this seems unlikely to be a problem in practice. I checked an arm64 Linux kernel binary that I had to hand (probably the heaviest common user of hand-written assembly) for 0-sized non-
Most all of the symbols appeared to be "marker symbols", but there were a few exceptions, e.g.
(These were all function symbols.) So it seems like folks usually get this right, and users can always fix their assembly to get things working again (on ARM it is an ABI requirement to use the correct symbol type). So I reckon this approach is fine to start with. |
Thanks for checking that. We may be able to fix those hand assembly cases with better prioritization logic as in #447 (comment), and the ARM mapping symbol names are a candidate for use in prioritization. |
Marker symbols can still be linked against. Shouldn't this method include all symbols you can link against? |
From the documentation for Currently the purpose of the Determining which symbols can be linked against isn't something I have thought about before. I'd have to look at some linkers to see exactly which symbols fit in that category for each file format. Do you have a need for that? |
These are generally markers, not definitions. In particular, this excludes ARM mapping symbols ('$*').
read/elf: exclude zero sized STT_NOTYPE symbols from is_definitions
These are generally markers, not definitions. In particular, this excludes ARM mapping symbols ('$*').
Closes #599
See also #447, but further work is still needed to fully address this issue.