Bug 33331 - ld: Add --print-gc-sections=file
Summary: ld: Add --print-gc-sections=file
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-27 05:57 UTC by Fangrui Song
Modified: 2025-08-27 06:03 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2025-08-27 05:57:49 UTC
ld --print-gc-sections dumps "removing unused section ..." messages to stderr (I'd expect stdout instead. Both lld and mold use stdout).

mold and lld are considering --print-gc-sections=file   https://github.com/rui314/mold/pull/1507