This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

RE: Section (.sdata2) being omitted but SIZEOF(.sdata2) is not zero?


> Care to post your full linker script?

Maybe I should be embarrassed to post this, but hey, I didn't write it, so I'm not taking the blame :-)

OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
OUTPUT_ARCH("powerpc")
MEMORY
{
  ram : ORIGIN = 0x1640000,
    LENGTH = 0x08000000 -0x1640000
}
SECTIONS
{
 .header :
 {
    KEEP (*(.header))
    . = (. + 63) & ~ 63;
 } > ram
 .text :
 {
    *(.text)
    *(.text.*)
    *(.stub)
    *(.oscode)
    *(oscode)
    *(.init)
    *(.init*)
    *(.fini)
    *(.fini*)
    *(.gnu.warning)
     *(.gnu.linkonce.t.*)
    *(.eini)
    *(.rdata)
    *(.rodata)
    *(.rodata.*)
    *(.rosdata)
      __CTOR_LIST__ = .;
      KEEP(*(.ctors))
      *(SORT(.ctors.*))
       __CTOR_END__ = .;
      __DTOR_LIST__ = .;
      KEEP(*(.dtors))
      *(SORT(.dtors.*))
      __DTOR_END__ = .;
      __EH_FRAME_BEGIN__ = .;
      KEEP(*(.eh_frame))
      LONG(0)
      __EH_FRAME_END__ = .;
 } > ram
 .sdata2 :
 {
           __start_of_sdata2 = ABSOLUTE(.);
    PROVIDE (_SDA2_BASE_ = .);
    *(.sdata2)
    *(.sdata2.*)
     *(.gnu.linkonce.s2.*)
    *(.sbss2)
    *(.sbss2.*)
    *(.gnu.linkonce.sb2.*)
    __end_of_sdata2 = ABSOLUTE(.);
    . = (. + 3) & ~ 3;
    . = ((__end_of_sdata2 + 4095) & ~ 4095) - __start_of_sdata2 ;
/*    . = 0x200; */
 } > ram
 .data :
 {
  *(oseidata)
         *(.oseidata)
         *(osvars)
   *(oseudata)
   *(.oseudata)
   *(zerovars)
   *(.lmcon)
   *(.data)
   *(.data.*)
   *(.gnu.linkonce.d.*)
   *(.gnu.linkonce.r.*)
   SORT(CONSTRUCTORS)
 } > ram
 .sdata :
 {
   PROVIDE (_SDA_BASE_ = .);
   *(.sdata)
   *(.sdata.*)
   *(.gnu.linkonce.s.*)
 } > ram
 .params :
 {
    KEEP(*(.params))
 } > ram
 .rpdoutreloc :
 {
  . =( . + ((SIZEOF(.params) + 511) & ~ 511));
  *(.rpdoutreloc)
  . = (. + 3) & ~ 3;
 } > ram
 .rpdoutsymb :
 {
  __start_of_rpdoutsymb = ABSOLUTE(.);
  *(.rpdoutsymb)
  __end_of_rpdoutsymb = ABSOLUTE(.);
  . = (( __end_of_rpdoutsymb + 36 + 4095) & ~ 4095) - 36 - __start_of_rpdoutsymb;
 } > ram
 .tail :
 {
  KEEP(*(.tail))
 } > ram
 .sbss :
 {
  *(.sbss)
   *(.sbss.*)
   *(.scommon)
   *(.gnu.linkonce.sb.*)
 } > ram
 .bss :
 {
  *(.osvars)
  *(ospool)
   *(.ospool)
  *(crtstack)
  *(novram)
  *(.novram)
   *(.bss)
   *(.bss.*)
   *(COMON)
  *(COMMON)
   *(.gnu.linkonce.b.*)
 } > ram
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
   .stab.excl 0 : { *(.stab.excl) }
   .stab.exclstr 0 : { *(.stab.exclstr) }
   .stab.index 0 : { *(.stab.index) }
   .stab.indexstr 0 : { *(.stab.indexstr) }
   .comment 0 : { *(.comment) }
   .debug 0 : { *(.debug) }
   .line 0 : { *(.line) }
   .debug_srcinfo 0 : { *(.debug_srcinfo) }
   .debug_sfnames 0 : { *(.debug_sfnames) }
   .debug_aranges 0 : { *(.debug_aranges) }
   .debug_pubnames 0 : { *(.debug_pubnames) }
   .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
   .debug_abbrev 0 : { *(.debug_abbrev) }
   .debug_line 0 : { *(.debug_line) }
   .debug_frame 0 : { *(.debug_frame) }
   .debug_str 0 : { *(.debug_str) }
   .debug_loc 0 : { *(.debug_loc) }
   .debug_macinfo 0 : { *(.debug_macinfo) }
   .debug_weaknames 0 : { *(.debug_weaknames) }
   .debug_funcnames 0 : { *(.debug_funcnames) }
   .debug_typenames 0 : { *(.debug_typenames) }
   .debug_varnames 0 : { *(.debug_varnames) }
}
__RPDOUT_ADDR = ADDR(.header);
__ENTRY_POINT = _start - ADDR(.header);
__CODE_START = ADDR(.text);
__CODE_SIZE = SIZEOF(.text) + SIZEOF(.sdata2);
__DATA_START = ADDR(.data) ;
__DATA_SIZE = __DATA_END - __DATA_START;
__BSS_SIZE = __BSS_END - __BSS_START;
__NOVRAM_SIZE = 0;
__PARAM_AREA_SIZE = SIZEOF(.params) + ((SIZEOF(.params) + 511) & ~ 511);
__RELOC_AREA_SIZE = SIZEOF(.rpdoutreloc) - ((SIZEOF(.params) + 511) & ~ 511);
__SYMB_AREA_SIZE = SIZEOF(.rpdoutsymb);
__FILE_SIZE = SIZEOF(.header) + __CODE_SIZE + __DATA_SIZE +
       SIZEOF(.params) + SIZEOF(.rpdoutreloc) + SIZEOF(.rpdoutsymb) +
       SIZEOF(.tail);
__PS_VOLUME = ((__FILE_SIZE / 512) >> 8) | (((__FILE_SIZE / 512) << 8) & 0xff00);
__DATA_BSS_511 = __DATA_SIZE + __BSS_SIZE + 511;
__DS_VOLUME = ((__DATA_BSS_511 / 512) >> 8) | (((__DATA_BSS_511 / 512) << 8) & 0xff00);
__PS_AND_DS_VOLUME = ((__PS_VOLUME << 16) | __DS_VOLUME);
__DATA_RAM = ADDR(.data);
__DATA_END = ADDR(.sdata)+SIZEOF(.sdata);
__BSS_START = ADDR(.sbss);
__BSS_END = ADDR(.bss)+SIZEOF(.bss);
__DATA_ROM = ADDR(.sdata2)+SIZEOF(.sdata2);

--Doug



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