@@ -1755,13 +1755,9 @@ func TestLinknameBSS(t *testing.T) {
17551755 if err != nil {
17561756 t .Fatalf ("fail to get symbols: %v" , err )
17571757 }
1758- prefix := ""
1759- if runtime .GOOS == "windows" && runtime .GOARCH == "386" {
1760- prefix = "_"
1761- }
17621758 found := false
17631759 for _ , s := range syms {
1764- if s .Name == prefix + "runtime.sched" {
1760+ if s .Name == "runtime.sched" || s . Name == "_runtime .sched" {
17651761 found = true
17661762 if s .Size < 100 {
17671763 // As of Go 1.25 (Mar 2025), runtime.sched has 6848 bytes on
@@ -1772,7 +1768,7 @@ func TestLinknameBSS(t *testing.T) {
17721768 }
17731769 }
17741770 if ! found {
1775- t .Errorf ("%sruntime .sched symbol not found" , prefix )
1771+ t .Errorf ("runtime .sched symbol not found" )
17761772 }
17771773
17781774 // Executable should run.
@@ -2212,19 +2208,15 @@ func TestModuledataPlacement(t *testing.T) {
22122208 case pf != nil :
22132209 defer pf .Close ()
22142210
2215- prefix := ""
2216- if runtime .GOARCH == "386" {
2217- prefix = "_"
2218- }
22192211 var moddataSym * pe.Symbol
22202212 for _ , sym := range pf .Symbols {
2221- if sym .Name == prefix + moddataSymName {
2213+ if sym .Name == moddataSymName || sym . Name == "_" + moddataSymName {
22222214 moddataSym = sym
22232215 break
22242216 }
22252217 }
22262218 if moddataSym == nil {
2227- t .Fatalf ("could not find symbol %s%s" , prefix , moddataSymName )
2219+ t .Fatalf ("could not find symbol %s" , moddataSymName )
22282220 }
22292221 if moddataSym .SectionNumber <= 0 {
22302222 t .Fatalf ("moduledata not in a section (section number %d)" , moddataSym .SectionNumber )
@@ -2268,19 +2260,15 @@ func TestPEEdataSection(t *testing.T) {
22682260 }
22692261 defer pf .Close ()
22702262
2271- prefix := ""
2272- if runtime .GOARCH == "386" {
2273- prefix = "_"
2274- }
22752263 var edataSym * pe.Symbol
22762264 for _ , sym := range pf .Symbols {
2277- if sym .Name == prefix + "runtime.edata" {
2265+ if sym .Name == "runtime.edata" || sym . Name == "_runtime .edata" {
22782266 edataSym = sym
22792267 break
22802268 }
22812269 }
22822270 if edataSym == nil {
2283- t .Fatalf ("could not find symbol %sruntime .edata" , prefix )
2271+ t .Fatal ("could not find symbol runtime .edata" )
22842272 }
22852273 if edataSym .SectionNumber <= 0 {
22862274 t .Fatalf ("runtime.edata not in a section (section number %d)" , edataSym .SectionNumber )
0 commit comments