/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __RTLD_DB_H
#define __RTLD_DB_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <proc_service.h>
#include <thread.h>
#include <synch.h>
#include <sgs.h>
#include <machdep.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Brand helper libraries must name their ops vector using this macro.
*/
#ifdef _LP64
#ifdef _ELF64
#else /* !_ELF64 */
#endif /* !_ELF64 */
#else /* !_LP64 */
#endif /* !_LP64 */
/*
* State kept for brand helper libraries
*
* All librtld_db brand plugin libraries need to specify a Lmid_t value
* that controls how link map ids are assigned to native solaris objects
* (as pointed to by the processes aux vectors) which are enumerated by
* librtld_db. In most cases this value will either be LM_ID_NONE or
* LM_ID_BRAND.
*
* If LM_ID_NONE is specified in the structure below, then when native solaris
* objects are enumerated by librtld_db, their link map id values will match
* the link map ids assigned to those objects by the solaris linker within
* the target process.
*
* If LM_ID_BRAND is specified in the structure below, then when native solaris
* objects are enumerated by librtld_db, their link map id value will be
* explicity set to LM_ID_BRAND, regardless of the link map ids assigned to
* those objects by the solaris linker within the target process.
*
* In all cases the librtld_db brand plugin library can report any link
* map id value that it wants for objects that it enumerates via it's
* rho_loadobj_iter() entry point.
*/
typedef struct rd_helper_ops {
struct ps_prochandle *);
rl_iter_f *, void *);
typedef struct rd_helper {
void *rh_dlhandle;
} rd_helper_t;
struct rd_agent {
};
/*
* Values for rd_flags
*/
(void) mutex_lock(&glob_mutex); \
if (rtld_db_logging) \
func; \
(void) mutex_unlock(&glob_mutex); \
}
extern mutex_t glob_mutex;
extern int rtld_db_version;
extern int rtld_db_logging;
psaddr_t *);
psaddr_t, rd_plt_info_t *);
#ifdef _LP64
psaddr_t, rd_plt_info_t *);
#endif
#ifdef __cplusplus
}
#endif
#endif /* __RTLD_DB_H */