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) {
|
for (const ELF64LE::Rela &rel : rels) {
|
||||||
Symbol *sym = file->get_symbol(rel.getSymbol(false));
|
Symbol *sym = file->get_symbol(rel.getSymbol(false));
|
||||||
if (!sym)
|
if (!sym || !sym->file)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (rel.getType(false)) {
|
switch (rel.getType(false)) {
|
||||||
@ -48,10 +48,12 @@ std::tuple<u64, u64> InputSection::scan_relocations() {
|
|||||||
case R_X86_64_REX_GOTPCRELX:
|
case R_X86_64_REX_GOTPCRELX:
|
||||||
num_got += !sym->needs_got.exchange(true);
|
num_got += !sym->needs_got.exchange(true);
|
||||||
break;
|
break;
|
||||||
|
#if 0
|
||||||
case R_X86_64_PLT32:
|
case R_X86_64_PLT32:
|
||||||
num_got += !sym->needs_got.exchange(true);
|
num_got += !sym->needs_got.exchange(true);
|
||||||
num_plt += !sym->needs_plt.exchange(true);
|
num_plt += !sym->needs_plt.exchange(true);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
main.cc
6
main.cc
@ -375,7 +375,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
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
|
// Parse command line options
|
||||||
MyOptTable opt_table;
|
MyOptTable opt_table;
|
||||||
@ -506,11 +506,13 @@ int main(int argc, char **argv) {
|
|||||||
for (Symbol *sym : file->symbols) {
|
for (Symbol *sym : file->symbols) {
|
||||||
if (sym->file == file && sym->needs_got) {
|
if (sym->file == file && sym->needs_got) {
|
||||||
out::got->symbols.push_back(sym);
|
out::got->symbols.push_back(sym);
|
||||||
sym->got_addr = offset * 8;
|
sym->got_addr = offset;
|
||||||
offset += 8;
|
offset += 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(offset == out::got->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add output sections.
|
// Add output sections.
|
||||||
|
Loading…
Reference in New Issue
Block a user