forked from OSchip/llvm-project
Set the thumb flag for thumb symbols coming from an ELF file
Without setting the flag there is no way to determine if a symbol points to an arm or to a thumb function as the LSB of the address masked out in all getter function. Note: Currently the thumb flag is only used for MachO files so adding a test to this change is not possible. It will be used by the upcoming fix for llvm-objdump for disassembling thumb functions what is easily testable. Differential revision: http://reviews.llvm.org/D17956 llvm-svn: 265387
This commit is contained in:
parent
d9a1717efc
commit
849045f2aa
|
@ -494,6 +494,8 @@ uint32_t ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Sym) const {
|
|||
Name.startswith("$a"))
|
||||
Result |= SymbolRef::SF_FormatSpecific;
|
||||
}
|
||||
if (ESym->getType() == ELF::STT_FUNC && (ESym->st_value & 1) == 1)
|
||||
Result |= SymbolRef::SF_Thumb;
|
||||
}
|
||||
|
||||
if (ESym->st_shndx == ELF::SHN_UNDEF)
|
||||
|
|
Loading…
Reference in New Issue