xtensa/arch_elf.c: Ignore R_XTENSA_NONE
Now examples/sotest passes on qemu.
This commit is contained in:
parent
061b796d47
commit
df44909b30
@ -167,13 +167,30 @@ int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
|||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
uint32_t value;
|
uint32_t value;
|
||||||
|
|
||||||
|
/* All relocations except NONE depend upon having valid symbol
|
||||||
|
* information.
|
||||||
|
*/
|
||||||
|
|
||||||
relotype = ELF32_R_TYPE(rel->r_info);
|
relotype = ELF32_R_TYPE(rel->r_info);
|
||||||
value = sym->st_value + rel->r_addend;
|
if (sym == NULL)
|
||||||
|
{
|
||||||
|
if (relotype != R_XTENSA_NONE)
|
||||||
|
{
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = sym->st_value + rel->r_addend;
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle the relocation by relocation type */
|
/* Handle the relocation by relocation type */
|
||||||
|
|
||||||
switch (relotype)
|
switch (relotype)
|
||||||
{
|
{
|
||||||
|
case R_XTENSA_NONE:
|
||||||
|
break;
|
||||||
|
|
||||||
case R_XTENSA_32:
|
case R_XTENSA_32:
|
||||||
(*(FAR uint32_t *)addr) += value;
|
(*(FAR uint32_t *)addr) += value;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user