_elf.h revision 56deab0745753336570f5c63c3b5fa565eaab8f1
/*
* 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 (c) 1988 AT&T
* All Rights Reserved
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __ELF_DOT_H
#define __ELF_DOT_H
#include <elf.h>
#include <_rtld.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Common extern functions for ELF file class.
*/
extern int elf_config(Rt_map *, int);
extern void elf_config_flt(Lm_list *, const char *, const char *,
#if defined(__i386)
extern int elf_copy_gen(Rt_map *);
#endif
Rt_map *, const void *);
int *);
int *);
int *);
extern void elf_plt_init(void *, caddr_t);
#if defined(__sparcv9)
#endif
ulong_t);
extern int elf_rtld_load();
ulong_t, long);
/*
* Padinfo
*
* Used to track the which PLTpadd entries have been used and
* to where they are bound.
*
* NOTE: these are only currently used for SparcV9
*/
typedef struct pltpadinfo {
void *pp_plt;
} Pltpadinfo;
/*
* Private data for an ELF file class.
*/
typedef struct _rt_elf_private {
void *e_symtab; /* symbol table */
void *e_sunwsymtab; /* symtab augmented with local fcns */
char *e_strtab; /* string table */
void *e_reloc; /* relocation table */
void *e_jmprel; /* plt relocations */
void *e_movetab; /* movetable address */
int e_verneednum; /* their associated count */
int e_verdefnum; /* their associated count */
void *e_pltpad; /* PLTpad table */
void *e_pltpadend; /* end of PLTpad table */
} Rt_elfp;
/*
* Macros for getting to linker ELF private data.
*/
/*
* Most of the above macros are used from ELF specific routines, however there
* are a couple of instances where we need to ensure the file being processed
* is ELF before dereferencing the macro.
*/
#ifdef __cplusplus
}
#endif
#endif /* __ELF_DOT_H */