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