optimization for elfloader

use a rel/rela section's sh_info to resolve which section this rel will be applied to, rather than the section's name
This commit is contained in:
daishengdong
2020-06-10 10:13:42 +08:00
parent 5e16690f7b
commit 842e8a0458
3 changed files with 37 additions and 52 deletions

View File

@@ -289,6 +289,7 @@ __API__ el_err_t tos_elfloader_load(el_module_t *module, int fd)
phdr_offset += ehdr.e_phentsize;
}
/* do relocation */
if (rel_dyn_size > 0) {
err = elfloader_relocate(fd, load_bias,
rel_dyn_offset, rel_dyn_size, rel_entsize,