diff options
| author | Matt Davis <Matthew.Davis@sony.com> | 2019-03-01 17:31:32 +0000 |
|---|---|---|
| committer | Matt Davis <Matthew.Davis@sony.com> | 2019-03-01 17:31:32 +0000 |
| commit | 8a6f11f45fad375f2b42d865c841cb163fdf5686 (patch) | |
| tree | 4797b8aedecb46be3452c2e6683d1747e2263a76 /llvm/test/tools/llvm-readobj/sections-ext.test | |
| parent | 12b1f2418d6fea2a59861aa5e6cc243047ce614b (diff) | |
| download | bcm5719-llvm-8a6f11f45fad375f2b42d865c841cb163fdf5686.tar.gz bcm5719-llvm-8a6f11f45fad375f2b42d865c841cb163fdf5686.zip | |
[llvm-readobj] Display section names for STT_SECTION symbols.
Summary:
This patch will obtain the section name for symbols that refer to a section. Prior to this patch the Name field for STT_SECTIONs was blank, now it is populated.
Before:
```
Symbol table '.symtab' contains 6 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
2: 0000000000000000 0 SECTION LOCAL DEFAULT 3
3: 0000000000000000 0 SECTION LOCAL DEFAULT 4
4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_
5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym
```
With this patch:
```
Symbol table '.symtab' contains 6 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 .text
2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 .data
3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 .bss
4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_
5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym
```
This fixes PR40788
Reviewers: jhenderson, rupprecht, espindola
Reviewed By: rupprecht
Subscribers: emaste, javed.absar, arichardson, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58796
llvm-svn: 355207
Diffstat (limited to 'llvm/test/tools/llvm-readobj/sections-ext.test')
| -rw-r--r-- | llvm/test/tools/llvm-readobj/sections-ext.test | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/tools/llvm-readobj/sections-ext.test b/llvm/test/tools/llvm-readobj/sections-ext.test index 085693829c3..e9849a67a31 100644 --- a/llvm/test/tools/llvm-readobj/sections-ext.test +++ b/llvm/test/tools/llvm-readobj/sections-ext.test @@ -124,7 +124,7 @@ ELF-NEXT: Relocations [ ELF-NEXT: ] ELF-NEXT: Symbols [ ELF-NEXT: Symbol { -ELF-NEXT: Name: (0) +ELF-NEXT: Name: .text (0) ELF-NEXT: Value: 0x0 ELF-NEXT: Size: 0 ELF-NEXT: Binding: Local (0x0) |

