arm - ecc throws linker error -
i've downloaded ellcc binaries (windows, mingw). i'm trying assemble , link single simple ir file.
for x86_64-ellcc-windows-gnu
, works fine. armv7-ellcc-linux
(arm-linux-engeabi
) , other arm target, throws linker error similar this:
"v:\users\teo\downloads\ellcc-x86_64-w64-mingw32-0.1.12\bin/ecc-ld.exe" -n ostdlib "-lv:\users\teo\downloads\ellcc-x86_64-w64-mingw32-0.1.12\bin\..\ libecc/lib/arm-linux-engeabi" -m armelf_linux_eabi --build-id --hash-style=gnu - -eh-frame-hdr -o a.out -e start -bstatic "v:\users\teo\downloads\ellcc-x86 64-w64-mingw32-0.1.12\bin\..\libecc/lib/arm-linux-engeabi/crt1.o" "v:\users\ \teo\downloads\ellcc-x86_64-w64-mingw32-0.1.12\bin\..\libecc/lib/arm-linux- engeabi/crtbegin.o" "c:\users\teo\appdata\local\temp\int32add-42cacb.o" -( -lc -lcompiler-rt -) "v:\users\teo\downloads\ellcc-x86_64-w64-mingw32-0.1.1 2\bin\..\libecc/lib/arm-linux-engeabi/crtend.o" c:\users\teo\appdata\local\temp\int32add-42cacb.o:(.arm.exidx+0x0): undefined re ference `__aeabi_unwind_cpp_pr0'
having read another answer on similar issue, suspect linking order wrong , runtime not being linked correctly.
but how fix linking order - or whatever problem -, since linker invoked ecc
? there reason why ecc
doesn't take care of automatically (especially since i'm giving 1 ir file compile)?
for arm-linux-engeabi, symbol "__aeabi_unwind_cpp_pr0" defined in libc++.a. looks need add -lc++ link command line (before -lc) or use ecc++ rather ecc link program.
it works x86_64 because missing function arm specific, of course.