* elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 28 Mar 2013 23:52:44 +0000 (23:52 +0000)
committerKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 28 Mar 2013 23:52:44 +0000 (23:52 +0000)
R_SH_REL32 relocations against undefined weak symbols.

bfd/ChangeLog
bfd/elf32-sh.c

index d11596491e7896b99d007754c12295a0d469ae38..2153a5344fc9c48851ad62737a763b5c6433ad30 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-28  Joe Seymour  <jseymour@codesourcery.com>
+
+       * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
+       R_SH_REL32 relocations against undefined weak symbols.
+
 2013-03-28  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (struct ppc_dyn_relocs): New.
index 8e93dda5bf8f651ea7755761a5b2ddb7d6371027..a4c987ff4508b5fd3cf61cb1893f307a5f08d288 100644 (file)
@@ -1,6 +1,6 @@
 /* Renesas / SuperH SH specific support for 32-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010, 2011, 2012
+   2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
    Free Software Foundation, Inc.
    Contributed by Ian Lance Taylor, Cygnus Support.
 
@@ -4425,6 +4425,12 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 
              check_segment[0] = check_segment[1] = -1;
            }
+           /* We don't want warnings for non-NULL tests on undefined weak
+              symbols.  */
+           else if (r_type == R_SH_REL32
+                    && h
+                    && h->root.type == bfd_link_hash_undefweak) 
+             check_segment[0] = check_segment[1] = -1;
          goto final_link_relocate;
 
        case R_SH_GOTPLT32:
This page took 0.032113 seconds and 4 git commands to generate.