mirror of
https://github.com/rui314/mold.git
synced 2024-12-26 01:44:29 +03:00
temporary
This commit is contained in:
parent
503fd8478c
commit
8c07e40f2b
5
mold.h
5
mold.h
@ -797,8 +797,7 @@ public:
|
|||||||
StringRef soname;
|
StringRef soname;
|
||||||
u32 soname_dynstr_idx = -1;
|
u32 soname_dynstr_idx = -1;
|
||||||
|
|
||||||
std::vector<u16> versyms;
|
std::vector<StringRef> version_strings;
|
||||||
std::vector<StringRef> verdefs;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StringRef get_soname(ArrayRef<ELF64LE::Shdr> elf_sections);
|
StringRef get_soname(ArrayRef<ELF64LE::Shdr> elf_sections);
|
||||||
@ -806,6 +805,8 @@ private:
|
|||||||
std::vector<StringRef> read_verdef();
|
std::vector<StringRef> read_verdef();
|
||||||
|
|
||||||
std::vector<const ELF64LE::Sym *> elf_syms;
|
std::vector<const ELF64LE::Sym *> elf_syms;
|
||||||
|
std::vector<u16> versyms;
|
||||||
|
|
||||||
StringRef symbol_strtab;
|
StringRef symbol_strtab;
|
||||||
const ELF64LE::Shdr *symtab_sec;
|
const ELF64LE::Shdr *symtab_sec;
|
||||||
};
|
};
|
||||||
|
@ -645,7 +645,7 @@ void SharedFile::parse() {
|
|||||||
|
|
||||||
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);
|
||||||
verdefs = read_verdef();
|
version_strings = read_verdef();
|
||||||
|
|
||||||
// Read a symbol table.
|
// Read a symbol table.
|
||||||
int first_global = symtab_sec->sh_info;
|
int first_global = symtab_sec->sh_info;
|
||||||
@ -735,6 +735,7 @@ void SharedFile::resolve_symbols() {
|
|||||||
sym.input_section = nullptr;
|
sym.input_section = nullptr;
|
||||||
sym.piece_ref = {};
|
sym.piece_ref = {};
|
||||||
sym.value = esym.st_value;
|
sym.value = esym.st_value;
|
||||||
|
sym.ver_idx = versyms[i];
|
||||||
sym.type = (esym.getType() == STT_GNU_IFUNC) ? STT_FUNC : esym.getType();
|
sym.type = (esym.getType() == STT_GNU_IFUNC) ? STT_FUNC : esym.getType();
|
||||||
sym.binding = esym.getBinding();
|
sym.binding = esym.getBinding();
|
||||||
sym.visibility = esym.getVisibility();
|
sym.visibility = esym.getVisibility();
|
||||||
|
Loading…
Reference in New Issue
Block a user