ARM7TDMI: add sections for exception handlers.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 1 Apr 2010 17:12:39 +0000 (17:12 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 1 Apr 2010 17:12:39 +0000 (17:12 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3376 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/arm/hw/crt_arm7tdmi.S
bertos/cpu/arm/scripts/arm7tdmi_ram.ld
bertos/cpu/arm/scripts/arm7tdmi_rom.ld

index d06b9a07cc5425963ffe057e25f3d35f51a2edb9..bf80e7e3f43cfc0c11888e7d751564bd874ee205 100644 (file)
@@ -177,7 +177,7 @@ __dummy_init:
 
         .ltorg
 
-       .section .vectors, "ax", %progbits
+       .section .exceptions, "ax", %progbits
 
 __xcpt_dummy_undef:
         b       __xcpt_dummy_undef
index 6345397ca6dd545f0e6a5b999371cb096394fe42..278256eaf60645a37b6dc1d6bb59746eae97f9b7 100644 (file)
@@ -36,7 +36,6 @@
  *
  */
 
-ENTRY(_init)
 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
 OUTPUT_ARCH(arm)
 
@@ -58,7 +57,9 @@ SECTIONS
        {
                KEEP(*(.vectors));
                . = ALIGN (4);
-               KEEP(*(.init));
+               KEEP(*(.exceptions));
+               . = ALIGN (4);
+               *(.init);
                . = ALIGN (4);
                *(.rodata .rodata.*);
                . = ALIGN (4);
@@ -73,10 +74,10 @@ SECTIONS
                *(.ctors);
                . = ALIGN(4);
                *(.dtors);
+               _etext = .;
+               PROVIDE (__etext = .);
        } > ram
 
-       _etext = .;
-       PROVIDE (__etext = .);
 
        .data : AT (_etext)
        {
index 7875df40758ae70735dac5d5a09529839508cd18..a4715b1b7533417a3fb1fdf27555adaf940ec4ed 100644 (file)
@@ -57,6 +57,8 @@ SECTIONS
        {
                KEEP(*(.vectors));
                . = ALIGN (4);
+               KEEP(*(.exceptions));
+               . = ALIGN (4);
                *(.init);
                . = ALIGN (4);
                *(.rodata .rodata.*);