[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/5] loongarch: Rename function names
From: |
Xiaotian Wu |
Subject: |
[PATCH v3 3/5] loongarch: Rename function names |
Date: |
Tue, 13 Jun 2023 17:06:33 +0800 |
According to the relocation documentation, the following function names are
renamed to show their exact meaning:
- from grub_loongarch64_xxx64_hi12() to grub_loongarch64_abs64_hi12()
- from grub_loongarch64_xxx64_hi12() to grub_loongarch64_abs64_lo20()
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/kern/loongarch64/dl.c | 4 ++--
grub-core/kern/loongarch64/dl_helper.c | 4 ++--
include/grub/loongarch64/reloc.h | 4 ++--
util/grub-mkimagexx.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/grub-core/kern/loongarch64/dl.c b/grub-core/kern/loongarch64/dl.c
index 43080e72e..7f923b415 100644
--- a/grub-core/kern/loongarch64/dl.c
+++ b/grub-core/kern/loongarch64/dl.c
@@ -109,13 +109,13 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
case R_LARCH_ABS64_LO20:
{
grub_uint32_t *abs_place = place;
- grub_loongarch64_xxx64_lo20 (abs_place, sym_addr);
+ grub_loongarch64_abs64_lo20 (abs_place, sym_addr);
}
break;
case R_LARCH_ABS64_HI12:
{
grub_uint32_t *abs_place = place;
- grub_loongarch64_xxx64_hi12 (abs_place, sym_addr);
+ grub_loongarch64_abs64_hi12 (abs_place, sym_addr);
}
break;
case R_LARCH_PCALA_HI20:
diff --git a/grub-core/kern/loongarch64/dl_helper.c
b/grub-core/kern/loongarch64/dl_helper.c
index e869ce9ac..879ae6189 100644
--- a/grub-core/kern/loongarch64/dl_helper.c
+++ b/grub-core/kern/loongarch64/dl_helper.c
@@ -235,7 +235,7 @@ void grub_loongarch64_xxx_lo12 (grub_uint32_t *place,
grub_int64_t offset)
*place |= grub_cpu_to_le32 (offset << 10) & ~insmask;
}
-void grub_loongarch64_xxx64_hi12 (grub_uint32_t *place, grub_int64_t offset)
+void grub_loongarch64_abs64_hi12 (grub_uint32_t *place, grub_int64_t offset)
{
const grub_uint32_t insmask = grub_cpu_to_le32_compile_time (0xffc003ff);
grub_uint32_t val;
@@ -247,7 +247,7 @@ void grub_loongarch64_xxx64_hi12 (grub_uint32_t *place,
grub_int64_t offset)
*place |= grub_cpu_to_le32 (val) & ~insmask;
}
-void grub_loongarch64_xxx64_lo20 (grub_uint32_t *place, grub_int64_t offset)
+void grub_loongarch64_abs64_lo20 (grub_uint32_t *place, grub_int64_t offset)
{
const grub_uint32_t insmask = grub_cpu_to_le32_compile_time (0xfe00001f);
grub_uint32_t val;
diff --git a/include/grub/loongarch64/reloc.h b/include/grub/loongarch64/reloc.h
index dec7a6b36..8ba355385 100644
--- a/include/grub/loongarch64/reloc.h
+++ b/include/grub/loongarch64/reloc.h
@@ -60,8 +60,8 @@ void grub_loongarch64_sop_32_s_0_10_10_16_s2
(grub_loongarch64_stack_t stack,
void grub_loongarch64_b26 (grub_uint32_t *place, grub_int64_t offset);
void grub_loongarch64_xxx_hi20 (grub_uint32_t *place, grub_int64_t offset);
void grub_loongarch64_xxx_lo12 (grub_uint32_t *place, grub_int64_t offset);
-void grub_loongarch64_xxx64_hi12 (grub_uint32_t *place, grub_int64_t offset);
-void grub_loongarch64_xxx64_lo20 (grub_uint32_t *place, grub_int64_t offset);
+void grub_loongarch64_abs64_hi12 (grub_uint32_t *place, grub_int64_t offset);
+void grub_loongarch64_abs64_lo20 (grub_uint32_t *place, grub_int64_t offset);
#define GRUB_LOONGARCH64_RELOCATION(STACK, PLACE, OFFSET) \
case R_LARCH_SOP_PUSH_ABSOLUTE: \
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
index a3ab04eb1..e50b29533 100644
--- a/util/grub-mkimagexx.c
+++ b/util/grub-mkimagexx.c
@@ -1165,10 +1165,10 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct
section_metadata *smd,
grub_loongarch64_xxx_hi20 (t32, sym_addr);
break;
case R_LARCH_ABS64_LO20:
- grub_loongarch64_xxx64_lo20 (t32, sym_addr);
+ grub_loongarch64_abs64_lo20 (t32, sym_addr);
break;
case R_LARCH_ABS64_HI12:
- grub_loongarch64_xxx64_hi12 (t32, sym_addr);
+ grub_loongarch64_abs64_hi12 (t32, sym_addr);
break;
case R_LARCH_PCALA_HI20:
{
--
2.40.1
[PATCH v3 2/5] loongarch: Optimize code using pc variable, Xiaotian Wu, 2023/06/13
[PATCH v3 1/5] Use the correct format specifier for formatted output, Xiaotian Wu, 2023/06/13