public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libelf: Update SH_ENTSIZE_HASH comment.
@ 2020-11-06 17:33 Mark Wielaard
  2020-11-09 17:17 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2020-11-06 17:33 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Mark Wielaard

The elf-knowledge.h contains various macros to deal with specific ELF
knowledge needed to interpret some ELF constructs that can be ambigious
depending on architecture ABI. Update the comment of SH_ENTSIZE_HASH
to add a more technical description of why it is needed.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 libelf/ChangeLog       | 4 ++++
 libelf/elf-knowledge.h | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index b15508f2..7a34977d 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-06  Mark Wielaard  <mark@klomp.org>
+
+	* elf-knowledge.h (SH_ENTSIZE_HASH): Update comment.
+
 2020-10-28  Mark Wielaard  <mark@klomp.org>
 
 	* elf.h: Update from glibc.
diff --git a/libelf/elf-knowledge.h b/libelf/elf-knowledge.h
index 9d3be0ff..6e005fa5 100644
--- a/libelf/elf-knowledge.h
+++ b/libelf/elf-knowledge.h
@@ -69,9 +69,9 @@
 
    Several years later the ABI for the 64-bit S390s was developed.
    Many things were copied from the IA-64 ABI (which uses the correct
-   32-bit entry size) but what do these people do?  They use 64-bit
-   entries.  It is really shocking to see what kind of morons are out
-   there.  And even worse: they are allowed to design ABIs.  */
+   32-bit entry size) but it does get the SHT_HASH entry size wrong by
+   using a 64-bit entry size.  So now we need this macro to special
+   case both the alpha and s390x ABIs.  */
 #define SH_ENTSIZE_HASH(Ehdr) \
   ((Ehdr)->e_machine == EM_ALPHA					      \
    || ((Ehdr)->e_machine == EM_S390					      \
-- 
2.18.4


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

* Re: [PATCH] libelf: Update SH_ENTSIZE_HASH comment.
  2020-11-06 17:33 [PATCH] libelf: Update SH_ENTSIZE_HASH comment Mark Wielaard
@ 2020-11-09 17:17 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2020-11-09 17:17 UTC (permalink / raw)
  To: elfutils-devel

On Fri, 2020-11-06 at 18:33 +0100, Mark Wielaard wrote:
> The elf-knowledge.h contains various macros to deal with specific ELF
> knowledge needed to interpret some ELF constructs that can be ambigious
> depending on architecture ABI. Update the comment of SH_ENTSIZE_HASH
> to add a more technical description of why it is needed.

Pushed.

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

end of thread, other threads:[~2020-11-09 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 17:33 [PATCH] libelf: Update SH_ENTSIZE_HASH comment Mark Wielaard
2020-11-09 17:17 ` 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).