diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-09 17:01:29 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-10 11:36:23 +0300 |
commit | dbf520f617440d62ca46f64cdc41159945911902 (patch) | |
tree | f8ddc3e51e58ac19b6d10aa4c0592eb004fa852d /llvm/test/tools/llvm-readobj/ELF/symbol-binding.test | |
parent | eb3e81f43f019cd90da87169aeff0eaddc4c9ecb (diff) | |
download | bcm5719-llvm-dbf520f617440d62ca46f64cdc41159945911902.tar.gz bcm5719-llvm-dbf520f617440d62ca46f64cdc41159945911902.zip |
[llvm-readobj][test] - Move platform specific test cases and their inputs to separate folders.
This creates the next subfolders in the test directory:
"COFF", "ELF", "MachO", "wasm".
I've also removed platform specific prefixes, like "coff-*".
One unused binary was removed as well: `Inputs/relocs.obj.elf-mips`
Differential revision: https://reviews.llvm.org/D71203
Diffstat (limited to 'llvm/test/tools/llvm-readobj/ELF/symbol-binding.test')
-rw-r--r-- | llvm/test/tools/llvm-readobj/ELF/symbol-binding.test | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test b/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test new file mode 100644 index 00000000000..9ca5142abae --- /dev/null +++ b/llvm/test/tools/llvm-readobj/ELF/symbol-binding.test @@ -0,0 +1,59 @@ +# Show that llvm-readobj can print symbol bindings correctly for both LLVM and +# GNU styles, including for symbol bindings that are not recognised. + +# RUN: yaml2obj %s > %t +# RUN: llvm-readobj --symbols --dyn-symbols %t | FileCheck %s --check-prefix=LLVM +# RUN: llvm-readelf --symbols --dyn-symbols %t | FileCheck %s --check-prefix=GNU + +# LLVM: Name: local +# LLVM: Binding: Local +# LLVM: Name: global +# LLVM: Binding: Global +# LLVM: Name: weak +# LLVM: Binding: Weak +# LLVM: Name: unknown +# LLVM: Binding: 0x3 +# LLVM: Name: unique +# LLVM: Binding: Unique (0xA) +# LLVM: Name: os +# LLVM: Binding: 0xB +# LLVM: Name: proc +# LLVM: Binding: 0xF + +# GNU: 3 {{.*}} unknown +# GNU-NEXT: UNIQUE {{.*}} unique +# GNU-NEXT: b {{.*}} os +# GNU-NEXT: f {{.*}} proc +# GNU: LOCAL {{.*}} local +# GNU-NEXT: GLOBAL {{.*}} global +# GNU-NEXT: WEAK {{.*}} weak + +# yaml2obj doesn't have a way of specifying static symbols with custom bindings, +# so use a custom dynamic symbol table section instead. +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_386 +Sections: + - Name: .dynstr + Type: SHT_STRTAB + #\0unknown\0unique\0os\0proc\0 + Content: "00756e6b6e6f776e00756e69717565006f730070726f6300" + - Name: .dynsym + Type: SHT_DYNSYM + Link: .dynstr + EntSize: 16 + # Null symbol + # Symbol with st_name = 1, binding = 0x3 + # Symbol with st_name = 9, binding = 0xa + # Symbol with st_name = 16, binding = 0xb + # Symbol with st_name = 19, binding = 0xf + Content: "0000000000000000000000000000000001000000000000000000000030000000090000000000000000000000a0000000100000000000000000000000b0000000130000000000000000000000f0000000" +Symbols: + - Name: local + - Name: global + Binding: STB_GLOBAL + - Name: weak + Binding: STB_WEAK |