compiler-team icon indicating copy to clipboard operation
compiler-team copied to clipboard

Add -Z direct-access-external-data

Open heiher opened this issue 2 years ago • 1 comments

Proposal

Some architectures, such as LoongArch, do not support copy relocation and are not expected to support it in the future. Consequently, regardless of whether the relocation model is static or pic, direct access to external data should be avoided, and indirect access through the GOT is recommended. However, certain special cases, such as the Linux kernel, require different approaches for accessing external data in vmlinux and modules. Therefore, I propose introducing the Clang's direct-access-external-data option into Rustc.

Mentors or Reviewers

Process

The main points of the Major Change Process are as follows:

  • [x] File an issue describing the proposal.
  • [ ] A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • [ ] Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

heiher avatar Dec 20 '23 09:12 heiher

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

Concerns or objections to the proposal should be discussed on Zulip and formally registered here by adding a comment with the following syntax:

@rustbot concern reason-for-concern 
<description of the concern> 

Concerns can be lifted with:

@rustbot resolve reason-for-concern 

See documentation at https://forge.rust-lang.org

cc @rust-lang/compiler @rust-lang/compiler-contributors

rustbot avatar Dec 20 '23 09:12 rustbot

Yet another unstable codegen flag thrown into the seas of unstable codegen flags... but it seems useful, so let's not block this on figuring out what to do with them in general. No stability guarantees, so we can always change it in the future. @rustbot second

Noratrieb avatar Jan 23 '24 15:01 Noratrieb

@Nilstrieb Hello, Could you mark it accepted? Thanks.

heiher avatar Feb 06 '24 06:02 heiher

@apiraino usually closes them after a while But I can do it for you @rustbot label -final-comment-period +major-change-accepted

Noratrieb avatar Feb 06 '24 07:02 Noratrieb