[PATCH] D17252: [ELF, Bug 26360] - allows undefines that are referenced from garbage collected sections.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 05:53:33 PST 2016


rafael added inline comments.

================
Comment at: ELF/Symbols.h:258
@@ -257,1 +257,3 @@
+  // If it was ever seen in live sections.
+  bool Live = false;
 
----------------
Are the semantics the same as CanKeepUndefined? Could you use a single bool?

================
Comment at: ELF/Writer.cpp:295
@@ -294,1 +294,3 @@
 
+    auto Name = C.getSectionName();
+    if (Body && Body->isUndefined()) {
----------------
Name is not used.

================
Comment at: test/ELF/gc-sections-unref-undef.s:4
@@ +3,3 @@
+# RUN: ld.lld %t -o %t.out -e main --gc-sections
+# RUN: llvm-readobj %t.out > /dev/null
+
----------------
Should there be an undefined symbol in the output?

Check one way or the other.


http://reviews.llvm.org/D17252





More information about the llvm-commits mailing list