1 /* $Id: dylib1.c,v 1.1.1.1 2009/09/04 00:27:35 gmcgarry Exp $ */
3 * Copyright (c) 2009 Gregory McGarry <g.mcgarry@ieee.org>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * void _dyld_func_lookup(const char *, void **);
23 * jump to the linker via the pointer in the __dyld section
27 " .private_extern __dyld_func_lookup\n"
28 "__dyld_func_lookup:\n"
29 " call L__dyld_func_lookup$pb\n"
30 "L__dyld_func_lookup$pb:\n"
32 " movl Ldyld_func_lookup-L__dyld_func_lookup$pb(%eax),%eax\n"
37 * void dyld_stub_binding_helper(void)
42 "dyld__mach_header:\n"
43 " .long __mh_dylib_header\n"
45 " .private_extern dyld_stub_binding_helper\n"
47 "dyld_stub_binding_helper:\n"
48 " call Ldyld_stub_binding_helper$pb\n"
49 "Ldyld_stub_binding_helper$pb:\n"
51 " pushl dyld__mach_header-Ldyld_stub_binding_helper$pb(%eax)\n"
52 " movl Ldyld_lazy_binder-Ldyld_stub_binding_helper$pb(%eax),%eax\n"
62 "Ldyld_lazy_binder:\n"
64 "Ldyld_func_lookup:\n"
68 asm("\t.subsections_via_symbols\n");
70 IDENT("$Id: dylib1.c,v 1.1.1.1 2009/09/04 00:27:35 gmcgarry Exp $");