This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold] LLVM plugin and PIE
- From: Ian Lance Taylor <iant at google dot com>
- To: Remi Gacogne <rgacogne-bugs at coredump dot fr>
- Cc: binutils at sourceware dot org
- Date: Tue, 12 Jun 2012 13:43:17 -0700
- Subject: Re: [gold] LLVM plugin and PIE
- References: <alpine.DEB.2.00.1206121736070.3568@legendary.xserve.fr>
Remi Gacogne <rgacogne-bugs@coredump.fr> writes:
> I am trying to fix an issue in LLVM preventing the use of LTO when
> building a PIE.
>
> The issue is caused by the fact that the LLVM Gold plugin incorrectly
> generates a non-PIC/ non-PIE object when LDPT_LINKER_OUTPUT is set to
> LDPO_EXEC, even if a PIE build is needed. I know this is a LLVM issue
> and not a Gold one, but I am looking for a way for the plugin to know
> that a PIE build has been required.
>
> GCC solves this by passing various options through the
> COLLECT_GCC_OPTIONS env variable, and I was wondering if it was
> possible to avoid doing something of the same kind using informations
> that Gold already provides to the plugin? I haven't been able to find
> such information in the WHOPR design, but I may have missed something.
Are you working with Rafael?
http://sourceware.org/ml/binutils/2012-06/msg00129.html
Ian