1 ## Test how we dump SHT_RELR sections for 32 and 64-bit targets.
\r
3 ## Test we use the "Entries" property when it is possible to
\r
4 ## dump values correctly. Also, check we do not dump sh_entsize when
\r
5 ## it has the default value.
\r
7 # RUN: yaml2obj --docnum=1 -D BITS=32 -D ENCODE=LSB %s -o %t.32le
\r
8 # RUN: obj2yaml %t.32le | FileCheck %s --check-prefix=ELF32LE
\r
9 # RUN: yaml2obj --docnum=1 -D BITS=32 -D ENCODE=MSB %s -o %t.32be
\r
10 # RUN: obj2yaml %t.32be | FileCheck %s --check-prefix=ELF32BE
\r
11 # RUN: yaml2obj --docnum=1 -D BITS=64 -D ENCODE=LSB %s -o %t.64le
\r
12 # RUN: obj2yaml %t.64le | FileCheck %s --check-prefix=ELF64LE
\r
13 # RUN: yaml2obj --docnum=1 -D BITS=64 -D ENCODE=MSB %s -o %t.64be
\r
14 # RUN: obj2yaml %t.64be | FileCheck %s --check-prefix=ELF64BE
\r
16 # ELF64LE: Sections:
\r
17 # ELF64LE-NEXT: - Name: .relr.dyn
\r
18 # ELF64LE-NEXT: Type: SHT_RELR
\r
19 # ELF64LE-NEXT: Entries: [ 0x8877665544332211 ]
\r
21 # ELF32LE: Sections:
\r
22 # ELF32LE-NEXT: - Name: .relr.dyn
\r
23 # ELF32LE-NEXT: Type: SHT_RELR
\r
24 # ELF32LE-NEXT: Entries: [ 0x44332211, 0x88776655 ]
\r
26 # ELF64BE: Sections:
\r
27 # ELF64BE-NEXT: - Name: .relr.dyn
\r
28 # ELF64BE-NEXT: Type: SHT_RELR
\r
29 # ELF64BE-NEXT: Entries: [ 0x1122334455667788 ]
\r
31 # ELF32BE: Sections:
\r
32 # ELF32BE-NEXT: - Name: .relr.dyn
\r
33 # ELF32BE-NEXT: Type: SHT_RELR
\r
34 # ELF32BE-NEXT: Entries: [ 0x11223344, 0x55667788 ]
\r
38 Class: ELFCLASS[[BITS]]
\r
39 Data: ELFDATA2[[ENCODE]]
\r
44 Content: "1122334455667788"
\r
46 ## Test we use the "Content" property when a SHT_RELR section is truncated.
\r
48 # RUN: yaml2obj --docnum=2 %s -o %t.content
\r
49 # RUN: obj2yaml %t.content | FileCheck %s --check-prefix=CONTENT
\r
51 # CONTENT: - Name: .relr.dyn
\r
52 # CONTENT-NEXT: Type: SHT_RELR
\r
53 # CONTENT-NEXT: Content: '11223344556677'
\r
63 Content: "11223344556677"
\r
65 ## Test we are able to dump a SHT_RELR section when sh_entsize is invalid.
66 ## Here we use 0xFE as a value instead of expected 0x8.
68 # RUN: yaml2obj --docnum=3 %s -o %t.entsize
69 # RUN: obj2yaml %t.entsize | FileCheck %s --check-prefix=ENTSIZE
71 # ENTSIZE: - Name: .relr.dyn
72 # ENTSIZE-NEXT: Type: SHT_RELR
73 # ENTSIZE-NEXT: EntSize: 0xFE
74 # ENTSIZE-NEXT: Content: '1122334455667788'
86 Content: "1122334455667788"