mirror of
https://github.com/rui314/mold.git
synced 2024-11-11 05:46:58 +03:00
temporary
This commit is contained in:
parent
6a8d984c09
commit
62cd74165e
8
main.cc
8
main.cc
@ -339,10 +339,9 @@ static void scan_rels() {
|
||||
|
||||
// Scan relocations to find dynamic symbols.
|
||||
tbb::parallel_for_each(out::objs, [&](ObjectFile *file) {
|
||||
for (InputSection *isec : file->sections) {
|
||||
for (InputSection *isec : file->sections)
|
||||
if (isec)
|
||||
isec->scan_relocations();
|
||||
}
|
||||
});
|
||||
|
||||
// If there was a relocation that refers an undefined symbol,
|
||||
@ -358,9 +357,8 @@ static void scan_rels() {
|
||||
|
||||
tbb::parallel_for(0, (int)files.size(), [&](int i) {
|
||||
for (Symbol *sym : files[i]->symbols)
|
||||
if (sym->file == files[i])
|
||||
if (sym->flags)
|
||||
vec[i].push_back(sym);
|
||||
if (sym->flags && sym->file == files[i])
|
||||
vec[i].push_back(sym);
|
||||
});
|
||||
|
||||
// Assign offsets in additional tables for each dynamic symbol.
|
||||
|
@ -584,7 +584,7 @@ void DynsymSection::copy_buf() {
|
||||
u8 *base = out::buf + shdr.sh_offset;
|
||||
memset(base, 0, sizeof(ElfSym));
|
||||
|
||||
tbb::parallel_for_each(symbols, [&](Symbol *sym) {
|
||||
for (Symbol *sym : symbols) {
|
||||
auto &esym = *(ElfSym *)(base + sym->dynsym_idx * sizeof(ElfSym));
|
||||
memset(&esym, 0, sizeof(esym));
|
||||
esym.st_name = sym->dynstr_offset;
|
||||
@ -604,7 +604,7 @@ void DynsymSection::copy_buf() {
|
||||
esym.st_shndx = sym->input_section->output_section->shndx;
|
||||
esym.st_value = sym->get_addr();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void HashSection::update_shdr() {
|
||||
|
Loading…
Reference in New Issue
Block a user