diff options
author | Xi Ruoyao <xry111@xry111.site> | 2024-07-20 22:41:07 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2024-07-20 22:41:07 +0800 |
commit | 0ad158e4ef769c5f261cbf791e0005d69fc3b785 (patch) | |
tree | 336d2471f9b7c17be377f4a119a1130009ddb039 /arch/loongarch | |
parent | 0124fbb4c6dba23dbdf80c829be68adbccde2722 (diff) |
LoongArch: Remove a redundant checking in relocator
With our linker script "relocated_addr >= VMLINUX_LOAD_ADDRESS" should
be always true.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch')
-rw-r--r-- | arch/loongarch/kernel/relocate.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/loongarch/kernel/relocate.c b/arch/loongarch/kernel/relocate.c index d142061c61d4..e3836f0b9bd8 100644 --- a/arch/loongarch/kernel/relocate.c +++ b/arch/loongarch/kernel/relocate.c @@ -35,9 +35,7 @@ static inline void __init relocate_relative(void) if (rela->r_info != R_LARCH_RELATIVE) 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; } } |