Skip to content

Commit 9b67ce2

Browse files
RichardWeiYangingomolnar
authored andcommitted
x86/vmlinux.lds.S: Take __START_KERNEL out conditional definition
If CONFIG_X86_32=y, the section start address is defined to be "LOAD_OFFSET + LOAD_PHYSICAL_ADDR", which is the same as __START_KERNEL_map. Unify it with the 64-bit definition to simplify the code. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240313075839.8321-5-richard.weiyang@gmail.com
1 parent a5cffd0 commit 9b67ce2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/x86/kernel/vmlinux.lds.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,10 @@ PHDRS {
110110

111111
SECTIONS
112112
{
113+
. = __START_KERNEL;
113114
#ifdef CONFIG_X86_32
114-
. = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
115115
phys_startup_32 = ABSOLUTE(startup_32 - LOAD_OFFSET);
116116
#else
117-
. = __START_KERNEL;
118117
phys_startup_64 = ABSOLUTE(startup_64 - LOAD_OFFSET);
119118
#endif
120119

0 commit comments

Comments
 (0)