[all-commits] [llvm/llvm-project] deae5e: [lld-macho] Fix branch extension logic compatibili...
alx32 via All-commits
all-commits at lists.llvm.org
Thu May 1 10:29:28 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: deae5eef7147c5ad3acff612ab0ed00e2186d9a5
https://github.com/llvm/llvm-project/commit/deae5eef7147c5ad3acff612ab0ed00e2186d9a5
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2025-05-01 (Thu, 01 May 2025)
Changed paths:
M lld/MachO/ConcatOutputSection.cpp
M lld/MachO/ConcatOutputSection.h
M lld/test/MachO/arm64-thunks.s
Log Message:
-----------
[lld-macho] Fix branch extension logic compatibility with __objc_stubs (#137913)
Enhance branch extension logic to handle __objc_stubs identically to
__stubs
The branch extension algorithm currently has specific handling for the
`__stubs` section:
1. It ensures all `__stubs` content is directly reachable via branches
from the text section.
2. It calculates the latest text section address that might require
thunks to reach the end of `__stubs`.
The `__objc_stubs` section requires precisely the same handling due to
its similar nature, but this was not implemented.
This commit generalizes the existing logic so it applies consistently to
both the `__stubs` and `__objc_stubs` sections, ensuring correct
reachability and thunk placement for both. Without this change it's
possible to get relocation errors during linking in scenarios where the
`__objc_stubs` section is large enough.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list