files.c revision 41072f3cdbe3949252c173e744eb182ef4cc525f
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "_synonyms.h"
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include "msg.h"
#include "_debug.h"
#include "libld.h"
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
else
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_FILES))
return;
if (again)
else
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_FILES))
return;
if (base == 0)
else
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
Dbg_file_delete(const char *name)
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
static int hdl_title = 0;
void
Dbg_file_hdl_title(int type)
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
hdl_title = 1;
/*
* Establish a binding title for later use in Dbg_file_bind_entry.
*/
if (type == DBG_DEP_CREATE)
else if (type == DBG_DEP_ADD)
else if (type == DBG_DEP_DELETE)
else if (type == DBG_DEP_ORPHAN)
else if (type == DBG_DEP_REINST)
else
hdl_str = 0;
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
else
if (hdl_title) {
hdl_title = 0;
}
if (name)
else
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
if (hdl_title) {
if (hdl_str) {
const char *name;
/*
* Protect ourselves in case this handle has no
* originating owner.
*/
else
}
hdl_title = 0;
}
if (type == DBG_DEP_ADD)
else if (type == DBG_DEP_DELETE)
else if (type == DBG_DEP_REMOVE)
else if (type == DBG_DEP_REMAIN)
else
str = 0;
if (str) {
const char *mode;
(RTLD_GLOBAL | RTLD_NODELETE))
else
}
}
#define BINDSZ MSG_STR_OSQBRKT_SIZE + \
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
/*
* Evaluate the binding descriptors flags.
*/
if (flags) {
if (flags & BND_NEEDED)
} else
/*
* Print the dependency together with the modes of the binding.
*/
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_FILES))
return;
if (flag == DBG_DLCLOSE_IGNORE)
else
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
conv_dlflag_str(flags, 0));
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
}
void
Dbg_file_preload(const char *name)
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (config)
else
}
void
{
if (audit) {
return;
} else {
if (DBG_NOTCLASS(DBG_FILES))
return;
if (filter)
else
}
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
int fd;
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
/*
* Obtain the present input object filename for concatenation to the
* prefix name.
*/
else
ofile++;
/*
* Concatenate the prefix with the object filename, open the file and
* write out the present Elf memory image. As this is debugging we
* ignore all errors.
*/
0666)) != -1) {
}
}
}
void
{
const char *str;
if (error == DBG_CONF_IGNORE)
else if (error == DBG_CONF_VERSION)
else if (error == DBG_CONF_PRCFAIL)
else if (error == DBG_CONF_CORRUPT)
else
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (file) {
} else
}
#if !defined(_ELF64)
const Msg
reject[] = {
MSG_REJ_MACH, /* MSG_INTL(MSG_REJ_MACH) */
MSG_REJ_CLASS, /* MSG_INTL(MSG_REJ_CLASS) */
MSG_REJ_DATA, /* MSG_INTL(MSG_REJ_DATA) */
MSG_REJ_TYPE, /* MSG_INTL(MSG_REJ_TYPE) */
MSG_REJ_BADFLAG, /* MSG_INTL(MSG_REJ_BADFLAG) */
MSG_REJ_MISFLAG, /* MSG_INTL(MSG_REJ_MISFLAG) */
MSG_REJ_VERSION, /* MSG_INTL(MSG_REJ_VERSION) */
MSG_REJ_HAL, /* MSG_INTL(MSG_REJ_HAL) */
MSG_REJ_US3, /* MSG_INTL(MSG_REJ_US3) */
MSG_REJ_STR, /* MSG_INTL(MSG_REJ_STR) */
MSG_REJ_UNKFILE, /* MSG_INTL(MSG_REJ_UNKFILE) */
MSG_REJ_HWCAP_1, /* MSG_INTL(MSG_REJ_HWCAP_1) */
};
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
Dbg_file_del_rescan(void)
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
Dbg_file_ar_rescan(void)
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
}
void
{
if (DBG_NOTCLASS(DBG_FILES))
return;
if (DBG_NOTDETAIL())
return;
}
}
#endif