From 2f7b57e9d82c1d8d0bc15bd35b1acf084e1367d3 Mon Sep 17 00:00:00 2001 From: Hiroshi Ioka Date: Thu, 21 Sep 2017 12:56:30 +0900 Subject: cmd/nm: accept macho files which don't have symbol table in the archive After https://golang.org/cl/64793, we started to include Mach-O object files which don't have symbol table into cgo archive. However, toolchains didn't handle those files yet. Fixes #21959 Change-Id: Ibb2f6492f1fa59368f2dfd4cff19783997539875 Reviewed-on: https://go-review.googlesource.com/65170 Reviewed-by: Ian Lance Taylor --- src/cmd/internal/objfile/macho.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/internal/objfile') diff --git a/src/cmd/internal/objfile/macho.go b/src/cmd/internal/objfile/macho.go index d6d545c23e..7a8999e5ba 100644 --- a/src/cmd/internal/objfile/macho.go +++ b/src/cmd/internal/objfile/macho.go @@ -30,7 +30,7 @@ func openMacho(r io.ReaderAt) (rawFile, error) { func (f *machoFile) symbols() ([]Sym, error) { if f.macho.Symtab == nil { - return nil, fmt.Errorf("missing symbol table") + return nil, nil } // Build sorted list of addresses of all symbols. -- cgit v1.3