[all-commits] [llvm/llvm-project] 8413f4: [llvm-objcopy] Apply encryptable offset to first s...
Daniel Rodríguez Troitiño via All-commits
all-commits at lists.llvm.org
Fri Mar 14 13:44:10 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8413f4d837a96458104f63bab72c751b8285a458
https://github.com/llvm/llvm-project/commit/8413f4d837a96458104f63bab72c751b8285a458
Author: Daniel Rodríguez Troitiño <drodriguez at users.noreply.github.com>
Date: 2025-03-14 (Fri, 14 Mar 2025)
Changed paths:
M llvm/lib/ObjCopy/MachO/MachOLayoutBuilder.cpp
M llvm/test/tools/llvm-objcopy/MachO/strip-with-encryption-info.test
Log Message:
-----------
[llvm-objcopy] Apply encryptable offset to first segment, not section (#130517)
Bug introduced #120995. The LLD code calculates the "size" of the Mach-O
headers, and then uses that size to place the segments, but the `__TEXT`
section stays at `fileoff` zero. When I wrote the code into llvm-objcopy
I calculated the extra space into the initial offset, which moved all
the sections back 1 page.
Besides the modified test checking for the right `fileoff` values of the
sections and the segments, I also manually checked the generated
binaries after `llvm-objcopy` using `dyld_info`, as the bug report
suggested.
Fixes #130472
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