This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
mn10300 linker script fix
- From: Bart Veer <bartv at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Fri, 14 Mar 2003 11:12:55 +0000 (GMT)
- Subject: mn10300 linker script fix
With the current versions of the mn10300 tools you must have linker
script entries for the various debug sections, otherwise the final
executables will contain bogus offsets in .debug_info. I have added
the full set of debug-related sections from the libgloss linker
scripts, even though usually we only need the dwarf2 ones, just in
case somebody decides to compile with e.g. -gstabs.
Committed to trunk, approval requested for branch.
Bart
2003-03-14 Bart Veer <bartv at ecoscentric dot com>
* src/mn10300_am31.ld: add entries for debug sections, needed by
current tools
Index: mn10300_am31.ld
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/mn10300/am31/current/src/mn10300_am31.ld,v
retrieving revision 1.9
diff -u -u -r1.9 mn10300_am31.ld
--- mn10300_am31.ld 23 May 2002 23:03:58 -0000 1.9
+++ mn10300_am31.ld 14 Mar 2003 11:06:39 -0000
@@ -120,7 +121,31 @@
__bss_end = ABSOLUTE (.); } \
> _region_
-#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
+#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .); \
+ .stab 0 : { *(.stab) } \
+ .stabstr 0 : { *(.stabstr) } \
+ .stab.excl 0 : { *(.stab.excl) } \
+ .stab.exclstr 0 : { *(.stab.exclstr) } \
+ .stab.index 0 : { *(.stab.index) } \
+ .stab.indexstr 0 : { *(.stab.indexstr) } \
+ .comment 0 : { *(.comment) } \
+ .debug 0 : { *(.debug) } \
+ .line 0 : { *(.line) } \
+ .debug_srcinfo 0 : { *(.debug_srcinfo) } \
+ .debug_sfnames 0 : { *(.debug_sfnames) } \
+ .debug_aranges 0 : { *(.debug_aranges) } \
+ .debug_pubnames 0 : { *(.debug_pubnames) } \
+ .debug_info 0 : { *(.debug_info) } \
+ .debug_abbrev 0 : { *(.debug_abbrev) } \
+ .debug_line 0 : { *(.debug_line) } \
+ .debug_frame 0 : { *(.debug_frame) } \
+ .debug_str 0 : { *(.debug_str) } \
+ .debug_loc 0 : { *(.debug_loc) } \
+ .debug_macinfo 0 : { *(.debug_macinfo) } \
+ .debug_weaknames 0 : { *(.debug_weaknames) } \
+ .debug_funcnames 0 : { *(.debug_funcnames) } \
+ .debug_typenames 0 : { *(.debug_typenames) } \
+ .debug_varnames 0 : { *(.debug_varnames) }
#include CYGHWR_MEMORY_LAYOUT_LDI
2003-03-14 Bart Veer <bartv at ecoscentric dot com>
* src/mn10300_am33.ld: add entries for debug sections, needed by
current tools
Index: mn10300_am33.ld
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/mn10300/am33/current/src/mn10300_am33.ld,v
retrieving revision 1.6
diff -u -u -r1.6 mn10300_am33.ld
--- mn10300_am33.ld 15 Nov 2002 18:05:22 -0000 1.6
+++ mn10300_am33.ld 14 Mar 2003 11:11:01 -0000
@@ -120,7 +121,31 @@
__bss_end = ABSOLUTE (.); } \
> _region_
-#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
+#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .); \
+ .stab 0 : { *(.stab) } \
+ .stabstr 0 : { *(.stabstr) } \
+ .stab.excl 0 : { *(.stab.excl) } \
+ .stab.exclstr 0 : { *(.stab.exclstr) } \
+ .stab.index 0 : { *(.stab.index) } \
+ .stab.indexstr 0 : { *(.stab.indexstr) } \
+ .comment 0 : { *(.comment) } \
+ .debug 0 : { *(.debug) } \
+ .line 0 : { *(.line) } \
+ .debug_srcinfo 0 : { *(.debug_srcinfo) } \
+ .debug_sfnames 0 : { *(.debug_sfnames) } \
+ .debug_aranges 0 : { *(.debug_aranges) } \
+ .debug_pubnames 0 : { *(.debug_pubnames) } \
+ .debug_info 0 : { *(.debug_info) } \
+ .debug_abbrev 0 : { *(.debug_abbrev) } \
+ .debug_line 0 : { *(.debug_line) } \
+ .debug_frame 0 : { *(.debug_frame) } \
+ .debug_str 0 : { *(.debug_str) } \
+ .debug_loc 0 : { *(.debug_loc) } \
+ .debug_macinfo 0 : { *(.debug_macinfo) } \
+ .debug_weaknames 0 : { *(.debug_weaknames) } \
+ .debug_funcnames 0 : { *(.debug_funcnames) } \
+ .debug_typenames 0 : { *(.debug_typenames) } \
+ .debug_varnames 0 : { *(.debug_varnames) }
#include CYGHWR_MEMORY_LAYOUT_LDI