-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -Z direct-access-external-data #707
Comments
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:
Concerns can be lifted with:
See documentation at https://forge.rust-lang.org cc @rust-lang/compiler @rust-lang/compiler-contributors |
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. |
@Nilstrieb Hello, Could you mark it accepted? Thanks. |
…, r=petrochenkov Add unstable `-Z direct-access-external-data` cmdline flag for `rustc` The new flag has been described in the Major Change Proposal at rust-lang/compiler-team#707 Fixes rust-lang#118053
…, r=petrochenkov Add unstable `-Z direct-access-external-data` cmdline flag for `rustc` The new flag has been described in the Major Change Proposal at rust-lang/compiler-team#707 Fixes rust-lang#118053
…, r=petrochenkov Add unstable `-Z direct-access-external-data` cmdline flag for `rustc` The new flag has been described in the Major Change Proposal at rust-lang/compiler-team#707 Fixes rust-lang#118053
Rollup merge of rust-lang#119162 - heiher:direct-access-external-data, r=petrochenkov Add unstable `-Z direct-access-external-data` cmdline flag for `rustc` The new flag has been described in the Major Change Proposal at rust-lang/compiler-team#707 Fixes rust-lang#118053
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
orpic
, 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 invmlinux
andmodules
. Therefore, I propose introducing the Clang'sdirect-access-external-data
option into Rustc.Option
-Z direct-access-external-data
controls how to access symbols of external data.Supported values for this option are:
yes
- Don't use GOT indirection to reference external data symbols.no
- Use GOT indirection to reference external data symbols.If the option is not explicitly specified, different targets have different default values. (Equivalent to the default behavior before this)
For example:
direct-access-external-data=yes
direct-access-external-data=no
Mentors or Reviewers
Process
The main points of the Major Change Process are as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
The text was updated successfully, but these errors were encountered: