xref: /onnv-gate/usr/src/uts/common/krtld/kobj_stubs.c (revision 3912:f6891a60bd72)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51544Seschrock  * Common Development and Distribution License (the "License").
61544Seschrock  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*3912Slling  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #include <sys/kobj.h>
290Sstevel@tonic-gate #include <sys/kobj_impl.h>
300Sstevel@tonic-gate #include <sys/errno.h>
310Sstevel@tonic-gate 
320Sstevel@tonic-gate /*
330Sstevel@tonic-gate  * Stubs for entry points into
340Sstevel@tonic-gate  * the stand-alone linker/loader.
350Sstevel@tonic-gate  */
360Sstevel@tonic-gate 
370Sstevel@tonic-gate /*ARGSUSED*/
380Sstevel@tonic-gate int
kobj_load_module(struct modctl * modp,int use_path)390Sstevel@tonic-gate kobj_load_module(struct modctl *modp, int use_path)
400Sstevel@tonic-gate {
410Sstevel@tonic-gate 	return (EINVAL);
420Sstevel@tonic-gate }
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /*ARGSUSED*/
450Sstevel@tonic-gate int
kobj_load_primary_module(struct modctl * modp)460Sstevel@tonic-gate kobj_load_primary_module(struct modctl *modp)
470Sstevel@tonic-gate {
480Sstevel@tonic-gate 	return (-1);
490Sstevel@tonic-gate }
500Sstevel@tonic-gate 
510Sstevel@tonic-gate /*ARGSUSED*/
520Sstevel@tonic-gate void
kobj_unload_module(struct modctl * modp)530Sstevel@tonic-gate kobj_unload_module(struct modctl *modp)
540Sstevel@tonic-gate {}
550Sstevel@tonic-gate 
560Sstevel@tonic-gate /*ARGSUSED*/
57309Scth int
kobj_path_exists(char * name,int use_path)58309Scth kobj_path_exists(char *name, int use_path)
59309Scth {
60309Scth 	return (0);
61309Scth }
62309Scth 
63309Scth /*ARGSUSED*/
640Sstevel@tonic-gate struct _buf *
kobj_open_path(char * name,int use_path,int use_moddir_suffix)650Sstevel@tonic-gate kobj_open_path(char *name, int use_path, int use_moddir_suffix)
660Sstevel@tonic-gate {
670Sstevel@tonic-gate 	return (NULL);
680Sstevel@tonic-gate }
690Sstevel@tonic-gate 
700Sstevel@tonic-gate /*ARGSUSED*/
710Sstevel@tonic-gate struct _buf *
kobj_open_file(char * name)720Sstevel@tonic-gate kobj_open_file(char *name)
730Sstevel@tonic-gate {
740Sstevel@tonic-gate 	return (NULL);
750Sstevel@tonic-gate }
760Sstevel@tonic-gate 
770Sstevel@tonic-gate /*ARGSUSED*/
780Sstevel@tonic-gate int
kobj_read_file(struct _buf * file,char * buf,unsigned size,unsigned off)790Sstevel@tonic-gate kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off)
800Sstevel@tonic-gate {
810Sstevel@tonic-gate 	return (-1);
820Sstevel@tonic-gate }
830Sstevel@tonic-gate 
840Sstevel@tonic-gate /*ARGSUSED*/
850Sstevel@tonic-gate void
kobj_close_file(struct _buf * file)860Sstevel@tonic-gate kobj_close_file(struct _buf *file)
870Sstevel@tonic-gate {}
880Sstevel@tonic-gate 
890Sstevel@tonic-gate /*ARGSUSED*/
900Sstevel@tonic-gate intptr_t
kobj_open(char * filename)910Sstevel@tonic-gate kobj_open(char *filename)
920Sstevel@tonic-gate {
930Sstevel@tonic-gate 	return (-1L);
940Sstevel@tonic-gate }
950Sstevel@tonic-gate 
960Sstevel@tonic-gate /*ARGSUSED*/
970Sstevel@tonic-gate int
kobj_read(intptr_t descr,char * buf,unsigned size,unsigned offset)980Sstevel@tonic-gate kobj_read(intptr_t descr, char *buf, unsigned size, unsigned offset)
990Sstevel@tonic-gate {
1000Sstevel@tonic-gate 	return (-1);
1010Sstevel@tonic-gate }
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate /*ARGSUSED*/
1040Sstevel@tonic-gate void
kobj_close(intptr_t descr)1050Sstevel@tonic-gate kobj_close(intptr_t descr)
1060Sstevel@tonic-gate {}
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate /*ARGSUSED*/
1090Sstevel@tonic-gate int
kobj_fstat(intptr_t descr,struct bootstat * buf)1101544Seschrock kobj_fstat(intptr_t descr, struct bootstat *buf)
1111544Seschrock {
1121544Seschrock 	return (-1);
1131544Seschrock }
1141544Seschrock 
1151544Seschrock /*ARGSUSED*/
1161544Seschrock int
kobj_get_filesize(struct _buf * file,uint64_t * size)117*3912Slling kobj_get_filesize(struct _buf *file, uint64_t *size)
118*3912Slling {
119*3912Slling 	return (-1);
120*3912Slling }
121*3912Slling 
122*3912Slling /*ARGSUSED*/
123*3912Slling int
kobj_filbuf(struct _buf * f)1240Sstevel@tonic-gate kobj_filbuf(struct _buf *f)
1250Sstevel@tonic-gate {
1260Sstevel@tonic-gate 	return (-1);
1270Sstevel@tonic-gate }
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate /*ARGSUSED*/
1300Sstevel@tonic-gate int
kobj_addrcheck(void * xmp,caddr_t adr)1310Sstevel@tonic-gate kobj_addrcheck(void *xmp, caddr_t adr)
1320Sstevel@tonic-gate {
1330Sstevel@tonic-gate 	return (1);
1340Sstevel@tonic-gate }
1350Sstevel@tonic-gate 
1360Sstevel@tonic-gate /*ARGSUSED*/
1370Sstevel@tonic-gate uintptr_t
kobj_getelfsym(char * name,void * mp,int * size)1380Sstevel@tonic-gate kobj_getelfsym(char *name, void *mp, int *size)
1390Sstevel@tonic-gate {
1400Sstevel@tonic-gate 	return (0);
1410Sstevel@tonic-gate }
1420Sstevel@tonic-gate 
1430Sstevel@tonic-gate /*ARGSUSED*/
1440Sstevel@tonic-gate void
kobj_getmodinfo(void * xmp,struct modinfo * modinfo)1450Sstevel@tonic-gate kobj_getmodinfo(void *xmp, struct modinfo *modinfo)
1460Sstevel@tonic-gate {}
1470Sstevel@tonic-gate 
1480Sstevel@tonic-gate void
kobj_getpagesize()1490Sstevel@tonic-gate kobj_getpagesize()
1500Sstevel@tonic-gate {}
1510Sstevel@tonic-gate 
1520Sstevel@tonic-gate /*ARGSUSED*/
1530Sstevel@tonic-gate char *
kobj_getsymname(uintptr_t value,ulong_t * offset)1540Sstevel@tonic-gate kobj_getsymname(uintptr_t value, ulong_t *offset)
1550Sstevel@tonic-gate {
1560Sstevel@tonic-gate 	return (NULL);
1570Sstevel@tonic-gate }
1580Sstevel@tonic-gate 
1590Sstevel@tonic-gate /*ARGSUSED*/
1600Sstevel@tonic-gate uintptr_t
kobj_getsymvalue(char * name,int kernelonly)1610Sstevel@tonic-gate kobj_getsymvalue(char *name, int kernelonly)
1620Sstevel@tonic-gate {
1630Sstevel@tonic-gate 	return (0);
1640Sstevel@tonic-gate }
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate /*ARGSUSED*/
1670Sstevel@tonic-gate char *
kobj_searchsym(struct module * mp,uintptr_t value,ulong_t * offset)1680Sstevel@tonic-gate kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset)
1690Sstevel@tonic-gate {
1700Sstevel@tonic-gate 	return (NULL);
1710Sstevel@tonic-gate }
1720Sstevel@tonic-gate 
1730Sstevel@tonic-gate /*ARGSUSED*/
1740Sstevel@tonic-gate uintptr_t
kobj_lookup(struct module * mod,const char * name)1751414Scindi kobj_lookup(struct module *mod, const char *name)
1760Sstevel@tonic-gate {
1770Sstevel@tonic-gate 	return (0);
1780Sstevel@tonic-gate }
1790Sstevel@tonic-gate 
1800Sstevel@tonic-gate /*ARGSUSED*/
1810Sstevel@tonic-gate Sym *
kobj_lookup_all(struct module * mp,char * name,int include_self)1820Sstevel@tonic-gate kobj_lookup_all(struct module *mp, char *name, int include_self)
1830Sstevel@tonic-gate {
1840Sstevel@tonic-gate 	return (NULL);
1850Sstevel@tonic-gate }
1860Sstevel@tonic-gate 
1870Sstevel@tonic-gate /*ARGSUSED*/
1880Sstevel@tonic-gate void *
kobj_alloc(size_t size,int flag)1890Sstevel@tonic-gate kobj_alloc(size_t size, int flag)
1900Sstevel@tonic-gate {
1910Sstevel@tonic-gate 	return (NULL);
1920Sstevel@tonic-gate }
1930Sstevel@tonic-gate 
1940Sstevel@tonic-gate /*ARGSUSED*/
1950Sstevel@tonic-gate void *
kobj_zalloc(size_t size,int flag)1960Sstevel@tonic-gate kobj_zalloc(size_t size, int flag)
1970Sstevel@tonic-gate {
1980Sstevel@tonic-gate 	return (NULL);
1990Sstevel@tonic-gate }
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate /*ARGSUSED*/
2020Sstevel@tonic-gate void
kobj_free(void * address,size_t size)2030Sstevel@tonic-gate kobj_free(void *address, size_t size)
2040Sstevel@tonic-gate {}
2050Sstevel@tonic-gate 
2060Sstevel@tonic-gate /*ARGSUSED*/
2070Sstevel@tonic-gate void
kobj_sync(void)2080Sstevel@tonic-gate kobj_sync(void)
2090Sstevel@tonic-gate {}
2100Sstevel@tonic-gate 
2110Sstevel@tonic-gate /*ARGSUSED*/
2120Sstevel@tonic-gate void
kobj_stat_get(kobj_stat_t * kp)2130Sstevel@tonic-gate kobj_stat_get(kobj_stat_t *kp)
2140Sstevel@tonic-gate {}
2150Sstevel@tonic-gate 
2160Sstevel@tonic-gate /*ARGSUSED*/
2170Sstevel@tonic-gate void
kobj_sync_instruction_memory(caddr_t addr,size_t size)2180Sstevel@tonic-gate kobj_sync_instruction_memory(caddr_t addr, size_t size)
2190Sstevel@tonic-gate {
2200Sstevel@tonic-gate }
2210Sstevel@tonic-gate 
2220Sstevel@tonic-gate /*ARGSUSED*/
2230Sstevel@tonic-gate int
kobj_notify_add(kobj_notify_list_t * knp)2240Sstevel@tonic-gate kobj_notify_add(kobj_notify_list_t *knp)
2250Sstevel@tonic-gate {
2260Sstevel@tonic-gate 	return (-1);
2270Sstevel@tonic-gate }
2280Sstevel@tonic-gate 
2290Sstevel@tonic-gate /*ARGSUSED*/
2300Sstevel@tonic-gate int
kobj_notify_remove(kobj_notify_list_t * knp)2310Sstevel@tonic-gate kobj_notify_remove(kobj_notify_list_t *knp)
2320Sstevel@tonic-gate {
2330Sstevel@tonic-gate 	return (-1);
2340Sstevel@tonic-gate }
2350Sstevel@tonic-gate 
2360Sstevel@tonic-gate /*ARGSUSED*/
2370Sstevel@tonic-gate void
kobj_export_module(struct module * mp)2380Sstevel@tonic-gate kobj_export_module(struct module *mp)
2390Sstevel@tonic-gate {
2400Sstevel@tonic-gate }
2410Sstevel@tonic-gate 
2420Sstevel@tonic-gate #ifndef sparc
2430Sstevel@tonic-gate void
kobj_boot_unmountroot(void)2440Sstevel@tonic-gate kobj_boot_unmountroot(void)
2450Sstevel@tonic-gate {}
2460Sstevel@tonic-gate #endif
2470Sstevel@tonic-gate 
2480Sstevel@tonic-gate /*
2490Sstevel@tonic-gate  * Dummy declarations for variables in
2500Sstevel@tonic-gate  * the stand-alone linker/loader.
2510Sstevel@tonic-gate  */
2520Sstevel@tonic-gate void *__tnf_probe_list_head;
2530Sstevel@tonic-gate void *__tnf_tag_list_head;
2540Sstevel@tonic-gate int tnf_changed_probe_list;
2550Sstevel@tonic-gate char *boot_cpu_compatible_list;
256