[GC] Don't crash when printing the special Discarded GC section.
authorDavide Italiano <davide@freebsd.org>
Mon, 19 Sep 2016 23:15:51 +0000 (23:15 +0000)
committerDavide Italiano <davide@freebsd.org>
Mon, 19 Sep 2016 23:15:51 +0000 (23:15 +0000)
commit1c3c3953c646bc57c4c6e2c247de912c87fa0665
tree3246fd5edbe950fce1f62cff0c93be92438ba7b9
parentbcdb994014aed114c5293990705a853abed01f28
[GC] Don't crash when printing the special Discarded GC section.

InputSection<ELFT>::Discarded has no name and it's not backed by
a file. Trying to report it as discared will cause a nullptr
dereference, therefore a crash. Skip it.

Differential Revision:   https://reviews.llvm.org/D24731

llvm-svn: 281946
lld/ELF/Writer.cpp
lld/test/ELF/lto/dynsym.ll