From: Russ Cox Date: Tue, 7 Oct 2014 00:51:05 +0000 (-0400) Subject: cmd/ld: ignore .Linfo_stringNN variables in clang .o files X-Git-Tag: go1.4beta1~179 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=82a5e95ccc9c37b887570661fd11b051d6ca9b72;p=gostls13.git cmd/ld: ignore .Linfo_stringNN variables in clang .o files http://build.golang.org/log/c7a91b6eac8f8daa2bd17801be273e58403a15f2 # cmd/pprof /linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#16: ignoring .Linfo_string0 in section 16 (type 0) /linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#17: ignoring .Linfo_string1 in section 16 (type 0) /linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#18: ignoring .Linfo_string2 in section 16 (type 0) /linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#20: ignoring .Linfo_string0 in section 16 (type 0) /linux-386-clang-9115aad1dc4a/go/pkg/linux_386/net.a(_all.o): sym#21: ignoring .Linfo_string1 in section 16 (type 0) ... I don't know what these are. Let's ignore them and see if we get any further. TBR=iant CC=golang-codereviews https://golang.org/cl/155030043 --- diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c index 38e4147556..35f8b49856 100644 --- a/src/cmd/ld/ldelf.c +++ b/src/cmd/ld/ldelf.c @@ -582,6 +582,8 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn) continue; sect = obj->sect+sym.shndx; if(sect->sym == nil) { + if(strncmp(sym.name, ".Linfo_string", 13) == 0) // clang does this + continue; diag("%s: sym#%d: ignoring %s in section %d (type %d)", pn, i, sym.name, sym.shndx, sym.type); continue; }