[Python-Dev] Handling linker scripts reached when dynamically loading a module (original) (raw)
Howard B. Golden howard_b_golden at yahoo.com
Sun Sep 11 01:35:19 CEST 2011
- Previous message: [Python-Dev] Handling linker scripts reached when dynamically loading a module
- Next message: [Python-Dev] Handling linker scripts reached when dynamically loading a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 2011-09-11 at 00:39 +0200, Nadeem Vawda wrote:
I can confirm that libpthread.so (/usr/lib/x8664-linux-gnu/libpthread.so) is a linker script on my Ubuntu 11.04 install. This hasn't ever caused me any problems, though.
As for why distributions do this, here are the contents of the script: /* GNU ld script Use the shared library, but some functions are only in the static library, so try that secondarily. */ OUTPUTFORMAT(elf64-x86-64) GROUP ( /lib/x8664-linux-gnu/libpthread.so.0 /usr/lib/x8664-linux-gnu/libpthreadnonshared.a ) Cheers, Nadeem
Let me clarify: This will only be a problem when using a foreign function interface to call a non-versioned module dynamically. In the more common situation, when one links to a package specified at link time, the linker figures out the specific, versioned name of the .so file and then the dlopen will refer to the actual binary.
So, in Python, this is likely to only affect users calling packages using ctypes. (This corresponds to GHCi loading an unversioned library, e.g., "ghci -lm" which would load the current version of the math library into the GHC interpreter.)
Howard
- Previous message: [Python-Dev] Handling linker scripts reached when dynamically loading a module
- Next message: [Python-Dev] Handling linker scripts reached when dynamically loading a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]