diff --git a/libs/libc/machine/sim/arch_elf64.c b/libs/libc/machine/sim/arch_elf64.c index 37086bf760..561abae615 100644 --- a/libs/libc/machine/sim/arch_elf64.c +++ b/libs/libc/machine/sim/arch_elf64.c @@ -47,6 +47,7 @@ #define R_X86_64_PLT32 4 #define R_X86_64_32 10 #define R_X86_64_32S 11 +#define R_X86_64_PC64 24 /**************************************************************************** * Private Data Types @@ -181,6 +182,10 @@ int up_relocateadd(FAR const Elf64_Rela *rel, FAR const Elf64_Sym *sym, *(uint32_t *)addr = value; break; + case R_X86_64_PC64: /* S + A - P */ + value = sym->st_value + rel->r_addend - addr; + *(uint64_t *)addr = value; + break; case R_X86_64_32: /* S + A */ case R_X86_64_32S: /* S + A */ value = sym->st_value + rel->r_addend;