[8u] RFR: 8205104: EXTRA_LDFLAGS not consistently being used

Severin Gehwolf sgehwolf at redhat.com
Fri Jun 15 12:59:56 UTC 2018


Hi,

This is a JDK 8u specific problem. It's not applicable to 10/11 since
the build system has changed. Make files in JDK 8 live in the hotspot
tree, hence, I'm also including hotspot-dev. The issue at hand is that
linker flags are not consistently passed down to individual library
builds. Specifically libjvm.so, libjsig.so and libsaproc.so. This
prevents downstream users from producing hardened builds. We have been
using this patch in downstream Fedora for a while now without issues.

Please review!

Bug: https://bugs.openjdk.java.net/browse/JDK-8205104
webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8205104/webrev.01/

Testing:

Before:
$ for i in build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/server/libjvm.so \
         build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libsaproc.so \
         build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libjsig.so; do \
   echo $i; readelf -d $i | grep NOW
  done
build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/server/libjvm.so
build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libsaproc.so
build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libjsig.so

After:
$ for i in build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/server/libjvm.so \
         build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libsaproc.so \
         build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libjsig.so; do \
   echo $i; readelf -d $i | grep NOW
  done
build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/server/libjvm.so
 0x0000000000000018 (BIND_NOW)           
 0x000000006ffffffb (FLAGS_1)            Flags: NOW
build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libsaproc.so
 0x0000000000000018 (BIND_NOW)           
 0x000000006ffffffb (FLAGS_1)            Flags: NOW
build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/libjsig.so
 0x0000000000000018 (BIND_NOW)           
 0x000000006ffffffb (FLAGS_1)            Flags: NOW

Thanks,
Severin


More information about the build-dev mailing list