MIPS/LD: Reject tprel_hi and tprel_lo relocations in shared library
authorFaraz Shahbazker <fshahbazker@wavecomp.com>
Sat, 18 May 2019 08:19:04 +0000 (01:19 -0700)
committerFaraz Shahbazker <fshahbazker@wavecomp.com>
Tue, 21 May 2019 18:55:08 +0000 (11:55 -0700)
commitb474a2022dc14fea0dd8ea4cc66b813486132075
tree0fe5db1c7c9c7dbe2899109aec52a5f63d624539
parent304f09d0d4b519f143144d213e1280a0691de8ba
MIPS/LD: Reject tprel_hi and tprel_lo relocations in shared library

bfd/
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
for TLS_TPREL_HI16(/LO16) relocations in shared library.

ld/
* testsuite/ld-mips-elf/pic-reloc-5.s: Add tests for
%tprel_hi and %tprel_lo relocations.
* testsuite/ld-mips-elf/pic-reloc-6.s: Likewise.
* testsuite/ld-mips-elf/pic-reloc-5.d: Update accordingly.
* testsuite/ld-mips-elf/pic-reloc-6.d: Likewise.
* testsuite/ld-mips-elf/pic-reloc-tls.ld: New test linker
script file.
bfd/ChangeLog
bfd/elfxx-mips.c
ld/ChangeLog
ld/testsuite/ld-mips-elf/pic-reloc-5.d
ld/testsuite/ld-mips-elf/pic-reloc-5.s
ld/testsuite/ld-mips-elf/pic-reloc-6.d
ld/testsuite/ld-mips-elf/pic-reloc-6.s
ld/testsuite/ld-mips-elf/pic-reloc-tls.ld [new file with mode: 0644]