* [PATCH] arm: R_ARM_REL32 relocation support [not found] <34780qy39a4uj093a4y> @ 2010-08-05 7:36 ` Olof Johansson 2010-08-05 8:48 ` Mikael Pettersson 0 siblings, 1 reply; 6+ messages in thread From: Olof Johansson @ 2010-08-05 7:36 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] arm: R_ARM_REL32 relocation support 2010-08-05 7:36 ` [PATCH] arm: R_ARM_REL32 relocation support Olof Johansson @ 2010-08-05 8:48 ` Mikael Pettersson 2010-08-05 15:06 ` Olof Johansson 2010-08-14 11:44 ` Martin Michlmayr 0 siblings, 2 replies; 6+ messages in thread From: Mikael Pettersson @ 2010-08-05 8:48 UTC (permalink / raw) To: linux-arm-kernel Olof Johansson writes: > 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> Michal Marek's patch(*) to use -fno-dwarf2-cfi-asm already exists and is IMO the correct solution in that it addresses the cause of the problem rather than its symptoms. NAK from me for now. (*) http://lkml.org/lkml/2010/7/26/154 /Mikael > --- > 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 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: R_ARM_REL32 relocation support 2010-08-05 8:48 ` Mikael Pettersson @ 2010-08-05 15:06 ` Olof Johansson 2010-08-14 11:44 ` Martin Michlmayr 1 sibling, 0 replies; 6+ messages in thread From: Olof Johansson @ 2010-08-05 15:06 UTC (permalink / raw) To: linux-arm-kernel On Thu, Aug 05, 2010 at 10:48:13AM +0200, Mikael Pettersson wrote: > Olof Johansson writes: > > 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> > > Michal Marek's patch(*) to use -fno-dwarf2-cfi-asm already exists > and is IMO the correct solution in that it addresses the cause > of the problem rather than its symptoms. > > NAK from me for now. > > (*) http://lkml.org/lkml/2010/7/26/154 Sigh. I searched the list for related patches and didn't see any. Sorry for the duplicate. -Olof ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: R_ARM_REL32 relocation support 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 1 sibling, 1 reply; 6+ messages in thread From: Martin Michlmayr @ 2010-08-14 11:44 UTC (permalink / raw) To: linux-arm-kernel * Mikael Pettersson <mikpe@it.uu.se> [2010-08-05 10:48]: > Michal Marek's patch(*) to use -fno-dwarf2-cfi-asm already exists > and is IMO the correct solution in that it addresses the cause > of the problem rather than its symptoms. > > (*) http://lkml.org/lkml/2010/7/26/154 I cannot find Michal's patch in mainline or in RMK's patch tracker. Michal, did you submit your patch to http://www.arm.linux.org.uk/developer/patches/ ? -- Martin Michlmayr http://www.cyrius.com/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: R_ARM_REL32 relocation support 2010-08-14 11:44 ` Martin Michlmayr @ 2010-08-14 22:46 ` Michal Marek 2010-08-14 22:58 ` Michal Marek 0 siblings, 1 reply; 6+ messages in thread From: Michal Marek @ 2010-08-14 22:46 UTC (permalink / raw) To: linux-arm-kernel Dne 14.8.2010 13:44, Martin Michlmayr napsal(a): > * Mikael Pettersson <mikpe@it.uu.se> [2010-08-05 10:48]: >> Michal Marek's patch(*) to use -fno-dwarf2-cfi-asm already exists >> and is IMO the correct solution in that it addresses the cause >> of the problem rather than its symptoms. >> >> (*) http://lkml.org/lkml/2010/7/26/154 > > I cannot find Michal's patch in mainline or in RMK's patch tracker. > Michal, did you submit your patch to > http://www.arm.linux.org.uk/developer/patches/ ? No, I didn't. I didn't even know about this site. I'll do it in a minute. Michal ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: R_ARM_REL32 relocation support 2010-08-14 22:46 ` Michal Marek @ 2010-08-14 22:58 ` Michal Marek 0 siblings, 0 replies; 6+ messages in thread From: Michal Marek @ 2010-08-14 22:58 UTC (permalink / raw) To: linux-arm-kernel Dne 15.8.2010 00:46, Michal Marek napsal(a): > Dne 14.8.2010 13:44, Martin Michlmayr napsal(a): >> * Mikael Pettersson <mikpe@it.uu.se> [2010-08-05 10:48]: >>> Michal Marek's patch(*) to use -fno-dwarf2-cfi-asm already exists >>> and is IMO the correct solution in that it addresses the cause >>> of the problem rather than its symptoms. >>> >>> (*) http://lkml.org/lkml/2010/7/26/154 >> >> I cannot find Michal's patch in mainline or in RMK's patch tracker. >> Michal, did you submit your patch to >> http://www.arm.linux.org.uk/developer/patches/ ? > > No, I didn't. I didn't even know about this site. I'll do it in a minute. http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6328/1 Michal ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-14 22:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <34780qy39a4uj093a4y>
2010-08-05 7:36 ` [PATCH] arm: R_ARM_REL32 relocation support Olof Johansson
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
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).