https://sourceware.org/bugzilla/show_bug.cgi?id=23906
--- Comment #3 from Nick Clifton <nickc at redhat dot com> --- (In reply to David Ledger from comment #2) Hi David, > I’m not really sure how to use ld gold with arm-embedded toolchain, I don’t > think it is included in the toolchain. > Do you know a way I can use ld.gold or lld? Don't bother. If they are not easily available then they will not help. (I was hoping to be able to say "use gold as a workaround", but this only works if you do not have to jump through hoops in order to use it. > I tried with those flags, with debug, but same error: OK, it was worth a shot. :-( > c:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7.2. > 1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none- > eabi/bin/ld.exe > --sysroot=c:\users\david\appdata\roaming\xpacks\@gnu-mcu-eclipse\arm-none- > eabi-gcc\7.2.1-1.1.5\.content\bin\../arm-none-eabi -X -o uSupply Firmware > V1_0.elf -L../ldscripts > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/thumb/v6-m > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none- > eabi/lib/thumb/v6-m > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../arm-none-eabi/lib/thumb/v6-m > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1 > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../lib/gcc > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none- > eabi/lib > -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7. > 2.1-1.1.5/.content/bin/../arm-none-eabi/lib --gc-sections --no-keep-memory > --reduce-memory-overhead --print-memory-usage -Map uSupply Firmware V1_0.map > ./system/src/stm32f0-stdperiph/stm32f0xx_adc.o > ./system/src/stm32f0-stdperiph/stm32f0xx_can.o > ./system/src/stm32f0-stdperiph/stm32f0xx_cec.o > ./system/src/stm32f0-stdperiph/stm32f0xx_comp.o > ./system/src/stm32f0-stdperiph/stm32f0xx_crc.o > ./system/src/stm32f0-stdperiph/stm32f0xx_crs.o > ./system/src/stm32f0-stdperiph/stm32f0xx_dac.o > ./system/src/stm32f0-stdperiph/stm32f0xx_dbgmcu.o > ./system/src/stm32f0-stdperiph/stm32f0xx_dma.o > ./system/src/stm32f0-stdperiph/stm32f0xx_exti.o > ./system/src/stm32f0-stdperiph/stm32f0xx_flash.o > ./system/src/stm32f0-stdperiph/stm32f0xx_gpio.o > ./system/src/stm32f0-stdperiph/stm32f0xx_i2c.o > ./system/src/stm32f0-stdperiph/stm32f0xx_iwdg.o > ./system/src/stm32f0-stdperiph/stm32f0xx_misc.o > ./system/src/stm32f0-stdperiph/stm32f0xx_pwr.o > ./system/src/stm32f0-stdperiph/stm32f0xx_rcc.o > ./system/src/stm32f0-stdperiph/stm32f0xx_rtc.o > ./system/src/stm32f0-stdperiph/stm32f0xx_spi.o > ./system/src/stm32f0-stdperiph/stm32f0xx_syscfg.o > ./system/src/stm32f0-stdperiph/stm32f0xx_tim.o > ./system/src/stm32f0-stdperiph/stm32f0xx_usart.o > ./system/src/stm32f0-stdperiph/stm32f0xx_wwdg.o ./system/src/newlib/_cxx.o > ./system/src/newlib/_exit.o ./system/src/newlib/_sbrk.o > ./system/src/newlib/_startup.o ./system/src/newlib/_syscalls.o > ./system/src/newlib/assert.o ./system/src/diag/Trace.o > ./system/src/diag/trace_impl.o ./system/src/cortexm/_initialize_hardware.o > ./system/src/cortexm/_reset_hardware.o > ./system/src/cortexm/exception_handlers.o > ./system/src/cmsis/system_stm32f0xx.o ./system/src/cmsis/vectors_stm32f0xx.o > ./src/peripherals/Interrupt.o ./src/_write.o ./src/main.o -lstdc++_nano -lm > --start-group -lgcc -lg_nano -lc_nano --end-group --start-group -lgcc > -lc_nano --end-group -T ../ldscripts/mem.ld -T ../ldscripts/sections.ld -T > ../ldscripts/libs.ld Are you able to invoke the command line above ? IE, can you bypass collect2.exe altogether and run the linker directly ? If that works, (in the sense that the linker fails and returns an error exit status), then you could run the same command from inside gdb, and investigate where the error result is being generated... > To me this sounds like a resource issue. Ie I suspect that the linker is > running out of memory, or maybe stack space, and crashing. I think that this is still the most likely cause for the problem. How much memory does your machine have ? Can you run the same build on a machine with more memory and see if that makes a difference ? > * Use a newer version of the linker. The latest release is 2.31.1. I also still recommend giving this option a try. Cheers Nick -- 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