link script updates for .jcr

Richard Henderson rth@redhat.com
Sun Aug 12 13:23:00 GMT 2001


There is an orphan section placement bug that is causing
gcc.dg/special/gcsec-1.c to fail with a linker abort about
too many segment headers.

I'm too tired to find what was causing the orphan section
to wind up in the wrong place, especially since the new
.jcr section contains data for java that isn't garbage,
so adding KEEP to the scripts is necessary anyway.


r~


        * scripttempl/elf.sc, scripttempl/elfd30v.sc,
        scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
        scripttempl/v850.sc: Keep .jcr data.

Index: scripttempl/elf.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf.sc,v
retrieving revision 1.19
diff -c -p -d -r1.19 elf.sc
*** elf.sc	2001/08/09 14:25:59	1.19
--- elf.sc	2001/08/12 20:18:05
*************** SECTIONS
*** 312,317 ****
--- 312,318 ----
    ${TEXT_DYNAMIC-${DYNAMIC}}
    ${RELOCATING+${CTOR}}
    ${RELOCATING+${DTOR}}
+   .jcr : { KEEP (*(.jcr)) }
    ${DATA_PLT+${PLT}}
    ${RELOCATING+${OTHER_GOT_SYMBOLS}}
    .got		${RELOCATING-0} : { *(.got.plt) *(.got) }
Index: scripttempl/elfd30v.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfd30v.sc,v
retrieving revision 1.4
diff -c -p -d -r1.4 elfd30v.sc
*** elfd30v.sc	2000/09/02 20:43:22	1.4
--- elfd30v.sc	2001/08/12 20:18:05
*************** SECTIONS
*** 124,129 ****
--- 124,132 ----
    .eh_frame	${RELOCATING-0} : { KEEP (*(.eh_frame)) }	${RELOCATING+ > ${DATA_MEMORY}}
    .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }	${RELOCATING+ > ${DATA_MEMORY}}
  
+   /* Java class registration support.  */
+   .jcr		${RELOCATING-0} : { KEEP (*(.jcr)) }	${RELOCATING+ >${DATA_MEMORY}}
+ 
    ${RELOCATING+${CTOR}}
    ${RELOCATING+${DTOR}}
  
Index: scripttempl/elfm68hc11.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfm68hc11.sc,v
retrieving revision 1.4
diff -c -p -d -r1.4 elfm68hc11.sc
*** elfm68hc11.sc	2001/08/03 20:41:26	1.4
--- elfm68hc11.sc	2001/08/12 20:18:05
*************** SECTIONS
*** 331,337 ****
  
    .eh_frame ${RELOCATING-0} :
    {
!     *(.eh_frame)
    } ${RELOCATING+ > ${TEXT_MEMORY}}
  
    .rodata  ${RELOCATING-0} :
--- 331,337 ----
  
    .eh_frame ${RELOCATING-0} :
    {
!     KEEP (*(.eh_frame))
    } ${RELOCATING+ > ${TEXT_MEMORY}}
  
    .rodata  ${RELOCATING-0} :
*************** SECTIONS
*** 349,354 ****
--- 349,359 ----
    /* Constructor and destructor tables are in ROM.  */
    ${RELOCATING+${CTOR}}
    ${RELOCATING+${DTOR}}
+ 
+   .jcr ${RELOCATING-0} :
+   {
+     KEEP (*(.jcr))
+   } ${RELOCATING+ > ${TEXT_MEMORY}}
  
    /* Start of the data section image in ROM.  */
    ${RELOCATING+__data_image = .;}
Index: scripttempl/elfm68hc12.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfm68hc12.sc,v
retrieving revision 1.4
diff -c -p -d -r1.4 elfm68hc12.sc
*** elfm68hc12.sc	2001/08/03 20:41:26	1.4
--- elfm68hc12.sc	2001/08/12 20:18:05
*************** SECTIONS
*** 331,337 ****
  
    .eh_frame ${RELOCATING-0} :
    {
!     *(.eh_frame)
    } ${RELOCATING+ > ${TEXT_MEMORY}}
  
    .rodata  ${RELOCATING-0} :
--- 331,337 ----
  
    .eh_frame ${RELOCATING-0} :
    {
!     KEEP (*(.eh_frame))
    } ${RELOCATING+ > ${TEXT_MEMORY}}
  
    .rodata  ${RELOCATING-0} :
*************** SECTIONS
*** 349,354 ****
--- 349,359 ----
    /* Constructor and destructor tables are in ROM.  */
    ${RELOCATING+${CTOR}}
    ${RELOCATING+${DTOR}}
+ 
+   .jcr ${RELOCATING-0} :
+   {
+     KEEP (*(.jcr))
+   } ${RELOCATING+ > ${TEXT_MEMORY}}
  
    /* Start of the data section image in ROM.  */
    ${RELOCATING+__data_image = .;}
Index: scripttempl/v850.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/v850.sc,v
retrieving revision 1.4
diff -c -p -d -r1.4 v850.sc
*** v850.sc	2000/11/03 19:49:05	1.4
--- v850.sc	2001/08/12 20:18:05
*************** SECTIONS
*** 115,120 ****
--- 115,124 ----
      KEEP (*crtend.o(.dtors))
      ${CONSTRUCTING+___dtors_end = .;}
    }
+   .jcr		:
+   {
+     KEEP (*(.jcr))
+   }
  
    .got		: { *(.got.plt) *(.got) }
    .dynamic	: { *(.dynamic) }



More information about the Binutils mailing list