summaryrefslogblamecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/eth_comm/startup/linkcmds
blob: 5b9054af9fdcbaffa09c3ad4cc4c32926b099a23 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                       





























                                                                     
                        










                                                 
                         
                                
                        
                                 
                            

                                                                            

















                                                         

                                








                          
                              

                                        
                              


                                       
                                                           






















                                                      

                                                                      

















                                                      








                                          

                

                    













                          






































                                                                          

 
/*
 *  This file contains directives for the GNU linker which are specific
 *  to the Ethernet-Comm Board
 *
 *  $Id$
 */

OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
              "elf32-powerpc")
OUTPUT_ARCH(powerpc)
 
ENTRY(start)
 
MEMORY
	{
	ram : org = 0x0, l = 4M
	dpram : org = 0xff000000, l = 16K
	canbus : org = 0xff100000, l = 12K
	flash : org = 0xfff00000, l = 512K
	}


SECTIONS
{
	.vectors :
	{
	  *(.vectors)
	} >ram

	/* 
	 * The stack will live in this area - between the vectors and
	 * the text section.
	 */
	
	.text 0x10000:
  	{
	     text.start = .;
	     *(.entry)
	     *(.entry2)
	     *(.text)
	     *(.rodata*)

             /*
              * Special FreeBSD sysctl sections.
              */
             . = ALIGN (16);
             __start_set_sysctl_set = .;
             *(set_sysctl_*);
             __stop_set_sysctl_set = ABSOLUTE(.);
             *(set_domain_*);
             *(set_pseudo_*);

             *(.eh_frame)
             *(.gnu.linkonce.r*)
	     *(.rodata1)
             *(.gnu.linkonce.t.*)
	     *(.descriptors)
             /* .gnu.warning sections are handled specially by elf32.em.  */
             *(.gnu.warning)
	     *(rom_ver)
	     etext = ALIGN(0x10);
	     _etext = .;
	
	     __CTOR_LIST__ = .;
	     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
	     *(.ctors)
	     LONG(0)
	     __CTOR_END__ = .;
	
	     __DTOR_LIST__ = .;
	     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
	     *(.dtors)
	     LONG(0)
	     __DTOR_END__ = .;
	
	     *(.lit)
	     *(.shdata)
	     _init = .; *(.init)
	     _fini = .; *(.fini)
	     _endtext = .;
	     text.end = .;
	} > ram
 
	/* R/W Data */
	.data :
	{
	  *(.data)
	  *(.data1)
          *(.gnu.linkonce.d.*)
	  PROVIDE (__SDATA_START__ = .);
	  *(.sdata)
	  *(.gnu.linkonce.s.*)
	} > ram
	
	PROVIDE (__EXCEPT_START__ = .);
	.gcc_except_table   : { *(.gcc_except_table) } >ram
	PROVIDE (__EXCEPT_END__ = .);
	__GOT_START__ = .;
	.got :
	{
	   s.got = .;
	   *(.got.plt) *(.got)
	} > ram
	__GOT_END__ = .;
	
	.got1		  : { *(.got1) 		} >ram
	PROVIDE (__GOT2_START__ = .);
	PROVIDE (_GOT2_START_ = .);
	.got2		  :  { *(.got2) 	} >ram
	PROVIDE (__GOT2_END__ = .);
	PROVIDE (_GOT2_END_ = .);
	
	PROVIDE (__FIXUP_START__ = .);
	PROVIDE (_FIXUP_START_ = .);
	.fixup	  : { *(.fixup) 	} >ram
	PROVIDE (_FIXUP_END_ = .);
	PROVIDE (__FIXUP_END__ = .);
	 
	PROVIDE (__SDATA2_START__ = .);
  	.sdata2   	  : { *(.sdata2) *(.gnu.linkonce.s2.*)	} >ram
  	.sbss2   	  : { *(.sbss2) *(.gnu.linkonce.sb2.*)	} >ram
	PROVIDE (__SBSS2_END__ = .);
	
	.sbss2   	  : { *(.sbss2) 	} >ram
	PROVIDE (__SBSS2_END__ = .);
	
	__SBSS_START__ = .;
	.bss :
	{
	  bss.start = .;
	  *(.bss) *(.sbss) *(COMMON)
	  . = ALIGN(4);
	  bss.end = .;
	} > ram
	__SBSS_END__ = .;

	bss.size = bss.end - bss.start;
	text.size = text.end - text.start;
	PROVIDE(_end = bss.end);
	/*
	 * Interrupt stack setup
	 */

	IntrStack_start = ALIGN(0x10);
	. += 0x4000;
	intrStack = .;
	PROVIDE(intrStackPtr = intrStack);
 	
        dpram : 
	{
          m8xx = .;
          _m8xx = .;
          . += (8 * 1024);
        } >dpram

	canbus :
	{
	  canbus0 = .;
	  . += (0x1000);
	  canbus1 = .;
	  . += (0x1000);
	  canbus2 = .;
	  . += (0x1000);
	} >canbus


  /* Stabs debugging sections.  */
  .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) }

  /* DWARF debug sections.
     Symbols in the DWARF debugging sections are relative to the beginning
     of the section so we begin them at 0.  */
  /* DWARF 1 */
  .debug          0 : { *(.debug) }
  .line           0 : { *(.line) }
  
  /* GNU DWARF 1 extensions */
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  
  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info) }
  .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) }
  
  /* SGI/MIPS DWARF 2 extensions */
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_varnames  0 : { *(.debug_varnames) }
  /* These must appear regardless of  .  */

}