riscv64:ld: option --oformat pei-riscv64-little raises segmentation fault (SIGSEGV)
Jan Beulich
jbeulich@suse.com
Tue Feb 17 09:44:14 GMT 2026
On 17.02.2026 10:25, Johannes Krottmayer wrote:
> On 2/16/26 9:02 AM, Jan Beulich wrote:
>> On 16.02.2026 08:50, Johannes Krottmayer wrote:
>>> I have tried to create a PE image for an EFI environment targeting
>>> RISCV64. But when I try to pass the option --oformat pei-riscv64-little
>>> to LD, LD crashes with a segmentation fault.
>>
>> It is my understanding that PE support for RISC-V (and also other targets,
>> like Arm64) doesn't go as far as allowing ...
>
> Okay, but I think it's maybe better to disable this option in further
> releases and don't let LD crash if another user tries the same
> like me.
"disable this option" may sound easier than it is. I for one can't think of
a good way to filter out such pretty special cases. Much of ld's cross-
format linking may be limited to "known good" cases, without others getting
explicitly rejected. Furthermore, even "assumed good" cases like ELF->PE on
x86 of course have meaningful restrictions on what the input objects may
legitimately contain. All of this is, I fear, pretty much a grey area.
Jan
More information about the Binutils
mailing list