-
Notifications
You must be signed in to change notification settings - Fork 17
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 SONAMEs directly from process memory when possible. #117
Read ELF SONAMEs directly from process memory when possible. #117
Conversation
When this fails, it falls back to the previous behavior of trying to open the mapped file name directly. Closes rust-minidump#79.
cfe5e46
to
e56f764
Compare
I'll update the ELF fixture to add an SONAME to test this. |
Sorry my review is taking a bit but I'm doing some testing directly in Firefox and this seems to work only for external libraries, not our own ones, so I'm trying to figure out what's wrong (or if it's something specific to my box). |
8938433
to
0c2a2e8
Compare
Not all binaries have the section header table present when loaded in memory. However the program headers will be there, so I added another path which is preferred and uses only the program headers and the dynamic section information. This seems to work with all shared objects loaded by firefox at runtime when I tested it. We might still want a fallback of trying to load directly from the file (if present) if reading from memory fails for some reason. |
0c2a2e8
to
cfe6615
Compare
I'm not sure why the android test is failing... |
# By default the linker _doesn't_ generate a build-id, however we want one for our tests. | ||
rustflags = ["-C", "link-args=-Wl,--build-id=sha1"] |
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.
Nice catch!
This is probably ready to merge. |
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.
Indeed, LGTM
When this fails, it falls back to the previous behavior of trying to open the mapped file name directly.
Closes #79.