This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: ld -r frustration


Alan Modra <amodra@bigpond.net.au> writes:

> That's not the ideal solution, especially considering that tools
> like libtool use "ld -r" to work around command line limits when
> linking huge numbers of object files.  What we really need is a
> "ld -r" that doesn't do any merging of sections, or a final link
> stage that can undo the effects of "ld -r".  The latter would need
> quite a bit of work, and probably not be very robust.  I'm leaning
> towards the idea of making "ld -r" behave like "ar cr" on PowerPC64.

Note that some people use ld -r, and then objcopy -K to only keep
certain symbols.  This is a simple form of symbol hiding.

Note that on operating systems like VxWorks, all programs are linked
using ld -r, and the resulting .o file is loaded onto the board.

I don't think you can make this change unconditionally.

Can you do something along the lines of ld -r --split-by-reloc?  That
was intended to solve a related problem.

Ian


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