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
This commit is contained in:
Rafael Espindola
2015-06-03 05:14:22 +00:00
parent 8c7a0fd91a
commit 201a551929
19 changed files with 108 additions and 187 deletions

View File

@@ -110,7 +110,7 @@ ELF-NEXT: Relocations [
ELF-NEXT: ]
ELF-NEXT: Symbols [
ELF-NEXT: Symbol {
ELF-NEXT: Name: .text (0)
ELF-NEXT: Name: (0)
ELF-NEXT: Value: 0x0
ELF-NEXT: Size: 0
ELF-NEXT: Binding: Local (0x0)