Skip to content

Conversation

@augusto2112
Copy link

The DYLD shared cache, as an optimization, can merge GOT pointers from multiple images into one location, and fix all relative offsets to point to the new updated location. When reading metadata, LLDB tries, as an optimization, to read memory from local files instead of live memory. This means that the relative offset will point to the old location in the GOT section. In this case, LLDB needs to re-read the offset from live memory, to get the correct offset in live memory.

rdar://160837587
(cherry picked from commit eddff61)

@augusto2112 augusto2112 requested a review from a team as a code owner October 29, 2025 17:18
@augusto2112
Copy link
Author

swiftlang/swift#85195
@swift-ci test

A global offset table is a section that holds the address of functions
that are dynamically linked.

rdar://160837587
(cherry picked from commit 903c72f)
The DYLD shared cache, as an optimization, can merge GOT pointers from
multiple images into one location, and fix all relative offsets to point
to the new updated location.  When reading metadata, LLDB tries,
as an optimization, to read memory from local files instead of live
memory. This means that the relative offset will point to the old
location in the GOT section. In this case, LLDB needs to re-read the
offset from live memory, to get the correct offset in live memory.

rdar://160837587
(cherry picked from commit eddff61)
@augusto2112 augusto2112 force-pushed the remote-mirr-indirect-addr-6.2 branch from a652ba7 to 774ece6 Compare October 30, 2025 16:49
@augusto2112
Copy link
Author

swiftlang/swift#85195
@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant