From 005ba4db82c93298dbfdf0866c613f86df713b87 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 16 Dec 2014 14:08:39 -0500 Subject: [PATCH] cmd/9l: improve R_CALLPOWER error messages Change-Id: I8670540a2a9647efbd8b072a54272a04c530e54b Reviewed-on: https://go-review.googlesource.com/2001 Reviewed-by: Minux Ma --- src/cmd/9l/asm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cmd/9l/asm.c b/src/cmd/9l/asm.c index 7814edd525..936cf8723e 100644 --- a/src/cmd/9l/asm.c +++ b/src/cmd/9l/asm.c @@ -165,9 +165,11 @@ archreloc(Reloc *r, LSym *s, vlong *val) t = symaddr(r->sym) + r->add - (s->value + r->off); if(t & 3) - ctxt->diag("relocation for %s is not aligned: %lld", s->name, t); + ctxt->diag("relocation for %s+%d is not aligned: %lld", r->sym->name, r->off, t); if(t << 6 >> 6 != t) - ctxt->diag("relocation for %s is too big: %lld", s->name, t); + // TODO(austin) This can happen if text > 32M. + // Add a call trampoline to .text in that case. + ctxt->diag("relocation for %s+%d is too big: %lld", r->sym->name, r->off, t); *val = (o1 & 0xfc000003U) | (t & ~0xfc000003U); return 0; -- 2.50.0