aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-03-23 21:04:22 +0100
committerAndy Polyakov <appro@openssl.org>2016-03-29 09:51:40 +0200
commitfdf6f73e5e09a98112d85ee745ac5b3c78942956 (patch)
tree1514add686d624ca5d38f8568f4d989383e68750
parent6ddb62a575a31940785fdf3db8a24ca6006e5d2a (diff)
downloadopenssl-fdf6f73e5e09a98112d85ee745ac5b3c78942956.zip
openssl-fdf6f73e5e09a98112d85ee745ac5b3c78942956.tar.gz
openssl-fdf6f73e5e09a98112d85ee745ac5b3c78942956.tar.bz2
Windows build system: fix 32-bit appveyor build.
Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r--Configurations/10-main.conf2
-rw-r--r--ms/uplink.c28
2 files changed, 29 insertions, 1 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 737ae85..4e9579c 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1295,7 +1295,7 @@ sub vc_wince_info {
# x86 Win32 target defaults to ANSI API, if you want UNICODE,
# configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
inherit_from => [ "VC-noCE-common", asm("x86_asm"),
- sub { $disabled{shared} ? () : "x86_uplink" } ],
+ sub { $disabled{shared} ? () : "uplink_common" } ],
as => sub { my $ver=`nasm -v 2>NUL`;
my $vew=`nasmw -v 2>NUL`;
return $ver ge $vew ? "nasm" : "nasmw" },
diff --git a/ms/uplink.c b/ms/uplink.c
index 4f480a7..6a5091b 100644
--- a/ms/uplink.c
+++ b/ms/uplink.c
@@ -90,6 +90,34 @@ void OPENSSL_Uplink(volatile void **table, int index)
table[index] = func;
}
+#if defined(_MSC_VER) && defined(_M_IX86)
+# define LAZY(i) \
+__declspec(naked) static void lazy##i (void) { \
+ _asm push i \
+ _asm push OFFSET OPENSSL_UplinkTable \
+ _asm call OPENSSL_Uplink \
+ _asm add esp,8 \
+ _asm jmp OPENSSL_UplinkTable+4*i }
+
+# if APPLINK_MAX>25
+# error "Add more stubs..."
+# endif
+/* make some in advance... */
+LAZY(1) LAZY(2) LAZY(3) LAZY(4) LAZY(5)
+ LAZY(6) LAZY(7) LAZY(8) LAZY(9) LAZY(10)
+ LAZY(11) LAZY(12) LAZY(13) LAZY(14) LAZY(15)
+ LAZY(16) LAZY(17) LAZY(18) LAZY(19) LAZY(20)
+ LAZY(21) LAZY(22) LAZY(23) LAZY(24) LAZY(25)
+void *OPENSSL_UplinkTable[] = {
+ (void *)APPLINK_MAX,
+ lazy1, lazy2, lazy3, lazy4, lazy5,
+ lazy6, lazy7, lazy8, lazy9, lazy10,
+ lazy11, lazy12, lazy13, lazy14, lazy15,
+ lazy16, lazy17, lazy18, lazy19, lazy20,
+ lazy21, lazy22, lazy23, lazy24, lazy25,
+};
+#endif
+
#ifdef SELFTEST
main()
{