mirror of
https://github.com/rui314/mold.git
synced 2024-12-27 10:23:41 +03:00
temporary
This commit is contained in:
parent
8ab8d5b75e
commit
5bdc92337a
@ -16,10 +16,6 @@ InputSection::InputSection(ObjectFile *file, const ELF64LE::Shdr &shdr, StringRe
|
||||
error(toString(file) + ": section sh_addralign is not a power of two");
|
||||
}
|
||||
|
||||
uint64_t InputSection::get_size() const {
|
||||
return shdr.sh_size;
|
||||
}
|
||||
|
||||
void InputSection::copy_to(uint8_t *buf) {
|
||||
if (shdr.sh_type == SHT_NOBITS || shdr.sh_size == 0)
|
||||
return;
|
||||
|
3
mold.h
3
mold.h
@ -193,7 +193,6 @@ public:
|
||||
|
||||
void copy_to(uint8_t *buf);
|
||||
void relocate(uint8_t *buf);
|
||||
uint64_t get_size() const;
|
||||
void scan_relocations();
|
||||
|
||||
ObjectFile *file;
|
||||
@ -313,7 +312,7 @@ public:
|
||||
}
|
||||
|
||||
uint64_t get_filesz() const override {
|
||||
return chunks.back()->fileoff + chunks.back()->get_size() -
|
||||
return chunks.back()->fileoff + chunks.back()->shdr.sh_size -
|
||||
chunks.front()->fileoff;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ void OutputSection::set_fileoff(uint64_t off) {
|
||||
shdr.sh_offset = off;
|
||||
for (int i = 0; i < chunks.size(); i++) {
|
||||
chunks[i]->fileoff = off;
|
||||
off += chunks[i]->get_size();
|
||||
off += chunks[i]->shdr.sh_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user