* [PATCH] Support R_PPC_PLTREL24
@ 2019-03-22 20:29 Vladimir 'phcoder' Serbinenko
2019-03-25 13:16 ` Daniel Kiper
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2019-03-22 20:29 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 42 bytes --]
--
Regards
Vladimir 'phcoder' Serbinenko
[-- Attachment #2: 0001-Support-R_PPC_PLTREL24.patch --]
[-- Type: application/octet-stream, Size: 1638 bytes --]
From 1a12f50ba9a32d616bcf6d6f4091dc4adc7ee74a Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Fri, 22 Mar 2019 21:24:24 +0100
Subject: [PATCH] Support R_PPC_PLTREL24
It's emitted by clang 7. It's the same as R_PPC_REL24.
---
grub-core/kern/powerpc/dl.c | 4 +++-
util/grub-module-verifier.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/grub-core/kern/powerpc/dl.c b/grub-core/kern/powerpc/dl.c
index 3a7fa3ed3..cdd61b305 100644
--- a/grub-core/kern/powerpc/dl.c
+++ b/grub-core/kern/powerpc/dl.c
@@ -79,7 +79,8 @@ grub_arch_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
max = rel + s->sh_size / s->sh_entsize;
rel < max;
rel++)
- if (ELF_R_TYPE (rel->r_info) == GRUB_ELF_R_PPC_REL24)
+ if (ELF_R_TYPE (rel->r_info) == GRUB_ELF_R_PPC_REL24
+ || ELF_R_TYPE (rel->r_info) == GRUB_ELF_R_PPC_PLTREL24)
(*tramp)++;
}
@@ -122,6 +123,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
*(Elf_Half *) addr = value;
break;
+ case GRUB_ELF_R_PPC_PLTREL24:
case GRUB_ELF_R_PPC_REL24:
{
Elf_Sword delta = value - (Elf_Word) addr;
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
index 60e4d2c06..163529ca9 100644
--- a/util/grub-module-verifier.c
+++ b/util/grub-module-verifier.c
@@ -29,6 +29,7 @@ struct grub_module_verifier_arch archs[] = {
GRUB_ELF_R_PPC_ADDR16_HA,
GRUB_ELF_R_PPC_ADDR32,
GRUB_ELF_R_PPC_REL32,
+ GRUB_ELF_R_PPC_PLTREL24,
-1
} },
{ "sparc64", 8, 1, EM_SPARCV9, GRUB_MODULE_VERIFY_SUPPORTS_RELA, (int[]){
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Support R_PPC_PLTREL24
2019-03-22 20:29 [PATCH] Support R_PPC_PLTREL24 Vladimir 'phcoder' Serbinenko
@ 2019-03-25 13:16 ` Daniel Kiper
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2019-03-25 13:16 UTC (permalink / raw)
To: Vladimir 'phcoder' Serbinenko; +Cc: The development of GRUB 2
On Fri, Mar 22, 2019 at 09:29:01PM +0100, Vladimir 'phcoder' Serbinenko wrote:
> From 1a12f50ba9a32d616bcf6d6f4091dc4adc7ee74a Mon Sep 17 00:00:00 2001
> From: Vladimir Serbinenko <phcoder@gmail.com>
> Date: Fri, 22 Mar 2019 21:24:24 +0100
> Subject: [PATCH] Support R_PPC_PLTREL24
>
> It's emitted by clang 7. It's the same as R_PPC_REL24.
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
And please add SOB to your patches.
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-25 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 20:29 [PATCH] Support R_PPC_PLTREL24 Vladimir 'phcoder' Serbinenko
2019-03-25 13:16 ` Daniel Kiper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.