1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-22 10:27:48 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-17 00:45:02 +09:00
parent 0cd77f2861
commit 4a687e0b68
2 changed files with 4 additions and 11 deletions

14
main.cc
View File

@ -985,24 +985,16 @@ int main(int argc, char **argv) {
// Initialize synthetic section contents
out::files = files;
out::chunks = chunks;
out::shdr->update_shdr();
out::phdr->update_shdr();
if (out::dynamic)
out::dynamic->update_shdr();
if (out::hash)
out::hash->update_shdr();
out::symtab->shdr.sh_link = out::strtab->shndx;
out::relplt->shdr.sh_link = out::dynsym->shndx;
if (out::hash && out::dynsym)
out::hash->shdr.sh_link = out::dynsym->shndx;
if (out::reldyn)
out::reldyn->shdr.sh_link = out::dynsym->shndx;
for (OutputChunk *chunk : chunks)
chunk->update_shdr();
// Assign offsets to output sections
u64 filesize = set_osec_offsets(chunks);

View File

@ -345,6 +345,7 @@ void HashSection::update_shdr() {
int header_size = 8;
int num_slots = out::dynsym->symbols.size() + 1;
shdr.sh_size = header_size + num_slots * 8;
shdr.sh_link = out::dynsym->shndx;
}
void HashSection::copy_to(u8 *buf) {