[all-commits] [llvm/llvm-project] dd2165: [objcopy] Fix order of Mach-O LINKEDIT pieces duri...
Daniel Rodríguez Troitiño via All-commits
all-commits at lists.llvm.org
Fri Nov 11 12:07:03 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd2165ef88927b835d21c3ce3fe26c3fb9f7fdb0
https://github.com/llvm/llvm-project/commit/dd2165ef88927b835d21c3ce3fe26c3fb9f7fdb0
Author: Daniel Rodríguez Troitiño <danielrodriguez at fb.com>
Date: 2022-11-11 (Fri, 11 Nov 2022)
Changed paths:
M llvm/lib/ObjCopy/MachO/MachOLayoutBuilder.cpp
A llvm/test/tools/llvm-objcopy/MachO/linkedit-order-1.test
A llvm/test/tools/llvm-objcopy/MachO/linkedit-order-2.test
Log Message:
-----------
[objcopy] Fix order of Mach-O LINKEDIT pieces during layout
The exports trie and the chained fixups where in the opposite order, and
function starts happenned before them, instead of after them.
Restore the correct order and rewrite the code to make it easier to move
around in the future if needed by reusing the `Offset` variable and
keeping both the `StartOf...` and the size of each piece together.
This was found out while trying to use the system strip in a binary
already stripped by LLVM and receiving errors around chained fixups when
we enabled those in the linker.
Reviewed By: alexander-shaposhnikov
Differential Revision: https://reviews.llvm.org/D133974
More information about the All-commits
mailing list