mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
[MCJIT] Temporarily revert r220245 - it broke several bots.
(See e.g. http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/17653) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -177,19 +177,6 @@ protected:
|
||||
return DRI;
|
||||
}
|
||||
|
||||
bool isExportedToOtherDSO(const Elf_Sym *ESym) const {
|
||||
unsigned char Binding = ESym->getBinding();
|
||||
unsigned char Visibility = ESym->getVisibility();
|
||||
|
||||
if (Binding != ELF::STB_GLOBAL && Binding != ELF::STB_WEAK)
|
||||
return false;
|
||||
|
||||
if (Visibility != ELF::STV_DEFAULT && Visibility != ELF::STV_PROTECTED)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// This flag is used for classof, to distinguish ELFObjectFile from
|
||||
// its subclass. If more subclasses will be created, this flag will
|
||||
// have to become an enum.
|
||||
@ -386,9 +373,6 @@ uint32_t ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Symb) const {
|
||||
EF.getSymbolTableIndex(ESym) == ELF::SHN_COMMON)
|
||||
Result |= SymbolRef::SF_Common;
|
||||
|
||||
if (isExportedToOtherDSO(ESym))
|
||||
Result |= SymbolRef::SF_Exported;
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ struct Elf_Sym_Base<ELFType<TargetEndianness, MaxAlign, false> > {
|
||||
Elf_Addr st_value; // Value or address associated with the symbol
|
||||
Elf_Word st_size; // Size of the symbol
|
||||
unsigned char st_info; // Symbol's type and binding attributes
|
||||
unsigned char st_other; // Visibility in the lower 2 bits, the rest is zero
|
||||
unsigned char st_other; // Must be zero; reserved
|
||||
Elf_Half st_shndx; // Which section (header table index) it's defined in
|
||||
};
|
||||
|
||||
@ -167,7 +167,7 @@ struct Elf_Sym_Base<ELFType<TargetEndianness, MaxAlign, true> > {
|
||||
LLVM_ELF_IMPORT_TYPES(TargetEndianness, MaxAlign, true)
|
||||
Elf_Word st_name; // Symbol name (index into string table)
|
||||
unsigned char st_info; // Symbol's type and binding attributes
|
||||
unsigned char st_other; // Visibility in the lower 2 bits, the rest is zero
|
||||
unsigned char st_other; // Must be zero; reserved
|
||||
Elf_Half st_shndx; // Which section (header table index) it's defined in
|
||||
Elf_Addr st_value; // Value or address associated with the symbol
|
||||
Elf_Xword st_size; // Size of the symbol
|
||||
@ -176,21 +176,16 @@ struct Elf_Sym_Base<ELFType<TargetEndianness, MaxAlign, true> > {
|
||||
template <class ELFT>
|
||||
struct Elf_Sym_Impl : Elf_Sym_Base<ELFT> {
|
||||
using Elf_Sym_Base<ELFT>::st_info;
|
||||
using Elf_Sym_Base<ELFT>::st_other;
|
||||
|
||||
// These accessors and mutators correspond to the ELF32_ST_BIND,
|
||||
// ELF32_ST_TYPE, and ELF32_ST_INFO macros defined in the ELF specification:
|
||||
unsigned char getBinding() const { return st_info >> 4; }
|
||||
unsigned char getType() const { return st_info & 0x0f; }
|
||||
unsigned char getVisibility() const { return st_other & 0x3; }
|
||||
void setBinding(unsigned char b) { setBindingAndType(b, getType()); }
|
||||
void setType(unsigned char t) { setBindingAndType(getBinding(), t); }
|
||||
void setBindingAndType(unsigned char b, unsigned char t) {
|
||||
st_info = (b << 4) + (t & 0x0f);
|
||||
}
|
||||
void setVisibility(unsigned char v) {
|
||||
st_other = (st_other & ~0x3) | (v & 0x3);
|
||||
}
|
||||
};
|
||||
|
||||
/// Elf_Versym: This is the structure of entries in the SHT_GNU_versym section
|
||||
|
@ -87,10 +87,9 @@ public:
|
||||
SF_Absolute = 1U << 3, // Absolute symbol
|
||||
SF_Common = 1U << 4, // Symbol has common linkage
|
||||
SF_Indirect = 1U << 5, // Symbol is an alias to another symbol
|
||||
SF_Exported = 1U << 6, // Symbol is visible to other DSOs
|
||||
SF_FormatSpecific = 1U << 7, // Specific to the object file format
|
||||
SF_FormatSpecific = 1U << 6, // Specific to the object file format
|
||||
// (e.g. section symbols)
|
||||
SF_Thumb = 1U << 8, // Thumb symbol in a 32-bit ARM binary
|
||||
SF_Thumb = 1U << 7 // Thumb symbol in a 32-bit ARM binary
|
||||
};
|
||||
|
||||
BasicSymbolRef() : OwningObject(nullptr) { }
|
||||
|
Reference in New Issue
Block a user