From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90601 invoked by alias); 8 Jul 2019 21:14:28 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 90543 invoked by uid 89); 8 Jul 2019 21:14:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=1.7 X-Spam-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jul 2019 21:14:20 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id C396530007CC; Mon, 8 Jul 2019 23:14:17 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 5204A413CC0E; Mon, 8 Jul 2019 23:14:17 +0200 (CEST) Message-ID: <9d92d2109319d20f1f43b031775a972532c1997a.camel@klomp.org> Subject: Re: [PATCH 5/5] libdw: export libebl symbols From: Mark Wielaard To: Omar Sandoval , elfutils-devel@sourceware.org Date: Mon, 08 Jul 2019 21:14:00 -0000 In-Reply-To: <80970424804952094aaee7a0cc3279c4b8835661.1562372641.git.osandov@fb.com> References: <80970424804952094aaee7a0cc3279c4b8835661.1562372641.git.osandov@fb.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-2.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00028.txt.bz2 Hi, On Fri, 2019-07-05 at 17:34 -0700, Omar Sandoval wrote: > The main downside of the previous change to build in all libebl backend > modules statically is that the total installed size of elfutils > increased (from 2.1 MB to 3.5 MB in my case). This is because we have to > statically link libebl and its backends into every binary. Instead, > since libebl is already linked into libdw.so, we can simply export the > libebl symbols in libdw.so for the binaries to use. This shrinks the > total size to 1.7 MB, which is smaller than where we started. >=20 > This doesn't change the status of libebl: it is still considered > internal and the API/ABI are still subject to change. The status is the same, but by exporting them explicitly I am afraid people will just start using them as if they are supported API. So if at all possible I rather not have them exported from libdw.so. > +ELFUITLS_0.177 { > + global: > + ebl_openbackend; > + ebl_openbackend_machine; > + ebl_openbackend_emulation; > + ebl_closebackend; > + ebl_get_elfmachine; > + ebl_get_elfclass; > + ebl_get_elfdata; > + ebl_backend_name; > + ebl_reloc_type_name; > + ebl_reloc_type_check; > + ebl_reloc_valid_use; > + ebl_reloc_simple_type; > + ebl_gotpc_reloc_check; > + ebl_segment_type_name; > + ebl_section_type_name; > + ebl_section_name; > + ebl_machine_flag_name; > + ebl_machine_flag_check; > + ebl_machine_section_flag_check; > + ebl_check_special_section; > + ebl_symbol_type_name; > + ebl_symbol_binding_name; > + ebl_dynamic_tag_name; > + ebl_dynamic_tag_check; > + ebl_check_special_symbol; > + ebl_data_marker_symbol; > + ebl_check_st_other_bits; > + ebl_osabi_name; > + ebl_core_note_type_name; > + ebl_object_note_type_name; > + ebl_object_note; > + ebl_check_object_attribute; > + ebl_check_reloc_target_type; > + ebl_debugscn_p; > + ebl_copy_reloc_p; > + ebl_none_reloc_p; > + ebl_relative_reloc_p; > + ebl_section_strip_p; > + ebl_bss_plt_p; > + ebl_sysvhash_entrysize; > + ebl_return_value_location; > + ebl_register_info; > + ebl_syscall_abi; > + ebl_abi_cfi; > + ebl_core_note; > + ebl_auxv_info; > + ebl_set_initial_registers_tid; > + ebl_frame_nregs; > + ebl_ra_offset; > + ebl_func_addr_mask; > + ebl_dwarf_to_regno; > + ebl_normalize_pc; > + ebl_unwind; > + ebl_resolve_sym_value; > +} ELFUTILS_0.175; But this is a nice starting point to see which functions could be cleaned up and properly supported/exported. And some can probably just be removed. ebl_openbackend_machine is only use in a couple of tests. ebl_openbackend_emulation doesn't seem to be used at all. ebl_get_elfmachine can probably be replaced by simply checking ehdr.e_machine? Likewise ebl_get_elfclass with ehdr.e_class? The various _name functions can probably be cleaned up and exposed (although I am not sure about the char buffer/length thing, I like them to just return static strings). The _check functions are only used by eu-elflint. Maybe just move them into elflint? ebl_syscall_abi is never used, but actually seems useful. Not saying we should immediately do that, but the above would be some functions that deserve some attention before we make them public. Cheers, Mark