public inbox for
 help / color / mirror / Atom feed
* Patch to add .eh_frame and .gcc_except_table to ELF.SC
@ 1999-03-02 15:21 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 1999-03-02 15:21 UTC (permalink / raw)
  To: bfd

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: 

RCS file: /cvs/cvsfiles/devo/ld/scripttempl/,v
retrieving revision 1.57
diff -p -r1.57
***	1999/02/25 21:21:19	1.57
---	1999/03/01 20:08:55
*************** SECTIONS
*** 171,176 ****
--- 171,178 ----
    .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+   .eh_frame : { *(.eh_frame) }
+   .gcc_except_table : { *(.gcc_except_table) }
    /* 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 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).


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

only message in thread, other threads:[~1999-03-02 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-02 15:21 Patch to add .eh_frame and .gcc_except_table to ELF.SC 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).