Print this page
12399 kobj printf functions should be checked


   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 /*
  27  * Kernel Run-Time Linker/Loader private interfaces.
  28  */
  29 
  30 #ifndef _SYS_KOBJ_IMPL_H
  31 #define _SYS_KOBJ_IMPL_H
  32 
  33 #include <sys/kdi.h>
  34 #include <sys/kobj.h>
  35 #include <sys/varargs.h>
  36 
  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 /*
  42  * Boot/aux vector attributes.
  43  */


 167 extern int do_relocate(struct module *, char *, int, int, Addr);
 168 extern struct bootops *ops;
 169 extern void exitto(caddr_t);
 170 extern void kobj_sync_instruction_memory(caddr_t, size_t);
 171 extern uint_t kobj_gethashsize(uint_t);
 172 extern void * kobj_mod_alloc(struct module *, size_t, int, reloc_dest_t *);
 173 extern void mach_alloc_funcdesc(struct module *);
 174 extern uint_t kobj_hash_name(const char *);
 175 extern caddr_t kobj_segbrk(caddr_t *, size_t, size_t, caddr_t);
 176 extern int get_progbits_size(struct module *, struct proginfo *,
 177         struct proginfo *, struct proginfo *);
 178 extern Sym *kobj_lookup_kernel(const char *);
 179 extern struct modctl *kobj_boot_mod_lookup(const char *);
 180 extern void kobj_export_module(struct module *);
 181 extern int kobj_load_primary_module(struct modctl *);
 182 extern int boot_compinfo(int, struct compinfo *);
 183 extern void mach_modpath(char *, const char *);
 184 
 185 extern void kobj_setup_standalone_vectors(void);
 186 extern void kobj_restore_vectors(void);
 187 extern void (*_kobj_printf)(void *, const char *fmt, ...);
 188 extern void (*_vkobj_printf)(void *, const char *fmt, va_list);

 189 extern void (*kobj_bcopy)(const void *, void *, size_t);
 190 extern void (*kobj_bzero)(void *, size_t);
 191 extern size_t (*kobj_strlcat)(char *, const char *, size_t);
 192 
 193 #define KOBJ_LM_PRIMARY         0x0
 194 #define KOBJ_LM_DEBUGGER        0x1
 195 
 196 extern void kobj_lm_append(int, struct modctl *modp);
 197 extern struct modctl_list *kobj_lm_lookup(int);
 198 extern void kobj_lm_dump(int);
 199 
 200 #ifdef  __cplusplus
 201 }
 202 #endif
 203 
 204 #endif  /* _SYS_KOBJ_IMPL_H */


   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  * Copyright 2020 Joyent, Inc.
  26  */
  27 
  28 /*
  29  * Kernel Run-Time Linker/Loader private interfaces.
  30  */
  31 
  32 #ifndef _SYS_KOBJ_IMPL_H
  33 #define _SYS_KOBJ_IMPL_H
  34 
  35 #include <sys/kdi.h>
  36 #include <sys/kobj.h>
  37 #include <sys/varargs.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * Boot/aux vector attributes.
  45  */


 169 extern int do_relocate(struct module *, char *, int, int, Addr);
 170 extern struct bootops *ops;
 171 extern void exitto(caddr_t);
 172 extern void kobj_sync_instruction_memory(caddr_t, size_t);
 173 extern uint_t kobj_gethashsize(uint_t);
 174 extern void * kobj_mod_alloc(struct module *, size_t, int, reloc_dest_t *);
 175 extern void mach_alloc_funcdesc(struct module *);
 176 extern uint_t kobj_hash_name(const char *);
 177 extern caddr_t kobj_segbrk(caddr_t *, size_t, size_t, caddr_t);
 178 extern int get_progbits_size(struct module *, struct proginfo *,
 179         struct proginfo *, struct proginfo *);
 180 extern Sym *kobj_lookup_kernel(const char *);
 181 extern struct modctl *kobj_boot_mod_lookup(const char *);
 182 extern void kobj_export_module(struct module *);
 183 extern int kobj_load_primary_module(struct modctl *);
 184 extern int boot_compinfo(int, struct compinfo *);
 185 extern void mach_modpath(char *, const char *);
 186 
 187 extern void kobj_setup_standalone_vectors(void);
 188 extern void kobj_restore_vectors(void);
 189 extern void (*_kobj_printf)(void *, const char *fmt, ...) __KPRINTFLIKE(2);
 190 extern void (*_vkobj_printf)(void *, const char *fmt, va_list)
 191     __KVPRINTFLIKE(2);
 192 extern void (*kobj_bcopy)(const void *, void *, size_t);
 193 extern void (*kobj_bzero)(void *, size_t);
 194 extern size_t (*kobj_strlcat)(char *, const char *, size_t);
 195 
 196 #define KOBJ_LM_PRIMARY         0x0
 197 #define KOBJ_LM_DEBUGGER        0x1
 198 
 199 extern void kobj_lm_append(int, struct modctl *modp);
 200 extern struct modctl_list *kobj_lm_lookup(int);
 201 extern void kobj_lm_dump(int);
 202 
 203 #ifdef  __cplusplus
 204 }
 205 #endif
 206 
 207 #endif  /* _SYS_KOBJ_IMPL_H */