lkml.org 
[lkml]   [2022]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-10-26 10:36    [W:0.080 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site