This is the mail archive of the 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]
Other format: [Raw text]

Re: [PATCH/RFA] Fix C-referenceable sections with explicit LMAs

On Fri, Dec 06, 2002 at 09:47:42AM -0800, Jason R Thorpe wrote:
> My "read-only data can go with .text" patch is still required, however, for
> the test case as well as my particular application (which is why I wrote
> the test case the way I did).

I'm a little nervous about this one too, but since I can't remember
the details on

2000-09-07  Alan Modra  <>

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
	broken list handling.  Create __start_SECNAME and __stop_SECNAME
	when no place-holder.  Add some comments.  Test both SEC_CODE and
	SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
	Handle case where no output section statement created.

I suppose the change "to prevent .rodata poisoning" might no longer
be necessary.  Please don't check in your patch though.  You can
accomplish the same thing by

Index: ld/emultempl/elf32.em
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.86
diff -u -p -r1.86 elf32.em
--- ld/emultempl/elf32.em	4 Dec 2002 23:56:14 -0000	1.86
+++ ld/emultempl/elf32.em	6 Dec 2002 22:40:24 -0000
@@ -1179,7 +1179,7 @@ gld${EMULATION_NAME}_place_orphan (file,
   else if ((s->flags & (SEC_CODE | SEC_READONLY)) == SEC_READONLY
 	   && HAVE_SECTION (hold_rodata, ".rodata"))
     place = &hold_rodata;
-  else if ((s->flags & (SEC_CODE | SEC_READONLY)) == (SEC_CODE | SEC_READONLY)
+  else if ((s->flags & SEC_READONLY) != 0
 	   && hold_text.os != NULL)
     place = &hold_text;

Alan Modra
IBM OzLabs - Linux Technology Centre

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