From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: build failure caused by RUNTIME_CONST()
Date: Mon, 05 Aug 2024 09:19:05 +0200 [thread overview]
Message-ID: <87bk27fndi.fsf@prevas.dk> (raw)
In-Reply-To: <CAHk-=wiXK4cc8ikqN15vfi2+wsYJYh08qH8qzCpy+08Gh9whLw@mail.gmail.com> (Linus Torvalds's message of "Fri, 2 Aug 2024 18:19:17 -0700")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Fri, 2 Aug 2024 at 15:10, Oleg Nesterov <oleg@redhat.com> wrote:
>>
>> $ ld -v
>> GNU ld version 2.25-17.fc23
>
> Yeah, we document that we support building with ld-2.25. And I went
> and looked into the binutils-gdb repo, and it looks like this whole
> automatic start/stop symbol thing was introduced in 2.29.
>
Well, the basics of it goes much further back. ld/NEWS says
Changes in version 2.6:
* When an ELF section name is representable as a C identifier (this is not true
of most ELF section names), the linker will automatically define symbols
__start_SECNAME and __stop_SECNAME, where SECNAME is the section name, at the
beginning and the end of the section. This is used by glibc.
but then also goes on with
Addendum: Current versions of the linker (at least for version 2.18 onwards
and possibly much earlier as well) place two restrictions on this feature: The
symbols are only implemented for orphaned sections, not for explicitly placed
sections and they are PROVIDEd rather than being defined.
and I think what was changed in 2.29 is that some of that was being
relaxed again with commit cbd0eecf261c ("Always define referenced
__start_SECNAME/__stop_SECNAME"), which is what you find running 'git
blame' on the current doc text. But yes, it does seem that the 2.29
semantics are what are needed to avoid explicitly defining the symbols
in the linker script.
Rasmus
prev parent reply other threads:[~2024-08-05 7:19 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
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 [this message]
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=87bk27fndi.fsf@prevas.dk \
--to=linux@rasmusvillemoes.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--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 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).