This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] unify dynamic_symbol_p implementations


On Mon, Jul 21, 2003 at 12:43:51AM +0930, Alan Modra wrote:
> 
> One interesting place that this differs from (the inverse of) Richard's
> function is in the treatment of weak and undefweak dynamic syms.  I
> suspect I should allow a weak dynamic sym in an executable to be
> overridden, even if we don't find a strong sym in a shared lib supplied
> at link time.  Comments?
> 

A weak symbol in executable shouldn't be overridden unless there is a
definition in a shared library at link time. I am testing this patch
on ia64. It has passed "make check". I will build gcc and glibc with
the new linker.


H.J.
---
2003-07-21  H.J. Lu <hongjiu.lu@intel.com>

	* elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
	weak symbols.

--- bfd/elflink.c.weak	2003-07-21 07:34:13.000000000 -0700
+++ bfd/elflink.c	2003-07-21 12:17:03.000000000 -0700
@@ -2519,10 +2519,6 @@ _bfd_elf_dynamic_symbol_p (h, info, igno
       break;
 
     default:
-      /* With STV_DEFAULT, weak symbols do not bind locally.  */
-      if (h->root.type == bfd_link_hash_undefweak
-          || h->root.type == bfd_link_hash_defweak)
-	return TRUE;
       break;
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]