summaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-08-13 13:06:13 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-08-13 13:06:13 +0000
commitc6168c07a4cc9fc71b804f1df927491053fe555b (patch)
tree75e0c59b8193d02cdb47b40faaefe6fbd61115ee /bfd/elfxx-mips.c
parente4721ae00c9b742394895777a662f09efa651b6c (diff)
downloadbinutils-redhat-c6168c07a4cc9fc71b804f1df927491053fe555b.tar.gz
* elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
of protected symbols.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 2a4c27886b..966a0be324 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -5360,7 +5360,10 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
&& (target_is_16_bit_code_p
|| target_is_micromips_code_p))));
- local_p = h == NULL || SYMBOL_REFERENCES_LOCAL (info, &h->root);
+ local_p = (h == NULL
+ || (h->got_only_for_calls
+ ? SYMBOL_CALLS_LOCAL (info, &h->root)
+ : SYMBOL_REFERENCES_LOCAL (info, &h->root)));
gp0 = _bfd_get_gp_value (input_bfd);
gp = _bfd_get_gp_value (abfd);