summarylogtreecommitdiffstats
path: root/lto-discard.patch
blob: 931aa20e95ee5bcebef482235316d5f85755d68f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- binutils-2.29/ld/scripttempl/i386go32.sc
+++ binutils-2.29/ld/scripttempl/i386go32.sc
@@ -19,6 +19,7 @@
     *(SORT(.dtors.*))
     *(.dtor) *(.dtors)
   }'
+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
 
 cat <<EOF
 /* Copyright (C) 2014-2017 Free Software Foundation, Inc.
@@ -82,5 +83,6 @@
 . $srcdir/scripttempl/DWARF.sc
 
 cat <<EOF
+  ${RELOCATING+${DISCARDED}}
 }
 EOF