From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 A56CF3CA4B4 for ; Fri, 27 Mar 2026 08:00:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598463; cv=none; b=TCbqj6vrY+F/8E/PXv8SRbuHdB7wR2lXK+7+fkcY6sEz0/Q+lgZBWBP4pfeetfFSORfkbntCCI4MgFH13NFphf9M6OwP9wt+ZOjORmqqaPcs92ONcQd45/0UQKO+HNMR5/DfcI6xgFoUWmhWOpN2l+JyXGobSTZav8wSyQPAaMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774598463; c=relaxed/simple; bh=W07Ke74xlJ9FViATMy7TNPyWUyJiXufTMF7faALrZ6Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=N+zZA3LwZiAKumDqtPp1LhtB10eZ4YS8XNqiTwtl/qUBji6VXfGJmFMUV8uy547gav5gCiPNv+apj+mTmBmJW7PpRfXR5MgbNTI43tXfGSKRI41UU32X3tYb4eQjYvUr8QHODr/1tnK+WzQbxCjef+fHUutttz6Stq/HT97WNUw= 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=DsoFy1hv; arc=none smtp.client-ip=209.85.128.47 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="DsoFy1hv" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-486fba7ce4cso18453745e9.3 for ; Fri, 27 Mar 2026 01:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774598455; x=1775203255; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VdbZVRP/Ak929baCc2EeOgVlzDU6Wbl9p0jTnb7CIGk=; b=DsoFy1hvvwOnGNxyOoMVhMogo55oVsmvOCQ8pqd29ZIFMjIJJvycCTwApbMZKML4o9 +ut3VtKxEa8U1RJYU5h6nurioOO5w/j2TQUhsj2bxVFxylgPf/y3xFBMp+i0IgfQX0C0 h4ksXAKZfTL7XH7oWmDriWbYwJlPyU0xOiEr5mMUUEm5ac4Qr1wSqKGKfacOFjHNZnH6 /f8ADqu4hdtXj0AcLu4CU6JXsNA6cmgDsT9DbtdRT54lK0mq73n3YI0AKCEbFExeiR/x voMZnX6r+BUs6sZNVeIiIoCFViH7Zr7gLNTZLgS6qOO0pITr/JZ09Xr8ffUMAGp9u93P Llow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774598455; x=1775203255; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VdbZVRP/Ak929baCc2EeOgVlzDU6Wbl9p0jTnb7CIGk=; b=KdekdEkKfwDtD8WowpV67jQHd+/Nq9tFhOdoxgN0GuR7c07r/N/VnqOGviBWiGkhfR 1SexCophWlfHMJPlLoJ/05ePO4Y+eYjtAYadNBtTGUYNjXrCR/sebfDor/Sx3q2tudAS LESazRNxkDhiQpanI9gigEWwELSPakFCC4EfrSvEG/uLM5fU6yrHHyxOK8TyBZGwNOpE oW25GUqQminF5UrVoxOnC3xsTXdzGeq0+rjyURQy7Dd67RwOOg5N7gl8WsbXx1vhNaZF x9LAPehwyUtMaYPtD/MsXFXcqg63gJowgM3fyEvg+clBt0NrzVUUGm0ANQamseGrVaVi 4pOg== X-Forwarded-Encrypted: i=1; AJvYcCXRUzvaWuE8ek/HIKMQnQvK1FWvhULqAypjwu5h8clF5uCbpGOO5fcUzpXHQ8IvqwSUtROVMslLb9D4AiY=@vger.kernel.org X-Gm-Message-State: AOJu0YxLILn4WYxsXnPhK7EX0TTi3CJENNRyOIahuiCT57hHQA3Tymu2 mxRM1mAeaPaJykIUR0q0ZHSR/+jJfbAxgDKaU6jwXVXEo0t8J04Q0k8GBcWb0oguerE= X-Gm-Gg: ATEYQzxFYG+nHvdBpzvRdXxHTf+5QSYAVzRmoOW0LFnYE+NCh69Lch4Owyg9eyEBt5R Bh4n1BlVEyDqrTE+uuK9dw7OxDlVntXBdaj5AIFkdMbolGIMs3PWjih0COzgNgV+WvI7tEWQlhf RkvhxE19CC5DLSbfDcXPJN0ZNJrVpFNRrEMuC5Jrf4pNt2VQ5efMcohbq6ynSzHONTcZ5AmUml0 Kcf/FEXxtAyDPdBDFcurNVAHvtz+HxZS+Kkf0Tz2BVM9pww0d/AiQVaJd3dJ2ruFUZQ2sN4KHAa jvYF1JVus3HXBFVloJ+jUGuTw7pvjRj9LHStYTSN6+9R/STJA2mZ/Aj8LnIG4H1N4f/fEf/sXlC HqkkbSN/EqXzQCrn9rjVekXnjb9ifH9TlLXODbOEniPTwFctSo2kdoTzlTirrvbvP1e9ycpSOfg P8Zznh8eaWfltxE3nUrExdVUubioPuLkibGkDMaPve+jHtwBs/M84= X-Received: by 2002:a05:600c:8b6e:b0:487:716:2fa9 with SMTP id 5b1f17b1804b1-48727e883c4mr23399585e9.13.1774598455233; Fri, 27 Mar 2026 01:00:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 01:00:54 -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 0/4] module: force sh_addr=0 for arch-specific sections Date: Fri, 27 Mar 2026 08:58:59 +0100 Message-ID: <20260327080023.861105-1-petr.pavlu@suse.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=0 for all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Joe Lawrence previously addressed the same issue in the main scripts/module.lds.S file [2] and we discussed that the same fix should be also applied to architecture-specific module sections. This series implements these changes. The series can later be merged through the modules tree, or individual patches can be applied through the architecture-specific trees. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=33958 [2] https://lore.kernel.org/linux-modules/20260305015237.299727-1-joe.lawrence@redhat.com/ Petr Pavlu (4): module, arm: force sh_addr=0 for arch-specific sections module, arm64: force sh_addr=0 for arch-specific sections module, m68k: force sh_addr=0 for arch-specific sections module, riscv: force sh_addr=0 for arch-specific sections arch/arm/include/asm/module.lds.h | 4 ++-- arch/arm64/include/asm/module.lds.h | 4 ++-- arch/m68k/include/asm/module.lds.h | 2 +- arch/riscv/include/asm/module.lds.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) base-commit: c369299895a591d96745d6492d4888259b004a9e -- 2.53.0