[GH-ISSUE #400] Bootloader does not compile with GCC 15 #186

Open
opened 2026-05-06 13:16:04 +02:00 by BreizhHardware · 0 comments

Originally created by @tomlo76 on GitHub (Apr 18, 2026).
Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/400

Hello,

Cross-compiling bootloader (at least for n0110) with gcc 15 leads to an error with the linker :

/usr/lib/gcc/arm-none-eabi/15.2.0/../../../../arm-none-eabi/bin/ld: output/release/device/n0110/bootloader/jump_to_firmware.o(jump_to_firmware): Unknown destination type (ARM/Thumb) in /tmp/ccarcTNa.ltrans0.ltrans.o
/tmp/ccarcTNa.ltrans0.ltrans.o: in function `Bootloader::UpsilonRecoveryMenu::postOpen()':
/home/thomas/Projets/numworks/bootloader/bootloader/interface/menus/upsilon_recovery.cpp:44:(.text._ZN10Bootloader19UpsilonRecoveryMenu8postOpenEv+0x27e): dangerous relocation: unsupported relocation
/usr/lib/gcc/arm-none-eabi/15.2.0/../../../../arm-none-eabi/bin/ld: output/release/device/n0110/bootloader/jump_to_firmware.o(jump_to_firmware): Unknown destination type (ARM/Thumb) in /tmp/ccarcTNa.ltrans0.ltrans.o
/tmp/ccarcTNa.ltrans0.ltrans.o: in function `Bootloader::Slot::boot() const':
/home/thomas/Projets/numworks/bootloader/bootloader/slots/slot.cpp:80:(.text._ZNK10Bootloader4Slot4bootEv+0xfc): dangerous relocation: unsupported relocation

This can be reproduced by making the bootloader :

make MODEL=n0110 bootloader -j

I asked an LLM chatbot and it answers me that the jump_to_firmware label in bootloader/jump_to_firmware.s (first linker error) must be specified as a function, proposing to add the following (lines 7 and 11) :


.syntax unified
.section .text.jump_to_firmware
.align 2
.thumb
.global jump_to_firmware
.type jump_to_firmware, %function
jump_to_firmware:
  msr msp, r0
  bx r1
.size jump_to_firmware, .-jump_to_firmware

This change allows GCC to compile. If an ARM assembly developer can review it, I think it could be interesting to add this change to follow the last GCC versions.

Originally created by @tomlo76 on GitHub (Apr 18, 2026). Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/400 Hello, Cross-compiling bootloader (at least for n0110) with gcc 15 leads to an error with the linker : ```console /usr/lib/gcc/arm-none-eabi/15.2.0/../../../../arm-none-eabi/bin/ld: output/release/device/n0110/bootloader/jump_to_firmware.o(jump_to_firmware): Unknown destination type (ARM/Thumb) in /tmp/ccarcTNa.ltrans0.ltrans.o /tmp/ccarcTNa.ltrans0.ltrans.o: in function `Bootloader::UpsilonRecoveryMenu::postOpen()': /home/thomas/Projets/numworks/bootloader/bootloader/interface/menus/upsilon_recovery.cpp:44:(.text._ZN10Bootloader19UpsilonRecoveryMenu8postOpenEv+0x27e): dangerous relocation: unsupported relocation /usr/lib/gcc/arm-none-eabi/15.2.0/../../../../arm-none-eabi/bin/ld: output/release/device/n0110/bootloader/jump_to_firmware.o(jump_to_firmware): Unknown destination type (ARM/Thumb) in /tmp/ccarcTNa.ltrans0.ltrans.o /tmp/ccarcTNa.ltrans0.ltrans.o: in function `Bootloader::Slot::boot() const': /home/thomas/Projets/numworks/bootloader/bootloader/slots/slot.cpp:80:(.text._ZNK10Bootloader4Slot4bootEv+0xfc): dangerous relocation: unsupported relocation ``` This can be reproduced by making the bootloader : ```console make MODEL=n0110 bootloader -j ``` I asked an LLM chatbot and it answers me that the jump_to_firmware label in bootloader/jump_to_firmware.s (first linker error) must be specified as a function, proposing to add the following (lines 7 and 11) : ```asm .syntax unified .section .text.jump_to_firmware .align 2 .thumb .global jump_to_firmware .type jump_to_firmware, %function jump_to_firmware: msr msp, r0 bx r1 .size jump_to_firmware, .-jump_to_firmware ``` This change allows GCC to compile. If an ARM assembly developer can review it, I think it could be interesting to add this change to follow the last GCC versions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Upsilon#186
No description provided.