mirror of
https://github.com/golang/go
synced 2024-11-13 19:10:22 -07:00
cmd/ld: handle large link base addresses
codeblk and datblk were truncating their arguments to int32. Don't do that. LGTM=dvyukov, rminnich R=iant, dvyukov, rminnich CC=golang-codereviews https://golang.org/cl/126050043
This commit is contained in:
parent
0c6146711c
commit
9abf0b6e9f
@ -425,10 +425,10 @@ dynreloc(void)
|
||||
}
|
||||
|
||||
static void
|
||||
blk(LSym *start, int32 addr, int32 size)
|
||||
blk(LSym *start, int64 addr, int64 size)
|
||||
{
|
||||
LSym *sym;
|
||||
int32 eaddr;
|
||||
int64 eaddr;
|
||||
uchar *p, *ep;
|
||||
|
||||
for(sym = start; sym != nil; sym = sym->next)
|
||||
@ -467,10 +467,10 @@ blk(LSym *start, int32 addr, int32 size)
|
||||
}
|
||||
|
||||
void
|
||||
codeblk(int32 addr, int32 size)
|
||||
codeblk(int64 addr, int64 size)
|
||||
{
|
||||
LSym *sym;
|
||||
int32 eaddr, n;
|
||||
int64 eaddr, n;
|
||||
uchar *q;
|
||||
|
||||
if(debug['a'])
|
||||
@ -527,10 +527,10 @@ codeblk(int32 addr, int32 size)
|
||||
}
|
||||
|
||||
void
|
||||
datblk(int32 addr, int32 size)
|
||||
datblk(int64 addr, int64 size)
|
||||
{
|
||||
LSym *sym;
|
||||
int32 i, eaddr;
|
||||
int64 i, eaddr;
|
||||
uchar *p, *ep;
|
||||
char *typ, *rsname;
|
||||
Reloc *r;
|
||||
|
@ -184,11 +184,11 @@ uint32 be32(uchar *b);
|
||||
uint64 be64(uchar *b);
|
||||
void callgraph(void);
|
||||
void cflush(void);
|
||||
void codeblk(int32 addr, int32 size);
|
||||
void codeblk(int64 addr, int64 size);
|
||||
vlong cpos(void);
|
||||
void cseek(vlong p);
|
||||
void cwrite(void *buf, int n);
|
||||
void datblk(int32 addr, int32 size);
|
||||
void datblk(int64 addr, int64 size);
|
||||
int datcmp(LSym *s1, LSym *s2);
|
||||
vlong datoff(vlong addr);
|
||||
void deadcode(void);
|
||||
|
Loading…
Reference in New Issue
Block a user