mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Fix a nomenclature error in llvm-nm.
What llvm-nm prints depends on the file format. On ELF for example, if the file is relocatable, it prints offsets. If it is not, it prints addresses. Since it doesn't really need to care what it is that it is printing, use the generic term value. Fix or implement getSymbolValue to keep llvm-nm working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -417,7 +417,15 @@ template <class ELFT>
|
||||
error_code ELFObjectFile<ELFT>::getSymbolValue(DataRefImpl Symb,
|
||||
uint64_t &Val) const {
|
||||
const Elf_Sym *ESym = getSymbol(Symb);
|
||||
Val = ESym->st_value;
|
||||
switch (EF.getSymbolTableIndex(ESym)) {
|
||||
default:
|
||||
Val = ESym->st_value;
|
||||
break;
|
||||
case ELF::SHN_COMMON:
|
||||
case ELF::SHN_UNDEF:
|
||||
Val = UnknownAddressOrSize;
|
||||
break;
|
||||
}
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user