x86-64: relocation addend is 64bit
Some routines were using the wrong type (int) in passing addends, truncating it. This matters when bit 31 isn't set and the high 32 bits are set: the truncation would make it unsigned where in reality it's signed (happen e.g. on the x86-64 with it's load address at top-2GB).
This commit is contained in:
4
tcc.h
4
tcc.h
@ -1478,8 +1478,8 @@ ST_FUNC void g(int c);
|
||||
ST_FUNC int oad(int c, int s);
|
||||
ST_FUNC void gen_le16(int c);
|
||||
ST_FUNC void gen_le32(int c);
|
||||
ST_FUNC void gen_addr32(int r, Sym *sym, int c);
|
||||
ST_FUNC void gen_addrpc32(int r, Sym *sym, int c);
|
||||
ST_FUNC void gen_addr32(int r, Sym *sym, long c);
|
||||
ST_FUNC void gen_addrpc32(int r, Sym *sym, long c);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TCC_BCHECK
|
||||
|
||||
Reference in New Issue
Block a user