diff options
Diffstat (limited to 'test/ELF/mips-relocatable.s')
-rw-r--r-- | test/ELF/mips-relocatable.s | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ELF/mips-relocatable.s b/test/ELF/mips-relocatable.s new file mode 100644 index 000000000000..168ddf736e1e --- /dev/null +++ b/test/ELF/mips-relocatable.s @@ -0,0 +1,21 @@ +# Check linking MIPS code in case of -r linker's option. + +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o +# RUN: ld.lld -r -o %t-r.o %t.o +# RUN: llvm-objdump -s -t %t-r.o | FileCheck %s + +# REQUIRES: mips + + .text + .global __start +__start: + lw $t0,%call16(__start)($gp) +foo: + nop + + .section .rodata, "a" +v: + .gpword foo + +# CHECK-NOT: Contents of section .got: +# CHECK-NOT: {{.*}} _gp |