RFC: Support link with mixed IR/non-IR objects

Andi Kleen ak@linux.intel.com
Thu May 10 18:32:00 GMT 2012

On Thu, May 10, 2012 at 11:42:57AM -0400, Hans-Peter Nilsson wrote:
> Yeah, or they could just keep using ld -r and the current
> limitations regarding gcc and linker options.  As a
> drop-in-replacement (except for dropping restrictive gcc and
> linker options necessary for "ld -r") it's just different
> make-variable contents.


> But, it needs to be combined with using thin archives for adding
> an archive to an archive with a single command.  Thin archives
> go back "only" a few years, 2.19 according to binutils/NEWS
> (2009).  How old is the oldest gcc release supported by the
> kernel?

The oldest supported today is 2.12

This could be possibly moved forward slightly, but probably not to 2009.
This would cut off too many people.

> Also, I'm not sure using (thin) archives preserves a link order.
> Unknown if that's important for objects other than for each
> target's head.S.

Preserving link order is very important for the kernel, to keep
the sequence of the initcalls the same. This is one of the problems
with the LTO build today in fact, needs workarounds.

Can someone confirm or deny if that works?

> (Mine and Cary's suggestions with new ar and/or linker features
> would avoid linking in unused stuff, but that'd be new and
> different and apparently unappreciated as being obsolete. :)

I don't think anything new would fly.

However I want to also point out that one of the original design goals
for gcc LTO was to work with minimal/no build setup changes. You
guys are actively violating that.

ak@linux.intel.com -- Speaking for myself only

More information about the Binutils mailing list