do not drop relocation kind in alias analysis
This commit is contained in:
parent
00a30954ac
commit
2e38c86af6
3 changed files with 3 additions and 1 deletions
1
alias.c
1
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;
|
||||
|
|
1
all.h
1
all.h
|
@ -282,6 +282,7 @@ struct Alias {
|
|||
Ref base;
|
||||
uint32_t label;
|
||||
int64_t offset;
|
||||
int rel;
|
||||
Alias *slot;
|
||||
};
|
||||
|
||||
|
|
2
load.c
2
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue