[PATCH 01/11] alpha: initialize every field of a new got entry

Project / Subsystem

binutils / alpha

Date

2026-09-01

Proposer

Matt Turner <mattst88@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Improves memory safety and correctness by ensuring proper initialization.
  • • Uses `bfd_zalloc` for safer default initialization.

All attributes

project
binutils
subsystem
alpha
patch_id
—
discussion_id
20260901023318.3503991-2-mattst88@gmail.com
source_type
public_inbox
title
[PATCH 01/11] alpha: initialize every field of a new got entry
headline
alpha: initialize every field of a new got entry
tldr
Initialize all fields of GOT entries, especially flags and plt_offset, to prevent errors.
proposer
Matt Turner <mattst88@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Improves memory safety and correctness by ensuring proper initialization.
  • • Uses `bfd_zalloc` for safer default initialization.
series_id
binutils:alpha: initialize every field of a new got entry
series_role
reply
series_parts
[]
tags
  • • alpha
  • • linker
  • • got
  • • initialization
  • • tls
bugzilla_url
—
date
2026-09-01T00:00:00.000Z

[PATCH 01/11] alpha: initialize every field of a new got entry

This patch addresses an initialization issue in the alpha ELF linker where newly allocated GOT (Global Offset Table) entries were not fully initialized, specifically their flags and plt_offset fields. This oversight, found via Valgrind, could lead to incorrect behavior when merging GOT entries or when handling TLS relocations. By using bfd_zalloc to zero-initialize the entries and explicitly assigning only non-zero initial values, the patch ensures all fields are properly set, preventing potential bugs.