Subject: Re: Adding Multiboot support (or not)
To: Jason Thorpe <thorpej@shagadelic.org>
From: Nick Hudson <nick.hudson@dsl.pipex.com>
List: tech-kern
Date: 02/13/2006 17:49:38
--Boundary-00=_zaM8Di5saIzv+Ji
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Sunday 12 February 2006 04:38, Jason Thorpe wrote:
> On Feb 11, 2006, at 1:30 PM, Pavel Cahyna wrote:
> > In my case it won't, unless I add an explicit statement for .rodata:
>
> Right, this is a bug in ld(1).

Does this fix it?

Nick

--Boundary-00=_zaM8Di5saIzv+Ji
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="diff"

Index: gnu/dist/binutils/ld/emultempl/elf32.em
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/ld/emultempl/elf32.em,v
retrieving revision 1.4
diff -u -p -u -r1.4 elf32.em
--- gnu/dist/binutils/ld/emultempl/elf32.em	2 Feb 2006 22:03:57 -0000	1.4
+++ gnu/dist/binutils/ld/emultempl/elf32.em	13 Feb 2006 17:49:04 -0000
@@ -1393,7 +1393,8 @@ gld${EMULATION_NAME}_place_orphan (lang_
   else if (strncmp (secname, ".rel", 4) == 0
 	   && (s->flags & SEC_LOAD) != 0)
     place = &hold[orphan_rel];
-  else if ((s->flags & SEC_CODE) == 0)
+  else if ((s->flags & SEC_CODE) == 0
+	   && hold[orphan_rodata].os != NULL)
     place = &hold[orphan_rodata];
   else
     place = &hold[orphan_text];

--Boundary-00=_zaM8Di5saIzv+Ji--