summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index b456ac6fe79..042bc44f11c 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -1168,16 +1168,8 @@ template <class ELFT> void EHOutputSection<ELFT>::writeTo(uint8_t *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));
- }
+ for (EHInputSection<ELFT> *S : Sections)
+ S->relocate(Buf);
}
template <class ELFT>
OpenPOWER on IntegriCloud