llvm-project/llvm/lib/ObjCopy
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
..
COFF [objcopy] Refactor CommonConfig to add posibility to specify added/updated sections as MemoryBuffer. 2022-03-01 14:49:41 +03:00
ELF [llvm-objcopy] Support --decompress-debug-sections when zlib is disabled 2022-10-12 11:52:05 -07:00
MachO [objcopy] Fix order of Mach-O LINKEDIT pieces during layout 2022-11-11 12:05:57 -08:00
XCOFF [llvm-objcopy] Initial XCOFF32 support. 2022-02-28 04:59:46 -05:00
wasm [WebAssembly] Add WASM_SEC_LAST_KNOWN to BinaryFormat section types list [NFC] 2022-06-07 12:05:23 -07:00
Archive.cpp [Object] Fix updating darwin archives 2022-05-19 10:56:26 -07:00
Archive.h
CMakeLists.txt [objcopy][NFC] Move NameOrPattern::create() into CommonConfig.h 2022-03-09 13:03:28 +03:00
CommonConfig.cpp [objcopy][NFC] Move NameOrPattern::create() into CommonConfig.h 2022-03-09 13:03:28 +03:00
ConfigManager.cpp [llvm-objcopy][ELF] Add --set-section-type 2022-07-13 10:04:21 -07:00
ObjCopy.cpp [llvm-objcopy] Initial XCOFF32 support. 2022-02-28 04:59:46 -05:00