http://sourceware.org/bugzilla/show_bug.cgi?id=13783
Bug #: 13783 Summary: Generate static relocation for ldr pc, var Product: binutils Version: 2.22 Status: NEW Severity: critical Priority: P2 Component: gas AssignedTo: unassig...@sourceware.org ReportedBy: vova7...@mail.ru Classification: Unclassified 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 :) -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils