This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
SPU relocate_section tidy
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Mon, 4 Feb 2008 11:43:49 +1030
- Subject: SPU relocate_section tidy
Nothing startling here, but spu_elf_relocate_section does return 2 so
the return type ought to be int. bfd_boolean is currently an int but
that might change some day.
* elf32-spu.c (spu_elf_relocate_section): Correct return type.
Return error status on unexpected relocation errors.
Index: bfd/elf32-spu.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-spu.c,v
retrieving revision 1.27
diff -u -p -r1.27 elf32-spu.c
--- bfd/elf32-spu.c 28 Jan 2008 05:59:24 -0000 1.27
+++ bfd/elf32-spu.c 4 Feb 2008 00:23:58 -0000
@@ -2640,7 +2640,7 @@ spu_elf_count_relocs (asection *sec, Elf
/* Apply RELOCS to CONTENTS of INPUT_SECTION from INPUT_BFD. */
-static bfd_boolean
+static int
spu_elf_relocate_section (bfd *output_bfd,
struct bfd_link_info *info,
bfd *input_bfd,
@@ -2654,7 +2654,7 @@ spu_elf_relocate_section (bfd *output_bf
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
struct spu_link_hash_table *htab;
- bfd_boolean ret = TRUE;
+ int ret = TRUE;
bfd_boolean emit_these_relocs = FALSE;
htab = spu_hash_table (info);
@@ -2810,6 +2810,7 @@ spu_elf_relocate_section (bfd *output_bf
/* fall through */
common_error:
+ ret = FALSE;
if (!((*info->callbacks->warning)
(info, msg, sym_name, input_bfd, input_section,
rel->r_offset)))
--
Alan Modra
Australia Development Lab, IBM