[lsb-discuss] Binary relocatability

Dan Kegel dank at kegel.com
Thu Mar 6 14:09:38 PST 2003


Mike Hearn wrote:
>>/proc/self/exe totally solves it for binaries.
> 
> 
> Are there libraries that might need to load external data files (you
> can't assume they have the same prefix)?

Maybe, and they can look in /proc/self/maps:

dank at dank:/proc/self$ cat maps
08048000-080bf000 r-xp 00000000 03:08 1114216    /bin/bash
080bf000-080c5000 rw-p 00077000 03:08 1114216    /bin/bash
080c5000-0813b000 rwxp 00000000 00:00 0
40000000-40012000 r-xp 00000000 03:08 16494      /lib/ld-2.2.5.so
40012000-40013000 rw-p 00011000 03:08 16494      /lib/ld-2.2.5.so
40013000-40015000 rw-p 00000000 00:00 0
40021000-40056000 r-xp 00000000 03:08 16417      /lib/libncurses.so.5.2
40056000-4005f000 rw-p 00034000 03:08 16417      /lib/libncurses.so.5.2
...

- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045





More information about the lsb-discuss mailing list