diff options
Diffstat (limited to 'backends/ppc64_init.c')
| -rw-r--r-- | backends/ppc64_init.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c index e52231c9..56e1828e 100644 --- a/backends/ppc64_init.c +++ b/backends/ppc64_init.c @@ -61,6 +61,7 @@ ppc64_init (elf, machine, eh, ehlen) HOOK (eh, machine_flag_check); HOOK (eh, copy_reloc_p); HOOK (eh, check_special_symbol); + HOOK (eh, check_st_other_bits); HOOK (eh, bss_plt_p); HOOK (eh, return_value_location); HOOK (eh, register_info); @@ -89,13 +90,16 @@ ppc64_init (elf, machine, eh, ehlen) if (opd_shdr != NULL && (opd_shdr->sh_flags & SHF_ALLOC) != 0 && opd_shdr->sh_type == SHT_PROGBITS - && opd_shdr->sh_size > 0 - && strcmp (elf_strptr (elf, ehdr->e_shstrndx, - opd_shdr->sh_name), ".opd") == 0) + && opd_shdr->sh_size > 0) { - eh->fd_addr = opd_shdr->sh_addr; - eh->fd_data = elf_getdata (scn, NULL); - break; + const char *name = elf_strptr (elf, ehdr->e_shstrndx, + opd_shdr->sh_name); + if (name != NULL && strcmp (name, ".opd") == 0) + { + eh->fd_addr = opd_shdr->sh_addr; + eh->fd_data = elf_getdata (scn, NULL); + break; + } } } } |
