Skip to content

Commit 0e43534

Browse files
committed
cmd: fix format strings used with obj.Headtype
Found by vet. Introduced by CL 28853. Change-Id: I3199e0cbdb1c512ba29eb7e4d5c1c98963f5a954 Reviewed-on: https://go-review.googlesource.com/28957 Run-TryBot: Josh Bleecher Snyder <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent f30598d commit 0e43534

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

src/cmd/internal/obj/x86/asm6.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,7 @@ func prefixof(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) int {
21882188
if isAndroid {
21892189
return 0x65 // GS
21902190
}
2191-
log.Fatalf("unknown TLS base register for %s", ctxt.Headtype)
2191+
log.Fatalf("unknown TLS base register for %v", ctxt.Headtype)
21922192

21932193
case obj.Hdarwin,
21942194
obj.Hdragonfly,
@@ -2201,7 +2201,7 @@ func prefixof(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) int {
22012201

22022202
switch ctxt.Headtype {
22032203
default:
2204-
log.Fatalf("unknown TLS base register for %s", ctxt.Headtype)
2204+
log.Fatalf("unknown TLS base register for %v", ctxt.Headtype)
22052205

22062206
case obj.Hlinux:
22072207
if isAndroid {
@@ -4016,7 +4016,7 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
40164016
// are handled in prefixof above and should not be listed here.
40174017
switch ctxt.Headtype {
40184018
default:
4019-
log.Fatalf("unknown TLS base location for %s", ctxt.Headtype)
4019+
log.Fatalf("unknown TLS base location for %v", ctxt.Headtype)
40204020

40214021
case obj.Hlinux,
40224022
obj.Hnacl:
@@ -4092,7 +4092,7 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
40924092

40934093
switch ctxt.Headtype {
40944094
default:
4095-
log.Fatalf("unknown TLS base location for %s", ctxt.Headtype)
4095+
log.Fatalf("unknown TLS base location for %v", ctxt.Headtype)
40964096

40974097
case obj.Hlinux:
40984098
if !ctxt.Flag_shared {

src/cmd/link/internal/amd64/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func archinit(ctxt *ld.Link) {
9999
ld.Linkmode = ld.LinkInternal
100100
}
101101
if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
102-
log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headtype)
102+
log.Fatalf("cannot use -linkmode=external with -H %v", ld.Headtype)
103103
}
104104

105105
case obj.Hdarwin,

src/cmd/link/internal/arm/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func archinit(ctxt *ld.Link) {
9595
ld.Linkmode = ld.LinkInternal
9696
}
9797
if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
98-
log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headtype)
98+
log.Fatalf("cannot use -linkmode=external with -H %v", ld.Headtype)
9999
}
100100

101101
case obj.Hlinux,

src/cmd/link/internal/arm64/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func archinit(ctxt *ld.Link) {
9797
ld.Linkmode = ld.LinkInternal
9898
}
9999
if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
100-
log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headtype)
100+
log.Fatalf("cannot use -linkmode=external with -H %v", ld.Headtype)
101101
}
102102
case obj.Hlinux, obj.Hdarwin:
103103
break

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func relocsym(ctxt *Link, s *Symbol) {
429429
} else if Headtype == obj.Hwindows || Headtype == obj.Hwindowsgui {
430430
o = r.Add
431431
} else {
432-
log.Fatalf("unexpected R_TLS_LE relocation for %s", Headtype)
432+
log.Fatalf("unexpected R_TLS_LE relocation for %v", Headtype)
433433
}
434434

435435
case obj.R_TLS_IE:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func linknew(arch *sys.Arch) *Link {
6060
func (ctxt *Link) computeTLSOffset() {
6161
switch Headtype {
6262
default:
63-
log.Fatalf("unknown thread-local storage offset for %s", Headtype)
63+
log.Fatalf("unknown thread-local storage offset for %v", Headtype)
6464

6565
case obj.Hplan9, obj.Hwindows, obj.Hwindowsgui:
6666
break

src/cmd/link/internal/mips64/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func archinit(ctxt *ld.Link) {
105105
ld.Linkmode = ld.LinkInternal
106106
}
107107
if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
108-
log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headtype)
108+
log.Fatalf("cannot use -linkmode=external with -H %v", ld.Headtype)
109109
}
110110

111111
case obj.Hlinux:

src/cmd/link/internal/ppc64/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func archinit(ctxt *ld.Link) {
120120
ld.Linkmode = ld.LinkInternal
121121
}
122122
if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
123-
log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headtype)
123+
log.Fatalf("cannot use -linkmode=external with -H %v", ld.Headtype)
124124
}
125125

126126
case obj.Hlinux:

src/cmd/link/internal/x86/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func archinit(ctxt *ld.Link) {
9898
ld.Linkmode = ld.LinkInternal
9999
}
100100
if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
101-
log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headtype)
101+
log.Fatalf("cannot use -linkmode=external with -H %v", ld.Headtype)
102102
}
103103

104104
case obj.Hdarwin,

0 commit comments

Comments
 (0)