Proposal
On some targets (including MIPS, M68K, RISC-V, Hexagon) and configurations, LLVM will place small static data objects in the .sdata and .sbss sections, intended to allow size optimizations in embedded systems that can access data in these sections via small offsets from a register. LLVM provides command line arguments and/or IR module flags to control/disable this behavior in the event that it's unwanted, but they're different on every target.
This proposal is to add the -Z small-data-threshold flag, which appropriately configures LLVM's small-data threshold for the target in use.
See rust-lang/rust#117465 for a possible implementation of the proposed change.
Mentors or Reviewers
Process
The main points of the Major Change Process are as follows:
You can read more about Major Change Proposals on forge.
Comments
Proposal
On some targets (including MIPS, M68K, RISC-V, Hexagon) and configurations, LLVM will place small static data objects in the
.sdataand.sbsssections, intended to allow size optimizations in embedded systems that can access data in these sections via small offsets from a register. LLVM provides command line arguments and/or IR module flags to control/disable this behavior in the event that it's unwanted, but they're different on every target.This proposal is to add the
-Z small-data-thresholdflag, which appropriately configures LLVM's small-data threshold for the target in use.See rust-lang/rust#117465 for a possible implementation of the proposed change.
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 mergeon either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments