1 # Check handling of R_MICROMIPS_TLS_LDM relocation and generation
2 # of corresponding dynamic relocation R_MICROMIPS_TLS_DTPMOD32.
4 # RUN: yaml2obj -format=elf -docnum 1 -o %t-so1.o %s
5 # RUN: yaml2obj -format=elf -docnum 2 -o %t-so2.o %s
6 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so1.o %t-so2.o
8 # RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s
9 # RUN: llvm-readobj -dynamic-table %t.so | FileCheck -check-prefix=DYN %s
10 # RUN: llvm-readobj -dt %t.so | FileCheck -check-prefix=SYM %s
11 # RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=GOT %s
13 # REL: Section (4) .rel.dyn {
14 # REL-NEXT: 0x2008 R_MIPS_TLS_DTPMOD32 - 0x0
17 # DYN: 0x7000000A MIPS_LOCAL_GOTNO 2
18 # DYN: 0x70000013 MIPS_GOTSYM 0x4
25 # GOT: Contents of section .got:
26 # GOT-NEXT: 2000 00000000 00000080 00000000 00000000 ................
27 # Two LDM entries --^--------^
37 Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC,
38 EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS ]
42 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
53 Type: R_MICROMIPS_TLS_LDM
56 Type: R_MICROMIPS_TLS_LDM
59 Flags: [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
75 Other: [ STO_MIPS_MICROMIPS ]
81 Other: [ STO_MIPS_MICROMIPS ]
91 Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC,
92 EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS ]
96 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
107 Type: R_MICROMIPS_TLS_LDM
110 Flags: [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
125 Other: [ STO_MIPS_MICROMIPS ]