[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
Wed Apr 3 05:42:29 PDT 2019
grimar updated this revision to Diff 193477.
grimar marked an inline comment as done.
grimar added a comment.
- Addressed review comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60192/new/
https://reviews.llvm.org/D60192
Files:
test/tools/yaml2obj/local-symbols.yaml
Index: test/tools/yaml2obj/local-symbols.yaml
===================================================================
--- /dev/null
+++ test/tools/yaml2obj/local-symbols.yaml
@@ -0,0 +1,38 @@
+# 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:
+ Local:
+ - Name: local
+ Global:
+ - Name: 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:
+ Local:
+ - Name: local1
+ - Name: local2
+ Global:
+ - Name: global
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60192.193477.patch
Type: text/x-patch
Size: 1113 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190403/9ed3f6b7/attachment.bin>
More information about the llvm-commits
mailing list