]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
The hi_cpu2 board ldscripts modified to allow ELF build.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 11 Jan 2009 14:21:05 +0000 (15:21 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Tue, 16 Nov 2010 15:54:52 +0000 (16:54 +0100)
The COFF is no longer supported by GCC for H8S MCUs.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
board/h8300/hi_cpu2/libs/hi_cpu2.ld-bload
board/h8300/hi_cpu2/libs/hi_cpu2.ld-boot
board/h8300/hi_cpu2/libs/hi_cpu2.ld-cfg
board/h8300/hi_cpu2/libs/hi_cpu2.ld-flash
board/h8300/hi_cpu2/libs/hi_cpu2.ld-flashnoram
board/h8300/hi_cpu2/libs/hi_cpu2.ld-ram

index 7a85af25490261e4a5f4f283de2b4ef245eeb8de..970be309b0f0b03eaf164c17c72ab3e57a698695 100644 (file)
@@ -64,13 +64,41 @@ SECTIONS
          _end =  ALIGN( 0x4 ) ; ;
        } > bloader
        
-       .stab  0 (NOLOAD) : 
-       {
-         [ .stab ]
-       }
-
-       .stabstr  0 (NOLOAD) :
-       {
-         [ .stabstr ]
-       }
+       /* Stabs debugging sections.  */
+       .stab          0 (NOLOAD): { *(.stab) }
+       .stabstr       0 (NOLOAD): { *(.stabstr) }
+       .stab.excl     0 (NOLOAD): { *(.stab.excl) }
+       .stab.exclstr  0 (NOLOAD): { *(.stab.exclstr) }
+       .stab.index    0 (NOLOAD): { *(.stab.index) }
+       .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) }
+       .comment       0 (NOLOAD): { *(.comment) }
+       /* DWARF debug sections.
+          Symbols in the DWARF debugging sections are relative to the beginning
+          of the section so we begin them at 0.  */
+       /* DWARF 1 */
+       .debug          0 (NOLOAD): { *(.debug) }
+       .line           0 (NOLOAD): { *(.line) }
+       /* GNU DWARF 1 extensions */
+       .debug_srcinfo  0 (NOLOAD): { *(.debug_srcinfo) }
+       .debug_sfnames  0 (NOLOAD): { *(.debug_sfnames) }
+       /* DWARF 1.1 and DWARF 2 */
+       .debug_aranges  0 (NOLOAD): { *(.debug_aranges) }
+       .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) }
+       /* DWARF 2 */
+       .debug_info     0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) }
+       .debug_abbrev   0 (NOLOAD): { *(.debug_abbrev) }
+       .debug_line     0 (NOLOAD): { *(.debug_line) }
+       .debug_frame    0 (NOLOAD): { *(.debug_frame) }
+       .debug_str      0 (NOLOAD): { *(.debug_str) }
+       .debug_loc      0 (NOLOAD): { *(.debug_loc) }
+       .debug_macinfo  0 (NOLOAD): { *(.debug_macinfo) }
+       /* SGI/MIPS DWARF 2 extensions */
+       .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) }
+       .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) }
+       .debug_typenames 0 (NOLOAD): { *(.debug_typenames) }
+       .debug_varnames  0 (NOLOAD): { *(.debug_varnames) }
+       /* DWARF 3 */
+       .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) }
+       .debug_ranges   0 (NOLOAD): { *(.debug_ranges) }
+       .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) }
 }
index 6317b96b443c92fee4597e60f83d2a8a4950ebf7..28fe36e1269efd8334ea8ba4d0cb6e08007e8f21 100644 (file)
@@ -34,8 +34,8 @@ SECTIONS
          KEEP (*boot_fn.o(.rodata))
          . = ALIGN( 4 ) ;
          ___boot_fn_end = ALIGN( 0x4 ) ;
-          *(.text)
-         *(.rodata)                            
+          *(.text .stub .text.* .gnu.linkonce.t.*)
+         *(.rodata .rodata.* .gnu.linkonce.r.*)
          _etext = ALIGN( 0x4 ) ;
         } > flashbb
 
@@ -76,13 +76,41 @@ SECTIONS
          _usrprog_start = . ;
        } > flashusr
 
