Update libs/libc/modlib/modlib_bind.c

u are right

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
anjiahao 2022-04-01 20:22:02 +08:00 committed by Xiang Xiao
parent 15142a8b10
commit c7badac601

View File

@ -298,7 +298,7 @@ static int modlib_relocate(FAR struct module_s *modp,
/* Calculate the relocation address. */
if (rel->r_offset ||
rel->r_offset > dstsec->sh_size - sizeof(uint32_t))
rel->r_offset + sizeof(uint32_t) > dstsec->sh_size)
{
berr("ERROR: Section %d reloc %d: "
"Relocation address out of range, "