| # 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 mipsel -e T0 -static -o %t.exe %t.o |
| # RUN: llvm-objdump -s %t.exe | FileCheck %s |
| |
| # CHECK: Contents of section .text: |
| # CHECK-NEXT: 4000b4 18800000 18800000 |
| # ^ -32744 ^ -32744 |
| # CHECK-NEXT: Contents of section .tdata: |
| # CHECK-NEXT: 401000 00000000 00000000 |
| # CHECK-NEXT: Contents of section .got: |
| # CHECK-NEXT: 402000 00000000 00000080 01000000 00000000 |
| # ^ R_MIPS_TLS_DTPMOD32 |
| |
| --- |
| FileHeader: |
| Class: ELFCLASS32 |
| Data: ELFDATA2LSB |
| Type: ET_REL |
| Machine: EM_MIPS |
| Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32] |
| |
| Sections: |
| - Name: .text |
| Type: SHT_PROGBITS |
| Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| AddressAlign: 4 |
| Content: "0400000008000000" |
| |
| - Name: .rel.text |
| Type: SHT_REL |
| Link: .symtab |
| AddressAlign: 4 |
| Info: .text |
| Relocations: |
| - Offset: 0 |
| Symbol: L1 |
| Type: R_MIPS_TLS_LDM |
| - Offset: 4 |
| Symbol: L2 |
| Type: R_MIPS_TLS_LDM |
| |
| - 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 |
| ... |