[PATCH] D18183: [ELF] - -pie/--pic-executable option implemented
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 09:00:25 PDT 2016
grimar added inline comments.
================
Comment at: ELF/Config.h:71
@@ -70,1 +70,3 @@
bool NoinhibitExec;
+ bool Pic = false;
+ bool Pie;
----------------
ruiu wrote:
> Remove " = false".
Done.
================
Comment at: ELF/Driver.cpp:150-151
@@ +149,4 @@
+ error("-shared and -pie may not be used together");
+ if (Config->Static)
+ error("-static and -pie may not be used together");
+ }
----------------
ruiu wrote:
> I don't see any reason to reject that, so I believe they are simply wrong. And I don't see a reason to copy a wrong behavior.
This patch does not support this.
I did not investigate where lld needs change to support that. Let me leave it as is now ? If someone needs that - it would be his responsibility to tweak lld here.
================
Comment at: ELF/SymbolTable.cpp:120-121
@@ -119,3 +119,4 @@
std::string ErrMsg;
- const Target *TheTarget = TargetRegistry::lookupTarget(TripleStr, ErrMsg);
+ const llvm::Target *TheTarget =
+ TargetRegistry::lookupTarget(TripleStr, ErrMsg);
if (!TheTarget)
----------------
ruiu wrote:
> Can you revert this change?
Done.
================
Comment at: ELF/Target.cpp:339
@@ -338,3 +338,3 @@
if (auto *SS = dyn_cast<SharedSymbol<ELFT>>(&S))
- if (!Config->Shared && SS->Sym.getType() == STT_FUNC &&
+ if (!Config->Pic && SS->Sym.getType() == STT_FUNC &&
!refersToGotEntry(Type))
----------------
ruiu wrote:
> I like these renamings from Shared to Pic as it conveys more accurate meaning.
true.
http://reviews.llvm.org/D18183
More information about the llvm-commits
mailing list