public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* stack allocation for sh64-elf
@ 2003-06-30 15:03 Joern Rennecke
  0 siblings, 0 replies; only message in thread
From: Joern Rennecke @ 2003-06-30 15:03 UTC (permalink / raw)
  To: Jason Thorpe; +Cc: binutils

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

I've found that a lot of c++ tests fail due to a lack of memory.
Half a megabyte is find for fine for a lot of C programs, but
anything linked against libstdc++-v3 with all its constructors
and destructors that pull in automatically large parts of the
library is just to bulky.  Therefore, I want to make the stack
allocation configurable, like for sh-elf, with the attached patch.
I'm not sure if this will require a change for netbsd as well.

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658

[-- Attachment #2: ld-param-diff --]
[-- Type: text/plain, Size: 2684 bytes --]

Index: emulparams/shelf32.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shelf32.sh,v
retrieving revision 1.2
diff -p -r1.2 shelf32.sh
*** emulparams/shelf32.sh	17 Apr 2002 19:31:49 -0000	1.2
--- emulparams/shelf32.sh	30 Jun 2003 14:58:54 -0000
***************
*** 3,9 ****
  SCRIPT_NAME=elf
  OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"}
  TEXT_START_ADDR=0x1000
- STACK_ADDR='ALIGN (0x40000) + 0x40000'
  MAXPAGESIZE=128
  ARCH=sh
  MACHINE=sh5
--- 3,8 ----
*************** DTOR_END='___dtors_end = .;'
*** 34,42 ****
  # Do not use the varname=${varname-'string'} construct here; there are
  # problems with that on some shells (e.g. on Solaris) where there is a bug
  # that trigs when $varname contains a "}".
! OTHER_SECTIONS='
   .cranges 0 : { *(.cranges) }
! '
  
  # We need to adjust sizes in the .cranges section after relaxation, so
  # we need an after_allocation function, and it goes in this file.
--- 33,53 ----
  # Do not use the varname=${varname-'string'} construct here; there are
  # problems with that on some shells (e.g. on Solaris) where there is a bug
  # that trigs when $varname contains a "}".
! # The effect of the .stack definition is like setting STACK_ADDR to 0x80000,
! # except that the setting can be overridden, e.g. --defsym _stack=0x0f00,
! # and that we put an extra sentinal value at the bottom.
! # N.B. We can't use PROVIDE to set the default value in a symbol because
! # the address is needed to place the .stack section, which in turn is needed
! # to hold the sentinel value(s).
! OTHER_SECTIONS="
!  .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x40000)} :
!   {
!     ${RELOCATING+_stack = .;}
!     *(.stack)
!     LONG(0xdeaddead)
!   }
   .cranges 0 : { *(.cranges) }
! "
  
  # We need to adjust sizes in the .cranges section after relaxation, so
  # we need an after_allocation function, and it goes in this file.
Index: emulparams/shelf64.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shelf64.sh,v
retrieving revision 1.1
diff -p -r1.1 shelf64.sh
*** emulparams/shelf64.sh	8 Feb 2002 06:38:59 -0000	1.1
--- emulparams/shelf64.sh	30 Jun 2003 14:58:54 -0000
*************** EXTRA_EM_FILE=
*** 6,9 ****
  . ${srcdir}/emulparams/shelf32.sh
  
  # We do not need .cranges
! OTHER_SECTIONS=''
--- 6,16 ----
  . ${srcdir}/emulparams/shelf32.sh
  
  # We do not need .cranges
! OTHER_SECTIONS="
!  .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x40000)} :
!   {
!     ${RELOCATING+_stack = .;}
!     *(.stack)
!     LONG(0xdeaddead)
!   }
! "

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

only message in thread, other threads:[~2003-06-30 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-30 15:03 stack allocation for sh64-elf Joern Rennecke

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).