Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-objcopy / ELF / dynamic-relocations.test
blob000cf5675bad9cd15fe12c535e1ba20ec126dedb
1 ## Check that llvm-objcopy can handle an object
2 ## containing dynamic relocations properly.
4 # RUN: yaml2obj %s -o %t1
5 # RUN: llvm-objcopy %t1 %t2
6 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
8 # CHECK:         Name: .rela.plt
9 # CHECK-NEXT:    Type: SHT_RELA
10 # CHECK-NEXT:    Flags [
11 # CHECK-NEXT:      SHF_ALLOC
12 # CHECK-NEXT:    ]
13 # CHECK-NEXT:    Address:
14 # CHECK-NEXT:    Offset:
15 # CHECK-NEXT:    Size: 24
16 # CHECK-NEXT:    Link:
17 # CHECK-NEXT:    Info:
18 # CHECK-NEXT:    AddressAlignment: 8
19 # CHECK-NEXT:    EntrySize: 24
20 # CHECK-NEXT:    SectionData (
21 # CHECK-NEXT:       0000: 18202000 00000000 07000000 01000000  |.  .............|
22 # CHECK-NEXT:       0010: 00000000 00000000                    |........|
23 # CHECK-NEXT:    )
25 --- !ELF
26 FileHeader:
27   Class:   ELFCLASS64
28   Data:    ELFDATA2LSB
29   Type:    ET_EXEC
30   Machine: EM_X86_64
31 Sections:
32   - Name:         .rela.plt
33     Type:         SHT_RELA
34     Flags:        [ SHF_ALLOC ]
35     Address:      0x0000000000200220
36     Link:         0
37     AddressAlign: 0x0000000000000008
38     Relocations:
39       - Offset: 0x0000000000202018
40         Symbol: foo
41         Type:   R_X86_64_JUMP_SLOT
42 Symbols:
43   - Name:    foo
44     Binding: STB_GLOBAL