[PATCH] [PECOFF] Support a new type of weak symbol.
Rui Ueyama
ruiu at google.com
Thu Mar 6 17:06:01 PST 2014
================
Comment at: lib/Core/SymbolTable.cpp:129-140
@@ +128,14 @@
+
+ // Check if they are merged by szie. If their sizes are equal, merge as if
+ // they are weak symbols.
+ if (mf == DefinedAtom::mergeSameSize) {
+ if (first->size() != second->size())
+ return MCR_Error;
+ mf = DefinedAtom::mergeAsWeak;
+ }
+ if (ms == DefinedAtom::mergeSameSize) {
+ if (first->size() != second->size())
+ return MCR_Error;
+ ms = DefinedAtom::mergeAsWeak;
+ }
+
----------------
kledzik at apple.com wrote:
> Just grow the mergeCases table to be 5x5 instead of 4x4.
Done.
================
Comment at: include/lld/Core/DefinedAtom.h:102
@@ -102,1 +101,3 @@
+ mergeByContent, // Merge with other constants with same content
+ mergeSameSize, // Another atom with different size is error
};
----------------
kledzik at apple.com wrote:
> Maybe mergeSameNameAndSize.
"SameName" is implied for all merge options, so I guess it's extraneous.
http://llvm-reviews.chandlerc.com/D2996
BRANCH
master
ARCANIST PROJECT
lld
More information about the llvm-commits
mailing list