aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2013-03-28 23:52:44 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2013-03-28 23:52:44 +0000
commita6f713fc44bd59b0d1a872523dbcf7644eb37261 (patch)
tree42aff0ff6d965fb49daba5bf858898fd8f8d7f14 /bfd/elf32-sh.c
parent9bf7063f22fae8f291ba2513f45b3105b2ab95c9 (diff)
downloadgdb-a6f713fc44bd59b0d1a872523dbcf7644eb37261.zip
gdb-a6f713fc44bd59b0d1a872523dbcf7644eb37261.tar.gz
gdb-a6f713fc44bd59b0d1a872523dbcf7644eb37261.tar.bz2
* elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
R_SH_REL32 relocations against undefined weak symbols.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 8e93dda..a4c987f 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -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: