|*nix dynamic linking on a different target (cross) email@example.com (Marco van de Voort) (2003-10-18)|
|From:||Marco van de Voort <firstname.lastname@example.org>|
|Date:||18 Oct 2003 15:59:54 -0400|
|Organization:||Eindhoven University of Technology, The Netherlands|
|Keywords:||linker, question, comment|
|Posted-Date:||18 Oct 2003 15:59:54 EDT|
This is more a question about the principles of dynamic linking on
Unix, but since linkers are on topic here, I guess it is ok.
I want to generate (non-gcc, but with the GNU linker) daily snapshots
for a projecttargeted at multiple OSes, versions and distributions,
preferably dynamically linked.
So the question is pretty much: "Can you crosslink binaries that use shared
libraries for other platforms using GNU ld, and if yes, what are the base
Of course I'll need a directory of shared libraries on my master system,
but that is not the problem.
The thing that made me doubt if it is possible is that when I create
dyn-libs locally (not cross) I see that the GNU linker gets an shared
lib so passed as "dynlinker". So probably this means I need "cross"
versions of this dynlinker shared library too (if they even exist),
and must find a way to harness these so that they look into the proper
[If you're building ELF executables, the linker creates an "interpreter"
section with the name of the dynamic linker, usually /lib/ld.so or something
like that. The system program loader maps in the progam, maps in the
interpreter, and starts the interpreter which then looks in the executable
to find the other libraries. The linker needs access to a copy of the
interpreter, but ld.so is just another shared executable. -John]
Return to the
Search the comp.compilers archives again.