_libld.h revision 4899432a4abc50d8c3d81d5faf257b92517b7716
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Local include file for ld library.
*/
#ifndef _LIBLD_DOT_H
#define _LIBLD_DOT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <libld.h>
#include <_libelf.h>
#include <debug.h>
#include <conv.h>
#include <msg.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Types of segment index.
*/
typedef enum {
#endif
#endif
} Segment_ndx;
/*
* Types of bss sections
*/
typedef enum {
} Bss_Type;
/*
* Structure to manage the update of weak symbols from their associated alias.
*/
typedef struct wk_desc {
} Wk_desc;
/*
* Structure to manage the support library interfaces.
*/
typedef struct func_list {
const char *fl_obj; /* name of support object */
/* function is from */
void (*fl_fptr)(); /* function pointer */
} Func_list;
typedef struct support_list {
const char *sup_name; /* ld_support function name */
} Support_list;
/*
* Structure to manage a sorted output relocation list.
*
* rl_key1 -> pointer to needed ndx
* rl_key2 -> pointer to symbol relocation is against
* rl_key3 -> virtual offset of relocation
*/
typedef struct reloc_list {
} Reloc_list;
typedef struct sym_s_list {
} Sym_s_list;
/*
* ld heap management structure
*/
struct _ld_heap {
void *lh_free;
void *lh_end;
};
/*
* Dynamic per-symbol filtee string table descriptor. This associates filtee
* strings that will be created in the .dynstr, with .dynamic entries.
*/
typedef struct {
char *dft_str; /* dynstr string */
} Dfltr_desc;
/*
* Per-symbol filtee descriptor. This associates symbol definitions with
* their filtees.
*/
typedef struct {
} Sfltr_desc;
/*
* Define Alist initialization sizes.
*/
/*
* Return codes for {tls|got}_fixups() routines
*/
typedef enum {
FIX_ERROR, /* fatal error - time to punt */
FIX_DONE, /* relocation done - no further processing required */
FIX_RELOC /* do_reloc() relocation processing required */
} Fixupret;
#ifndef FILENAME_MAX
#endif
/*
* Relocation buckets are sized based on the number of input relocations and
* the following constants.
*/
extern char *Plibpath;
extern char *Llibdir;
extern char *Ulibdir;
extern List lib_support;
extern int demangle_flag;
extern int Verbose;
/*
*/
extern int dz_fd;
/*
* Local functions.
*/
extern char *add_string(char *, char *);
extern const char *demangle(const char *);
extern void lds_atexit(Ofl_desc *, int);
extern void libld_free(void *);
extern void *libld_malloc(size_t);
extern void *libld_realloc(void *, size_t);
#if defined(_ELF64)
#define ld_add_actrel ld64_add_actrel
#define ld_add_libdir ld64_add_libdir
#define ld_add_outrel ld64_add_outrel
#define ld_adj_movereloc ld64_adj_movereloc
#define ld_am_I_partial ld64_am_I_partial
#define ld_ar_member ld64_ar_member
#define ld_ar_setup ld64_ar_setup
#if defined(sparc)
#define ld_allocate_got ld64_allocate_got
#endif
#define ld_assign_got ld64_assign_got
#define ld_assign_gotndx ld64_assign_gotndx
#define ld_assign_plt_ndx ld64_assign_plt_ndx
#define ld_calc_plt_addr ld64_calc_plt_addr
#define ld_disp_errmsg ld64_disp_errmsg
#define ld_ent_check ld64_ent_check
#define ld_fillin_gotplt ld64_fillin_gotplt
#define ld_find_gotndx ld64_find_gotndx
#define ld_find_library ld64_find_library
#define ld_finish_libs ld64_finish_libs
#define ld_get_group ld64_get_group
#define ld_lib_setup ld64_lib_setup
#define ld_init_rel ld64_init_rel
#define ld_is_regsym ld64_is_regsym
#define ld_mach_eflags ld64_mach_eflags
#define ld_make_bss ld64_make_bss
#define ld_make_got ld64_make_got
#define ld_map_out ld64_map_out
#define ld_map_parse ld64_map_parse
#define ld_make_sunwbss ld64_make_sunwbss
#define ld_make_sunwdata ld64_make_sunwdata
#define ld_make_sunwmove ld64_make_sunmove
#define ld_open_outfile ld64_open_outfile
#define ld_place_section ld64_place_section
#define ld_process_files ld64_process_files
#define ld_process_flags ld64_process_flags
#define ld_process_ifl ld64_process_ifl
#define ld_process_open ld64_process_open
#define ld_reloc_local ld64_reloc_local
#define ld_reloc_GOTOP ld64_reloc_GOTOP
#define ld_reloc_plt ld64_reloc_plt
#define ld_reloc_register ld64_reloc_register
#define ld_reloc_TLS ld64_reloc_TLS
#define ld_reg_check ld64_reg_check
#define ld_reg_enter ld64_reg_enter
#define ld_reg_find ld64_reg_find
#define ld_sec_validate ld64_sec_validate
#define ld_sort_ordered ld64_sort_ordered
#define ld_sort_seg_list ld64_sort_seg_list
#define ld_sup_atexit ld64_sup_atexit
#define ld_sup_file ld64_sup_file
#define ld_sup_loadso ld64_sup_loadso
#define ld_sup_input_done ld64_sup_input_done
#define ld_sup_section ld64_sup_section
#define ld_sup_start ld64_sup_start
#define ld_sym_add_u ld64_sym_add_u
#define ld_sym_adjust_vis ld64_sym_adjust_vis
#define ld_sym_avl_comp ld64_sym_avl_comp
#define ld_sym_copy ld64_sym_copy
#define ld_sym_enter ld64_sym_enter
#define ld_sym_find ld64_sym_find
#define ld_sym_nodirect ld64_sym_nodirect
#define ld_sym_process ld64_sym_process
#define ld_sym_resolve ld64_sym_resolve
#define ld_sym_spec ld64_sym_spec
#define ld_vers_base ld64_vers_base
#define ld_vers_desc ld64_vers_desc
#define ld_vers_find ld64_vers_find
#define ld_vers_promote ld64_vers_promote
#define ld_vers_verify ld64_vers_verify
#else
#define ld_add_actrel ld32_add_actrel
#define ld_add_libdir ld32_add_libdir
#define ld_add_outrel ld32_add_outrel
#define ld_adj_movereloc ld32_adj_movereloc
#define ld_am_I_partial ld32_am_I_partial
#define ld_ar_member ld32_ar_member
#define ld_ar_setup ld32_ar_setup
#if defined(sparc)
#define ld_allocate_got ld32_allocate_got
#endif
#define ld_assign_got ld32_assign_got
#define ld_assign_gotndx ld32_assign_gotndx
#define ld_assign_plt_ndx ld32_assign_plt_ndx
#define ld_calc_plt_addr ld32_calc_plt_addr
#define ld_disp_errmsg ld32_disp_errmsg
#define ld_ent_check ld32_ent_check
#define ld_fillin_gotplt ld32_fillin_gotplt
#define ld_find_gotndx ld32_find_gotndx
#define ld_find_library ld32_find_library
#define ld_finish_libs ld32_finish_libs
#define ld_get_group ld32_get_group
#define ld_lib_setup ld32_lib_setup
#define ld_init_rel ld32_init_rel
#define ld_is_regsym ld32_is_regsym
#define ld_mach_eflags ld32_mach_eflags
#define ld_make_bss ld32_make_bss
#define ld_make_got ld32_make_got
#define ld_map_out ld32_map_out
#define ld_map_parse ld32_map_parse
#define ld_make_sunwbss ld32_make_sunwbss
#define ld_make_sunwdata ld32_make_sunwdata
#define ld_make_sunwmove ld32_make_sunmove
#define ld_open_outfile ld32_open_outfile
#define ld_place_section ld32_place_section
#define ld_process_files ld32_process_files
#define ld_process_flags ld32_process_flags
#define ld_process_ifl ld32_process_ifl
#define ld_process_open ld32_process_open
#define ld_reloc_local ld32_reloc_local
#define ld_reloc_GOTOP ld32_reloc_GOTOP
#define ld_reloc_plt ld32_reloc_plt
#define ld_reloc_register ld32_reloc_register
#define ld_reloc_TLS ld32_reloc_TLS
#define ld_reg_check ld32_reg_check
#define ld_reg_enter ld32_reg_enter
#define ld_reg_find ld32_reg_find
#define ld_sec_validate ld32_sec_validate
#define ld_sort_ordered ld32_sort_ordered
#define ld_sort_seg_list ld32_sort_seg_list
#define ld_sup_atexit ld32_sup_atexit
#define ld_sup_file ld32_sup_file
#define ld_sup_loadso ld32_sup_loadso
#define ld_sup_input_done ld32_sup_input_done
#define ld_sup_section ld32_sup_section
#define ld_sup_start ld32_sup_start
#define ld_sym_add_u ld32_sym_add_u
#define ld_sym_adjust_vis ld32_sym_adjust_vis
#define ld_sym_avl_comp ld32_sym_avl_comp
#define ld_sym_copy ld32_sym_copy
#define ld_sym_enter ld32_sym_enter
#define ld_sym_find ld32_sym_find
#define ld_sym_nodirect ld32_sym_nodirect
#define ld_sym_process ld32_sym_process
#define ld_sym_resolve ld32_sym_resolve
#define ld_sym_spec ld32_sym_spec
#define ld_vers_base ld32_vers_base
#define ld_vers_desc ld32_vers_desc
#define ld_vers_find ld32_vers_find
#define ld_vers_promote ld32_vers_promote
#define ld_vers_verify ld32_vers_verify
#endif
Ar_mem *);
#if defined(sparc)
#endif
extern void ld_ent_check(Ofl_desc *);
Ofl_desc *);
extern void ld_map_out(Ofl_desc *);
Ofl_desc *);
Is_desc *, const char *);
Ofl_desc *);
extern void ld_sec_validate(Ofl_desc *);
extern void ld_sup_atexit(Ofl_desc *, int);
extern void ld_sup_input_done(Ofl_desc *);
extern int ld_sym_avl_comp(const void *, const void *);
Ofl_desc *);
Ofl_desc *);
extern int ld_vers_verify(Ofl_desc *);
/*
* AMD64 - 64-bit specific functions
*/
#endif
#ifdef __cplusplus
}
#endif
#endif /* _LIBLD_DOT_H */