NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: nobody on February 23, 2008, 01:48:58 PM

Title: 64bit call
Post by: nobody on February 23, 2008, 01:48:58 PM
Hi,
I am writing some 64 bit assembly, put it into elf64 format and then link it with ld. The problem is the following: when I write:

[BITS 64]
extern func
call func

The linker gives me some sort of "relocation trancated" error, because func is somewhere above 2 GiB in virtual memory. Doing a objdump -r on the elf file outputs, that the reloc in the call-statement is of the type R_X86_64_PC32. But why? it should be 64 bit, shouldnt it?

thanks for you