Skip to content

Commit c756215

Browse files
committed
Predicate libgraal with 'Full RELRO' to building on Linux
1 parent 5979c1b commit c756215

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

substratevm/mx.substratevm/mx_substratevm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,13 +1213,13 @@ def _native_image_launcher_extra_jvm_args():
12131213

12141214
# URLClassLoader causes considerable increase of the libgraal image size and should be excluded.
12151215
'-H:ReportAnalysisForbiddenType=java.net.URLClassLoader',
1216-
1217-
# build libgraal with 'Full RELRO' to prevent GOT overwriting exploits (GR-46838)
1218-
'-H:NativeLinkerOption=-Wl,-z,relro,-z,now',
12191216
] + ([
12201217
# Force page size to support libgraal on AArch64 machines with a page size up to 64K.
12211218
'-H:PageSize=64K'
1222-
] if mx.get_arch() == 'aarch64' else [])
1219+
] if mx.get_arch() == 'aarch64' else []) + ([
1220+
# Build libgraal with 'Full RELRO' to prevent GOT overwriting exploits on Linux (GR-46838)
1221+
'-H:NativeLinkerOption=-Wl,-z,relro,-z,now',
1222+
] if mx.is_linux() else [])
12231223

12241224
libgraal = mx_sdk_vm.GraalVmJreComponent(
12251225
suite=suite,

0 commit comments

Comments
 (0)