mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
[yaml2obj][ELF] Make symbol table top-level key.
Although in reality the symbol table in ELF resides in a section, the standard requires that there be no more than one SHT_SYMTAB. To enforce this constraint, it is cleaner to group all the symbols under a top-level `Symbols` key on the object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -72,12 +72,15 @@ struct Section {
|
||||
object::yaml::BinaryRef Content;
|
||||
StringRef Link;
|
||||
llvm::yaml::Hex64 AddressAlign;
|
||||
// For SHT_SYMTAB; should be empty otherwise.
|
||||
LocalGlobalWeakSymbols Symbols;
|
||||
};
|
||||
struct Object {
|
||||
FileHeader Header;
|
||||
std::vector<Section> Sections;
|
||||
// Although in reality the symbols reside in a section, it is a lot
|
||||
// cleaner and nicer if we read them from the YAML as a separate
|
||||
// top-level key, which automatically ensures that invariants like there
|
||||
// being a single SHT_SYMTAB section are upheld.
|
||||
LocalGlobalWeakSymbols Symbols;
|
||||
};
|
||||
|
||||
} // end namespace ELFYAML
|
||||
|
Reference in New Issue
Block a user