Add comments.

llvm-svn: 259460
This commit is contained in:
Rui Ueyama 2016-02-02 03:11:27 +00:00
parent bfbe7fc404
commit 909cc68163
1 changed files with 8 additions and 0 deletions

View File

@ -395,6 +395,10 @@ class DynamicSection final : public OutputSectionBase<ELFT> {
typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
// The .dynamic section contains information for the dynamic linker.
// The section consists of fixed size entries, which consist of
// type and value fields. Value are one of plain integers, symbol
// addresses, or section addresses. This struct represents the entry.
struct Entry {
int32_t Tag;
union {
@ -409,6 +413,10 @@ class DynamicSection final : public OutputSectionBase<ELFT> {
Entry(int32_t Tag, const SymbolBody *Sym)
: Tag(Tag), Sym(Sym), Kind(SymAddr) {}
};
// finalize() fills this vector with the section contents. finalize()
// cannot directly create final section contents because when the
// function is called, symbol or section addresses are not fixed yet.
std::vector<Entry> Entries;
public: