Re: Linux 6.2-rc2
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2023-01-04 10:34:23
Also in:
lkml
Ard Biesheuvel [off-list ref] writes:
On Tue, 3 Jan 2023 at 03:13, Linus Torvalds [off-list ref] wrote:quoted
On Mon, Jan 2, 2023 at 5:45 PM Guenter Roeck [off-list ref] wrote:quoted
... and reverting commit 99cb0d917ff indeed fixes the problem.Hmm. My gut feel is that this just exposes some bug in binutils.
...
quoted hunk
quoted
It really shouldn't matter, but here we are, with a build problem with some random old binutils on an odd platform..AIUI, the way ld.bfd used to combine output sections may also affect the /DISCARD/ pseudo-section, and so introducing it much earlier results in these discards to be interpreted in a different order. The purpose of this change is to prevent .note.GNU-stack from deciding the section type of the .notes output section, and so keeping it in its own section should be sufficient. E.g.,--- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h@@ -896,7 +896,7 @@ * Otherwise, the type of .notes section would become PROGBITSinstead of NOTES. */ #define NOTES \ - /DISCARD/ : { *(.note.GNU-stack) } \ + .note.GNU-stack : { *(.note.GNU-stack) } \ .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ BOUNDED_SECTION_BY(.note.*, _notes) \ } NOTES_HEADERS \
This also fixes errors seen in the powerpc build with binutils <= 2.35. Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) cheers