diff options
Diffstat (limited to 'test/ELF/mips-gp-disp-ver.s')
-rw-r--r-- | test/ELF/mips-gp-disp-ver.s | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ELF/mips-gp-disp-ver.s b/test/ELF/mips-gp-disp-ver.s new file mode 100644 index 0000000000000..134a056a3620e --- /dev/null +++ b/test/ELF/mips-gp-disp-ver.s @@ -0,0 +1,15 @@ +# MIPS BFD linker puts _gp_disp symbol into DSO files and assigns zero +# version definition index to it. This value means 'unversioned local symbol' +# while _gp_disp is a section global symbol. We have to handle this bug +# in the LLD because BFD linker is used for building MIPS toolchain +# libraries. This test checks such handling. + +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o +# RUN: ld.lld %t.o %S/Inputs/mips-gp-dips-corrupt-ver.so + +# REQUIRES: mips + + .global __start + .text +__start: + lw $t0, %got(foo)($gp) |