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]

d10v fix for -fdata-sections


I'm doing some work on the D10V, and I noticed there isn't complete
support for -fdata-sections, so I added it.

2001-03-07  Michael Meissner  <meissner@redhat.com>

	* scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
	with sections created by -fdata-sections.
	(.dynbss,.bss): Ditto.

*** ld/scripttempl/elfd10v.sc.~1~	Wed Mar  7 21:24:44 2001
--- ld/scripttempl/elfd10v.sc	Wed Mar  7 21:25:16 2001
*************** SECTIONS
*** 77,83 ****
--- 77,85 ----
    {
      ${RELOCATING+${TEXT_START_SYMBOLS}}
      KEEP (*(.init))
+     KEEP (*(.init.*))
      KEEP (*(.fini))
+     KEEP (*(.fini.*))
      *(.text)
      *(.text.*)
      /* .gnu.warning sections are handled specially by elf32.em.  */
*************** SECTIONS
*** 88,96 ****
    } ${RELOCATING+ >INSN} =${NOP-0}
  
    .rodata  ${RELOCATING-0} : {
!     *(.rodata) *(.gnu.linkonce.r*)
    } ${RELOCATING+ >DATA}
!   .rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+ >DATA}
  
    .data  ${RELOCATING-0} :
    {
--- 90,104 ----
    } ${RELOCATING+ >INSN} =${NOP-0}
  
    .rodata  ${RELOCATING-0} : {
!     *(.rodata)
!     *(.gnu.linkonce.r*)
!     *(.rodata.*)
    } ${RELOCATING+ >DATA}
! 
!   .rodata1 ${RELOCATING-0} : {
!     *(.rodata1)
!     *(.rodata1.*)
!    } ${RELOCATING+ >DATA}
  
    .data  ${RELOCATING-0} :
    {
*************** SECTIONS
*** 100,113 ****
      *(.gnu.linkonce.d*)
      ${CONSTRUCTING+CONSTRUCTORS}
    } ${RELOCATING+ >DATA}
!   .data1 ${RELOCATING-0} : { *(.data1) } ${RELOCATING+ >DATA}
    ${RELOCATING+${CTOR} >DATA}
    ${RELOCATING+${DTOR} >DATA}
  
    /* We want the small data sections together, so single-instruction offsets
       can access them all, and initialized data all before uninitialized, so
       we can shorten the on-disk segment size.  */
!   .sdata   ${RELOCATING-0} : { *(.sdata) } ${RELOCATING+ >DATA}
    ${RELOCATING+_edata = .;}
    ${RELOCATING+PROVIDE (edata = .);}
    ${RELOCATING+__bss_start = .;}
--- 108,130 ----
      *(.gnu.linkonce.d*)
      ${CONSTRUCTING+CONSTRUCTORS}
    } ${RELOCATING+ >DATA}
! 
!   .data1 ${RELOCATING-0} : {
!     *(.data1)
!     *(.data1.*)
!   } ${RELOCATING+ >DATA}
! 
    ${RELOCATING+${CTOR} >DATA}
    ${RELOCATING+${DTOR} >DATA}
  
    /* We want the small data sections together, so single-instruction offsets
       can access them all, and initialized data all before uninitialized, so
       we can shorten the on-disk segment size.  */
!   .sdata   ${RELOCATING-0} : {
!     *(.sdata)
!     *(.sdata.*)
!   } ${RELOCATING+ >DATA}
! 
    ${RELOCATING+_edata = .;}
    ${RELOCATING+PROVIDE (edata = .);}
    ${RELOCATING+__bss_start = .;}
*************** SECTIONS
*** 115,123 ****
--- 132,143 ----
    .bss     ${RELOCATING-0} :
    {
     *(.dynbss)
+    *(.dynbss.*)
     *(.bss)
+    *(.bss.*)
     *(COMMON)
    } ${RELOCATING+ >DATA}
+ 
    ${RELOCATING+_end = . ;}
    ${RELOCATING+PROVIDE (end = .);}

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


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