summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--alias.c1
-rw-r--r--all.h1
-rw-r--r--load.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/alias.c b/alias.c
index aa3846e..f4d7f91 100644
--- a/alias.c
+++ b/alias.c
@@ -19,6 +19,7 @@ getalias(Alias *a, Ref r, Fn *fn)
 		if (c->type == CAddr) {
 			a->type = ASym;
 			a->label = c->label;
+			a->rel = c->rel;
 		} else
 			a->type = ACon;
 		a->offset = c->bits.i;
diff --git a/all.h b/all.h
index 14ebf68..8303c62 100644
--- a/all.h
+++ b/all.h
@@ -282,6 +282,7 @@ struct Alias {
 	Ref base;
 	uint32_t label;
 	int64_t offset;
+	int rel;
 	Alias *slot;
 };
 
diff --git a/load.c b/load.c
index cca8400..7146ce8 100644
--- a/load.c
+++ b/load.c
@@ -155,7 +155,7 @@ load(Slice sl, bits msk, Loc *l)
 			c.type = CAddr;
 			c.label = a->label;
 			c.bits.i = a->offset;
-			c.rel = RelDef;
+			c.rel = a->rel;
 			r = newcon(&c, curf);
 			break;
 		}