[PATCH] D24750: [GC] Don't crash while processing Discarded sections
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 12:46:03 PDT 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM with the following changes.
================
Comment at: ELF/MarkLive.cpp:84
@@ -83,1 +83,3 @@
std::function<void(ResolvedReloc<ELFT>)> Fn) {
+ // If this is a discarded section, bail out.
+ if (&Sec == &InputSection<ELFT>::Discarded)
----------------
Instead of describing what we are doing here, I'd describe why we need this. Please mention that ideally this shouldn't happen but unfortunately we need this because a relocation may directly point to a dedup'ed comdat section even though the ELF spec doesn't allow such relocations.
================
Comment at: test/ELF/comdat.s:17
@@ -8,1 +16,3 @@
+
+
.section .text2,"axG", at progbits,foo,comdat,unique,0
----------------
Remove one extra blank line.
https://reviews.llvm.org/D24750
More information about the llvm-commits
mailing list