aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2007-06-25 10:13:57 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2007-06-25 10:13:57 +0000
commitb314ec0eae7a778810550ccf87cd92eda7feaf2a (patch)
tree7c95af55b8663108c70d89bc4eb432cd3d5b4b47 /bfd/elfxx-mips.c
parentb6fd0dfb46df6f46eace51d68b9de8318ebe3842 (diff)
downloadgdb-b314ec0eae7a778810550ccf87cd92eda7feaf2a.zip
gdb-b314ec0eae7a778810550ccf87cd92eda7feaf2a.tar.gz
gdb-b314ec0eae7a778810550ccf87cd92eda7feaf2a.tar.bz2
bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs to be used for calls from MIPS16 code. gas/ * config/tc-mips.h (TC_SYMFIELD_TYPE): New. * config/tc-mips.c (append_insn): Record which symbols have R_MIPS16_26 relocations against them. (mips_fix_adjustable): Don't reduce relocations against such symbols. ld/testsuite/ * ld-mips-elf/mips16-local-stubs-1.s, * ld-mips-elf/mips16-local-stubs-1.d: New tests. * ld-mips-elf/mips-elf.exp: Run them.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 1bccb33..dafd607 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -4092,8 +4092,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
/* If this is a 16-bit call to a 32- or 64-bit function with a stub, we
need to redirect the call to the stub. */
else if (r_type == R_MIPS16_26 && !info->relocatable
- && h != NULL
- && ((h->call_stub != NULL || h->call_fp_stub != NULL)
+ && ((h != NULL && (h->call_stub != NULL || h->call_fp_stub != NULL))
|| (local_p
&& elf_tdata (input_bfd)->local_call_stubs != NULL
&& elf_tdata (input_bfd)->local_call_stubs[r_symndx] != NULL))