[PATCH] h8300-elf: ld: Use USER_LABEL_PREFIX when generating linker scripts.
Project / Subsystem
binutils / h8300-elf
Date
2026-08-15
Proposer
Jan Dubiec <jdx@o2.pl>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Ensuring consistent symbol naming between GCC and ld for the h8300-elf target vs. adherence to a specific prefix convention.
All attributes
- project
- binutils
- subsystem
- h8300-elf
- patch_id
- —
- discussion_id
- 20260815073659.709410-1-jdx@o2.pl
- source_type
- public_inbox
- title
- [PATCH] h8300-elf: ld: Use USER_LABEL_PREFIX when generating linker scripts.
- headline
- h8300-elf ld: Use USER_LABEL_PREFIX for linker scripts
- tldr
- Ensures the h8300-elf linker uses the USER_LABEL_PREFIX, aligning with GCC's convention for symbol names and preventing potential weak symbol issues.
- proposer
- Jan Dubiec <jdx@o2.pl>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Ensuring consistent symbol naming between GCC and ld for the h8300-elf target vs. adherence to a specific prefix convention.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • linker
- • embedded
- • symbol naming
- • binutils
- • gcc
- bugzilla_url
- —
- date
- 2026-08-15T00:00:00.000Z
[PATCH] h8300-elf: ld: Use USER_LABEL_PREFIX when generating linker scripts.
This patch modifies the h8300-elf linker script generation to use the USER_LABEL_PREFIX. GCC for h8300-elf sets this prefix (typically ’_’), but the linker was not using it, leading to mismatches between expected and actual symbol names. This inconsistency can cause subtle bugs, especially with weak symbols, and complicates multiplatform development. By applying the prefix in the linker scripts, the symbol naming becomes consistent between the compiler and the linker.