]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lld: work around elftoolchain bug which causes bloated RISCV binaries
authorDimitry Andric <dim@FreeBSD.org>
Wed, 14 Feb 2024 19:41:09 +0000 (20:41 +0100)
committerMike Karels <karels@FreeBSD.org>
Thu, 15 Feb 2024 18:09:56 +0000 (12:09 -0600)
commit313b30b6ab1f0c9549d29129f2fb6b1e31ef5f0f
tree9cd0542e81124a35314d33f875955ef2eb738a40
parentd19b59cfe594a878d3f073d6c31ded672c6591a4
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.

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

(cherry picked from commit 42ceb92e6a544fa0956eb660b3c16e38189acf20)
contrib/llvm-project/lld/ELF/Writer.cpp