X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf64-alpha.c;h=cfd328a229e0ccb482a083e94cf5c9c837c0d26d;hb=ffa547701bec5b3fb92acf049e5442cbbfc95b2c;hp=403e43697b5bcc5069e4056e629f4ef5e9f781de;hpb=6d00b590316c0b08de21a264893b0fd627c54686;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 403e43697b..cfd328a229 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1,5 +1,5 @@ /* Alpha specific support for 64-bit ELF - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of BFD, the Binary File Descriptor library. @@ -486,8 +486,8 @@ static reloc_howto_type elf64_alpha_howto_table[] = { HOWTO (R_ALPHA_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 8, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -1105,7 +1105,14 @@ elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned r_type = ELF64_R_TYPE(dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max); + + if (r_type >= R_ALPHA_max) + { + (*_bfd_error_handler) (_("%B: unrecognised Alpha reloc number: %d"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + r_type = R_ALPHA_NONE; + } cache_ptr->howto = &elf64_alpha_howto_table[r_type]; } @@ -1442,17 +1449,19 @@ elf64_alpha_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) } static bfd_boolean -elf64_alpha_find_nearest_line (bfd *abfd, asection *section, asymbol **symbols, - bfd_vma offset, const char **filename_ptr, +elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, + asection *section, bfd_vma offset, + const char **filename_ptr, const char **functionname_ptr, - unsigned int *line_ptr) + unsigned int *line_ptr, + unsigned int *discriminator_ptr) { asection *msec; - if (_bfd_dwarf2_find_nearest_line (abfd, dwarf_debug_sections, - section, symbols, offset, + if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, filename_ptr, functionname_ptr, - line_ptr, NULL, 0, + line_ptr, discriminator_ptr, + dwarf_debug_sections, 0, &elf_tdata (abfd)->dwarf2_find_line_info)) return TRUE; @@ -1532,9 +1541,9 @@ elf64_alpha_find_nearest_line (bfd *abfd, asection *section, asymbol **symbols, /* Fall back on the generic ELF find_nearest_line routine. */ - return _bfd_elf_find_nearest_line (abfd, section, symbols, offset, + return _bfd_elf_find_nearest_line (abfd, symbols, section, offset, filename_ptr, functionname_ptr, - line_ptr); + line_ptr, discriminator_ptr); } /* Structure used to pass information to alpha_elf_output_extsym. */ @@ -2481,7 +2490,7 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info, consisting of all of the input files. */ if (got_list == NULL) { - for (i = info->input_bfds; i ; i = i->link_next) + for (i = info->input_bfds; i ; i = i->link.next) { bfd *this_got;