# # 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 # or http://www.opensolaris.org/os/licensing. # 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 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # # Generic interface definition for usr/src/cmd/sgs/liblddbg. # # For information regarding the establishment of versioned definitions see: # The Linker and Libraries Manual (version 2.5 or greater) # This is part of the Developers Guide in the Answerbook. Specifically refer # to Chapter 2 under section "Defining Additional Symbols" through section # "Reducing Symbol Scope", and Chapter 5 "Versioning". # # For specific OSNET rules for the modification (evolution) of these version # definitions see: # Policy for Shared Library Version Names and Interface Definitions SUNWprivate_4.54 { global: dbg_desc = NODIRECT; # interposed - ld.so.1(1) dbg_print = NODIRECT; # interposed - ld(1) and ld.so.1(1) Dbg_args_files; Dbg_args_flags; Dbg_audit_interface; Dbg_audit_lib; Dbg_audit_object; Dbg_audit_symval; Dbg_audit_version; Dbg_setup; Dbg32_bind_global; Dbg64_bind_global; Dbg32_bind_plt_summary; Dbg64_bind_plt_summary; Dbg64_bind_pltpad_from; Dbg64_bind_pltpad_to; Dbg32_bind_weak; Dbg64_bind_weak; Dbg32_cap_hw_candidate; Dbg64_cap_hw_candidate; Dbg32_cap_hw_filter; Dbg64_cap_hw_filter; Dbg32_cap_mapfile; Dbg64_cap_mapfile; Dbg32_cap_sec_entry; Dbg64_cap_sec_entry; Dbg32_cap_sec_title; Dbg64_cap_sec_title; Dbg32_cap_val_hw1; Dbg64_cap_val_hw1; Dbg32_demangle_name; Dbg64_demangle_name; Dbg32_ent_print; Dbg64_ent_print; Dbg32_file_analyze; Dbg64_file_analyze; Dbg32_file_aout; Dbg64_file_aout; Dbg32_file_ar; Dbg64_file_ar; Dbg32_file_ar_rescan; Dbg64_file_ar_rescan; Dbg32_file_bind_entry; Dbg64_file_bind_entry; Dbg32_file_bindings; Dbg64_file_bindings; Dbg32_file_cntl; Dbg64_file_cntl; Dbg32_file_config_dis; Dbg64_file_config_dis; Dbg32_file_config_obj; Dbg64_file_config_obj; Dbg32_file_del_rescan; Dbg64_file_del_rescan; Dbg32_file_delete; Dbg64_file_delete; Dbg32_file_dlclose; Dbg64_file_dlclose; Dbg32_file_dldump; Dbg64_file_dldump; Dbg32_file_dlopen; Dbg64_file_dlopen; Dbg32_file_elf; Dbg64_file_elf; Dbg32_file_filtee; Dbg64_file_filtee; Dbg32_file_filter; Dbg64_file_filter; Dbg32_file_fixname; Dbg64_file_fixname; Dbg32_file_generic; Dbg64_file_generic; Dbg32_file_hdl_action; Dbg64_file_hdl_action; Dbg32_file_hdl_collect; Dbg64_file_hdl_collect; Dbg32_file_hdl_title; Dbg64_file_hdl_title; Dbg32_file_lazyload; Dbg64_file_lazyload; Dbg32_file_ldso; Dbg64_file_ldso; Dbg32_file_mode_promote; Dbg64_file_mode_promote; Dbg32_file_modified; Dbg64_file_modified; Dbg32_file_needed; Dbg64_file_needed; Dbg32_file_output; Dbg64_file_output; Dbg32_file_preload; Dbg64_file_preload; Dbg32_file_prot; Dbg64_file_prot; Dbg32_file_rejected; Dbg64_file_rejected; Dbg32_file_reuse; Dbg64_file_reuse; Dbg32_file_skip; Dbg64_file_skip; Dbg32_got_display; Dbg64_got_display; Dbg32_libs_audit; Dbg64_libs_audit; Dbg32_libs_find; Dbg64_libs_find; Dbg32_libs_found; Dbg64_libs_found; Dbg32_libs_ignore; Dbg64_libs_ignore; Dbg32_libs_init; Dbg64_libs_init; Dbg32_libs_l; Dbg64_libs_l; Dbg32_libs_path; Dbg64_libs_path; Dbg32_libs_req; Dbg64_libs_req; Dbg32_libs_update; Dbg64_libs_update; Dbg32_libs_yp; Dbg64_libs_yp; Dbg32_libs_ylu; Dbg64_libs_ylu; Dbg32_map_dash; Dbg64_map_dash; Dbg32_map_ent; Dbg64_map_ent; Dbg32_map_parse; Dbg64_map_parse; Dbg32_map_pipe; Dbg64_map_pipe; Dbg32_map_set_atsign; Dbg64_map_set_atsign; Dbg32_map_seg; Dbg64_map_seg; Dbg32_map_set_equal; Dbg64_map_set_equal; Dbg32_map_size_new; Dbg64_map_size_new; Dbg32_map_size_old; Dbg64_map_size_old; Dbg32_map_sort_fini; Dbg64_map_sort_fini; Dbg32_map_sort_orig; Dbg64_map_sort_orig; Dbg32_map_symbol; Dbg64_map_symbol; Dbg32_map_version; Dbg64_map_version; Dbg32_move_adjexpandreloc; Dbg64_move_adjexpandreloc; Dbg32_move_adjmovereloc; Dbg64_move_adjmovereloc; Dbg32_move_data; Dbg64_move_data; Dbg32_move_entry1; Dbg64_move_entry1; Dbg32_move_entry2; Dbg64_move_entry2; Dbg32_move_expand; Dbg64_move_expand; Dbg32_move_input; Dbg64_move_input; Dbg32_move_outmove; Dbg64_move_outmove; Dbg32_move_outsctadj; Dbg64_move_outsctadj; Dbg32_move_parexpn; Dbg64_move_parexpn; Dbg32_reloc_apply_reg; Dbg64_reloc_apply_reg; Dbg32_reloc_apply_val; Dbg64_reloc_apply_val; Dbg32_reloc_ars_entry; Dbg64_reloc_ars_entry; Dbg32_reloc_copy; Dbg64_reloc_copy; Dbg32_reloc_discard; Dbg64_reloc_discard; Dbg32_reloc_doact; Dbg64_reloc_doact; Dbg32_reloc_doact_title; Dbg64_reloc_doact_title; Dbg32_reloc_dooutrel; Dbg64_reloc_dooutrel; Dbg32_reloc_entry; Dbg64_reloc_entry; Dbg32_reloc_error; Dbg64_reloc_error; Dbg32_reloc_generate; Dbg64_reloc_generate; Dbg32_reloc_in; Dbg64_reloc_in; Dbg32_reloc_ors_entry; Dbg64_reloc_ors_entry; Dbg32_reloc_out; Dbg64_reloc_out; Dbg32_reloc_proc; Dbg64_reloc_proc; Dbg32_reloc_run; Dbg64_reloc_run; Dbg32_reloc_sloppycomdat; Dbg64_reloc_sloppycomdat; Dbg32_reloc_transition; Dbg64_reloc_transition; Dbg32_sec_added; Dbg64_sec_added; Dbg32_sec_created; Dbg64_sec_created; Dbg32_sec_discarded; Dbg64_sec_discarded; Dbg32_sec_group; Dbg64_sec_group; Dbg32_sec_in; Dbg64_sec_in; Dbg32_sec_order_error; Dbg64_sec_order_error; Dbg32_sec_order_list; Dbg64_sec_order_list; Dbg32_sec_strtab; Dbg64_sec_strtab; Dbg32_seg_entry; Dbg64_seg_entry; Dbg32_seg_list; Dbg64_seg_list; Dbg32_seg_os; Dbg64_seg_os; Dbg32_seg_title; Dbg64_seg_title; Dbg32_shdr_modified; Dbg64_shdr_modified; Dbg32_statistics_ar; Dbg64_statistics_ar; Dbg32_statistics_ld; Dbg64_statistics_ld; Dbg32_support_action; Dbg64_support_action; Dbg32_support_load; Dbg64_support_load; Dbg32_support_req; Dbg64_support_req; Dbg32_syminfo_entry; Dbg64_syminfo_entry; Dbg32_syminfo_title; Dbg64_syminfo_title; Dbg32_syms_ar_checking; Dbg64_syms_ar_checking; Dbg32_syms_ar_entry; Dbg64_syms_ar_entry; Dbg32_syms_ar_resolve; Dbg64_syms_ar_resolve; Dbg32_syms_ar_title; Dbg64_syms_ar_title; Dbg32_syms_created; Dbg64_syms_created; Dbg32_syms_discarded; Dbg64_syms_discarded; Dbg32_syms_dlsym; Dbg64_syms_dlsym; Dbg32_syms_entered; Dbg64_syms_entered; Dbg32_syms_entry; Dbg64_syms_entry; Dbg32_syms_global; Dbg64_syms_global; Dbg32_syms_ignore; Dbg64_syms_ignore; Dbg32_syms_lazy_rescan; Dbg64_syms_lazy_rescan; Dbg32_syms_lookup; Dbg64_syms_lookup; Dbg32_syms_lookup_aout; Dbg32_syms_new; Dbg64_syms_new; Dbg32_syms_old; Dbg64_syms_old; Dbg32_syms_process; Dbg64_syms_process; Dbg32_syms_reduce; Dbg64_syms_reduce; Dbg32_syms_reloc; Dbg64_syms_reloc; Dbg32_syms_resolved; Dbg64_syms_resolved; Dbg32_syms_resolving; Dbg64_syms_resolving; Dbg32_syms_sec_entry; Dbg64_syms_sec_entry; Dbg32_syms_sec_title; Dbg64_syms_sec_title; Dbg32_syms_spec_title; Dbg64_syms_spec_title; Dbg32_syms_updated; Dbg64_syms_updated; Dbg32_syms_up_title; Dbg64_syms_up_title; Dbg_tls_modactivity; Dbg_tls_static_block; Dbg_tls_static_resv; Dbg32_util_broadcast; Dbg64_util_broadcast; Dbg32_util_call_array; Dbg64_util_call_array; Dbg32_util_call_fini; Dbg64_util_call_fini; Dbg32_util_call_init; Dbg64_util_call_init; Dbg32_util_call_main; Dbg64_util_call_main; Dbg32_util_collect; Dbg64_util_collect; Dbg32_util_dbnotify; Dbg64_util_dbnotify; Dbg32_util_edge_in; Dbg64_util_edge_in; Dbg32_util_edge_out; Dbg64_util_edge_out; Dbg32_util_lcinterface; Dbg64_util_lcinterface; Dbg32_util_intoolate; Dbg64_util_intoolate; Dbg32_util_nl; Dbg64_util_nl; Dbg32_util_no_init; Dbg64_util_no_init; Dbg32_util_scc_entry; Dbg64_util_scc_entry; Dbg32_util_scc_title; Dbg64_util_scc_title; Dbg32_util_str; Dbg64_util_str; Dbg32_util_wait; Dbg64_util_wait; Dbg32_unused_file; Dbg64_unused_file; Dbg32_unused_lcinterface; Dbg64_unused_lcinterface; Dbg32_unused_sec; Dbg64_unused_sec; Dbg32_unused_unref; Dbg64_unused_unref; Dbg32_ver_avail_entry; Dbg64_ver_avail_entry; Dbg32_ver_avail_title; Dbg64_ver_avail_title; Dbg32_ver_def_title; Dbg64_ver_def_title; Dbg32_ver_desc_entry; Dbg64_ver_desc_entry; Dbg32_ver_need_entry; Dbg64_ver_need_entry; Dbg32_ver_need_title; Dbg64_ver_need_title; Dbg32_ver_nointerface; Dbg64_ver_nointerface; Dbg32_ver_symbol; Dbg64_ver_symbol; } SUNWprivate_3.20; # The following interfaces are used by various parts of the link-editors and # the elfdump(1). The link-editors are always packaged together but there # seems to be a variety of old elfdump's lying around. elfdump only uses # this interface, and thus by separating in from the ever changing Dbg_* # interfaces we can provide a stable verioning environment for this utility. SUNWprivate_3.20 { global: Elf_syminfo_entry; Elf_syminfo_title; Elf32_cap_entry; Elf64_cap_entry; Elf32_cap_title; Elf64_cap_title; Elf32_demangle_name; Elf64_demangle_name; Elf32_dyn_entry; Elf64_dyn_entry; Elf32_dyn_title; Elf64_dyn_title; Elf32_ehdr; Elf64_ehdr; Elf32_got_entry; Elf64_got_entry; Elf32_got_title; Elf64_got_title; Elf32_phdr; Elf64_phdr; Elf32_reloc_apply_reg; Elf64_reloc_apply_reg; Elf32_reloc_apply_val; Elf64_reloc_apply_val; Elf32_reloc_entry_1; Elf64_reloc_entry_1; Elf32_reloc_entry_2; Elf64_reloc_entry_2; Elf32_reloc_title; Elf64_reloc_title; Elf32_shdr; Elf64_shdr; Elf32_syms_table_title; Elf64_syms_table_title; Elf32_syms_table_entry; Elf64_syms_table_entry; Elf32_ver_def_title; Elf64_ver_def_title; Elf32_ver_line_1; Elf64_ver_line_1; Elf32_ver_line_2; Elf64_ver_line_2; Elf32_ver_line_3; Elf64_ver_line_3; Elf32_ver_line_4; Elf64_ver_line_4; Elf32_ver_line_5; Elf64_ver_line_5; Elf32_ver_need_title; Elf64_ver_need_title; local: *; }; # The following functions must be provided by our caller, or one of the callers # dependencies. When used with ld.so.1 all functions are provided from ld.so.1, # but when used with ld, many of the functions fall back to libc. Presently we # don't build liblddbg with a libc dependency simply to avoid having to load it # with ld.so.1 which already offers the required interfaces (from libc_pic.a). # Distinguishing between `parent' and `extern' symbols offers a small # performance advantage with direct bindings, but this is mainly a test of what # we're capable of doing, rather than an admission that its really worth it :-). { _dgettext = FUNCTION extern; _close = FUNCTION extern; _open = FUNCTION extern; _write = FUNCTION extern; dlopen = FUNCTION extern; dlsym = FUNCTION extern; free = FUNCTION parent; malloc = FUNCTION parent; memcpy = FUNCTION extern; qsort = FUNCTION extern; snprintf = FUNCTION extern; sprintf = FUNCTION extern; strcat = FUNCTION extern; strcmp = FUNCTION extern; strcpy = FUNCTION extern; strlen = FUNCTION extern; strrchr = FUNCTION extern; strtok_r = FUNCTION extern; };