mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
Only relocate allocated sections.
svn-id: r14753
This commit is contained in:
parent
468404ab33
commit
d0d7e594d6
@ -300,7 +300,8 @@ bool DLObject::load(int fd)
|
||||
|
||||
for(int i=0; i<ehdr.e_shnum; i++)
|
||||
if(shdr[i].sh_type == 4 && shdr[i].sh_entsize == sizeof(Elf32_Rela) &&
|
||||
shdr[i].sh_link == symtab_sect)
|
||||
shdr[i].sh_link == symtab_sect && shdr[i].sh_info < ehdr.e_shnum &&
|
||||
(shdr[shdr[i].sh_info].sh_flags & 2))
|
||||
if(!relocate(fd, shdr[i].sh_offset, shdr[i].sh_size)) {
|
||||
free(shdr);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user