[PATCH 1/2] coff-go32: update ldscript
authorJuan Manuel Guerrero <juan.guerrero@gmx.de>
Fri, 17 Apr 2020 12:12:31 +0000 (13:12 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 17 Apr 2020 12:12:31 +0000 (13:12 +0100)
* scripttempl/i386go32.sc: Provide symbol _environ.  Link in
.ctors and .dtors.  Discard LTO sections.

ld/ChangeLog
ld/scripttempl/i386go32.sc

index 9a32c899c2d7951669df06833fef6b6b3b046d12..8e3e2df3e8c2c3c734dac25cd07b95662bfcd84b 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-17  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
+            Jan W. Jagersma  <jwjagersma@gmail.com>
+
+       * scripttempl/i386go32.sc: Provide symbol _environ.  Link in
+       .ctors and .dtors.  Discard LTO sections.
+
 2020-04-17  Nick Clifton  <nickc@redhat.com>
 
        * testsuite/config/default.exp: If not already set then create the
index 999aa0527dc35b5d33b6f59abe8e759b4bb14356..60171fc846c5236279f381ef6f9ed5ee04a0498c 100644 (file)
@@ -43,15 +43,21 @@ SECTIONS
     ${RELOCATING+etext  =  . ; PROVIDE(_etext = .) ;}
     ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
   }
+  
   .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
     ${RELOCATING+djgpp_first_ctor = . ;
     *(SORT(.ctors.*))
     *(.ctor)
+    *(.ctors)
     djgpp_last_ctor = . ;}
     ${RELOCATING+djgpp_first_dtor = . ;
     *(SORT(.dtors.*))
     *(.dtor)
+    *(.dtors)
     djgpp_last_dtor = . ;}
+    __environ = . ;
+    PROVIDE(_environ = .) ;
+    LONG(0) ;
     *(.data)
     ${RELOCATING+*(.data.*)}
 
@@ -65,8 +71,10 @@ SECTIONS
     ${RELOCATING+edata  =  . ; PROVIDE(_edata = .) ;}
     ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
   }
+  
   ${CONSTRUCTING+${RELOCATING-$CTOR}}
   ${CONSTRUCTING+${RELOCATING-$DTOR}}
+  
   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
   {
     *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
@@ -74,6 +82,10 @@ SECTIONS
     ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
     ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
   }
+  
+  /* Discard LTO sections.  */
+  /DISCARD/ : { *(.gnu.lto_*) }
+  
   /* Stabs debugging sections.  */
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
This page took 0.024557 seconds and 4 git commands to generate.