All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory
@ 2016-10-28  4:16 ` Pratyush Anand
  0 siblings, 0 replies; 6+ messages in thread
From: Pratyush Anand @ 2016-10-28  4:16 UTC (permalink / raw)
  To: linux-arm-kernel

gcc version in fedora koji is  6.2.1-2.fc25. kexec-tools compiled with this
gcc produced another relocation error:

machine_apply_elf_rel: ERROR Unknown type: 261

This patch fixes the above error.

Signed-off-by: Pratyush Anand <panand@redhat.com>
---
v1 -> v2: fixed line width to less than 80 chars

 kexec/arch/arm64/kexec-arm64.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
index 218f0bc832cd..eb0c3b87354e 100644
--- a/kexec/arch/arm64/kexec-arm64.c
+++ b/kexec/arch/arm64/kexec-arm64.c
@@ -720,6 +720,10 @@ void machine_apply_elf_rel(struct mem_ehdr *ehdr, struct mem_sym *UNUSED(sym),
 # define R_AARCH64_ABS64 257
 #endif
 
+#if !defined(R_AARCH64_PREL32)
+# define R_AARCH64_PREL32 261
+#endif
+
 #if !defined(R_AARCH64_LD_PREL_LO19)
 # define R_AARCH64_LD_PREL_LO19 273
 #endif
@@ -761,6 +765,12 @@ void machine_apply_elf_rel(struct mem_ehdr *ehdr, struct mem_sym *UNUSED(sym),
 		loc64 = ptr;
 		*loc64 = cpu_to_elf64(ehdr, elf64_to_cpu(ehdr, *loc64) + value);
 		break;
+	case R_AARCH64_PREL32:
+		type = "PREL32";
+		loc32 = ptr;
+		*loc32 = cpu_to_elf32(ehdr,
+			elf32_to_cpu(ehdr, *loc32) + value - address);
+		break;
 	case R_AARCH64_LD_PREL_LO19:
 		type = "LD_PREL_LO19";
 		loc32 = ptr;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory
@ 2016-10-28  4:16 ` Pratyush Anand
  0 siblings, 0 replies; 6+ messages in thread
From: Pratyush Anand @ 2016-10-28  4:16 UTC (permalink / raw)
  To: geoff, horms; +Cc: Pratyush Anand, catalin.marinas, kexec, linux-arm-kernel

gcc version in fedora koji is  6.2.1-2.fc25. kexec-tools compiled with this
gcc produced another relocation error:

machine_apply_elf_rel: ERROR Unknown type: 261

This patch fixes the above error.

Signed-off-by: Pratyush Anand <panand@redhat.com>
---
v1 -> v2: fixed line width to less than 80 chars

 kexec/arch/arm64/kexec-arm64.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
index 218f0bc832cd..eb0c3b87354e 100644
--- a/kexec/arch/arm64/kexec-arm64.c
+++ b/kexec/arch/arm64/kexec-arm64.c
@@ -720,6 +720,10 @@ void machine_apply_elf_rel(struct mem_ehdr *ehdr, struct mem_sym *UNUSED(sym),
 # define R_AARCH64_ABS64 257
 #endif
 
+#if !defined(R_AARCH64_PREL32)
+# define R_AARCH64_PREL32 261
+#endif
+
 #if !defined(R_AARCH64_LD_PREL_LO19)
 # define R_AARCH64_LD_PREL_LO19 273
 #endif
@@ -761,6 +765,12 @@ void machine_apply_elf_rel(struct mem_ehdr *ehdr, struct mem_sym *UNUSED(sym),
 		loc64 = ptr;
 		*loc64 = cpu_to_elf64(ehdr, elf64_to_cpu(ehdr, *loc64) + value);
 		break;
+	case R_AARCH64_PREL32:
+		type = "PREL32";
+		loc32 = ptr;
+		*loc32 = cpu_to_elf32(ehdr,
+			elf32_to_cpu(ehdr, *loc32) + value - address);
+		break;
 	case R_AARCH64_LD_PREL_LO19:
 		type = "LD_PREL_LO19";
 		loc32 = ptr;
-- 
2.7.4


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory
  2016-10-28  4:16 ` Pratyush Anand
@ 2016-10-28 18:43   ` Geoff Levand
  -1 siblings, 0 replies; 6+ messages in thread
From: Geoff Levand @ 2016-10-28 18:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/27/2016 09:16 PM, Pratyush Anand wrote:
> gcc version in fedora koji is  6.2.1-2.fc25. kexec-tools compiled with this
> gcc produced another relocation error:
> 
> machine_apply_elf_rel: ERROR Unknown type: 261
> 
> This patch fixes the above error.

Looks good.  Simon, please apply.

Reviewed-by: Geoff Levand <geoff@infradead.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory
@ 2016-10-28 18:43   ` Geoff Levand
  0 siblings, 0 replies; 6+ messages in thread
From: Geoff Levand @ 2016-10-28 18:43 UTC (permalink / raw)
  To: Pratyush Anand, horms; +Cc: catalin.marinas, kexec, linux-arm-kernel

On 10/27/2016 09:16 PM, Pratyush Anand wrote:
> gcc version in fedora koji is  6.2.1-2.fc25. kexec-tools compiled with this
> gcc produced another relocation error:
> 
> machine_apply_elf_rel: ERROR Unknown type: 261
> 
> This patch fixes the above error.

Looks good.  Simon, please apply.

Reviewed-by: Geoff Levand <geoff@infradead.org>


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory
  2016-10-28 18:43   ` Geoff Levand
@ 2016-11-07  8:14     ` Simon Horman
  -1 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2016-11-07  8:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 28, 2016 at 11:43:48AM -0700, Geoff Levand wrote:
> On 10/27/2016 09:16 PM, Pratyush Anand wrote:
> > gcc version in fedora koji is  6.2.1-2.fc25. kexec-tools compiled with this
> > gcc produced another relocation error:
> > 
> > machine_apply_elf_rel: ERROR Unknown type: 261
> > 
> > This patch fixes the above error.
> 
> Looks good.  Simon, please apply.
> 
> Reviewed-by: Geoff Levand <geoff@infradead.org>

Thanks, applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory
@ 2016-11-07  8:14     ` Simon Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2016-11-07  8:14 UTC (permalink / raw)
  To: Geoff Levand; +Cc: Pratyush Anand, catalin.marinas, kexec, linux-arm-kernel

On Fri, Oct 28, 2016 at 11:43:48AM -0700, Geoff Levand wrote:
> On 10/27/2016 09:16 PM, Pratyush Anand wrote:
> > gcc version in fedora koji is  6.2.1-2.fc25. kexec-tools compiled with this
> > gcc produced another relocation error:
> > 
> > machine_apply_elf_rel: ERROR Unknown type: 261
> > 
> > This patch fixes the above error.
> 
> Looks good.  Simon, please apply.
> 
> Reviewed-by: Geoff Levand <geoff@infradead.org>

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-07  8:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28  4:16 [PATCH V2] arm64: Add support of R_AARCH64_PREL32 relocation in purgatory Pratyush Anand
2016-10-28  4:16 ` Pratyush Anand
2016-10-28 18:43 ` Geoff Levand
2016-10-28 18:43   ` Geoff Levand
2016-11-07  8:14   ` Simon Horman
2016-11-07  8:14     ` Simon Horman

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.