diff --git a/arch/sim/src/up_elf.c b/arch/sim/src/up_elf.c index c6aabdcef7d..ca3b642dcde 100644 --- a/arch/sim/src/up_elf.c +++ b/arch/sim/src/up_elf.c @@ -40,7 +40,9 @@ #include #include +#include #include +#include #include #include @@ -113,7 +115,7 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, { FAR uint32_t *ptr = (FAR uint32_t *)addr; - switch (ELF_REL_TYPE(rel->r_info)) + switch (ELF32_R_TYPE(rel->r_info)) { case R_386_32: *ptr += sym->st_value; diff --git a/arch/x86/src/common/up_elf.c b/arch/x86/src/common/up_elf.c index f159c8e5180..be166b480c9 100644 --- a/arch/x86/src/common/up_elf.c +++ b/arch/x86/src/common/up_elf.c @@ -40,7 +40,9 @@ #include #include +#include #include +#include #include #include @@ -113,7 +115,7 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, { FAR uint32_t *ptr = (FAR uint32_t *)addr; - switch (ELF_REL_TYPE(rel->r_info)) + switch (ELF32_R_TYPE(rel->r_info)) { case R_386_32: *ptr += sym->st_value;