2 // RUN
: llvm-mc
-filetype
=obj
-triple
=mips64-unknown-linux
%s
-o
%t
3 // RUN
: ld.lld
-shared
%t -o
%t2
4 // RUN
: llvm-readelf
--sections
--symbols
%t2 | FileCheck
%s
6 // The Mips _GLOBAL_OFFSET_TABLE_ should
be defined at the start of the
.got
16 ld $v0
,%got_page
(a)($gp
)
17 daddiu $v0
,$v0
,%got_ofst
(a)
20 .type _start,@function
22 lw $t0
,%call16
(f
)($gp
)
23 .word _GLOBAL_OFFSET_TABLE_ - .
25 // CHECK
: {{.*}} .got PROGBITS [[GOT:[0-9a-f]+]]
26 // CHECK
: {{.*}} [[GOT]] {{.*}} _GLOBAL_OFFSET_TABLE_