Index: c/src/lib/libbsp/powerpc/gen5200/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/ChangeLog	(revision 29e86b625e11fb1bffcb524bbe4cdfddf3662570)
+++ c/src/lib/libbsp/powerpc/gen5200/ChangeLog	(revision 6c053cbd84727ae86415d2b34e8bf1a5aecdda21)
@@ -1,5 +1,6 @@
 2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
-	* bsp_specs, startup/linkcmds: add c++ support again
+	* bsp_specs, startup/linkcmds, startup/linkcmds.pm520: 
+	add c++ support again
 	* preinstall.am: some fixes
 
Index: c/src/lib/libbsp/powerpc/gen5200/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/Makefile.am	(revision 29e86b625e11fb1bffcb524bbe4cdfddf3662570)
+++ c/src/lib/libbsp/powerpc/gen5200/Makefile.am	(revision 6c053cbd84727ae86415d2b34e8bf1a5aecdda21)
@@ -29,4 +29,9 @@
 	$(CPPASCOMPILE) -o $@ -c $<
 project_lib_DATA = start.$(OBJEXT)
+
+EXTRA_DIST += ../../powerpc/shared/start/rtems_crti.S
+rtems_crti.$(OBJEXT): ../../powerpc/shared/start/rtems_crti.S
+	$(CPPASCOMPILE) -o $@ -c $<
+project_lib_DATA += rtems_crti.$(OBJEXT)
 
 dist_project_lib_DATA += startup/linkcmds
@@ -114,5 +119,5 @@
     ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
     ../../shared/sbrk.c ../shared/uboot_dump_bdinfo.c \
-    ../../shared/gnatinstallhandler.c startup/cpuinit.c start/start.S
+    ../../shared/gnatinstallhandler.c startup/cpuinit.c 
 startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
 startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
Index: c/src/lib/libbsp/powerpc/gen5200/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/bsp_specs	(revision 29e86b625e11fb1bffcb524bbe4cdfddf3662570)
+++ c/src/lib/libbsp/powerpc/gen5200/bsp_specs	(revision 6c053cbd84727ae86415d2b34e8bf1a5aecdda21)
@@ -4,5 +4,7 @@
 
 *startfile:
-%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems:  ecrti%O%s rtems_crti%O%s  crtbegin.o%s}}
+%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems:  ecrti%O%s rtems_crti%O%s  crtbegin.o%s  \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}}
 
 *endfile:
Index: c/src/lib/libbsp/powerpc/gen5200/preinstall.am
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/preinstall.am	(revision 29e86b625e11fb1bffcb524bbe4cdfddf3662570)
+++ c/src/lib/libbsp/powerpc/gen5200/preinstall.am	(revision 6c053cbd84727ae86415d2b34e8bf1a5aecdda21)
@@ -78,4 +78,8 @@
 TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
 
+$(PROJECT_LIB)/rtems_crti.$(OBJEXT): rtems_crti.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/rtems_crti.$(OBJEXT)
+TMPINSTALL_FILES += $(PROJECT_LIB)/rtems_crti.$(OBJEXT)
+
 $(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
Index: c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds	(revision 29e86b625e11fb1bffcb524bbe4cdfddf3662570)
+++ c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds	(revision 6c053cbd84727ae86415d2b34e8bf1a5aecdda21)
@@ -167,5 +167,5 @@
     } > ram
 
