]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/ld: maintain Ctxt.Etextp when removing dead code
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Sun, 29 Mar 2015 23:27:58 +0000 (23:27 +0000)
committerIan Lance Taylor <iant@golang.org>
Sat, 4 Apr 2015 00:06:19 +0000 (00:06 +0000)
commit8e9c6431f06da0c2e4f77dab23b86c0b98b9174c
tree395b53edb7975ca892eb62cc1c003bb719670dbd
parent09b3bf42c717d31dca05959c57d6bbf631748c8a
cmd/internal/ld: maintain Ctxt.Etextp when removing dead code

I wrote some code that added a function in gentext() by sticking it
after Ctxt.Etextp and was very confused when this wasn't written out
sometimes. It turned out that Etextp was not updated by deadcode() so
if the last function is not reachable, my new function was never
seen. This changes deadcode() to update Etextp to the last reachable
funtion.

Change-Id: Ib6a3e7c67ccfb8a15826ce9e0ef046732b5e25d2
Reviewed-on: https://go-review.googlesource.com/8233
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/internal/ld/go.go