[PATCH] D18731: ELF: Create dynamic symbols for symbol aliases of copy relocations.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 13:57:48 PDT 2016
ruiu added a comment.
I think the original one is better because as you said copy relocations are rather rare.
================
Comment at: ELF/OutputSections.cpp:842
@@ -841,3 +841,3 @@
template <class ELFT> void OutputSection<ELFT>::assignOffsets() {
- uintX_t Off = 0;
+ uintX_t Off = this->Header.sh_size;
for (InputSection<ELFT> *S : Sections) {
----------------
What is this change for?
================
Comment at: ELF/Writer.cpp:764
@@ +763,3 @@
+ SSInFile.setUsedInRegularObj();
+ SSInFile.MustBeInDynSym = true;
+ if (SSInFile.Sym.getBinding() == ELF::STB_GLOBAL)
----------------
You set MustBeInDynSym true here for all symbols at the same offset. Assume that you have symbols A and B where B is a weak alias to A. If your program uses symbol A, then will both A and B be in the program's dynsym? Is this expected?
http://reviews.llvm.org/D18731
More information about the llvm-commits
mailing list