]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/link/internal/ld/lib.go
[dev.boringcrypto] all: merge master into dev.boringcrypto
[gostls13.git] / src / cmd / link / internal / ld / lib.go
index 42edd095102237c13b9bbded0393546ef66f4964..a70935e821f6814adb6d91f38e7ef8bf322e20a6 100644 (file)
@@ -856,6 +856,13 @@ func loadobjfile(ctxt *Link, lib *sym.Library) {
                        continue
                }
 
+               // Skip other special (non-object-file) sections that
+               // build tools may have added. Such sections must have
+               // short names so that the suffix is not truncated.
+               if len(arhdr.name) < 16 && !strings.HasSuffix(arhdr.name, ".o") {
+                       continue
+               }
+
                pname := fmt.Sprintf("%s(%s)", lib.File, arhdr.name)
                l = atolwhex(arhdr.size)
                ldobj(ctxt, f, lib, l, pname, lib.File)