#endif
.text"
-#!+(or x86 x86-64) "
+#!+(or (and x86 (not darwin)) x86-64) "
#define LDSO_STUBIFY(fct) \\
.align 16 ; \\
.globl ldso_stub__ ## fct ; \\
.indirect_symbol _ ## fct @\\
.long dyld_stub_binding_helper"
+;;; darwin x86 assembler is weird and follows the ppc assembler syntax
+#!+(and darwin x86) "
+#define LDSO_STUBIFY(fct) \\
+.text ; \\
+ .align 4 ; \\
+.globl ldso_stub___ ## fct ; \\
+ldso_stub___ ## fct: ; \\
+ jmp L ## fct ## $stub ; \\
+ .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 ; \\
+L ## fct ## $stub: ; \\
+ .indirect_symbol _ ## fct ; \\
+ hlt ; \\
+ hlt ; \\
+ hlt ; \\
+ hlt ; \\
+ hlt ; \\
+ .subsections_via_symbols ; "
+
;;; KLUDGE: set up the vital fifth argument, passed on the
;;; stack. Do this unconditionally, even if the stub is for a
;;; function with few arguments: it can't hurt. We only do this for
#!+alpha
'("ieee_get_fp_control"
"ieee_set_fp_control")
+ #!-win32
+ '("ptsname"
+ "grantpt"
+ "unlockpt")
#!-darwin
'("dlclose"
"dlerror"