]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] ld/macho: add all missing load commands
authorMisty De Meo <mistydemeo@gmail.com>
Fri, 15 Jun 2018 18:15:50 +0000 (18:15 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 15 Jun 2018 20:12:54 +0000 (20:12 +0000)
commit3d59583836630cf13ec4bfbed977d27b1b7adbdc
treeca82d1c1acc74d9ef3139182817b6aded29443df
parentfe8a0d12b14108cbe2408b417afcaab722b0727c
[release-branch.go1.10] 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 #25912

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>
(cherry picked from commit 1a92cdbfc10e0c66f2e015264a39159c055a5c15)
Reviewed-on: https://go-review.googlesource.com/119215
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/macho_combine_dwarf.go