This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold] LLVM plugin and PIE
- From: Remi Gacogne <rgacogne-bugs at coredump dot fr>
- To: binutils at sourceware dot org
- Date: Tue, 12 Jun 2012 17:40:41 +0200 (CEST)
- Subject: [gold] LLVM plugin and PIE
Hi,
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.
Thanks,
--
Regards,
Remi