]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: expand a TODO comment
authorCherry Zhang <cherryyz@google.com>
Fri, 1 May 2020 18:12:48 +0000 (14:12 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 1 May 2020 20:31:11 +0000 (20:31 +0000)
CL 231397 is submitted too fast... Expand the comment to make it
a little clearer.

Change-Id: Ica9737aa7b51f97320bab74457388dcab8188370
Reviewed-on: https://go-review.googlesource.com/c/go/+/231597
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/link/internal/ld/deadcode.go

index c91a18a167cf1737b903ae1e25572e17d461caa1..7c58a629758cef4a2bec999e72e82110a39b845a 100644 (file)
@@ -159,8 +159,10 @@ func (d *deadcodePass) flood() {
                        if a.Type() == goobj2.AuxGotype && !d.ctxt.linkShared {
                                // A symbol being reachable doesn't imply we need its
                                // type descriptor. Don't mark it.
-                               // XXX we need that for GCProg generation when linking
-                               // shared library. why?
+                               // TODO: when -linkshared, the GCProg generation code
+                               // seems to need it. I'm not sure why. I think it could
+                               // just reach to the type descriptor's data without
+                               // requiring to mark it reachable.
                                continue
                        }
                        d.mark(a.Sym(), symIdx)