From e285f39248f7499c4764bb394fd77a591f4dde64 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Sun, 8 Oct 2017 10:45:48 -0400 Subject: [PATCH] cmd/link: ignore macho symbols in invalid sections 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 TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor Reviewed-by: Marvin Stenger --- src/cmd/link/internal/loadmacho/ldmacho.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/link/internal/loadmacho/ldmacho.go b/src/cmd/link/internal/loadmacho/ldmacho.go index 1c43c1b040..bcea6c731a 100644 --- a/src/cmd/link/internal/loadmacho/ldmacho.go +++ b/src/cmd/link/internal/loadmacho/ldmacho.go @@ -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 { -- 2.48.1