]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] cmd/link: don't cast end address to int32
authorCherry Mui <cherryyz@google.com>
Wed, 12 May 2021 02:40:02 +0000 (22:40 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Fri, 21 May 2021 22:34:30 +0000 (22:34 +0000)
commit305fa952c23b67e03a21d30318b945fddb2f3916
tree5dfa19b756d6d748f35252cb68a18f22ccd0df5b
parentc7248a0c9408552e7748a5cbdbee63c5535c8c83
[release-branch.go1.16] cmd/link: don't cast end address to int32

When linking a very large binary, the section address may not fit
in int32. Don't truncate it.

Fixes #46128.
Updates #46126.

Change-Id: Ibcc8d74bf5662611949e547ce44ca8b973de383f
Reviewed-on: https://go-review.googlesource.com/c/go/+/319289
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit af0f8c149e8a4b237910fc7b41739bedc546473c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/319369
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/macho.go