Because how one they could use the PE import/export facilities? For
generating a non-PIC DLLs, importing functions (and possibly exporting
too)? Without that GOT/PLT horror, just the comfortable PE base
address and relocations. UEFI OS Loader may not need import/export,
but a modular kernel and its components surely would need it.
Don't you happen to know the answer for my original question? I, of
course, tried fiddling around with the clang's triples, before going
to ask this question, nobody seems to be able to answer, in multiple
places, and even though it seems to recognize "win32", "windows",
"efi" subcomponents, still generates ELF.
2021-05-27 2:59 GMT+03:00, Bobby Eshleman <
bobby.e...@gmail.com>:
> Hey there,
>
> Out of curiosity, why does needing to compile both an OS and a loader mean
> that converting from ELF isn't option? The Xen project goes this route and
> loads like an OS with no problems, but I could be missing something...
>
> Short of the tooling you're looking for, perhaps going the route of
> vmlinuz, hand building the PE header, would be sufficient?
>
> -Bobby
>
> On Wed, May 26, 2021, 1:34 PM valerij zaporogeci <
vlrz...@gmail.com>
> wrote:
>
>> Hello. Is there a C/C++ compiler for RISCV (clang, I suspect, most
>> probably), capable of generating executables in the PE format? I need
>> this
>> for both - my "hobby" OS and its UEFI Loader,* so just converting from
>> ELF isn't an option*. Thank you.
>> <
https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/9809a583-3320-4013-9350-a5c751fc29b9n%40groups.riscv.org?utm_medium=email&utm_source=footer>
>> .
>>
>