mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
54806ffa85
Complement:
commit 1bbce13264
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.
48 lines
595 B
ArmAsm
48 lines
595 B
ArmAsm
# Define a function with all "compressed" (dc, bc and ic) references.
|
|
|
|
.abicalls
|
|
.option pic0
|
|
|
|
.include "compressed-plt-1.s"
|
|
|
|
.macro test_one, name, types
|
|
.if (\types) & DC
|
|
jal \name
|
|
nop
|
|
.if micromips
|
|
.ifdef o32
|
|
j \name
|
|
nop
|
|
.endif
|
|
.endif
|
|
.endif
|
|
.if (\types) & BC
|
|
.if micromips
|
|
bal \name
|
|
nop
|
|
.endif
|
|
.ifdef o32
|
|
b \name
|
|
nop
|
|
.endif
|
|
.endif
|
|
.if (\types) & IC
|
|
lw $2, %call16(\name)($3)
|
|
.endif
|
|
.endm
|
|
|
|
.if micromips
|
|
.set micromips
|
|
.else
|
|
.set mips16
|
|
.endif
|
|
|
|
.section .text.a, "ax", @progbits
|
|
.globl testc
|
|
.ent testc
|
|
.set noreorder
|
|
testc:
|
|
test_all
|
|
jr $31
|
|
.end testc
|