diff options
| author | Cherry Mui <cherryyz@google.com> | 2023-06-12 13:46:08 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2023-07-27 19:06:04 +0000 |
| commit | f55e7e104bbef911f1495b39c3c2ff366ad3be4d (patch) | |
| tree | 9ddfd8a5159794e4a778e20bc5136effbb0a5823 /src/cmd/link | |
| parent | 27927ed7498b6fa29d72428b825a3cc86703f84d (diff) | |
| download | go-f55e7e104bbef911f1495b39c3c2ff366ad3be4d.tar.xz | |
cmd/link: don't generate DYSYMTAB when external linking on Mach-O
When external linking, the external linker will generate it.
Updates #60694.
For #61229.
Change-Id: I086a7628dd9baa84b46315641746fc3640473f2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/502617
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/link')
| -rw-r--r-- | src/cmd/link/internal/ld/macho.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/internal/ld/macho.go b/src/cmd/link/internal/ld/macho.go index 52ff85ddef..f48653b910 100644 --- a/src/cmd/link/internal/ld/macho.go +++ b/src/cmd/link/internal/ld/macho.go @@ -833,9 +833,9 @@ func asmbMacho(ctxt *Link) { ml.data[2] = uint32(linkoff + s1 + s2 + s3 + s4 + s5) /* stroff */ ml.data[3] = uint32(s6) /* strsize */ - machodysymtab(ctxt, linkoff+s1+s2) - if ctxt.LinkMode != LinkExternal { + machodysymtab(ctxt, linkoff+s1+s2) + ml := newMachoLoad(ctxt.Arch, LC_LOAD_DYLINKER, 6) ml.data[0] = 12 /* offset to string */ stringtouint32(ml.data[1:], "/usr/lib/dyld") |
