Commit 0ad158e4 authored by Xi Ruoyao's avatar Xi Ruoyao Committed by Huacai Chen

LoongArch: Remove a redundant checking in relocator

With our linker script "relocated_addr >= VMLINUX_LOAD_ADDRESS" should
be always true.
Signed-off-by: default avatarXi Ruoyao <xry111@xry111.site>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 0124fbb4
...@@ -35,9 +35,7 @@ static inline void __init relocate_relative(void) ...@@ -35,9 +35,7 @@ static inline void __init relocate_relative(void)
if (rela->r_info != R_LARCH_RELATIVE) if (rela->r_info != R_LARCH_RELATIVE)
continue; continue;
if (relocated_addr >= VMLINUX_LOAD_ADDRESS)
relocated_addr = (Elf64_Addr)RELOCATED(relocated_addr); relocated_addr = (Elf64_Addr)RELOCATED(relocated_addr);
*(Elf64_Addr *)RELOCATED(addr) = relocated_addr; *(Elf64_Addr *)RELOCATED(addr) = relocated_addr;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment