From patchwork Mon Jan 29 16:03:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 1892352 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=HSLIO0PP; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=28D9LNEp; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=HSLIO0PP; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=28D9LNEp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TNtRW32hCz1yQ0 for ; Tue, 30 Jan 2024 03:04:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21E543858024 for ; Mon, 29 Jan 2024 16:04:53 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id E6F5F385828B for ; Mon, 29 Jan 2024 16:03:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E6F5F385828B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E6F5F385828B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706544225; cv=none; b=fzwdZOvmPcCv0DCyNV+T0QdCuM6V6eKzKTo0oLZC3zeoPEDRmPLHI7BfdVEfncvPiT86R174C2JPjaIyL7Kc1203J63cNcNpabIF4kUIj6CXHSceTIZ0fGPaWyNm5xYpPWHI661RuMAAG58govb1WlehjArmjR4qCICj1Vv8TI8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706544225; c=relaxed/simple; bh=aYTX9xAjDANK7E9tcbR+7S1eL6sx9e1YklpUJq5Pqc0=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=HrWNrTg66ZUeuorEs18DYSWOzyX1baaABGz2nCF9ms+ZJOFNDsgDeh6Phha90S9fno32QspWd3cN4uvk3eNfXBX2qz4aUaL8j6oQ7DRLuOyib+BVzBNvWbCtWgE2NRqGDj8yqVYKAuCznsNbrUc0Q+9my57JOF23ZWqT7la3QNo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by smtp-out1.suse.de (Postfix) with ESMTP id C89C621D94 for ; Mon, 29 Jan 2024 16:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706544213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=qYN0JwFpHQC6aHeXBywDxM5ZddXPwttPzelJtDIVF5M=; b=HSLIO0PPZ4F/5eZ87gD0mylWM9PnCCHHwQBi0tB9KX8/AVeoq3ouJk0ZadTYH3mc8PEmDz xJ2rE0MJbAOP62cZgP+Mx1cwDJh5BE9oXg7GiV3x31ZH6IDlQiyRTPvyryYSgxxUYEY9KJ O9Ls4kS9J3Ay1qN4YGWmdhmB+Uq8oh0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706544213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=qYN0JwFpHQC6aHeXBywDxM5ZddXPwttPzelJtDIVF5M=; b=28D9LNEplHrYAfrG+LnGJL3cKfaM0NobkLjPdM3uf9nVb2FCZPn7KMr4dmPt1fzon1V57g id6SAMNCF5SAMFAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706544213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=qYN0JwFpHQC6aHeXBywDxM5ZddXPwttPzelJtDIVF5M=; b=HSLIO0PPZ4F/5eZ87gD0mylWM9PnCCHHwQBi0tB9KX8/AVeoq3ouJk0ZadTYH3mc8PEmDz xJ2rE0MJbAOP62cZgP+Mx1cwDJh5BE9oXg7GiV3x31ZH6IDlQiyRTPvyryYSgxxUYEY9KJ O9Ls4kS9J3Ay1qN4YGWmdhmB+Uq8oh0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706544213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=qYN0JwFpHQC6aHeXBywDxM5ZddXPwttPzelJtDIVF5M=; b=28D9LNEplHrYAfrG+LnGJL3cKfaM0NobkLjPdM3uf9nVb2FCZPn7KMr4dmPt1fzon1V57g id6SAMNCF5SAMFAQ== Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id B8ABA4A04E5; Mon, 29 Jan 2024 17:03:33 +0100 (CET) From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] elf: correct relocation statistics for !ELF_MACHINE_START_ADDRESS X-Yow: I feel partially hydrogenated! Date: Mon, 29 Jan 2024 17:03:33 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.20 X-Spamd-Result: default: False [-4.20 / 50.00]; TO_DN_NONE(0.00)[]; SUBJECT_HAS_EXCLAIM(0.00)[]; NEURAL_HAM_SHORT(-0.20)[-0.989]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; BAYES_HAM(-2.99)[99.97%]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.91)[-0.908]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com] X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Fixes: 6628c742b2 ("elf: Remove prelink support") Reviewed-by: Adhemerval Zanella --- elf/rtld.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/elf/rtld.c b/elf/rtld.c index 4f494b792e..ac4bb23652 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -2815,10 +2815,9 @@ print_statistics (const hp_timing_t *rtld_total_timep) num_relative_relocations += l->l_info[VERSYMIDX (DT_RELCOUNT)]->d_un.d_val; #ifndef ELF_MACHINE_REL_RELATIVE - /* Relative relocations are processed on these architectures if - library is loaded to different address than p_vaddr. */ - if ((l->l_addr != 0) - && l->l_info[VERSYMIDX (DT_RELACOUNT)]) + /* Relative relocations are always processed on these + architectures. */ + if (l->l_info[VERSYMIDX (DT_RELACOUNT)]) #else /* On e.g. IA-64 or Alpha, relative relocations are processed only if library is loaded to different address than p_vaddr. */