From patchwork Sun Dec 26 15:23:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Monaco X-Patchwork-Id: 49259 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE472385841C for ; Sun, 26 Dec 2021 15:24:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE472385841C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1640532264; bh=TSFc9lP09y+7Plrgh6M+TUzCNioivcwo2HGTwIoKVeM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dJjwFfHQwFP/klPoXzL1ogwkf9lgqqHyH8ErKcsgYwEKgpIMn1jqzVXqgdjtbKGJZ 3xgzqLZ5dCGFMEQ38wohmdGW0pVp70cr9PDIFSYvS+KSzLqLpQK1r7A8rQGGEx8ezW Z/2VbIa3A7i3FwRoIpBsQieGuvhLkJje5JsQHv4E= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from latitanza.investici.org (latitanza.investici.org [IPv6:2001:888:2000:56::19]) by sourceware.org (Postfix) with ESMTPS id B2B703858D39 for ; Sun, 26 Dec 2021 15:24:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2B703858D39 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4JMPht6hqXzGpZQ for ; Sun, 26 Dec 2021 15:23:58 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: andrea.monaco@autistici.org) by localhost (Postfix) with ESMTPSA id 4JMPht5qGZzGpTN for ; Sun, 26 Dec 2021 15:23:58 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] fix comments about elf_dynamic_do_* functions Date: Sun, 26 Dec 2021 16:23:57 +0100 Message-ID: <87lf07s836.fsf@autistici.org> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrea Monaco via Libc-alpha From: Andrea Monaco Reply-To: Andrea Monaco Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" These comments cite elf_dynamic_do_* functions with wrong names. The loader's code is quite convoluted, let's keep the comments as accurate as possible. Thanks, Andrea Monaco diff --git a/elf/do-rel.h b/elf/do-rel.h index f441b74919..c8620bcc00 100644 --- a/elf/do-rel.h +++ b/elf/do-rel.h @@ -17,7 +17,7 @@ . */ /* This file may be included twice, to define both - `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. */ + `elf_dynamic_do_Rel' and `elf_dynamic_do_Rela'. */ #ifdef DO_RELA # define elf_dynamic_do_Rel elf_dynamic_do_Rela diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index f619615e5c..26ade38554 100644 --- a/elf/dynamic-link.h +++ b/elf/dynamic-link.h @@ -65,7 +65,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[], #ifdef RESOLVE_MAP -/* Get the definitions of `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. +/* Get the definitions of `elf_dynamic_do_Rel' and `elf_dynamic_do_Rela'. These functions are almost identical, so we use cpp magic to avoid duplicating their code. It cannot be done in a more general function because we must be able to completely inline. */ diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 169bed50ff..d8c0877c8c 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -681,7 +681,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[], else if (__glibc_likely (r_type == R_386_TLS_DESC)) { const Elf32_Rel *const r = reloc; - /* The code below was borrowed from elf_dynamic_do_rel(). */ + /* The code below was borrowed from elf_dynamic_do_Rel(). */ const ElfW(Sym) *const symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);