2017-05-24 05:34 AM
Hello,
I want to make a branch from startup file like this :
Default_Handler:
b exception_panic .size Default_Handler, .-Default_HandlerBut i'm getting this error :
relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `exception_panic' defined in .text.exception_panic section in Miscelleneous/src/panic.o
collect2: error: ld returned 1 exit statusDo i need to create a specific section that is close enough to my branch instruction so that the branch can be effective ?
Thank you,
Best regards,
Aurélien
2017-05-24 06:49 AM
Try using B.W form to force the long encoding.
You'll note that they frequently use 'ldr r0,=SystemInit, blx r0' form to allow a branch anywhere in the 32-bit address range via a literal, which the linker can then fixup.
2017-05-24 07:27 AM
hi,
Thx for your reply. Actually i will use a bx instead of blx because i don't want to corrupt my LR register, i also wanted to keep my R0 registers unchanged for post analysing purpose but if it is not possible, it doesn't matter.
Thx
Aurélien
2017-05-24 08:49 AM
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489g/CIHFGAAD.html