public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix for xstormy16 linker script
@ 2004-09-29 16:45 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2004-09-29 16:45 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

Hi Guys

  I am applying the attached patch to fix the linker script used by
  the xstormy16 port.  It had a problem in that the version of the
  script used when a relocatable link was being performed included
  assignments to memory regions.  This does not work for any region
  which does not include address 0, since all (relocatable) sections
  are assigned to address 0.

Cheers
  Nick

ld/ChangeLog
2004-09-29  Nick Clifton  <nickc@redhat.com>

	* scripttempl/xstormy16.sc: Only perform the assignments to the
	ROM region when not performing a relocatable link.  The ROM region
	does not start at address 0, but the sections will.
	* Makefile.am: Fix linker script dependency for the generation of
	eelf32xstormy16.c.
	* Makefile.in: Regenerate.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Fix relocatable linker script for xstormy16 --]
[-- Type: text/x-patch, Size: 3899 bytes --]

Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.159
diff -c -3 -p -r1.159 Makefile.am
*** ld/Makefile.am	17 Sep 2004 06:15:38 -0000	1.159
--- ld/Makefile.am	29 Sep 2004 16:27:02 -0000
*************** eebmon29k.c: $(srcdir)/emulparams/ebmon2
*** 600,606 ****
  	${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
  eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
    $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
!   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
  	${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
  eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
    $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
--- 600,606 ----
  	${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
  eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
    $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
!   $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
  	${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
  eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
    $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}

Index: ld/scripttempl/xstormy16.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/xstormy16.sc,v
retrieving revision 1.5
diff -c -3 -p -r1.5 xstormy16.sc
*** ld/scripttempl/xstormy16.sc	18 Apr 2003 08:26:17 -0000	1.5
--- ld/scripttempl/xstormy16.sc	29 Sep 2004 16:27:04 -0000
*************** SECTIONS
*** 152,166 ****
    ${RELOCATING+PROVIDE (end = .);}
  
    /* Read-only sections in ROM.  */
!   .int_vec     ${RELOCATING-0} : { *(.int_vec)	} > ROM
  
!   .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} } > ROM
    ${RELOCATING+${CTOR}}
    ${RELOCATING+${DTOR}}
!   .jcr : { KEEP (*(.jcr)) } > ROM
!   .eh_frame : { KEEP (*(.eh_frame)) } > ROM
!   .gcc_except_table : { *(.gcc_except_table) } > ROM
!   .plt : { *(.plt) } > ROM
  
    .text    ${RELOCATING-0} :
    {
--- 152,166 ----
    ${RELOCATING+PROVIDE (end = .);}
  
    /* Read-only sections in ROM.  */
!   .int_vec     ${RELOCATING-0} : { *(.int_vec)	} ${RELOCATING+> ROM}
  
!   .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} } ${RELOCATING+> ROM}
    ${RELOCATING+${CTOR}}
    ${RELOCATING+${DTOR}}
!   .jcr : { KEEP (*(.jcr)) } ${RELOCATING+> ROM}
!   .eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+> ROM}
!   .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+> ROM}
!   .plt : { *(.plt) } ${RELOCATING+> ROM}
  
    .text    ${RELOCATING-0} :
    {
*************** SECTIONS
*** 172,190 ****
      *(.gnu.warning)
      ${RELOCATING+*(.gnu.linkonce.t.*)}
      ${RELOCATING+${OTHER_TEXT_SECTIONS}}
!   } > ROM =${NOP-0}
    .init        ${RELOCATING-0} : 
    { 
      ${RELOCATING+${INIT_START}}
      KEEP (*(.init))
      ${RELOCATING+${INIT_END}}
!   } > ROM =${NOP-0}
    .fini    ${RELOCATING-0} :
    {
      ${RELOCATING+${FINI_START}}
      KEEP (*(.fini))
      ${RELOCATING+${FINI_END}}
!   } > ROM =${NOP-0}
    ${RELOCATING+PROVIDE (__etext = .);}
    ${RELOCATING+PROVIDE (_etext = .);}
    ${RELOCATING+PROVIDE (etext = .);}
--- 172,190 ----
      *(.gnu.warning)
      ${RELOCATING+*(.gnu.linkonce.t.*)}
      ${RELOCATING+${OTHER_TEXT_SECTIONS}}
!   } ${RELOCATING+> ROM =${NOP-0}}
    .init        ${RELOCATING-0} : 
    { 
      ${RELOCATING+${INIT_START}}
      KEEP (*(.init))
      ${RELOCATING+${INIT_END}}
!   } ${RELOCATING+> ROM =${NOP-0}}
    .fini    ${RELOCATING-0} :
    {
      ${RELOCATING+${FINI_START}}
      KEEP (*(.fini))
      ${RELOCATING+${FINI_END}}
!   } ${RELOCATING+> ROM =${NOP-0}}
    ${RELOCATING+PROVIDE (__etext = .);}
    ${RELOCATING+PROVIDE (_etext = .);}
    ${RELOCATING+PROVIDE (etext = .);}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-29 16:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-29 16:45 Fix for xstormy16 linker script Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).