-       .stab  0 (NOLOAD) : 
-       {
-         [ .stab ]
-       }
-
-       .stabstr  0 (NOLOAD) :
-       {
-         [ .stabstr ]
-       }
+       /* Stabs debugging sections.  */
+       .stab          0 (NOLOAD): { *(.stab) }
+       .stabstr       0 (NOLOAD): { *(.stabstr) }
+       .stab.excl     0 (NOLOAD): { *(.stab.excl) }
+       .stab.exclstr  0 (NOLOAD): { *(.stab.exclstr) }
+       .stab.index    0 (NOLOAD): { *(.stab.index) }
+       .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) }
+       .comment       0 (NOLOAD): { *(.comment) }
+       /* DWARF debug sections.
+          Symbols in the DWARF debugging sections are relative to the beginning
+          of the section so we begin them at 0.  */
+       /* DWARF 1 */
+       .debug          0 (NOLOAD): { *(.debug) }
+       .line           0 (NOLOAD): { *(.line) }
+       /* GNU DWARF 1 extensions */
+       .debug_srcinfo  0 (NOLOAD): { *(.debug_srcinfo) }
+       .debug_sfnames  0 (NOLOAD): { *(.debug_sfnames) }
+       /* DWARF 1.1 and DWARF 2 */
+       .debug_aranges  0 (NOLOAD): { *(.debug_aranges) }
+       .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) }
+       /* DWARF 2 */
+       .debug_info     0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) }
+       .debug_abbrev   0 (NOLOAD): { *(.debug_abbrev) }
+       .debug_line     0 (NOLOAD): { *(.debug_line) }
+       .debug_frame    0 (NOLOAD): { *(.debug_frame) }
+       .debug_str      0 (NOLOAD): { *(.debug_str) }
+       .debug_loc      0 (NOLOAD): { *(.debug_loc) }
+       .debug_macinfo  0 (NOLOAD): { *(.debug_macinfo) }
+       /* SGI/MIPS DWARF 2 extensions */
+       .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) }
+       .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) }
+       .debug_typenames 0 (NOLOAD): { *(.debug_typenames) }
+       .debug_varnames  0 (NOLOAD): { *(.debug_varnames) }
+       /* DWARF 3 */
+       .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) }
+       .debug_ranges   0 (NOLOAD): { *(.debug_ranges) }
+       .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) }
 }
index 844777892eb126f173817a03f2f559e01dbb6b22..38bb313dc4d6a907cebaf4fcdce1b33a54ecdba4 100644 (file)
@@ -1,6 +1,8 @@
 /* memory ranges configuration for ID_CPU1 board */
 
-OUTPUT_FORMAT("coff-h8300")
+/* Do not enforce any output format to allow both COFF and ELF builds */
+/* OUTPUT_FORMAT("coff-h8300") */
+/* OUTPUT_FORMAT("elf32-h8300") */
 OUTPUT_ARCH(h8300s)
 
        __flash_base    = 0x000000 ;
index 98ef3db5eab23277f90fbdd589013f8a56f2f016..9e60f2af3664e036db92693c4c556355281d396b 100644 (file)
@@ -24,8 +24,8 @@ SECTIONS
          KEEP (*boot_fn.o(.rodata))
          . = ALIGN( 4 ) ;
          ___boot_fn_end = ALIGN( 0x4 ) ;
-         *(.text)
-         *(.rodata)
+         *(.text .stub .text.* .gnu.linkonce.t.*)
+         *(.rodata .rodata.* .gnu.linkonce.r.*)
          . = ALIGN( 4 ) ;
          ___nls_str_start = ALIGN( 0x4 ) ;
          *(.nls_str)                           
@@ -82,13 +82,41 @@ SECTIONS
          *(.eight)
        }  > eight
 
-       .stab  0 (NOLOAD) : 
-       {
-         [ .stab ]
-       }
-
-       .stabstr  0 (NOLOAD) :
-       {
-         [ .stabstr ]
-       }
+       /* Stabs debugging sections.  */
+       .stab          0 (NOLOAD): { *(.stab) }
+       .stabstr       0 (NOLOAD): { *(.stabstr) }
+       .stab.excl     0 (NOLOAD): { *(.stab.excl) }
+       .stab.exclstr  0 (NOLOAD): { *(.stab.exclstr) }
+       .stab.index    0 (NOLOAD): { *(.stab.index) }
+       .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) }
+       .comment       0 (NOLOAD): { *(.comment) }
+       /* DWARF debug sections.
+          Symbols in the DWARF debugging sections are relative to the beginning
+          of the section so we begin them at 0.  */
+       /* DWARF 1 */
+       .debug          0 (NOLOAD): { *(.debug) }
+       .line           0 (NOLOAD): { *(.line) }
+       /* GNU DWARF 1 extensions */
+       .debug_srcinfo  0 (NOLOAD): { *(.debug_srcinfo) }
+       .debug_sfnames  0 (NOLOAD): { *(.debug_sfnames) }
+       /* DWARF 1.1 and DWARF 2 */
+       .debug_aranges  0 (NOLOAD): { *(.debug_aranges) }
+       .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) }
+       /* DWARF 2 */
+       .debug_info     0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) }
+       .debug_abbrev   0 (NOLOAD): { *(.debug_abbrev) }
+       .debug_line     0 (NOLOAD): { *(.debug_line) }
+       .debug_frame    0 (NOLOAD): { *(.debug_frame) }
+       .debug_str      0 (NOLOAD): { *(.debug_str) }
+       .debug_loc      0 (NOLOAD): { *(.debug_loc) }
+       .debug_macinfo  0 (NOLOAD): { *(.debug_macinfo) }
+       /* SGI/MIPS DWARF 2 extensions */
+       .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) }
+       .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) }
+       .debug_typenames 0 (NOLOAD): { *(.debug_typenames) }
+       .debug_varnames  0 (NOLOAD): { *(.debug_varnames) }
+       /* DWARF 3 */
+       .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) }
+       .debug_ranges   0 (NOLOAD): { *(.debug_ranges) }
+       .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) }
 }
index a973b2cfa4355b586566b2c8b5dca06fe0b67716..eaa905dc0834299f676601afacf97fdff3708ffe 100644 (file)
@@ -25,8 +25,8 @@ SECTIONS
          KEEP (*boot_fn.o(.rodata))
          . = ALIGN( 4 ) ;
          ___boot_fn_end = ALIGN( 0x4 ) ;
-         *(.text)
-         *(.rodata)
+         *(.text .stub .text.* .gnu.linkonce.t.*)
+         *(.rodata .rodata.* .gnu.linkonce.r.*)
          . = ALIGN( 4 ) ;
          ___nls_str_start = ALIGN( 0x4 ) ;
          *(.nls_str)                           
@@ -83,13 +83,41 @@ SECTIONS
          *(.eight)
        }  > eight
 
-       .stab  0 (NOLOAD) : 
-       {
-         [ .stab ]
-       }
-
-       .stabstr  0 (NOLOAD) :
-       {
-         [ .stabstr ]
-       }
+       /* Stabs debugging sections.  */
+       .stab          0 (NOLOAD): { *(.stab) }
+       .stabstr       0 (NOLOAD): { *(.stabstr) }
+       .stab.excl     0 (NOLOAD): { *(.stab.excl) }
+       .stab.exclstr  0 (NOLOAD): { *(.stab.exclstr) }
+       .stab.index    0 (NOLOAD): { *(.stab.index) }
+       .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) }
+       .comment       0 (NOLOAD): { *(.comment) }
+       /* DWARF debug sections.
+          Symbols in the DWARF debugging sections are relative to the beginning
+          of the section so we begin them at 0.  */
+       /* DWARF 1 */
+       .debug          0 (NOLOAD): { *(.debug) }
+       .line           0 (NOLOAD): { *(.line) }
+       /* GNU DWARF 1 extensions */
+       .debug_srcinfo  0 (NOLOAD): { *(.debug_srcinfo) }
+       .debug_sfnames  0 (NOLOAD): { *(.debug_sfnames) }
+       /* DWARF 1.1 and DWARF 2 */
+       .debug_aranges  0 (NOLOAD): { *(.debug_aranges) }
+       .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) }
+       /* DWARF 2 */
+       .debug_info     0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) }
+       .debug_abbrev   0 (NOLOAD): { *(.debug_abbrev) }
+       .debug_line     0 (NOLOAD): { *(.debug_line) }
+       .debug_frame    0 (NOLOAD): { *(.debug_frame) }
+       .debug_str      0 (NOLOAD): { *(.debug_str) }
+       .debug_loc      0 (NOLOAD): { *(.debug_loc) }
+       .debug_macinfo  0 (NOLOAD): { *(.debug_macinfo) }
+       /* SGI/MIPS DWARF 2 extensions */
+       .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) }
+       .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) }
+       .debug_typenames 0 (NOLOAD): { *(.debug_typenames) }
+       .debug_varnames  0 (NOLOAD): { *(.debug_varnames) }
+       /* DWARF 3 */
+       .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) }
+       .debug_ranges   0 (NOLOAD): { *(.debug_ranges) }
+       .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) }
 }
index f8787d16a72b94472f94d4d09e56026bc0b4879e..b81d798fa670e3957eb32d6ff09cc5a181021699 100644 (file)
@@ -26,8 +26,8 @@ SECTIONS
          KEEP (*boot_fn.o(.rodata))
          . = ALIGN( 4 ) ;
          ___boot_fn_end = ALIGN( 0x4 ) ;
-         *(.text)
-         *(.rodata)    
+         *(.text .stub .text.* .gnu.linkonce.t.*)
+         *(.rodata .rodata.* .gnu.linkonce.r.*)
          . = ALIGN( 4 ) ;
          ___nls_str_start = ALIGN( 0x4 ) ;
          *(.nls_str)                           
@@ -83,13 +83,41 @@ SECTIONS
          *(.eight)
        }  > eight
 
-       .stab  0 (NOLOAD) : 
-       {
-         [ .stab ]
-       }
-
-       .stabstr  0 (NOLOAD) :
-       {
-         [ .stabstr ]
-       }
+       /* Stabs debugging sections.  */
+       .stab          0 (NOLOAD): { *(.stab) }
+       .stabstr       0 (NOLOAD): { *(.stabstr) }
+       .stab.excl     0 (NOLOAD): { *(.stab.excl) }
+       .stab.exclstr  0 (NOLOAD): { *(.stab.exclstr) }
+       .stab.index    0 (NOLOAD): { *(.stab.index) }
+       .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) }
+       .comment       0 (NOLOAD): { *(.comment) }
+       /* DWARF debug sections.
+          Symbols in the DWARF debugging sections are relative to the beginning
+          of the section so we begin them at 0.  */
+       /* DWARF 1 */
+       .debug          0 (NOLOAD): { *(.debug) }
+       .line           0 (NOLOAD): { *(.line) }
+       /* GNU DWARF 1 extensions */
+       .debug_srcinfo  0 (NOLOAD): { *(.debug_srcinfo) }
+       .debug_sfnames  0 (NOLOAD): { *(.debug_sfnames) }
+       /* DWARF 1.1 and DWARF 2 */
+       .debug_aranges  0 (NOLOAD): { *(.debug_aranges) }
+       .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) }
+       /* DWARF 2 */
+       .debug_info     0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) }
+       .debug_abbrev   0 (NOLOAD): { *(.debug_abbrev) }
+       .debug_line     0 (NOLOAD): { *(.debug_line) }
+       .debug_frame    0 (NOLOAD): { *(.debug_frame) }
+       .debug_str      0 (NOLOAD): { *(.debug_str) }
+       .debug_loc      0 (NOLOAD): { *(.debug_loc) }
+       .debug_macinfo  0 (NOLOAD): { *(.debug_macinfo) }
+       /* SGI/MIPS DWARF 2 extensions */
+       .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) }
+       .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) }
+       .debug_typenames 0 (NOLOAD): { *(.debug_typenames) }
+       .debug_varnames  0 (NOLOAD): { *(.debug_varnames) }
+       /* DWARF 3 */
+       .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) }
+       .debug_ranges   0 (NOLOAD): { *(.debug_ranges) }
+       .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) }
 }