forked from OSchip/llvm-project
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
# Check handling of R_MICROMIPS_TLS_TPREL_HI16 / R_MICROMIPS_TLS_TPREL_LO16
|
|
# relocations.
|
|
|
|
# RUN: yaml2obj -format=elf -o %t.o %s
|
|
# RUN: lld -flavor gnu -target mipsel -e L0 -o %t.exe %t.o
|
|
# RUN: llvm-objdump -s %t.exe | FileCheck %s
|
|
|
|
# CHECK: Contents of section .text:
|
|
# CHECK: {{[0-9A-F]+}} 00000000 00000100 00000380 00000480
|
|
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [ EF_MIPS_NOREORDER, EF_MIPS_CPIC,
|
|
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS ]
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 0x10
|
|
Content: '00000100000002000000030000000400'
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Info: .text
|
|
AddressAlign: 0x04
|
|
Relocations:
|
|
- Offset: 0x00
|
|
Symbol: L1
|
|
Type: R_MICROMIPS_TLS_TPREL_HI16
|
|
- Offset: 0x04
|
|
Symbol: L2
|
|
Type: R_MICROMIPS_TLS_TPREL_HI16
|
|
- Offset: 0x08
|
|
Symbol: L2
|
|
Type: R_MICROMIPS_TLS_TPREL_LO16
|
|
- Offset: 0x0C
|
|
Symbol: L1
|
|
Type: R_MICROMIPS_TLS_TPREL_LO16
|
|
- Name: .tdata
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
|
|
AddressAlign: 0x04
|
|
Address: 0x1000
|
|
Size: 0x20000
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: L0
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Size: 0x58
|
|
Other: [ STO_MIPS_MICROMIPS ]
|
|
- Name: L1
|
|
Type: STT_TLS
|
|
Section: .tdata
|
|
Value: 0x00
|
|
Size: 0x04
|
|
- Name: L2
|
|
Type: STT_TLS
|
|
Section: .tdata
|
|
Value: 0x10000
|
|
Size: 0x04
|