]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: delete unreachable hash collision check
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 21 Mar 2016 06:27:35 +0000 (19:27 +1300)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 21 Mar 2016 06:53:27 +0000 (06:53 +0000)
This expression in readsym:

    dup != nil && len(dup.P) > 0 && strings.HasPrefix(s.Name, "gclocals·")

can never be true: if dup != nil, then s.Name is ".dup" (and this is not new:
the same broken logic is present in 1.4, at least). Delete the whole block.

Change-Id: I33b14d9a82b292116d6fd79d22b38e3842501317
Reviewed-on: https://go-review.googlesource.com/20970
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/link/internal/ld/objfile.go

index 130347e7fd2869b7e54b2532358ac24f74f4b1d7..6bf3d73a41473afcf43e5ad0e49a8ab1266e2264 100644 (file)
@@ -255,14 +255,6 @@ overwrite:
                }
        }
 
-       if len(s.P) > 0 && dup != nil && len(dup.P) > 0 && strings.HasPrefix(s.Name, "gclocals·") {
-               // content-addressed garbage collection liveness bitmap symbol.
-               // double check for hash collisions.
-               if !bytes.Equal(s.P, dup.P) {
-                       log.Fatalf("dupok hash collision for %s in %s and %s", s.Name, s.File, pn)
-               }
-       }
-
        if s.Type == obj.STEXT {
                s.Args = rdint32(f)
                s.Locals = rdint32(f)