Mercurial > ecos
comparison packages/hal/powerpc/cogent/current/src/cogent.ld @ 0:3111d98ba7b3 ecos-v1_1-release
Initial commit of eCos version 1.1
| author | jlarmour |
|---|---|
| date | Tue, 11 May 1999 11:16:07 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:3111d98ba7b3 |
|---|---|
| 1 /*========================================================================== | |
| 2 // | |
| 3 // cogent.ld | |
| 4 // | |
| 5 // Linker script for Cogent/MPC860 board | |
| 6 // | |
| 7 //========================================================================== | |
| 8 //####COPYRIGHTBEGIN#### | |
| 9 // | |
| 10 // ------------------------------------------- | |
| 11 // The contents of this file are subject to the Cygnus eCos Public License | |
| 12 // Version 1.0 (the "License"); you may not use this file except in | |
| 13 // compliance with the License. You may obtain a copy of the License at | |
| 14 // http://sourceware.cygnus.com/ecos | |
| 15 // | |
| 16 // Software distributed under the License is distributed on an "AS IS" | |
| 17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| 18 // License for the specific language governing rights and limitations under | |
| 19 // the License. | |
| 20 // | |
| 21 // The Original Code is eCos - Embedded Cygnus Operating System, released | |
| 22 // September 30, 1998. | |
| 23 // | |
| 24 // The Initial Developer of the Original Code is Cygnus. Portions created | |
| 25 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved. | |
| 26 // ------------------------------------------- | |
| 27 // | |
| 28 //####COPYRIGHTEND#### | |
| 29 //========================================================================== | |
| 30 //#####DESCRIPTIONBEGIN#### | |
| 31 // | |
| 32 // Author(s): nickg | |
| 33 // Contributors:nickg | |
| 34 // Date: 1998-02-17 | |
| 35 // Purpose: Cogent Linker script | |
| 36 // Description: This script is passed to the linker to define the memory | |
| 37 // of the Cogent/MPC860 board. | |
| 38 // | |
| 39 //####DESCRIPTIONEND#### | |
| 40 // | |
| 41 //========================================================================*/ | |
| 42 STARTUP(vectors.o) | |
| 43 ENTRY(reset_vector) | |
| 44 | |
| 45 GROUP(libtarget.a libgcc.a) | |
| 46 | |
| 47 #include <pkgconf/hal.h> | |
| 48 | |
| 49 #ifdef CYG_HAL_STARTUP_ROM | |
| 50 #define LOAD_BASE 0xFFF00000 | |
| 51 #define DATA_BASE 0x00780000 // Data at top of memory so GDB | |
| 52 // doesn't trash ROM state while | |
| 53 // downloading programs. | |
| 54 #endif | |
| 55 #ifdef CYG_HAL_STARTUP_RAM | |
| 56 #define LOAD_BASE 0x00000000 | |
| 57 #define DATA_BASE | |
| 58 #endif | |
| 59 | |
| 60 // Alignment of sections must be equal to or bigger than the alignment | |
| 61 // requested by gcc (use 'objdump -h' to see these). | |
| 62 | |
| 63 SECTIONS | |
| 64 { | |
| 65 | |
| 66 /* Start of ROM */ | |
| 67 . = LOAD_BASE; | |
| 68 | |
| 69 .rom_vectors : | |
| 70 { | |
| 71 KEEP(*(.vectors)) | |
| 72 } | |
| 73 | |
| 74 /*------------------------------------------------------------*/ | |
| 75 | |
| 76 .text : | |
| 77 { | |
| 78 _stext = .; | |
| 79 *(.text*) | |
| 80 *(.gnu.warning) | |
| 81 *(.gnu.linkonce*) | |
| 82 *(.init) | |
| 83 } | |
| 84 | |
| 85 _etext = .; | |
| 86 PROVIDE (etext = .); | |
| 87 .fini : { *(.fini) } | |
| 88 .rodata1 : { *(.rodata1) } | |
| 89 .rodata : { *(.rodata*) } | |
| 90 .fixup : { *(.fixup) } | |
| 91 .gcc_except_table : { *(.gcc_except_table) } | |
| 92 | |
| 93 // __rom_data_start = __rom_ram_vectors_start + SIZEOF( .ram_vectors ); | |
| 94 __rom_data_start = ALIGN(8); | |
| 95 .data DATA_BASE : | |
| 96 AT( __rom_data_start ) | |
| 97 { | |
| 98 __ram_data_start = .; | |
| 99 *(.data*) | |
| 100 __GOT1_START__ = .; | |
| 101 *(.got1) | |
| 102 __GOT1_END__ = .; | |
| 103 /* Put .ctors and .dtors next to the .got2 section, so that the pointers | |
| 104 get relocated with -mrelocatable. */ | |
| 105 #ifdef CYG_KERNEL_USE_INIT_PRIORITY | |
| 106 . = ALIGN(8); | |
| 107 __CTOR_LIST__ = .; | |
| 108 KEEP(*(SORT(.ctors*))) | |
| 109 __CTOR_END__ = .; | |
| 110 __DTOR_LIST__ = .; | |
| 111 KEEP(*(SORT(.dtors*))) | |
| 112 __DTOR_END__ = .; | |
| 113 #else | |
| 114 __CTOR_LIST__ = .; | |
| 115 *sched.o(.ctors*) | |
| 116 *clock.o(.ctors*) | |
| 117 *thread.o(.ctors*) | |
| 118 *(.ctors*) | |
| 119 __CTOR_END__ = .; | |
| 120 __DTOR_LIST__ = .; | |
| 121 *(.dtors) | |
| 122 __DTOR_END__ = .; | |
| 123 #endif | |
| 124 __GOT2_START__ = .; | |
| 125 *(.got2) | |
| 126 __GOT2_END__ = .; | |
| 127 __GOT_START__ = .; | |
| 128 _GLOBAL_OFFSET_TABLE_ = . + 32768; | |
| 129 _SDA_BASE_ = .; | |
| 130 *(.got.plt) | |
| 131 *(.got) | |
| 132 __GOT_END__ = .; | |
| 133 *(.dynamic) | |
| 134 // We want the small data sections together, so single-instruction offsets | |
| 135 // can access them all, and initialized data all before uninitialized, so | |
| 136 // we can shorten the on-disk segment size. | |
| 137 __SDATA_START__ = .; | |
| 138 *(.sdata) | |
| 139 __SDATA2_START__ = .; | |
| 140 *(.sdata2) | |
| 141 } | |
| 142 __ram_data_end = .; | |
| 143 PROVIDE( __ram_data_end = .); | |
| 144 _edata = .; | |
| 145 PROVIDE (edata = .); | |
| 146 . = ALIGN(4); | |
| 147 __bss_start = .; | |
| 148 .sbss : | |
| 149 { | |
| 150 __SBSS_START__ = .; | |
| 151 *(.sbss) | |
| 152 __SBSS_END__ = .; | |
| 153 __SBSS2_START__ = .; | |
| 154 *(.sbss2) | |
| 155 __SBSS2_END__ = .; | |
| 156 *(.scommon) | |
| 157 } | |
| 158 . = ALIGN(8); | |
| 159 .bss : | |
| 160 { | |
| 161 *(.scommon) | |
| 162 *(.dynbss) | |
| 163 *(.bss) | |
| 164 *(COMMON) | |
| 165 } | |
| 166 . = ALIGN(4); | |
| 167 _end = . ; | |
| 168 PROVIDE (end = .); | |
| 169 | |
| 170 } |
