This is the mail archive of the binutils@sourceware.cygnus.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]

mips weak symbol fix


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 ();



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