* elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
authorMaciej W. Rozycki <macro@linux-mips.org>
Mon, 13 Aug 2012 13:06:14 +0000 (13:06 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Mon, 13 Aug 2012 13:06:14 +0000 (13:06 +0000)
of protected symbols.

bfd/ChangeLog
bfd/elfxx-mips.c

index b1dcf8607cd6eaa6b3383d984a66284aded0c050..02cac165779b9f667e496d091f90527276da5737 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
+       of protected symbols.
+
 2012-08-10  Alan Modra  <amodra@gmail.com>
 
        PR binutils/14444
index 2a4c27886b7056b8e624f7195ddb977f657550eb..966a0be32429f2a1f1e8b3e50780ab8124544b2a 100644 (file)
@@ -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);