[PATCH] x86-64: Use UD0/UD2 after indirect jump in PLT entries

Project / Subsystem

binutils / x86-64

Date

2026-09-30

Proposer

"H.J. Lu" <hjl.tools@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

7/10

Technical tradeoffs

  • • The change introduces a specific instruction (UD0/UD2) that halts decoding, potentially impacting performance if branch prediction was already effective.

All attributes

project
binutils
subsystem
x86-64
patch_id
—
discussion_id
CAMe9rOoFbPvk27h+qnGu9xCfQ5z8LAkrr5L-5HPGR8PDD0XM5g@mail.gmail.com
source_type
public_inbox
title
[PATCH] x86-64: Use UD0/UD2 after indirect jump in PLT entries
headline
x86-64: Use UD0/UD2 after indirect jump in PLT entries
tldr
Optimize indirect jumps in PLT entries by replacing NOPs with UD0/UD2 instructions.
proposer
"H.J. Lu" <hjl.tools@gmail.com>
consensus
Proposed
outcome
under_review
sentiment_score
7
technical_tradeoffs
  • • The change introduces a specific instruction (UD0/UD2) that halts decoding, potentially impacting performance if branch prediction was already effective.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • optimization
  • • x86-64
  • • performance
  • • plt
bugzilla_url
—
date
2026-09-30T00:00:00.000Z

[PATCH] x86-64: Use UD0/UD2 after indirect jump in PLT entries

This patch replaces NOP instructions after indirect jumps in PLT entries with UD0 or UD2 on x86-64. This change aligns with Intel’s optimization manual, aiming to improve performance by preventing the processor from decoding unintended fall-through paths. The changes affect the BFD library’s ELF object file handling and include test suite adjustments.