summaryrefslogtreecommitdiffstats
path: root/loader/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'loader/win32.c')
-rw-r--r--loader/win32.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/loader/win32.c b/loader/win32.c
index 9eae50b860..40059ab846 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -18,6 +18,7 @@ for DLL to know too much about its environment.
*/
#include "config.h"
+#include "mangle.h"
#ifdef MPLAYER
#ifdef USE_QTX_CODECS
@@ -4587,8 +4588,25 @@ static INT WINAPI expMessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type
/* these are needed for mss1 */
-/* defined in stubs.s */
-void exp_EH_prolog(void);
+/**
+ * \brief this symbol is defined within exp_EH_prolog_dummy
+ * \param dest jump target
+ */
+void exp_EH_prolog(void *dest);
+//! just a dummy function that acts a container for the asm section
+void exp_EH_prolog_dummy(void) {
+ asm volatile (
+// take care, this "function" may not change flags or
+// registers besides eax (which is also why we can't use
+// exp_EH_prolog_dummy directly)
+MANGLE(exp_EH_prolog)": \n\t"
+ "pop %eax \n\t"
+ "push %ebp \n\t"
+ "mov %esp, %ebp \n\t"
+ "lea -12(%esp), %esp \n\t"
+ "jmp *%eax \n\t"
+ );
+}
#include <netinet/in.h>
static WINAPI inline unsigned long int exphtonl(unsigned long int hostlong)