diff options
author | Matt Caswell <matt@openssl.org> | 2016-10-18 15:11:57 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-11-02 23:38:20 +0000 |
commit | 848dc9619049f6aaad91b367eed309d987009e5e (patch) | |
tree | 6c3acc246be6864114186e2f8262942082b288e6 /Configurations | |
parent | 389d4655b143bc6d495ca6c48809aac8f4356e01 (diff) |
Link using -znodelete
Instead of deliberately leaking a reference to ourselves, use nodelete
which does this more neatly. Only for Linux at the moment.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit b6d5ba1a9f004d637acac18ae3519fe063b6b5e1)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/10-main.conf | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index adb40e3355..c80d02f27a 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -631,7 +631,8 @@ sub vms_info { thread_scheme => "pthreads", dso_scheme => "dlfcn", shared_target => "linux-shared", - shared_cflag => "-fPIC", + shared_cflag => "-fPIC -DOPENSSL_USE_NODELETE", + shared_ldflag => "-znodelete", shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", }, "linux-generic64" => { @@ -647,14 +648,14 @@ sub vms_info { inherit_from => [ "linux-generic64", asm("ppc64_asm") ], cflags => add("-m64 -DB_ENDIAN"), perlasm_scheme => "linux64", - shared_ldflag => "-m64", + shared_ldflag => add("-m64"), multilib => "64", }, "linux-ppc64le" => { inherit_from => [ "linux-generic64", asm("ppc64_asm") ], cflags => add("-m64 -DL_ENDIAN"), perlasm_scheme => "linux64le", - shared_ldflag => "-m64", + shared_ldflag => add("-m64"), }, "linux-armv4" => { @@ -710,7 +711,7 @@ sub vms_info { inherit_from => [ "linux-generic32", asm("mips32_asm") ], cflags => add("-mabi=32 -DBN_DIV3W"), perlasm_scheme => "o32", - shared_ldflag => "-mabi=32", + shared_ldflag => add("-mabi=32"), }, # mips32 and mips64 below refer to contemporary MIPS Architecture # specifications, MIPS32 and MIPS64, rather than to kernel bitness. @@ -719,14 +720,14 @@ sub vms_info { cflags => add("-mabi=n32 -DBN_DIV3W"), bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", perlasm_scheme => "n32", - shared_ldflag => "-mabi=n32", + shared_ldflag => add("-mabi=n32"), multilib => "32", }, "linux64-mips64" => { inherit_from => [ "linux-generic64", asm("mips64_asm") ], cflags => add("-mabi=64 -DBN_DIV3W"), perlasm_scheme => "64", - shared_ldflag => "-mabi=64", + shared_ldflag => add("-mabi=64"), multilib => "64", }, @@ -753,7 +754,7 @@ sub vms_info { cflags => add("-m64 -DL_ENDIAN"), bn_ops => "SIXTY_FOUR_BIT_LONG", perlasm_scheme => "elf", - shared_ldflag => "-m64", + shared_ldflag => add("-m64"), multilib => "64", }, "linux-x86_64-clang" => { @@ -779,7 +780,7 @@ sub vms_info { inherit_from => [ "linux-generic64", asm("s390x_asm") ], cflags => add("-m64 -DB_ENDIAN"), perlasm_scheme => "64", - shared_ldflag => "-m64", + shared_ldflag => add("-m64"), multilib => "64", }, "linux32-s390x" => { @@ -803,7 +804,7 @@ sub vms_info { cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"), bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; }, perlasm_scheme => "31", - shared_ldflag => "-m31", + shared_ldflag => add("-m31"), multilib => "/highgprs", }, @@ -819,14 +820,14 @@ sub vms_info { # but -Wa,-Av8plus should do the trick no matter what. inherit_from => [ "linux-generic32", asm("sparcv9_asm") ], cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"), - shared_ldflag => "-m32", + shared_ldflag => add("-m32"), }, "linux64-sparcv9" => { # GCC 3.1 is a requirement inherit_from => [ "linux-generic64", asm("sparcv9_asm") ], cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"), bn_ops => "BN_LLONG RC4_CHAR", - shared_ldflag => "-m64", + shared_ldflag => add("-m64"), multilib => "64", }, @@ -855,7 +856,7 @@ sub vms_info { dso_scheme => "dlfcn", shared_target => "linux-shared", shared_cflag => "--pic", - shared_ldflag => "-z --sysv --shared", + shared_ldflag => add("-z --sysv --shared"), shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ranlib => "true", }, |