diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-18 18:11:26 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-18 18:11:26 +0000 |
commit | 69082f051d678e662b922b5424c0db88eb08e791 (patch) | |
tree | 3f3092334f158b2e53206f06c7b7a17554936f4b /lld/ELF/OutputSections.cpp | |
parent | 2f055f98814795deb3c78fa882531da53e188a3a (diff) | |
download | bcm5719-llvm-69082f051d678e662b922b5424c0db88eb08e791.tar.gz bcm5719-llvm-69082f051d678e662b922b5424c0db88eb08e791.zip |
Revert "bar"
This reverts commit r263799.
It was a mistake. Sorry about that.
llvm-svn: 263801
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 042bc44f11c..b456ac6fe79 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -1168,8 +1168,16 @@ template <class ELFT> void EHOutputSection<ELFT>::writeTo(uint8_t *Buf) { } } - for (EHInputSection<ELFT> *S : Sections) - S->relocate(Buf); + for (EHInputSection<ELFT> *S : Sections) { + const Elf_Shdr *RelSec = S->RelocSection; + if (!RelSec) + continue; + ELFFile<ELFT> &EObj = S->getFile()->getObj(); + if (RelSec->sh_type == SHT_RELA) + S->relocate(Buf, nullptr, EObj.relas(RelSec)); + else + S->relocate(Buf, nullptr, EObj.rels(RelSec)); + } } template <class ELFT> |