]> Cypherpunks repositories - gostls13.git/commit
cmd/link: set runtime.text to the address of the first function
authorCherry Zhang <cherryyz@google.com>
Mon, 12 Oct 2020 22:00:25 +0000 (18:00 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 13 Oct 2020 14:50:14 +0000 (14:50 +0000)
commit575ea5a87a86de3107b2401e10ff4e50e5a133a0
tree1a9a64366bc0e40f5fcbe8d6f4a4fefcc0f11c3c
parent5b509d993d3a3a212b4033815be8b7b439fac672
cmd/link: set runtime.text to the address of the first function

In CL 240065 we changed it to set to FlagTextAddr. Normally it
is the address of the first function, except on plan9/amd64
where, as FlagTextAddr is not aligned, it is rounded up. Set it
to the actual text start address.

Fixes #41137.

Change-Id: I1bba67f5eb4e24d9f745a11350fc999ff48bff45
Reviewed-on: https://go-review.googlesource.com/c/go/+/261644
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/data.go