-  .jcr : { KEEP (*(.jcr)) } >RAM
+  .jcr : { KEEP (*(.jcr)) } >ram
 
     .rel.dyn : {
Index: c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.pm520
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.pm520	(revision 29e86b625e11fb1bffcb524bbe4cdfddf3662570)
+++ c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.pm520	(revision 6c053cbd84727ae86415d2b34e8bf1a5aecdda21)
@@ -60,5 +60,4 @@
     *(.text*)
 
-
     *(.rodata*)
     *(.rodata1)
@@ -137,5 +136,24 @@
     _erodata = .;
 
-
+    PROVIDE (__EXCEPT_START__ = .);
+    *(.gcc_except_table)
+    PROVIDE (__EXCEPT_END__ = .);
+    __GOT_START__ = .;
+    s.got = .;
+    *(.got.plt) 
+    *(.got)
+    *(.got1)
+    PROVIDE (__GOT2_START__ = .);
+    PROVIDE (_GOT2_START_ = .);
+    *(.got2)
+    PROVIDE (__GOT2_END__ = .);
+    PROVIDE (_GOT2_END_ = .);
+    
+    PROVIDE (__FIXUP_START__ = .);
+    PROVIDE (_FIXUP_START_ = .);
+    *(.fixup)
+    PROVIDE (_FIXUP_END_ = .);
+    PROVIDE (__FIXUP_END__ = .);
+    
     /* Various possible names for the end of the .text section */
     etext = ALIGN(0x10);
@@ -148,29 +166,6 @@
     } > ram
 
-	
-    PROVIDE (__EXCEPT_START__ = .);
-    .gcc_except_table   : { *(.gcc_except_table) } >ram
-    PROVIDE (__EXCEPT_END__ = .);
-    __GOT_START__ = .;
-    .got :
-    {
-      s.got = .;
-      *(.got.plt) *(.got)
-    } > ram
-    __GOT_END__ = .;
-	
-    .got1		  : { *(.got1) 		} >ram
-    PROVIDE (__GOT2_START__ = .);
-    PROVIDE (_GOT2_START_ = .);
-    .got2		  :  { *(.got2) 	} >ram
-    PROVIDE (__GOT2_END__ = .);
-    PROVIDE (_GOT2_END_ = .);
-    
-    PROVIDE (__FIXUP_START__ = .);
-    PROVIDE (_FIXUP_START_ = .);
-    .fixup	  : { *(.fixup) 	} >ram
-    PROVIDE (_FIXUP_END_ = .);
-    PROVIDE (__FIXUP_END__ = .);
- 
+  .jcr : { KEEP (*(.jcr)) } >ram
+
     .rel.dyn : {
       *(.rel.init)
@@ -212,6 +207,6 @@
 
     PROVIDE (__SDATA2_START__ = .);
-    .sdata2   	  : { *(.sdata2) *(.gnu.linkonce.s2.*)	} >ram
-    .sbss2   	  : { *(.sbss2) *(.gnu.linkonce.sb2.*)	} >ram
+  .sdata2   	  : { *(.sdata2) *(.gnu.linkonce.s2.*)	} >ram
+  .sbss2   	  : { *(.sbss2) *(.gnu.linkonce.sb2.*)	} >ram
     PROVIDE (__SBSS2_END__ = .);
 	
@@ -219,19 +214,4 @@
     PROVIDE (__SBSS2_END__ = .);
 	
-    __SBSS_START__ = .;
-    .bss :
-    {
-      bss.start = .;
-      *(.bss .bss* .gnu.linkonce.b*)
-      *(.sbss*) *(COMMON)
-      . = ALIGN(4);
-      bss.end = .;
-    } > ram
-    __SBSS_END__ = .;
-
-
-
-
-
     /* R/W Data */
     .data ( . ) :
@@ -242,5 +222,4 @@
 
       *(.data)
-      *(.data.rel.*)
       *(.data1)
       *(.data.* .gnu.linkonce.d.*)
@@ -251,7 +230,14 @@
     } > ram
 
-    data.size = data.end - data.start;
-    bss.size = bss.end - bss.start;
-    text.size = text.end - text.start;
+    __SBSS_START__ = .;
+    .bss :
+    {
+      bss.start = .;
+      *(.bss .bss* .gnu.linkonce.b*)
+      *(.sbss*) *(COMMON)
+      . = ALIGN(4);
+      bss.end = .;
+    } > ram
+    __SBSS_END__ = .;
 
     PROVIDE(_bss_start   = ADDR(.bss));
@@ -276,4 +262,5 @@
     intrStack = .;
     PROVIDE(intrStackPtr = intrStack);
+
 
 
