[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjahXA9r6AxWV_UEXF6LziecMyqJyiPn5PqtEwYHBKkvQ@mail.gmail.com>
Date: Fri, 7 Jun 2024 11:54:32 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: objtool query: section start/end symbols?
On Fri, 7 Jun 2024 at 02:39, Rasmus Villemoes <linux@...musvillemoes.dk> wrote:
>
> I'm probably missing something, but isn't this exactly what you get for
> free if you avoid using dots and other non-identifier symbols in the
> section names, i.e. make it "__static_const__" #sym or whatnot:
LOL. You're not missing anything - I am. I clearly missed this linker
rule entirely when I was looking for some explicit way to set these
start/end symbols, because that rule - which is almost exactly what I
wanted - is implicit.
That said, I say "almost exactly", because I can't get it to work.
Why? You need to match the output section name with the input section,
and since the whole point was that the input section was a *pattern*,
I can't do that.
I can hardcode the section names, which fixes it, but that is what I
wanted to avoid (once I hardcode the section names I could have just
added the start/end symbols by hand).
That said, clearly there's a way to just do it, since your
test-program - using the built-in linker script can do it.
I do worry that I also need that "AT()" logic to subtract the LOAD_OFFSET.
I really don't know linker scripts very well. I spent more time than I
want to admit to just because of missing whitespace.
Linus
Powered by blists - more mailing lists