[PATCH] D37059: [ELF] - LTO: do not optimize away symbols accessed from linkerscript.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 13:08:24 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/LTO.cpp:165-170
+    // We tell LTO to not apply interprocedural optimization
+    // for following symbols:
+    // 1) Aliased (with --defsym) or wrapped (with --wrap) symbols.
+    // 2) Symbols redefined in linker script. We have to do this
+    //    because otherwise LTO can inline these symbols while their
+    //    values are still not final.
----------------
"We have to do this because ..." part explains why we can't do IPO for both (1) and (2) symbols. So, writing it as part of (2) is not correct.


https://reviews.llvm.org/D37059





More information about the llvm-commits mailing list