Skip to content

Commit 459f3a3

Browse files
committed
cmd/link: don't pass -Wl,-S on AIX
The AIX linker's -S flag has a different meaning. Don't pass it. Updates golang#75618. Change-Id: I98faabea3435cde255f4c2d25f34dde9f69b7ec9 Reviewed-on: https://go-review.googlesource.com/c/go/+/707097 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent 4631a2d commit 459f3a3

File tree

1 file changed

+3
-1
lines changed
  • src/cmd/link/internal/ld

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,9 @@ func (ctxt *Link) hostlink() {
14521452
argv = append(argv, "-s")
14531453
}
14541454
} else if *FlagW {
1455-
argv = append(argv, "-Wl,-S") // suppress debugging symbols
1455+
if !ctxt.IsAIX() { // The AIX linker's -S has different meaning
1456+
argv = append(argv, "-Wl,-S") // suppress debugging symbols
1457+
}
14561458
}
14571459

14581460
// On darwin, whether to combine DWARF into executable.

0 commit comments

Comments
 (0)