arm: R_ARM_REL32 relocation support
Subsystems (2)
PATCH 1/1 arm: R_ARM_REL32 relocation support
In reply to a message not in the archivecommit 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.
--- arch/arm/include/asm/elf.h | 1 + arch/arm/kernel/module.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/include/asm/elf.h +1 -0
@@ -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
arch/arm/kernel/module.c +4 -0
@@ -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 :
Signature · 1 line
1.5.6.5
Quoted 6 lines · Olof Johansson
commit
d0679c730395d0bde9a46939e7ba255b4ba7dd7cmoved -fno-dwarf2-cfi-asm to be powerpc-only, causingR_ARM_REL32to be used with some toolchains on ARM.Implement support for it to make modules work with more toolchains.
Signed-off-by Olof Johansson <[email protected]>
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
Quoted 41 lines
--- arch/arm/include/asm/elf.h | 1 + arch/arm/kernel/module.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-)arch/arm/include/asm/elf.h +1
-0@@ -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 40arch/arm/kernel/module.c +4
-0@@ -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 :Signature · 7 lines
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
Quoted 8 lines · Mikael Pettersson
Quoted 6 lines · Olof Johansson
commit
d0679c730395d0bde9a46939e7ba255b4ba7dd7cmoved -fno-dwarf2-cfi-asm to be powerpc-only, causingR_ARM_REL32to be used with some toolchains on ARM.Implement support for it to make modules work with more toolchains.
Signed-off-by Olof Johansson <[email protected]>
Quoted 7 lines
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.
Sigh. I searched the list for related patches and didn't see any. Sorry for the duplicate.
-Olof
Quoted 5 lines · Mikael Pettersson
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.
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/ ?
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Dne 14.8.2010 13:44, Martin Michlmayr napsal(a):
Quoted 10 lines · Mikael Pettersson
Quoted 5 lines
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.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
Dne 15.8.2010 00:46, Michal Marek napsal(a):
Quoted 6 lines
Dne 14.8.2010 13:44, Martin Michlmayr napsal(a):
Quoted 5 lines · Mikael Pettersson
Quoted 4 lines
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.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
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