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 14:40:24 +09:00
parent 1e4fb7fa07
commit 2b3b87a815
2 changed files with 5 additions and 14 deletions

12
main.cc
View File

@ -855,18 +855,6 @@ int main(int argc, char **argv) {
// .rela.dyn, .rela.plt.
scan_rels();
// Compute .symtab and .strtab sizes
{
MyTimer t("symtab_size", before_copy_timer);
tbb::parallel_for_each(out::files,
[](ObjectFile *file) { file->compute_symtab(); });
for (ObjectFile *file : out::files) {
out::symtab->shdr.sh_size += file->local_symtab_size + file->global_symtab_size;
out::strtab->shdr.sh_size += file->local_strtab_size + file->global_strtab_size;
}
}
// Add synthetic sections.
out::chunks.push_back(out::got);
out::chunks.push_back(out::plt);

View File

@ -233,6 +233,9 @@ void DynstrSection::copy_buf() {
}
void SymtabSection::update_shdr() {
tbb::parallel_for_each(out::files,
[](ObjectFile *file) { file->compute_symtab(); });
shdr.sh_link = out::strtab->shndx;
local_symtab_off.resize(out::files.size() + 1);
@ -260,8 +263,8 @@ void SymtabSection::update_shdr() {
global_strtab_off[i - 1] + out::files[i - 1]->global_strtab_size;
}
assert(global_symtab_off.back() == out::symtab->shdr.sh_size);
assert(global_strtab_off.back() == out::strtab->shdr.sh_size);
shdr.sh_size = global_symtab_off.back();
out::strtab->shdr.sh_size = global_strtab_off.back();
}
void SymtabSection::copy_buf() {