mirror of
https://github.com/rui314/mold.git
synced 2024-09-22 02:20:51 +03:00
temporary
This commit is contained in:
parent
6541daa8e8
commit
8deb326648
@ -32,7 +32,7 @@ std::tuple<u64, u64> InputSection::scan_relocations() {
|
||||
|
||||
for (const ELF64LE::Rela &rel : rels) {
|
||||
Symbol *sym = file->get_symbol(rel.getSymbol(false));
|
||||
if (!sym)
|
||||
if (!sym || !sym->file)
|
||||
continue;
|
||||
|
||||
switch (rel.getType(false)) {
|
||||
@ -48,10 +48,12 @@ std::tuple<u64, u64> InputSection::scan_relocations() {
|
||||
case R_X86_64_REX_GOTPCRELX:
|
||||
num_got += !sym->needs_got.exchange(true);
|
||||
break;
|
||||
#if 0
|
||||
case R_X86_64_PLT32:
|
||||
num_got += !sym->needs_got.exchange(true);
|
||||
num_plt += !sym->needs_plt.exchange(true);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
6
main.cc
6
main.cc
@ -375,7 +375,7 @@ private:
|
||||
};
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
tbb::global_control tbb_cont(tbb::global_control::max_allowed_parallelism, 64);
|
||||
tbb::global_control tbb_cont(tbb::global_control::max_allowed_parallelism, 1);
|
||||
|
||||
// Parse command line options
|
||||
MyOptTable opt_table;
|
||||
@ -506,11 +506,13 @@ int main(int argc, char **argv) {
|
||||
for (Symbol *sym : file->symbols) {
|
||||
if (sym->file == file && sym->needs_got) {
|
||||
out::got->symbols.push_back(sym);
|
||||
sym->got_addr = offset * 8;
|
||||
sym->got_addr = offset;
|
||||
offset += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(offset == out::got->size);
|
||||
}
|
||||
|
||||
// Add output sections.
|
||||
|
Loading…
Reference in New Issue
Block a user