[mach-o] don't assume all sections have symbols
authorTim Northover <tnorthover@apple.com>
Wed, 25 Jun 2014 10:59:37 +0000 (10:59 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 25 Jun 2014 10:59:37 +0000 (10:59 +0000)
commit36bd9ab2c51d67907813b0ee5ef6490dd8d056d1
tree3fb8d44487b32c19543786f4ce5ada63b9a5e455
parent42df5d2a8f2801b0f6b0e9a489fc5b32189364c3
[mach-o] don't assume all sections have symbols

We were trying to examine the first symbol in a section that we wanted to
atomize by symbols, even when there wasn't one. Instead, we should make the
initial anonymous symbol cover the entire section in that situation.

llvm-svn: 211681
lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
lld/test/mach-o/parse-section-no-symbol.yaml [new file with mode: 0644]