From: Nick Clifton <nickc@cygnus.com>
To: bfd@cygnus.com
Subject: Patch to add .eh_frame and .gcc_except_table to ELF.SC
Date: Tue, 02 Mar 1999 15:21:00 -0000 [thread overview]
Message-ID: <199903022321.PAA15656@elmo.cygnus.com> (raw)
Hi Guys,
[This is a resend to a wider audience].
Does anyone have any comments to my applying the following patch to
the default ELF linker script:
Index: elf.sc
===================================================================
RCS file: /cvs/cvsfiles/devo/ld/scripttempl/elf.sc,v
retrieving revision 1.57
diff -p -r1.57 elf.sc
*** elf.sc 1999/02/25 21:21:19 1.57
--- elf.sc 1999/03/01 20:08:55
*************** SECTIONS
*** 171,176 ****
--- 171,178 ----
${RELOCATING+*(.gnu.linkonce.r*)}
}
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ .eh_frame : { *(.eh_frame) }
+ .gcc_except_table : { *(.gcc_except_table) }
${RELOCATING+${OTHER_READONLY_SECTIONS}}
/* Adjust the address for the data segment. We want to adjust up to
The purpose of the patch is to explicitly add the .eh_frame and
.gcc_except_table sections to the linker script, rather than
allowing them to be orphans and just tagged onto the end of the
executable's image. The reason this is necessary is that some ports
use the symbol '_end' as the start of allocatable memory for use by
malloc, via a system call to _sbrk(). Unfortunately orphan sections
are append after the location assigned by the elf.sc script to
'_end' and so they get stompped on by whomever uses the results of a
call to malloc. (Creating a new symbol to be placed at the end of
the linker script, after the OTHER_SECTIONS, would not work because
then there would be now way to specify a 'stack' symbol which starts
in high memory and grows downwards into the area being used by
'_end' for mallocs).
Cheers
Nick
reply other threads:[~1999-03-02 15:21 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=199903022321.PAA15656@elmo.cygnus.com \
--to=nickc@cygnus.com \
--cc=bfd@cygnus.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).