llext: skip first dummy symbol table entry
The first entry in the symbol table is empty, skip it. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
a88facacaa
commit
68b4898b7e
1 changed files with 10 additions and 0 deletions
|
@ -336,6 +336,11 @@ static int llext_count_export_syms(struct llext_loader *ldr, struct llext *ext)
|
|||
for (i = 0, pos = ldr->sects[LLEXT_SECT_SYMTAB].sh_offset;
|
||||
i < sym_cnt;
|
||||
i++, pos += ent_size) {
|
||||
if (!i) {
|
||||
/* A dummy entry */
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = llext_seek(ldr, pos);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
|
@ -391,6 +396,11 @@ static inline int llext_copy_symbols(struct llext_loader *ldr, struct llext *ext
|
|||
for (i = 0, pos = ldr->sects[LLEXT_SECT_SYMTAB].sh_offset, j = 0;
|
||||
i < sym_cnt;
|
||||
i++, pos += ent_size) {
|
||||
if (!i) {
|
||||
/* A dummy entry */
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = llext_seek(ldr, pos);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue