]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
The h8mirosot board ldscripts modified to allow building with ELF-based compiler
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 3 Feb 2009 09:05:29 +0000 (10:05 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 30 Dec 2012 23:10:49 +0000 (00:10 +0100)
This commit is analogous to 8c8d5a1eb8d2e292dbc3e0a94cffc6781e74dbfc,
which did the same changes for h8eurobot board.

board/h8300/h8mirosot/config/config.h8mirosot
board/h8300/h8mirosot/libs/h8canusb.ld-bload
board/h8300/h8mirosot/libs/h8canusb.ld-boot
board/h8300/h8mirosot/libs/h8canusb.ld-cfg
board/h8300/h8mirosot/libs/h8canusb.ld-flash
board/h8300/h8mirosot/libs/h8canusb.ld-ram

index b601817794189561b0f80c7b6e12d999b174aa20..d478a71d58544dee1e5ef9fb62f200e8b9619ba0 100644 (file)
@@ -8,7 +8,7 @@ PREFIX_DIR=$(BOARD)
 
 CFLAGS+=-DBTH_LX
 
-CROSS_COMPILE = h8300-coff-
+CROSS_COMPILE = h8300-elf-
 TARGET_ARCH = -ms
 
 # Set default C flags. If theese are set elsewhere (e.g. on a command
@@ -41,4 +41,4 @@ OUTPUT_FORMATS = bin
 CONFIG_USB_BASE=n
 CONFIG_USB_PDIUSB=n
 CONFIG_USB_MORE=n
-CONFIG_NO_STDIO=y
\ No newline at end of file
+CONFIG_NO_STDIO=y
index 3dddd4b10d4218b84d5875f41eae1b722262892e..95a6a50e222a0e64b72931a92f94c06609e97530 100644 (file)
@@ -61,13 +61,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 6a432d6d8214ba9d68af60940fbe1ea11d6f10a0..c56266904737a4bfe2e88957b0b913139b2f7252 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.*)
          *(.strings)
          . = ALIGN( 0x4 ) ;
          _etext = ALIGN( 0x4 ) ;
@@ -78,13 +78,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 7eac4b7055eb4e5a8d37d30c197abcb1b1359d4f..a254510cad155aa70f8d8409096108d9f53ce10e 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 15d522e1344f449385654243e7355b371fcf027d..414077fa8f319fcd9406922dc7f9023af7f51395 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 6632387fb9ac8796e7342e87ff895742afe04c01..4a7e99ff5b9c81f759bc276124019671ff83115d 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)) }
 }