1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-25 17:34:02 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-28 22:08:46 +09:00
parent 503fd8478c
commit 8c07e40f2b
2 changed files with 5 additions and 3 deletions

5
mold.h
View File

@ -797,8 +797,7 @@ public:
StringRef soname;
u32 soname_dynstr_idx = -1;
std::vector<u16> versyms;
std::vector<StringRef> verdefs;
std::vector<StringRef> version_strings;
private:
StringRef get_soname(ArrayRef<ELF64LE::Shdr> elf_sections);
@ -806,6 +805,8 @@ private:
std::vector<StringRef> read_verdef();
std::vector<const ELF64LE::Sym *> elf_syms;
std::vector<u16> versyms;
StringRef symbol_strtab;
const ELF64LE::Shdr *symtab_sec;
};

View File

@ -645,7 +645,7 @@ void SharedFile::parse() {
symbol_strtab = CHECK(obj.getStringTableForSymtab(*symtab_sec, elf_sections), this);
soname = get_soname(elf_sections);
verdefs = read_verdef();
version_strings = read_verdef();
// Read a symbol table.
int first_global = symtab_sec->sh_info;
@ -735,6 +735,7 @@ void SharedFile::resolve_symbols() {
sym.input_section = nullptr;
sym.piece_ref = {};
sym.value = esym.st_value;
sym.ver_idx = versyms[i];
sym.type = (esym.getType() == STT_GNU_IFUNC) ? STT_FUNC : esym.getType();
sym.binding = esym.getBinding();
sym.visibility = esym.getVisibility();