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