forked from pool/grub2
Accepting request 1068350 from home:michael-chang:branches:Base:System
- Fix riscv64 error for relocation 0x13 is not implemented yet * 0001-RISC-V-Handle-R_RISCV_CALL_PLT-reloc.patch OBS-URL: https://build.opensuse.org/request/show/1068350 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=442
This commit is contained in:
parent
23aa9ce4c5
commit
f6a335c91f
56
0001-RISC-V-Handle-R_RISCV_CALL_PLT-reloc.patch
Normal file
56
0001-RISC-V-Handle-R_RISCV_CALL_PLT-reloc.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 8a6489818b5d30524092b3b9524aabbfc172a882 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Thu, 23 Feb 2023 13:15:08 -0800
|
||||||
|
Subject: [PATCH] RISC-V: Handle R_RISCV_CALL_PLT reloc
|
||||||
|
|
||||||
|
GNU assembler starting 2.40 release always generates R_RISCV_CALL_PLT
|
||||||
|
reloc for call in assembler [1], similarly LLVM does not make
|
||||||
|
distinction between R_RISCV_CALL_PLT and R_RISCV_CALL [2].
|
||||||
|
|
||||||
|
Fixes "grub-mkimage: error: relocation 0x13 is not implemented yet.".
|
||||||
|
|
||||||
|
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=70f35d72ef04cd23771875c1661c9975044a749c
|
||||||
|
[2] https://reviews.llvm.org/D132530
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||||
|
---
|
||||||
|
grub-core/kern/riscv/dl.c | 1 +
|
||||||
|
util/grub-mkimagexx.c | 2 ++
|
||||||
|
2 files changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/grub-core/kern/riscv/dl.c b/grub-core/kern/riscv/dl.c
|
||||||
|
index f26b12aaa..896653bb4 100644
|
||||||
|
--- a/grub-core/kern/riscv/dl.c
|
||||||
|
+++ b/grub-core/kern/riscv/dl.c
|
||||||
|
@@ -188,6 +188,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R_RISCV_CALL:
|
||||||
|
+ case R_RISCV_CALL_PLT:
|
||||||
|
{
|
||||||
|
grub_uint32_t *abs_place = place;
|
||||||
|
grub_ssize_t off = sym_addr - (grub_addr_t) place;
|
||||||
|
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
|
||||||
|
index 8ac9248d1..19cec945a 100644
|
||||||
|
--- a/util/grub-mkimagexx.c
|
||||||
|
+++ b/util/grub-mkimagexx.c
|
||||||
|
@@ -1331,6 +1331,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case R_RISCV_CALL:
|
||||||
|
+ case R_RISCV_CALL_PLT:
|
||||||
|
{
|
||||||
|
grub_uint32_t hi20, lo12;
|
||||||
|
|
||||||
|
@@ -1763,6 +1764,7 @@ translate_relocation_pe (struct translate_context *ctx,
|
||||||
|
case R_RISCV_BRANCH:
|
||||||
|
case R_RISCV_JAL:
|
||||||
|
case R_RISCV_CALL:
|
||||||
|
+ case R_RISCV_CALL_PLT:
|
||||||
|
case R_RISCV_PCREL_HI20:
|
||||||
|
case R_RISCV_PCREL_LO12_I:
|
||||||
|
case R_RISCV_PCREL_LO12_S:
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 1 02:58:07 UTC 2023 - Michael Chang <mchang@suse.com>
|
||||||
|
|
||||||
|
- Fix riscv64 error for relocation 0x13 is not implemented yet
|
||||||
|
* 0001-RISC-V-Handle-R_RISCV_CALL_PLT-reloc.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 22 07:08:44 UTC 2023 - Michael Chang <mchang@suse.com>
|
Wed Feb 22 07:08:44 UTC 2023 - Michael Chang <mchang@suse.com>
|
||||||
|
|
||||||
|
@ -497,6 +497,7 @@ Patch970: grub2-add-module-for-boot-loader-interface.patch
|
|||||||
# Fix out of memory error on lpar installation from virtual cdrom (bsc#1208024)
|
# Fix out of memory error on lpar installation from virtual cdrom (bsc#1208024)
|
||||||
Patch971: 0001-ieee1275-Further-increase-initially-allocated-heap-f.patch
|
Patch971: 0001-ieee1275-Further-increase-initially-allocated-heap-f.patch
|
||||||
Patch972: 0002-tpm-Disable-tpm-verifier-if-tpm-is-not-present.patch
|
Patch972: 0002-tpm-Disable-tpm-verifier-if-tpm-is-not-present.patch
|
||||||
|
Patch973: 0001-RISC-V-Handle-R_RISCV_CALL_PLT-reloc.patch
|
||||||
|
|
||||||
Requires: gettext-runtime
|
Requires: gettext-runtime
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1140
|
||||||
|
Loading…
Reference in New Issue
Block a user