[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/30] meson: tweak hardening options for Windows
From: |
Paolo Bonzini |
Subject: |
[PATCH 06/30] meson: tweak hardening options for Windows |
Date: |
Fri, 9 Dec 2022 12:23:45 +0100 |
-Wl,--dynamicbase has been enabled for DLLs upstream for roughly 2
years (https://sourceware.org/bugzilla/show_bug.cgi?id=19011), and
also by some distros including Debian for 6 years even
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836365), so
just enable it unconditionally.
Also add -Wl,--high-entropy-va.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 5c6b5a1c757f..d61c7a82f112 100644
--- a/meson.build
+++ b/meson.build
@@ -193,10 +193,7 @@ qemu_ldflags +=
cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,now')
if targetos == 'windows'
qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh',
'-Wl,--nxcompat')
- # Disable ASLR for debug builds to allow debugging with gdb
- if get_option('optimization') == '0'
- qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase')
- endif
+ qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase',
'-Wl,--high-entropy-va')
endif
if get_option('gprof')
--
2.38.1
- Re: [PATCH 16/30] build: move glib detection and workarounds to meson, (continued)
- [PATCH 11/30] meson: cleanup dummy-cpus.c rules, Paolo Bonzini, 2022/12/09
- [PATCH 07/30] meson: support meson 0.64 -Doptimization=plain, Paolo Bonzini, 2022/12/09
- [PATCH 09/30] meson: use prefer_static option, Paolo Bonzini, 2022/12/09
- [PATCH 06/30] meson: tweak hardening options for Windows,
Paolo Bonzini <=
- [PATCH 14/30] configure: test all warnings, Paolo Bonzini, 2022/12/09
- [PATCH 12/30] modinfo: lookup compile_commands.json by object, Paolo Bonzini, 2022/12/09
- [PATCH 28/30] docs: update build system docs, Paolo Bonzini, 2022/12/09