PATCH for IRIX6/linkonce sections

Mark P. Mitchell mark@codesourcery.com
Sun Jul 18 22:03:00 GMT 1999


In order to get linkonce sections working on IRIX6, we need something like
the following patch.  It's ugly to put this is elf.sc, but putting
it in elf32bmipn32.sh didn't work because RELOCATING is not defined
at the point that file is sourced.  (Another approach would be to change
that, but that change would be obtrusive, and could subtly affect other
emulations.)

OK to check in?

--

Sun Jul 18 23:00:52 1999  Mark P. Mitchell  <mark@codesourcery.com>

	* scripttempl/elf.sc: Handle .MIPS.events and .MIPS.content sections
	in conjunction with linkonce sections.

Index: scripttempl/elf.sc
===================================================================
RCS file: /cvs/binutils/binutils/ld/scripttempl/elf.sc,v
retrieving revision 1.3
diff -c -p -r1.3 elf.sc
*** elf.sc	1999/07/14 16:45:54	1.3
--- elf.sc	1999/07/19 05:00:33
*************** SECTIONS
*** 279,284 ****
--- 279,322 ----
    .debug_typenames 0 : { *(.debug_typenames) }
    .debug_varnames  0 : { *(.debug_varnames) }
  
+   /* SGI extensions.  */
+   .MIPS.events.text ${RELOCATING-0} : 
+     {
+        *(.MIPS.events.text)
+        *(.MIPS.events.text.*)
+        ${RELOCATING+*(.MIPS.events.gnu.linkonce.t*)}
+     }
+   .MIPS.content.text ${RELOCATING-0} : 
+     {
+        *(.MIPS.content.text)
+        *(.MIPS.content.text*)
+        ${RELOCATING+*(.MIPS.content.gnu.linkonce.t*)}
+     }
+   .MIPS.events.data ${RELOCATING-0} : 
+     {
+        *(.MIPS.events.data)
+        *(.MIPS.events.data.*)
+        ${RELOCATING+*(.MIPS.events.gnu.linkonce.d*)}
+     }
+   .MIPS.content.data ${RELOCATING-0} : 
+     {
+        *(.MIPS.content.data)
+        *(.MIPS.content.data*)
+        ${RELOCATING+*(.MIPS.content.gnu.linkonce.d*)}
+     }
+   .MIPS.events.rodata ${RELOCATING-0} : 
+     {
+        *(.MIPS.events.rodata)
+        *(.MIPS.events.rodata.*)
+        ${RELOCATING+*(.MIPS.events.gnu.linkonce.r*)}
+     }
+   .MIPS.content.rodata ${RELOCATING-0} : 
+     {
+        *(.MIPS.content.rodata)
+        *(.MIPS.content.rodata*)
+        ${RELOCATING+*(.MIPS.content.gnu.linkonce.r*)}
+     }
+ 
    ${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
  
    /* These must appear regardless of ${RELOCATING}.  */


More information about the Binutils mailing list