/*
* 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
*/
/*
*/
#include <stdio.h>
#include <string.h>
#include <libelf.h>
#include "rdb.h"
/*
* Given a symbol index, look up the corresponding symbol from the
* given symbol table.
*
* This function allows the caller to treat the symbol table as a single
* logical entity even though there may be 2 actual ELF symbol tables
* involved. See the comments in Pcontrol.h for details.
*/
static GElf_Sym *
{
/* If index is in range of primary symtab, look it up there */
}
/* Not in primary: Look it up in the auxiliary symtab */
}
{
char *strs;
int i;
else
return (RET_FAILED);
return (RET_FAILED);
}
continue;
continue;
return (RET_OK);
}
return (RET_FAILED);
}
/*
* If two syms are of equal value this routine will
* favor one over the other based off of it's symbol
* type.
*/
static GElf_Sym
{
return (*s1);
return (*s2);
}
if (t1 == STT_OBJECT)
return (*s1);
return (*s2);
}
if (t1 == STT_OBJECT)
return (*s1);
return (*s2);
}
return (*s1);
}
static retc_t
{
int i;
else
return (RET_FAILED);
/*
* normalize address
*/
return (RET_FAILED);
}
continue;
/*
* track both the best local and best
* global fit for this address. Later
* we will favor the global over the local
*/
else {
}
else {
}
}
}
}
return (RET_FAILED);
if (lsymr) {
/*
* If a possible local symbol was found should
* we use it.
*/
}
return (RET_OK);
}
{
return (RET_FAILED);
}
{
return (RET_OK);
}
return (RET_OK);
return (RET_FAILED);
}