diff options
| author | Russ Cox <rsc@golang.org> | 2013-12-09 07:42:55 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2013-12-09 07:42:55 -0800 |
| commit | 0c0589ec42447e09a35bc0891a59402ee2d1c4fd (patch) | |
| tree | f5bd20645a7f8d48a471df4585b15335ed410a67 /src/liblink/pass.c | |
| parent | 79479ac486c15ed5919773f1f28c1eecea19b8b9 (diff) | |
| download | go-0c0589ec42447e09a35bc0891a59402ee2d1c4fd.tar.xz | |
cmd/ld: fix linux/386 build
TBR=iant
CC=golang-dev
https://golang.org/cl/39400044
Diffstat (limited to 'src/liblink/pass.c')
| -rw-r--r-- | src/liblink/pass.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblink/pass.c b/src/liblink/pass.c index 3fe77d61bf..ed27749915 100644 --- a/src/liblink/pass.c +++ b/src/liblink/pass.c @@ -79,7 +79,8 @@ linkpatch(Link *ctxt, LSym *sym) ctxt->arch->progedit(ctxt, p); if(p->as == ctxt->arch->ACALL || (p->as == ctxt->arch->AJMP && p->to.type != ctxt->arch->D_BRANCH) || (p->as == ctxt->arch->ARET && p->to.sym != nil)) { s = p->to.sym; - if(s) { + // The STEXT check avoids rewriting indirect call to addr in memory on x86. + if(s && s->type == STEXT) { p->to.type = ctxt->arch->D_BRANCH; continue; } |
