[PATCH, cross prelink] 0001-Pull-ld.so-s-name-from-PT_INTERP-to-avoid-the-runtim.patch

Maxim Kuvyrkov maxim@codesourcery.com
Tue Apr 10 19:28:00 GMT 2012


Mark,

This patch makes rtld emulator in cross prelink use ld.so's name as it is encoded in PT_INTERP header.

Currently, rtld emulator returns "lib/ld.so.1" for runtime linker's name, but the linker actually expects "/lib/ld.so.1" -- that one slash at the beginning causes prelink checks done by the runtime linker to fail and not use prelink information.

The runtime linker sets up a map for itself under the name stored in PT_INTERP header of the executable, and this patch makes rtld emulator follow the suit.

I have tested this patch using a different version of rtld emulator (the one that CodeSourcery / Mentor maintains), but the function in question is the same in both, so this patch is also relevant for Yocto's prelink.

Any comments?  Please merge at your leisure.

Thank you,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Pull-ld.so-s-name-from-PT_INTERP-to-avoid-the-runtim.patch
Type: application/octet-stream
Size: 2286 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/prelink/attachments/20120410/bbe25c1f/attachment.obj>
-------------- next part --------------



More information about the Prelink mailing list