This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ init_priority support for DJGPP


Hi folks:

Adding support for the init_priority attribute in g++ for DJGPP is just a 
matter of a relatively trivial change to the linker script:

ld/Changelog:

2000-07-11  Mark Elbrecht  <snowball3@bigfoot.com>

	* scripttempl/i386go32.sc: Support the g++ attribute init_priority in
	  gcc 2.95.2 and later.

Index: src/ld/scripttempl/i386go32.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/i386go32.sc,v
retrieving revision 1.4
diff -c -p -r1.4 i386go32.sc
*** i386go32.sc	2000/02/28 03:55:16	1.4
--- i386go32.sc	2000/07/11 19:47:11
*************** 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,18 ----
  
  # These are substituted in as variables in order to get '}' in a shell
  # conditional expansion.
! CTOR='.ctor : {
!     *(SORT(.ctors.*))
!     *(.ctor)
!   }'
! DTOR='.dtor : {
!     *(SORT(.dtors.*))
!     *(.dtor)
!   }'
  
  cat <<EOF
  OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
*************** SECTIONS
*** 26,34 ****
--- 32,42 ----
    }
    .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
      ${RELOCATING+djgpp_first_ctor = . ;
+     *(SORT(.ctors.*))
      *(.ctor)
      djgpp_last_ctor = . ;}
      ${RELOCATING+djgpp_first_dtor = . ;
+     *(SORT(.dtors.*))
      *(.dtor)
      djgpp_last_dtor = . ;}
      *(.data)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]