public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libelf: Remove unused internal __elf[32|64]_msize functions.
@ 2019-02-24 17:14 Mark Wielaard
  2019-02-28 22:20 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2019-02-24 17:14 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Mark Wielaard

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 <mark@klomp.org>
---
 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  <mark@klomp.org>
+
+	* 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  <mark@klomp.org>
 
 	* 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libelf: Remove unused internal __elf[32|64]_msize functions.
  2019-02-24 17:14 [PATCH] libelf: Remove unused internal __elf[32|64]_msize functions Mark Wielaard
@ 2019-02-28 22:20 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2019-02-28 22:20 UTC (permalink / raw)
  To: elfutils-devel

On Sun, Feb 24, 2019 at 06:14:36PM +0100, Mark Wielaard wrote:
> 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).

Pushed to master.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-28 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-24 17:14 [PATCH] libelf: Remove unused internal __elf[32|64]_msize functions Mark Wielaard
2019-02-28 22:20 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).