MIPS/LD: Fix memory fault linking non-PIC object in to shared library
authorFaraz Shahbazker <fshahbazker@wavecomp.com>
Sat, 18 May 2019 08:19:03 +0000 (01:19 -0700)
committerFaraz Shahbazker <fshahbazker@wavecomp.com>
Tue, 21 May 2019 18:55:08 +0000 (11:55 -0700)
commit304f09d0d4b519f143144d213e1280a0691de8ba
treed5baa5160d5ed5001a91c77672f14a95ce5abde3
parentba6cd17f0a28e54d9b4ef46397d448f1d208d9a0
MIPS/LD: Fix memory fault linking non-PIC object in to shared library

bfd/
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
checks.  Search the RELA table for n64 relocations.

ld/
* testsuite/ld-mips-elf/pic-reloc-5.d: New test.
* testsuite/ld-mips-elf/pic-reloc-6.d: New test.
* testsuite/ld-mips-elf/pic-reloc-7.d: New test.
* testsuite/ld-mips-elf/pic-reloc-5.s: New test source.
* testsuite/ld-mips-elf/pic-reloc-6.s: New test source.
* testsuite/ld-mips-elf/pic-reloc-7.s: New test source.
* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
bfd/ChangeLog
bfd/elfxx-mips.c
ld/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/pic-reloc-5.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pic-reloc-5.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pic-reloc-6.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pic-reloc-6.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pic-reloc-7.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/pic-reloc-7.s [new file with mode: 0644]