[llvm-dev] ARM baremetal linking

Goran Mekić via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 4 01:25:41 PDT 2018


Hello,

I'm trying to build an image using LLVM toolchain and one of the
problems I have is that I don't know how to link. With GCC toolchain
it's this:

arm-none-eabi-ld --entry=__start -T/usr/home/meka/repos/nuttx/nuttx/configs/nucleo-f4x1re/scripts/f401re.ld -L"/usr/home/meka/repos/nuttx/nuttx/staging" -L"/usr/home/meka/repos/nuttx/nuttx/arch/arm/src/board" -o "/usr/home/meka/repos/nuttx/nuttx/nuttx" --start-group -lsched -ldrivers -lconfigs -lc -lmm -larch -lxx -lapps -lfs -lbinfmt -lxx -lboard  "/usr/lib/libgcc.a" --end-group

If I substitute arm-none-eabi-ld with ld.lld, I get the following error:

ld.lld: error: target emulation unknown: -m or at least one .o file required

I can't figure out what should I give it as argument to -m. Of course,
giving it at least one .o file works.

Regards,
meka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181004/c783d099/attachment.sig>


More information about the llvm-dev mailing list