We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fba75e6 commit fc0007dCopy full SHA for fc0007d
lld/ELF/MarkLive.cpp
@@ -248,7 +248,6 @@ template <class ELFT> void MarkLive<ELFT>::printWhyLive(Symbol *s) const {
248
// If the symbol isn't live, return.
249
if (!whyLive.contains(s)) {
250
auto *d = dyn_cast<Defined>(s);
251
- // TODO: Test
252
if (!d)
253
return;
254
// TODO: Test both cases
lld/test/ELF/why-live.s
@@ -42,3 +42,7 @@ jmp test_from_unsized
42
.section .test_dead,"ax",@progbits
43
test_dead:
44
jmp test_dead
45
+
46
+## Undefined symbols are not considered live.
47
+# RUN: ld.lld %t.o -o /dev/null --gc-sections --why-live=test_undef -u test_undef | count 0
48
0 commit comments