HomeFreeBSD

lld: work around elftoolchain bug which causes bloated RISCV binaries

Description

lld: work around elftoolchain bug which causes bloated RISCV binaries

The elftoolchain strip(1) command appears to have trouble with the new
.riscv.attributes sections being added by lld 17 to RISCV binaries. This
causes huge 'holes' in the files, making them larger than necessary.

Since nothing in the base system uses the new section yet, patch lld to
leave it out for now.

Direct commit to stable/13, since this intended to go into the 13.3
release, while the elftoolchain bug is being investigated.

Cherry-pick to stable/14 from stable/13 for the 14.1 release; the
bug has not been fixed yet. Hopefully it will be fixed (or the code
replaced) in time for 14.2. When that happens, this can be reverted.

Reported by: karels
Submitted by: jrtc27
Approved by: re (cperciva)

(cherry picked from commit 42ceb92e6a544fa0956eb660b3c16e38189acf20)
(cherry picked from commit 8f0bd08e9869ac1e6ad1f0f9c3964a76457cbce1)

Details

Provenance
dimAuthored on Feb 14 2024, 7:41 PM
karelsCommitted on May 13 2024, 8:58 PM
Parents
rG2c65656b29fb: nfsd: Fix Link conformance with RFC8881 for delegations
Branches
Unknown
Tags
Unknown