--- a/make/autoconf/flags-ldflags.m4~ Mon Apr 13 13:55:05 2020 +++ b/make/autoconf/flags-ldflags.m4 Mon Apr 13 14:10:29 2020 @@ -70,9 +70,12 @@ fi # Add -z defs, to forbid undefined symbols in object files. - # add -z,relro (mark relocations read only) for all libs - # add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only) - BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs" + else + # add relro (mark relocations read only) for all libs + BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now" + fi # s390x : remove unused code+data in link step if test "x$OPENJDK_TARGET_CPU" = xs390x; then BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,--gc-sections"