mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
modlib:allow 64bit elf load
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
@@ -333,7 +333,8 @@ static int modlib_relocate(FAR struct module_s *modp,
|
||||
|
||||
/* Calculate the relocation address. */
|
||||
|
||||
if (rel->r_offset + sizeof(uint32_t) > dstsec->sh_size)
|
||||
if (rel->r_offset < 0 ||
|
||||
rel->r_offset > dstsec->sh_size)
|
||||
{
|
||||
berr("ERROR: Section %d reloc %d: "
|
||||
"Relocation address out of range, "
|
||||
@@ -528,7 +529,8 @@ static int modlib_relocateadd(FAR struct module_s *modp,
|
||||
|
||||
/* Calculate the relocation address. */
|
||||
|
||||
if (rela->r_offset + sizeof(uint32_t) > dstsec->sh_size)
|
||||
if (rela->r_offset < 0 ||
|
||||
rela->r_offset > dstsec->sh_size)
|
||||
{
|
||||
berr("ERROR: Section %d reloc %d: "
|
||||
"Relocation address out of range, "
|
||||
|
||||
Reference in New Issue
Block a user