aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-spu.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-19 18:15:30 +1030
committerAlan Modra <amodra@gmail.com>2015-01-19 19:37:45 +1030
commit0ba38529f27a815a576bc07c85ceb65f6498ef5a (patch)
treed0e69bc6ab2871e148ea9957de617e976c85fffc /bfd/elf32-spu.c
parent6346d5ca43719ba6fc3176c29fd58a83d439f011 (diff)
downloadgdb-0ba38529f27a815a576bc07c85ceb65f6498ef5a.zip
gdb-0ba38529f27a815a576bc07c85ceb65f6498ef5a.tar.gz
gdb-0ba38529f27a815a576bc07c85ceb65f6498ef5a.tar.bz2
More fixes related to NONE relocs
* elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration to allow return of first howto. * elf32-fr30.c (fr30_reloc_type_lookup): Likewise. * elf32-m32c.c (m32c_reloc_type_lookup): Likewise. * elf32-moxie.c (moxie_reloc_type_lookup): Likewise. * elf32-or1k.c (or1k_reloc_type_lookup): Likewise. * elf32-rl78.c (rl78_reloc_type_lookup): Likewise. * elf32-rx.c (rx_reloc_type_lookup): Likewise. * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise. * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE. * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE. (spu_elf_reloc_type_lookup): Adjust to suit.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r--bfd/elf32-spu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index a806c5d..8203286 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -105,6 +105,8 @@ spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code)
switch (code)
{
default:
+ return (enum elf_spu_reloc_type) -1;
+ case BFD_RELOC_NONE:
return R_SPU_NONE;
case BFD_RELOC_SPU_IMM10W:
return R_SPU_ADDR10;
@@ -168,7 +170,7 @@ spu_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
{
enum elf_spu_reloc_type r_type = spu_elf_bfd_to_reloc_type (code);
- if (r_type == R_SPU_NONE)
+ if (r_type == (enum elf_spu_reloc_type) -1)
return NULL;
return elf_howto_table + r_type;