[FREELDR] Diverse enhancements.
[reactos.git] / boot / freeldr / freeldr / freeldr_i386.lds
index 9f3a0a3..56df8f6 100644 (file)
@@ -4,12 +4,19 @@ SECTIONS
   {
     *(.text)
     *(SORT(.text*))
+    *(INIT)
+    *(SORT(INIT*))
     *(.data)
     *(SORT(.data*))
     *(.rdata)
     *(SORT(.rdata*))
   }
 
+  /*
+   * LD needs an explicit .edata block to make the binary correctly export
+   * symbols, otherwise, if .edata is merged with another section (e.g. .rdata)
+   * the exports are not exported!
+   */
   .edata BLOCK(__file_alignment__) :
   {
     *(.edata)
@@ -23,15 +30,6 @@ SECTIONS
     __bss_end__ = . ;
   }
 
-  .stab BLOCK(__section_alignment__) (NOLOAD) :
-  {
-    *(.stab)
-  }
-  .stabstr BLOCK(__section_alignment__) (NOLOAD) :
-  {
-    *(.stabstr)
-  }
-
   /* DWARF debug sections.
      Symbols in the DWARF debugging sections are relative to the beginning
      of the section.  Unlike other targets that fake this by putting the
@@ -41,74 +39,142 @@ SECTIONS
   {
     *(.debug_aranges)
   }
+  .zdebug_aranges BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_aranges)
+  }
   .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_pubnames)
   }
+  .zdebug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_pubnames)
+  }
   .debug_pubtypes BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_pubtypes)
   }
+  .zdebug_pubtypes BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_pubtypes)
+  }
   /* DWARF 2.  */
   .debug_info BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_info .gnu.linkonce.wi.*)
   }
+  .zdebug_info BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_info .zdebug.gnu.linkonce.wi.*)
+  }
   .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_abbrev)
   }
+  .zdebug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_abbrev)
+  }
   .debug_line BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_line)
   }
+  .zdebug_line BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_line)
+  }
   .debug_frame BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_frame*)
   }
+  .zdebug_frame BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_frame*)
+  }
   .debug_str BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_str)
   }
+  .zdebug_str BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_str)
+  }
   .debug_loc BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_loc)
   }
+  .zdebug_loc BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_loc)
+  }
   .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_macinfo)
   }
+  .zdebug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_macinfo)
+  }
   /* SGI/MIPS DWARF 2 extensions.  */
   .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_weaknames)
   }
+  .zdebug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_weaknames)
+  }
   .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_funcnames)
   }
+  .zdebug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_funcnames)
+  }
   .debug_typenames BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_typenames)
   }
+  .zdebug_typenames BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_typenames)
+  }
   .debug_varnames BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_varnames)
   }
+  .zdebug_varnames BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_varnames)
+  }
   .debug_macro BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_macro)
   }
+  .zdebug_macro BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_macro)
+  }
   /* DWARF 3.  */
   .debug_ranges BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_ranges)
   }
+  .zdebug_ranges BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_ranges)
+  }
   /* DWARF 4.  */
   .debug_types BLOCK(__section_alignment__) (NOLOAD) :
   {
     *(.debug_types .gnu.linkonce.wt.*)
   }
+  .zdebug_types BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    *(.zdebug_types .gnu.linkonce.wt.*)
+  }
 
   /DISCARD/ :
   {