Dave Vasilevsky wrote:
[]
There are two ways this can be done. The simple way is to not use libraries where possible--just link all your .o files into an executable and pass gcc -Wl,-bind_at_load . The more complicated way--which works for libs too--is to use an intermediate .o file. Here's a modified example from KDE (which I stole from Apple's Jam files for an old version of Project Builder):

gcc -r -Wl,-bind_at_load -keep_private_externs -nostdlib -o combined.o my.o module.o files.o
gcc -dynamiclib -o libfoo.dylib combined.o [other flags for lib]

Is this different from using the "-single-module" linker flag? The latter is often recommended for problems with static initializers.


--
Martin



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to