[llvm] [llvm-objcopy] Always update indirectsymoff in MachO (PR #117726)
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 08:00:20 PST 2024
================
@@ -361,11 +361,10 @@ Error MachOLayoutBuilder::layoutTail(uint64_t Offset) {
return createStringError(llvm::errc::not_supported,
"shared library is not yet supported");
- if (!O.IndirectSymTable.Symbols.empty()) {
- MLC.dysymtab_command_data.indirectsymoff = StartOfIndirectSymbols;
- MLC.dysymtab_command_data.nindirectsyms =
- O.IndirectSymTable.Symbols.size();
- }
+ MLC.dysymtab_command_data.nindirectsyms =
+ O.IndirectSymTable.Symbols.size();
+ MLC.dysymtab_command_data.indirectsymoff =
+ O.IndirectSymTable.Symbols.empty() ? 0 : StartOfIndirectSymbols;
----------------
compnerd wrote:
Why the reordering here? (not that it matters).
https://github.com/llvm/llvm-project/pull/117726
More information about the llvm-commits
mailing list