diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-07-26 17:45:00 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2016-07-26 20:00:48 +0100 |
commit | 54806ffa85643c3a1ee721d5c3f5586d32f86ee1 (patch) | |
tree | f23e2aec8ed954c4650d21b5b46638c8c9523ec2 /ld/testsuite/ld-mips-elf/compressed-plt-1.s | |
parent | 40c31709c6a51926fcb409611caa52b2da6515c0 (diff) | |
download | gdb-54806ffa85643c3a1ee721d5c3f5586d32f86ee1.zip gdb-54806ffa85643c3a1ee721d5c3f5586d32f86ee1.tar.gz gdb-54806ffa85643c3a1ee721d5c3f5586d32f86ee1.tar.bz2 |
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.
Diffstat (limited to 'ld/testsuite/ld-mips-elf/compressed-plt-1.s')
-rw-r--r-- | ld/testsuite/ld-mips-elf/compressed-plt-1.s | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/ld/testsuite/ld-mips-elf/compressed-plt-1.s b/ld/testsuite/ld-mips-elf/compressed-plt-1.s index aa0b497..7e7bdaa 100644 --- a/ld/testsuite/ld-mips-elf/compressed-plt-1.s +++ b/ld/testsuite/ld-mips-elf/compressed-plt-1.s @@ -13,10 +13,12 @@ __call_stub_\name: # Flags to specify how a particular function is referenced .equ DC, 1 # Direct call from "compressed" code - .equ IC, 2 # Indirect call from "compressed" code - .equ DU, 4 # Direct call from "uncompressed" code - .equ IU, 8 # Indirect call from "uncompressed" code - .equ LO, 16 # Direct address reference (%lo) + .equ BC, 2 # Branch from "compressed" code + .equ IC, 4 # Indirect call from "compressed" code + .equ DU, 8 # Direct call from "uncompressed" code + .equ BU, 16 # Branch from "uncompressed" code + .equ IU, 32 # Indirect call from "uncompressed" code + .equ LO, 64 # Direct address reference (%lo) # A wrapper around a macro called test_one, which is defined by # the file that includes this one. NAME is the name of a function @@ -35,9 +37,14 @@ __call_stub_\name: test_filter \name\()_dc, (\flags | DC) .endm - .macro test_all_ic, name, flags + .macro test_all_bc, name, flags test_all_dc \name, \flags - test_all_dc \name\()_ic, (\flags | IC) + test_all_dc \name\()_bc, (\flags | BC) + .endm + + .macro test_all_ic, name, flags + test_all_bc \name, \flags + test_all_bc \name\()_ic, (\flags | IC) .endm .macro test_all_du, name, flags @@ -45,9 +52,14 @@ __call_stub_\name: test_all_ic \name\()_du, (\flags | DU) .endm - .macro test_all_iu, name, flags + .macro test_all_bu, name, flags test_all_du \name, \flags - test_all_du \name\()_iu, (\flags | IU) + test_all_du \name\()_bu, (\flags | BU) + .endm + + .macro test_all_iu, name, flags + test_all_bu \name, \flags + test_all_bu \name\()_iu, (\flags | IU) .endm .macro test_all_lo, name, flags |