mirror of
https://github.com/rui314/mold.git
synced 2024-09-22 10:27:48 +03:00
temporary
This commit is contained in:
parent
1e4fb7fa07
commit
2b3b87a815
12
main.cc
12
main.cc
@ -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);
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user