mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Elf_Word is not POD! Stop using it in a DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141851 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -296,7 +296,7 @@ class ELFObjectFile : public ObjectFile {
|
|||||||
const Elf_Shdr *dot_strtab_sec; // Symbol header string table.
|
const Elf_Shdr *dot_strtab_sec; // Symbol header string table.
|
||||||
Sections_t SymbolTableSections;
|
Sections_t SymbolTableSections;
|
||||||
IndexMap_t SymbolTableSectionsIndexMap;
|
IndexMap_t SymbolTableSectionsIndexMap;
|
||||||
DenseMap<const Elf_Sym*, Elf_Word> ExtendedSymbolTable;
|
DenseMap<const Elf_Sym*, ELF::Elf64_Word> ExtendedSymbolTable;
|
||||||
|
|
||||||
/// @brief Map sections to an array of relocation sections that reference
|
/// @brief Map sections to an array of relocation sections that reference
|
||||||
/// them sorted by section index.
|
/// them sorted by section index.
|
||||||
@@ -375,7 +375,7 @@ public:
|
|||||||
|
|
||||||
uint64_t getNumSections() const;
|
uint64_t getNumSections() const;
|
||||||
uint64_t getStringTableIndex() const;
|
uint64_t getStringTableIndex() const;
|
||||||
uint64_t getSymbolTableIndex(const Elf_Sym *symb) const;
|
ELF::Elf64_Word getSymbolTableIndex(const Elf_Sym *symb) const;
|
||||||
const Elf_Shdr *getSection(const Elf_Sym *symb) const;
|
const Elf_Shdr *getSection(const Elf_Sym *symb) const;
|
||||||
};
|
};
|
||||||
} // end namespace
|
} // end namespace
|
||||||
@@ -433,7 +433,7 @@ error_code ELFObjectFile<target_endianness, is64Bits>
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<support::endianness target_endianness, bool is64Bits>
|
template<support::endianness target_endianness, bool is64Bits>
|
||||||
uint64_t ELFObjectFile<target_endianness, is64Bits>
|
ELF::Elf64_Word ELFObjectFile<target_endianness, is64Bits>
|
||||||
::getSymbolTableIndex(const Elf_Sym *symb) const {
|
::getSymbolTableIndex(const Elf_Sym *symb) const {
|
||||||
if (symb->st_shndx == ELF::SHN_XINDEX)
|
if (symb->st_shndx == ELF::SHN_XINDEX)
|
||||||
return ExtendedSymbolTable.lookup(symb);
|
return ExtendedSymbolTable.lookup(symb);
|
||||||
@@ -444,11 +444,8 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
const typename ELFObjectFile<target_endianness, is64Bits>::Elf_Shdr *
|
const typename ELFObjectFile<target_endianness, is64Bits>::Elf_Shdr *
|
||||||
ELFObjectFile<target_endianness, is64Bits>
|
ELFObjectFile<target_endianness, is64Bits>
|
||||||
::getSection(const Elf_Sym *symb) const {
|
::getSection(const Elf_Sym *symb) const {
|
||||||
if (symb->st_shndx == ELF::SHN_XINDEX) {
|
if (symb->st_shndx == ELF::SHN_XINDEX)
|
||||||
if (!ExtendedSymbolTable.count(symb))
|
|
||||||
return 0;
|
|
||||||
return getSection(ExtendedSymbolTable.lookup(symb));
|
return getSection(ExtendedSymbolTable.lookup(symb));
|
||||||
}
|
|
||||||
if (symb->st_shndx >= ELF::SHN_LORESERVE)
|
if (symb->st_shndx >= ELF::SHN_LORESERVE)
|
||||||
return 0;
|
return 0;
|
||||||
return getSection(symb->st_shndx);
|
return getSection(symb->st_shndx);
|
||||||
|
Reference in New Issue
Block a user