diff options
-rwxr-xr-x | configure | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4392,6 +4392,16 @@ case $target_os in objformat="win32" ranlib=: enable dos_paths + # Lets work around some stupidity in binutils. + # ld will strip relocations from executables even though we need them + # for dynamicbase (ASLR). Using -pie does retain the reloc section + # however ld then forgets what the entry point should be (oops) so we + # have to manually (re)set it. + if enabled x86_32; then + add_ldexeflags -Wl,--pic-executable,-e,_mainCRTStartup + elif enabled x86_64; then + add_ldexeflags -Wl,--pic-executable,-e,mainCRTStartup + fi ;; win32|win64) disable symver |