xref: /titanic_44/usr/src/uts/common/krtld/kobj_stubs.c (revision e1c679fa4b0ab8c4bcaa6263974ca0c46e5b027f)
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 2006 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_filbuf(struct _buf *f)
118 {
119 	return (-1);
120 }
121 
122 /*ARGSUSED*/
123 int
124 kobj_addrcheck(void *xmp, caddr_t adr)
125 {
126 	return (1);
127 }
128 
129 /*ARGSUSED*/
130 uintptr_t
131 kobj_getelfsym(char *name, void *mp, int *size)
132 {
133 	return (0);
134 }
135 
136 /*ARGSUSED*/
137 void
138 kobj_getmodinfo(void *xmp, struct modinfo *modinfo)
139 {}
140 
141 void
142 kobj_getpagesize()
143 {}
144 
145 /*ARGSUSED*/
146 char *
147 kobj_getsymname(uintptr_t value, ulong_t *offset)
148 {
149 	return (NULL);
150 }
151 
152 /*ARGSUSED*/
153 uintptr_t
154 kobj_getsymvalue(char *name, int kernelonly)
155 {
156 	return (0);
157 }
158 
159 /*ARGSUSED*/
160 char *
161 kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset)
162 {
163 	return (NULL);
164 }
165 
166 /*ARGSUSED*/
167 uintptr_t
168 kobj_lookup(struct module *mod, const char *name)
169 {
170 	return (0);
171 }
172 
173 /*ARGSUSED*/
174 Sym *
175 kobj_lookup_all(struct module *mp, char *name, int include_self)
176 {
177 	return (NULL);
178 }
179 
180 /*ARGSUSED*/
181 void *
182 kobj_alloc(size_t size, int flag)
183 {
184 	return (NULL);
185 }
186 
187 /*ARGSUSED*/
188 void *
189 kobj_zalloc(size_t size, int flag)
190 {
191 	return (NULL);
192 }
193 
194 /*ARGSUSED*/
195 void
196 kobj_free(void *address, size_t size)
197 {}
198 
199 /*ARGSUSED*/
200 void
201 kobj_sync(void)
202 {}
203 
204 /*ARGSUSED*/
205 void
206 kobj_stat_get(kobj_stat_t *kp)
207 {}
208 
209 /*ARGSUSED*/
210 void
211 kobj_sync_instruction_memory(caddr_t addr, size_t size)
212 {
213 }
214 
215 /*ARGSUSED*/
216 int
217 kobj_notify_add(kobj_notify_list_t *knp)
218 {
219 	return (-1);
220 }
221 
222 /*ARGSUSED*/
223 int
224 kobj_notify_remove(kobj_notify_list_t *knp)
225 {
226 	return (-1);
227 }
228 
229 /*ARGSUSED*/
230 void
231 kobj_export_module(struct module *mp)
232 {
233 }
234 
235 #ifndef sparc
236 void
237 kobj_boot_unmountroot(void)
238 {}
239 #endif
240 
241 /*
242  * Dummy declarations for variables in
243  * the stand-alone linker/loader.
244  */
245 void *__tnf_probe_list_head;
246 void *__tnf_tag_list_head;
247 int tnf_changed_probe_list;
248 char *boot_cpu_compatible_list;
249