<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hello Peter,</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">thank you for the quick answer.<br></div><div class="gmail_default" style="font-family:monospace,monospace">Actually I do want ARM code and not Thumb code. The dynamic library I try to build will be used from an environment that expects to call ARM code. I have no influence on the fact that I need ARM code. I am also supposed to link statically to a specialized prebuilt library providing runtime symbols such as "__rt_sdiv" (platform "none" will need symbols such as "__divsi3" for comparison). I have no influence on this circumstance, either.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">This means the target armv7a-none-eabi is useless to me, as neither the object format nor the expected runtime functions match my requirements.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">So the original problem remains.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Best regards,</div><div class="gmail_default" style="font-family:monospace,monospace">Jayvee<br></div></div><br><div class="gmail_quote"><div dir="ltr">Am Di., 2. Okt. 2018 um 12:04 Uhr schrieb Peter Smith <<a href="mailto:peter.smith@linaro.org">peter.smith@linaro.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Jayvee,<br>
<br>
On Tue, 2 Oct 2018 at 10:30, Jayvee Neumann via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hello together,<br>
><br>
> I have a question regarding the the target triple armv7a-win32-eabi. I want to emit ARM code (not thumb code) for windows. The object file should be in COFF.<br>
> When calling clang++ with that target and the "--verbose" switch, I can see that the generated triple is "tumbv7--windows-eabi". This is explicitly not what I specified as a target.<br>
> I then went ahead and changed the generated call to use "-triple armv7a--windows-eabi". This resulted in the compiler error:<br>
> > error: Function 'func' uses ARM instructions, but the target does not support ARM mode execution.<br>
> > fatal error: error in backend: unsupported relocation type: fixup_arm_uncondbl<br>
><br>
> The question I have is, why is it prohibited to export ARM code for win32? When I replace "win32" with "none" I get no such error.<br>
><br>
<br>
My, somewhat limited, understanding is that Windows for Arm is<br>
designed only for Thumb, for example there may be places in the tools<br>
and the OS that don't handle interworking between Arm and Thumb<br>
correctly. This prevents Arm instructions from being used safely on<br>
the platform. When you remove the win32 with none you are removing<br>
that platform specific restriction, however you are probably not<br>
getting a Windows compatible COFF file out either.<br>
<br>
I think you'll also not want EABI in your triple as that is the ELF<br>
ABI and not the Windows compatible COFF ABI that you'll need on<br>
Windows. You may want to try a target like thumbv7a-windows-msvc<br>
<br>
Peter<br>
<br>
> Best regards,<br>
> Jayvee<br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>