]> Cypherpunks repositories - gostls13.git/commit
ld/macho: add all missing load commands
authorMisty De Meo <mistydemeo@gmail.com>
Fri, 15 Jun 2018 18:15:50 +0000 (18:15 +0000)
committerIan Lance Taylor <iant@golang.org>
Fri, 15 Jun 2018 18:18:40 +0000 (18:18 +0000)
commit1a92cdbfc10e0c66f2e015264a39159c055a5c15
tree916261d5b7ec3b8f3fb4fae03f35b0308f41d1ad
parent534ddf741f6a5fc38fb0bb3e3547d3231c51a7be
ld/macho: add all missing load commands

The ld/macho code currently understands a subset of the mach-o load
commands. I've encountered one of these in the wild in a Go-produced
binary, which tripped up the Go linker because its switch statement
expects its list of load commands to be exhaustive; the rest I've
added for the sake of completion.

The ruby-macho library is a good non-Darwin header resource for these:
https://github.com/homebrew/ruby-macho

Fixes #25908

Change-Id: Ib54c065d27e87d8726a9870df05a2bae24828b98
GitHub-Last-Rev: 655e3f488a4c1a89896a40edb0e1f715a5d3f734
GitHub-Pull-Request: golang/go#25906
Reviewed-on: https://go-review.googlesource.com/119115
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/macho_combine_dwarf.go