]> Cypherpunks repositories - gostls13.git/commit
cmd/link: put padding between functions, not at the end of a function
authorKeith Randall <khr@golang.org>
Sun, 12 Jun 2016 00:12:28 +0000 (17:12 -0700)
committerKeith Randall <khr@golang.org>
Mon, 13 Jun 2016 14:05:52 +0000 (14:05 +0000)
commit5701174c52a2d42621ec3c5c59dca3bde9a14bc6
treed36e9973c7c290ddb6f37d3b20dc1658cb2eb84d
parent595426c0d903a3686bdfe6d0e8ef268a60c19896
cmd/link: put padding between functions, not at the end of a function

Functions should be declared to end after the last real instruction, not
after the last padding byte. We achieve this by adding the padding while
assembling the text section in the linker instead of adding the padding
to the function symbol in the compiler. This change makes dtrace happy.

TODO: check that this works with external linking

Fixes #15969

Change-Id: I973e478d0cd34b61be1ddc55410552cbd645ad62
Reviewed-on: https://go-review.googlesource.com/24040
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/internal/obj/x86/asm6.go
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/x86/asm.go