All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: build failure caused by RUNTIME_CONST()
Date: Sat, 3 Aug 2024 00:10:14 +0200	[thread overview]
Message-ID: <20240802221014.GA20135@redhat.com> (raw)
In-Reply-To: <CAHk-=wguPQZKfWdNjF8OedfttMNkrW57Kb5Wjv0NmTzoEbUG7A@mail.gmail.com>

On 08/02, Linus Torvalds wrote:
>
> > The patch below seems to fix the problem, but I didn't find any report on lkml,
> > so perhaps I am the only one which hits this problem? And perhaps this is because
> > my gcc 5.3.1 is quite old?
>
> It's not your gcc. It must be your linker that is old and decrepit.

Ah, sorry. Of course I understood that this must ba a linker issue, sorry for
confusion!

	$ ld -v
	GNU ld version 2.25-17.fc23

> > OTOH, I know nothing about lds magic, so I fail to understand where these
> > __start/stop_runtime_xxx can come from without something like the change below...
>
> So it comes from this:
>
>     https://sourceware.org/binutils/docs/ld/Input-Section-Example.html
>
> and in there you will find
>
>    "If an output section’s name is the same as the input section’s name
>     and is representable as a C identifier, then the linker will
>     automatically see PROVIDE two symbols: __start_SECNAME and
>     __stop_SECNAME, where SECNAME is the name of the section. These
>     indicate the start address and end address of the output section
>     respectively"

Thanks!

> but apparently your linker doesn't do that.

apparently yes,

> I guess we'll have to go with doing this manually as in your patch,

OK... so if you think it makes sense to support the old toolchains,
perhaps you can commit the "proper" patch?

I can try to polish my hack, but as I said I don't understand this magic,
and I can only test the build on x86.

Oleg.


  reply	other threads:[~2024-08-02 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 11:45 build failure caused by RUNTIME_CONST() Oleg Nesterov
2024-08-02 16:50 ` Linus Torvalds
2024-08-02 22:10   ` Oleg Nesterov [this message]
2024-08-03  1:19     ` Linus Torvalds
2024-08-03 12:01       ` Oleg Nesterov
2024-08-03 15:35         ` Linus Torvalds
2024-08-03 15:45         ` Linus Torvalds
2024-08-05  7:19       ` Rasmus Villemoes

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=20240802221014.GA20135@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.