forked from OSchip/llvm-project
72 lines
1.7 KiB
Plaintext
72 lines
1.7 KiB
Plaintext
# Check handling of R_MIPS_TLS_LDM relocation in case of -static linking.
|
|
|
|
# RUN: yaml2obj -format=elf -o %t.o %s
|
|
# RUN: lld -flavor old-gnu -target mips64el -e T0 -static -o %t.exe %t.o
|
|
# RUN: llvm-objdump -s %t.exe | FileCheck %s
|
|
|
|
# CHECK: Contents of section .text:
|
|
# CHECK-NEXT: 120000120 20800000 20800000
|
|
# ^ -32736 ^ -32736
|
|
# CHECK-NEXT: Contents of section .tdata:
|
|
# CHECK-NEXT: 120001000 00000000 00000000
|
|
# CHECK-NEXT: Contents of section .got:
|
|
# CHECK-NEXT: 120002000 00000000 00000000 00000000 00000080
|
|
# CHECK-NEXT: 120002010 01000000 00000000 00000000 00000000
|
|
# ^ R_MIPS_TLS_DTPMOD64
|
|
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ARCH_64]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 4
|
|
Size: 8
|
|
|
|
- Name: .rel.text
|
|
Type: SHT_RELA
|
|
Link: .symtab
|
|
AddressAlign: 4
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0
|
|
Symbol: L1
|
|
Type: R_MIPS_TLS_LDM
|
|
Addend: 4
|
|
- Offset: 4
|
|
Symbol: L2
|
|
Type: R_MIPS_TLS_LDM
|
|
Addend: 8
|
|
|
|
- Name: .tdata
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
|
|
AddressAlign: 4
|
|
Size: 8
|
|
|
|
Symbols:
|
|
Local:
|
|
- Name: L1
|
|
Type: STT_TLS
|
|
Section: .tdata
|
|
Value: 0
|
|
Size: 4
|
|
- Name: L2
|
|
Type: STT_TLS
|
|
Section: .tdata
|
|
Value: 4
|
|
Size: 4
|
|
|
|
Global:
|
|
- Name: T0
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Size: 8
|
|
...
|