llvm-project/lld/test/elf/ARM/rel-glob-dat.test

58 lines
1.8 KiB
Plaintext

# Check handling of R_ARM_GLOB_DAT relocation.
# RUN: yaml2obj -format=elf %s > %t-o.o
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -shared \
# RUN: --noinhibit-exec %t-o.o -lfn -L%p/Inputs -o %t
# RUN: llvm-readobj -relocations %t | FileCheck %s
# CHECK: 0x401000 R_ARM_GLOB_DAT fn
---
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: 00482DE904B08DE208D04DE224209FE502208FE020309FE5033092E708300BE508301BE533FF2FE10030A0E10300A0E104D04BE20088BDE82000000000000000
- Name: .rel.text
Type: SHT_REL
Link: .symtab
AddressAlign: 0x0000000000000004
Info: .text
Relocations:
- Offset: 0x0000000000000038
Symbol: _GLOBAL_OFFSET_TABLE_
Type: R_ARM_BASE_PREL
- Offset: 0x000000000000003C
Symbol: fn
Type: R_ARM_GOT_BREL
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000001
Content: ''
- Name: .bss
Type: SHT_NOBITS
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000001
Symbols:
Local:
- Name: '$a'
Section: .text
- Name: '$d'
Section: .text
Value: 0x0000000000000038
Global:
- Name: f
Type: STT_FUNC
Section: .text
- Name: _GLOBAL_OFFSET_TABLE_
- Name: fn
...