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#
14arch/alpha/kernel/head.o
15arch/arc/kernel/head.o
16arch/arm/kernel/head-nommu.o
17arch/arm/kernel/head.o
18arch/arm64/kernel/head.o
19arch/csky/kernel/head.o
20arch/hexagon/kernel/head.o
21arch/ia64/kernel/head.o
22arch/loongarch/kernel/head.o
23arch/m68k/68000/head.o
24arch/m68k/coldfire/head.o
25arch/m68k/kernel/head.o
26arch/m68k/kernel/sun3-head.o
27arch/microblaze/kernel/head.o
28arch/mips/kernel/head.o
29arch/nios2/kernel/head.o
30arch/openrisc/kernel/head.o
31arch/parisc/kernel/head.o
32arch/powerpc/kernel/head_40x.o
33arch/powerpc/kernel/head_44x.o
34arch/powerpc/kernel/head_64.o
35arch/powerpc/kernel/head_8xx.o
36arch/powerpc/kernel/head_book3s_32.o
37arch/powerpc/kernel/head_fsl_booke.o
38arch/powerpc/kernel/entry_64.o
39arch/powerpc/kernel/fpu.o
40arch/powerpc/kernel/vector.o
41arch/powerpc/kernel/prom_init.o
42arch/riscv/kernel/head.o
43arch/s390/kernel/head64.o
44arch/sh/kernel/head_32.o
45arch/sparc/kernel/head_32.o
46arch/sparc/kernel/head_64.o
47arch/x86/kernel/head_32.o
48arch/x86/kernel/head_64.o
49arch/x86/kernel/head32.o
50arch/x86/kernel/head64.o
51arch/x86/kernel/ebda.o
52arch/x86/kernel/platform-quirks.o
53arch/xtensa/kernel/head.o