This is the mail archive of the binutils@sourceware.org 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: Why is "ld -r" not good?


On Thu, Jul 31, 2008 at 10:10:37PM +0200, Sam Ravnborg wrote:
> Until now I have thought the "ld -r" was a good way to do what
> we do in the kernel.

See http://sourceware.org/ml/binutils/2004-07/msg00397.html & last
para of http://www.sourceware.org/ml/binutils/2004-07/msg00413.html 

> So I wonder what you have in mind here that can improve the
> kernel build?

It's a pity you can't use the proper object file packaging program,
ar, along with --whole-archive in the final link.  I suppose that
was because you have multiple levels of directories with duplicate
object file names, and ar doesn't handle that situation well..

Some time ago I suggested using linker scripts to package object
files.  I know Paul Mackerras started playing with that but don't know
the reason it didn't get into the kernel.  Maybe is simply resulted in
longer link times..

Another possibility with newer binutils is to use "ar -T".
See http://sourceware.org/ml/binutils/2008-03/msg00150.html
Thin archives store full relative paths, handle archive within
archive, and should be faster than ld -r.

> PS. Sorry for quoting you on such an old mail - I'm just curious.

Mail archives never forget old sins.  :)

-- 
Alan Modra
Australia Development Lab, IBM


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