Created attachment 6611 [details] Assembler file which does not build. I've build the gnu toolchain for target arm-none-eabi and cpu cortex-m3. I've adapted my application which initially was developed with IAR Embedded Workbench to be compiled with gcc. The software also has some assembler files to be assembled. When I build the software the assembler complains with the following error message: Error: cannot represent T32_OFFSET_IMM relocation in this object file format. The assembler instructions forcing the error always are LDR commands, e.g.: LDR r4, (EXC_PRI_IRQ_MASKED) /* lock irq */ The Problem in this case is the value represented by EXC_PRI_IRQ_MASKED. Here is the definition of this expression: #define EXC_PRI_IRQ_MASKED 0x60 I've tried several versions of binutils (also HEAD), gcc and newLib but the problem remains.
It should be IMO ldr r4,=EXC_PRI_IRQ_MASKED
Hi, you are right. I've fixed the assembler statements as you proposed and now it builds. Thanks!