summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/readobj-shared-object.test
diff options
context:
space:
mode:
authorMatt Davis <Matthew.Davis@sony.com>2019-03-01 17:31:32 +0000
committerMatt Davis <Matthew.Davis@sony.com>2019-03-01 17:31:32 +0000
commit8a6f11f45fad375f2b42d865c841cb163fdf5686 (patch)
tree4797b8aedecb46be3452c2e6683d1747e2263a76 /llvm/test/Object/readobj-shared-object.test
parent12b1f2418d6fea2a59861aa5e6cc243047ce614b (diff)
downloadbcm5719-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/Object/readobj-shared-object.test')
-rw-r--r--llvm/test/Object/readobj-shared-object.test20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/test/Object/readobj-shared-object.test b/llvm/test/Object/readobj-shared-object.test
index 59f5ff127cf..da594af799e 100644
--- a/llvm/test/Object/readobj-shared-object.test
+++ b/llvm/test/Object/readobj-shared-object.test
@@ -128,61 +128,61 @@ ELF: ]
ELF: Symbols [
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .hash (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .hash
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .dynsym (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .dynsym
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .dynstr (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .dynstr
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .text (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .text
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .eh_frame (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .eh_frame
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .tdata (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .tdata
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .dynamic (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .dynamic
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .got.plt (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .got.plt
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .data (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .data
ELF: }
ELF: Symbol {
-ELF: Name: (0)
+ELF: Name: .bss (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .bss
OpenPOWER on IntegriCloud