llvm.org GIT mirror llvm / 6a98338
[llvm-readobj] - Do not use precompiled binary in elf-broken-dynsym-link.test Now we can remove the "TODO" since https://bugs.llvm.org/show_bug.cgi?id=42216 was fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363045 91177308-0d34-0410-b5e6-96231b3b80d8 George Rimar 11 months ago
2 changed file(s) with 18 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
test/tools/llvm-readobj/Inputs/elf-broken-dynsym-link.elf-x86-64 less more
Binary diff not shown
11 ## .dynsym section's sh_link field is broken.
22
33 ## Case 1: sh_link is set to 0.
4 # RUN: yaml2obj %s -o %t1
4 # RUN: yaml2obj --docnum=1 %s -o %t1
55 # RUN: llvm-readobj -S %t1 2>&1 | FileCheck %s --check-prefixes=LLVM,ERR
66 # RUN: llvm-readelf -S %t1 2>&1 | FileCheck %s --check-prefixes=GNU,ERR
77
3232 - Name: .dynsym
3333 Type: SHT_DYNSYM
3434
35 ## TODO: Remove precompiled input object after fixing yaml2obj.
36 ## See https://bugs.llvm.org/show_bug.cgi?id=42216.
35 ## Case 2: sh_link is set to 255, which is larger than the number of the sections.
36 # RUN: yaml2obj --docnum=2 %s -o %t2
3737
38 ## Case 2: sh_link is set to 255, which is larger than the number of the sections.
39 # RUN: llvm-readobj -S %p/Inputs/elf-broken-dynsym-link.elf-x86-64 2>&1 \
40 # RUN: | FileCheck %s --check-prefixes=LLVM2,ERR2
41 # RUN: llvm-readelf -S %p/Inputs/elf-broken-dynsym-link.elf-x86-64 2>&1 \
42 # RUN: | FileCheck %s --check-prefixes=GNU2,ERR2
38 # RUN: llvm-readobj -S %t2 2>&1 | FileCheck %s --check-prefixes=LLVM2,ERR2
39 # RUN: llvm-readelf -S %t2 2>&1 | FileCheck %s --check-prefixes=GNU2,ERR2
4340
4441 # ERR2: warning: invalid section index
42
43 --- !ELF
44 FileHeader:
45 Class: ELFCLASS64
46 Data: ELFDATA2LSB
47 Type: ET_DYN
48 Machine: EM_X86_64
49 Sections:
50 - Name: .dynsym
51 Type: SHT_DYNSYM
52 Link: 255
4553
4654 # LLVM2: Name: .dynsym
4755 # LLVM2-NEXT: Type: SHT_DYNSYM
5058 # LLVM2-NEXT: ]
5159 # LLVM2-NEXT: Address: 0x0
5260 # LLVM2-NEXT: Offset: 0x180
53 # LLVM2-NEXT: Size: 2
61 # LLVM2-NEXT: Size: 24
5462 # LLVM2-NEXT: Link: 255
5563
5664 # GNU2: Section Headers:
5765 # GNU2-NEXT: [Nr] Name Type Address Off Size ES Flg Lk
5866 # GNU2-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0
59 # GNU2-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000180 000002 18 A 255
67 # GNU2-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000180 000018 18 A 255