diff mbox

[2/2] Support R_PPC64_REL32 relocation type

Message ID 20090810141442.GE3110@in.ibm.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Mohan Kumar M Aug. 10, 2009, 2:14 p.m. UTC
[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(-)

Comments

Simon Horman Aug. 12, 2009, 11:26 p.m. UTC | #1
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.
diff mbox

Patch

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;