1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

[llvm-readobj] - Remove excessive dynamic.test

dynamic.test is a test that checks dumping of
dynamic tags. It uses precompiled objects as inputs
and it is completely excessive nowadays:

Now we have elf-dynamic-tags-machine-specific.test
and elf-dynamic-tags.test. 
(https://github.com/llvm-mirror/llvm/blob/master/test/tools/llvm-readobj/elf-dynamic-tags-machine-specific.test)
(https://github.com/llvm-mirror/llvm/blob/master/test/tools/llvm-readobj/elf-dynamic-tags.test)

First is used to check target specific tags and second tests the common flags.
These tests use YAML, which is much better than using precompiled binaries.

Note that new reviews tend to update the YAML based
tests to add new tags, e.g. see D62596.

With this patch it became possible to remove
dynamic-table-so.aarch64 binary from the inputs folder.
(other binaries are still used in other tests).

Differential revision: https://reviews.llvm.org/D62728

llvm-svn: 362224
This commit is contained in:
George Rimar 2019-05-31 13:16:21 +00:00
parent 9f2de13cb7
commit 769939a5dd
3 changed files with 0 additions and 248 deletions

View File

@ -4,8 +4,6 @@
// -o dynamic-table-so.mips
// clang -target mipsel-linux-gnu -lc dynamic-table.c \
// -o dynamic-table-exe.mips
// clang -target aarch64-linux-gnu -fPIC -shared dynamic-table.c\
// -o dynamic-table-so.aarch64
int puts(const char *);
__thread int foo;

View File

@ -1,246 +0,0 @@
// Check dynamic section tags in case of shared library file.
RUN: llvm-readobj --dynamic-table %p/Inputs/dynamic-table-so.mips \
RUN: | FileCheck %s -check-prefix ELF-MIPS
RUN: llvm-readelf --dynamic-table %p/Inputs/dynamic-table-so.mips \
RUN: | FileCheck %s --strict-whitespace -check-prefix ELF-MIPS-GNU
ELF-MIPS: Format: ELF32-mips
ELF-MIPS: Arch: mipsel
ELF-MIPS: AddressSize: 32bit
ELF-MIPS: LoadName:
ELF-MIPS: DynamicSection [ (23 entries)
ELF-MIPS: Tag Type Name/Value
ELF-MIPS: 0x00000001 NEEDED Shared library: [libc.so.6]
ELF-MIPS: 0x0000000C INIT 0x528
ELF-MIPS: 0x0000000D FINI 0x860
ELF-MIPS: 0x00000004 HASH 0x210
ELF-MIPS: 0x00000005 STRTAB 0x3D8
ELF-MIPS: 0x00000006 SYMTAB 0x2A8
ELF-MIPS: 0x0000000A STRSZ 231 (bytes)
ELF-MIPS: 0x0000000B SYMENT 16 (bytes)
ELF-MIPS: 0x00000003 PLTGOT 0x108E0
ELF-MIPS: 0x00000011 REL 0x518
ELF-MIPS: 0x00000012 RELSZ 16 (bytes)
ELF-MIPS: 0x00000013 RELENT 8 (bytes)
ELF-MIPS: 0x70000001 MIPS_RLD_VERSION 1
ELF-MIPS: 0x70000005 MIPS_FLAGS NOTPOT
ELF-MIPS: 0x70000006 MIPS_BASE_ADDRESS 0x0
ELF-MIPS: 0x7000000A MIPS_LOCAL_GOTNO 10
ELF-MIPS: 0x70000011 MIPS_SYMTABNO 19
ELF-MIPS: 0x70000012 MIPS_UNREFEXTNO 26
ELF-MIPS: 0x70000013 MIPS_GOTSYM 0xD
ELF-MIPS: 0x6FFFFFFE VERNEED 0x4E8
ELF-MIPS: 0x6FFFFFFF VERNEEDNUM 1
ELF-MIPS: 0x6FFFFFF0 VERSYM 0x4C0
ELF-MIPS: 0x00000000 NULL 0x0
ELF-MIPS: ]
ELF-MIPS-GNU: Dynamic section at offset 0x{{.*}} contains 23 entries:
ELF-MIPS-GNU-NEXT: Tag Type Name/Value
ELF-MIPS-GNU-NEXT: 0x00000001 (NEEDED) Shared library: [libc.so.6]
ELF-MIPS-GNU-NEXT: 0x0000000c (INIT) 0x528
ELF-MIPS-GNU-NEXT: 0x0000000d (FINI) 0x860
ELF-MIPS-GNU-NEXT: 0x00000004 (HASH) 0x210
ELF-MIPS-GNU-NEXT: 0x00000005 (STRTAB) 0x3d8
ELF-MIPS-GNU-NEXT: 0x00000006 (SYMTAB) 0x2a8
ELF-MIPS-GNU-NEXT: 0x0000000a (STRSZ) 231 (bytes)
ELF-MIPS-GNU-NEXT: 0x0000000b (SYMENT) 16 (bytes)
ELF-MIPS-GNU-NEXT: 0x00000003 (PLTGOT) 0x108e0
ELF-MIPS-GNU-NEXT: 0x00000011 (REL) 0x518
ELF-MIPS-GNU-NEXT: 0x00000012 (RELSZ) 16 (bytes)
ELF-MIPS-GNU-NEXT: 0x00000013 (RELENT) 8 (bytes)
ELF-MIPS-GNU-NEXT: 0x70000001 (MIPS_RLD_VERSION) 1
ELF-MIPS-GNU-NEXT: 0x70000005 (MIPS_FLAGS) NOTPOT
ELF-MIPS-GNU-NEXT: 0x70000006 (MIPS_BASE_ADDRESS) 0x0
ELF-MIPS-GNU-NEXT: 0x7000000a (MIPS_LOCAL_GOTNO) 10
ELF-MIPS-GNU-NEXT: 0x70000011 (MIPS_SYMTABNO) 19
ELF-MIPS-GNU-NEXT: 0x70000012 (MIPS_UNREFEXTNO) 26
ELF-MIPS-GNU-NEXT: 0x70000013 (MIPS_GOTSYM) 0xd
ELF-MIPS-GNU-NEXT: 0x6ffffffe (VERNEED) 0x4e8
ELF-MIPS-GNU-NEXT: 0x6fffffff (VERNEEDNUM) 1
ELF-MIPS-GNU-NEXT: 0x6ffffff0 (VERSYM) 0x4c0
ELF-MIPS-GNU-NEXT: 0x00000000 (NULL) 0x0
// Check dynamic section tags in case of non-pic executable file.
RUN: llvm-readobj --dynamic-table %p/Inputs/dynamic-table-exe.mips \
RUN: | FileCheck %s -check-prefix ELF-MIPS-EXE
ELF-MIPS-EXE: Format: ELF32-mips
ELF-MIPS-EXE: Arch: mipsel
ELF-MIPS-EXE: AddressSize: 32bit
ELF-MIPS-EXE: LoadName:
ELF-MIPS-EXE: DynamicSection [ (26 entries)
ELF-MIPS-EXE: Tag Type Name/Value
ELF-MIPS-EXE: 0x00000001 NEEDED Shared library: [libc.so.6]
ELF-MIPS-EXE: 0x0000000C INIT 0x400418
ELF-MIPS-EXE: 0x0000000D FINI 0x4007B0
ELF-MIPS-EXE: 0x00000004 HASH 0x4002B8
ELF-MIPS-EXE: 0x00000005 STRTAB 0x40036C
ELF-MIPS-EXE: 0x00000006 SYMTAB 0x4002EC
ELF-MIPS-EXE: 0x0000000A STRSZ 107 (bytes)
ELF-MIPS-EXE: 0x0000000B SYMENT 16 (bytes)
ELF-MIPS-EXE: 0x70000016 MIPS_RLD_MAP 0x410880
ELF-MIPS-EXE: 0x00000015 DEBUG 0x0
ELF-MIPS-EXE: 0x00000003 PLTGOT 0x410890
ELF-MIPS-EXE: 0x70000001 MIPS_RLD_VERSION 1
ELF-MIPS-EXE: 0x70000005 MIPS_FLAGS NOTPOT
ELF-MIPS-EXE: 0x70000006 MIPS_BASE_ADDRESS 0x400000
ELF-MIPS-EXE: 0x7000000A MIPS_LOCAL_GOTNO 5
ELF-MIPS-EXE: 0x70000011 MIPS_SYMTABNO 8
ELF-MIPS-EXE: 0x70000012 MIPS_UNREFEXTNO 32
ELF-MIPS-EXE: 0x70000013 MIPS_GOTSYM 0x7
ELF-MIPS-EXE: 0x00000014 PLTREL REL
ELF-MIPS-EXE: 0x00000017 JMPREL 0x400408
ELF-MIPS-EXE: 0x00000002 PLTRELSZ 16 (bytes)
ELF-MIPS-EXE: 0x70000032 MIPS_PLTGOT 0x410854
ELF-MIPS-EXE: 0x6FFFFFFE VERNEED 0x4003E8
ELF-MIPS-EXE: 0x6FFFFFFF VERNEEDNUM 1
ELF-MIPS-EXE: 0x6FFFFFF0 VERSYM 0x4003D8
ELF-MIPS-EXE: 0x00000000 NULL 0x0
ELF-MIPS-EXE: ]
RUN: llvm-readobj --dynamic-table %p/Inputs/dynamic-table-exe.x86 \
RUN: | FileCheck %s -check-prefix ELF-X86-EXE
ELF-X86-EXE: Format: ELF32-i386
ELF-X86-EXE: Arch: i386
ELF-X86-EXE: AddressSize: 32bit
ELF-X86-EXE: LoadName:
ELF-X86-EXE: DynamicSection [ (30 entries)
ELF-X86-EXE: Tag Type Name/Value
ELF-X86-EXE: 0x00000001 NEEDED Shared library: [libstdc++.so.6]
ELF-X86-EXE: 0x00000001 NEEDED Shared library: [libgcc_s.so.1]
ELF-X86-EXE: 0x00000001 NEEDED Shared library: [libc.so.6]
ELF-X86-EXE: 0x0000000C INIT 0x62C
ELF-X86-EXE: 0x0000000D FINI 0x920
ELF-X86-EXE: 0x00000019 INIT_ARRAY 0x19FC
ELF-X86-EXE: 0x0000001B INIT_ARRAYSZ 4 (bytes)
ELF-X86-EXE: 0x0000001A FINI_ARRAY 0x1A00
ELF-X86-EXE: 0x0000001C FINI_ARRAYSZ 4 (bytes)
ELF-X86-EXE: 0x00000004 HASH 0x18C
ELF-X86-EXE: 0x6FFFFEF5 GNU_HASH 0x1E4
ELF-X86-EXE: 0x00000005 STRTAB 0x328
ELF-X86-EXE: 0x00000006 SYMTAB 0x218
ELF-X86-EXE: 0x0000000A STRSZ 408 (bytes)
ELF-X86-EXE: 0x0000000B SYMENT 16 (bytes)
ELF-X86-EXE: 0x00000015 DEBUG 0x0
ELF-X86-EXE: 0x00000003 PLTGOT 0x1B30
ELF-X86-EXE: 0x00000002 PLTRELSZ 64 (bytes)
ELF-X86-EXE: 0x00000014 PLTREL REL
ELF-X86-EXE: 0x00000017 JMPREL 0x5EC
ELF-X86-EXE: 0x00000011 REL 0x564
ELF-X86-EXE: 0x00000012 RELSZ 136 (bytes)
ELF-X86-EXE: 0x00000013 RELENT 8 (bytes)
ELF-X86-EXE: 0x00000016 TEXTREL
ELF-X86-EXE: 0x0000001E FLAGS TEXTREL
ELF-X86-EXE: 0x6FFFFFFE VERNEED 0x4E4
ELF-X86-EXE: 0x6FFFFFFF VERNEEDNUM 3
ELF-X86-EXE: 0x6FFFFFF0 VERSYM 0x4C0
ELF-X86-EXE: 0x6FFFFFFA RELCOUNT 6
ELF-X86-EXE: 0x00000000 NULL 0x0
ELF-X86-EXE: ]
RUN: llvm-readobj --dynamic-table %p/Inputs/dynamic-table-so.x86 \
RUN: | FileCheck %s -check-prefix ELF-X86-SO
ELF-X86-SO: Format: ELF64-x86-64
ELF-X86-SO: Arch: x86_64
ELF-X86-SO: AddressSize: 64bit
ELF-X86-SO: LoadName:
ELF-X86-SO: DynamicSection [ ({{[0-9]+}} entries)
ELF-X86-SO: Tag Type Name/Value
ELF-X86-SO: 0x0000000000000001 NEEDED Shared library: [libc.so.6]
ELF-X86-SO: 0x0000000000000001 NEEDED Shared library: [ld-linux-x86-64.so.2]
ELF-X86-SO: 0x000000007FFFFFFF FILTER Filter library: [filter.so]
ELF-X86-SO: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [aux.so]
ELF-X86-SO: 0x000000000000000C INIT 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x000000000000000D FINI 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x0000000000000019 INIT_ARRAY 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x000000000000001B INIT_ARRAYSZ 8 (bytes)
ELF-X86-SO: 0x000000000000001A FINI_ARRAY 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x000000000000001C FINI_ARRAYSZ 8 (bytes)
ELF-X86-SO: 0x000000006FFFFEF5 GNU_HASH 0x1C8
ELF-X86-SO: 0x0000000000000005 STRTAB 0x3A0
ELF-X86-SO: 0x0000000000000006 SYMTAB 0x208
ELF-X86-SO: 0x000000000000000A STRSZ {{[0-9]+}} (bytes)
ELF-X86-SO: 0x000000000000000B SYMENT 24 (bytes)
ELF-X86-SO: 0x0000000000000003 PLTGOT 0x201000
ELF-X86-SO: 0x0000000000000002 PLTRELSZ 48 (bytes)
ELF-X86-SO: 0x0000000000000014 PLTREL RELA
ELF-X86-SO: 0x0000000000000017 JMPREL 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x0000000000000007 RELA 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x0000000000000008 RELASZ 240 (bytes)
ELF-X86-SO: 0x0000000000000009 RELAENT 24 (bytes)
ELF-X86-SO: 0x000000006FFFFFFE VERNEED 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x000000006FFFFFFF VERNEEDNUM 2
ELF-X86-SO: 0x000000006FFFFFF0 VERSYM 0x{{[0-9A-F]+}}
ELF-X86-SO: 0x000000006FFFFFF9 RELACOUNT 3
ELF-X86-SO: 0x0000000000000000 NULL 0x0
RUN: llvm-readobj --dynamic-table %p/Inputs/dynamic-table-so.aarch64 \
RUN: | FileCheck %s -check-prefix ELF-AARCH64-SO
RUN: llvm-readelf --dynamic-table %p/Inputs/dynamic-table-so.aarch64 \
RUN: | FileCheck %s --strict-whitespace -check-prefix ELF-AARCH64-SO-GNU
ELF-AARCH64-SO: Format: ELF64-aarch64-little
ELF-AARCH64-SO: Arch: aarch64
ELF-AARCH64-SO: AddressSize: 64bit
ELF-AARCH64-SO: LoadName:
ELF-AARCH64-SO: DynamicSection [ (26 entries)
ELF-AARCH64-SO: Tag Type Name/Value
ELF-AARCH64-SO: 0x0000000000000001 NEEDED Shared library: [libc.so.6]
ELF-AARCH64-SO: 0x000000000000000C INIT 0x660
ELF-AARCH64-SO: 0x000000000000000D FINI 0x83C
ELF-AARCH64-SO: 0x0000000000000019 INIT_ARRAY 0x10DB8
ELF-AARCH64-SO: 0x000000000000001B INIT_ARRAYSZ 8 (bytes)
ELF-AARCH64-SO: 0x000000000000001A FINI_ARRAY 0x10DC0
ELF-AARCH64-SO: 0x000000000000001C FINI_ARRAYSZ 8 (bytes)
ELF-AARCH64-SO: 0x000000006FFFFEF5 GNU_HASH 0x1F0
ELF-AARCH64-SO: 0x0000000000000005 STRTAB 0x420
ELF-AARCH64-SO: 0x0000000000000006 SYMTAB 0x240
ELF-AARCH64-SO: 0x000000000000000A STRSZ 210 (bytes)
ELF-AARCH64-SO: 0x000000000000000B SYMENT 24 (bytes)
ELF-AARCH64-SO: 0x0000000000000003 PLTGOT 0x10FE8
ELF-AARCH64-SO: 0x0000000000000002 PLTRELSZ 96 (bytes)
ELF-AARCH64-SO: 0x0000000000000014 PLTREL RELA
ELF-AARCH64-SO: 0x0000000000000017 JMPREL 0x600
ELF-AARCH64-SO: 0x000000006FFFFEF6 TLSDESC_PLT 0x6D0
ELF-AARCH64-SO: 0x000000006FFFFEF7 TLSDESC_GOT 0x10FE0
ELF-AARCH64-SO: 0x0000000000000007 RELA 0x540
ELF-AARCH64-SO: 0x0000000000000008 RELASZ 192 (bytes)
ELF-AARCH64-SO: 0x0000000000000009 RELAENT 24 (bytes)
ELF-AARCH64-SO: 0x000000006FFFFFFE VERNEED 0x520
ELF-AARCH64-SO: 0x000000006FFFFFFF VERNEEDNUM 1
ELF-AARCH64-SO: 0x000000006FFFFFF0 VERSYM 0x4F2
ELF-AARCH64-SO: 0x000000006FFFFFF9 RELACOUNT 3
ELF-AARCH64-SO: 0x0000000000000000 NULL 0x0
ELF-AARCH64-SO: ]
ELF-AARCH64-SO-GNU: Dynamic section at offset 0x{{.*}} contains 26 entries:
ELF-AARCH64-SO-GNU-NEXT: Tag Type Name/Value
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000000c (INIT) 0x660
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000000d (FINI) 0x83c
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000019 (INIT_ARRAY) 0x10db8
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000001a (FINI_ARRAY) 0x10dc0
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x000000006ffffef5 (GNU_HASH) 0x1f0
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000005 (STRTAB) 0x420
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000006 (SYMTAB) 0x240
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000000a (STRSZ) 210 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x000000000000000b (SYMENT) 24 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000003 (PLTGOT) 0x10fe8
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000002 (PLTRELSZ) 96 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000014 (PLTREL) RELA
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000017 (JMPREL) 0x600
ELF-AARCH64-SO-GNU-NEXT: 0x000000006ffffef6 (TLSDESC_PLT) 0x6d0
ELF-AARCH64-SO-GNU-NEXT: 0x000000006ffffef7 (TLSDESC_GOT) 0x10fe0
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000007 (RELA) 0x540
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000008 (RELASZ) 192 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000009 (RELAENT) 24 (bytes)
ELF-AARCH64-SO-GNU-NEXT: 0x000000006ffffffe (VERNEED) 0x520
ELF-AARCH64-SO-GNU-NEXT: 0x000000006fffffff (VERNEEDNUM) 1
ELF-AARCH64-SO-GNU-NEXT: 0x000000006ffffff0 (VERSYM) 0x4f2
ELF-AARCH64-SO-GNU-NEXT: 0x000000006ffffff9 (RELACOUNT) 3
ELF-AARCH64-SO-GNU-NEXT: 0x0000000000000000 (NULL) 0x0