2003/11/16 08:28:10
[org.ibex.core.git] / src / org / xwt / mips / linker.ld
index 374cf25..5b8ab8b 100644 (file)
@@ -1,7 +1,4 @@
-SEARCH_DIR(build)
 ENTRY(_start)
-STARTUP(org/xwt/mips/crt0.c.o)
-INPUT(org/xwt/mips/syscalls.c.o)
 GROUP(-lc -lgcc)
 __DYNAMIC  =  0;
 
@@ -9,14 +6,36 @@ SECTIONS {
   . = 0x10000;
   .text : {
     *(.init)
-    *(.text) *(.rodata) *(.rodata.*) *(.eh_frame)
+    *(.text) *(.text.*) 
     *(.fini)
   }
 
+  .ctors :
+  {
+    KEEP (*crtbegin.o(.ctors))
+    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+    KEEP (*(SORT(.ctors.*)))
+    KEEP (*(.ctors))
+  }
+  
+  .dtors :
+  {
+    KEEP (*crtbegin.o(.dtors))
+    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+    KEEP (*(SORT(.dtors.*)))
+    KEEP (*(.dtors))
+  }
+
   . = ALIGN(4k);
+
+  .rodata : {
+    *(.rodata) *(.rodata.*) *(.eh_frame) *(.jcr)
+  }
+
   .data : {
     *(.data)
   }
+
   . = ALIGN(16);
    PROVIDE(_gp = . + 0x8000);
   .sdata : {