From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108498 invoked by alias); 24 Feb 2019 17:14:49 -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 108237 invoked by uid 89); 24 Feb 2019 17:14:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2301 X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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; Sun, 24 Feb 2019 17:14:47 +0000 Received: from librem.wildebeest.org (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id A920F302BB43; Sun, 24 Feb 2019 18:14:45 +0100 (CET) Received: by librem.wildebeest.org (Postfix, from userid 1000) id 8E5B713FFE4; Sun, 24 Feb 2019 18:14:45 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [PATCH] libelf: Remove unused internal __elf[32|64]_msize functions. Date: Sun, 24 Feb 2019 17:14:00 -0000 Message-Id: <20190224171436.25784-1-mark@klomp.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q1/txt/msg00168.txt.bz2 Those functions were intended for ELF versions where the memory and file sizes of data structures are different. They were never used because libelf depends on the file and memory sizes being equal (otherwise using mmap wouldn't work). Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 7 +++++++ libelf/elf32_fsize.c | 2 -- libelf/libelfP.h | 10 ---------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/libelf/ChangeLog b/libelf/ChangeLog index ff00d1de5..28cab9c40 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,10 @@ +2019-02-24 Mark Wielaard + + * elf32_fsize.c (local_strong_alias): Remove definition. + (msize): Remove alias. + * libelfP.h (__elf32_msize): Remove definition. + (__elf64_msize): Likewise. + 2019-02-21 Mark Wielaard * common.h (determine_kind): Only accept EV_CURRENT. diff --git a/libelf/elf32_fsize.c b/libelf/elf32_fsize.c index 0f468de52..139f4a91c 100644 --- a/libelf/elf32_fsize.c +++ b/libelf/elf32_fsize.c @@ -58,5 +58,3 @@ elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version) return (count * __libelf_type_sizes[ELFW(ELFCLASS,LIBELFBITS) - 1][type]); } -#define local_strong_alias(n1, n2) strong_alias (n1, n2) -local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS, msize)) diff --git a/libelf/libelfP.h b/libelf/libelfP.h index bc9a404d5..3a96a3b01 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -444,16 +444,6 @@ extern const uint_fast8_t __libelf_type_aligns[ELFCLASSNUM - 1][ELF_T_NUM] extern Elf_Type __libelf_data_type (Elf *elf, int sh_type, GElf_Xword align) internal_function; -/* The libelf API does not have such a function but it is still useful. - Get the memory size for the given type. - - These functions cannot be marked internal since they are aliases - of the export elfXX_fsize functions.*/ -extern size_t __elf32_msize (Elf_Type __type, size_t __count, - unsigned int __version) __const_attribute__; -extern size_t __elf64_msize (Elf_Type __type, size_t __count, - unsigned int __version) __const_attribute__; - /* Create Elf descriptor from memory image. */ extern Elf *__libelf_read_mmaped_file (int fildes, void *map_address, -- 2.20.1