summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-03-18 18:09:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-03-18 18:09:32 +0000
commitc2cfd9fa342662ce70382465f9ba90f3b9e70c96 (patch)
tree7ae1b75af8d159e6b6857e3c13caefb0e143c7c9 /lld/ELF/OutputSections.cpp
parent5b5061f0cad610ff12b422ba29a4114a3221654e (diff)
downloadbcm5719-llvm-c2cfd9fa342662ce70382465f9ba90f3b9e70c96.tar.gz
bcm5719-llvm-c2cfd9fa342662ce70382465f9ba90f3b9e70c96.zip
bar
llvm-svn: 263799
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