Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: David Ledger Newsgroups: gnu.utils.bug Subject: LD Bug : 253 Exit Status Date: Wed, 21 Nov 2018 13:29:41 +1100 Lines: 248 Approved: bug-gnu-utils@gnu.org Message-ID: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1542782361 21240 208.118.235.17 (21 Nov 2018 06:39:21 GMT) X-Complaints-To: action@cs.stanford.edu To: "bug-gnu-utils@gnu.org" Envelope-to: bug-gnu-utils@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:mime-version:to:from:subject:date:importance; bh=JRNIGz3fYRbAkVu8cXSsuWCaj/GVY2A9Kd9mI13EFkQ=; b=lzYVOtXYr9Kk4GVQdwc9OMG+zCW7L/V5ar3TTGM+zmQBX5/e88XFkke911pM7tq1F6 62xrAVsRKyhTqwps7Lr5BykAXVMuvLohw1tO2dJy+TcvyFLaRLEKjXujlbzdHpmDKIM8 5trDJgD4IFwf6XPM6X2x7CZTqyBZeHSOWFxmqzo0s3PxKo/W0Esb20udBawQlweajhw1 hO8uTuDtamzM8uQihtWXeSbF8QKQ4+QWSgghfdfiMoNnNEgr6ATf4cfs3DsAubzTlYOr t0zmuy7DATsGwvUcq5G3plA9kINY471+Y0LeHqzj3OsUXtbG0ugfi2UxXCqe/8CqAgBx yoCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version:to:from:subject:date :importance; bh=JRNIGz3fYRbAkVu8cXSsuWCaj/GVY2A9Kd9mI13EFkQ=; b=ubrrqpPoyKjRgSFxyAD10AX+CuhHr0mTG4LME9eZpkMCnm8RTwfsI2v/7yk9qmo0yq /hZOZcs4n+lauPpYCX7J8jmYfPe2AbudldmLwqn24uwSZfAkeG525wwltvD5z3zBResT JjDWeJsGILx+f5DjZKRsR2v0OIDFetKlz7CCkWEJqAbPPhLXe4yZemdQgBLiwkBYX0fp BAe9SGhsXm0rQgqyvp8tpzQ24DWF0xljd2rTSZ4lkG7GH1/IcvPrRTRHbpACnLxFbPWP KqGbX8ADXpKDgrjjC0uVFxfRZUFUHkQ+6ZsRgRw40BP0z2mzmYFBINA/WfuNC6Ulhc1q iKog== X-Gm-Message-State: AGRZ1gIkDDwJATX2mO0QTzYVlH5mJsszbRwN4mL9Ci02D/NppUaJIYhO T9iiC0ac8UwY21j6/oXpsSodJOsV X-Google-Smtp-Source: AJdET5de8FiyY7lxSVQVFyyClYzbrZuIussU1wN2zLE4F0ASpdjLslFp8717o0nu8fTHC0xnRUU1mQ== X-Received: by 2002:a62:8915:: with SMTP id v21-v6mr4915566pfd.137.1542767381179; Tue, 20 Nov 2018 18:29:41 -0800 (PST) Importance: normal X-Priority: 3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::634 X-Mailman-Approved-At: Wed, 21 Nov 2018 01:39:19 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-gnu-utils@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU utilities List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.utils.bug:2256 Hello, For the last 3 days I=E2=80=99ve been trying to work around a bug in the ld= .exe linker. I=E2=80=99m hoping I can resolve the issue. The project is a C++ project for the ArmV6-m, cortexM0, I=E2=80=99m using = =E2=80=9CGNU ARM Cross C++ Linker=E2=80=9D. The issue is that as I enable various sections of the code the linker sudde= nly stops working and begins reporting the following error: collect2.exe: error: ld returned 253 exit status There is no additional helpful messages, nothing useful comes out of verbos= e either. This is the information that comes out of the linker on verbose: Invoking: GNU ARM Cross C++ Linker arm-none-eabi-g++ -mcpu=3Dcortex-m0 -march=3Darmv6-m -mthumb -Os -fmessage-= length=3D0 -ffreestanding -flto -Wall -Wextra -T "../ldscripts/mem.ld" -T "= ../ldscripts/sections.ld" -T "../ldscripts/libs.ld" -nostartfiles -Xlinker = --gc-sections -L"../ldscripts" -Wl,-Map,"uSupply Firmware V1_0.map" --specs= =3Dnano.specs -v -o "uSupply Firmware V1_0.elf" ./system/src/stm32f0-stdpe= riph/stm32f0xx_adc.o ./system/src/stm32f0-stdperiph/stm32f0xx_can.o ./syste= m/src/stm32f0-stdperiph/stm32f0xx_cec.o ./system/src/stm32f0-stdperiph/stm3= 2f0xx_comp.o ./system/src/stm32f0-stdperiph/stm32f0xx_crc.o ./system/src/st= m32f0-stdperiph/stm32f0xx_crs.o ./system/src/stm32f0-stdperiph/stm32f0xx_da= c.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-stdper= iph/stm32f0xx_gpio.o ./system/src/stm32f0-stdperiph/stm32f0xx_i2c.o ./syste= m/src/stm32f0-stdperiph/stm32f0xx_iwdg.o ./system/src/stm32f0-stdperiph/stm= 32f0xx_misc.o ./system/src/stm32f0-stdperiph/stm32f0xx_pwr.o ./system/src/s= tm32f0-stdperiph/stm32f0xx_rcc.o ./system/src/stm32f0-stdperiph/stm32f0xx_r= tc.o ./system/src/stm32f0-stdperiph/stm32f0xx_spi.o ./system/src/stm32f0-st= dperiph/stm32f0xx_syscfg.o ./system/src/stm32f0-stdperiph/stm32f0xx_tim.o .= /system/src/stm32f0-stdperiph/stm32f0xx_usart.o ./system/src/stm32f0-stdper= iph/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/n= ewlib/_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_handl= ers.o ./system/src/cmsis/system_stm32f0xx.o ./system/src/cmsis/vectors_stm= 32f0xx.o ./src/peripherals/Interrupt.o ./src/_write.o ./src/main.o =20 Using built-in specs. Reading specs from c:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/a= rm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/..= /../../../arm-none-eabi/lib/nano.specs rename spec link to nano_link rename spec link_gcc_c_sequence to nano_link_gcc_c_sequence rename spec cpp_unique_options to nano_cpp_unique_options COLLECT_GCC=3Darm-none-eabi-g++ COLLECT_LTO_WRAPPER=3Dc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclips= e/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1= /lto-wrapper.exe Target: arm-none-eabi Configured with: /Host/Work/arm-none-eabi-gcc-7.2.1-1.1/gcc/configure --pre= fix=3D/Host/Work/arm-none-eabi-gcc-7.2.1-1.1/install/win64/arm-none-eabi-gc= c --libexecdir=3D/Host/Work/arm-none-eabi-gcc-7.2.1-1.1/install/win64/arm-n= one-eabi-gcc/lib --infodir=3D/Host/Work/arm-none-eabi-gcc-7.2.1-1.1/install= /win64/arm-none-eabi-gcc/share/doc/info --mandir=3D/Host/Work/arm-none-eabi= -gcc-7.2.1-1.1/install/win64/arm-none-eabi-gcc/share/doc/man --htmldir=3D/H= ost/Work/arm-none-eabi-gcc-7.2.1-1.1/install/win64/arm-none-eabi-gcc/share/= doc/html --pdfdir=3D/Host/Work/arm-none-eabi-gcc-7.2.1-1.1/install/win64/ar= m-none-eabi-gcc/share/doc/pdf --build=3Dx86_64-unknown-linux-gnu --host=3Dx= 86_64-w64-mingw32 --target=3Darm-none-eabi --with-pkgversion=3D'GNU MCU Ecl= ipse ARM Embedded GCC\x2C 64-bits' --enable-languages=3Dc,c++ --enable-ming= w-wildcard --enable-plugins --disable-decimal-float --disable-libffi --disa= ble-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --d= isable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --dis= able-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=3Dyes --w= ith-python-dir=3Dshare/gcc-arm-none-eabi --with-sysroot=3D/Host/Work/arm-no= ne-eabi-gcc-7.2.1-1.1/install/win64/arm-none-eabi-gcc/arm-none-eabi --with-= multilib-list=3Drmprofile --disable-rpath --disable-build-format-warnings -= -with-system-zlib Thread model: single gcc version 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204= ] (GNU MCU Eclipse ARM Embedded GCC, 64-bits)=20 COMPILER_PATH=3Dc:/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/;c:/u= sers/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-= 1.1.5/.content/bin/../lib/gcc/;c:/users/david/appdata/roaming/xpacks/@gnu-m= cu-eclipse/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../lib/gcc/arm-none-e= abi/7.2.1/../../../../arm-none-eabi/bin/ LIBRARY_PATH=3Dc:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-n= one-eabi-gcc/7.2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/thumb/= v6-m/;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/lib/thumb/v6-m/;c:/users/david/appdata/roaming/xpacks/@gnu-mcu-e= clipse/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../arm-none-eabi/lib/thum= b/v6-m/;c:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eab= i-gcc/7.2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.1/;c:/users/dav= id/appdata/roaming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1.5/.c= ontent/bin/../lib/gcc/;c:/users/david/appdata/roaming/xpacks/@gnu-mcu-eclip= se/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../lib/gcc/arm-none-eabi/7.2.= 1/../../../../arm-none-eabi/lib/;c:/users/david/appdata/roaming/xpacks/@gnu= -mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../arm-none-eabi/li= b/ COLLECT_GCC_OPTIONS=3D'-mcpu=3Dcortex-m0' '-march=3Darmv6-m' '-mthumb' '-Os= ' '-fmessage-length=3D0' '-ffreestanding' '-flto' '-Wall' '-Wextra' '-T' '.= ./ldscripts/mem.ld' '-T' '../ldscripts/sections.ld' '-T' '../ldscripts/libs= .ld' '-nostartfiles' '-L../ldscripts' '-specs=3Dnano.specs' '-v' '-o' 'uSup= ply Firmware V1_0.elf' 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/collect2.exe -flto -= -sysroot=3Dc:\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 V= 1_0.elf -L../ldscripts -Lc:/users/david/appdata/roaming/xpacks/@gnu-mcu-ecl= ipse/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/xpack= s/@gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../arm-none-e= abi/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/roa= ming/xpacks/@gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1.5/.content/bin/../= arm-none-eabi/lib --gc-sections -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-stdperip= h/stm32f0xx_dac.o ./system/src/stm32f0-stdperiph/stm32f0xx_dbgmcu.o ./syste= m/src/stm32f0-stdperiph/stm32f0xx_dma.o ./system/src/stm32f0-stdperiph/stm3= 2f0xx_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-stdperi= ph/stm32f0xx_rtc.o ./system/src/stm32f0-stdperiph/stm32f0xx_spi.o ./system/= src/stm32f0-stdperiph/stm32f0xx_syscfg.o ./system/src/stm32f0-stdperiph/stm= 32f0xx_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/di= ag/Trace.o ./system/src/diag/trace_impl.o ./system/src/cortexm/_initialize_= hardware.o ./system/src/cortexm/_reset_hardware.o ./system/src/cortexm/exce= ption_handlers.o ./system/src/cmsis/system_stm32f0xx.o ./system/src/cmsis/v= ectors_stm32f0xx.o ./src/peripherals/Interrupt.o ./src/_write.o ./src/main.= o -lstdc++_nano -lm --start-group -lgcc -lc_nano --end-group --start-group = -lgcc -lc_nano --end-group -T ../ldscripts/mem.ld -T ../ldscripts/sections.= ld -T ../ldscripts/libs.ld collect2.exe: error: ld returned 253 exit status make: *** [makefile:65: uSupply Firmware V1_0.elf] Error 1=0D The map file appears to be cut off mid way through printing type informatio= n (it seems to crash half way, maybe the type name simply is too long). Notice that it cuts out entirely half way through an incomplete type, in th= e middle of the word no less: .text._ZNK7General6Parser6StatesIJNS0_4SCPI3EndINS2_15CommandInternalINS0_5= ChainIJRKNS0_7KeywordILj5ELj3EEERKNS0_8OptionalINS0_8RequiredILj3EEEEEEEEJN= S2_4NoneILj0EEENS2_5BlankILj0EEEEEEZNS2_7CommandISG_SI_SK_ZNS2_4SCPIIN11Ele= ctronics6System6SystemENSP_5CommsEEEKDaRT_RT0_EUlST_E7_EEDaOST_OSV_OT1_OT2_= EUlSY_E_EENS3_ISL_ZNSM_ISG_SI_SK_ZNSN_ISQ_SR_EESS_SU_SW_EUlST_E8_EEDaSY_SZ_= S11_S13_EUlSY_E_EENS3_INS4_INS5_IJRKNS6_ILj4ELj2EEESF_EEEJSI_SK_EEEZNSM_IS1= C_SI_SK_ZNSN_ISQ_SR_EESS_SU_SW_EUlST_E9_EEDaSY_SZ_S11_S13_EUlSY_E_EENS3_INS= 4_INS5_IJRKNS6_ILj5ELj2EEESF_EEEJSI_SK_EEEZNSM_IS1K_SI_SK_ZNSN_ISQ_SR_EESS_= SU_SW_EUlST_E10_EEDaSY_SZ_S11_S13_EUlSY_E_EENS6_ILj5ELj4EEENSB_ILj5EEES1Q_S= 1Q_S1Q_S1Q_S1Q_S1Q_S1Q_EE3RunIJLj0ELj1ELj2ELj3ELj4ELj5ELj6ELj7ELj8ELj9ELj10= ELj11ELj12EELj256EEEDaSt16integer_sequenceIjJXspT_EEERKSt5arrayIcXT0_EEj 0x0000000008009fdc 0xca ./src/main.o 0x0000000008009fdc =20 auto General::Parser::States= const&, General::Parser::Optional > const&>,= General::Parser::SCPI::None<0u>, General::Parser::SCPI::Blank<0u> >, auto = General::Parser::SCPI::Command const&, General::Parser::Optional= > const&>, General::Parser::SCPI::None<0u>, General::Parser::SCPI::Blank<0= u>, auto const General::Parser::SCPI::SCPI(Electronics::System::System&, Electronics::System:= :Comms&)::{lambda(auto:1)#9}>(Electronics::System::System&&, Electronics::S= ystem::Comms&&, General::Parser::SCPI::Blank<0u>&&, auto const General::Par= ser::SCPI::SCPI(El= ectronics::System::System&, Electronics::System::Comms&)::{lambda(auto:1)#9= }&&)::{lambda(auto const General::Parser::SCPI::SCPI(auto:1&, auto:2&)::{lambda(auto:1)#9})#1= }>, General::Parser::SCPI::End const&, General::Parser:= :Optional > const&>, General::Parser::SCPI::N= one<0u>, General::Parser::SCPI::Blank<0u> >, auto General::Parser::SCPI::Co= mmand const&, Gener= al::Parser::Optional > const&>, General::Pars= er::SCPI::None<0u>, General::Parser::SCPI::Blank<0u>, auto const General::P= arser::SCPI::SCPI(= Electronics::System::System&, Electronics::System::Comms&)::{lambda(auto:1)= #10}>(auto const General::Parser::SCPI::SCPI(Electronics::System::System&, Electronics::Syste= m::Comms&)::{lambda(auto:1)#9}, Electronics::System::System&&, General::Par= ser::SCPI::Blank<0u>, auto const General::Parser::SCPI::SCPI(Electronics::System::System&, El= ectronics::System::Comms&)::{lambda(auto:1)#10})::{lambda(auto const Genera= l::Parser::SCPI::SCPI(auto:1&, auto:2&)::{lambda(auto:1)#9})#1}>, General::Parser::SCPI::End<= General::Parser::SCPI::CommandInternal const&, General::Parser::Optional > const&>, General::Parser::SCPI::None<0u>, General::Parser::SCPI:= :Blank<0u> >, auto General::Parser::SCPI::Command const&, General::Parser::Optional > const&>, General::Parser::SCPI::None<0u>, General::Parser::SCP= I::Blank<0u> >, auto General::Parser::SCPI::Command const&, General::Parser::Optional > const&>, General::Parser::SCPI::None<0u>, General::= Parser::SCPI::Blank<0u>, auto const General::Parser::SCPI::SCPI(Electronics::System::System&,= Electronics::System::Comms&)::{lambda(auto:1)#10}>(auto const General::Par= ser::SCPI::SCPI(El= ectronics::System::System&, Electronics::System::Comms&)::{lambda(auto:1)#9= }, Electronics::System::System&&, General::Parser::SCPI::Blank<0u>, auto co= nst General::Parser::SCPI::SCPI(Electronics::System::System&, Electronics::System::Comms&)::{= lambda(auto:1)#10})::{lambda(auto const General::Parser::SCPI::SCPI(auto:1&, auto:2&)::{lambd= a(auto:1)#9})#1}>, General::Parser::SCPI::None<0u>, General::Parser::SCPI::= Blank<0u>, auto const General::Parser::SCPI::SCPI(Electronics::System::System&, Electronics::= System::Comms&)::{lambda(auto:1)#11}>(auto const General::Parser::SCPI::SCP= I(Electronics::Sys= tem::System&, Electronics::System::Comms&)::{lambda(auto:1)#9}, Electronics= ::System::System&&, General::Parser::SCPI::Blank<0u>, auto const General::P= arser::SCPI::SCPI(= Electronics::System::System&, Electronics::System::Comms&)::{lambda(auto:1)= #11})::{lambda(auto const General::Parser::SCPI::SCPI