[lld] r265676 - Delete Off_Bss.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 07:34:15 PDT 2016
Author: rafael
Date: Thu Apr 7 09:34:15 2016
New Revision: 265676
URL: http://llvm.org/viewvc/llvm-project?rev=265676&view=rev
Log:
Delete Off_Bss.
It is now just a special case of Off_Sec.
Modified:
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/OutputSections.h
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=265676&r1=265675&r2=265676&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Thu Apr 7 09:34:15 2016
@@ -308,8 +308,6 @@ typename ELFT::uint DynamicReloc<ELFT>::
return Out<ELFT>::Got->getTlsIndexVA();
case Off_Sec:
return OffsetInSec + OffsetSec->getVA();
- case Off_Bss:
- return cast<SharedSymbol<ELFT>>(Sym)->OffsetInBss + Out<ELFT>::Bss->getVA();
case Off_Got:
return Sym->getGotVA<ELFT>();
case Off_GotPlt:
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=265676&r1=265675&r2=265676&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Thu Apr 7 09:34:15 2016
@@ -176,7 +176,6 @@ template <class ELFT> struct DynamicRelo
enum OffsetKind {
Off_Got, // The got entry of Sym.
Off_GotPlt, // The got.plt entry of Sym.
- Off_Bss, // The bss entry of Sym (copy reloc).
Off_Sec, // The final position of the given input section and offset.
Off_LTlsIndex, // The local tls index.
Off_GTlsIndex, // The global tls index of Sym.
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=265676&r1=265675&r2=265676&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Apr 7 09:34:15 2016
@@ -738,8 +738,6 @@ void Writer<ELFT>::addCopyRelSymbol(Shar
Off = alignTo(Off, Align);
Out<ELFT>::Bss->setSize(Off + SS->template getSize<ELFT>());
Out<ELFT>::Bss->updateAlign(Align);
- Out<ELFT>::RelaDyn->addReloc(
- {Target->CopyRel, DynamicReloc<ELFT>::Off_Bss, SS});
uintX_t Shndx = SS->Sym.st_shndx;
uintX_t Value = SS->Sym.st_value;
// Look through the DSO's dynamic symbol for aliases and create a dynamic
@@ -753,6 +751,8 @@ void Writer<ELFT>::addCopyRelSymbol(Shar
S.setUsedInRegularObj();
S.MustBeInDynSym = true;
}
+ Out<ELFT>::RelaDyn->addReloc(
+ {Target->CopyRel, Out<ELFT>::Bss, SS->OffsetInBss, false, SS, 0});
}
template <class ELFT>
More information about the llvm-commits
mailing list