[all-commits] [llvm/llvm-project] 244a6a: [dsymutil] Fix offset calculation for universal bi...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Mar 9 10:27:32 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 244a6acff0b8c3bac93949e262166b5f1fe12b1f
      https://github.com/llvm/llvm-project/commit/244a6acff0b8c3bac93949e262166b5f1fe12b1f
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-03-09 (Thu, 09 Mar 2023)

  Changed paths:
    M llvm/tools/dsymutil/dsymutil.cpp

  Log Message:
  -----------
  [dsymutil] Fix offset calculation for universal binaries

The Mach-O file format uses 32-bit values to encodes offsets which they
cannot exceed UIN32_MAX (4GB). The Mach-O file itself can be larger than
4GB as long as none of the offsets fall within this limit.

For universal binaries, dsymutil determines if the offset is going to
exceed the 4GB limit by computing the size of the header and adding it
to the size of all the slices. This is incorrect because it computes the
end offset of the final slice. For the purpose of the 4GB limit, only
the starting offset matters. The size of the last slice is irrelevant as
long as it itself is a valid Mach-O.

rdar://104435018

Differential revision: https://reviews.llvm.org/D145637


  Commit: e67460c974e65aee83d2976226db17d8ffe17cc2
      https://github.com/llvm/llvm-project/commit/e67460c974e65aee83d2976226db17d8ffe17cc2
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-03-09 (Thu, 09 Mar 2023)

  Changed paths:
    M lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp

  Log Message:
  -----------
  [lldb] Add nullptr check to SymbolVendorWasm

Add the same nullptr check to SymbolVendorWasm that was added to
SymbolVendorELF.


Compare: https://github.com/llvm/llvm-project/compare/78ea3cb0bb19...e67460c974e6


More information about the All-commits mailing list