public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>, Arnd Bergmann <arnd@arndb.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Ard Biesheuvel <ardb@kernel.org>
Subject: Re: Linux 6.2-rc2
Date: Mon, 2 Jan 2023 19:57:04 -0800	[thread overview]
Message-ID: <20230103035704.GA1207672@roeck-us.net> (raw)
In-Reply-To: <CAHk-=whmeBkyu3iS_s-yk0=t3GEoW3sQb-wJFHKykOjG=iQVFw@mail.gmail.com>

On Mon, Jan 02, 2023 at 06:13:09PM -0800, Linus Torvalds wrote:
> On Mon, Jan 2, 2023 at 5:45 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > ... and reverting commit 99cb0d917ff indeed fixes the problem.
> 
> Hmm. My gut feel is that this just exposes some bug in binutils.
> 
May well be, but it would be an architecture specific bug. The problem
is not seen when building an x86 image with binutils 2.32. Of course it
might affect other architectures.

> That said, maybe that commit should not have added its own /DISCARDS/
> thing, and instead just added that "*(.note.GNU-stack)" to the general
> /DISCARDS/ thing that is defined by the
> 
>   #define DISCARDS  ..
> 
> a little bit later, so that we only end up with one single DISCARD
> list. Something like this (broken patch on purpose):
> 
>   --- a/include/asm-generic/vmlinux.lds.h
>   +++ b/include/asm-generic/vmlinux.lds.h
>   @@ -897,5 +897,4 @@
>     */
>    #define NOTES                                        \
>   -     /DISCARD/ : { *(.note.GNU-stack) }              \
>         .notes : AT(ADDR(.notes) - LOAD_OFFSET) {       \
>                 BOUNDED_SECTION_BY(.note.*, _notes)     \
>   @@ -1016,4 +1015,5 @@
>    #define DISCARDS                                     \
>         /DISCARD/ : {                                   \
>   +     *(.note.GNU-stack)                              \
>         EXIT_DISCARDS                                   \
>         EXIT_CALL                                       \
> 

I don't know if and how it affects arm64 and riscv, but the above fixes
the problem for sh.

> But maybe that DISCARDS macrop ends up being used too late?
> 

DISCARDS is the very first entry in SECTIONS. NOTES is part of RO_DATA
and comes much later.

> It really shouldn't matter, but here we are, with a build problem with
> some random old binutils on an odd platform..

The one we know of. I could try to compile all architectures with
binutils 2.32, but I don't really want to do that if I can avoid it.

Guenter

  reply	other threads:[~2023-01-03  3:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 22:01 Linux 6.2-rc2 Linus Torvalds
2023-01-02 10:20 ` Build regressions/improvements in v6.2-rc2 Geert Uytterhoeven
2023-01-02 22:56 ` Linux 6.2-rc2 Guenter Roeck
2023-01-03  0:21   ` Linus Torvalds
2023-01-03  1:45     ` Guenter Roeck
2023-01-03  2:13       ` Linus Torvalds
2023-01-03  3:57         ` Guenter Roeck [this message]
2023-01-03  4:26           ` Nathan Chancellor
2023-01-03  9:14             ` Thorsten Leemhuis
2023-01-03 10:58         ` Ard Biesheuvel
2023-01-03 11:45           ` Conor Dooley
2023-01-03 12:22           ` Guenter Roeck
2023-01-03 18:26           ` Nathan Chancellor
2023-01-03 18:34           ` Linus Torvalds
2023-01-05 13:44             ` Masahiro Yamada
2023-01-04 10:34           ` Michael Ellerman
2023-01-10  0:32           ` SeongJae Park
2023-01-10 18:39             ` Masahiro Yamada
2023-01-10 19:14               ` SeongJae Park
2023-01-23  9:09                 ` Masahiro Yamada
2023-01-23 18:27                   ` SeongJae Park
2023-02-06 22:56                     ` SeongJae Park
2023-02-08  1:27                       ` Masahiro Yamada
2023-01-13 14:59           ` Tom Saeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230103035704.GA1207672@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=dalias@libc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=palmer@rivosinc.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox