[PATCH] D60192: [yaml2obj] - Check we correctly set the sh_info field of .symtab section.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 04:48:32 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL357687: [yaml2obj] - Check we correctly set the sh_info field of .symtab section. (authored by grimar, committed by ).
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D60192?vs=193477&id=193690#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60192/new/

https://reviews.llvm.org/D60192

Files:
  llvm/trunk/test/tools/yaml2obj/local-symbols.yaml


Index: llvm/trunk/test/tools/yaml2obj/local-symbols.yaml
===================================================================
--- llvm/trunk/test/tools/yaml2obj/local-symbols.yaml
+++ llvm/trunk/test/tools/yaml2obj/local-symbols.yaml
@@ -0,0 +1,36 @@
+# Check we correctly set the sh_info field of .symtab section.
+# A symbol table section's sh_info section header member holds
+# the symbol table index for the first non-local symbol.
+
+# RUN: yaml2obj -docnum=1 %s -o %t
+# RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=ONE
+# ONE: Name: .symtab
+# ONE: Info: 2
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_DYN
+  Machine:         EM_X86_64
+Symbols:
+  - Name: local
+  - Name: global
+    Binding: STB_GLOBAL
+
+# RUN: yaml2obj -docnum=2 %s -o %t
+# RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=TWO
+# TWO: Name: .symtab
+# TWO: Info: 3
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_DYN
+  Machine:         EM_X86_64
+Symbols:
+  - Name:    local1
+  - Name:    local2
+  - Name:    global
+    Binding: STB_GLOBAL


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60192.193690.patch
Type: text/x-patch
Size: 1182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/0784a429/attachment.bin>


More information about the llvm-commits mailing list