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