From de8a776395ccc3860a5ba7097bb7d3dee4ecc08f Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Tue, 19 Dec 2023 12:08:17 +0200 Subject: [PATCH] [REVERTME] Fix arm12 target (armv7m) build error --- libs/libc/machine/arm/armv7-m/arch_elf.c | 5 +++-- libs/libc/modlib/modlib_bind.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/libc/machine/arm/armv7-m/arch_elf.c b/libs/libc/machine/arm/armv7-m/arch_elf.c index b8b2e03af5a60..82f0a7dc94a42 100644 --- a/libs/libc/machine/arm/armv7-m/arch_elf.c +++ b/libs/libc/machine/arm/armv7-m/arch_elf.c @@ -110,7 +110,8 @@ bool up_checkarch(const Elf32_Ehdr *ehdr) * ****************************************************************************/ -int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr) +int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr, + void *arch_data) { int32_t offset; uint32_t upper_insn; @@ -510,7 +511,7 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr) } int up_relocateadd(const Elf32_Rela *rel, const Elf32_Sym *sym, - uintptr_t addr) + uintptr_t addr, void *arch_data) { berr("ERROR: RELA relocation not supported\n"); return -ENOSYS; diff --git a/libs/libc/modlib/modlib_bind.c b/libs/libc/modlib/modlib_bind.c index 540ce8714a6f0..6d8976ca92a34 100644 --- a/libs/libc/modlib/modlib_bind.c +++ b/libs/libc/modlib/modlib_bind.c @@ -332,7 +332,7 @@ static int modlib_relocate(FAR struct module_s *modp, /* Now perform the architecture-specific relocation */ - ret = up_relocate(rel, sym, addr); + ret = up_relocate(rel, sym, addr, NULL); if (ret < 0) { berr("ERROR: Section %d reloc %d: Relocation failed: %d\n", @@ -522,7 +522,7 @@ static int modlib_relocateadd(FAR struct module_s *modp, /* Now perform the architecture-specific relocation */ - ret = up_relocateadd(rela, sym, addr); + ret = up_relocateadd(rela, sym, addr, NULL); if (ret < 0) { berr("ERROR: Section %d reloc %d: Relocation failed: %d\n", @@ -731,7 +731,7 @@ static int modlib_relocatedyn(FAR struct module_s *modp, else dynsym.st_value = *(uint32_t *) addr - loadinfo->datasec + loadinfo->datastart; - ret = up_relocate(rel, &dynsym, addr); + ret = up_relocate(rel, &dynsym, addr, NULL); } if (ret < 0)