xtensa/arch_elf.c: Ignore R_XTENSA_NONE

Now examples/sotest passes on qemu.
This commit is contained in:
YAMAMOTO Takashi 2020-03-10 18:46:06 +09:00 committed by patacongo
parent 061b796d47
commit df44909b30

View File

@ -167,13 +167,30 @@ int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
unsigned char *p;
uint32_t value;
/* All relocations except NONE depend upon having valid symbol
* information.
*/
relotype = ELF32_R_TYPE(rel->r_info);
if (sym == NULL)
{
if (relotype != R_XTENSA_NONE)
{
return -EINVAL;
}
}
else
{
value = sym->st_value + rel->r_addend;
}
/* Handle the relocation by relocation type */
switch (relotype)
{
case R_XTENSA_NONE:
break;
case R_XTENSA_32:
(*(FAR uint32_t *)addr) += value;
break;