1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-20 01:18:53 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-20 10:21:02 +09:00
parent 11d7b33a11
commit 09c8d598c9
2 changed files with 6 additions and 2 deletions

View File

@ -175,7 +175,8 @@ public:
class InputSection : public InputChunk {
public:
InputSection(ObjectFile *file, const ELF64LE::Shdr *hdr, StringRef name);
void copy_to(uint8_t *buf);
void copy_to(uint8_t *buf) override;
void relocate(uint8_t *buf) override {}
uint64_t get_size() const;
ObjectFile *file;
@ -274,7 +275,9 @@ public:
for_each(sections, [&](InputSection *isec) { isec->copy_to(buf); });
}
void relocate(uint8_t *buf) override {}
void relocate(uint8_t *buf) override {
for_each(sections, [&](InputSection *isec) { isec->relocate(buf); });
}
uint64_t get_size() const override {
assert(size >= 0);

View File

@ -206,6 +206,7 @@ int main(int argc, char **argv) {
copy_timer.stopTimer();
reloc_timer.startTimer();
for_each(output_sections, [&](OutputSection *osec) { osec->relocate(buf); });
reloc_timer.stopTimer();
commit_timer.startTimer();