]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: ignore macho symbols in invalid sections
authorDavid Crawshaw <crawshaw@golang.org>
Sun, 8 Oct 2017 14:45:48 +0000 (10:45 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Sun, 8 Oct 2017 20:14:33 +0000 (20:14 +0000)
Restores linker behavior that existed before CL 68930.
Hopefully fixes the macOS 10.8 builder.

Change-Id: Ib8d6923b59543008cf71c4625addb4e2045cedf6
Reviewed-on: https://go-review.googlesource.com/69170
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
src/cmd/link/internal/loadmacho/ldmacho.go

index 1c43c1b040f0826e3a546cab9c52f5ab06c6349b..bcea6c731aee0fee7b756cb6e8b43587ca5c7411 100644 (file)
@@ -627,7 +627,7 @@ func Load(arch *sys.Arch, syms *sym.Symbols, f *bio.Reader, pkg string, length i
                sect := &c.seg.sect[machsym.sectnum-1]
                outer := sect.sym
                if outer == nil {
-                       return errorf("reference to invalid section %s/%s", sect.segname, sect.name)
+                       continue // ignore reference to invalid section
                }
 
                if s.Outer != nil {