Re: [PATCH] sh: handle Linux core notes in the generic ELF vector
Project / Subsystem
binutils / sh
Date
2026-09-30
Proposer
Alan Modra <amodra@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Prioritizing targets by section count is a heuristic that improves correctness for SH core files but might not be universally optimal for all ELF targets.
- • The change aims to fix a specific bug rather than refactor the entire target matching logic, which could be more complex.
All attributes
- project
- binutils
- subsystem
- sh
- patch_id
- —
- discussion_id
- arxza-w33Q0XNEW_@squeak.grove.modra.org
- source_type
- public_inbox
- title
- Re: [PATCH] sh: handle Linux core notes in the generic ELF vector
- headline
- sh: handle Linux core notes in the generic ELF vector
- tldr
- Improves SH core file support by prioritizing targets that correctly handle core note information.
- proposer
- Alan Modra <amodra@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Prioritizing targets by section count is a heuristic that improves correctness for SH core files but might not be universally optimal for all ELF targets.
- • The change aims to fix a specific bug rather than refactor the entire target matching logic, which could be more complex.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • sh
- • core dump
- • elf
- • bfd
- • debugging
- bugzilla_url
- —
- date
- 2026-09-30T00:00:00.000Z
Re: [PATCH] sh: handle Linux core notes in the generic ELF vector
This patch addresses a bug in the SH target’s ELF core file handling where the default elf32-shl target was chosen over elf32-sh-linux, leading to incorrect core file interpretation and missing register information for GDB. The fix modifies bfd_check_format_matches to prefer targets with a higher section count when multiple targets match equally, thus prioritizing elf32-sh-linux and resolving the issue.