summaryrefslogtreecommitdiffstats
path: root/lld/test/elf/ARM/rel-abs32.test
blob: 00be6209020be63007419c2de4b32da2332a4f8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Check handling of R_ARM_ABS32 relocation.
# RUN: yaml2obj -format=elf %s > %t-o.o
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
# RUN: --noinhibit-exec %t-o.o -o %t
# RUN: llvm-objdump -s -t %t | FileCheck %s

# CHECK: Contents of section .data:
# CHECK-NEXT: 401000 84004000
#      data = 0x400084 ^^
#               data     main addr  content
#             0x400084 = 0x400074 + 0x10
# CHECK: SYMBOL TABLE:
# CHECK: 00400074 g     F .text  0000001c main
# CHECK: 00401000 g       .data  00000004 data

---
FileHeader:
  Class:           ELFCLASS32
  Data:            ELFDATA2LSB
  Type:            ET_REL
  Machine:         EM_ARM
  Flags:           [ EF_ARM_EABI_VER5 ]
Sections:
  - Name:            .text
    Type:            SHT_PROGBITS
    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    AddressAlign:    0x0000000000000004
    Content:         04B02DE500B08DE20030A0E30300A0E100D04BE204B09DE41EFF2FE1
  - Name:            .data
    Type:            SHT_PROGBITS
    Flags:           [ SHF_WRITE, SHF_ALLOC ]
    AddressAlign:    0x0000000000000004
    Content:         '10000000'
  - Name:            .rel.data
    Type:            SHT_REL
    Link:            .symtab
    AddressAlign:    0x0000000000000004
    Info:            .data
    Relocations:
      - Offset:          0x0000000000000000
        Symbol:          main
        Type:            R_ARM_ABS32
        Addend:          0
  - Name:            .bss
    Type:            SHT_NOBITS
    Flags:           [ SHF_WRITE, SHF_ALLOC ]
    AddressAlign:    0x0000000000000001
    Content:         ''
Symbols:
  Global:
    - Name:            main
      Type:            STT_FUNC
      Section:         .text
      Size:            0x000000000000001C
    - Name:            data
      Type:            STT_OBJECT
      Section:         .data
      Size:            0x0000000000000004
...
OpenPOWER on IntegriCloud