This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Update LTO plugin interface
On Thu, Dec 2, 2010 at 1:01 PM, Cary Coutant <ccoutant@google.com> wrote:
>> ?I'm wondering if the linker shouldn't just gather the plugin-contributed
>> object files, substitute them into appropriate places on the original
>> command-line, and re-exec itself.
>
> That's not effectively different from the collect2 approach that we
> had before the linker plugin interface. The only thing collect2
> couldn't handle was IR files inside archives, and that wouldn't have
> required much additional effort to add.
Does collect2 know linker scripts? Like
hjl@gnu-32 doc]$ cat /usr/lib/libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED (
/lib/ld-linux.so.2 ) )
[hjl@gnu-32 doc]$
> The benefit of the plugin approach is that you don't have to link twice.
>
You can just do symbol resolution in stage 1. No need for
complete linking in stage 1.
--
H.J.