forked from OSchip/llvm-project
Delete Off_Bss.
It is now just a special case of Off_Sec. llvm-svn: 265676
This commit is contained in:
parent
ae7a9df7bf
commit
c012db35d7
|
|
@ -308,8 +308,6 @@ typename ELFT::uint DynamicReloc<ELFT>::getOffset() const {
|
||||||
return Out<ELFT>::Got->getTlsIndexVA();
|
return Out<ELFT>::Got->getTlsIndexVA();
|
||||||
case Off_Sec:
|
case Off_Sec:
|
||||||
return OffsetInSec + OffsetSec->getVA();
|
return OffsetInSec + OffsetSec->getVA();
|
||||||
case Off_Bss:
|
|
||||||
return cast<SharedSymbol<ELFT>>(Sym)->OffsetInBss + Out<ELFT>::Bss->getVA();
|
|
||||||
case Off_Got:
|
case Off_Got:
|
||||||
return Sym->getGotVA<ELFT>();
|
return Sym->getGotVA<ELFT>();
|
||||||
case Off_GotPlt:
|
case Off_GotPlt:
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,6 @@ template <class ELFT> struct DynamicReloc {
|
||||||
enum OffsetKind {
|
enum OffsetKind {
|
||||||
Off_Got, // The got entry of Sym.
|
Off_Got, // The got entry of Sym.
|
||||||
Off_GotPlt, // The got.plt 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_Sec, // The final position of the given input section and offset.
|
||||||
Off_LTlsIndex, // The local tls index.
|
Off_LTlsIndex, // The local tls index.
|
||||||
Off_GTlsIndex, // The global tls index of Sym.
|
Off_GTlsIndex, // The global tls index of Sym.
|
||||||
|
|
|
||||||
|
|
@ -738,8 +738,6 @@ void Writer<ELFT>::addCopyRelSymbol(SharedSymbol<ELFT> *SS) {
|
||||||
Off = alignTo(Off, Align);
|
Off = alignTo(Off, Align);
|
||||||
Out<ELFT>::Bss->setSize(Off + SS->template getSize<ELFT>());
|
Out<ELFT>::Bss->setSize(Off + SS->template getSize<ELFT>());
|
||||||
Out<ELFT>::Bss->updateAlign(Align);
|
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 Shndx = SS->Sym.st_shndx;
|
||||||
uintX_t Value = SS->Sym.st_value;
|
uintX_t Value = SS->Sym.st_value;
|
||||||
// Look through the DSO's dynamic symbol for aliases and create a dynamic
|
// Look through the DSO's dynamic symbol for aliases and create a dynamic
|
||||||
|
|
@ -753,6 +751,8 @@ void Writer<ELFT>::addCopyRelSymbol(SharedSymbol<ELFT> *SS) {
|
||||||
S.setUsedInRegularObj();
|
S.setUsedInRegularObj();
|
||||||
S.MustBeInDynSym = true;
|
S.MustBeInDynSym = true;
|
||||||
}
|
}
|
||||||
|
Out<ELFT>::RelaDyn->addReloc(
|
||||||
|
{Target->CopyRel, Out<ELFT>::Bss, SS->OffsetInBss, false, SS, 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue