summaryrefslogtreecommitdiff
path: root/include/llvm/Object/ELFYAML.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/ELFYAML.h')
-rw-r--r--include/llvm/Object/ELFYAML.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Object/ELFYAML.h b/include/llvm/Object/ELFYAML.h
index b6c7556551..fca965f3db 100644
--- a/include/llvm/Object/ELFYAML.h
+++ b/include/llvm/Object/ELFYAML.h
@@ -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