mirror of
https://github.com/rui314/mold.git
synced 2024-11-11 16:58:12 +03:00
temporary
This commit is contained in:
parent
26fdb98827
commit
c7769d3766
@ -131,12 +131,8 @@ void InputSection::scan_relocations() {
|
||||
sym->file->dynstr_size += sym->name.size() + 1;
|
||||
}
|
||||
|
||||
if (sym->type == STT_GNU_IFUNC && set_flag(sym, Symbol::NEEDS_IFUNC) &&
|
||||
set_flag(sym, Symbol::NEEDS_PLT)) {
|
||||
if (sym->type == STT_GNU_IFUNC && set_flag(sym, Symbol::NEEDS_PLT))
|
||||
sym->file->num_plt++;
|
||||
sym->file->num_gotplt++;
|
||||
sym->file->num_relplt++;
|
||||
}
|
||||
|
||||
switch (rel.getType(false)) {
|
||||
case R_X86_64_GOT32:
|
||||
@ -158,11 +154,8 @@ void InputSection::scan_relocations() {
|
||||
case R_X86_64_PLT32:
|
||||
if (config.is_static)
|
||||
break;
|
||||
if (set_flag(sym, Symbol::NEEDS_PLT)) {
|
||||
if (set_flag(sym, Symbol::NEEDS_PLT))
|
||||
sym->file->num_plt++;
|
||||
sym->file->num_gotplt++;
|
||||
sym->file->num_relplt++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
4
main.cc
4
main.cc
@ -340,13 +340,13 @@ static void scan_rels(ArrayRef<ObjectFile *> files) {
|
||||
out::got->shdr.sh_size += file->num_got * GOT_SIZE;
|
||||
|
||||
file->gotplt_offset = out::gotplt->shdr.sh_size;
|
||||
out::gotplt->shdr.sh_size += file->num_gotplt * GOT_SIZE;
|
||||
out::gotplt->shdr.sh_size += file->num_plt * GOT_SIZE;
|
||||
|
||||
file->plt_offset = out::plt->shdr.sh_size;
|
||||
out::plt->shdr.sh_size += file->num_plt * PLT_SIZE;
|
||||
|
||||
file->relplt_offset = out::relplt->shdr.sh_size;
|
||||
out::relplt->shdr.sh_size += file->num_relplt * sizeof(ELF64LE::Rela);
|
||||
out::relplt->shdr.sh_size += file->num_plt * sizeof(ELF64LE::Rela);
|
||||
|
||||
if (out::dynsym) {
|
||||
file->dynsym_offset = out::dynsym->shdr.sh_size;
|
||||
|
5
mold.h
5
mold.h
@ -216,7 +216,6 @@ public:
|
||||
NEEDS_GOTTP = 1 << 1,
|
||||
NEEDS_PLT = 1 << 2,
|
||||
NEEDS_DYNSYM = 1 << 3,
|
||||
NEEDS_IFUNC = 1 << 4,
|
||||
};
|
||||
|
||||
std::atomic_uint8_t flags = ATOMIC_VAR_INIT(0);
|
||||
@ -589,10 +588,8 @@ public:
|
||||
u64 global_symtab_size = 0;
|
||||
u64 global_strtab_size = 0;
|
||||
|
||||
std::atomic_uint32_t num_plt = ATOMIC_VAR_INIT(0);
|
||||
std::atomic_uint32_t num_got = ATOMIC_VAR_INIT(0);
|
||||
std::atomic_uint32_t num_gotplt = ATOMIC_VAR_INIT(0);
|
||||
std::atomic_uint32_t num_relplt = ATOMIC_VAR_INIT(0);
|
||||
std::atomic_uint32_t num_plt = ATOMIC_VAR_INIT(0);
|
||||
std::atomic_uint32_t num_dynsym = ATOMIC_VAR_INIT(0);
|
||||
std::atomic_uint32_t dynstr_size = ATOMIC_VAR_INIT(0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user