3

this is a continuation of How does chroot affect dynamic linking?

My process uses chroot to jail itself. However, I'm having difficulty getting subsequently loaded libraries (e.g. importing a python extension module) to dynamically link to the now-jailed process correctly. Part of the difficulty is not having much insight into what is going on with ld.so. I'm not sure where it is searching and am not sure if things like RPATH and LD_LIBRARY_PATH are relative to inside the chroot jail or outside.

Is there any way to run ld.so in a 'verbose' mode, where it logs what paths are being searched and where if finds requested libraries?

Community
  • 1
  • 1
UsAaR33
  • 3,536
  • 2
  • 34
  • 55
  • Have you already tried strace? – ott-- Mar 18 '12 at 22:01
  • Thanks for the tip! Forgot about strace. It helps a lot, but I still would like to see the internals of what the linker is doing. It seems to be ignoring my LD_LIBRARY_PATH and I can't figure out why.. – UsAaR33 Mar 19 '12 at 06:22
  • 3
    Try this: `export LD_DEBUG=help` then start a program. It should show all available options you can set to get debug-info from ld.so. – ott-- Mar 20 '12 at 15:19

0 Answers0