MIPS/BFD: Handle branches in PLT compression selection
authorMaciej W. Rozycki <macro@imgtec.com>
Tue, 26 Jul 2016 16:45:00 +0000 (17:45 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Tue, 26 Jul 2016 19:00:48 +0000 (20:00 +0100)
commit54806ffa85643c3a1ee721d5c3f5586d32f86ee1
treef23e2aec8ed954c4650d21b5b46638c8c9523ec2
parent40c31709c6a51926fcb409611caa52b2da6515c0
MIPS/BFD: Handle branches in PLT compression selection

Complement:

commit 1bbce132647e6d72aaa065cce5c1d5dd6585c2b2
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Mon Jun 24 23:55:46 2013 +0000

<https://sourceware.org/ml/binutils/2013-06/msg00077.html>, ("MIPS:
Compressed PLT/stubs support"), and also choose between regular and
compressed PLT entries as appropriate for any branches referring.

bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Handle branches
in PLT compression selection.
(_bfd_mips_elf_check_relocs): Likewise.

ld/
* testsuite/ld-mips-elf/compressed-plt-1.s: Add branch support.
* testsuite/ld-mips-elf/compressed-plt-1a.s: Likewise.
* testsuite/ld-mips-elf/compressed-plt-1b.s: Likewise.
* testsuite/ld-mips-elf/compressed-plt-1-o32-branch.od: New
test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-branch.rd: New
test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.od:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.rd:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.od:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.rd:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.od:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.rd:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.od:
New test.
* testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.rd:
New test.
* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
17 files changed:
bfd/ChangeLog
bfd/elfxx-mips.c
ld/ChangeLog
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-branch.od [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-branch.rd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.od [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.rd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.od [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.rd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.od [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.rd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.od [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.rd [new file with mode: 0644]
ld/testsuite/ld-mips-elf/compressed-plt-1.s
ld/testsuite/ld-mips-elf/compressed-plt-1a.s
ld/testsuite/ld-mips-elf/compressed-plt-1b.s
ld/testsuite/ld-mips-elf/mips-elf.exp