summaryrefslogtreecommitdiff
path: root/ld/ldcref.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-02-17 00:24:00 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-02-17 00:24:00 +0000
commitb13a944e07dd5db77f881f2821d6ab4b834f74a7 (patch)
treeb731e995d563a8045ab1e1f63b248d78a38f8637 /ld/ldcref.c
parentbc5414a9c53ab0a3eda9f74ccb4d6bc934aea4af (diff)
downloadbinutils-redhat-b13a944e07dd5db77f881f2821d6ab4b834f74a7.tar.gz
* ldcref.c (check_reloc_refs): Compare section for local syms.
Diffstat (limited to 'ld/ldcref.c')
-rw-r--r--ld/ldcref.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ld/ldcref.c b/ld/ldcref.c
index fb1d3c907f..e016451680 100644
--- a/ld/ldcref.c
+++ b/ld/ldcref.c
@@ -1,6 +1,6 @@
/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
+ 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -710,11 +710,11 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
| BSF_WEAK)) != 0))
|| (!global
&& ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL
- | BSF_SECTION_SYM)) != 0))
+ | BSF_SECTION_SYM)) != 0
+ && bfd_get_section (*q->sym_ptr_ptr) == info->defsec))
&& (symname != NULL
? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
- : (((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
- && bfd_get_section (*q->sym_ptr_ptr) == info->defsec)))
+ : ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0))
{
/* We found a reloc for the symbol. The symbol is defined
in OUTSECNAME. This reloc is from a section which is