[lld] r259460 - Add comments.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 19:11:27 PST 2016
Author: ruiu
Date: Mon Feb 1 21:11:27 2016
New Revision: 259460
URL: http://llvm.org/viewvc/llvm-project?rev=259460&view=rev
Log:
Add comments.
Modified:
lld/trunk/ELF/OutputSections.h
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=259460&r1=259459&r2=259460&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Mon Feb 1 21:11:27 2016
@@ -395,6 +395,10 @@ class DynamicSection final : public Outp
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 Outp
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:
More information about the llvm-commits
mailing list