From 82a5e95ccc9c37b887570661fd11b051d6ca9b72 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 6 Oct 2014 20:51:05 -0400 Subject: [PATCH] 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 --- src/cmd/ld/ldelf.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.50.0