diff options
| author | Austin Clements <austin@google.com> | 2014-11-25 16:00:25 -0500 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2014-11-25 16:00:25 -0500 |
| commit | 6f755f2f8f4665d44745b4065cd54a90eba0bde9 (patch) | |
| tree | bd43607be8d4108a57d1a9b8346823a01ae6e6ba /src/liblink | |
| parent | c8af6de2e8f315a6e8282004e8e90d9c567531ea (diff) | |
| download | go-6f755f2f8f4665d44745b4065cd54a90eba0bde9.tar.xz | |
[dev.cc] 9l: make R_CALLPOWER like ELF's R_PPC64_REL24
These accomplished the same thing, but R_CALLPOWER expected
the whole instruction to be in the addend (and completely
overwrote what was in the text section), while R_PPC64_REL24
overwrites only bits 6 through 24 of whatever was in the text
section. Make R_CALLPOWER work like R_PPC64_REL24 to ease the
implementation of dynamic linking.
LGTM=rsc
R=rsc
CC=golang-codereviews, minux
https://golang.org/cl/177430043
Diffstat (limited to 'src/liblink')
| -rw-r--r-- | src/liblink/asm9.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblink/asm9.c b/src/liblink/asm9.c index 3c125b3b0f..5a379270d1 100644 --- a/src/liblink/asm9.c +++ b/src/liblink/asm9.c @@ -1589,7 +1589,7 @@ asmout(Link *ctxt, Prog *p, Optab *o, int32 *out) ctxt->diag("odd branch target address\n%P", p); v &= ~03; } - rel->add = o1 | (v & 0x03FFFFFC); + rel->add = v; rel->type = R_CALLPOWER; } break; |
