Skip to content
Commit 7eb1d3d5 authored by Marc Herbert's avatar Marc Herbert Committed by Anas Nashif
Browse files

llext: elf.h: fix wrong 32 bits length of elf64_rela fields

Fixes commit a9a82d55 ("llext: use elf_rela_t instead of elf_rel_t")

Also switch sign of (unused?) `r_addend` to unsigned.

https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.reloc.html



Issue found thanks to the following warnings when compiling in 64bits:

```
/__w/zephyr/zephyr/include/zephyr/llext/elf.h:349:29: error:
  right shift count >= width of type [-Werror=shift-count-overflow]
     349 | #define ELF64_R_SYM(i) ((i) >> 32)
```

The name `elf64_word` was admittedly confusing.

Signed-off-by: default avatarMarc Herbert <marc.herbert@intel.com>
parent 4ad9f906
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment