--- 4.05.0-10/debian/patches/linker-flags.patch 1970-01-01 00:00:00.000000000 +0000
+++ 4.05.0-10ubuntu2/debian/patches/linker-flags.patch 2017-10-20 10:15:00.000000000 +0000
@@ -0,0 +1,23 @@
+--- a/configure
++++ b/configure
+@@ -402,7 +402,9 @@
+ if cc="$bytecc" sh ./hasgot -mieee; then
+ bytecccompopts="-mieee $bytecccompopts";
+ fi
+- bytecclinkopts="-Wl,--no-relax";;
++ bytecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id -Wl,--no-relax";;
++ gcc,*-*-linux*)
++ bytecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id";;
+ *,mips-*-irix6*)
+ # Turn off warning "unused library"
+ bytecclinkopts="-n32 -Wl,-woff,84";;
+@@ -923,7 +925,8 @@
+ case "$arch,$nativecc,$system,$model" in
+ *,*,nextstep,*) nativecclinkopts="-posix";;
+ *,*,rhapsody,*) if $arch64; then partialld="ld -r -arch ppc64"; fi;;
+- alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--no-relax";;
++ alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id -Wl,--no-relax";;
++ *,gcc*,linux*,*) nativecclinkopts="-Wl,--hash-style=both -Wl,--as-needed -Wl,--build-id";;
+ amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
+ amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";;
+ power,gcc*,elf,ppc) partialld="ld -r -m elf32ppclinux";;