Skip to content

Commit 683810a

Browse files
committed
cmd/link: block new standard library linknames
In Go 1.25 we added a number of new linknames for standard library internal uses. Add them to the linker's blocklist to keep them internal. Change-Id: I5b6051a669b7ff132a1d2c05deefbbf74701c5d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/681475 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 9149876 commit 683810a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/cmd/link/internal/loader/loader.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,6 @@ var blockedLinknames = map[string][]string{
23682368
"crypto/internal/sysrand.fatal": {"crypto/internal/sysrand"},
23692369
"crypto/rand.fatal": {"crypto/rand"},
23702370
"internal/runtime/maps.errNilAssign": {"internal/runtime/maps"},
2371-
"internal/runtime/maps.typeString": {"internal/runtime/maps"},
23722371
"internal/runtime/maps.fatal": {"internal/runtime/maps"},
23732372
"internal/runtime/maps.newarray": {"internal/runtime/maps"},
23742373
"internal/runtime/maps.newobject": {"internal/runtime/maps"},
@@ -2399,6 +2398,22 @@ var blockedLinknames = map[string][]string{
23992398
"runtime.mapdelete_fast32": {"runtime"},
24002399
"runtime.mapdelete_fast64": {"runtime"},
24012400
"runtime.mapdelete_faststr": {"runtime"},
2401+
// New internal linknames in Go 1.25
2402+
// Pushed from runtime
2403+
"internal/runtime/cgroup.throw": {"internal/runtime/cgroup"},
2404+
"internal/runtime/maps.typeString": {"internal/runtime/maps"},
2405+
"internal/synctest.IsInBubble": {"internal/synctest"},
2406+
"internal/synctest.associate": {"internal/synctest"},
2407+
"internal/synctest.disassociate": {"internal/synctest"},
2408+
"internal/synctest.isAssociated": {"internal/synctest"},
2409+
"runtime/trace.runtime_readTrace": {"runtime/trace"},
2410+
"runtime/trace.runtime_traceClockUnitsPerSecond": {"runtime/trace"},
2411+
"sync_test.runtime_blockUntilEmptyCleanupQueue": {"sync_test"},
2412+
"time.runtimeIsBubbled": {"time"},
2413+
"unique.runtime_blockUntilEmptyCleanupQueue": {"unique"},
2414+
// Others
2415+
"net.newWindowsFile": {"net"}, // pushed from os
2416+
"testing/synctest.testingSynctestTest": {"testing/synctest"}, // pushed from testing
24022417
}
24032418

24042419
// check if a linkname reference to symbol s from pkg is allowed

0 commit comments

Comments
 (0)