elf_backend_relocate_section int vs. bfd_boolean

Alan Modra amodra@gmail.com
Mon Mar 29 00:38:55 GMT 2021


This functions was changed to return an int in commit ece5ef60797f but
since bfd_boolean was an int typedef I lazily left all the ELF
relocate_section functions as returning bfd_boolean, except the SPU
one.  In order to use _Bool or bool in place of bfd_boolean we need to
be fussy about the return types.

	* elf-m10200.c (mn10200_elf_relocate_section): Return int.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elf32-arc.c (elf_arc_relocate_section): Likewise.
	* elf32-arm.c (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
	* elf32-bfin.c (bfin_relocate_section): Likewise.
	(bfinfdpic_relocate_section): Likewise.
	* elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
	* elf32-csky.c (csky_elf_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-ft32.c (ft32_elf_relocate_section): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
	* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
	* elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-mep.c (mep_elf_relocate_section): Likewise.
	* elf32-metag.c (elf_metag_relocate_section): Likewise.
	* elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
	* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
	* elf32-mt.c (mt_elf_relocate_section): Likewise.
	* elf32-nds32.c (nds32_elf_relocate_section): Likewise.
	* elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
	* elf32-or1k.c (or1k_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-pru.c (pru_elf32_relocate_section): Likewise.
	* elf32-rl78.c (rl78_elf_relocate_section): Likewise.
	* elf32-rx.c (rx_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
	(_bfd_score_elf_relocate_section): Likewise.
	* elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
	* elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
	* elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf32-vax.c (elf_vax_relocate_section): Likewise.
	* elf32-visium.c (visium_elf_relocate_section): Likewise.
	* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
	* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
	* elf32-z80.c (z80_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
	(elf64_alpha_relocate_section): Likewise.
	* elf64-bpf.c (bpf_elf_relocate_section): Likewise.
	* elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
	* elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
	* elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
	* elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
	* elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
	* elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
	* elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.

diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index c12732b4dea..0d056a795f7 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -335,7 +335,7 @@ mn10200_elf_final_link_relocate (reloc_howto_type *howto,
 }
 
 /* Relocate an MN10200 ELF section.  */
-static bfd_boolean
+static int
 mn10200_elf_relocate_section (bfd *output_bfd,
 			      struct bfd_link_info *info,
 			      bfd *input_bfd,
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 752c1210c27..c9a728ae2e6 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -1963,7 +1963,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto,
 
 /* Relocate an MN10300 ELF section.  */
 
-static bfd_boolean
+static int
 mn10300_elf_relocate_section (bfd *output_bfd,
 			      struct bfd_link_info *info,
 			      bfd *input_bfd,
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index df12fd33a10..32096fe4897 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1423,7 +1423,7 @@ arc_do_relocation (bfd_byte * contents,
 	      local_section : is an array giving the section in the input file
 			      corresponding to the st_shndx field of each
 			      local symbol.  */
-static bfd_boolean
+static int
 elf_arc_relocate_section (bfd *			  output_bfd,
 			  struct bfd_link_info *  info,
 			  bfd *			  input_bfd,
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index bf0be0c881e..d70529d6dec 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -13024,7 +13024,7 @@ arm_add_to_rel (bfd *		   abfd,
 
 /* Relocate an ARM ELF section.  */
 
-static bfd_boolean
+static int
 elf32_arm_relocate_section (bfd *		   output_bfd,
 			    struct bfd_link_info * info,
 			    bfd *		   input_bfd,
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index ed38ff8bb02..79de45dc1d2 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1413,7 +1413,7 @@ avr_final_link_relocate (reloc_howto_type *		    howto,
 
 /* Relocate an AVR ELF section.  */
 
-static bfd_boolean
+static int
 elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index a0cb1661b9a..c7a4f6c86bc 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -1357,7 +1357,7 @@ bfin_final_link_relocate (Elf_Internal_Rela *rel, reloc_howto_type *howto,
 
 }
 
-static bfd_boolean
+static int
 bfin_relocate_section (bfd * output_bfd,
 		       struct bfd_link_info *info,
 		       bfd * input_bfd,
@@ -2487,7 +2487,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 bfinfdpic_relocate_section (bfd * output_bfd,
 			    struct bfd_link_info *info,
 			    bfd * input_bfd,
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index 4c327d511ed..958f648608a 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -1335,7 +1335,7 @@ elf32_cr16_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd,
 
 /* Relocate a CR16 ELF section.  */
 
-static bfd_boolean
+static int
 elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			     bfd *input_bfd, asection *input_section,
 			     bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 080f95849b0..c5f9a8bd73f 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -968,7 +968,7 @@ static int additional_relocation_error_msg_count = 10;
 /* Relocate an CRIS ELF section.  See elf32-fr30.c, from where this was
    copied, for further comments.  */
 
-static bfd_boolean
+static int
 cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c
index 99edfffdc4d..d201226fabb 100644
--- a/bfd/elf32-crx.c
+++ b/bfd/elf32-crx.c
@@ -36,7 +36,7 @@ static bfd_reloc_status_type crx_elf_final_link_relocate
   (reloc_howto_type *, bfd *, bfd *, asection *,
    bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
    struct bfd_link_info *, asection *, int);
-static bfd_boolean elf32_crx_relocate_section
+static int elf32_crx_relocate_section
   (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
    Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 static bfd_boolean elf32_crx_relax_section
@@ -818,7 +818,7 @@ elf32_crx_get_relocated_section_contents (bfd *output_bfd,
 
 /* Relocate a CRX ELF section.  */
 
-static bfd_boolean
+static int
 elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			    bfd *input_bfd, asection *input_section,
 			    bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index 4e6db39cf40..62336695412 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -4254,7 +4254,7 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
 
 /* Relocate a csky section.  */
 
-static bfd_boolean
+static int
 csky_elf_relocate_section (bfd *                  output_bfd,
 			   struct bfd_link_info * info,
 			   bfd *                  input_bfd,
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index 15855e70d1f..d8cdfa1d516 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -386,7 +386,7 @@ insert_rel_addend (bfd *abfd,
 
 /* Relocate a D10V ELF section.  */
 
-static bfd_boolean
+static int
 elf32_d10v_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info,
 			     bfd *input_bfd,
diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c
index 25adfb98bee..c6a884901db 100644
--- a/bfd/elf32-epiphany.c
+++ b/bfd/elf32-epiphany.c
@@ -468,7 +468,7 @@ epiphany_final_link_relocate (reloc_howto_type *  howto,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			       struct bfd_link_info *info,
 			       bfd *input_bfd,
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index 1000694869c..cd9395ae9bc 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -497,7 +497,7 @@ fr30_final_link_relocate (reloc_howto_type *howto,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 fr30_elf_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 211c500c454..007e05334de 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -2652,7 +2652,7 @@ frv_final_link_relocate (reloc_howto_type *howto,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index 5a6ec764804..0ba2da06259 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -342,7 +342,7 @@ ft32_info_to_howto_rela (bfd *abfd,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 ft32_elf_relocate_section (bfd *output_bfd,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 617f4ae01e0..187551642d0 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -47,7 +47,7 @@ static bfd_reloc_status_type elf32_h8_final_link_relocate
   (unsigned long, bfd *, bfd *, asection *,
    bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
    struct bfd_link_info *, asection *, int);
-static bfd_boolean elf32_h8_relocate_section
+static int elf32_h8_relocate_section
   (bfd *, struct bfd_link_info *, bfd *, asection *,
    bfd_byte *, Elf_Internal_Rela *,
    Elf_Internal_Sym *, asection **);
@@ -425,7 +425,7 @@ elf32_h8_final_link_relocate (unsigned long r_type, bfd *input_bfd,
 }
 
 /* Relocate an H8 ELF section.  */
-static bfd_boolean
+static int
 elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			   bfd *input_bfd, asection *input_section,
 			   bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index ec354c88ff2..c00dbeeb165 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3443,7 +3443,7 @@ final_link_relocate (asection *input_section,
 
 /* Relocate an HPPA ELF section.  */
 
-static bfd_boolean
+static int
 elf32_hppa_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info,
 			     bfd *input_bfd,
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 04ea7d088b6..b95340f2897 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1993,7 +1993,7 @@ elf_i386_tpoff (struct bfd_link_info *info, bfd_vma address)
 
 /* Relocate an i386 ELF section.  */
 
-static bfd_boolean
+static int
 elf_i386_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 2ba3ebfc6e3..11d558189a5 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1384,7 +1384,7 @@ ip2k_final_link_relocate (reloc_howto_type *  howto,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index b29be24878e..7e52487b3fd 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -561,7 +561,7 @@ iq2000_elf_check_relocs (bfd *abfd,
    section, which means that the addend must be adjusted
    accordingly.	 */
 
-static bfd_boolean
+static int
 iq2000_elf_relocate_section (bfd *		     output_bfd ATTRIBUTE_UNUSED,
 			     struct bfd_link_info *  info,
 			     bfd *		     input_bfd,
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index 9d72150ccc1..6c8b563cb65 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -715,7 +715,7 @@ _lm32fdpic_osec_readonly_p (bfd *output_bfd, asection *osec)
 
 /* Relocate a section */
 
-static bfd_boolean
+static int
 lm32_elf_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index db19967874b..d7bc2f81cd2 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -30,7 +30,7 @@ static reloc_howto_type * m32c_reloc_type_lookup
   (bfd *, bfd_reloc_code_real_type);
 static bfd_boolean m32c_info_to_howto_rela
   (bfd *, arelent *, Elf_Internal_Rela *);
-static bfd_boolean m32c_elf_relocate_section
+static int m32c_elf_relocate_section
   (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 static bfd_boolean m32c_elf_check_relocs
   (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
@@ -388,7 +388,7 @@ static bfd_reloc_status_type m32c_apply_reloc_24 (bfd *abfd ATTRIBUTE_UNUSED,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 m32c_elf_relocate_section
     (bfd *		     output_bfd ATTRIBUTE_UNUSED,
      struct bfd_link_info *  info,
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 95e0c17bc5c..29ebd99b58e 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -2150,7 +2150,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 38767aac839..6b34b2051ff 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -923,7 +923,7 @@ reloc_warning (struct bfd_link_info *info, const char *name, bfd *input_bfd,
 }
 
 /* Relocate a 68hc11/68hc12 ELF section.  */
-bfd_boolean
+int
 elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 				struct bfd_link_info *info,
 				bfd *input_bfd, asection *input_section,
diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h
index 8a5c0214ba3..419b22cb784 100644
--- a/bfd/elf32-m68hc1x.h
+++ b/bfd/elf32-m68hc1x.h
@@ -161,7 +161,7 @@ bfd_reloc_status_type m68hc11_elf_special_reloc
 bfd_boolean elf32_m68hc11_check_relocs
   (bfd * abfd, struct bfd_link_info * info,
    asection * sec, const Elf_Internal_Rela * relocs);
-bfd_boolean elf32_m68hc11_relocate_section
+int elf32_m68hc11_relocate_section
   (bfd *output_bfd, struct bfd_link_info *info,
    bfd *input_bfd, asection *input_section,
    bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index f2222d0ed68..edbc3e9d292 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -3420,7 +3420,7 @@ elf_m68k_init_got_entry_local_shared (struct bfd_link_info *info,
 
 /* Relocate an M68K ELF section.  */
 
-static bfd_boolean
+static int
 elf_m68k_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 5f5184b9139..20185fd1315 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -390,7 +390,7 @@ mcore_elf_info_to_howto (bfd * abfd,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 mcore_elf_relocate_section (bfd * output_bfd,
 			    struct bfd_link_info * info,
 			    bfd * input_bfd,
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index d87770ca4f0..81a984c85e9 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -424,7 +424,7 @@ mep_info_to_howto_rela (bfd *		    abfd,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 mep_elf_relocate_section
     (bfd *		     output_bfd ATTRIBUTE_UNUSED,
      struct bfd_link_info *  info,
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index ac6d37977cc..20f8dc98a7f 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -1452,7 +1452,7 @@ going to be the section symbol corresponding to the output
 section, which means that the addend must be adjusted
 accordingly.  */
 
-static bfd_boolean
+static int
 elf_metag_relocate_section (bfd *output_bfd,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 1571bbb118a..cfd7b8cf6bb 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -902,7 +902,7 @@ microblaze_elf_output_dynamic_relocation (bfd *output_bfd,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 microblaze_elf_relocate_section (bfd *output_bfd,
 				 struct bfd_link_info *info,
 				 bfd *input_bfd,
diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c
index 38fcdedc0a9..fbeb55c4a2e 100644
--- a/bfd/elf32-moxie.c
+++ b/bfd/elf32-moxie.c
@@ -197,7 +197,7 @@ moxie_final_link_relocate (reloc_howto_type *howto,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 moxie_elf_relocate_section (bfd *output_bfd,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index eebe74a6791..03439622b84 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -1411,7 +1411,7 @@ msp430_final_link_relocate (reloc_howto_type *	   howto,
 
 /* Relocate an MSP430 ELF section.  */
 
-static bfd_boolean
+static int
 elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
 			       struct bfd_link_info * info,
 			       bfd * input_bfd,
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index c0b95b9c71f..42a84aeeb1e 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -38,7 +38,7 @@ static bfd_reloc_status_type mt_final_link_relocate
   (reloc_howto_type *, bfd *, asection *, bfd_byte *,
    Elf_Internal_Rela *, bfd_vma);
 
-static bfd_boolean mt_elf_relocate_section
+static int mt_elf_relocate_section
   (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
    Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 
@@ -297,7 +297,7 @@ mt_final_link_relocate
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 mt_elf_relocate_section
     (bfd *		     output_bfd ATTRIBUTE_UNUSED,
      struct bfd_link_info *  info,
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index 01d0702255a..0e63dfb575e 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -4935,7 +4935,7 @@ fls (register unsigned int x)
 #define nds32_elf_local_tlsdesc_gotent(bfd) \
   (elf_nds32_tdata (bfd)->local_tlsdesc_gotent)
 
-static bfd_boolean
+static int
 nds32_elf_relocate_section (bfd *		   output_bfd ATTRIBUTE_UNUSED,
 			    struct bfd_link_info * info,
 			    bfd *		   input_bfd,
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index c925bc975e7..0235e5d0373 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -3675,7 +3675,7 @@ nios2_elf32_callr_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
 
 
 /* Implement elf_backend_relocate_section.  */
-static bfd_boolean
+static int
 nios2_elf32_relocate_section (bfd *output_bfd,
 			      struct bfd_link_info *info,
 			      bfd *input_bfd,
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index 82a5b4ac8e2..5f9d26ce524 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -1242,7 +1242,7 @@ or1k_final_link_relocate (reloc_howto_type *howto, bfd *input_bfd,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 or1k_elf_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index fe8b6fdb7d1..1a00a396e67 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -6933,7 +6933,7 @@ is_insn_dq_form (unsigned int insn)
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 ppc_elf_relocate_section (bfd *output_bfd,
 			  struct bfd_link_info *info,
 			  bfd *input_bfd,
diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c
index b4726befa16..34cadf1a2ee 100644
--- a/bfd/elf32-pru.c
+++ b/bfd/elf32-pru.c
@@ -680,7 +680,7 @@ pru_elf32_ldi32_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
 
 
 /* Implement elf_backend_relocate_section.  */
-static bfd_boolean
+static int
 pru_elf32_relocate_section (bfd *output_bfd,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index a88db133725..6bcfcbd0811 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -673,7 +673,7 @@ rl78_special_reloc (bfd *      input_bfd,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 rl78_elf_relocate_section
     (bfd *		     output_bfd,
      struct bfd_link_info *  info,
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index e2f4c9fb34a..7b6cf9af241 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -481,7 +481,7 @@ static unsigned int rx_stack_top;
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 rx_elf_relocate_section
     (bfd *		     output_bfd,
      struct bfd_link_info *  info,
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 55e61031a04..98ded1e56fc 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -2016,7 +2016,7 @@ invalid_tls_insn (bfd *input_bfd,
 
 /* Relocate a 390 ELF section.  */
 
-static bfd_boolean
+static int
 elf_s390_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index e34169e989f..8ed22311d28 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -2400,7 +2400,7 @@ s3_bfd_score_info_to_howto (bfd *abfd,
 }
 
 /* Relocate an score ELF section.  */
-static bfd_boolean
+static int
 s3_bfd_score_elf_relocate_section (bfd *output_bfd,
 				   struct bfd_link_info *info,
 				   bfd *input_bfd,
@@ -4082,7 +4082,7 @@ _bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
     return s7_bfd_score_info_to_howto (abfd, bfd_reloc, elf_reloc);
 }
 
-static bfd_boolean
+static int
 _bfd_score_elf_relocate_section (bfd *output_bfd,
 				 struct bfd_link_info *info,
 				 bfd *input_bfd,
diff --git a/bfd/elf32-score.h b/bfd/elf32-score.h
index 18a5f575586..fdde38f9ced 100644
--- a/bfd/elf32-score.h
+++ b/bfd/elf32-score.h
@@ -33,7 +33,7 @@ s7_bfd_score_elf_hide_symbol (struct bfd_link_info *,
 extern bfd_boolean
 s7_bfd_score_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *);
 
-extern bfd_boolean
+extern int
 s7_bfd_score_elf_relocate_section (bfd *,
 				   struct bfd_link_info *,
 				   bfd *,
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index 9e1b7dae0cb..b16c693200d 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -2240,7 +2240,7 @@ s7_bfd_score_info_to_howto (bfd *abfd,
 
 /* Relocate an score ELF section.  */
 
-bfd_boolean
+int
 s7_bfd_score_elf_relocate_section (bfd *output_bfd,
 				   struct bfd_link_info *info,
 				   bfd *input_bfd,
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 10145505c3e..d1b760d8532 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3376,7 +3376,7 @@ install_movi20_field (bfd *output_bfd, unsigned long relocation,
 
 /* Relocate an SH ELF section.  */
 
-static bfd_boolean
+static int
 sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			 bfd *input_bfd, asection *input_section,
 			 bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index 53ec572fab9..8d7364decec 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -2147,7 +2147,7 @@ elf32_tic6x_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
     }
 }
 
-static bfd_boolean
+static int
 elf32_tic6x_relocate_section (bfd *output_bfd,
 			      struct bfd_link_info *info,
 			      bfd *input_bfd,
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 255235a4eb5..10a55328710 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -2512,7 +2512,7 @@ static const bfd_byte insn_tls_gd_add_Y0Y1[] = {
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			      bfd *input_bfd, asection *input_section,
 			      bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index dc5f38a262d..dc83bbc903f 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -2167,7 +2167,7 @@ v850_elf_final_link_relocate (reloc_howto_type *howto,
 
 /* Relocate an V850 ELF section.  */
 
-static bfd_boolean
+static int
 v850_elf_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index ff83062a37a..b6f4ab91b0e 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -37,10 +37,10 @@ static bfd_boolean elf_vax_check_relocs (bfd *, struct bfd_link_info *,
 static bfd_boolean elf_vax_adjust_dynamic_symbol (struct bfd_link_info *,
 						  struct elf_link_hash_entry *);
 static bfd_boolean elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *);
-static bfd_boolean elf_vax_relocate_section (bfd *, struct bfd_link_info *,
-					     bfd *, asection *, bfd_byte *,
-					     Elf_Internal_Rela *,
-					     Elf_Internal_Sym *, asection **);
+static int elf_vax_relocate_section (bfd *, struct bfd_link_info *,
+				     bfd *, asection *, bfd_byte *,
+				     Elf_Internal_Rela *,
+				     Elf_Internal_Sym *, asection **);
 static bfd_boolean elf_vax_finish_dynamic_symbol (bfd *, struct bfd_link_info *,
 						  struct elf_link_hash_entry *,
 						  Elf_Internal_Sym *);
@@ -1199,7 +1199,7 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr)
 
 /* Relocate an VAX ELF section.  */
 
-static bfd_boolean
+static int
 elf_vax_relocate_section (bfd *output_bfd,
 			  struct bfd_link_info *info,
 			  bfd *input_bfd,
diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c
index d6430cc712f..e8b25854600 100644
--- a/bfd/elf32-visium.c
+++ b/bfd/elf32-visium.c
@@ -548,7 +548,7 @@ visium_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
 /* Relocate a VISIUM ELF section.  */
 
-static bfd_boolean
+static int
 visium_elf_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info, bfd *input_bfd,
 			     asection *input_section, bfd_byte *contents,
diff --git a/bfd/elf32-xc16x.c b/bfd/elf32-xc16x.c
index a523968ed95..55e27825063 100644
--- a/bfd/elf32-xc16x.c
+++ b/bfd/elf32-xc16x.c
@@ -341,7 +341,7 @@ elf32_xc16x_final_link_relocate (unsigned long r_type,
     }
 }
 
-static bfd_boolean
+static int
 elf32_xc16x_relocate_section (bfd *output_bfd,
 			      struct bfd_link_info *info,
 			      bfd *input_bfd,
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index 0e4824bdca7..005e4544255 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -759,7 +759,7 @@ xstormy16_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 xstormy16_elf_relocate_section (bfd *			output_bfd ATTRIBUTE_UNUSED,
 				struct bfd_link_info *	info,
 				bfd *			input_bfd,
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index abc244c04cb..16a148bf42f 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -2493,7 +2493,7 @@ replace_tls_insn (Elf_Internal_Rela *rel,
 /* Relocate an Xtensa ELF section.  This is invoked by the linker for
    both relocatable and final links.  */
 
-static bfd_boolean
+static int
 elf_xtensa_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info,
 			     bfd *input_bfd,
diff --git a/bfd/elf32-z80.c b/bfd/elf32-z80.c
index eacd714f3ea..5634fa132bb 100644
--- a/bfd/elf32-z80.c
+++ b/bfd/elf32-z80.c
@@ -383,7 +383,7 @@ z80_elf_final_link_relocate (unsigned long r_type,
   return r ? bfd_reloc_ok : bfd_reloc_notsupported;
 }
 
-static bfd_boolean
+static int
 z80_elf_relocate_section (bfd *output_bfd,
 			  struct bfd_link_info *info,
 			  bfd *input_bfd,
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 6fffc438fc4..0f67af4438a 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4037,7 +4037,7 @@ elf64_alpha_emit_dynrel (bfd *abfd, struct bfd_link_info *info,
    symbol, in which case we have to adjust according to where the section
    symbol winds up in the output section.  */
 
-static bfd_boolean
+static int
 elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
 				struct bfd_link_info *info ATTRIBUTE_UNUSED,
 				bfd *input_bfd, asection *input_section,
@@ -4119,7 +4119,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
 
 /* Relocate an Alpha ELF section.  */
 
-static bfd_boolean
+static int
 elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			      bfd *input_bfd, asection *input_section,
 			      bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c
index 1abd16b76c0..98bcd3c9f76 100644
--- a/bfd/elf64-bpf.c
+++ b/bfd/elf64-bpf.c
@@ -364,7 +364,7 @@ bpf_info_to_howto (bfd *abfd, arelent *bfd_reloc,
 
 #define sec_addr(sec) ((sec)->output_section->vma + (sec)->output_offset)
 
-static bfd_boolean
+static int
 bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                           struct bfd_link_info *info,
                           bfd *input_bfd,
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 0ce85cced14..58fc0144baa 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -3735,7 +3735,7 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
 
 /* Relocate an HPPA ELF section.  */
 
-static bfd_boolean
+static int
 elf64_hppa_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 317253fb9a6..0a8cbc6b5b1 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -3371,7 +3371,7 @@ elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
   return TRUE;
 }
 
-static bfd_boolean
+static int
 elf64_ia64_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info,
 			     bfd *input_bfd,
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 62365e1e4f7..0762b6dea9b 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -1350,7 +1350,7 @@ mmix_elf_reloc (bfd *abfd,
 /* Relocate an MMIX ELF section.  Modified from elf32-fr30.c; look to it
    for guidance if you're thinking of copying this.  */
 
-static bfd_boolean
+static int
 mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 741f510a28d..b8af65ee3a6 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -14897,7 +14897,7 @@ ppc64_glibc_dynamic_reloc (enum elf_ppc64_reloc_type r_type)
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 ppc64_elf_relocate_section (bfd *output_bfd,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 01dcefed48e..8314c9a1b62 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1970,7 +1970,7 @@ invalid_tls_insn (bfd *input_bfd,
 
 /* Relocate a 390 ELF section.  */
 
-static bfd_boolean
+static int
 elf_s390_relocate_section (bfd *output_bfd,
 			   struct bfd_link_info *info,
 			   bfd *input_bfd,
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index bba22008c06..2fcba8bfd60 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2411,7 +2411,7 @@ elf_x86_64_tpoff (struct bfd_link_info *info, bfd_vma address)
 
 /* Relocate an x86_64 ELF section.  */
 
-static bfd_boolean
+static int
 elf_x86_64_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info,
 			     bfd *input_bfd,
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 2fee93aa5f9..ccabc4fdcf3 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -6697,7 +6697,7 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
 
 /* Relocate an AArch64 ELF section.  */
 
-static bfd_boolean
+static int
 elfNN_aarch64_relocate_section (bfd *output_bfd,
 				struct bfd_link_info *info,
 				bfd *input_bfd,
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 281a8375d51..5cb9e686835 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -3757,7 +3757,7 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
   return TRUE;
 }
 
-static bfd_boolean
+static int
 elfNN_ia64_relocate_section (bfd *output_bfd,
 			     struct bfd_link_info *info,
 			     bfd *input_bfd,
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 364d67b6749..ddccb40e243 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -1932,7 +1932,7 @@ riscv_resolve_pcrel_lo_relocs (riscv_pcrel_relocs *p)
    section, which means that the addend must be adjusted
    accordingly.  */
 
-static bfd_boolean
+static int
 riscv_elf_relocate_section (bfd *output_bfd,
 			    struct bfd_link_info *info,
 			    bfd *input_bfd,
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 41abf4954dc..6d2909fab19 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -10319,7 +10319,7 @@ mips_reloc_against_discarded_section (bfd *output_bfd,
 
 /* Relocate a MIPS ELF section.  */
 
-bfd_boolean
+int
 _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 				bfd *input_bfd, asection *input_section,
 				bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 103f489d784..04a5c3ba3f1 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -56,7 +56,7 @@ extern bfd_boolean _bfd_mips_elf_always_size_sections
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_mips_elf_size_dynamic_sections
   (bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_mips_elf_relocate_section
+extern int _bfd_mips_elf_relocate_section
   (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
    Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 extern bfd_boolean _bfd_mips_elf_finish_dynamic_symbol
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index c498d1cb70b..2173465e651 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -2764,7 +2764,7 @@ gdop_relative_offset_ok (struct bfd_link_info *info,
 
 /* Relocate a SPARC ELF section.  */
 
-bfd_boolean
+int
 _bfd_sparc_elf_relocate_section (bfd *output_bfd,
 				 struct bfd_link_info *info,
 				 bfd *input_bfd,
diff --git a/bfd/elfxx-sparc.h b/bfd/elfxx-sparc.h
index c2be84ac657..18f5a60ce8b 100644
--- a/bfd/elfxx-sparc.h
+++ b/bfd/elfxx-sparc.h
@@ -123,7 +123,7 @@ extern bfd_boolean _bfd_sparc_elf_new_section_hook
   (bfd *, asection *);
 extern bfd_boolean _bfd_sparc_elf_relax_section
   (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
-extern bfd_boolean _bfd_sparc_elf_relocate_section
+extern int _bfd_sparc_elf_relocate_section
   (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
    Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 extern bfd_boolean _bfd_sparc_elf_finish_dynamic_symbol
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index 3544a3064f8..ace95950767 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -2796,7 +2796,7 @@ static const bfd_byte *insn_addx_Y0Y1 = insn_tls_ie_addx_Y0Y1;
    section, which means that the addend must be adjusted
    accordingly.  */
 
-bfd_boolean
+int
 tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 			     bfd *input_bfd, asection *input_section,
 			     bfd_byte *contents, Elf_Internal_Rela *relocs,
diff --git a/bfd/elfxx-tilegx.h b/bfd/elfxx-tilegx.h
index a6c4c28c36f..ffcd59c85e6 100644
--- a/bfd/elfxx-tilegx.h
+++ b/bfd/elfxx-tilegx.h
@@ -59,7 +59,7 @@ tilegx_elf_omit_section_dynsym (bfd *,
 extern bfd_boolean
 tilegx_elf_size_dynamic_sections (bfd *, struct bfd_link_info *);
 
-extern bfd_boolean
+extern int
 tilegx_elf_relocate_section (bfd *, struct bfd_link_info *,
 			     bfd *, asection *,
 			     bfd_byte *, Elf_Internal_Rela *,

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list