support.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <dlfcn.h>
#include <libelf.h>
#include <link.h>
#include "debug.h"
#include "msg.h"
#include "_libld.h"
/*
* Table which defines the default functions to be called by the library
* SUPPORT (-S <libname>). These functions can be redefined by the
* ld_support_loadso() routine.
*/
#ifdef _ELF64
#else /* Elf32 */
#endif
};
/*
* Loads in a support shared object specified using the SGS_SUPPORT environment
* variable or the -S ld option, and determines which interface functions are
* provided by that object.
*
* return values for ld_support_loadso:
* 1 - shared object loaded sucessfully
* S_ERROR - aww, damn!
*/
ld_support_loadso(const char *obj)
{
void *handle;
void (*fptr)();
int i;
/*
* Load the required support library. If we are unable to load it fail
* with a fatal error.
*/
return (S_ERROR);
}
for (i = 0; i < LDS_NUM; i++) {
return (S_ERROR);
if (i == LDS_VERSION) {
LDS_VERSION, 0));
if ((ver_level == LD_SUP_VNONE) ||
(ver_level > LD_SUP_VCURRENT)) {
return (S_ERROR);
}
}
return (S_ERROR);
}
}
return (1);
}
/*
* Wrapper routines for the ld support library calls.
*/
void
{
}
}
void
lds_atexit(int exit_code)
{
}
}
void
{
int _flags = 0;
if (!(flags & FLG_IF_CMDLINE))
_flags |= LD_SUP_DERIVED;
if (!(flags & FLG_IF_NEEDED))
if (flags & FLG_IF_EXTRACT)
}
}
{
/*
* This interface was introduced in VERSION2 - so only
* call it for libraries reporting support for
* version 2 or above.
*/
continue;
file);
return (S_ERROR);
}
scnname));
}
return (0);
}
void
{
}
}
void
lds_input_done(void)
{
/*
* This interface was introduced in VERSION2 - so only
* call it for libraries reporting support for
* version 2 or above.
*/
continue;
}
}