[PATCH] D62846: [llvm-readobj] - Remove TODOs from gnu-hash-symbols.test and demangle.test test cases

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 02:23:10 PDT 2019


grimar created this revision.
grimar added reviewers: jhenderson, rupprecht, jakehehrlich.
Herald added a subscriber: erik.pilkington.
grimar added a parent revision: D62809: [yaml2obj] - Change how we handle implicit sections..

We can remove this TODOs now.

This depends (and rebased) on D62809 <https://reviews.llvm.org/D62809>.


https://reviews.llvm.org/D62846

Files:
  test/tools/llvm-readobj/demangle.test
  test/tools/llvm-readobj/gnu-hash-symbols.test


Index: test/tools/llvm-readobj/gnu-hash-symbols.test
===================================================================
--- test/tools/llvm-readobj/gnu-hash-symbols.test
+++ test/tools/llvm-readobj/gnu-hash-symbols.test
@@ -47,18 +47,11 @@
   Type:            ET_DYN
   Machine:         EM_X86_64
 Sections:
-  ## TODO:  Replace the raw section contents with more meaningful dynamic
-  ## tags/symbols/etc, once yaml2obj supports it.
-  ## FIXME: yaml2obj does not currently allow custom addresses for .dynstr and
-  ## .dynsym if DynamicSymbols are specified.
-  ## See https://bugs.llvm.org/show_bug.cgi?id=40339
   - Name:         .dynstr
     Type:         SHT_STRTAB
     Flags:        [ SHF_ALLOC ]
     AddressAlign: 0x100
     EntSize:      0x1
-    ## "\0_Z3fooi\0"
-    Content: "005f5a33666f6f6900"
   - Name:         .dynsym
     Type:         SHT_DYNSYM
     Flags:        [ SHF_ALLOC ]
@@ -66,10 +59,6 @@
     Address:      0x100
     AddressAlign: 0x100
     EntSize:      0x18
-    ## Null symbol;
-    ## st_name: 1; st_info: Global | Func; st_other: 0;
-    ##   st_shndx: .text.foo; st_value: 0x2000; st_size: 0
-    Content: "000000000000000000000000000000000000000000000000010000001200040000200000000000000000000000000000"
   - Name:            .dynamic
     Type:            SHT_DYNAMIC
     Flags:           [ SHF_ALLOC ]
@@ -94,6 +83,9 @@
     Size:  0x40
     Address: 0x2000
     AddressAlign: 0x2000
+DynamicSymbols:
+  - Name:    _Z3fooi
+    Binding: STB_GLOBAL
 ProgramHeaders:
   - Type:  PT_LOAD
     Flags: [ PF_R, PF_X ]
Index: test/tools/llvm-readobj/demangle.test
===================================================================
--- test/tools/llvm-readobj/demangle.test
+++ test/tools/llvm-readobj/demangle.test
@@ -117,18 +117,11 @@
   Type:            ET_DYN
   Machine:         EM_X86_64
 Sections:
-  ## TODO:  Replace the raw section contents with more meaningful dynamic
-  ## tags/symbols/etc, once yaml2obj supports it.
-  ## FIXME: yaml2obj does not currently allow custom addresses for .dynstr and
-  ## .dynsym if DynamicSymbols are specified.
-  ## See https://bugs.llvm.org/show_bug.cgi?id=40339
   - Name:         .dynstr
     Type:         SHT_STRTAB
     Flags:        [ SHF_ALLOC ]
     AddressAlign: 0x100
     EntSize:      0x1
-    ## "\0_Z3fooi\0"
-    Content: "005f5a33666f6f6900"
   - Name:         .dynsym
     Type:         SHT_DYNSYM
     Flags:        [ SHF_ALLOC ]
@@ -136,10 +129,6 @@
     Address:      0x100
     AddressAlign: 0x100
     EntSize:      0x18
-    ## Null symbol;
-    ## st_name: 1; st_info: Global | Func; st_other: 0;
-    ##   st_shndx: .text.foo; st_value: 0x2000; st_size: 0
-    Content: "000000000000000000000000000000000000000000000000010000001200050000200000000000000000000000000000"
   - Name:         .rela.dyn
     Type:         SHT_RELA
     Flags:        [ SHF_ALLOC ]
@@ -218,6 +207,9 @@
     Type:    STT_FUNC
     Section: .text.foo
     Binding: STB_GLOBAL
+DynamicSymbols:
+  - Name:    _Z3fooi
+    Binding: STB_GLOBAL
 ProgramHeaders:
   - Type:  PT_LOAD
     Flags: [ PF_R, PF_X ]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62846.202878.patch
Type: text/x-patch
Size: 3091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190604/40a1d343/attachment.bin>


More information about the llvm-commits mailing list