[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2008526a-e0ca-7e67-cff6-b540d62e58c7@kernel.org>
Date: Wed, 26 Oct 2022 10:35:45 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Michael Matz <matz@...e.de>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Martin Liška <mliska@...e.cz>,
Borislav Petkov <bpetkov@...e.de>,
Peter Zijlstra <peterz@...radead.org>,
Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH v3 6/7] kbuild: use obj-y instead extra-y for objects
placed at the head
On 25. 10. 22, 14:26, Michael Matz wrote:
>> Ideas, comments? I'll send the attachment as a PATCH later (if there are
>> no better suggestions).
>
> This will work. An alternative way would be to explicitly name the input
> file in the section commands, without renaming the section:
>
> @@ -126,6 +126,7 @@ SECTIONS
> _text = .;
> _stext = .;
> /* bootstrapping code */
> + KEEP(vmlinux.a:head64.o(.head.text))
> HEAD_TEXT
> TEXT_TEXT
>
> But I guess not all arch's name their must-be-first file head64.o (or even
> have such requirement), so that's probably still arch-dependend and hence
> not inherently better than your way.
The downside of this is that it doesn't make sure the function
(startup_64()) is the first one. When someone sticks something before
it, it breaks again. But leaving the decision up to the x86 maintainers ;).
Re. other archs, I have absolutely no idea (haven't looked into that at
all).
thanks,
--
js
Powered by blists - more mailing lists