Re: [PATCH] RISC-V: Also output undefined symbols as dynamic symbols

Project / Subsystem

binutils / risc-v

Date

2026-05-13

Proposer

Nelson Chu <nelson.chu1990@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Fixes a regression in RISC-V linking behavior.
  • Ensures correct handling of undefined symbols during dynamic linking.
  • The change may be specific to RISC-V due to its unique linking requirements.

All attributes

project
binutils
subsystem
risc-v
patch_id
discussion_id
CAHT-pJzqthybcirJLPU0Rus_5pOmpOnUVgqfpf5Cr7VHLnza3g@mail.gmail.com
source_type
public_inbox
title
Re: [PATCH] RISC-V: Also output undefined symbols as dynamic symbols
headline
RISC-V: Also output undefined symbols as dynamic symbols
tldr
A RISC-V linker change ensures undefined symbols are treated as dynamic symbols when linking with `--unresolved-symbols=ignore-in-object-file`, fixing crashes…
proposer
Nelson Chu <nelson.chu1990@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Fixes a regression in RISC-V linking behavior.
  • Ensures correct handling of undefined symbols during dynamic linking.
  • The change may be specific to RISC-V due to its unique linking requirements.
series_id
series_role
standalone
series_parts
[]
tags
  • binutils
  • risc-v
  • linker
  • dynamic linking
  • undefined symbols
bugzilla_url
date
2026-05-13T00:00:00.000Z

Re: [PATCH] RISC-V: Also output undefined symbols as dynamic symbols

Vivian Wang identified that recent binutils changes cause RISC-V linkers to misbehave when encountering undefined symbols, specifically crashing or throwing errors when the desired behavior (with --unresolved-symbols=ignore-in-object-file) is to leave the symbol unresolved for the dynamic linker. The proposed patch restores the emission of dynamic symbols for undefined symbols, fixing a regression and a failing test case. Nelson Chu questions the RISC-V-specific nature of the fix.