aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <[email protected]>2024-03-13 07:58:39 +0000
committerIngo Molnar <[email protected]>2024-03-13 11:29:11 +0100
commit9b67ce2c121fbf11c0c7b6216c08200fda23c9af (patch)
tree6aa822a79b382f9fb218a9bf2ae8c3d2ea7229f6
parenta5cffd056ef52280c07a7f6a3b3faacf6b318e8e (diff)
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--arch/x86/kernel/vmlinux.lds.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 88dcf9366949..a20409b0a3f2 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -110,11 +110,10 @@ PHDRS {
SECTIONS
{
+ . = __START_KERNEL;
#ifdef CONFIG_X86_32
- . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
phys_startup_32 = ABSOLUTE(startup_32 - LOAD_OFFSET);
#else
- . = __START_KERNEL;
phys_startup_64 = ABSOLUTE(startup_64 - LOAD_OFFSET);
#endif