1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-05 09:07:10 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-11 17:00:16 +09:00
parent 19c645fb94
commit 97a09fbe80
2 changed files with 6 additions and 1 deletions

View File

@ -126,6 +126,11 @@ void InputSection::scan_relocations() {
if (!sym->file || !sym->file->is_alive)
continue;
if (sym->file->is_dso && set_flag(sym, Symbol::NEEDS_DYNSYM)) {
sym->file->dynsym_size += sizeof(ELF64LE::Sym);
sym->file->dynstr_size += sym->name.size() + 1;
}
switch (rel.getType(false)) {
case R_X86_64_GOT32:
case R_X86_64_GOT64:

2
mold.h
View File

@ -209,7 +209,7 @@ public:
u8 is_undef_weak : 1;
u8 traced : 1;
enum { NEEDS_GOT = 1, NEEDS_GOTTP = 2, NEEDS_PLT = 4 };
enum { NEEDS_GOT = 1, NEEDS_GOTTP = 2, NEEDS_PLT = 4, NEEDS_DYNSYM = 8 };
std::atomic_uint8_t flags = ATOMIC_VAR_INIT(0);
u8 visibility = 0;