linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Support R_PPC64_REL32 relocation type
@ 2009-08-10 14:14 M. Mohan Kumar
  2009-08-12 23:26 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: M. Mohan Kumar @ 2009-08-10 14:14 UTC (permalink / raw)
  To: horms, kexec; +Cc: linuxppc-dev, nhorman, miltonm

[PATCH 2/2] Support R_PPC64_REL32 relocation type

gcc-4.4 compiler creates R_PPC64_REL32 relocation type in the ppc64
purgatory code. Add support to handle R_PPC64_REL32 relocation type.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
---
 kexec/arch/ppc64/kexec-elf-rel-ppc64.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
index 80543af..97aa34c 100644
--- a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
+++ b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
@@ -62,6 +62,10 @@ void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
 		*(uint64_t *)location = value;
 		break;
 
+	case R_PPC64_REL32:
+		*(uint32_t *)location = value - (uint32_t)location;
+		break;
+
 	case R_PPC64_TOC:
 		*(uint64_t *)location = my_r2(ehdr);
 		break;
-- 
1.6.2.5

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

* Re: [PATCH 2/2] Support R_PPC64_REL32 relocation type
  2009-08-10 14:14 [PATCH 2/2] Support R_PPC64_REL32 relocation type M. Mohan Kumar
@ 2009-08-12 23:26 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2009-08-12 23:26 UTC (permalink / raw)
  To: M. Mohan Kumar; +Cc: linuxppc-dev, nhorman, kexec, miltonm

On Mon, Aug 10, 2009 at 07:44:42PM +0530, M. Mohan Kumar wrote:
> [PATCH 2/2] Support R_PPC64_REL32 relocation type
> 
> gcc-4.4 compiler creates R_PPC64_REL32 relocation type in the ppc64
> purgatory code. Add support to handle R_PPC64_REL32 relocation type.
> 
> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>

Thanks, applied this one too.

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

end of thread, other threads:[~2009-08-13  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-10 14:14 [PATCH 2/2] Support R_PPC64_REL32 relocation type M. Mohan Kumar
2009-08-12 23:26 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).