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.