]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - ld/scripttempl/pe.sc
Merge commit 'upstream/2.20'
[msp430-binutils.git] / ld / scripttempl / pe.sc
index c9eb16f6dc2d1fb1d0d9bb9eaac254367f42b4f4..0d59aa0b134e5ecf273207b018ee789183b971be 100644 (file)
@@ -13,8 +13,16 @@ fi
 # use grouped sections instead).
 if test "${RELOCATING}"; then
   R_TEXT='*(SORT(.text$*))'
-  R_DATA='*(SORT(.data$*))'
-  R_RDATA='*(SORT(.rdata$*))'
+  if test "x$LD_FLAG" = "xauto_import" ; then
+    R_DATA='*(SORT(.data$*))
+            *(.rdata)
+           *(SORT(.rdata$*))'
+    R_RDATA=''
+  else
+    R_DATA='*(SORT(.data$*))'
+    R_RDATA='*(.rdata)
+             *(SORT(.rdata$*))'
+  fi
   R_IDATA='
     SORT(*)(.idata$2)
     SORT(*)(.idata$3)
@@ -37,7 +45,7 @@ if test "${RELOCATING}"; then
 else
   R_TEXT=
   R_DATA=
-  R_RDATA=
+  R_RDATA='*(.rdata)'
   R_IDATA=
   R_CRT=
   R_RSRC=
@@ -61,6 +69,7 @@ SECTIONS
     ${RELOCATING+ *(.init)}
     *(.text)
     ${R_TEXT}
+    ${RELOCATING+ *(.text.*)}
     *(.glue_7t)
     *(.glue_7)
     ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 
@@ -93,9 +102,7 @@ SECTIONS
 
   .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
-    *(.rdata)
     ${R_RDATA}
-    ${RELOCATING+ *(.eh_frame)}
     ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
     ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
     *(.rdata_runtime_pseudo_reloc)
@@ -103,6 +110,11 @@ SECTIONS
     ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
   }
 
+  .eh_frame ${RELOCATING+BLOCK(__section_alignment__)} :
+  {
+    *(.eh_frame)
+  }
+
   .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     *(.pdata)
@@ -206,6 +218,11 @@ SECTIONS
     *(.debug_pubnames)
   }
 
+  .debug_pubtypes ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_pubtypes)
+  }
+
   /* DWARF 2.  */
   .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {