This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ARM bfd Error: cannot represent BFD_RELOC_ARM_MOVW relocation in this object file format
- From: Pavel Pavlov <pavel at summit-tech dot ca>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 13 Jul 2010 03:06:40 -0400
- Subject: ARM bfd Error: cannot represent BFD_RELOC_ARM_MOVW relocation in this object file format
I'm using cegcc (compiler for windows mobile) and if I compile for armv7 then I'll get everywhere tons off errors from assembler that
Error: cannot represent BFD_RELOC_ARM_MOVW relocation in this object file format
Error: cannot represent BFD_RELOC_ARM_MOVT relocation in this object file format
This is because gcc generates movw/movt sequence instead of using a constant pool.
Windows loader supports IMAGE_REL_BASED_HIGH and be IMAGE_REL_BASED_LOW which seems to be perfect match for BFD_RELOC_ARM_MOVW/BFD_RELOC_ARM_MOVT.
So, my question is: how can I teach bfd/binutils to generate that kind of relocs for wince/arm-pe? I tried to read arm-tc.c, wince-pe.h arm.h and elf-arm.h to find a clue how to cast black magic spells, but it seems that my wand's battery is totally discharged and magic doesn't work for me.
Any pointers on how to do it?
Thank you
(Related discussions are gcc list http://old.nabble.com/ARM-GCC%3A-MOVT-MOVW-reloacations-error-td29080990.html and post on cegcc list: http://permalink.gmane.org/gmane.comp.gnu.cegcc.devel/3124 )