Re: [PATCH] riscv: Set undefined symbol value to 0 if pointer equality isn't needed
Project / Subsystem
binutils / risc-v
Date
2026-09-16
Proposer
H.J. Lu <hjl.tools@gmail.com>
Source type
public_inbox
Consensus
Ready to Land
Sentiment
—/10
Technical tradeoffs
- • Simplifies symbol resolution in certain RISC-V ELF dynamic linking scenarios by defaulting undefined symbols to 0, potentially improving build stability for specific cases like PR29655, but requires careful consideration if pointer equality is essential.
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- discussion_id
- CA+yXCZA+mXQjobWiUmJhMAQ-gFy_NhyWVreU0ZVkYXFSwhy7bw@mail.gmail.com
- source_type
- public_inbox
- title
- Re: [PATCH] riscv: Set undefined symbol value to 0 if pointer equality isn't needed
- headline
- riscv: Set undefined symbol value to 0 if pointer equality isn't needed
- tldr
- Patch accepted: RISC-V undefined symbols now default to 0 if pointer equality is not required.
- proposer
- H.J. Lu <hjl.tools@gmail.com>
- consensus
- Ready to Land
- outcome
- ready
- sentiment_score
- —
- technical_tradeoffs
-
- • Simplifies symbol resolution in certain RISC-V ELF dynamic linking scenarios by defaulting undefined symbols to 0, potentially improving build stability for specific cases like PR29655, but requires careful consideration if pointer equality is essential.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • risc-v
- • linker
- • symbols
- bugzilla_url
- —
- date
- 2026-09-16T00:00:00.000Z
Re: [PATCH] riscv: Set undefined symbol value to 0 if pointer equality isn't needed
This patch modifies the RISC-V ELF backend to set the value of undefined symbols to 0 when pointer equality is not a concern. This resolves a specific build failure for PR29655. The change in riscv_elf_finish_dynamic_symbol improves the linker’s handling of undefined symbols in certain contexts.