Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / mips-got-page.s
blobefb73f11c1e33774998ced2d0a5fb6dce227ff58
1 # REQUIRES: mips
2 # Check the case when small section (less that 0x10000 bytes) occupies
3 # two adjacent 0xffff-bytes pages. We need to create two GOT entries
4 # for R_MIPS_GOT_PAGE relocations.
6 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux -o %t.o %s
7 # RUN: ld.lld --section-start .rodata=0x27FFC -shared -o %t.so %t.o
8 # RUN: llvm-readobj --symbols -A %t.so | FileCheck %s
10 # CHECK: Name: foo
11 # CHECK-NEXT: Value: 0x27FFC
12 # ^ page-address = (0x27ffc + 0x8000) & ~0xffff = 0x20000
14 # CHECK: Name: bar
15 # CHECK-NEXT: Value: 0x28000
16 # ^ page-address = (0x28000 + 0x8000) & ~0xffff = 0x30000
18 # CHECK: Local entries [
19 # CHECK-NEXT: Entry {
20 # CHECK-NEXT: Address:
21 # CHECK-NEXT: Access: -32736
22 # CHECK-NEXT: Initial: 0x20000
23 # CHECK-NEXT: }
24 # CHECK-NEXT: Entry {
25 # CHECK-NEXT: Address:
26 # CHECK-NEXT: Access: -32728
27 # CHECK-NEXT: Initial: 0x30000
28 # CHECK-NEXT: }
29 # CHECK-NEXT: ]
31 .text
32 ld $v0,%got_page(foo)($gp)
33 ld $v0,%got_page(bar)($gp)
35 .rodata
36 foo:
37 .word 0
38 bar:
39 .word 0