mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
[Object/ELF] Don't confuse isDefined() and isCommon.
Reported by Rafael Espindola. Pointy-hat to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -180,14 +180,11 @@ struct Elf_Sym_Impl : Elf_Sym_Base<ELFT> {
|
|||||||
|
|
||||||
bool isAbsolute() const { return st_shndx == ELF::SHN_ABS; }
|
bool isAbsolute() const { return st_shndx == ELF::SHN_ABS; }
|
||||||
bool isCommon() const {
|
bool isCommon() const {
|
||||||
return !isUndefined() &&
|
return getType() == ELF::STT_COMMON || st_shndx == ELF::SHN_COMMON;
|
||||||
!(st_shndx >= ELF::SHN_LORESERVE && st_shndx < ELF::SHN_ABS);
|
|
||||||
}
|
}
|
||||||
bool isDefined() const {
|
bool isDefined() const {
|
||||||
return !isUndefined() &&
|
return !isUndefined() &&
|
||||||
(!(st_shndx >= ELF::SHN_LORESERVE &&
|
!(st_shndx >= ELF::SHN_LORESERVE && st_shndx < ELF::SHN_ABS);
|
||||||
st_shndx <= ELF::SHN_HIRESERVE) ||
|
|
||||||
st_shndx == ELF::SHN_XINDEX);
|
|
||||||
}
|
}
|
||||||
bool isProcessorSpecific() const {
|
bool isProcessorSpecific() const {
|
||||||
return st_shndx >= ELF::SHN_LOPROC && st_shndx <= ELF::SHN_HIPROC;
|
return st_shndx >= ELF::SHN_LOPROC && st_shndx <= ELF::SHN_HIPROC;
|
||||||
|
Reference in New Issue
Block a user