openbsd-ports/x11/mplayer/patches/patch-loader_stubs_S

41 lines
835 B
Plaintext
Raw Normal View History

$OpenBSD: patch-loader_stubs_S,v 1.1 2002/12/22 14:19:47 espie Exp $
--- loader/stubs.S.orig Fri Nov 15 10:22:37 2002
+++ loader/stubs.S Fri Nov 15 10:28:46 2002
@@ -0,0 +1,36 @@
+#include "../mangle.h"
+ .data
+.LC0: .string "Called unk_%s\n"
+ .balign 4
+.globl MANGLEA(unk_exp1)
+MANGLEA(unk_exp1):
+ pushl %ebp
+ movl %esp,%ebp
+ subl $4,%esp
+ movl $1,-4(%ebp)
+ movl -4(%ebp),%eax
+ movl %eax,%ecx
+ movl %ecx,%edx
+ sall $4,%edx
+ subl %eax,%edx
+ leal 0(,%edx,2),%eax
+ movl %eax,%edx
+ addl $MANGLEA(export_names),%edx
+ pushl %edx
+ pushl $.LC0
+ call MANGLEA(printf)
+ addl $8,%esp
+ xorl %eax,%eax
+ leave
+ ret
+.globl MANGLEA(exp_EH_prolog)
+MANGLEA(exp_EH_prolog):
+ pushl $0xff
+ pushl %eax
+ pushl %fs:0
+ movl %esp, %fs:0
+ movl 12(%esp), %eax
+ movl %ebp, 12(%esp)
+ leal 12(%esp), %ebp
+ pushl %eax
+ ret