[PATCH] D37623: [ELF] - Simplify removeUnusedSyntheticSections a bit.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 12:31:34 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:666-668
   // If we have a relocation that is relative to GOT (such as GOTOFFREL),
   // we need to emit a GOT even if it's empty.
+  // Do the same if we have reference to _GLOBAL_OFFSET_TABLE_ symbol.
----------------
Instead of adding more and more comments, you want to rewrite in most cases: We need to emit a GOT even if it's empty if there's a relocation that is relative to GOT (such as GOTOFFREL) or there's a symbol that points to a GOT (i.e. _GLOBAL_OFFSET_TABLE_).


https://reviews.llvm.org/D37623





More information about the llvm-commits mailing list