[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / mips-options.s
blob3b4e31c3cb53a6d375531f067f7bfd4f7423ad58
1 # REQUIRES: mips
2 # Check MIPS .MIPS.options section generation.
4 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t1.o
5 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
6 # RUN: %S/Inputs/mips-dynamic.s -o %t2.o
7 # RUN: echo "SECTIONS { \
8 # RUN: . = 0x100000000; \
9 # RUN: .got : { *(.got) } }" > %t.rel.script
10 # RUN: ld.lld %t1.o %t2.o --gc-sections --script %t.rel.script -shared -o %t.so
11 # RUN: llvm-readobj -l --symbols -A %t.so | FileCheck %s
13 .text
14 .globl __start
15 __start:
16 lui $gp, %hi(%neg(%gp_rel(g1)))
18 # CHECK: ProgramHeader {
19 # CHECK: Type: PT_MIPS_OPTIONS
20 # CHECK-NEXT: Offset:
21 # CHECK-NEXT: VirtualAddress:
22 # CHECK-NEXT: PhysicalAddress:
23 # CHECK-NEXT: FileSize:
24 # CHECK-NEXT: MemSize:
25 # CHECK-NEXT: Flags [
26 # CHECK-NEXT: PF_R
27 # CHECK-NEXT: ]
28 # CHECK-NEXT: Alignment: 8
29 # CHECK-NEXT: }
31 # CHECK: Name: _gp
32 # CHECK-NEXT: Value: 0x[[GP:[0-9A-F]+]]
34 # CHECK: MIPS Options {
35 # CHECK-NEXT: ODK_REGINFO {
36 # CHECK-NEXT: GP: 0x[[GP]]
37 # CHECK-NEXT: General Mask: 0x10000001
38 # CHECK-NEXT: Co-Proc Mask0: 0x0
39 # CHECK-NEXT: Co-Proc Mask1: 0x0
40 # CHECK-NEXT: Co-Proc Mask2: 0x0
41 # CHECK-NEXT: Co-Proc Mask3: 0x0
42 # CHECK-NEXT: }
43 # CHECK-NEXT: }