mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #703] [MERGED] macos: Remove need for TLS patch by storing TCB pointer in FS. #1726
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#1726
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/703
Author: @squidbus
Created: 9/1/2024
Status: ✅ Merged
Merged: 9/1/2024
Merged by: @georgemoralis
Base:
main← Head:mac-tcb📝 Commits (1)
9e50479macos: Remove need for TLS patch by storing TCB pointer in FS.📊 Changes
6 files changed (+103 additions, -28 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
src/core/cpu_patches.cpp(+5 -9)📝
src/core/libraries/kernel/thread_management.cpp(+2 -0)📝
src/core/linker.cpp(+2 -0)📝
src/core/tls.cpp(+91 -18)📝
src/core/tls.h(+2 -0)📄 Description
On macOS we can actually store the TCB pointer at
fs:0x0as expected by using local descriptor tables.i386_set_ldtsyscall.SetTcbBase(nullptr)which signals the code to clean up by freeing the LDT entry.This completely eliminates the need to apply TCB access code patches on macOS.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.