[PECOFF] Add a comment about .bss section.

llvm-svn: 187505
This commit is contained in:
Rui Ueyama 2013-07-31 17:45:48 +00:00
parent 0c51de4ab1
commit 3361fa49f5
1 changed files with 9 additions and 0 deletions

View File

@ -579,6 +579,15 @@ private:
}; };
// \brief A BSSSectionChunk represents a .bss section. // \brief A BSSSectionChunk represents a .bss section.
//
// Seems link.exe does not emit .bss section but instead merges it with .data
// section. In COFF, if the size of the section in the header is greater than
// the size of the actual data on disk, the section on memory is zero-padded.
// That's why .bss can be merge with .data just by appending it at the end of
// the section.
//
// The executable with .bss is also valid and easier to understand. So we chose
// to create .bss in LLD.
class BssSectionChunk : public SectionChunk { class BssSectionChunk : public SectionChunk {
public: public:
// BSS section does not have contents, so write should be no-op. // BSS section does not have contents, so write should be no-op.