[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/5] loongarch: Optimize code using pc variable
From: |
Xiaotian Wu |
Subject: |
[PATCH v2 2/5] loongarch: Optimize code using pc variable |
Date: |
Wed, 7 Jun 2023 15:34:54 +0800 |
We already have the pc variable, no need to calculate it again.
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
---
util/grub-mkimagexx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
index e7d5bc631..a3ab04eb1 100644
--- a/util/grub-mkimagexx.c
+++ b/util/grub-mkimagexx.c
@@ -1156,7 +1156,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct
section_metadata *smd,
{
grub_int64_t off;
- off = sym_addr - target_section_addr - offset -
image_target->vaddr_offset;
+ off = sym_addr - pc;
grub_loongarch64_b26 (t32, off);
}
--
2.20.1
- [PATCH v2 0/5] loongarch: add relaxation support, Xiaotian Wu, 2023/06/07
- [PATCH v2 1/5] Use the correct format specifier for formatted output, Xiaotian Wu, 2023/06/07
- [PATCH v2 3/5] loongarch: Rename function names, Xiaotian Wu, 2023/06/07
- [PATCH v2 4/5] loongarch: Add ELF relocation types documentation and comments, Xiaotian Wu, 2023/06/07
- [PATCH v2 2/5] loongarch: Optimize code using pc variable,
Xiaotian Wu <=
- [PATCH v2 5/5] loongarch: Add relaxation support, Xiaotian Wu, 2023/06/07
- Re: [PATCH v2 0/5] loongarch: add relaxation support, Xi Ruoyao, 2023/06/11
Re: [PATCH v2 0/5] loongarch: add relaxation support, Xiaotian Wu, 2023/06/12