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)
commit75d5b5495f1514e239c1b18254ddcf7a297e80ee
tree5298aa78b05bc21c610511543cf860a67d654b2a
parent37070a5a3aa3103ac8817ef7ff620d2c514e8548
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.

llvm-svn: 238899
19 files changed:
llvm/include/llvm/Object/ELF.h
llvm/test/MC/ARM/arm-elf-symver.s
llvm/test/MC/ELF/alias.s
llvm/test/MC/ELF/comdat-dup-group-name.s
llvm/test/MC/ELF/many-sections-2.s
llvm/test/MC/ELF/many-sections.s
llvm/test/MC/ELF/noexec.s
llvm/test/MC/ELF/relocation-386.s
llvm/test/MC/ELF/relocation.s
llvm/test/MC/ELF/section-sym.s
llvm/test/MC/ELF/section-sym2.s
llvm/test/MC/ELF/symver.s
llvm/test/MC/ELF/undef.s
llvm/test/MC/ELF/weakref.s
llvm/test/Object/obj2yaml.test
llvm/test/Object/readobj-shared-object.test
llvm/test/tools/llvm-readobj/sections-ext.test
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-readobj/ELFDumper.cpp