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 /*ARGSUSED*/
36 int
kobj_load_module(struct modctl * modp,int use_path)37 kobj_load_module(struct modctl *modp, int use_path)
38 {
39 return (EINVAL);
40 }
41
42 /*ARGSUSED*/
43 int
kobj_load_primary_module(struct modctl * modp)44 kobj_load_primary_module(struct modctl *modp)
45 {
46 return (-1);
47 }
48
49 /*ARGSUSED*/
50 void
kobj_unload_module(struct modctl * modp)51 kobj_unload_module(struct modctl *modp)
52 {}
53
54 /*ARGSUSED*/
55 int
kobj_path_exists(char * name,int use_path)56 kobj_path_exists(char *name, int use_path)
57 {
58 return (0);
59 }
60
61 /*ARGSUSED*/
62 struct _buf *
kobj_open_path(char * name,int use_path,int use_moddir_suffix)63 kobj_open_path(char *name, int use_path, int use_moddir_suffix)
64 {
65 return (NULL);
66 }
67
68 /*ARGSUSED*/
69 struct _buf *
kobj_open_file(char * name)70 kobj_open_file(char *name)
71 {
72 return (NULL);
73 }
74
75 /*ARGSUSED*/
76 int
kobj_read_file(struct _buf * file,char * buf,unsigned size,unsigned off)77 kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off)
78 {
79 return (-1);
80 }
81
82 /*ARGSUSED*/
83 void
kobj_close_file(struct _buf * file)84 kobj_close_file(struct _buf *file)
85 {}
86
87 /*ARGSUSED*/
88 intptr_t
kobj_open(char * filename)89 kobj_open(char *filename)
90 {
91 return (-1L);
92 }
93
94 /*ARGSUSED*/
95 int
kobj_read(intptr_t descr,char * buf,unsigned size,unsigned offset)96 kobj_read(intptr_t descr, char *buf, unsigned size, unsigned offset)
97 {
98 return (-1);
99 }
100
101 /*ARGSUSED*/
102 void
kobj_close(intptr_t descr)103 kobj_close(intptr_t descr)
104 {}
105
106 /*ARGSUSED*/
107 int
kobj_fstat(intptr_t descr,struct bootstat * buf)108 kobj_fstat(intptr_t descr, struct bootstat *buf)
109 {
110 return (-1);
111 }
112
113 /*ARGSUSED*/
114 int
kobj_get_filesize(struct _buf * file,uint64_t * size)115 kobj_get_filesize(struct _buf *file, uint64_t *size)
116 {
117 return (-1);
118 }
119
120 /*ARGSUSED*/
121 int
kobj_filbuf(struct _buf * f)122 kobj_filbuf(struct _buf *f)
123 {
124 return (-1);
125 }
126
127 /*ARGSUSED*/
128 int
kobj_addrcheck(void * xmp,caddr_t adr)129 kobj_addrcheck(void *xmp, caddr_t adr)
130 {
131 return (1);
132 }
133
134 /*ARGSUSED*/
135 uintptr_t
kobj_getelfsym(char * name,void * mp,int * size)136 kobj_getelfsym(char *name, void *mp, int *size)
137 {
138 return (0);
139 }
140
141 /*ARGSUSED*/
142 void
kobj_getmodinfo(void * xmp,struct modinfo * modinfo)143 kobj_getmodinfo(void *xmp, struct modinfo *modinfo)
144 {}
145
146 void
kobj_getpagesize()147 kobj_getpagesize()
148 {}
149
150 /*ARGSUSED*/
151 char *
kobj_getsymname(uintptr_t value,ulong_t * offset)152 kobj_getsymname(uintptr_t value, ulong_t *offset)
153 {
154 return (NULL);
155 }
156
157 /*ARGSUSED*/
158 uintptr_t
kobj_getsymvalue(char * name,int kernelonly)159 kobj_getsymvalue(char *name, int kernelonly)
160 {
161 return (0);
162 }
163
164 /*ARGSUSED*/
165 char *
kobj_searchsym(struct module * mp,uintptr_t value,ulong_t * offset)166 kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset)
167 {
168 return (NULL);
169 }
170
171 /*ARGSUSED*/
172 uintptr_t
kobj_lookup(struct module * mod,const char * name)173 kobj_lookup(struct module *mod, const char *name)
174 {
175 return (0);
176 }
177
178 /*ARGSUSED*/
179 Sym *
kobj_lookup_all(struct module * mp,char * name,int include_self)180 kobj_lookup_all(struct module *mp, char *name, int include_self)
181 {
182 return (NULL);
183 }
184
185 /*ARGSUSED*/
186 void *
kobj_alloc(size_t size,int flag)187 kobj_alloc(size_t size, int flag)
188 {
189 return (NULL);
190 }
191
192 /*ARGSUSED*/
193 void *
kobj_zalloc(size_t size,int flag)194 kobj_zalloc(size_t size, int flag)
195 {
196 return (NULL);
197 }
198
199 /*ARGSUSED*/
200 void
kobj_free(void * address,size_t size)201 kobj_free(void *address, size_t size)
202 {}
203
204 /*ARGSUSED*/
205 void
kobj_sync(void)206 kobj_sync(void)
207 {}
208
209 /*ARGSUSED*/
210 void
kobj_stat_get(kobj_stat_t * kp)211 kobj_stat_get(kobj_stat_t *kp)
212 {}
213
214 /*ARGSUSED*/
215 void
kobj_sync_instruction_memory(caddr_t addr,size_t size)216 kobj_sync_instruction_memory(caddr_t addr, size_t size)
217 {
218 }
219
220 /*ARGSUSED*/
221 int
kobj_notify_add(kobj_notify_list_t * knp)222 kobj_notify_add(kobj_notify_list_t *knp)
223 {
224 return (-1);
225 }
226
227 /*ARGSUSED*/
228 int
kobj_notify_remove(kobj_notify_list_t * knp)229 kobj_notify_remove(kobj_notify_list_t *knp)
230 {
231 return (-1);
232 }
233
234 /*ARGSUSED*/
235 void
kobj_export_module(struct module * mp)236 kobj_export_module(struct module *mp)
237 {
238 }
239
240 #ifndef sparc
241 void
kobj_boot_unmountroot(void)242 kobj_boot_unmountroot(void)
243 {}
244 #endif
245
246 /*
247 * Dummy declarations for variables in
248 * the stand-alone linker/loader.
249 */
250 char *boot_cpu_compatible_list;
251