1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 #include <sys/kobj.h> 30 #include <sys/kobj_impl.h> 31 #include <sys/errno.h> 32 33 /* 34 * Stubs for entry points into 35 * the stand-alone linker/loader. 36 */ 37 38 /*ARGSUSED*/ 39 int 40 kobj_load_module(struct modctl *modp, int use_path) 41 { 42 return (EINVAL); 43 } 44 45 /*ARGSUSED*/ 46 int 47 kobj_load_primary_module(struct modctl *modp) 48 { 49 return (-1); 50 } 51 52 /*ARGSUSED*/ 53 void 54 kobj_unload_module(struct modctl *modp) 55 {} 56 57 /*ARGSUSED*/ 58 struct _buf * 59 kobj_open_path(char *name, int use_path, int use_moddir_suffix) 60 { 61 return (NULL); 62 } 63 64 /*ARGSUSED*/ 65 struct _buf * 66 kobj_open_file(char *name) 67 { 68 return (NULL); 69 } 70 71 /*ARGSUSED*/ 72 int 73 kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off) 74 { 75 return (-1); 76 } 77 78 /*ARGSUSED*/ 79 void 80 kobj_close_file(struct _buf *file) 81 {} 82 83 /*ARGSUSED*/ 84 intptr_t 85 kobj_open(char *filename) 86 { 87 return (-1L); 88 } 89 90 /*ARGSUSED*/ 91 int 92 kobj_read(intptr_t descr, char *buf, unsigned size, unsigned offset) 93 { 94 return (-1); 95 } 96 97 /*ARGSUSED*/ 98 void 99 kobj_close(intptr_t descr) 100 {} 101 102 /*ARGSUSED*/ 103 int 104 kobj_filbuf(struct _buf *f) 105 { 106 return (-1); 107 } 108 109 /*ARGSUSED*/ 110 int 111 kobj_addrcheck(void *xmp, caddr_t adr) 112 { 113 return (1); 114 } 115 116 /*ARGSUSED*/ 117 uintptr_t 118 kobj_getelfsym(char *name, void *mp, int *size) 119 { 120 return (0); 121 } 122 123 /*ARGSUSED*/ 124 void 125 kobj_getmodinfo(void *xmp, struct modinfo *modinfo) 126 {} 127 128 void 129 kobj_getpagesize() 130 {} 131 132 /*ARGSUSED*/ 133 char * 134 kobj_getsymname(uintptr_t value, ulong_t *offset) 135 { 136 return (NULL); 137 } 138 139 /*ARGSUSED*/ 140 uintptr_t 141 kobj_getsymvalue(char *name, int kernelonly) 142 { 143 return (0); 144 } 145 146 /*ARGSUSED*/ 147 char * 148 kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset) 149 { 150 return (NULL); 151 } 152 153 /*ARGSUSED*/ 154 uintptr_t 155 kobj_lookup(void *mod, char *name) 156 { 157 return (0); 158 } 159 160 /*ARGSUSED*/ 161 Sym * 162 kobj_lookup_all(struct module *mp, char *name, int include_self) 163 { 164 return (NULL); 165 } 166 167 /*ARGSUSED*/ 168 void * 169 kobj_alloc(size_t size, int flag) 170 { 171 return (NULL); 172 } 173 174 /*ARGSUSED*/ 175 void * 176 kobj_zalloc(size_t size, int flag) 177 { 178 return (NULL); 179 } 180 181 /*ARGSUSED*/ 182 void 183 kobj_free(void *address, size_t size) 184 {} 185 186 /*ARGSUSED*/ 187 void 188 kobj_sync(void) 189 {} 190 191 /*ARGSUSED*/ 192 void 193 kobj_stat_get(kobj_stat_t *kp) 194 {} 195 196 /*ARGSUSED*/ 197 void 198 kobj_sync_instruction_memory(caddr_t addr, size_t size) 199 { 200 } 201 202 /*ARGSUSED*/ 203 int 204 kobj_notify_add(kobj_notify_list_t *knp) 205 { 206 return (-1); 207 } 208 209 /*ARGSUSED*/ 210 int 211 kobj_notify_remove(kobj_notify_list_t *knp) 212 { 213 return (-1); 214 } 215 216 /*ARGSUSED*/ 217 void 218 kobj_export_module(struct module *mp) 219 { 220 } 221 222 #ifndef sparc 223 void 224 kobj_boot_unmountroot(void) 225 {} 226 #endif 227 228 /* 229 * Dummy declarations for variables in 230 * the stand-alone linker/loader. 231 */ 232 void *__tnf_probe_list_head; 233 void *__tnf_tag_list_head; 234 int tnf_changed_probe_list; 235 char *boot_cpu_compatible_list; 236