mirror of
https://github.com/rui314/mold.git
synced 2025-01-06 07:58:34 +03:00
temporary
This commit is contained in:
parent
0095d99fc0
commit
0018063167
2
mold.h
2
mold.h
@ -756,7 +756,7 @@ private:
|
|||||||
StringRef get_soname(ArrayRef<ELF64LE::Shdr> elf_sections);
|
StringRef get_soname(ArrayRef<ELF64LE::Shdr> elf_sections);
|
||||||
void maybe_override_symbol(Symbol &sym, const ELF64LE::Sym &esym);
|
void maybe_override_symbol(Symbol &sym, const ELF64LE::Sym &esym);
|
||||||
|
|
||||||
ArrayRef<ELF64LE::Sym> elf_syms;
|
std::vector<ELF64LE::Sym> elf_syms;
|
||||||
StringRef symbol_strtab;
|
StringRef symbol_strtab;
|
||||||
const ELF64LE::Shdr *symtab_sec;
|
const ELF64LE::Shdr *symtab_sec;
|
||||||
};
|
};
|
||||||
|
@ -312,14 +312,15 @@ void SharedFile::parse() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int first_global = symtab_sec->sh_info;
|
int first_global = symtab_sec->sh_info;
|
||||||
|
ArrayRef<ELF64LE::Sym> esyms = CHECK(obj.symbols(symtab_sec), this);
|
||||||
|
|
||||||
elf_syms = CHECK(obj.symbols(symtab_sec), this).slice(first_global);
|
|
||||||
symbol_strtab = CHECK(obj.getStringTableForSymtab(*symtab_sec, elf_sections), this);
|
symbol_strtab = CHECK(obj.getStringTableForSymtab(*symtab_sec, elf_sections), this);
|
||||||
soname = get_soname(elf_sections);
|
soname = get_soname(elf_sections);
|
||||||
|
|
||||||
for (const ELF64LE::Sym &esym : elf_syms) {
|
for (const ELF64LE::Sym &esym : esyms.slice(first_global)) {
|
||||||
StringRef name = CHECK(esym.getName(symbol_strtab), this);
|
StringRef name = CHECK(esym.getName(symbol_strtab), this);
|
||||||
symbols.push_back(Symbol::intern(name));
|
symbols.push_back(Symbol::intern(name));
|
||||||
|
elf_syms.push_back(esym);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Counter counter("dso_syms");
|
static Counter counter("dso_syms");
|
||||||
|
Loading…
Reference in New Issue
Block a user