Closed afranchuk closed 4 months ago
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).
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.
I'm not sure why the android test is failing...
This is probably ready to merge.
When this fails, it falls back to the previous behavior of trying to open the mapped file name directly.
Closes #79.