Fix the interpretation of a 0 st_name.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 3 Jun 2015 05:14:22 +0000 (05:14 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 3 Jun 2015 05:14:22 +0000 (05:14 +0000)
commit201a551929fc6a3158e120602e0d5d570aee72c7
treea5ba06605e0fa6c6ce5a8e11b5a5b1a67de956cb
parent8c7a0fd91a1a0a64bba5545bc45c634f4315a2e3
Fix the interpretation of a 0 st_name.

The ELF spec is very clear:

-----------------------------------------------------------------------------
If the value is non-zero, it represents a string table index that gives the
symbol name. Otherwise, the symbol table entry has no name.
--------------------------------------------------------------------------

In particular, a st_name of 0 most certainly doesn't mean that the symbol has
the same name as the section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238899 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/Object/ELF.h
test/MC/ARM/arm-elf-symver.s
test/MC/ELF/alias.s
test/MC/ELF/comdat-dup-group-name.s
test/MC/ELF/many-sections-2.s
test/MC/ELF/many-sections.s
test/MC/ELF/noexec.s
test/MC/ELF/relocation-386.s
test/MC/ELF/relocation.s
test/MC/ELF/section-sym.s
test/MC/ELF/section-sym2.s
test/MC/ELF/symver.s
test/MC/ELF/undef.s
test/MC/ELF/weakref.s
test/Object/obj2yaml.test
test/Object/readobj-shared-object.test
test/tools/llvm-readobj/sections-ext.test
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-readobj/ELFDumper.cpp