This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Link with mixed IR/non-IR objects
On Wed, Apr 27, 2011 at 5:23 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Apr 27, 2011 at 07:38:23AM -0700, H.J. Lu wrote:
>> They are different. SHT_GNU_OBJECT_ONLY section doesn't contain
>> any IR. It encapsulates a relocatable object file without any IR bits.
>
> I think we first should ask whether GNU ld needs to support ld -r
> with mixed IR and normal object files. ?I'm inclined to think that ld
> should not do the segregation of object files and effectively perform
> two linking operations with one output file stored inside the other.
> Why can't we simply issue an error if someone tries to mix object
> files like this?
>
This is for usability. Many projects use "ld -r" on object files
generated from C/C++ sources, assembly codes as well as
from the third party vendors. If "ld -r" doesn't work on mixed IR
and non-IR object files, they have to change the build infrastructure
if they want to use LTO.
--
H.J.