Skip to content

Conversation

@heiher
Copy link

@heiher heiher commented Dec 3, 2025

Add object relocation constants for 32-bit and 64-bit LoongArch processor families.

This is a key piece of groundwork in my push to bring UEFI target support to the LLVM LoongArch backend, so that Rust can support the UEFI target as well.

@prmerger-automator
Copy link
Contributor

@heiher : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@heiher
Copy link
Author

heiher commented Dec 4, 2025

This proposal was put together by the Loongson team (the main folks driving the open LoongArch effort) along with a bunch of community contributors. After several rounds of review, we think the current draft is solid and covers everything needed for UEFI support.
@Karl-Bridge-Microsoft Would you mind taking a quick look when you get a chance? Thank you for your time.

Copy link

@xen0n xen0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small suggestions after thinking about this for several days...

Add object relocation constants for 32-bit and 64-bit LoongArch processor families.
@heiher
Copy link
Author

heiher commented Dec 15, 2025

ping @Karl-Bridge-Microsoft

@Karl-Bridge-Microsoft
Copy link
Collaborator

I've reached out to an internal team to review your contribution. Thanks!

@jkotas
Copy link
Contributor

jkotas commented Dec 18, 2025

This is a key piece of groundwork in my push to bring UEFI target support to the LLVM LoongArch backend

Could you please explain why this is needed to bring UEFI support for Loongarch?

@heiher
Copy link
Author

heiher commented Dec 18, 2025

This is a key piece of groundwork in my push to bring UEFI target support to the LLVM LoongArch backend

Could you please explain why this is needed to bring UEFI support for Loongarch?

We're working on adding support for the loongarch64-unknown-uefi target in the Rust compiler, which needs to produce native PE32+ binaries, as required by Rust's UEFI targets. Existing targets like x86_64-unknown-uefi and aarch64-unknown-uefi rely on LLVM to directly emit PE32+ object files, and we're taking the same approach for LoongArch. That's why we need to add LoongArch-specific relocation entries to the PE format, so the architecture's relocations can be handled correctly in COFF objects. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants