Back to home page

LXR

 
 

    


Warning, /bsps/m68k/gen68360/start/linkcmds is written in an unsupported language. File is not indexed.

0001 /*
0002  * This file contains GNU linker directives for a generic MC68360 board.
0003  * Variations in memory size and allocation can be made by
0004  * overriding some values with linker command-line arguments.
0005  *
0006  * Saskatchewan Accelerator Laboratory
0007  * University of Saskatchewan
0008  * Saskatoon, Saskatchewan, CANADA
0009  * eric@skatter.usask.ca
0010  */
0011 
0012 /*
0013  * Declare some sizes.
0014  * A heap size of 0 means `use all available memory for the heap'.
0015  */
0016 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
0017 RamSize = DEFINED(RamSize) ? RamSize : 64M;
0018 RamEnd = RamBase + RamSize;
0019 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
0020 
0021 /*
0022  * Declare on-board memory.
0023  */
0024 MEMORY {
0025           ram : ORIGIN = 0x00000000, LENGTH = 64M
0026           rom : ORIGIN = 0x0F000000, LENGTH = 1M
0027         dpram : ORIGIN = 0x0E000000, LENGTH = 8k
0028 }
0029 
0030 ENTRY(start)
0031 STARTUP(start.o)
0032 
0033 /*
0034  * Load objects
0035  */
0036 SECTIONS {
0037         /*
0038          * Boot PROM
0039          */
0040         rom : {
0041                 _RomBase = .;
0042         } >rom
0043 
0044         /*
0045          * Dynamic RAM
0046          */
0047         ram : {
0048                 RamBase = .;
0049         } >ram
0050 
0051         /*
0052          * Text, data and bss segments
0053          */
0054         .text : {
0055                 *(.text*)
0056 
0057                 /*
0058                  * C++ constructors/destructors
0059                  */
0060                 *(.gnu.linkonce.t.*)
0061 
0062                 /*
0063                  * Initialization and finalization code.
0064                  */
0065                 PROVIDE (_init = .);
0066                 *crti.o(.init)
0067                 *(.init)
0068                 *crtn.o(.init)
0069                 PROVIDE (_fini = .);
0070                 *crti.o(.fini)
0071                 *(.fini)
0072                 *crtn.o(.fini)
0073 
0074                 /*
0075                  * Special FreeBSD sysctl sections.
0076                  */
0077                 . = ALIGN (16);
0078                 __start_set_sysctl_set = .;
0079                 *(set_sysctl_*);
0080                 __stop_set_sysctl_set = ABSOLUTE(.);
0081                 *(set_domain_*);
0082                 *(set_pseudo_*);
0083 
0084                 /*
0085                  * C++ constructors/destructors
0086                  */
0087                 . = ALIGN (16);
0088                 *crtbegin.o(.ctors)
0089                 *(.ctors)
0090                 *crtend.o(.ctors)
0091                 *crtbegin.o(.dtors)
0092                 *(.dtors)
0093                 *crtend.o(.dtors)
0094 
0095                 /*
0096                  * Exception frame info
0097                  */
0098                 . = ALIGN (16);
0099                 *(.eh_frame)
0100 
0101                 /*
0102                  * Read-only data
0103                  */
0104                 . = ALIGN (16);
0105                 _rodata_start = . ;
0106                 *(.rodata*)
0107                 KEEP (*(SORT(.rtemsroset.*)))
0108                 *(.gnu.linkonce.r*)
0109 
0110                  . = ALIGN (16);
0111                 PROVIDE (etext = .);
0112         } >ram
0113 
0114         .tdata : {
0115                 _TLS_Data_begin = .;
0116                 *(.tdata .tdata.* .gnu.linkonce.td.*)
0117                 _TLS_Data_end = .;
0118         } >ram
0119 
0120         .tbss : {
0121                 _TLS_BSS_begin = .;
0122                 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0123                 _TLS_BSS_end = .;
0124         } >ram
0125 
0126         _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0127         _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0128         _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0129         _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0130         _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0131         _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0132 
0133         .data : {
0134                 _copy_start = .;
0135                 *(.data*)
0136                 KEEP (*(SORT(.rtemsrwset.*)))
0137                 *(.gnu.linkonce.d*)
0138                 *(.gcc_except_table*)
0139                 *(.jcr)
0140                 . = ALIGN (16);
0141                 PROVIDE (edata = .);
0142                 _copy_end = .;
0143         } >ram
0144         .bss : {
0145                 M68Kvec = .;
0146                 . += (256 * 4);
0147                 _clear_start = .;
0148                 *(.dynbss)
0149                 *(.bss* .gnu.linkonce.b.*)
0150                 *(COMMON)
0151                 . = ALIGN (16);
0152                 PROVIDE (end = .);
0153                 _clear_end = .;
0154         } >ram
0155 
0156         .noinit (NOLOAD) : {
0157                 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0158         } > ram
0159 
0160         .rtemsstack (NOLOAD) : {
0161                 *(SORT(.rtemsstack.*))
0162                 WorkAreaBase = .;
0163         } >ram
0164 
0165         /*
0166          * On-chip memory/peripherals
0167          */
0168         dpram : {
0169                 m360 = .;
0170                 . += (8 * 1024);
0171         } >dpram
0172 
0173   /* Stabs debugging sections.  */
0174   .stab 0 : { *(.stab) }
0175   .stabstr 0 : { *(.stabstr) }
0176   .stab.excl 0 : { *(.stab.excl) }
0177   .stab.exclstr 0 : { *(.stab.exclstr) }
0178   .stab.index 0 : { *(.stab.index) }
0179   .stab.indexstr 0 : { *(.stab.indexstr) }
0180   .comment 0 : { *(.comment) }
0181 
0182   /* DWARF debug sections.
0183      Symbols in the DWARF debugging sections are relative to the beginning
0184      of the section so we begin them at 0.  */
0185   /* DWARF 1 */
0186   .debug          0 : { *(.debug) }
0187   .line           0 : { *(.line) }
0188   
0189   /* GNU DWARF 1 extensions */
0190   .debug_srcinfo  0 : { *(.debug_srcinfo) }
0191   .debug_sfnames  0 : { *(.debug_sfnames) }
0192   
0193   /* DWARF 1.1 and DWARF 2 */
0194   .debug_aranges  0 : { *(.debug_aranges) }
0195   .debug_pubnames 0 : { *(.debug_pubnames) }
0196   
0197   /* DWARF 2 */
0198   .debug_info     0 : { *(.debug_info) }
0199   .debug_abbrev   0 : { *(.debug_abbrev) }
0200   .debug_line     0 : { *(.debug_line) }
0201   .debug_frame    0 : { *(.debug_frame) }
0202   .debug_str      0 : { *(.debug_str) }
0203   .debug_loc      0 : { *(.debug_loc) }
0204   .debug_macinfo  0 : { *(.debug_macinfo) }
0205   
0206   /* SGI/MIPS DWARF 2 extensions */
0207   .debug_weaknames 0 : { *(.debug_weaknames) }
0208   .debug_funcnames 0 : { *(.debug_funcnames) }
0209   .debug_typenames 0 : { *(.debug_typenames) }
0210   .debug_varnames  0 : { *(.debug_varnames) }
0211   /* These must appear regardless of  .  */
0212 
0213   /* Addition to let linker know about custom section for GDB pretty-printing support. */
0214   .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0215 }