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