[PATCH] D18183: [ELF] - -pie/--pic-executable option implemented
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 06:47:36 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/Config.h:71
@@ -70,1 +70,3 @@
bool NoinhibitExec;
+ bool Pic = false;
+ bool Pie;
----------------
Remove " = false".
================
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");
+ }
----------------
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.
================
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)
----------------
Can you revert this change?
================
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))
----------------
I like these renamings from Shared to Pic as it conveys more accurate meaning.
http://reviews.llvm.org/D18183
More information about the llvm-commits
mailing list