[PATCH] sectiongroup support
Shankar Kalpathi Easwaran
shankarke at gmail.com
Thu Mar 6 15:35:44 PST 2014
================
Comment at: include/lld/Core/DefinedAtom.h:147
@@ -146,2 +146,3 @@
typeNoAlloc, // Identifies non allocatable sections [ELF]
+ typeGroupComdat, // Identifies a COMDAT group [ELF]
};
----------------
Rui Ueyama wrote:
> Section grouping is not an ELF-only feature. COFF also has it as a COMDAT section with IMAGE_COMDAT_SELECT_ASSOCIATIVE attribute. So remove [ELF] tag.
Sure.
================
Comment at: include/lld/Core/SymbolTable.h:112
@@ +111,3 @@
+
+ bool groupChildExistsinGroup(const Atom &groupChild, const Atom &groupParent);
+
----------------
Rui Ueyama wrote:
> s/ExsitsinGroup/ExistsInGroup/
Ok.
================
Comment at: lib/Core/SymbolTable.cpp:56
@@ +55,3 @@
+ // if so, coalesce the atom with the group that appeared
+ // before.
+ for (const Reference *r : atom) {
----------------
Rui Ueyama wrote:
> 80 cols.
ok.
================
Comment at: lib/Core/SymbolTable.cpp:53
@@ +52,3 @@
+ return;
+ } else {
+ // Check if there are any group-parent references
----------------
Rui Ueyama wrote:
> No else after return.
Ah, Thanks.
================
Comment at: lib/Core/SymbolTable.cpp:61
@@ +60,3 @@
+ if (r->kindValue() == Reference::kindGroupParent) {
+ addGroupChild(atom, *(r->target()));
+ return;
----------------
Rui Ueyama wrote:
> *r->target()
ok.
================
Comment at: lib/Core/SymbolTable.cpp:291
@@ +290,3 @@
+ assert(!name.empty());
+ const Atom *existing = this->findGroup(name);
+ if (existing == nullptr) {
----------------
Rui Ueyama wrote:
> No this->.
ok.
================
Comment at: lib/Core/SymbolTable.cpp:360
@@ +359,3 @@
+ if (this->findByName(name) == nullptr)
+ this->addByName(groupChild);
+}
----------------
Rui Ueyama wrote:
> Remove this->
ok.
================
Comment at: lib/Core/SymbolTable.cpp:378
@@ +377,3 @@
+ }
+ return groupChildInGroup;
+}
----------------
Rui Ueyama wrote:
> ... and return false here.
ok.
================
Comment at: lib/ReaderWriter/YAML/ReaderWriterYAML.cpp:189
@@ +188,3 @@
+ return pos->second;
+ } else {
+ _io.setError(Twine("no such group name: ") + name);
----------------
Rui Ueyama wrote:
> no else after return.
ok.
http://llvm-reviews.chandlerc.com/D2961
More information about the llvm-commits
mailing list