From: Joern Rennecke <joern.rennecke@superh.com>
To: Jason Thorpe <thorpej@wasabisystems.com>
Cc: binutils@sources.redhat.com
Subject: stack allocation for sh64-elf
Date: Mon, 30 Jun 2003 15:03:00 -0000 [thread overview]
Message-ID: <3F00513C.29BF22@superh.com> (raw)
[-- 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)
! }
! "
reply other threads:[~2003-06-30 15:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F00513C.29BF22@superh.com \
--to=joern.rennecke@superh.com \
--cc=binutils@sources.redhat.com \
--cc=thorpej@wasabisystems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).