[llvm-dev] ARM baremetal linking

Goran Mekić via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 4 04:58:53 PDT 2018


On Thu, Oct 04, 2018 at 11:23:18AM +0100, Peter Smith wrote:
> Hello Goran,
>
> At the moment the emulation is just there to tell LLD which target to
> use [*]. In your case ARM.  At the moment LLD accepts armelf and
> armelf-linux-eabi. However given that LLD can pick up the right target
> from the object file and you'll need at least one object file to build
> an image I'd just rely on that and leave the -m argument out.
>
> Peter
>
> [*] I think the suffix _fbsd on the emulation can be used to set the
> OSABI to ELFOSABI_FREEBSD but it doesn't look like that affects you.

As NuttX links only libraries (if I read the ld command properly),
-m armeabi did the trick for me. The image still fails, but it fails in
the exact same way as using GNU linker, so I would say linking works,
and now it's time for some debugging. :o) Thanx for your help!

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/61e0e0da/attachment.sig>


More information about the llvm-dev mailing list