From nobody Thu Apr 2 17:16:39 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 793963264ED for ; Fri, 27 Mar 2026 08:00:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598464; cv=none; b=XzyhS3dZGyGuztN/K286gNLzbPki3uFitrbyPRguTbHXZIFMfG7jBGYKrX3Be6gLqfElJrmy/EFVb5NiYNC5IrYF4FDv0Kb2Pk8Ijdr+ta9F1OLo5gdbZ9lMljxvkOA2GNN/5bFyN8MrslDbthOY7QXfujIIP6FdRcDFHvaK9h0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598464; c=relaxed/simple; bh=R5/wNfEI166VxEYxX5DKzfd4I8QXDSJZsCGNJsyOgQc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MzBIxzPRvQjVlF9Xw7LemlR0BaWH/ctofsdPT34o3zF/qob+7kLnnG4+UvcydNE1nlPuz8Fh6ehLcipUt/N8ReEG+puGZqjRbYEixZ9NhdvNbTIlw4VMgoh0gd+jplVlllo0kwU7/CqzMHDljR2sxuEy0wOvLeDaacBmKWcEBwU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=DAY2h5TO; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="DAY2h5TO" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-483487335c2so19482965e9.2 for ; Fri, 27 Mar 2026 01:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774598456; x=1775203256; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2HryrWoWtiuMl3LNqbcdlk98yeRL5cKfDbuBDTCXl6o=; b=DAY2h5TOMKov2CabcY/xMzl5MjApL7TEya7MtwI2A827RoEvHaJc1Fux9/Y3fkb/DG VmRKazIkTATzc+PD0cwklr9SxZGlYWa9H855RRXrNRFem2f7knlaiwXKqFr5M7Ay/Uq2 vZwxnjW5xL95MvpUtxAclndmsi7EM5WDAS9EhPwPeZi9X2M1s/28tkEABAGd/qvex6Iq D0ppovJJoHdCPXD0isVSO7JobhfcYh85q/y5AxEnO7HUNCvmsRKtJexy1vMmlPY0ONPT 0/bvyaR3m062Cn4R4hxpezPIE00vUH3qUQvynjjxSXTUgpxdQMdOi9BGv6FpLKxkAnFo EdNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774598456; x=1775203256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2HryrWoWtiuMl3LNqbcdlk98yeRL5cKfDbuBDTCXl6o=; b=fNYrLRF9VlocHoO3psMDqat1w2bvCrjCdsRJFq1J816Ujc3z+VH935DDyMvT7odwda 91BsnBS74vnOeGxxx3XpEtLgeUXBLP7JmnJTruzeSsZfMjZFfFWRkflIg+N+PxyZX2Gu cUKghGgWv3hgUuIBpDZc6JkEqdYcfRAVkVEhSA4Q7YqUHWUHEmSM4I67NOpHSTf9TNE2 6EUkFshoCf2dFtht7VQ/uoDqEZneOTfGO/Kg7Qh0JV1vr8flD4OttIU6eAiZPa1XSshQ Dh0PGRs9pAfdL83a6oWSjxg+JXhidegZpgvGQhDxkVAMuzQJS6mCuSNuZ5WDBOSsYXGW GnEw== X-Forwarded-Encrypted: i=1; AJvYcCWkaXkMY97VeLcgJwvnSWImAqPDKUXbS0EG8SzC47KnTyCgcp9GsjmWlU/5e0+7Iww3AwcSLbvFDiVXqEs=@vger.kernel.org X-Gm-Message-State: AOJu0YwTN+nTBRshbf3rT2B7smui9o8XZ/deg15qxl+AymPZzM/OfQDd ZcdHPszHKKLjo3nAJGjt6VbcBDJIDjVH9PKRkwzuTwjSiW2UwZL+MPAcSelPMQg945E= X-Gm-Gg: ATEYQzwXuBV0mbzPVl54FMjneCOjMOt0DsH93bYkOHhPexMkoK+B1qNTlw5+RxglPDe ZFtPZjoClMzjrSwME6JwIQO6uwgnHab4YE70GGvZCWI479B8bPT0dBf9rgD6xIdjo9laUyixSoj gUWFhgB8R/fYOk9A1JNyH+J2se3Q5+HomuO5pD/Wy452gLws5kiwriB6ZJUESJ0xwZ851xQAd1u rper6sZr0OSohip4O9IPHkAfJPfqOBENM5fZK4fAsHhsfDV3InrioUJEpLsdavNEellO0H8gqa5 KlcDfZfj8hQWix0QPnp+Sf+gUQnMd99o5p/qGcydb+sInyEXFXSbpgjFl78GN6sPp/9rxLg80AM 2EbrhcU38HP18FClDiNIw5aYs3axSHAS0uABRDRKSEx6y1jLd9mq0vKcc+mvR2GI3O1lg03tmbf V7ke1xm8vtK57ItXIl152rEGuyL7dtiFUcjvtW5SaP X-Received: by 2002:a05:600c:5249:b0:487:386:3714 with SMTP id 5b1f17b1804b1-48727f7bb08mr24460995e9.17.1774598456054; Fri, 27 Mar 2026 01:00:56 -0700 (PDT) Received: from zovi.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48725fc4827sm12089735e9.11.2026.03.27.01.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 01:00:55 -0700 (PDT) From: Petr Pavlu To: Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sami Tolvanen Cc: Alexandre Ghiti , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Aaron Tomlin , Joe Lawrence , linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] module, arm: force sh_addr=0 for arch-specific sections Date: Fri, 27 Mar 2026 08:59:00 +0100 Message-ID: <20260327080023.861105-2-petr.pavlu@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260327080023.861105-1-petr.pavlu@suse.com> References: <20260327080023.861105-1-petr.pavlu@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When linking modules with 'ld.bfd -r', sections defined without an address inherit the location counter, resulting in non-zero sh_addr values in the resulting .ko files. Relocatable objects are expected to have sh_addr=3D0 f= or all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Force sh_addr=3D0 for all arm-specific module sections. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=3D33958 [1] Signed-off-by: Petr Pavlu --- arch/arm/include/asm/module.lds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/module.lds.h b/arch/arm/include/asm/modul= e.lds.h index 0e7cb4e314b4..f9ad774b2889 100644 --- a/arch/arm/include/asm/module.lds.h +++ b/arch/arm/include/asm/module.lds.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifdef CONFIG_ARM_MODULE_PLTS SECTIONS { - .plt : { BYTE(0) } - .init.plt : { BYTE(0) } + .plt 0 : { BYTE(0) } + .init.plt 0 : { BYTE(0) } } #endif --=20 2.53.0 From nobody Thu Apr 2 17:16:39 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D960B3CE493 for ; Fri, 27 Mar 2026 08:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598466; cv=none; b=KEzaETCCTtfGs97flz/l/TFrsLI1DOb4e/MZegqKdQ0t9JgyFgEq9vRv/MmFDHkAlWNecy6dSqN094h1lyoR2nXFnggUr54zBztivR1vSn+O4yJYWAVv2uhdNy6aTUWndRNUzd/NJS7ZqhEhsHhXQbNBMbyIPlIdBQMs6R2gPAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598466; c=relaxed/simple; bh=VuK/A2SKkIB8gq+5+JMkruh64JklcZWA+VF4xG65caU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uCRMzzf09vYzGoacr7S1B7H1NXhf9Wzb8+ntXEOnTj7WTbShbZdXL5qxDUOwjy5DPCmQq4YbEuEkrZR68NtSPpcq32whBzlFTDjjUuXkHBaSbHLNnYk2pJ0C5F5XOlstQ1yRRbyHJEHb9g42ozZeXKv0O6k7qkkAW0GahZ9VnJU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=PxZ/FGS1; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="PxZ/FGS1" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-486b96760easo19677825e9.2 for ; Fri, 27 Mar 2026 01:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774598457; x=1775203257; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/maIRRXWsco2YLlNLQIg+54XR4CJ2LAx0k8sLQQpIyQ=; b=PxZ/FGS1/Sq0/D0Dz/6gs05dbL2ERBXFYpjj9uyX39yEEB2PRCoKjvS4pGqYJXzPsD n4cDhvpGAcjJ1Oaly2VG2crQUE/ToXUQW1SFkcnK7aCuJRyEP/fjNYIB3JmxZLRcEY9S Q/w3pMZ1bAe0XfZ+O5vMhXV40/nthHFq7WYcSDOt16oHglBQDQcHL2KaA4sxdzY9zeOA 6uQP9f8OUTNQUeCwWouzER6OWakeWO12OymkchDkXFS8HN+QxvdC/hcoluCdgawDFueM ge4Z1AjoJSeqM0rdPH6pS1Koycr1tZqpJWoU5+A7TGENcIdUVI1aD95BcFEWzaZ3Vcek kFcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774598457; x=1775203257; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/maIRRXWsco2YLlNLQIg+54XR4CJ2LAx0k8sLQQpIyQ=; b=TSacIcNh25/Tess/1ZdhXIpJd7DcCVli5AF9VftWdvewL4DvuFVajSZ2fBNA4Vvy8R TZ1MxKwvNVoURs2dr2HCfPvTIxnwv9BeCqZBRaXtrX7c2WQihp+JRQFX7AV3jWTyJiSR U1cw+g8W2RqSzmrpf06WuzCjvWlybWaGkTCE0npHOF+rU5ntR2CnEqrjRjRcTI+a0GG9 v5QXReYML81DH7vRMRoY4BH47Mc+/4Hs9pZFE7BsdNDRhsxl0rdYleaUgrJP0oKGQTw4 R6m/LwyucTWmXpSsOdidISSDPI/N8Ndf+PDpnK0M02vY2clEvtbya/JmyOzq+miUJpwY Z0UQ== X-Forwarded-Encrypted: i=1; AJvYcCWSWLM9sI0IgVjF9VUcn3R2QfUG+AJrJ9Lxw9z+9jGA2E9xJnDIYmN7aaa7IYK2uV+SuuHhjaCklu4YAfw=@vger.kernel.org X-Gm-Message-State: AOJu0Yyudt11OHRf0029+XfaoBzNdo+gFPW3x5IoLDoxVI2+sKV5jhx6 gqBDsUYjx7pGtjvIKpXOX3ckrIwFtHbVAFACqwC3dh3VkU1QrraKofr+EHUOTCgTrI4= X-Gm-Gg: ATEYQzxytkcdgDAGURln1KckBNv6RGk+miUiz6NFdnERyj2kT4ZRotin/R6DehW5/ff k2AN5x/vwjBycpr8d+NXKAUL8SytHSsShlN6YNY4qn3PsrNHaFMtN6Bq6awr4hdOdp3CEm4voyc HsmzEFr/Zuub8E+AVCODx5gwc88Tqf533Le5qd4YPAYe1P+3vGFIJgmM689Q2YRc1n1WwnUdoAq nu8OcayJWaV3/6CfLVam/oNclFcwnmbAoXg8DHiN2GFtPiPWRX4D/+KidsLfvsh3TTb42ZjtELw YuivhflMIraV96paLTUVZGvK2EboF2pK+X+yBLdHk3GkY9Vr+z8RmS7FWlH1L+DWSGbJAqI+mJa ajblK6jQ2OoQrer63Ja0MFln4MmHqzBGjr0EBfaUvAEKQUEb5ZYrhznu4Xlg/XMtb88/R+ZkmTZ 4x0L5FB8tn4ocVl1D0Q6fXnJRE3LJATHyVgaLTKJGo X-Received: by 2002:a05:600c:828a:b0:487:338:b4df with SMTP id 5b1f17b1804b1-48727d8818cmr22261095e9.15.1774598457203; Fri, 27 Mar 2026 01:00:57 -0700 (PDT) Received: from zovi.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48725fc4827sm12089735e9.11.2026.03.27.01.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 01:00:56 -0700 (PDT) From: Petr Pavlu To: Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sami Tolvanen Cc: Alexandre Ghiti , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Aaron Tomlin , Joe Lawrence , linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] module, arm64: force sh_addr=0 for arch-specific sections Date: Fri, 27 Mar 2026 08:59:01 +0100 Message-ID: <20260327080023.861105-3-petr.pavlu@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260327080023.861105-1-petr.pavlu@suse.com> References: <20260327080023.861105-1-petr.pavlu@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When linking modules with 'ld.bfd -r', sections defined without an address inherit the location counter, resulting in non-zero sh_addr values in the resulting .ko files. Relocatable objects are expected to have sh_addr=3D0 f= or all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Force sh_addr=3D0 for all arm64-specific module sections. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=3D33958 [1] Signed-off-by: Petr Pavlu --- Note that the definition of .text.hot hasn't matched any input sections since commit 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related macros"), and even before that with CONFIG_LTO_CLANG=3Dy. The preceding comment also explains that the directive is necessary to merge section groups. However, this approach seems suboptimal. A better method would be to link modules using --force-group-allocation to retain only one copy of each group. I plan to look at this separately. --- arch/arm64/include/asm/module.lds.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/module.lds.h b/arch/arm64/include/asm/m= odule.lds.h index fb944b46846d..0b3aacd22c59 100644 --- a/arch/arm64/include/asm/module.lds.h +++ b/arch/arm64/include/asm/module.lds.h @@ -14,7 +14,7 @@ SECTIONS { * directive to force them into a single section and silence the * warning. */ - .text.hot : { *(.text.hot) } + .text.hot 0 : { *(.text.hot) } #endif =20 #ifdef CONFIG_UNWIND_TABLES @@ -22,6 +22,6 @@ SECTIONS { * Currently, we only use unwind info at module load time, so we can * put it into the .init allocation. */ - .init.eh_frame : { *(.eh_frame) } + .init.eh_frame 0 : { *(.eh_frame) } #endif } --=20 2.53.0 From nobody Thu Apr 2 17:16:39 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 748873CE4A2 for ; Fri, 27 Mar 2026 08:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598466; cv=none; b=FzYRFBe/J+TAunOvkgwmbrM6YRJmGbI+0YLwANNjPLR4ktjlrpQ8gfP3WyaZ4vCMUgblEKfL2PfPCJxp0eutWy1aqlRg+TYeoTPlnSfuXmjcxVH6alMcCswuerxep3YyE3gdWEqUpzjQF1UHqNUJa7kI2sHGOF5WfcDCtH0LJEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598466; c=relaxed/simple; bh=JWfjR/RTCXmZyEk+4Tx2iEnYpR1e4qTFsejI1js9qmM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ILb5IWZ1dyvHgisG4BLiXnUIHCFW5yCOWa0EITlq82Jj/FQIoPNe+0zgGcKx3nrqrAxzc37/g3YSN0DrXUrFvhEAoVuLSY1HAzulO0Nor6DV79NaxgeNEgxr7K7eaCQRYfekFSnWr30l+LhxaUNYyjwZCrJDx8ewSvWB6Hk/n4g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=asSHicuA; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="asSHicuA" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-486b9675d36so15983355e9.0 for ; Fri, 27 Mar 2026 01:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774598458; x=1775203258; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K4moBxHVs6SiILsKE/Pxveo5RaXduWTr95oeVQa3H18=; b=asSHicuAgkTGUEaBuYI1pK/H2Fzu1ZZdsIgrBp4rkN+fykqRLJox6DOtm7rqPOui4K f4R7iwzB+Sb7oTg9FM5p6Nt4BtV4R8nFWPShDqmAgm7ZHgNpiyTfZegUTu/g6IXRqUEF QHh7cpEeRQLPdY8X/JW0UkALoGYwYtw5KIO3u+5lksUV0hlO7NB0w1myMglA36nOmX+S 19b3EDc3fPpEt5zSYQyVb6l/VORM0sO9w1AkhKuoxCqBm66MOgIU+iJ8w6RK2HDDdq0+ 2GCoJ0oekPr3LtYIlHGBALb4O5nwS7Ja8RfLfbCipwJsqBvR0JlAqJhmZB8qUqtQEH4R axqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774598458; x=1775203258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K4moBxHVs6SiILsKE/Pxveo5RaXduWTr95oeVQa3H18=; b=hhzPnIuWcROSpbVFMXI53FkIAfYCbuePuZ/YWICuPEhgbehxqV/8Xku+VapacoAyL0 RwtIyWvMpZLwzbn2RyBe29soTMf5eYo5GCAdYKxBVzaHxN4Ti3ZBCpq3bvTjmPibxmGR uFXIKsQfT/9/VM6kLICY3B82IY7OfpwS6rHjmugz8InD2s4U1kO+dx7X38y+UswVWXjD cQamBBCh4DqNrCBl63MRmkkuNrrmSWwDxf7B+56x58LhFeMwyG76oxAVoPQh8XiV4oN2 trNVXPi65o5Xed6Nev0HVLLDZyldSKsux9FJF0Ks22u7UuqA5j6XCbkHCbnj1NZ9CSmr 640g== X-Forwarded-Encrypted: i=1; AJvYcCXg73L2wYbI0YeiEGZ4HNllPTyv2nr4VEiSpNU0kNTOQeERPKXHIs8SlGvJImrI2Q655vn+6UV10BCBF4Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwngvQ8htZB3vl7mCOxpHpPIOzrgugTAn4zG1IHXVc9oGcsgOJM rfE9xzuRInOszrpDOT3ydHoeX/NWHhEDNfWKIVYorh2Nuf9ceYTHw+32DASy0PDGTHI= X-Gm-Gg: ATEYQzz0UMh88YwVXudh61s4RkBTkvgZEe43WroEC+ysjDIO8dMf0GfSxN3BUTefkKH EkwJ7y6Utnmdc/gNj8SCeezRaahYn2Bka7DjqpJmWzrJOZ2yp4Ry8ZVF7QX5T0UYd4pq60/yKz0 c/bUca+fUt4564YO95BeylNFVCM7Dx4HQYzbaUr2zlBGjlPeRFzeY2ciM/ol7/sbAbOxMSTnAL0 WAVp03GC2UdiVjtM9E7YnqmAI33zAOhtr0oTQatKdFBQc7A6P9IN5JCw1PEFrhA6+IiavljK7sd /iB+n0axi+LYgsgCaum5BV9qoOFASmmz26AWMQCzCTseWNzeRJxIJViLd4/EtFkb/zdA8YjRpCA AYqz5bUBRapugYcx3PYXCRLz6IodvlKZGGQLHQxuhdGevVRDRi2zWjJWivqli5XjRN+1OwHhRkE e6nUu5/58Xj5orGfhnJYSSeI2XvbU6++vaQCmTNjCe X-Received: by 2002:a05:600c:19cf:b0:487:1108:48bc with SMTP id 5b1f17b1804b1-48727ec7695mr24399785e9.17.1774598458048; Fri, 27 Mar 2026 01:00:58 -0700 (PDT) Received: from zovi.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48725fc4827sm12089735e9.11.2026.03.27.01.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 01:00:57 -0700 (PDT) From: Petr Pavlu To: Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sami Tolvanen Cc: Alexandre Ghiti , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Aaron Tomlin , Joe Lawrence , linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] module, m68k: force sh_addr=0 for arch-specific sections Date: Fri, 27 Mar 2026 08:59:02 +0100 Message-ID: <20260327080023.861105-4-petr.pavlu@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260327080023.861105-1-petr.pavlu@suse.com> References: <20260327080023.861105-1-petr.pavlu@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When linking modules with 'ld.bfd -r', sections defined without an address inherit the location counter, resulting in non-zero sh_addr values in the resulting .ko files. Relocatable objects are expected to have sh_addr=3D0 f= or all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Force sh_addr=3D0 for all m68k-specific module sections. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=3D33958 [1] Signed-off-by: Petr Pavlu --- arch/m68k/include/asm/module.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/module.lds.h b/arch/m68k/include/asm/mod= ule.lds.h index fda94fa38243..fcd08689b282 100644 --- a/arch/m68k/include/asm/module.lds.h +++ b/arch/m68k/include/asm/module.lds.h @@ -1,5 +1,5 @@ SECTIONS { - .m68k_fixup : { + .m68k_fixup 0 : { __start_fixup =3D .; *(.m68k_fixup) __stop_fixup =3D .; --=20 2.53.0 From nobody Thu Apr 2 17:16:39 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17570332ED3 for ; Fri, 27 Mar 2026 08:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598465; cv=none; b=lsiNPksAJrW15UBGRCF9860gFhn9HuYr/yshthEno5QDXUA2Vsgm+GTOITvtFidNS3iDwsWbcsxPeLfk+YdvrRWfjmtkMABrqVvVGBOwIclQudUDRZD63Pa74N5auBBeQfODzW6k7H6cNcLK3fn5KIO4re9QBDOz+/1CnD2gWH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598465; c=relaxed/simple; bh=b4EA7Cjd+Rmu3jUMpgHSoP8C+KLtgyFkpMfPCKIjeuM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RTLJqQhlMuvJYCEXCvjdceCWeFNgR3tPl5O6S5SCxYRNP0MI90jqcZd2AaOZUTUCw04Qwj8wfIk3+SJ6BmseG/ihmRWpRiSf9X1oC6gTiuzfzdH7QrovjGkKj8rCGS/ZfeOMcQajoQ0hz2QmMsJ+H7uqiJ1pnuEqfFh5s1SVuXI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=ewH5Dvse; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="ewH5Dvse" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4853e1ce427so21191175e9.3 for ; Fri, 27 Mar 2026 01:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774598459; x=1775203259; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QlVyZgwbk35jZ7E4LjSb7Hh9QtkNRjrn39+Y58oA5YM=; b=ewH5DvseIaoVSCMuGNSBL70uEaf+vTd9BfwRKhpU78uNzlqgMgq7ptq3qBBAykXwYS ehEuD1jyyTWevMn6c+idZk3Ky+Lni+gSeGzLu7st436n/Bjoy1QcPWRROinVHq0+GnWJ ZrKaXQIUcntWpu5UONhhyqNGNKFsNmB3TYdGLi7PqoVaANJ68Wdt2hfWgdhKgsEBNiYZ NrnpcQGTyW4qZ03xzZNIurigH8fbRP2Ir7NZwHyh8azGdyuft++Dt1L9qVnS3D6i0DrY X4hFW9+yhwMy3z+GdpTSc0ihXB/cSRQT/tsrdAxzUbRFkwdFuZZT4LRwiqj1qHZ06vUQ t0oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774598459; x=1775203259; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QlVyZgwbk35jZ7E4LjSb7Hh9QtkNRjrn39+Y58oA5YM=; b=AhdozBMAlIjQSxfThnqQmpO+cW+sVnBXaYNwNZO95VfvgmTN3onTs5N+Ol1e9OqGCi Bf2E+pKf4CYwCwWDGriskJ8oOqzqpBz4LDP8aShpIMSiVQxdw/GGDj+OPuMq/XRLQsGM jMJYTOThxt0zjWZyE+kzw6ZFws8cK4G0/vk6z92lJfhV3yug8l2Ey0HLYlD1CPapMu6W yC7ZxJMOaiTm3NLm6D1fIkwiHXsXMQ/LBFUHuAlIebHQMou/TxDP0lFuWx8WW9tVwgEG dMRwvBTvTEz4Hy1042/57nmJWjLuwkbJ2UivLCEu7OebiSVGgy1kVRxbKIeMFeLqmuT8 s30Q== X-Forwarded-Encrypted: i=1; AJvYcCVfDMqew+HhBay4teVk+qS1JSQaDo6CcMi8QiPd6PtS+glQJnwCsRfPeU5l+rhf8lqJ2229s7LcCVKm3lg=@vger.kernel.org X-Gm-Message-State: AOJu0Yy6mUrAPVWPNYuaq3hDXPpsUoWWMhodpsL/UxJNli8kmKaMN/AT MvNQDWrXDRO2dzh69bNNAn6OFprEl5AG9cQ2WkuvvBBktbIpzgmVh/G+rhiDxcag3r4= X-Gm-Gg: ATEYQzwfr9Nvs/3Z+r36EvMAwQzfEzQBS/oo0lW0c/IC+OEVkrtBl+ynlxXHJJH5xne UmeV/h/if+2qisqvX1+aKarv7YO+mfXW9J6SzXygxbKj0v8KhnfPat1aUHY5W0AMojtGoeJoobm wFkrTkIrG74n4hFh7g4G7Ur0BtqexsRNBGYj5gtW/Qnt/+EVCXisxtp+CiHiO2fStxp9qsYsQwJ NbyRA1rpHirTnVZho41F7BW669A74Ina7fzLRZtmGR4mOZLX95iU+AfExEhHgk6ZvYuBCUuDVRF XYeiFlp/k5C7Hj2Lv/AWfHs63KWTjQ5/FbJgM/Xjqw4pUtfl1PODOHg78VZ1Ioo+9ja8X9FrRPF rxERO1GAWeE+8zMuUf7OhM1VbTDzHxZxhjlTmJPnhMjeyfs5+kNs0xii3NgSd6hq5jhdnURzRwK 3TR8Yd7sqK4ALsqvwNDqxYv+m+wtb0ea5NzgLpJz6v X-Received: by 2002:a05:600c:5304:b0:485:f1d1:8f3d with SMTP id 5b1f17b1804b1-48727d67a43mr23844745e9.6.1774598458837; Fri, 27 Mar 2026 01:00:58 -0700 (PDT) Received: from zovi.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48725fc4827sm12089735e9.11.2026.03.27.01.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 01:00:58 -0700 (PDT) From: Petr Pavlu To: Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sami Tolvanen Cc: Alexandre Ghiti , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Aaron Tomlin , Joe Lawrence , linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] module, riscv: force sh_addr=0 for arch-specific sections Date: Fri, 27 Mar 2026 08:59:03 +0100 Message-ID: <20260327080023.861105-5-petr.pavlu@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260327080023.861105-1-petr.pavlu@suse.com> References: <20260327080023.861105-1-petr.pavlu@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When linking modules with 'ld.bfd -r', sections defined without an address inherit the location counter, resulting in non-zero sh_addr values in the resulting .ko files. Relocatable objects are expected to have sh_addr=3D0 f= or all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Force sh_addr=3D0 for all riscv-specific module sections. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=3D33958 [1] Signed-off-by: Petr Pavlu --- arch/riscv/include/asm/module.lds.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/include/asm/module.lds.h b/arch/riscv/include/asm/m= odule.lds.h index 1075beae1ac6..9ced27c8ccb6 100644 --- a/arch/riscv/include/asm/module.lds.h +++ b/arch/riscv/include/asm/module.lds.h @@ -2,8 +2,8 @@ /* Copyright (C) 2017 Andes Technology Corporation */ #ifdef CONFIG_MODULE_SECTIONS SECTIONS { - .plt : { BYTE(0) } - .got : { BYTE(0) } - .got.plt : { BYTE(0) } + .plt 0 : { BYTE(0) } + .got 0 : { BYTE(0) } + .got.plt 0 : { BYTE(0) } } #endif --=20 2.53.0