[PATCH] D15383: [ELF] - R_386_GOTOFF relocation implemented.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 10:01:35 PST 2015
ruiu added inline comments.
================
Comment at: ELF/OutputSections.h:140
@@ -139,2 +139,3 @@
+ bool Demanded = false;
private:
----------------
Maybe we should have a separate global variable, HasGotoffRel, instead of this field.
================
Comment at: ELF/Target.cpp:328-334
@@ -327,2 +327,9 @@
bool X86TargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const {
+ // This relocation does not require got entry,
+ // but it is relative to got and needs it to be created.
+ // Here we request for that.
+ if (Type == R_386_GOTOFF) {
+ Out<ELF32LE>::Got->Demanded = true;
+ return false;
+ }
if (S.isTLS() && Type == R_386_TLS_GD)
----------------
I don't think this is the right place to write this code. This function is doing more than its name implies.
http://reviews.llvm.org/D15383
More information about the llvm-commits
mailing list