From a28414d7ec3d86c23d4aaf39ca71f67634ae4a04 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 24 May 2017 22:04:32 +0000 Subject: [PATCH] Simplify MipsRldMapSection::writeTo. It is not clear why a synthetic section wants to use padding defined in the linker script. The padding is for the space between sections. It was also missing a test. llvm-svn: 303812 --- lld/ELF/SyntheticSections.cpp | 10 ---------- lld/ELF/SyntheticSections.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index bcfb775..0a12a39 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2173,16 +2173,6 @@ MipsRldMapSection::MipsRldMapSection() : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS, Config->Wordsize, ".rld_map") {} -void MipsRldMapSection::writeTo(uint8_t *Buf) { - // Apply filler from linker script. - uint64_t Filler = Script->getCmd(this->OutSec)->getFiller(); - if (Filler == 0) - return; - - Filler = (Filler << 32) | Filler; - memcpy(Buf, &Filler, getSize()); -} - ARMExidxSentinelSection::ARMExidxSentinelSection() : SyntheticSection(SHF_ALLOC | SHF_LINK_ORDER, SHT_ARM_EXIDX, Config->Wordsize, ".ARM.exidx") {} diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index c5ffb88..8ff155d 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -709,7 +709,7 @@ class MipsRldMapSection : public SyntheticSection { public: MipsRldMapSection(); size_t getSize() const override { return Config->Wordsize; } - void writeTo(uint8_t *Buf) override; + void writeTo(uint8_t *Buf) override {} }; class ARMExidxSentinelSection : public SyntheticSection { -- 2.7.4