Skip to content

Commit d1d5e14

Browse files
committed
[GR-46838] Build libgraal with 'Full RELRO' to prevent GOT overwriting exploits.
PullRequest: graal/15047
2 parents f3fac76 + c756215 commit d1d5e14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

substratevm/mx.substratevm/mx_substratevm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,10 @@ def _native_image_launcher_extra_jvm_args():
12161216
] + ([
12171217
# Force page size to support libgraal on AArch64 machines with a page size up to 64K.
12181218
'-H:PageSize=64K'
1219-
] 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 [])
12201223

12211224
libgraal = mx_sdk_vm.GraalVmJreComponent(
12221225
suite=suite,

0 commit comments

Comments
 (0)