[PATCH] Introduce new gold plugin option "relocation-pic"

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Feb 11 09:35:57 PST 2014


On 11 February 2014 11:43, Alexey Volkov <avolkov.intel at gmail.com> wrote:
> Sorry, about -static I wasn't right: there are no problems on Android with
> them since there are no relocations in static executable.
> The original problem is that COPY relocations are not supported on Android
> so PIC is used by default.
> Without new gold plugin option the only way I see is to pass -pie to linker
> only when building dynamic executable, is it right?

Looks like it is just gnutools::Link::ConstructJob that is missing a
check for isPIEDefault. Maybe the logic in there should be unified
with the logic in Clang::ConstructJob for deciding if we have a PIE or
not?

Cheers,
Rafael



More information about the llvm-commits mailing list