]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: ignore .Linfo_stringNN variables in clang .o files
authorRuss Cox <rsc@golang.org>
Tue, 7 Oct 2014 00:51:05 +0000 (20:51 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 7 Oct 2014 00:51:05 +0000 (20:51 -0400)
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

index 38e414755604a8aaffa6811f9e9ced457ee2c6af..35f8b49856ba23d8d7f32a2270366dff971ec791 100644 (file)
@@ -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;
                }