diff options
| author | George Rimar <grimar@accesssoftek.com> | 2017-03-21 09:01:39 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2017-03-21 09:01:39 +0000 |
| commit | 90a528ba7ac9f6e6e1f81e70e5e7c557a4b63dc0 (patch) | |
| tree | c1354571f27c0949cc622988c5e2431253eaf55d | |
| parent | f56cadd3b39ad03e08a3056ac3ac9ff62c9f058d (diff) | |
| download | bcm5719-llvm-90a528ba7ac9f6e6e1f81e70e5e7c557a4b63dc0.tar.gz bcm5719-llvm-90a528ba7ac9f6e6e1f81e70e5e7c557a4b63dc0.zip | |
[ELF] - Detemplate ARMExidxSentinelSection. NFC.
llvm-svn: 298350
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 13 | ||||
| -rw-r--r-- | lld/ELF/SyntheticSections.h | 2 | ||||
| -rw-r--r-- | lld/ELF/Writer.cpp | 2 |
3 files changed, 5 insertions, 12 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 4b80b6bce9a..03e2d99f82d 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2182,17 +2182,15 @@ void MipsRldMapSection::writeTo(uint8_t *Buf) { memcpy(Buf, &Filler, getSize()); } -template <class ELFT> -ARMExidxSentinelSection<ELFT>::ARMExidxSentinelSection() +ARMExidxSentinelSection::ARMExidxSentinelSection() : SyntheticSection(SHF_ALLOC | SHF_LINK_ORDER, SHT_ARM_EXIDX, - sizeof(typename ELFT::uint), ".ARM.exidx") {} + Config->Wordsize, ".ARM.exidx") {} // Write a terminating sentinel entry to the end of the .ARM.exidx table. // This section will have been sorted last in the .ARM.exidx table. // This table entry will have the form: // | PREL31 upper bound of code that has exception tables | EXIDX_CANTUNWIND | -template <class ELFT> -void ARMExidxSentinelSection<ELFT>::writeTo(uint8_t *Buf) { +void ARMExidxSentinelSection::writeTo(uint8_t *Buf) { // Get the InputSection before us, we are by definition last auto RI = cast<OutputSection>(this->OutSec)->Sections.rbegin(); InputSection *LE = *(++RI); @@ -2338,11 +2336,6 @@ template class elf::VersionDefinitionSection<ELF32BE>; template class elf::VersionDefinitionSection<ELF64LE>; template class elf::VersionDefinitionSection<ELF64BE>; -template class elf::ARMExidxSentinelSection<ELF32LE>; -template class elf::ARMExidxSentinelSection<ELF32BE>; -template class elf::ARMExidxSentinelSection<ELF64LE>; -template class elf::ARMExidxSentinelSection<ELF64BE>; - template class elf::EhFrameSection<ELF32LE>; template class elf::EhFrameSection<ELF32BE>; template class elf::EhFrameSection<ELF64LE>; diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 5babe78741e..e60df2847d7 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -718,7 +718,7 @@ public: void writeTo(uint8_t *Buf) override; }; -template <class ELFT> class ARMExidxSentinelSection : public SyntheticSection { +class ARMExidxSentinelSection : public SyntheticSection { public: ARMExidxSentinelSection(); size_t getSize() const override { return 8; } diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 2237c537f0e..50c0e6cd34a 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1197,7 +1197,7 @@ template <class ELFT> void Writer<ELFT>::addPredefinedSections() { // We have the terminater synthetic section class. Add that at the end. auto *OS = dyn_cast_or_null<OutputSection>(findSection(".ARM.exidx")); if (OS && !OS->Sections.empty() && !Config->Relocatable) - OS->addSection(make<ARMExidxSentinelSection<ELFT>>()); + OS->addSection(make<ARMExidxSentinelSection>()); } // The linker is expected to define SECNAME_start and SECNAME_end |

