Landing: 22a3dcacf2fb

Project / Subsystem

gcc / gcc/x86

Date

2026-08-30

Author

Iain Sandoe

Commit

22a3dcacf2fb9e90bea2708a4a3d8a56bc873d9e

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/x86
patch_id
—
commit_hash
22a3dcacf2fb9e90bea2708a4a3d8a56bc873d9e
source_type
github
headline
Darwin x86_64 lazy resolver stub clobbers now respect no_caller_saved_registers.
tldr
Darwin x86_64 lazy linking stub clobbers are now overridden by the no_caller_saved_registers attribute.
author
Iain Sandoe
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • x86
  • • darwin
  • • linking
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-30T00:00:00.000Z

On Darwin x86_64 systems prior to Darwin21, lazy symbol resolution uses a stub that overwrites registers d10 and d11. This commit ensures that if a function is explicitly marked with no_caller_saved_registers, this attribute takes precedence over the stub’s register clobbering. This prevents unexpected register corruption when users specify this function attribute.