diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-19 07:02:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-19 07:02:10 +0000 |
commit | 93c91e39b29142dec1d03a30df9f6e757f56c193 (patch) | |
tree | 33a9b014a327e64450b3c9ed46d8c5bdb78ad345 /test/tools | |
parent | ca089b24d48ef6fa8da2d0bb8c25bb802c4a95c0 (diff) |
Notes
Diffstat (limited to 'test/tools')
-rw-r--r-- | test/tools/llvm-cov/showTabsHTML.cpp | 4 | ||||
-rw-r--r-- | test/tools/llvm-dwarfdump/X86/verify_debug_info.s | 193 | ||||
-rw-r--r-- | test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s | 81 | ||||
-rw-r--r-- | test/tools/llvm-mt/help.test | 7 | ||||
-rw-r--r-- | test/tools/llvm-objdump/AArch64/Inputs/reloc-addend.obj.macho-aarch64 | bin | 0 -> 424 bytes | |||
-rw-r--r-- | test/tools/llvm-objdump/AArch64/macho-reloc-addend.test | 6 | ||||
-rw-r--r-- | test/tools/llvm-readobj/Inputs/dynamic-table-so.x86 | bin | 8280 -> 8256 bytes | |||
-rw-r--r-- | test/tools/llvm-readobj/Inputs/dynamic-table.c | 4 | ||||
-rw-r--r-- | test/tools/llvm-readobj/dynamic.test | 39 | ||||
-rw-r--r-- | test/tools/llvm-readobj/gnu-sections.test | 10 |
10 files changed, 320 insertions, 24 deletions
diff --git a/test/tools/llvm-cov/showTabsHTML.cpp b/test/tools/llvm-cov/showTabsHTML.cpp index 953c06a3c60d0..c092841aeb227 100644 --- a/test/tools/llvm-cov/showTabsHTML.cpp +++ b/test/tools/llvm-cov/showTabsHTML.cpp @@ -1,5 +1,5 @@ // RUN: llvm-profdata merge -o %t.profdata %S/Inputs/showTabsHTML.proftext -// RUN: llvm-cov show %S/Inputs/showTabsHTML.covmapping -format html -instr-profile %t.profdata -filename-equivalence %s | FileCheck -check-prefix=CHECK %s +// RUN: llvm-cov show %S/Inputs/showTabsHTML.covmapping -format html -instr-profile %t.profdata -filename-equivalence %s | FileCheck %s int main(int argc, char ** argv) { (void) "This tab starts at column 0"; // CHECK: (void) "This tab starts at column 0"; @@ -13,4 +13,4 @@ int main(int argc, char ** argv) { // CHECK-TABSIZE: (void) "This tab starts at column 0"; // CHECK-TABSIZE: (void) " This tab starts at column 10"; -// CHECK-TABSIZE: (void) "This tab starts at column 15";
\ No newline at end of file +// CHECK-TABSIZE: (void) "This tab starts at column 15"; diff --git a/test/tools/llvm-dwarfdump/X86/verify_debug_info.s b/test/tools/llvm-dwarfdump/X86/verify_debug_info.s new file mode 100644 index 0000000000000..90733eda278fb --- /dev/null +++ b/test/tools/llvm-dwarfdump/X86/verify_debug_info.s @@ -0,0 +1,193 @@ +# RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \ +# RUN: | not llvm-dwarfdump -verify - \ +# RUN: | FileCheck %s + +# CHECK: Verifying .debug_info Unit Header Chain... +# CHECK-NEXT: error: DIE has invalid DW_AT_stmt_list encoding:{{[[:space:]]}} +# CHECK-NEXT: 0x0000000c: DW_TAG_compile_unit [1] * +# CHECK-NEXT: DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] = "clang version 5.0.0 (trunk 308185) (llvm/trunk 308186)") +# CHECK-NEXT: DW_AT_language [DW_FORM_data2] (DW_LANG_C99) +# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000037] = "basic.c") +# CHECK-NEXT: DW_AT_stmt_list [DW_FORM_strx4] ( indexed (00000000) string = ) +# CHECK-NEXT: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x0000003f] = "/Users/sgravani/Development/tests") +# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) +# CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000016){{[[:space:]]}} +# CHECK-NEXT: Units[2] - start offset: 0x00000068 +# CHECK-NEXT: Error: The length for this unit is too large for the .debug_info provided. +# CHECK-NEXT: Error: The unit type encoding is not valid. + + + .section __TEXT,__text,regular,pure_instructions + .globl _main ## -- Begin function main + .p2align 4, 0x90 +_main: ## @main +Lfunc_begin0: + .file 1 "basic.c" + .loc 1 1 0 ## basic.c:1:0 + .cfi_startproc +## BB#0: ## %entry + pushq %rbp +Lcfi0: + .cfi_def_cfa_offset 16 +Lcfi1: + .cfi_offset %rbp, -16 + movq %rsp, %rbp +Lcfi2: + .cfi_def_cfa_register %rbp + xorl %eax, %eax + movl $0, -4(%rbp) +Ltmp0: + .loc 1 2 7 prologue_end ## basic.c:2:7 + movl $1, -8(%rbp) + .loc 1 3 3 ## basic.c:3:3 + popq %rbp + retq +Ltmp1: +Lfunc_end0: + .cfi_endproc + ## -- End function + .section __DWARF,__debug_str,regular,debug +Linfo_string: + .asciz "clang version 5.0.0 (trunk 308185) (llvm/trunk 308186)" ## string offset=0 + .asciz "basic.c" ## string offset=55 + .asciz "/Users/sgravani/Development/tests" ## string offset=63 + .asciz "main" ## string offset=97 + .asciz "int" ## string offset=102 + .asciz "a" ## string offset=106 + .section __DWARF,__debug_abbrev,regular,debug +Lsection_abbrev: + .byte 1 ## Abbreviation Code + .byte 17 ## DW_TAG_compile_unit + .byte 1 ## DW_CHILDREN_yes + .byte 37 ## DW_AT_producer + .byte 14 ## DW_FORM_strp + .byte 19 ## DW_AT_language + .byte 5 ## DW_FORM_data2 + .byte 3 ## DW_AT_name + .byte 14 ## DW_FORM_strp + .byte 16 ## DW_AT_stmt_list + .byte 40 ## DW_FORM_sec_offset -- error: DIE has invalid DW_AT_stmt_list encoding: + .byte 27 ## DW_AT_comp_dir + .byte 14 ## DW_FORM_strp + .byte 17 ## DW_AT_low_pc + .byte 1 ## DW_FORM_addr + .byte 18 ## DW_AT_high_pc + .byte 6 ## DW_FORM_data4 + .byte 0 ## EOM(1) + .byte 0 ## EOM(2) + .byte 2 ## Abbreviation Code + .byte 46 ## DW_TAG_subprogram + .byte 1 ## DW_CHILDREN_yes + .byte 17 ## DW_AT_low_pc + .byte 1 ## DW_FORM_addr + .byte 18 ## DW_AT_high_pc + .byte 6 ## DW_FORM_data4 + .byte 64 ## DW_AT_frame_base + .byte 24 ## DW_FORM_exprloc + .byte 3 ## DW_AT_name + .byte 14 ## DW_FORM_strp + .byte 58 ## DW_AT_decl_file + .byte 11 ## DW_FORM_data1 + .byte 59 ## DW_AT_decl_line + .byte 11 ## DW_FORM_data1 + .byte 39 ## DW_AT_prototyped + .byte 25 ## DW_FORM_flag_present + .byte 73 ## DW_AT_type + .byte 19 ## DW_FORM_ref4 + .byte 63 ## DW_AT_external + .byte 25 ## DW_FORM_flag_present + .byte 0 ## EOM(1) + .byte 0 ## EOM(2) + .byte 3 ## Abbreviation Code + .byte 52 ## DW_TAG_variable + .byte 0 ## DW_CHILDREN_no + .byte 2 ## DW_AT_location + .byte 24 ## DW_FORM_exprloc + .byte 3 ## DW_AT_name + .byte 14 ## DW_FORM_strp + .byte 58 ## DW_AT_decl_file + .byte 11 ## DW_FORM_data1 + .byte 59 ## DW_AT_decl_line + .byte 11 ## DW_FORM_data1 + .byte 73 ## DW_AT_type + .byte 19 ## DW_FORM_ref4 + .byte 0 ## EOM(1) + .byte 0 ## EOM(2) + .byte 4 ## Abbreviation Code + .byte 36 ## DW_TAG_base_type + .byte 0 ## DW_CHILDREN_no + .byte 3 ## DW_AT_name + .byte 14 ## DW_FORM_strp + .byte 62 ## DW_AT_encoding + .byte 11 ## DW_FORM_data1 + .byte 11 ## DW_AT_byte_size + .byte 11 ## DW_FORM_data1 + .byte 0 ## EOM(1) + .byte 0 ## EOM(2) + .byte 0 ## EOM(3) + .section __DWARF,__debug_info,regular,debug +Lsection_info: +Lcu_begin0: + .long 87 ## Length of Unit + .short 5 ## DWARF version number + .byte 1 ## DWARF Unit Type + .byte 8 ## Address Size (in bytes) +Lset0 = Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section + .long Lset0 + .byte 1 ## Abbrev [1] 0xc:0x4f DW_TAG_compile_unit + .long 0 ## DW_AT_producer + .short 12 ## DW_AT_language + .long 55 ## DW_AT_name +Lset1 = Lline_table_start0-Lsection_line ## DW_AT_stmt_list + .long Lset1 + .long 63 ## DW_AT_comp_dir + .quad Lfunc_begin0 ## DW_AT_low_pc +Lset2 = Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc + .long Lset2 + .byte 2 ## Abbrev [2] 0x2b:0x28 DW_TAG_subprogram + .quad Lfunc_begin0 ## DW_AT_low_pc +Lset3 = Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc + .long Lset3 + .byte 1 ## DW_AT_frame_base + .byte 86 + .long 97 ## DW_AT_name + .byte 1 ## DW_AT_decl_file + .byte 1 ## DW_AT_decl_line + ## DW_AT_prototyped + .long 83 ## DW_AT_type + ## DW_AT_external + .byte 3 ## Abbrev [3] 0x44:0xe DW_TAG_variable + .byte 2 ## DW_AT_location + .byte 145 + .byte 120 + .long 106 ## DW_AT_name + .byte 1 ## DW_AT_decl_file + .byte 2 ## DW_AT_decl_line + .long 83 ## DW_AT_type + .byte 0 ## End Of Children Mark + .byte 4 ## Abbrev [4] 0x53:0x7 DW_TAG_base_type + .long 102 ## DW_AT_name + .byte 5 ## DW_AT_encoding + .byte 4 ## DW_AT_byte_size + .byte 0 ## End Of Children Mark +Lcu_begin1: + .long 9 ## Length of Unit + .short 5 ## DWARF version number + .byte 1 ## DWARF Unit Type + .byte 4 ## Address Size (in bytes) + .long 0 ## Abbrev offset + .byte 0 +Ltu_begin0: + .long 26 ## Length of Unit -- Error: The length for this unit is too large for the .debug_info provided. + .short 5 ## DWARF version number + .byte 0 ## DWARF Unit Type + .byte 4 ## Address Size (in bytes) + .long 0 + .quad 0 + .long 0 + .byte 0 + +.subsections_via_symbols + .section __DWARF,__debug_line,regular,debug +Lsection_line: +Lline_table_start0: diff --git a/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s b/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s new file mode 100644 index 0000000000000..a3a54077bbf9c --- /dev/null +++ b/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s @@ -0,0 +1,81 @@ +# RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \ +# RUN: | not llvm-dwarfdump -verify - \ +# RUN: | FileCheck %s + +# CHECK: Verifying .debug_info Unit Header Chain... +# CHECK-NEXT: Units[1] - start offset: 0x0000000d +# CHECK-NEXT: Error: The unit type encoding is not valid. +# CHECK-NEXT: Error: The address size is unsupported. +# CHECK-NEXT: Units[2] - start offset: 0x00000026 +# CHECK-NEXT: Error: The 16 bit unit header version is not valid. +# CHECK-NEXT: Error: The offset into the .debug_abbrev section is not valid. +# CHECK-NEXT: Units[4] - start offset: 0x00000041 +# CHECK-NEXT: Error: The length for this unit is too large for the .debug_info provided. + + .section __TEXT,__text,regular,pure_instructions + .file 1 "basic.c" + .comm _i,4,2 ## @i + .comm _j,4,2 ## @j + .section __DWARF,__debug_str,regular,debug +Linfo_string: + .asciz "clang version 5.0.0 (trunk 307232) (llvm/trunk 307042)" ## string offset=0 + .asciz "basic.c" ## string offset=55 + .asciz "/Users/sgravani/Development/tests" ## string offset=63 + .asciz "i" ## string offset=97 + .asciz "int" ## string offset=99 + .asciz "j" ## string offset=103 + .section __DWARF,__debug_abbrev,regular,debug +Lsection_abbrev: + .byte 1 ## Abbreviation Code + .byte 17 ## DW_TAG_compile_unit + .byte 0 ## EOM(1) + .byte 0 ## EOM(2) + .byte 0 ## EOM(3) + .section __DWARF,__debug_info,regular,debug +Lsection_info: +Lcu_begin0: + .long 9 ## Length of Unit + .short 4 ## DWARF version number +Lset0 = Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section + .long Lset0 + .byte 4 ## Address Size (in bytes) + .byte 1 ## Abbrev [1] 0xc:0x45 DW_TAG_compile_unit + .byte 0 ## End Of Children Mark +Ltu_begin0: + .long 21 ## Length of Unit + .short 5 ## DWARF version number + .byte 0 ## DWARF Unit Type -- Error: The unit type encoding is not valid. + .byte 3 ## Address Size (in bytes) -- Error: The address size is unsupported. + .long 0 + .quad 0 + .long 0 + .byte 0 +Lcu_begin1: + .long 10 ## Length of Unit + .short 6 ## DWARF version number -- Error: The 16 bit unit header version is not valid. + .byte 1 ## DWARF Unit Type + .byte 4 ## Address Size (in bytes) -- The offset into the .debug_abbrev section is not valid. + .long Lline_table_start0 + .byte 1 ## Abbrev [1] 0xc:0x45 DW_TAG_compile_unit + .byte 0 ## End Of Children Mark +Lcu_begin2: + .long 9 ## Length of Unit + .short 5 ## DWARF version number + .byte 1 ## DWARF Unit Type + .byte 4 ## Address Size (in bytes) + .long 0 ## Abbrev offset + .byte 0 +Ltu_begin1: + .long 26 ## Length of Unit -- Error: The length for this unit is too large for the .debug_info provided. + .short 5 ## DWARF version number + .byte 2 ## DWARF Unit Type + .byte 4 ## Address Size (in bytes) + .long 0 + .quad 0 + .long 0 + .byte 0 + +.subsections_via_symbols + .section __DWARF,__debug_line,regular,debug +Lsection_line: +Lline_table_start0: diff --git a/test/tools/llvm-mt/help.test b/test/tools/llvm-mt/help.test new file mode 100644 index 0000000000000..29e3667ec2cad --- /dev/null +++ b/test/tools/llvm-mt/help.test @@ -0,0 +1,7 @@ +RUN: llvm-mt /h | FileCheck %s -check-prefix=HELP + +RUN: llvm-mt /inputresource:foo.res /manifest foo.manifest | FileCheck %s -check-prefix=NOT_SUPPORTED + +HELP: OVERVIEW: Manifest Tool + +NOT_SUPPORTED: llvm-mt: ignoring unsupported 'inputresource:' option diff --git a/test/tools/llvm-objdump/AArch64/Inputs/reloc-addend.obj.macho-aarch64 b/test/tools/llvm-objdump/AArch64/Inputs/reloc-addend.obj.macho-aarch64 Binary files differnew file mode 100644 index 0000000000000..58ed3c7a48fc5 --- /dev/null +++ b/test/tools/llvm-objdump/AArch64/Inputs/reloc-addend.obj.macho-aarch64 diff --git a/test/tools/llvm-objdump/AArch64/macho-reloc-addend.test b/test/tools/llvm-objdump/AArch64/macho-reloc-addend.test new file mode 100644 index 0000000000000..4cc4a6eca2a11 --- /dev/null +++ b/test/tools/llvm-objdump/AArch64/macho-reloc-addend.test @@ -0,0 +1,6 @@ +RUN: llvm-objdump -r %p/Inputs/reloc-addend.obj.macho-aarch64 | FileCheck %s + +CHECK-DAG: 0000000000000004 ARM64_RELOC_ADDEND 0x999 +CHECK-DAG: 0000000000000004 ARM64_RELOC_PAGEOFF12 _stringbuf +CHECK-DAG: 0000000000000000 ARM64_RELOC_ADDEND 0x999 +CHECK-DAG: 0000000000000000 ARM64_RELOC_PAGE21 _stringbuf diff --git a/test/tools/llvm-readobj/Inputs/dynamic-table-so.x86 b/test/tools/llvm-readobj/Inputs/dynamic-table-so.x86 Binary files differindex fb9d37881c983..01bd1c2fc1edf 100644 --- a/test/tools/llvm-readobj/Inputs/dynamic-table-so.x86 +++ b/test/tools/llvm-readobj/Inputs/dynamic-table-so.x86 diff --git a/test/tools/llvm-readobj/Inputs/dynamic-table.c b/test/tools/llvm-readobj/Inputs/dynamic-table.c index b5251f87ee533..0af66ca0c53f4 100644 --- a/test/tools/llvm-readobj/Inputs/dynamic-table.c +++ b/test/tools/llvm-readobj/Inputs/dynamic-table.c @@ -1,10 +1,10 @@ // clang -target x86_64-linux-gnu -shared -fPIC -lc dynamic-table.c \ -// -o dynamic-table-so.x86 -Wl,-f,aux_val +// -o dynamic-table-so.x86 -Wl,-f,aux.so -Wl,-F,filter.so // clang -target mipsel-linux-gnu -shared -fPIC -lc dynamic-table.c \ // -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 \ +// clang -target aarch64-linux-gnu -fPIC -shared dynamic-table.c\ // -o dynamic-table-so.aarch64 int puts(const char *); diff --git a/test/tools/llvm-readobj/dynamic.test b/test/tools/llvm-readobj/dynamic.test index 5079d35569579..71b6b06cbc089 100644 --- a/test/tools/llvm-readobj/dynamic.test +++ b/test/tools/llvm-readobj/dynamic.test @@ -8,7 +8,7 @@ ELF-MIPS: AddressSize: 32bit ELF-MIPS: LoadName: ELF-MIPS: DynamicSection [ (23 entries) ELF-MIPS: Tag Type Name/Value -ELF-MIPS: 0x00000001 NEEDED SharedLibrary (libc.so.6) +ELF-MIPS: 0x00000001 NEEDED Shared library: [libc.so.6] ELF-MIPS: 0x0000000C INIT 0x528 ELF-MIPS: 0x0000000D FINI 0x860 ELF-MIPS: 0x00000004 HASH 0x210 @@ -43,7 +43,7 @@ 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 SharedLibrary (libc.so.6) +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 @@ -80,9 +80,9 @@ 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 SharedLibrary (libstdc++.so.6) -ELF-X86-EXE: 0x00000001 NEEDED SharedLibrary (libgcc_s.so.1) -ELF-X86-EXE: 0x00000001 NEEDED SharedLibrary (libc.so.6) +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 @@ -119,32 +119,33 @@ 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 [ (26 entries) +ELF-X86-SO: DynamicSection [ ({{[0-9]+}} entries) ELF-X86-SO: Tag Type Name/Value -ELF-X86-SO: 0x0000000000000001 NEEDED SharedLibrary (libc.so.6) -ELF-X86-SO: 0x0000000000000001 NEEDED SharedLibrary (ld-linux-x86-64.so.2) -ELF-X86-SO: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [aux_val] -ELF-X86-SO: 0x000000000000000C INIT 0x610 -ELF-X86-SO: 0x000000000000000D FINI 0x7AC -ELF-X86-SO: 0x0000000000000019 INIT_ARRAY 0x200DD0 +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 0x200DD8 +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 231 (bytes) +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 0x5E0 -ELF-X86-SO: 0x0000000000000007 RELA 0x4F0 +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 0x4B0 +ELF-X86-SO: 0x000000006FFFFFFE VERNEED 0x{{[0-9A-F]+}} ELF-X86-SO: 0x000000006FFFFFFF VERNEEDNUM 2 -ELF-X86-SO: 0x000000006FFFFFF0 VERSYM 0x488 +ELF-X86-SO: 0x000000006FFFFFF0 VERSYM 0x{{[0-9A-F]+}} ELF-X86-SO: 0x000000006FFFFFF9 RELACOUNT 3 ELF-X86-SO: 0x0000000000000000 NULL 0x0 @@ -157,7 +158,7 @@ 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 SharedLibrary (libc.so.6) +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 diff --git a/test/tools/llvm-readobj/gnu-sections.test b/test/tools/llvm-readobj/gnu-sections.test index fb90ce44d10f9..f5b504fa66fa7 100644 --- a/test/tools/llvm-readobj/gnu-sections.test +++ b/test/tools/llvm-readobj/gnu-sections.test @@ -1,6 +1,14 @@ RUN: llvm-readobj -s %p/Inputs/relocs.obj.elf-i386 --elf-output-style=GNU \ RUN: | FileCheck %s -check-prefix ELF32 -RUN: llvm-readobj -s %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \ +RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \ +RUN: | FileCheck %s -check-prefix ELF64 +RUN: llvm-readobj --wide --sections \ +RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \ +RUN: | FileCheck %s -check-prefix ELF64 +RUN: llvm-readobj -W --sections \ +RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \ +RUN: | FileCheck %s -check-prefix ELF64 +RUN: llvm-readelf -W -S %p/Inputs/relocs.obj.elf-x86_64 \ RUN: | FileCheck %s -check-prefix ELF64 ELF32: Section Headers: |