* [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series
@ 2025-10-08 22:46 Nathan Chancellor
2025-10-08 22:46 ` [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections Nathan Chancellor
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Nathan Chancellor @ 2025-10-08 22:46 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier
Cc: Alexey Gladkov, Masahiro Yamada, linux-kbuild, linux-kernel,
Ard Biesheuvel, Alexandre Ghiti, Linux Kernel Functional Testing,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, linux-s390
Hi all,
This is a series to address some problems that were exposed by the
recent modules.builtin.modinfo series that landed in commit c7d3dd9163e6
("Merge patch series "Add generated modalias to
modules.builtin.modinfo"").
The third patch is not directly related to the aforementioned series, as
the warning it fixes happens prior to the series but commit 8d18ef04f940
("s390: vmlinux.lds.S: Reorder sections") from the series creates
conflicts in this area, so I included it here.
I plan to send at least the first two patches to Linus by Saturday for
-rc1 but I will take the third with an Ack.
---
Nathan Chancellor (3):
kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux
kbuild: Add '.rel.*' strip pattern for vmlinux
s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections
arch/s390/kernel/vmlinux.lds.S | 44 +++++++++++++++++++++---------------------
scripts/Makefile.vmlinux | 5 ++++-
2 files changed, 26 insertions(+), 23 deletions(-)
---
base-commit: 38492c5743f8b7213ca86f0cd72ea625af35d5ef
change-id: 20251008-kbuild-fix-modinfo-regressions-95e3fd151dec
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections
2025-10-08 22:46 [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nathan Chancellor
@ 2025-10-08 22:46 ` Nathan Chancellor
2025-10-09 11:37 ` Alexander Gordeev
2025-10-09 19:44 ` [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nicolas Schier
2025-10-10 7:19 ` Alexey Gladkov
2 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2025-10-08 22:46 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier
Cc: Alexey Gladkov, Masahiro Yamada, linux-kbuild, linux-kernel,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, linux-s390
When building s390 defconfig with binutils older than 2.32, there are
several warnings during the final linking stage:
s390-linux-ld: .tmp_vmlinux1: warning: allocated section `.got.plt' not in segment
s390-linux-ld: .tmp_vmlinux2: warning: allocated section `.got.plt' not in segment
s390-linux-ld: vmlinux.unstripped: warning: allocated section `.got.plt' not in segment
s390-linux-objcopy: vmlinux: warning: allocated section `.got.plt' not in segment
s390-linux-objcopy: st7afZyb: warning: allocated section `.got.plt' not in segment
binutils commit afca762f598 ("S/390: Improve partial relro support for
64 bit") [1] in 2.32 changed where .got.plt is emitted, avoiding the
warning.
The :NONE in the .vmlinux.info output section description changes the
segment for subsequent allocated sections. Move .vmlinux.info right
above the discards section to place all other sections in the previously
defined segment, .data.
Fixes: 30226853d6ec ("s390: vmlinux.lds.S: explicitly handle '.got' and '.plt' sections")
Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=afca762f598d453c563f244cd3777715b1a0cb72 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
---
arch/s390/kernel/vmlinux.lds.S | 44 +++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index feecf1a6ddb4..d74d4c52ccd0 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -214,6 +214,28 @@ SECTIONS
DWARF_DEBUG
ELF_DETAILS
+ /*
+ * Make sure that the .got.plt is either completely empty or it
+ * contains only the three reserved double words.
+ */
+ .got.plt : {
+ *(.got.plt)
+ }
+ ASSERT(SIZEOF(.got.plt) == 0 || SIZEOF(.got.plt) == 0x18, "Unexpected GOT/PLT entries detected!")
+
+ /*
+ * Sections that should stay zero sized, which is safer to
+ * explicitly check instead of blindly discarding.
+ */
+ .plt : {
+ *(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt)
+ }
+ ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
+ .rela.dyn : {
+ *(.rela.*) *(.rela_*)
+ }
+ ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!")
+
/*
* uncompressed image info used by the decompressor
* it should match struct vmlinux_info
@@ -244,28 +266,6 @@ SECTIONS
#endif
} :NONE
- /*
- * Make sure that the .got.plt is either completely empty or it
- * contains only the three reserved double words.
- */
- .got.plt : {
- *(.got.plt)
- }
- ASSERT(SIZEOF(.got.plt) == 0 || SIZEOF(.got.plt) == 0x18, "Unexpected GOT/PLT entries detected!")
-
- /*
- * Sections that should stay zero sized, which is safer to
- * explicitly check instead of blindly discarding.
- */
- .plt : {
- *(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt)
- }
- ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
- .rela.dyn : {
- *(.rela.*) *(.rela_*)
- }
- ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!")
-
/* Sections to be discarded */
DISCARDS
/DISCARD/ : {
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections
2025-10-08 22:46 ` [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections Nathan Chancellor
@ 2025-10-09 11:37 ` Alexander Gordeev
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Gordeev @ 2025-10-09 11:37 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Nicolas Schier, Alexey Gladkov, Masahiro Yamada, linux-kbuild,
linux-kernel, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Sven Schnelle, linux-s390
On Wed, Oct 08, 2025 at 03:46:46PM -0700, Nathan Chancellor wrote:
> When building s390 defconfig with binutils older than 2.32, there are
> several warnings during the final linking stage:
>
> s390-linux-ld: .tmp_vmlinux1: warning: allocated section `.got.plt' not in segment
> s390-linux-ld: .tmp_vmlinux2: warning: allocated section `.got.plt' not in segment
> s390-linux-ld: vmlinux.unstripped: warning: allocated section `.got.plt' not in segment
> s390-linux-objcopy: vmlinux: warning: allocated section `.got.plt' not in segment
> s390-linux-objcopy: st7afZyb: warning: allocated section `.got.plt' not in segment
>
> binutils commit afca762f598 ("S/390: Improve partial relro support for
> 64 bit") [1] in 2.32 changed where .got.plt is emitted, avoiding the
> warning.
>
> The :NONE in the .vmlinux.info output section description changes the
> segment for subsequent allocated sections. Move .vmlinux.info right
> above the discards section to place all other sections in the previously
> defined segment, .data.
>
> Fixes: 30226853d6ec ("s390: vmlinux.lds.S: explicitly handle '.got' and '.plt' sections")
> Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=afca762f598d453c563f244cd3777715b1a0cb72 [1]
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> ---
> arch/s390/kernel/vmlinux.lds.S | 44 +++++++++++++++++++++---------------------
> 1 file changed, 22 insertions(+), 22 deletions(-)
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series
2025-10-08 22:46 [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nathan Chancellor
2025-10-08 22:46 ` [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections Nathan Chancellor
@ 2025-10-09 19:44 ` Nicolas Schier
2025-10-10 7:19 ` Alexey Gladkov
2 siblings, 0 replies; 5+ messages in thread
From: Nicolas Schier @ 2025-10-09 19:44 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Alexey Gladkov, Masahiro Yamada, linux-kbuild, linux-kernel,
Ard Biesheuvel, Alexandre Ghiti, Linux Kernel Functional Testing,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, linux-s390
On Wed, Oct 08, 2025 at 03:46:43PM -0700, Nathan Chancellor wrote:
> Hi all,
>
> This is a series to address some problems that were exposed by the
> recent modules.builtin.modinfo series that landed in commit c7d3dd9163e6
> ("Merge patch series "Add generated modalias to
> modules.builtin.modinfo"").
>
> The third patch is not directly related to the aforementioned series, as
> the warning it fixes happens prior to the series but commit 8d18ef04f940
> ("s390: vmlinux.lds.S: Reorder sections") from the series creates
> conflicts in this area, so I included it here.
>
> I plan to send at least the first two patches to Linus by Saturday for
> -rc1 but I will take the third with an Ack.
>
> ---
> Nathan Chancellor (3):
> kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux
> kbuild: Add '.rel.*' strip pattern for vmlinux
> s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections
>
> arch/s390/kernel/vmlinux.lds.S | 44 +++++++++++++++++++++---------------------
> scripts/Makefile.vmlinux | 5 ++++-
> 2 files changed, 26 insertions(+), 23 deletions(-)
Thanks!
Acked-by: Nicolas Schier <nsc@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series
2025-10-08 22:46 [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nathan Chancellor
2025-10-08 22:46 ` [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections Nathan Chancellor
2025-10-09 19:44 ` [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nicolas Schier
@ 2025-10-10 7:19 ` Alexey Gladkov
2 siblings, 0 replies; 5+ messages in thread
From: Alexey Gladkov @ 2025-10-10 7:19 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Nicolas Schier, Masahiro Yamada, linux-kbuild, linux-kernel,
Ard Biesheuvel, Alexandre Ghiti, Linux Kernel Functional Testing,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, linux-s390
On Wed, Oct 08, 2025 at 03:46:43PM -0700, Nathan Chancellor wrote:
> Hi all,
>
> This is a series to address some problems that were exposed by the
> recent modules.builtin.modinfo series that landed in commit c7d3dd9163e6
> ("Merge patch series "Add generated modalias to
> modules.builtin.modinfo"").
>
> The third patch is not directly related to the aforementioned series, as
> the warning it fixes happens prior to the series but commit 8d18ef04f940
> ("s390: vmlinux.lds.S: Reorder sections") from the series creates
> conflicts in this area, so I included it here.
>
> I plan to send at least the first two patches to Linus by Saturday for
> -rc1 but I will take the third with an Ack.
>
> ---
> Nathan Chancellor (3):
> kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux
> kbuild: Add '.rel.*' strip pattern for vmlinux
> s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections
>
> arch/s390/kernel/vmlinux.lds.S | 44 +++++++++++++++++++++---------------------
> scripts/Makefile.vmlinux | 5 ++++-
> 2 files changed, 26 insertions(+), 23 deletions(-)
> ---
> base-commit: 38492c5743f8b7213ca86f0cd72ea625af35d5ef
> change-id: 20251008-kbuild-fix-modinfo-regressions-95e3fd151dec
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>
Acked-by: Alexey Gladkov <legion@kernel.org>
--
Rgrds, legion
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-10 7:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-08 22:46 [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nathan Chancellor
2025-10-08 22:46 ` [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections Nathan Chancellor
2025-10-09 11:37 ` Alexander Gordeev
2025-10-09 19:44 ` [PATCH 0/3] kbuild: Fixes for fallout from recent modules.builtin.modinfo series Nicolas Schier
2025-10-10 7:19 ` Alexey Gladkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).