Committed, MMIX: Fix ld test "map address".

Hans-Peter Nilsson hp@bitrange.com
Thu Jul 18 20:32:00 GMT 2002


As the comment says, fixes "map address" in map-address.exp.
Committed this and the previous patch to the 2.13 branch too
(I mentioned I didn't see that error on the branch before, but
that was due to pilot error).

ld:

	* emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
	output section.

Index: ld/emultempl/mmo.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mmo.em,v
retrieving revision 1.6
diff -p -c -r1.6 mmo.em
*** ld/emultempl/mmo.em	27 May 2002 08:22:08 -0000	1.6
--- ld/emultempl/mmo.em	19 Jul 2002 01:54:49 -0000
*************** mmo_place_orphan (file, s)
*** 152,157 ****
--- 152,168 ----
    /* Restore the global list pointer.  */
    stat_ptr = old;

+   /* We need an output section for .text as a root, so if there was none
+      (might happen with a peculiar linker script such as in "map
+      addresses", map-address.exp), we grab the output section created
+      above.  */
+   if (hold_text.os == NULL)
+     {
+       if (os == NULL)
+ 	return false;
+       hold_text.os = os;
+     }
+
    snew = os->bfd_section;
    bfd_section = place->os->bfd_section;
    if (place->section == NULL && bfd_section == NULL)

brgds, H-P



More information about the Binutils mailing list