1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-11 16:58:12 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-22 19:42:52 +09:00
parent 88bdcbf009
commit 2e4a9d90a6
2 changed files with 2 additions and 4 deletions

View File

@ -155,8 +155,8 @@ create_shdrs(ArrayRef<OutputChunk *> output_chunks) {
std::vector<ELF64LE::Shdr> vec;
vec.push_back({});
for (OutputChunk *chunk : output_chunks)
if (const ELF64LE::Shdr *hdr = chunk->get_shdr())
vec.push_back(*hdr);
if (!chunk->name.empty())
vec.push_back(chunk->hdr);
return vec;
}

2
mold.h
View File

@ -211,7 +211,6 @@ public:
virtual void set_offset(uint64_t off) { offset = off; }
uint64_t get_offset() const { return offset; }
virtual uint64_t get_size() const = 0;
virtual const ELF64LE::Shdr *get_shdr() const { return nullptr; }
StringRef name;
ELF64LE::Shdr hdr = {};
@ -286,7 +285,6 @@ public:
}
void set_offset(uint64_t off) override;
const ELF64LE::Shdr *get_shdr() const override { return &hdr; }
std::vector<InputChunk *> chunks;
static std::vector<OutputSection *> all_instances;