mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
[yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -44,6 +44,7 @@ LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_REL)
|
||||
// Just use 64, since it can hold 32-bit values too.
|
||||
LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_SHF)
|
||||
LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STT)
|
||||
LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STV)
|
||||
|
||||
// For now, hardcode 64 bits everywhere that 32 or 64 would be needed
|
||||
// since 64-bit can hold 32-bit values too.
|
||||
@ -62,6 +63,7 @@ struct Symbol {
|
||||
StringRef Section;
|
||||
llvm::yaml::Hex64 Value;
|
||||
llvm::yaml::Hex64 Size;
|
||||
ELF_STV Visibility;
|
||||
};
|
||||
struct LocalGlobalWeakSymbols {
|
||||
std::vector<Symbol> Local;
|
||||
@ -167,6 +169,11 @@ struct ScalarEnumerationTraits<ELFYAML::ELF_STT> {
|
||||
static void enumeration(IO &IO, ELFYAML::ELF_STT &Value);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ScalarEnumerationTraits<ELFYAML::ELF_STV> {
|
||||
static void enumeration(IO &IO, ELFYAML::ELF_STV &Value);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ScalarEnumerationTraits<ELFYAML::ELF_REL> {
|
||||
static void enumeration(IO &IO, ELFYAML::ELF_REL &Value);
|
||||
|
Reference in New Issue
Block a user