From 5892fba52aae96798f182bc174af07c056b66260 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Sat, 29 Aug 2009 15:07:12 +0300 Subject: [PATCH] Fixed linker scripts on broken crt0.S path --- containers/posix/fs0/include/linker.lds | 2 +- containers/posix/libc2/SConscript | 8 +- .../libc2/crt/sys-userspace/arch-arm/crt0.S | 93 ------------------- containers/posix/mm0/include/linker.lds | 2 +- containers/posix/test0/include/linker.lds | 2 +- 5 files changed, 7 insertions(+), 100 deletions(-) delete mode 100644 containers/posix/libc2/crt/sys-userspace/arch-arm/crt0.S diff --git a/containers/posix/fs0/include/linker.lds b/containers/posix/fs0/include/linker.lds index d555415..fed94eb 100644 --- a/containers/posix/fs0/include/linker.lds +++ b/containers/posix/fs0/include/linker.lds @@ -26,7 +26,7 @@ SECTIONS { . = virtual_base; _start_text = .; - .text : AT (ADDR(.text) - offset) { crt0.o(.text) *(.text) } + .text : AT (ADDR(.text) - offset) { *(.text.head) *(.text) } /* rodata is needed else your strings will link at physical! */ .rodata : AT (ADDR(.rodata) - offset) { *(.rodata) } .rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) } diff --git a/containers/posix/libc2/SConscript b/containers/posix/libc2/SConscript index ff6bb81..64f3949 100644 --- a/containers/posix/libc2/SConscript +++ b/containers/posix/libc2/SConscript @@ -36,10 +36,10 @@ objects = e.StaticObject(source) Depends (objects, e['configFiles']) library = e.StaticLibrary('c-' + variant, objects) Depends (library, e['configFiles']) -runTime = e.StaticObject('crt/sys-' + variant + '/arch-' + e['ARCH'] + '/crt0.S') -Depends (runTime, e['configFiles']) +#runTime = e.StaticObject('crt/sys-' + variant + '/arch-' + e['ARCH'] + '/crt0.S') +#Depends (runTime, e['configFiles']) -result = (library, runTime) -#result = (library) +#result = (library, runTime) +result = (library) Return('result') diff --git a/containers/posix/libc2/crt/sys-userspace/arch-arm/crt0.S b/containers/posix/libc2/crt/sys-userspace/arch-arm/crt0.S deleted file mode 100644 index a1d6ae3..0000000 --- a/containers/posix/libc2/crt/sys-userspace/arch-arm/crt0.S +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Australian Public Licence B (OZPLB) - * - * Version 1-0 - * - * Copyright (c) 2004 National ICT Australia - * - * All rights reserved. - * - * Developed by: Embedded, Real-time and Operating Systems Program (ERTOS) - * National ICT Australia - * http://www.ertos.nicta.com.au - * - * Permission is granted by National ICT Australia, free of charge, to - * any person obtaining a copy of this software and any associated - * documentation files (the "Software") to deal with the Software without - * restriction, including (without limitation) the rights to use, copy, - * modify, adapt, merge, publish, distribute, communicate to the public, - * sublicense, and/or sell, lend or rent out copies of the Software, and - * to permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimers. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimers in the documentation and/or other materials provided - * with the distribution. - * - * * Neither the name of National ICT Australia, nor the names of its - * contributors, may be used to endorse or promote products derived - * from this Software without specific prior written permission. - * - * EXCEPT AS EXPRESSLY STATED IN THIS LICENCE AND TO THE FULL EXTENT - * PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED "AS-IS", AND - * NATIONAL ICT AUSTRALIA AND ITS CONTRIBUTORS MAKE NO REPRESENTATIONS, - * WARRANTIES OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - * BUT NOT LIMITED TO ANY REPRESENTATIONS, WARRANTIES OR CONDITIONS - * REGARDING THE CONTENTS OR ACCURACY OF THE SOFTWARE, OR OF TITLE, - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, - * THE ABSENCE OF LATENT OR OTHER DEFECTS, OR THE PRESENCE OR ABSENCE OF - * ERRORS, WHETHER OR NOT DISCOVERABLE. - * - * TO THE FULL EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL - * NATIONAL ICT AUSTRALIA OR ITS CONTRIBUTORS BE LIABLE ON ANY LEGAL - * THEORY (INCLUDING, WITHOUT LIMITATION, IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHERWISE) FOR ANY CLAIM, LOSS, DAMAGES OR OTHER - * LIABILITY, INCLUDING (WITHOUT LIMITATION) LOSS OF PRODUCTION OR - * OPERATION TIME, LOSS, DAMAGE OR CORRUPTION OF DATA OR RECORDS; OR LOSS - * OF ANTICIPATED SAVINGS, OPPORTUNITY, REVENUE, PROFIT OR GOODWILL, OR - * OTHER ECONOMIC LOSS; OR ANY SPECIAL, INCIDENTAL, INDIRECT, - * CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES, ARISING OUT OF OR IN - * CONNECTION WITH THIS LICENCE, THE SOFTWARE OR THE USE OF OR OTHER - * DEALINGS WITH THE SOFTWARE, EVEN IF NATIONAL ICT AUSTRALIA OR ITS - * CONTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH CLAIM, LOSS, - * DAMAGES OR OTHER LIABILITY. - * - * If applicable legislation implies representations, warranties, or - * conditions, or imposes obligations or liability on National ICT - * Australia or one of its contributors in respect of the Software that - * cannot be wholly or partly excluded, restricted or modified, the - * liability of National ICT Australia or the contributor is limited, to - * the full extent permitted by the applicable legislation, at its - * option, to: - * a. in the case of goods, any one or more of the following: - * i. the replacement of the goods or the supply of equivalent goods; - * ii. the repair of the goods; - * iii. the payment of the cost of replacing the goods or of acquiring - * equivalent goods; - * iv. the payment of the cost of having the goods repaired; or - * b. in the case of services: - * i. the supplying of the services again; or - * ii. the payment of the cost of having the services supplied again. - * - * The construction, validity and performance of this licence is governed - * by the laws in force in New South Wales, Australia. - */ - -#ifdef __thumb__ -#define bl blx -#endif - - .code 32 - .global _start; - .align; -_start: - ldr sp, =__stack - bl platform_init - bl __container_init -1: - b 1b - diff --git a/containers/posix/mm0/include/linker.lds b/containers/posix/mm0/include/linker.lds index ffd56a2..ae99198 100644 --- a/containers/posix/mm0/include/linker.lds +++ b/containers/posix/mm0/include/linker.lds @@ -25,7 +25,7 @@ SECTIONS { . = virtual_base; _start_text = .; - .text : AT (ADDR(.text) - pager_offset) { crt0.o(.text) *(.text) } + .text : AT (ADDR(.text) - pager_offset) { *(.text.head) *(.text) } /* rodata is needed else your strings will link at physical! */ .rodata : AT (ADDR(.rodata) - pager_offset) { *(.rodata) } .rodata1 : AT (ADDR(.rodata1) - pager_offset) { *(.rodata1) } diff --git a/containers/posix/test0/include/linker.lds b/containers/posix/test0/include/linker.lds index f1c0c3e..5da024e 100644 --- a/containers/posix/test0/include/linker.lds +++ b/containers/posix/test0/include/linker.lds @@ -26,7 +26,7 @@ SECTIONS { . = virtual_base; _start_text = .; - .text : AT (ADDR(.text) - offset) { crt0.o(.text) *(.text) } + .text : AT (ADDR(.text) - offset) { *(.text.head) *(.text) } /* rodata is needed else your strings will link at physical! */ .rodata : AT (ADDR(.rodata) - offset) { *(.rodata) } .rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) }