Skip to content

Commit

Permalink
[REVERTME] Fix arm12 target (armv7m) build error
Browse files Browse the repository at this point in the history
  • Loading branch information
pussuw committed Dec 19, 2023
1 parent 0c5fb78 commit de8a776
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions libs/libc/machine/arm/armv7-m/arch_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions libs/libc/modlib/modlib_bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit de8a776

Please sign in to comment.