[ELF] - Fix for: error "invalid section index: xxx" when linking FreeBSD kernel.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 12 Aug 2016 19:25:54 +0000 (19:25 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 12 Aug 2016 19:25:54 +0000 (19:25 +0000)
commit683a35d0660f5ab888b270a8a85333148eca9070
treeab91dcec0a6617f015965d7ee23b8caed63f4221
parent4c09318be2dd449812345a8277565589cebd25e5
[ELF] - Fix for: error "invalid section index: xxx" when linking FreeBSD kernel.

We found that GNU assembler 2.17.50 [FreeBSD] 2007-07-03
could generate broken objects. STT_SECTION symbols can be
associated with SHT_REL[A]/SHT_SYMTAB/SHT_STRTAB sections.

This is PR28868, patch fixes handling of such files.

Differential revision: https://reviews.llvm.org/D23201

llvm-svn: 278550
lld/ELF/InputFiles.cpp
lld/test/ELF/section-symbols.test [new file with mode: 0644]