llvm-project/llvm/test/tools/llvm-objcopy/MachO
Daniel Rodríguez Troitiño dd2165ef88 [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
2022-11-11 12:05:57 -08:00
..
Inputs
add-multiple-sections.test
add-section-32.test
add-section-64.test
add-section-error.test
archive-format.test
arm64-relocs.s
basic-big-endian-32-copy.test
basic-big-endian-64-copy.test
basic-executable-copy.test
basic-little-endian-32-copy.test
basic-little-endian-64-copy.test
bitcode-strip-basic.test
bitcode-strip-object.s
bitcode-strip-remove-nonempty-segment.test
bitcode-strip-remove.test
code_signature_lc.test
code_signature_lc_update.test
discard-all.test
dump-section-before-add-remove.test
dump-section.test
encrypt_info_64_lc.test
encrypt_info_lc.test
indirect-symbol-table-copy.s
install-name-tool-add-rpath.test
install-name-tool-change.test
install-name-tool-delete-rpath.test
install-name-tool-id.test
install-name-tool-prepend-rpath.test
install-name-tool-rpath.test
keep-undefined.test
lc-linker-optimization-hint.s
lc-load-weak-dylib.test
lc-thread.test
linkedit-order-1.test [objcopy] Fix order of Mach-O LINKEDIT pieces during layout 2022-11-11 12:05:57 -08:00
linkedit-order-2.test [objcopy] Fix order of Mach-O LINKEDIT pieces during layout 2022-11-11 12:05:57 -08:00
load-commands.yaml
mh-preload-unsupported.yaml
min-version-load-commands.test
only-section.test
real-world-input-copy.test
redefine-symbol.s
relocations.test
remove-lc-index-update.test
remove-section-dead-symbols.test
remove-section-error.test
remove-section.test
remove-swift-symbols.test
segment-size-alignment.test
segments-vmsize.test
strip-all.test
strip-debug.test
sub-load-commands.test
symbol-table.test
universal-object.test
update-section.test
virtual-section.test
zero-offset-section.test