]> Cypherpunks repositories - gostls13.git/commit
cmd/link: fix sym sect when splitting text on ppc64le
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 7 Dec 2016 13:55:21 +0000 (07:55 -0600)
committerIan Lance Taylor <iant@golang.org>
Wed, 7 Dec 2016 18:19:02 +0000 (18:19 +0000)
commit6623988eb73da429f41cfef85d481a5b93446ccd
tree6b63ec554fc933b1d38cec0349a6f0733da003e2
parentbe8a6fd2e3f9aa3ae808c1307b10823ee5bd0209
cmd/link: fix sym sect when splitting text on ppc64le

While processing a symbol for a function, if it is determined
that a function would make the text section too large then
a new text section is created and the address of the function
is in the new text section.  But the symbol for the function
is marked as being in the previous text section, causing
incorrect codegen for the function and leading to a segv if
that function is called.  This adds code to set the sym.Sect
field to the new section if a new one is created.  Note that
this problem only happens at the point where a new section is
created.

Fixes #18218

Change-Id: Ic21ae11368d9d88ff6d5d3977f9ea72fe6477ed1
Reviewed-on: https://go-review.googlesource.com/34069
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/data.go