Hello. I do not know how to fix the problem, so I will describe the situation and its possible solution. Have a static code: .section FSWI_PATCH1, "ax", %progbits .arm ldr pc, main_jumper .section FSWI_PATCH2,"ax",%progbits .arm main_jumper: .int swi_handler @ function FSWI_PATCH1 and FSWI_PATCH2 have static addresses. But I can`t compile it, give "internal_relocation (type: OFFSET_IMM) not fixed up". IAR compile it fine. I try to find bug in GAS and found this: tc-arm.c: 21867: case BFD_RELOC_ARM_OFFSET_IMM: if (section->use_rela_p) { code = fixp->fx_r_type; break; } I make it like that: if (section->use_rela_p) { code = fixp->fx_r_type; break; } else { code = BFD_RELOC_ARM_LDR_PC_G0; break; } And it correctly compile and generate 4 bytes of opcode like IAR. I do not know how to correctly fix this error, but the nature of the error, I think you understand. Sorry for my english :)
Did you mean "ldr pc, =main_jumper"?