[PATCH] D71651: [llvm-readobj][test] - Refactor mips-st-other.test
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 01:53:26 PST 2019
grimar updated this revision to Diff 234486.
grimar added a comment.
- Fix a comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71651/new/
https://reviews.llvm.org/D71651
Files:
llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips
llvm/test/tools/llvm-readobj/ELF/Inputs/st-other.obj.elf-mips16
llvm/test/tools/llvm-readobj/ELF/mips-st-other.test
llvm/test/tools/llvm-readobj/ELF/mips-symbols-stother.test
Index: llvm/test/tools/llvm-readobj/ELF/mips-symbols-stother.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-readobj/ELF/mips-symbols-stother.test
@@ -0,0 +1,39 @@
+## Check that we are able to dump MIPS STO_* flags correctly when dumping symbols.
+
+# RUN: yaml2obj %s > %t.o
+# RUN: llvm-readobj --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-LLVM
+# RUN: llvm-readelf --symbols %t.o | FileCheck %s --strict-whitespace --check-prefix=MIPS-GNU
+
+# MIPS-LLVM:Name: foo
+# MIPS-LLVM:Other [
+# MIPS-LLVM-NEXT: STO_MIPS_MICROMIPS (0x80)
+# MIPS-LLVM-NEXT: STO_MIPS_OPTIONAL (0x4)
+# MIPS-LLVM-NEXT: STO_MIPS_PIC (0x20)
+# MIPS-LLVM-NEXT: STO_MIPS_PLT (0x8)
+# MIPS-LLVM-NEXT:]
+
+# MIPS-LLVM:Name: bar
+# MIPS-LLVM:Other [
+# MIPS-LLVM-NEXT: STO_MIPS_MIPS16 (0xF0)
+# MIPS-LLVM-NEXT:]
+
+# MIPS-GNU:Symbol table '.symtab' contains 3 entries:
+# MIPS-GNU-NEXT: Num: Value Size Type Bind Vis Ndx Name
+# MIPS-GNU-NEXT: 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
+# MIPS-GNU-NEXT: 1: 00000000 0 NOTYPE LOCAL DEFAULT [<other: 0xac>] UND foo
+# MIPS-GNU-NEXT: 2: 00000000 0 NOTYPE LOCAL DEFAULT [<other: 0xf0>] UND bar
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+Symbols:
+ - Name: foo
+ Other: [ STO_MIPS_MICROMIPS, STO_MIPS_PIC,
+ STO_MIPS_PLT, STO_MIPS_OPTIONAL]
+## STO_MIPS_MIPS16 (0xf0) interferes with STO_MIPS_PIC (0x20)
+## and STO_MIPS_MICROMIPS (0x80).
+ - Name: bar
+ Other: [ STO_MIPS_MIPS16 ]
Index: llvm/test/tools/llvm-readobj/ELF/mips-st-other.test
===================================================================
--- llvm/test/tools/llvm-readobj/ELF/mips-st-other.test
+++ /dev/null
@@ -1,25 +0,0 @@
-RUN: llvm-readobj --symbols %p/Inputs/st-other.obj.elf-mips \
-RUN: | FileCheck -check-prefix=MREG %s
-RUN: llvm-readobj --symbols %p/Inputs/st-other.obj.elf-mips16 \
-RUN: | FileCheck -check-prefix=M16 %s
-
-MREG: Name: foo
-MREG-NEXT: Value: 0x0
-MREG-NEXT: Size: 0
-MREG-NEXT: Binding: Global
-MREG-NEXT: Type: None
-MREG-NEXT: Other [ (0x29)
-MREG-NEXT: STO_MIPS_PIC (0x20)
-MREG-NEXT: STO_MIPS_PLT (0x8)
-MREG-NEXT: STV_INTERNAL (0x1)
-MREG-NEXT: ]
-
-M16: Name: foo
-M16-NEXT: Value: 0x0
-M16-NEXT: Size: 0
-M16-NEXT: Binding: Global
-M16-NEXT: Type: None
-M16-NEXT: Other [ (0xF1)
-M16-NEXT: STO_MIPS_MIPS16 (0xF0)
-M16-NEXT: STV_INTERNAL (0x1)
-M16-NEXT: ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71651.234486.patch
Type: text/x-patch
Size: 2578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191218/5fb8af3f/attachment.bin>
More information about the llvm-commits
mailing list