Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / mips-gp-local.s
blob87762799b53b5ea9fc48764fc29db7841223fd23
1 # REQUIRES: mips
2 # Check handling of relocations against __gnu_local_gp symbol.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
5 # RUN: echo "SECTIONS { \
6 # RUN: . = 0x10000; .text ALIGN(0x1000) : { *(.text) } \
7 # RUN: . = 0x30000; .got : { *(.got) } \
8 # RUN: }" > %t.script
9 # RUN: ld.lld --script %t.script -o %t.exe %t.o
10 # RUN: llvm-objdump --no-print-imm-hex -d -t --no-show-raw-insn %t.exe | FileCheck %s
12 # CHECK: 00037ff0 l .got 00000000 .hidden _gp
13 # CHECK: 00011000 g .text 00000000 __start
15 # CHECK: <__start>:
16 # CHECK-NEXT: lui $8, 3
17 # CHECK-NEXT: addi $8, $8, 32752
19 .text
20 .globl __start
21 __start:
22 lui $t0,%hi(__gnu_local_gp)
23 addi $t0,$t0,%lo(__gnu_local_gp)