_elf.h revision dae2dfb7b2bc52128c80617e060a0ba54ca46aba
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __ELF_DOT_H
#define __ELF_DOT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <elf.h>
#include <_rtld.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Common extern functions for ELF file class.
*/
extern void elf_plt_init(void *, caddr_t);
extern int elf_set_prot(Rt_map *, int);
Rt_map *, const void *);
extern int elf_rtld_load();
#if defined(__sparcv9)
#endif
#if defined(__i386)
extern int elf_copy_gen(Rt_map *);
#endif
/*
* 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_pltreserve; /* ia64: DT_IA_64_PLTRESERVE */
void *e_dynplt; /* dynamic plt table - used by prof */
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.
*/
#ifdef __cplusplus
}
#endif
#endif /* __ELF_DOT_H */