Pelles C > Bug reports
Relocation type ADDR32 is invalid without /LARGEADDRESSAWARE:NO
Git:
I am getting the same error from 9.00.9 :
POLINK: error: Relocation type ADDR32 is invalid without /LARGEADDRESSAWARE:NO, for symbol 'biggy'.
I have several initialed variables in a DATA segment, and some code in a CODE segment. POLINK kicks out that error for each variable declared. Dumpbin shows that all those variables are ADDR32 relocs.. I don't want or need 32bit anything in this program. I have a simple 64bit C program calling a simple 64bit asm function.
Could anybody please explain how to fix this?. Id there a particular project setting or assembler directive or keyword missing?. Any help on this will be greatly appreciated, it's driving me nuts, as is being stuck indoors during this COVID19 pandemic.
Here's the rub - it was all ok, compiled, assembled, linked and just about ran. I changed that good ole "something, I forget..." and it started throwing these ADDR32 link errors. It's telling me to set /LARGEADDRESSAWARE:NO but I really don't want to do that.
Git
--- Code: ---.MODEL FLAT, FASTCALL
EXTERN cos: PROC
EXTERN modf: PROC
.DATA
ALIGN 16
biggy OWORD 12345678123456781234567812345678
qA QWORD 84BD228634A74B22h
dubB REAL8 100.0
.CODE
ALIGN 16
gen_nums proc public
local y:qword
push blah
push more
mov etc
movsd xmm1, dubB
etc
...
...
gen_nums endp
ENDS
--- End code ---
Later : In line with Pelles wishes in his message at the top of the bug reports forum, I'm attaching a minimal project that exhibits the problem. The code doesn't do anything else sensible.
Git
Pelle:
This has already been answered. In this thread. Use rip-relative addressing on x64!!
Git:
Could you give a brief example please? I have no idea what RIP addressing is, I have never crossed paths with it. It would be very useful if you or somebody could show what needs to change in that brief example I uploaded to make it RIP relative. Thank you.
Git
TimoVJL:
--- Code: ---.MODEL FLAT, FASTCALL
.DATA
ALIGN 16
dubB REAL8 100.0
.CODE
ALIGN 16
mainCRTStartup proc
; movsd xmm1, dubB
movsd xmm1, [RIP+dubB]
ret
mainCRTStartup endp
END
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version