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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Apr 24 05:17:40 PDT 2014


>> Ok. I also see that you can probably do this because -fpic/-fPIC flags are implied for Android on certain architectures (in Clang::ConstructJob method). But, anyway, unconditionally ignoring the presence/absence of -pie flag on Android is a serious change, which might be surprising for end-user. Is it possible to imply "-pie" iff LTO is enabled?
> Yes, it is possible to use -pie only with -flto.
> Raphael, do you have any objections?

I am probably missing something.

>From the previous comments I was under the impression that non-pie
executable were not supported at all on android. If that is the case,
passing -pie would be nop, except for working around a linker bug (it
not passing  LDPO_PIE to the plugin).

If that is the case, we should just always pass -pie. If that is not
the case, I don't understand the patch. When building a pie executable
the user has to pass -fPIE to clang and -pie gets passed to the linker
already, no?

Cheers,
Rafael




More information about the llvm-commits mailing list