1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-22 18:40:59 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-03 20:06:26 +09:00
parent 59463ef19a
commit e62255a2ae
2 changed files with 3 additions and 3 deletions

4
mold.h
View File

@ -290,9 +290,7 @@ public:
OutputPhdr() { shdr.sh_flags = llvm::ELF::SHF_ALLOC; }
void relocate(u8 *buf) override;
u64 get_size() const override {
return entries.size() * sizeof(ELF64LE::Phdr);
}
u64 get_size() const override { return shdr.sh_size; }
void construct(std::vector<OutputChunk *> &sections);

View File

@ -123,6 +123,8 @@ void OutputPhdr::construct(std::vector<OutputChunk *> &chunks) {
for (Phdr &ent : entries)
if (ent.phdr.p_type == PT_LOAD)
ent.members.front()->starts_new_ptload = true;
this->shdr.sh_size = entries.size() * sizeof(ELF64LE::Phdr);
}
void OutputPhdr::relocate(u8 *buf) {