fix xcoff absolute syms

Alan Modra amodra@bigpond.net.au
Tue Aug 6 04:24:00 GMT 2002


Fixes xcoff ld testsuite failures.
binaix213/binutils/nm-new   tmpdir/def >tmpdir/nm.out
BFD: warning: tmpdir/def: local symbol `^XÂ    tÁ      ' has no section
BFD: warning: tmpdir/def: local symbol `p     204Á    ' has no section
ERROR: tmpdir/def: nm failed
UNRESOLVED: DEFINED (PRMS 5699)

	* xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.

Index: bfd/xcofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/xcofflink.c,v
retrieving revision 1.27
diff -u -p -r1.27 xcofflink.c
--- bfd/xcofflink.c	25 Jun 2002 06:21:54 -0000	1.27
+++ bfd/xcofflink.c	6 Aug 2002 08:13:21 -0000
@@ -5887,7 +5887,10 @@ xcoff_write_global_symbol (h, inf)
       isym.n_value = (h->root.u.def.section->output_section->vma
 		      + h->root.u.def.section->output_offset
 		      + h->root.u.def.value);
-      isym.n_scnum = h->root.u.def.section->output_section->target_index;
+      if (bfd_is_abs_section (h->root.u.def.section->output_section))
+	isym.n_scnum = N_ABS;
+      else
+	isym.n_scnum = h->root.u.def.section->output_section->target_index;
       isym.n_sclass = C_HIDEXT;
       aux.x_csect.x_smtyp = XTY_SD;
 

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list