[PATCH 02/11] alpha: set DF_TEXTREL rather than DT_TEXTREL in info->flags

Project / Subsystem

binutils / alpha

Date

2026-09-01

Proposer

Matt Turner <mattst88@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Fixes a bug that has existed since 2001, improving correctness for certain linking scenarios.
  • • Ensures consistent behavior with other ELF targets regarding text relocations.

All attributes

project
binutils
subsystem
alpha
patch_id
—
discussion_id
20260901023318.3503991-3-mattst88@gmail.com
source_type
public_inbox
title
[PATCH 02/11] alpha: set DF_TEXTREL rather than DT_TEXTREL in info->flags
headline
alpha: set DF_TEXTREL rather than DT_TEXTREL in info->flags
tldr
Correctly sets DF_TEXTREL flag in linker info to avoid misinterpreting read-only relocations.
proposer
Matt Turner <mattst88@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Fixes a bug that has existed since 2001, improving correctness for certain linking scenarios.
  • • Ensures consistent behavior with other ELF targets regarding text relocations.
series_id
binutils:alpha: set df_textrel rather than dt_textrel in info->flags
series_role
reply
series_parts
[]
tags
  • • alpha
  • • linker
  • • elf
  • • relocation
  • • dynamic linker
bugzilla_url
—
date
2026-09-01T00:00:00.000Z

[PATCH 02/11] alpha: set DF_TEXTREL rather than DT_TEXTREL in info->flags

This patch corrects a long-standing issue in the alpha ELF linker where DT_TEXTREL was incorrectly OR-ed into info->flags as DF_TEXTREL. This misuse led to misinterpretations by the dynamic linker, causing shared libraries with text relocations in read-only sections to be treated as if linked with -Bsymbolic. It also caused incorrect relaxation of TLS references. The fix replaces the incorrect DT_TEXTREL with the proper DF_TEXTREL flag, resolving these issues.