From: Olof Johansson <olof@lixom.net>
To: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org, Olof Johansson <olof@lixom.net>
Subject: [PATCH] arm: R_ARM_REL32 relocation support
Date: Thu, 5 Aug 2010 02:36:03 -0500 [thread overview]
Message-ID: <1280993763-15254-1-git-send-email-olof@lixom.net> (raw)
In-Reply-To: <34780qy39a4uj093a4y>
commit d0679c730395d0bde9a46939e7ba255b4ba7dd7c moved -fno-dwarf2-cfi-asm to be
powerpc-only, causing R_ARM_REL32 to be used with some toolchains on ARM.
Implement support for it to make modules work with more toolchains.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
arch/arm/include/asm/elf.h | 1 +
arch/arm/kernel/module.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index 51662fe..b1f1991 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t;
#define R_ARM_NONE 0
#define R_ARM_PC24 1
#define R_ARM_ABS32 2
+#define R_ARM_REL32 3
#define R_ARM_CALL 28
#define R_ARM_JUMP24 29
#define R_ARM_V4BX 40
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index c628bdf..ec9526d 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -132,6 +132,10 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
*(u32 *)loc += sym->st_value;
break;
+ case R_ARM_REL32:
+ *(u32 *)loc += sym->st_value - loc;
+ break;
+
case R_ARM_PC24:
case R_ARM_CALL:
case R_ARM_JUMP24:
--
1.5.6.5
next parent reply other threads:[~2010-08-05 7:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <34780qy39a4uj093a4y>
2010-08-05 7:36 ` Olof Johansson [this message]
2010-08-05 8:48 ` Mikael Pettersson
2010-08-05 15:06 ` Olof Johansson
2010-08-14 11:44 ` Martin Michlmayr
2010-08-14 22:46 ` Michal Marek
2010-08-14 22:58 ` Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1280993763-15254-1-git-send-email-olof@lixom.net \
--to=olof@lixom.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®