Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lld/ELF/SyntheticSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2749,9 +2749,9 @@ RelroPaddingSection::RelroPaddingSection(Ctx &ctx)
: SyntheticSection(ctx, ".relro_padding", SHT_NOBITS, SHF_ALLOC | SHF_WRITE,
1) {}

PaddingSection::PaddingSection(Ctx &ctx, uint64_t size, OutputSection *parent)
: SyntheticSection(ctx, ".padding", SHT_PROGBITS, SHF_ALLOC, 1),
size(size) {
PaddingSection::PaddingSection(Ctx &ctx, uint64_t amount, OutputSection *parent)
: SyntheticSection(ctx, ".padding", SHT_PROGBITS, SHF_ALLOC, 1) {
size = amount;
this->parent = parent;
}

Expand Down
13 changes: 1 addition & 12 deletions lld/ELF/SyntheticSections.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ class EhFrameSection final : public SyntheticSection {
// allocating one for each EhInputSection.
llvm::DenseMap<size_t, CieRecord *> offsetToCie;

uint64_t size = 0;

template <llvm::endianness E> void addRecords(EhInputSection *s);
template <class ELFT>
void iterateFDEWithLSDAAux(EhInputSection &sec,
Expand Down Expand Up @@ -127,7 +125,6 @@ class GotSection final : public SyntheticSection {
protected:
size_t numEntries = 0;
uint32_t tlsIndexOff = -1;
uint64_t size = 0;
struct AuthEntryInfo {
size_t offset;
bool isSymbolFunc;
Expand Down Expand Up @@ -182,7 +179,6 @@ class BssSection final : public SyntheticSection {
static bool classof(const SectionBase *s) {
return isa<SyntheticSection>(s) && cast<SyntheticSection>(s)->bss;
}
uint64_t size;
};

class MipsGotSection final : public SyntheticSection {
Expand Down Expand Up @@ -312,8 +308,6 @@ class MipsGotSection final : public SyntheticSection {
// Number of "Header" entries.
static const unsigned headerEntriesNum = 2;

uint64_t size = 0;

// Symbol and addend.
using GotEntry = std::pair<Symbol *, int64_t>;

Expand Down Expand Up @@ -407,8 +401,6 @@ class StringTableSection final : public SyntheticSection {
private:
const bool dynamic;

uint64_t size = 0;

llvm::DenseMap<llvm::CachedHashStringRef, unsigned> stringMap;
SmallVector<StringRef, 0> strings;
};
Expand Down Expand Up @@ -475,7 +467,6 @@ template <class ELFT> class DynamicSection final : public SyntheticSection {

private:
std::vector<std::pair<int32_t, uint64_t>> computeContents();
uint64_t size = 0;
};

class RelocationBaseSection : public SyntheticSection {
Expand Down Expand Up @@ -780,10 +771,8 @@ class RelroPaddingSection final : public SyntheticSection {
};

class PaddingSection final : public SyntheticSection {
uint64_t size;

public:
PaddingSection(Ctx &ctx, uint64_t size, OutputSection *parent);
PaddingSection(Ctx &ctx, uint64_t amount, OutputSection *parent);
size_t getSize() const override { return size; }
void writeTo(uint8_t *buf) override;
};
Expand Down