public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Mark E." <snowball3@bigfoot.com>
To: binutils@sourceware.cygnus.com
Subject: DJGPP linker script patch r3
Date: Wed, 20 Oct 1999 07:48:00 -0000	[thread overview]
Message-ID: <10788.940430901.0@NO-ID-FOUND.mhonarc.org> (raw)

Hello again:

This revision adds support for symbols that have their own unique 
section, to allow 
for gc by the linker when --gc-sections support for COFF is added.

ld/Changelog:

1999-10-19 Mark Elbrecht <snowball3@bigfoot.com>

	* scripttempl/i386go32.sc (___EH_FRAME_BEGIN__): Delete.
	  (___EH_FRAME_END__): Delete.
	  (_etext, _end): Move the semicolon inside the brace.

	* scripttempl/i386go32.sc: Support prioritized constructors
	  and destructors.
	  Support symbols that have their own unique section.

*** scripttempl/i386go32.sc.orig	Mon Aug  9 23:07:46 1999
--- scripttempl/i386go32.sc	Tue Oct 19 23:55:02 1999
*************** EXE=${CONSTRUCTING+${RELOCATING+-exe}}
*** 5,12 ****
  
  # These are substituted in as variables in order to get '}' in a shell
  # conditional expansion.
! CTOR='.ctor : { *(.ctor) }'
! DTOR='.dtor : { *(.dtor) }'
  
  cat <<EOF
  OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
--- 5,20 ----
  
  # These are substituted in as variables in order to get '}' in a shell
  # conditional expansion.
! # Support GCC proritized constructors and destructors
! # by sorting sections starting with '.ctors.' and '.dtors.'
! CTOR='.ctor : {
!     *(SORT(.ctors.*))
!     *(.ctor)
!   }'
! DTOR='.dtor : {
!     *(SORT(.dtors.*))
!     *(.dtor)
!   }'
  
  cat <<EOF
  OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
*************** SECTIONS
*** 17,46 ****
  {
    .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} 
: {
      *(.text)
!     ${RELOCATING+*(.gnu.linkonce.t*)}
      *(.const*)
!     *(.ro*)
!     ${RELOCATING+*(.gnu.linkonce.r*)}
!     ${RELOCATING+etext  =  . ; _etext = .};
      ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
    }
    .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
      ${RELOCATING+djgpp_first_ctor = . ;
      *(.ctor)
      djgpp_last_ctor = . ;}
      ${RELOCATING+djgpp_first_dtor = . ;
      *(.dtor)
      djgpp_last_dtor = . ;}
-     *(.data)
  
      ${RELOCATING+*(.gcc_exc*)}
-     ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
      ${RELOCATING+*(.eh_fram*)}
-     ${RELOCATING+___EH_FRAME_END__ = . ;}
      ${RELOCATING+LONG(0);}
  
!     ${RELOCATING+*(.gnu.linkonce.d*)}
!     ${RELOCATING+edata  =  . ; _edata = .};
      ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
    }
    ${CONSTRUCTING+${RELOCATING-$CTOR}}
--- 25,57 ----
  {
    .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} 
: {
      *(.text)
!     *(.text.*)
      *(.const*)
!     *(.rodata)
!     *(.rodata.*)
!     ${RELOCATING+*(.gnu.linkonce.t.*)}
!     ${RELOCATING+*(.gnu.linkonce.r.*)}
!     ${RELOCATING+etext  =  . ; _etext = .;}
      ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
    }
    .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
+     *(.data)
+     *(.data.*)
      ${RELOCATING+djgpp_first_ctor = . ;
+     *(SORT(.ctors.*))
      *(.ctor)
      djgpp_last_ctor = . ;}
      ${RELOCATING+djgpp_first_dtor = . ;
+     *(SORT(.dtors.*))
      *(.dtor)
      djgpp_last_dtor = . ;}
  
      ${RELOCATING+*(.gcc_exc*)}
      ${RELOCATING+*(.eh_fram*)}
      ${RELOCATING+LONG(0);}
  
!     ${RELOCATING+*(.gnu.linkonce.d.*)}
!     ${RELOCATING+edata  =  . ; _edata = . ;}
      ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
    }
    ${CONSTRUCTING+${RELOCATING-$CTOR}}
*************** SECTIONS
*** 48,55 ****
    .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
    { 					
      *(.bss)
      *(COMMON)
!     ${RELOCATING+ end = . ; _end = .};
      ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
    }
  }
--- 59,67 ----
    .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
    { 					
      *(.bss)
+     *(.bss.*)
      *(COMMON)
!     ${RELOCATING+ end = . ; _end = . ;}
      ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
    }
  }


--- 
Mark Elbrecht, snowball3@bigfoot.com
http://snowball.frogspace.net/

             reply	other threads:[~1999-10-20  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-20  7:48 Mark E. [this message]
1999-10-20  7:48 Mark E.

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=10788.940430901.0@NO-ID-FOUND.mhonarc.org \
    --to=snowball3@bigfoot.com \
    --cc=binutils@sourceware.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).