xref: /titanic_50/usr/src/uts/common/krtld/kobj_stubs.c (revision b1b8ab34de515a5e83206da22c3d7e563241b021)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5ea8dc4b6Seschrock  * Common Development and Distribution License (the "License").
6ea8dc4b6Seschrock  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*b1b8ab34Slling  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #include <sys/kobj.h>
297c478bd9Sstevel@tonic-gate #include <sys/kobj_impl.h>
307c478bd9Sstevel@tonic-gate #include <sys/errno.h>
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate /*
337c478bd9Sstevel@tonic-gate  * Stubs for entry points into
347c478bd9Sstevel@tonic-gate  * the stand-alone linker/loader.
357c478bd9Sstevel@tonic-gate  */
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate /*ARGSUSED*/
387c478bd9Sstevel@tonic-gate int
kobj_load_module(struct modctl * modp,int use_path)397c478bd9Sstevel@tonic-gate kobj_load_module(struct modctl *modp, int use_path)
407c478bd9Sstevel@tonic-gate {
417c478bd9Sstevel@tonic-gate 	return (EINVAL);
427c478bd9Sstevel@tonic-gate }
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate /*ARGSUSED*/
457c478bd9Sstevel@tonic-gate int
kobj_load_primary_module(struct modctl * modp)467c478bd9Sstevel@tonic-gate kobj_load_primary_module(struct modctl *modp)
477c478bd9Sstevel@tonic-gate {
487c478bd9Sstevel@tonic-gate 	return (-1);
497c478bd9Sstevel@tonic-gate }
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /*ARGSUSED*/
527c478bd9Sstevel@tonic-gate void
kobj_unload_module(struct modctl * modp)537c478bd9Sstevel@tonic-gate kobj_unload_module(struct modctl *modp)
547c478bd9Sstevel@tonic-gate {}
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate /*ARGSUSED*/
575c311300Scth int
kobj_path_exists(char * name,int use_path)585c311300Scth kobj_path_exists(char *name, int use_path)
595c311300Scth {
605c311300Scth 	return (0);
615c311300Scth }
625c311300Scth 
635c311300Scth /*ARGSUSED*/
647c478bd9Sstevel@tonic-gate struct _buf *
kobj_open_path(char * name,int use_path,int use_moddir_suffix)657c478bd9Sstevel@tonic-gate kobj_open_path(char *name, int use_path, int use_moddir_suffix)
667c478bd9Sstevel@tonic-gate {
677c478bd9Sstevel@tonic-gate 	return (NULL);
687c478bd9Sstevel@tonic-gate }
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate /*ARGSUSED*/
717c478bd9Sstevel@tonic-gate struct _buf *
kobj_open_file(char * name)727c478bd9Sstevel@tonic-gate kobj_open_file(char *name)
737c478bd9Sstevel@tonic-gate {
747c478bd9Sstevel@tonic-gate 	return (NULL);
757c478bd9Sstevel@tonic-gate }
767c478bd9Sstevel@tonic-gate 
777c478bd9Sstevel@tonic-gate /*ARGSUSED*/
787c478bd9Sstevel@tonic-gate int
kobj_read_file(struct _buf * file,char * buf,unsigned size,unsigned off)797c478bd9Sstevel@tonic-gate kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off)
807c478bd9Sstevel@tonic-gate {
817c478bd9Sstevel@tonic-gate 	return (-1);
827c478bd9Sstevel@tonic-gate }
837c478bd9Sstevel@tonic-gate 
847c478bd9Sstevel@tonic-gate /*ARGSUSED*/
857c478bd9Sstevel@tonic-gate void
kobj_close_file(struct _buf * file)867c478bd9Sstevel@tonic-gate kobj_close_file(struct _buf *file)
877c478bd9Sstevel@tonic-gate {}
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate /*ARGSUSED*/
907c478bd9Sstevel@tonic-gate intptr_t
kobj_open(char * filename)917c478bd9Sstevel@tonic-gate kobj_open(char *filename)
927c478bd9Sstevel@tonic-gate {
937c478bd9Sstevel@tonic-gate 	return (-1L);
947c478bd9Sstevel@tonic-gate }
957c478bd9Sstevel@tonic-gate 
967c478bd9Sstevel@tonic-gate /*ARGSUSED*/
977c478bd9Sstevel@tonic-gate int
kobj_read(intptr_t descr,char * buf,unsigned size,unsigned offset)987c478bd9Sstevel@tonic-gate kobj_read(intptr_t descr, char *buf, unsigned size, unsigned offset)
997c478bd9Sstevel@tonic-gate {
1007c478bd9Sstevel@tonic-gate 	return (-1);
1017c478bd9Sstevel@tonic-gate }
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1047c478bd9Sstevel@tonic-gate void
kobj_close(intptr_t descr)1057c478bd9Sstevel@tonic-gate kobj_close(intptr_t descr)
1067c478bd9Sstevel@tonic-gate {}
1077c478bd9Sstevel@tonic-gate 
1087c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1097c478bd9Sstevel@tonic-gate int
kobj_fstat(intptr_t descr,struct bootstat * buf)110ea8dc4b6Seschrock kobj_fstat(intptr_t descr, struct bootstat *buf)
111ea8dc4b6Seschrock {
112ea8dc4b6Seschrock 	return (-1);
113ea8dc4b6Seschrock }
114ea8dc4b6Seschrock 
115ea8dc4b6Seschrock /*ARGSUSED*/
116ea8dc4b6Seschrock int
kobj_get_filesize(struct _buf * file,uint64_t * size)117*b1b8ab34Slling kobj_get_filesize(struct _buf *file, uint64_t *size)
118*b1b8ab34Slling {
119*b1b8ab34Slling 	return (-1);
120*b1b8ab34Slling }
121*b1b8ab34Slling 
122*b1b8ab34Slling /*ARGSUSED*/
123*b1b8ab34Slling int
kobj_filbuf(struct _buf * f)1247c478bd9Sstevel@tonic-gate kobj_filbuf(struct _buf *f)
1257c478bd9Sstevel@tonic-gate {
1267c478bd9Sstevel@tonic-gate 	return (-1);
1277c478bd9Sstevel@tonic-gate }
1287c478bd9Sstevel@tonic-gate 
1297c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1307c478bd9Sstevel@tonic-gate int
kobj_addrcheck(void * xmp,caddr_t adr)1317c478bd9Sstevel@tonic-gate kobj_addrcheck(void *xmp, caddr_t adr)
1327c478bd9Sstevel@tonic-gate {
1337c478bd9Sstevel@tonic-gate 	return (1);
1347c478bd9Sstevel@tonic-gate }
1357c478bd9Sstevel@tonic-gate 
1367c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1377c478bd9Sstevel@tonic-gate uintptr_t
kobj_getelfsym(char * name,void * mp,int * size)1387c478bd9Sstevel@tonic-gate kobj_getelfsym(char *name, void *mp, int *size)
1397c478bd9Sstevel@tonic-gate {
1407c478bd9Sstevel@tonic-gate 	return (0);
1417c478bd9Sstevel@tonic-gate }
1427c478bd9Sstevel@tonic-gate 
1437c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1447c478bd9Sstevel@tonic-gate void
kobj_getmodinfo(void * xmp,struct modinfo * modinfo)1457c478bd9Sstevel@tonic-gate kobj_getmodinfo(void *xmp, struct modinfo *modinfo)
1467c478bd9Sstevel@tonic-gate {}
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate void
kobj_getpagesize()1497c478bd9Sstevel@tonic-gate kobj_getpagesize()
1507c478bd9Sstevel@tonic-gate {}
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1537c478bd9Sstevel@tonic-gate char *
kobj_getsymname(uintptr_t value,ulong_t * offset)1547c478bd9Sstevel@tonic-gate kobj_getsymname(uintptr_t value, ulong_t *offset)
1557c478bd9Sstevel@tonic-gate {
1567c478bd9Sstevel@tonic-gate 	return (NULL);
1577c478bd9Sstevel@tonic-gate }
1587c478bd9Sstevel@tonic-gate 
1597c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1607c478bd9Sstevel@tonic-gate uintptr_t
kobj_getsymvalue(char * name,int kernelonly)1617c478bd9Sstevel@tonic-gate kobj_getsymvalue(char *name, int kernelonly)
1627c478bd9Sstevel@tonic-gate {
1637c478bd9Sstevel@tonic-gate 	return (0);
1647c478bd9Sstevel@tonic-gate }
1657c478bd9Sstevel@tonic-gate 
1667c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1677c478bd9Sstevel@tonic-gate char *
kobj_searchsym(struct module * mp,uintptr_t value,ulong_t * offset)1687c478bd9Sstevel@tonic-gate kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset)
1697c478bd9Sstevel@tonic-gate {
1707c478bd9Sstevel@tonic-gate 	return (NULL);
1717c478bd9Sstevel@tonic-gate }
1727c478bd9Sstevel@tonic-gate 
1737c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1747c478bd9Sstevel@tonic-gate uintptr_t
kobj_lookup(struct module * mod,const char * name)1757aec1d6eScindi kobj_lookup(struct module *mod, const char *name)
1767c478bd9Sstevel@tonic-gate {
1777c478bd9Sstevel@tonic-gate 	return (0);
1787c478bd9Sstevel@tonic-gate }
1797c478bd9Sstevel@tonic-gate 
1807c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1817c478bd9Sstevel@tonic-gate Sym *
kobj_lookup_all(struct module * mp,char * name,int include_self)1827c478bd9Sstevel@tonic-gate kobj_lookup_all(struct module *mp, char *name, int include_self)
1837c478bd9Sstevel@tonic-gate {
1847c478bd9Sstevel@tonic-gate 	return (NULL);
1857c478bd9Sstevel@tonic-gate }
1867c478bd9Sstevel@tonic-gate 
1877c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1887c478bd9Sstevel@tonic-gate void *
kobj_alloc(size_t size,int flag)1897c478bd9Sstevel@tonic-gate kobj_alloc(size_t size, int flag)
1907c478bd9Sstevel@tonic-gate {
1917c478bd9Sstevel@tonic-gate 	return (NULL);
1927c478bd9Sstevel@tonic-gate }
1937c478bd9Sstevel@tonic-gate 
1947c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1957c478bd9Sstevel@tonic-gate void *
kobj_zalloc(size_t size,int flag)1967c478bd9Sstevel@tonic-gate kobj_zalloc(size_t size, int flag)
1977c478bd9Sstevel@tonic-gate {
1987c478bd9Sstevel@tonic-gate 	return (NULL);
1997c478bd9Sstevel@tonic-gate }
2007c478bd9Sstevel@tonic-gate 
2017c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2027c478bd9Sstevel@tonic-gate void
kobj_free(void * address,size_t size)2037c478bd9Sstevel@tonic-gate kobj_free(void *address, size_t size)
2047c478bd9Sstevel@tonic-gate {}
2057c478bd9Sstevel@tonic-gate 
2067c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2077c478bd9Sstevel@tonic-gate void
kobj_sync(void)2087c478bd9Sstevel@tonic-gate kobj_sync(void)
2097c478bd9Sstevel@tonic-gate {}
2107c478bd9Sstevel@tonic-gate 
2117c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2127c478bd9Sstevel@tonic-gate void
kobj_stat_get(kobj_stat_t * kp)2137c478bd9Sstevel@tonic-gate kobj_stat_get(kobj_stat_t *kp)
2147c478bd9Sstevel@tonic-gate {}
2157c478bd9Sstevel@tonic-gate 
2167c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2177c478bd9Sstevel@tonic-gate void
kobj_sync_instruction_memory(caddr_t addr,size_t size)2187c478bd9Sstevel@tonic-gate kobj_sync_instruction_memory(caddr_t addr, size_t size)
2197c478bd9Sstevel@tonic-gate {
2207c478bd9Sstevel@tonic-gate }
2217c478bd9Sstevel@tonic-gate 
2227c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2237c478bd9Sstevel@tonic-gate int
kobj_notify_add(kobj_notify_list_t * knp)2247c478bd9Sstevel@tonic-gate kobj_notify_add(kobj_notify_list_t *knp)
2257c478bd9Sstevel@tonic-gate {
2267c478bd9Sstevel@tonic-gate 	return (-1);
2277c478bd9Sstevel@tonic-gate }
2287c478bd9Sstevel@tonic-gate 
2297c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2307c478bd9Sstevel@tonic-gate int
kobj_notify_remove(kobj_notify_list_t * knp)2317c478bd9Sstevel@tonic-gate kobj_notify_remove(kobj_notify_list_t *knp)
2327c478bd9Sstevel@tonic-gate {
2337c478bd9Sstevel@tonic-gate 	return (-1);
2347c478bd9Sstevel@tonic-gate }
2357c478bd9Sstevel@tonic-gate 
2367c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2377c478bd9Sstevel@tonic-gate void
kobj_export_module(struct module * mp)2387c478bd9Sstevel@tonic-gate kobj_export_module(struct module *mp)
2397c478bd9Sstevel@tonic-gate {
2407c478bd9Sstevel@tonic-gate }
2417c478bd9Sstevel@tonic-gate 
2427c478bd9Sstevel@tonic-gate #ifndef sparc
2437c478bd9Sstevel@tonic-gate void
kobj_boot_unmountroot(void)2447c478bd9Sstevel@tonic-gate kobj_boot_unmountroot(void)
2457c478bd9Sstevel@tonic-gate {}
2467c478bd9Sstevel@tonic-gate #endif
2477c478bd9Sstevel@tonic-gate 
2487c478bd9Sstevel@tonic-gate /*
2497c478bd9Sstevel@tonic-gate  * Dummy declarations for variables in
2507c478bd9Sstevel@tonic-gate  * the stand-alone linker/loader.
2517c478bd9Sstevel@tonic-gate  */
2527c478bd9Sstevel@tonic-gate void *__tnf_probe_list_head;
2537c478bd9Sstevel@tonic-gate void *__tnf_tag_list_head;
2547c478bd9Sstevel@tonic-gate int tnf_changed_probe_list;
2557c478bd9Sstevel@tonic-gate char *boot_cpu_compatible_list;
256