diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2003-07-23 19:40:23 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2003-07-23 19:40:23 +0000 |
commit | 97887cd2c6fe8f00a894997ec87025a320eab44c (patch) | |
tree | b90de603d9ca7ce11e7a2bf1340b3c96672c7451 /bfd/elf32-m68hc1x.c | |
parent | f633a1617a3c4ca69435b50c02ccd332f471ab48 (diff) | |
download | binutils-redhat-97887cd2c6fe8f00a894997ec87025a320eab44c.tar.gz |
* elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
we have a local symbol in common section.
Diffstat (limited to 'bfd/elf32-m68hc1x.c')
-rw-r--r-- | bfd/elf32-m68hc1x.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index a3def112f1..7733f05f1f 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -512,11 +512,12 @@ elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section) bfd_boolean is_far; sym = local_syms + r_indx; - hdr = elf_elfsections (input_bfd)[sym->st_shndx]; - sym_sec = hdr->bfd_section; is_far = (sym && (sym->st_other & STO_M68HC12_FAR)); if (!is_far) continue; + + hdr = elf_elfsections (input_bfd)[sym->st_shndx]; + sym_sec = hdr->bfd_section; stub_name = (bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name)); |