Back to home page

LXR

 
 

    


Warning, /bsps/m68k/gen68360/start/linkcmds.bootp 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  * These linker directives are for producing a bootstrap PROM version.
0007  * The data segment is placed at the end of the text segment in the PROM.
0008  * The start-up code takes care of copying this region to RAM.
0009  *
0010  * Saskatchewan Accelerator Laboratory
0011  * University of Saskatchewan
0012  * Saskatoon, Saskatchewan, CANADA
0013  * eric@skatter.usask.ca
0014  */
0015 
0016 /*
0017  * Declare some sizes.
0018  * A heap size of 0 means `use all available memory for the heap'.
0019  */
0020 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
0021 RamSize = DEFINED(RamSize) ? RamSize : 64M;
0022 RamEnd = RamBase + RamSize;
0023 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
0024 
0025 /*
0026  * Declare on-board memory.
0027  */
0028 MEMORY {
0029           ram : ORIGIN = 0x00000000, LENGTH = 64M
0030         myram : ORIGIN = 16M-400k,   LENGTH = 400k
0031           rom : ORIGIN = 0x0F000000, LENGTH = 1M
0032         dpram : ORIGIN = 0x0E000000, LENGTH = 8k
0033 }
0034 
0035 /*
0036  * Load objects
0037  */
0038 SECTIONS {
0039         /*
0040          * Boot PROM
0041          */
0042         rom : {
0043                 _RomBase = .;
0044         } >rom
0045 
0046         /*
0047          * Dynamic RAM
0048          */
0049         ram : {
0050                 RamBase = .;
0051         } >ram
0052 
0053         /*
0054          * Text, data and bss segments
0055          */
0056         .text : AT(0x0) {
0057                 *(.text*)
0058 
0059                 /*
0060                  * C++ constructors/destructors
0061                  */
0062                 *(.gnu.linkonce.t.*)
0063 
0064                 /*
0065                  * Initialization and finalization code.
0066                  */
0067                 PROVIDE (_init = .);
0068                 *crti.o(.init)
0069                 *(.init)
0070                 *crtn.o(.init)
0071                 PROVIDE (_fini = .);
0072                 *crti.o(.fini)
0073                 *(.fini)
0074                 *crtn.o(.fini)
0075 
0076                 /*
0077                  * Special FreeBSD sysctl sections.
0078                  */
0079                 . = ALIGN (16);
0080                 __start_set_sysctl_set = .;
0081                 *(set_sysctl_*);
0082                 __stop_set_sysctl_set = ABSOLUTE(.);
0083                 *(set_domain_*);
0084                 *(set_pseudo_*);
0085 
0086                 /*
0087                  * C++ constructors/destructors
0088                  */
0089                 . = ALIGN (16);
0090                 *crtbegin.o(.ctors)
0091                 *(.ctors)
0092                 *crtend.o(.ctors)
0093                 *crtbegin.o(.dtors)
0094                 *(.dtors)
0095                 *crtend.o(.dtors)
0096 
0097                 /*
0098                  * Exception frame info
0099                  */
0100                 . = ALIGN (16);
0101                 *(.eh_frame)
0102 
0103                 /*
0104                  * Read-only data
0105                  */
0106                 . = ALIGN (16);
0107                 _rodata_start = . ;
0108                 *(.rodata*)
0109                 KEEP (*(SORT(.rtemsroset.*)))
0110                 *(.gnu.linkonce.r*)
0111 
0112                  . = ALIGN (16);
0113                 PROVIDE (etext = .);
0114         } >rom
0115 
0116         .tdata : {
0117                 _TLS_Data_begin = .;
0118                 *(.tdata .tdata.* .gnu.linkonce.td.*)
0119                 _TLS_Data_end = .;
0120         } >rom
0121 
0122         .tbss : {
0123                 _TLS_BSS_begin = .;
0124                 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0125                 _TLS_BSS_end = .;
0126         } >rom
0127 
0128         _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0129         _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0130         _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0131         _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0132         _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0133         _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0134 
0135         .data : AT(SIZEOF(.text)) {
0136                 _copy_start = .;
0137                 *(.data)
0138                 KEEP (*(SORT(.rtemsrwset.*)))
0139                 *(.gnu.linkonce.d*)
0140                 *(.jcr)
0141                 *(.gcc_except_table*)
0142                 . = ALIGN (16);
0143                 PROVIDE (edata = .);
0144                 _copy_end = .;
0145         } >myram
0146         .bss : {
0147                 M68Kvec = .;
0148                 . += (256 * 4);
0149                 _clear_start = .;
0150                 *(.dynbss)
0151                 *(.bss* .gnu.linkonce.b.*)
0152                 *(COMMON)
0153                 . = ALIGN (16);
0154                 PROVIDE (end = .);
0155                 _clear_end = .;
0156         } >myram
0157 
0158         .noinit (NOLOAD) : {
0159                 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0160         } >mvram
0161 
0162         .rtemsstack (NOLOAD) : {
0163                 *(SORT(.rtemsstack.*))
0164                 WorkAreaBase = .;
0165         } >myram
0166 
0167         /*
0168          * On-chip memory/peripherals
0169          */
0170         dpram : {
0171                 m360 = .;
0172                 . += (8 * 1024);
0173         } >dpram
0174 }