From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 8BF453857005 for ; Fri, 6 Nov 2020 17:33:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8BF453857005 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org 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 272B830291AB; Fri, 6 Nov 2020 18:33:07 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id D0ACA40007C3; Fri, 6 Nov 2020 18:33:07 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [PATCH] libelf: Update SH_ENTSIZE_HASH comment. Date: Fri, 6 Nov 2020 18:33:00 +0100 Message-Id: <20201106173300.17730-1-mark@klomp.org> X-Mailer: git-send-email 2.18.4 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 17:33:11 -0000 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 --- 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 + + * elf-knowledge.h (SH_ENTSIZE_HASH): Update comment. + 2020-10-28 Mark Wielaard * 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