This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

is there any way to change the order of name resolution in linking (aside from putting the libraries in the right order?)


I am building some code and i need a certain library to be linked in
last, so it can resolve symbols left unresolved earlier.

Normally the way to do this would be to just list that library last
on the command line.

However, i'm using a build system which constructs all the
commands for me, and although it makes a provision for
adding extra arguments to the linker, they end up going first.

So although i can add arguments to the link, i cannot order
them the way i want, and i get unresolved symbols as a consequence.

So i'm wondering if there's any argument i can slip in that will change
the order that gcc runs through the libraries in.

(The gcc info suggest not, but perhaps there's an undocumented
option for doing this?)

Thanks in advance for any clues on this.

dan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]