[PATCH] D30188: [ELF] - Do not segfault when using --gc-sections with linker script
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 02:11:27 PST 2017
jhenderson added a comment.
I'm not yet familiar enough with LLD to know the policy with asserts, but would it make sense to assert after that if statement (possibly inside switchTo()) to check that IB->OutSec is not null? That way if there are any other cases either currently or in the future where OutSec is null we'll get a nicer failure, at least in Debug builds.
================
Comment at: test/ELF/linkerscript/sections-gc.s:7
+
+# CHECK: Sections:
+# CHECK-NEXT: Idx Name Size
----------------
Do we really need these first two CHECKs?
https://reviews.llvm.org/D30188
More information about the llvm-commits
mailing list