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.
22 " .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32"
26 * void _dyld_func_lookup(const char *, void **);
28 * jump to the linker via the pointer in the __dyld section
33 " .private_extern __dyld_func_lookup\n"
34 "__dyld_func_lookup:\n"
36 " bcl 20,31,L__dyld_func_lookup$pb\n"
37 "L__dyld_func_lookup$pb:\n"
40 " addis r11,r11,ha16(Ldyld_func_lookup-L__dyld_func_lookup$pb)\n"
41 " lwz r11,lo16(Ldyld_func_lookup-L__dyld_func_lookup$pb)(r11)\n"
47 * void dyld_stub_binding_helper(void)
52 "dyld__mach_header:\n"
53 " .long __mh_dylib_header\n"
56 " .private_extern dyld_stub_binding_helper\n"
57 "dyld_stub_binding_helper:\n"
59 " bcl 20,31,Ldyld_stub_binding_helper$pb\n"
60 "Ldyld_stub_binding_helper$pb:\n"
64 " addis r12,r12,ha16(Ldyld_lazy_binder-Ldyld_stub_binding_helper$pb)\n"
65 " lwz r12,lo16(Ldyld_lazy_binder-Ldyld_stub_binding_helper$pb)(r12)\n"
68 " addis r12,r12,ha16(dyld__mach_header-Ldyld_stub_binding_helper$pb)\n"
69 " lwz r12,lo16(dyld__mach_header-Ldyld_stub_binding_helper$pb)(r12)\n"
79 "Ldyld_lazy_binder:\n"
81 "Ldyld_func_lookup:\n"
86 asm("\t.subsections_via_symbols\n");
88 IDENT("$Id: dylib1.c,v 1.1.1.1 2009/09/04 00:27:35 gmcgarry Exp $");