projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bfd_section_* macros
[binutils-gdb.git]
/
bfd
/
elf32-fr30.c
diff --git
a/bfd/elf32-fr30.c
b/bfd/elf32-fr30.c
index 679322a6e8ec9503c6f0b7c01ce904fd2de84547..0d299c64b616ea2e64a832440a00336fdd829a36 100644
(file)
--- a/
bfd/elf32-fr30.c
+++ b/
bfd/elf32-fr30.c
@@
-1,5
+1,5
@@
/* FR30-specific support for 32-bit ELF.
/* FR30-specific support for 32-bit ELF.
- Copyright (C) 1998-201
8
Free Software Foundation, Inc.
+ Copyright (C) 1998-201
9
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
@@
-367,7
+367,7
@@
fr30_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
/* Set the howto pointer for an FR30 ELF reloc. */
/* Set the howto pointer for an FR30 ELF reloc. */
-static
void
+static
bfd_boolean
fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
@@
-378,10
+378,13
@@
fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_FR30_max)
{
/* xgettext:c-format */
if (r_type >= (unsigned int) R_FR30_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: invalid FR30 reloc number: %d"), abfd, r_type);
- r_type = 0;
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
cache_ptr->howto = & fr30_elf_howto_table [r_type];
}
cache_ptr->howto = & fr30_elf_howto_table [r_type];
+ return TRUE;
}
\f
/* Perform a single relocation. By default we use the standard BFD
}
\f
/* Perform a single relocation. By default we use the standard BFD
@@
-546,7
+549,7
@@
fr30_elf_relocate_section (bfd *output_bfd,
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
- name =
(name == NULL) ? bfd_section_name (input_bfd,
sec) : name;
+ name =
name == NULL ? bfd_section_name (
sec) : name;
}
else
{
}
else
{
@@
-684,9
+687,7
@@
fr30_elf_check_relocs (bfd *abfd,
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_FR30_GNU_VTENTRY:
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_FR30_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
}
return FALSE;
break;
}