ADDR32 relocation invalid without /LARGEADDRESSAWARE:NO (VS)
Posted: Wed Feb 13, 2019 3:22 am
I'm using Visual Studio 2017 to develop a "kernel". However, I recently tried integrating some assembly code with my C files only to get this weird error:
"Error LNK2017 'ADDR32' relocation to '.data' invalid without /LARGEADDRESSAWARE:NO"
I'm posting links to my small assembly code, should someone want to take a look. I'm declaring this function as in my C code and calling it. The assembly file is built using the "-f win64" flag for NASM. EDIT: Also, should it have any meaning, this assembly file resides in a Static Libary (.lib) project and I'm calling it inside that project.
Maybe it's also meaningful in some way, I loaded the kernel at a higher-half 64bit address.
https://pastebin.com/d9VzKe9r (main assembly file)
https://pastebin.com/99kySJFY (included macros.inc)
EDIT: Also, it's really strange, but a similar code actually seemed to work when using MASM instead of NASM .
"Error LNK2017 'ADDR32' relocation to '.data' invalid without /LARGEADDRESSAWARE:NO"
I'm posting links to my small assembly code, should someone want to take a look. I'm declaring this function as
Code: Select all
extern "C" void pit_interrupt();
Maybe it's also meaningful in some way, I loaded the kernel at a higher-half 64bit address.
https://pastebin.com/d9VzKe9r (main assembly file)
https://pastebin.com/99kySJFY (included macros.inc)
EDIT: Also, it's really strange, but a similar code actually seemed to work when using MASM instead of NASM .