This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
mips weak symbol fix
- To: binutils at sourceware dot cygnus dot com
- Subject: mips weak symbol fix
- From: Ulf Carlsson <ulfc at calypso dot engr dot sgi dot com>
- Date: Thu, 4 May 2000 21:55:55 -0700 (PDT)
Hi,
Here is a patch that will fix the failure of testcase I just sent.
Ulf
2000-05-04 Ulf Carlsson <ulfc@engr.sgi.com>
* config/tc-mips.c (md_estimate_size_before_relax): Use the external
version of the relocation instead of the local one for weak symbols.
Index: tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.14
diff -u -p -r1.14 tc-mips.c
--- tc-mips.c 2000/04/25 10:02:20 1.14
+++ tc-mips.c 2000/05/05 04:23:46
@@ -11022,6 +11022,10 @@ md_estimate_size_before_relax (fragp, se
change = (symsec != &bfd_und_section
&& symsec != &bfd_abs_section
&& ! bfd_is_com_section (symsec));
+#ifdef OBJ_ELF
+ /* A weak symbol is treated as external. */
+ change = change ? !(S_IS_WEAK (sym)) : 0;
+#endif
}
else
abort ();