diff options
Diffstat (limited to 'bfd/elf32-rx.c')
-rw-r--r-- | bfd/elf32-rx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index df765ae..c58c184 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -2009,8 +2009,11 @@ elf32_rx_relax_section (bfd * abfd, || (sec->flags & SEC_CODE) == 0) return TRUE; - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr; + symtab_hdr = & elf_symtab_hdr (abfd); + if (elf_symtab_shndx_list (abfd)) + shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr; + else + shndx_hdr = NULL; sec_start = sec->output_section->vma + sec->output_offset; @@ -2035,7 +2038,7 @@ elf32_rx_relax_section (bfd * abfd, symtab_hdr->contents = (bfd_byte *) intsyms; } - if (shndx_hdr->sh_size != 0) + if (shndx_hdr && shndx_hdr->sh_size != 0) { bfd_size_type amt; |