]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: remove redundant switch stmt
authorHiroshi Ioka <hirochachacha@gmail.com>
Sun, 9 Jul 2017 00:01:47 +0000 (09:01 +0900)
committerIan Lance Taylor <iant@golang.org>
Mon, 14 Aug 2017 04:44:35 +0000 (04:44 +0000)
Change-Id: I5c4f8dc1e174b3438ef4fb509fac78d6e1b292c9
Reviewed-on: https://go-review.googlesource.com/54791
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Avelino <t@avelino.xxx>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/link/internal/ld/data.go

index 1d053d23b79b3e5edcbdc381ced192f0f1f07470..23e0e4f2b036bf9beed5d7ea331e90af5cc1eee8 100644 (file)
@@ -1166,11 +1166,8 @@ func dosymtype(ctxt *Link) {
                for _, s := range ctxt.Syms.Allsym {
                        // Create a new entry in the .init_array section that points to the
                        // library initializer function.
-                       switch Buildmode {
-                       case BuildmodeCArchive, BuildmodeCShared:
-                               if s.Name == *flagEntrySymbol {
-                                       addinitarrdata(ctxt, s)
-                               }
+                       if s.Name == *flagEntrySymbol {
+                               addinitarrdata(ctxt, s)
                        }
                }
        }