History

kbuild: remove head-y syntax

Kbuild puts the objects listed in head-y at the head of vmlinux. Conventionally, we do this for head*.S, which contains the kernel entry point. A counter approach is to control the section order by the linker script. Actually, the code marked as __HEAD goes into the ".head.text" section, which is placed before the normal ".text" section. I do not know if both of them are needed. From the build system perspective, head-y is not mandatory. If you can achieve the proper code placement by the linker script only, it would be cleaner. I collected the current head-y objects into head-object-list.txt. It is a whitelist. My hope is it will be reduced in the long run.

Masahiro Yamada committed 4 years ago

Commit ce697cc1 parent 321648424 files · +60 −67Browse files

Showing the changes to scripts (1 of 24 files). Show all

Unified · Split

scripts/head-object-list.txt+53−0
@@ -0,0 +1,53 @@
1+# Head objects
2+#
3+# The objects listed here are placed at the head of vmlinux. A typical use-case
4+# is an object that contains the entry point. This is kept for compatibility
5+# with head-y, which Kbuild used to support.
6+#
7+# A counter approach is to control the section placement by the linker script.
8+# The code marked as __HEAD goes into the ".head.text" section, which is placed
9+# before the normal ".text" section.
10+#
11+# If you can achieve the correct code ordering by linker script, please delete
12+# the entry from this file.
13+#
14+arch/alpha/kernel/head.o
15+arch/arc/kernel/head.o
16+arch/arm/kernel/head-nommu.o
17+arch/arm/kernel/head.o
18+arch/arm64/kernel/head.o
19+arch/csky/kernel/head.o
20+arch/hexagon/kernel/head.o
21+arch/ia64/kernel/head.o
22+arch/loongarch/kernel/head.o
23+arch/m68k/68000/head.o
24+arch/m68k/coldfire/head.o
25+arch/m68k/kernel/head.o
26+arch/m68k/kernel/sun3-head.o
27+arch/microblaze/kernel/head.o
28+arch/mips/kernel/head.o
29+arch/nios2/kernel/head.o
30+arch/openrisc/kernel/head.o
31+arch/parisc/kernel/head.o
32+arch/powerpc/kernel/head_40x.o
33+arch/powerpc/kernel/head_44x.o
34+arch/powerpc/kernel/head_64.o
35+arch/powerpc/kernel/head_8xx.o
36+arch/powerpc/kernel/head_book3s_32.o
37+arch/powerpc/kernel/head_fsl_booke.o
38+arch/powerpc/kernel/entry_64.o
39+arch/powerpc/kernel/fpu.o
40+arch/powerpc/kernel/vector.o
41+arch/powerpc/kernel/prom_init.o
42+arch/riscv/kernel/head.o
43+arch/s390/kernel/head64.o
44+arch/sh/kernel/head_32.o
45+arch/sparc/kernel/head_32.o
46+arch/sparc/kernel/head_64.o
47+arch/x86/kernel/head_32.o
48+arch/x86/kernel/head_64.o
49+arch/x86/kernel/head32.o
50+arch/x86/kernel/head64.o
51+arch/x86/kernel/ebda.o
52+arch/x86/kernel/platform-quirks.o
53+arch/xtensa/kernel/head.o