Re: [PATCH 3/4] ld: Fix discarded-qualifiers problems in ldlang.c
Project / Subsystem
binutils / ld
Date
2026-04-26
Proposer
Simon Marchi <simon.marchi@polymtl.ca>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
All attributes
- project
- binutils
- subsystem
- ld
- patch_id
- —
- discussion_id
- 4c9f78f3-4d42-48ac-ae83-89d5b955cd5d@polymtl.ca
- source_type
- public_inbox
- title
- Re: [PATCH 3/4] ld: Fix discarded-qualifiers problems in ldlang.c
- headline
- ld: Fix discarded-qualifiers problems in ldlang.c
- tldr
- The patch fixes discarded-qualifiers errors in ldlang.c due to qualifier-preserving strchr().
- proposer
- Simon Marchi <simon.marchi@polymtl.ca>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
- []
- series_id
- binutils:ld: fix discarded-qualifiers problems in ldlang.c
- series_role
- reply
- series_parts
- []
- tags
-
- • linker
- • ld
- • const
- • strchr
- • build error
- bugzilla_url
- —
- date
- 2026-04-26T00:00:00.000Z
Re: [PATCH 3/4] ld: Fix discarded-qualifiers problems in ldlang.c
This patch addresses -Wdiscarded-qualifiers errors in ldlang.c within the binutils linker (ld). The errors arise because of the new qualifier-preserving strchr() function. The patch makes the return type of archive_path() const and fixes up its callers. Simon Marchi notes one more variable, bslash at line 10957, needs to be changed in the same file.