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: "ld -r" on mixed IR/non-IR objects (


On Tue, Dec 7, 2010 at 3:53 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Dec 7, 2010 at 3:15 PM, Cary Coutant <ccoutant@google.com> wrote:
>>> Here is my proposal. ÂAny comments?
>>
>> We talked about ld -r a while back during the WHOPR project, and the
>> two ways that the linker could work: (1) combine all the .o files and
>> use the plugin to run LTRANS on the IR files, producing a pure,
>> optimized, object file; and (2) combine the non-IR object files as ld
>> -r normally would, and combine that result somehow with the IR from
>> the other files, for later optimization. If I remember correctly,
>> there was support for both modes of operation. The first mode is
>> easily handled with the current design (untested as far as I know --
>> there are probably bugs, and I'm not sure if we get the symbol
>> visibility correct in those cases).
>
> We considered it. ÂThe problem is LTO performs the best when
> generating the final executable/DSO. ÂThat is we want the full IR in the
> output of "ld -r".

What happens when ld -r is the final link?  Think loadable linux
kernel modules and some other stuff that abuse elf relocatable
objects?

Thanks,
Andrew Pinski


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