[PATCH] D30541: [ELF] - Make Bss and BssRelRo sections to be synthetic (#2).

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 06:26:45 PST 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM.

This is looking pretty good. Converting shared symbols to the regular symbols for copy relocations seems to simplify things. This change makes me think of using the same technique for other symbols. For example, we might want to convert DefinedCommon to DefinedRegular when a common symbol gets an address in .bss. Not sure if that'll work but should be worth trying.



================
Comment at: ELF/Symbols.cpp:118
+  case SymbolBody::SharedKind:
+    return cast<SharedSymbol>(Body).NeedsPltAddr ? Body.getPltVA<ELFT>() : 0;
   case SymbolBody::UndefinedKind:
----------------
nit: I don't think a long line with the ternary operator is very easy to follow. Better to write it in three lines.


https://reviews.llvm.org/D30541





More information about the llvm-commits mailing list