[PATCH] D14090: [ELF2] R_X86_64_COPY relocation implemented
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 27 14:50:01 PDT 2015
ruiu added inline comments.
================
Comment at: ELF/Symbols.h:96
@@ -95,2 +95,3 @@
uint32_t PltIndex = -1;
+ bool InRelaBss = false;
bool isInGot() const { return GotIndex != -1U; }
----------------
Can you move this to SharedSymbol? This increases the size of SymbolBody at least one byte, but this field is not going to be used except for SharedSymbol.
================
Comment at: ELF/Writer.cpp:209
@@ +208,3 @@
+ continue;
+ else
+ Body->InRelaBss = true;
----------------
No `else` after `continue`.
================
Comment at: ELF/Writer.cpp:415
@@ +414,3 @@
+ for (SharedSymbol<ELFT> *C : Syms) {
+ const Elf_Sym &Sym = C->Sym;
+ Off = RoundUpToAlignment(Off, 16);
----------------
Add a brief comment here to say that we don't know the exact alignment requirement for the data copied by a copy relocation, so align that to 16 byte boundaries (which we think is large enough) unconditionally.
http://reviews.llvm.org/D14090
More information about the llvm-commits
mailing list