[Bug ld/10073] New: R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c
We are trying to link a 3rd party library compiled using the ARM/IAR compiler into our project, which we compile using the GNU arm-elf toolchain. ld fails to link the 3rd party library, and spits out warnings: "warning: internal error: unsupported relocation error" The ld appears to be complaining because the IAR compiler produces instructions which must be relocated using R_ARM_THM_PC8, but it appears that R_ARM_THM_PC8 isn't implemented in binutils. I was able to confirm this by recompiling binutils with some printf statements describing the unsupported relocation method. -- Summary: R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c Product: binutils Version: 2.19 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: osk at exegin dot com CC: bug-binutils at gnu dot org GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: arm-elf-unknown http://sourceware.org/bugzilla/show_bug.cgi?id=10073 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/10073] R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c
--- Additional Comments From osk at exegin dot com 2009-04-30 18:42 --- Hi Nick, I tried out the patch, but it doesn't appear to work correctly. GNU ld still outputs warnings when attempting to link the two libraries. We get the following warnings: libecc.a(tk-aes-e.obj): In function `tkAesSetupEnc': c:\IAR_work\mce_release\src\aes\tk-aes-e.c:(.text+0x98): relocation truncated to fit: R_ARM_THM_PC8 against `.text_9' libecc.a(tk-aes-e.obj): In function `aesEnc': c:\IAR_work\mce_release\src\aes\tk-aes-e.c:(.text+0x416): relocation truncated to fit: R_ARM_THM_PC8 against `.text_11' I downloded a copy of the ARM/ELF specification, and it shows that the R_ARM_THM_PC8 appears to be a special case for computing the initial addend. I'm not sure if the submitted patch takes this into account. Thanks, Owen (In reply to comment #2) > Hi Owen, > > I have uploaded a possible patch to fix this problem - please could you try > it > out for me ? > > Not having any binaries containing the R_ARM_THM_PC8 reloc makes testing > locally impossible, but I think that I have implemented it correctly. > > Cheers > Nick > -- http://sourceware.org/bugzilla/show_bug.cgi?id=10073 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/10073] R_ARM_THM_PC8 Relocation Not Implemented in elf32-arm.c
--- Additional Comments From osk at exegin dot com 2009-05-06 20:10 --- Created an attachment (id=3926) --> (http://sourceware.org/bugzilla/attachment.cgi?id=3926&action=view) IAR object producing error. I've uploaded some sample code that can be used to reproduce the bug and to test the fix. The object file (test-pc8.o) was compiled using an evaluation copy of IAR's C compiler. -- http://sourceware.org/bugzilla/show_bug.cgi?id=10073 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils