Created attachment 10067 [details] reproducible test case Hi It seems since from 2.25 version linker does something with VLE relocations wrong. Issue not present on 2.24.90. Running LD with certain command line and disassemble resulting ELF gives: 02000000 <__init>: 2000000: 18 21 06 f0 e_stwu r1,-16(r1) 2000004: 00 80 se_mflr r0 2000006: 54 01 00 14 e_stw r0,20(r1) 200000a: 00 00 se_illegal 200000c: 50 01 00 14 e_lwz r0,20(r1) 2000010: 00 90 se_mtlr r0 2000012: 20 f1 se_addi r1,16 2000014: 00 04 se_blr 2000016: 50 01 81 00 e_lwz r0,0(r1) se_illegal instruction appears in ELF multiple times and breaks runtime execution. Tracked down differences 2.24.90 vs 2.25 I found that check "branch in range" at ppc_elf_relax_section() somehow affects final result. E.g. 2.24.90 produces warning on output: test.o: In function `main': test.c:(.text+0x10): relocation truncated to fit: R_PPC_VLE_REL24 against symbol `foo' defined in .ram_code section in test.o while 2.25 is not. Attached ld_se_illegal.tar which contains objects and linker script.
Hmm Seems like I have another source tree. Main line doesn't have such issue. Please ignore for a while.
Ignoring