Mercurial > ecos
comparison packages/hal/arm/arch/current/src/arm.ld @ 66:bf00f99aec69 ecos-sw-2000-02-02
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
| author | jlarmour |
|---|---|
| date | Wed, 02 Feb 2000 19:57:02 +0000 |
| parents | c38311975d4f |
| children | 435cced73e2f |
comparison
equal
deleted
inserted
replaced
| 65:b4822dd69c33 | 66:bf00f99aec69 |
|---|---|
| 6 //============================================================================= | 6 //============================================================================= |
| 7 //####COPYRIGHTBEGIN#### | 7 //####COPYRIGHTBEGIN#### |
| 8 // | 8 // |
| 9 // ------------------------------------------- | 9 // ------------------------------------------- |
| 10 // The contents of this file are subject to the Red Hat eCos Public License | 10 // The contents of this file are subject to the Red Hat eCos Public License |
| 11 // Version 1.0 (the "License"); you may not use this file except in | 11 // Version 1.1 (the "License"); you may not use this file except in |
| 12 // compliance with the License. You may obtain a copy of the License at | 12 // compliance with the License. You may obtain a copy of the License at |
| 13 // http://sourceware.cygnus.com/ecos | 13 // http://www.redhat.com/ |
| 14 // | 14 // |
| 15 // Software distributed under the License is distributed on an | 15 // Software distributed under the License is distributed on an "AS IS" |
| 16 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | 16 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
| 17 // License for the specific language governing rights and limitations under | 17 // License for the specific language governing rights and limitations under |
| 18 // the License. | 18 // the License. |
| 19 // | 19 // |
| 20 // The Original Code is eCos - Embedded Configurable Operating System, | 20 // The Original Code is eCos - Embedded Configurable Operating System, |
| 28 // | 28 // |
| 29 //####COPYRIGHTEND#### | 29 //####COPYRIGHTEND#### |
| 30 //============================================================================= | 30 //============================================================================= |
| 31 | 31 |
| 32 #include <pkgconf/system.h> | 32 #include <pkgconf/system.h> |
| 33 | |
| 33 STARTUP(vectors.o) | 34 STARTUP(vectors.o) |
| 34 ENTRY(reset_vector) | 35 ENTRY(reset_vector) |
| 35 #ifdef EXTRAS | 36 #ifdef EXTRAS |
| 36 INPUT(extras.o) | 37 INPUT(extras.o) |
| 37 #endif | 38 #endif |
| 39 | 40 |
| 40 #if defined(__ARMEB__) | 41 #if defined(__ARMEB__) |
| 41 OUTPUT_FORMAT(elf32-bigarm) | 42 OUTPUT_FORMAT(elf32-bigarm) |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 #if defined(CYG_HAL_STARTUP_STUBS) \ | 45 #if defined(CYG_HAL_STARTUP_ROM) \ |
| 45 && defined(CYGPKG_HAL_ARM_PID) \ | 46 && defined(CYGPKG_HAL_ARM_PID) \ |
| 46 && defined(__ARMEB__) | 47 && defined(__ARMEB__) |
| 47 // Note: This is only needed when the PID board is used in BE mode without | 48 // Note: This is only needed when the PID board is used in BE mode without |
| 48 // the proper ROM controller part. | 49 // the proper ROM controller part. |
| 49 // | 50 // |
| 50 // In big-endian mode, merge .RODATA sections into the .DATA section. This | 51 // In big-endian mode, merge .RODATA sections into the .DATA section. This |
| 51 // causes the data in these sections to be copied to RAM. When the CPU | 52 // causes the data in these sections to be copied to RAM. When the CPU |
| 52 // makes byte or halfword access to RAM, A0/A1 are modified correctly. | 53 // makes byte or halfword access to RAM, A0/A1 are modified correctly. |
| 53 // This does not happen on ROM access (unless the proper ROM controller | 54 // This does not happen on ROM access (unless the proper ROM controller |
| 54 // is used). | 55 // is used). |
| 55 // | 56 // |
| 56 // This is matched in the PID stubs.ldi file which does not use the | |
| 57 // RODATA macros. | |
| 58 #define MERGE_IN_RODATA *(.rodata*) | 57 #define MERGE_IN_RODATA *(.rodata*) |
| 58 #define CYGPRI_PID_BE_WORKAROUND | |
| 59 #else | 59 #else |
| 60 // Keep RODATA in separate sections. | 60 // Keep RODATA in separate sections. |
| 61 #define MERGE_IN_RODATA | 61 #define MERGE_IN_RODATA |
| 62 #undef CYGPRI_PID_BE_WORKAROUND | |
| 62 #endif | 63 #endif |
| 63 | 64 |
| 64 #define ALIGN_LMA 4 | 65 #define ALIGN_LMA 4 |
| 65 #define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1)) | 66 #define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1)) |
| 66 #define LMA_EQ_VMA | 67 #define LMA_EQ_VMA |
| 94 #define SECTION_fini(_region_, _vma_, _lma_) \ | 95 #define SECTION_fini(_region_, _vma_, _lma_) \ |
| 95 .fini _vma_ : _lma_ \ | 96 .fini _vma_ : _lma_ \ |
| 96 { FORCE_OUTPUT; *(.fini) } \ | 97 { FORCE_OUTPUT; *(.fini) } \ |
| 97 > _region_ | 98 > _region_ |
| 98 | 99 |
| 100 #if defined(CYGPRI_PID_BE_WORKAROUND) | |
| 101 #define SECTION_rodata(_region_, _vma_, _lma_) | |
| 102 #define SECTION_rodata1(_region_, _vma_, _lma_) | |
| 103 #else | |
| 99 #define SECTION_rodata(_region_, _vma_, _lma_) \ | 104 #define SECTION_rodata(_region_, _vma_, _lma_) \ |
| 100 .rodata _vma_ : _lma_ \ | 105 .rodata _vma_ : _lma_ \ |
| 101 { FORCE_OUTPUT; *(.rodata*) } \ | 106 { FORCE_OUTPUT; *(.rodata*) } \ |
| 102 > _region_ | 107 > _region_ |
| 103 | 108 |
| 104 #define SECTION_rodata1(_region_, _vma_, _lma_) \ | 109 #define SECTION_rodata1(_region_, _vma_, _lma_) \ |
| 105 .rodata1 _vma_ : _lma_ \ | 110 .rodata1 _vma_ : _lma_ \ |
| 106 { FORCE_OUTPUT; *(.rodata1) } \ | 111 { FORCE_OUTPUT; *(.rodata1) } \ |
| 107 > _region_ | 112 > _region_ |
| 113 #endif // CYGPRI_PID_BE_WORKAROUND | |
| 108 | 114 |
| 109 #define SECTION_fixup(_region_, _vma_, _lma_) \ | 115 #define SECTION_fixup(_region_, _vma_, _lma_) \ |
| 110 .fixup _vma_ : _lma_ \ | 116 .fixup _vma_ : _lma_ \ |
| 111 { FORCE_OUTPUT; *(.fixup) } \ | 117 { FORCE_OUTPUT; *(.fixup) } \ |
| 112 > _region_ | 118 > _region_ |
