Change-Id: I2e52206a95c9463df5661664726a8b3bbf3ad1fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/204825
Reviewed-by: Than McIntosh <thanm@google.com>
 
 var _ = fmt.Print
 
-// TODO:
-// - Debug output:
-//   Emit messages about which symbols are kept or deleted.
-
 type workQueue []loader.Sym
 
 // Implement container/heap.Interface.
                if d.ctxt.Reachparent != nil {
                        d.ldr.Reachparent[symIdx] = parent
                }
+               if *flagDumpDep {
+                       to := d.ldr.SymName(symIdx)
+                       if to != "" {
+                               from := "_"
+                               if parent != 0 {
+                                       from = d.ldr.SymName(parent)
+                               }
+                               fmt.Printf("%s -> %s\n", from, to)
+                       }
+               }
        }
 }