]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
BFD: Rename `*_set_reloc' to `*_finalize_section_relocs'
authorMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 14 Jan 2026 22:28:43 +0000 (22:28 +0000)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 14 Jan 2026 22:28:43 +0000 (22:28 +0000)
The `*_set_reloc' interface is to be called at the conclusion of section
relocation processing, however its name reflects a particular action to
take rather than the context of invocation.  Implementation is already
backend-specific.

Rename the interface such as not to make its name artificially limit the
intended purpose.  Update the callers and documentation accordingly.  No
functional change.

28 files changed:
bfd/aout-target.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-alpha.c
bfd/coff-mips.c
bfd/coff-rs6000.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/elf64-sparc.c
bfd/elfxx-target.h
bfd/i386msdos.c
bfd/libbfd-in.h
bfd/libbfd.c
bfd/libbfd.h
bfd/mach-o-target.c
bfd/reloc.c
bfd/som.c
bfd/targets.c
bfd/vms-alpha.c
binutils/objcopy.c
binutils/rescoff.c
gas/config/obj-coff.c
gas/config/obj-coff.h
gas/config/obj-macho.c
gas/config/obj-macho.h
gas/doc/internals.texi
gas/write.c
ld/ldlang.c

index c3a42532b602859959b25ca5c35077540aad81eb..fd428be3edc66697d261adf962c98ec35939f965 100644 (file)
@@ -444,8 +444,8 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
 #ifndef MY_canonicalize_reloc
 #define MY_canonicalize_reloc NAME (aout, canonicalize_reloc)
 #endif
-#ifndef MY_set_reloc
-#define MY_set_reloc _bfd_generic_set_reloc
+#ifndef MY_finalize_section_relocs
+#define MY_finalize_section_relocs _bfd_generic_finalize_section_relocs
 #endif
 #ifndef MY_make_empty_symbol
 #define MY_make_empty_symbol NAME (aout, make_empty_symbol)
index ba6dca16538414a29edf88c429756eb46c7d4170..131e969a083e898dc3c3eb065bf7c8fbea49afec 100644 (file)
@@ -2613,11 +2613,12 @@ long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
 long bfd_canonicalize_reloc
    (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
 
-void bfd_set_reloc
+void bfd_finalize_section_relocs
    (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
 
-#define bfd_set_reloc(abfd, asect, location, count) \
-       BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
+#define bfd_finalize_section_relocs(abfd, asect, location, count) \
+       BFD_SEND (abfd, _bfd_finalize_section_relocs, \
+                (abfd, asect, location, count))
 bool bfd_set_file_flags (bfd *abfd, flagword flags);
 
 int bfd_get_arch_size (bfd *abfd);
@@ -7656,14 +7657,15 @@ typedef struct bfd_target
 #define BFD_JUMP_TABLE_RELOCS(NAME) \
   NAME##_get_reloc_upper_bound, \
   NAME##_canonicalize_reloc, \
-  NAME##_set_reloc, \
+  NAME##_finalize_section_relocs, \
   NAME##_bfd_reloc_type_lookup, \
   NAME##_bfd_reloc_name_lookup
 
   long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
   long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
                                   struct bfd_symbol **);
-  void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
+  void (*_bfd_finalize_section_relocs) (bfd *, sec_ptr, arelent **,
+                                       unsigned int);
   /* See documentation on reloc types.  */
   reloc_howto_type *
        (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
index d1d1df564512cfa767809c896e3f258186cc87db..0c97a495e2f225c429e30045b9feff1b172dbd62 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2199,19 +2199,21 @@ bfd_canonicalize_reloc (bfd *abfd,
 
 /*
 FUNCTION
-       bfd_set_reloc
+       bfd_finalize_section_relocs
 
 SYNOPSIS
-       void bfd_set_reloc
+       void bfd_finalize_section_relocs
          (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
 
 DESCRIPTION
-       Set the relocation pointer and count within
-       section @var{sec} to the values @var{rel} and @var{count}.
-       The argument @var{abfd} is ignored.
-
-.#define bfd_set_reloc(abfd, asect, location, count) \
-.      BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
+       Set the relocation pointer and count within section @var{sec}
+       to the values @var{rel} and @var{count}, and take any other
+       actions required at the conclusion of section relocation
+       processing.
+
+.#define bfd_finalize_section_relocs(abfd, asect, location, count) \
+.      BFD_SEND (abfd, _bfd_finalize_section_relocs, \
+.                (abfd, asect, location, count))
 */
 
 /*
index f5089ef0e9609a160e13b9fe346e89af91f7858d..b57ca2b32f625f39f0643f4433d97912e4e86f6a 100644 (file)
@@ -2423,7 +2423,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
 #define _bfd_ecoff_bfd_link_check_relocs    _bfd_generic_link_check_relocs
 
 /* Installing internal relocations in a section is also generic.  */
-#define _bfd_ecoff_set_reloc _bfd_generic_set_reloc
+#define _bfd_ecoff_finalize_section_relocs _bfd_generic_finalize_section_relocs
 
 const bfd_target alpha_ecoff_le_vec =
 {
index fb8e6112265fe7e997455a661811609b4343c274..85abe9f4360e4ff59355d37c6194d8dd18944370 100644 (file)
@@ -1412,7 +1412,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
 #define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol
 #define _bfd_ecoff_bfd_link_hide_symbol _bfd_generic_link_hide_symbol
 #define _bfd_ecoff_bfd_define_start_stop bfd_generic_define_start_stop
-#define _bfd_ecoff_set_reloc _bfd_generic_set_reloc
+#define _bfd_ecoff_finalize_section_relocs _bfd_generic_finalize_section_relocs
 
 extern const bfd_target mips_ecoff_be_vec;
 
index 74c5bb43cd53b484dfc5b19bb810f62ae520b90e..7f3a23766ab65deb4f2c8a283d3ff77972b8b9b9 100644 (file)
@@ -4506,7 +4506,7 @@ coff_find_nearest_line_with_alt
 /* For reloc entry points.  */
 #define _bfd_xcoff_get_reloc_upper_bound coff_get_reloc_upper_bound
 #define _bfd_xcoff_canonicalize_reloc coff_canonicalize_reloc
-#define _bfd_xcoff_set_reloc _bfd_generic_set_reloc
+#define _bfd_xcoff_finalize_section_relocs _bfd_generic_finalize_section_relocs
 #define _bfd_xcoff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
 #define _bfd_xcoff_bfd_reloc_name_lookup _bfd_xcoff_reloc_name_lookup
 
index f03412a5afbca2fff733370d45086028dcf749aa..65159cb10bcd05998a5037e1229ae3fc69231952 100644 (file)
@@ -2665,7 +2665,7 @@ const bfd_target rs6000_xcoff64_vec =
     /* Reloc */
     coff_get_reloc_upper_bound,
     coff_canonicalize_reloc,
-    _bfd_generic_set_reloc,
+    _bfd_generic_finalize_section_relocs,
     xcoff64_reloc_type_lookup,
     xcoff64_reloc_name_lookup,
 
@@ -2935,7 +2935,7 @@ const bfd_target rs6000_xcoff64_aix_vec =
     /* Reloc */
     coff_get_reloc_upper_bound,
     coff_canonicalize_reloc,
-    _bfd_generic_set_reloc,
+    _bfd_generic_finalize_section_relocs,
     xcoff64_reloc_type_lookup,
     xcoff64_reloc_name_lookup,
 
index 95fc608b42909d5de2961596bc9fddf7efc771d9..7439fca676369791c34150a6d053cd8079aa5795 100644 (file)
@@ -5431,8 +5431,8 @@ coff_canonicalize_reloc (bfd * abfd,
   return section->reloc_count;
 }
 
-#ifndef coff_set_reloc
-#define coff_set_reloc _bfd_generic_set_reloc
+#ifndef coff_finalize_section_relocs
+#define coff_finalize_section_relocs _bfd_generic_finalize_section_relocs
 #endif
 
 #ifndef coff_reloc16_estimate
index 16de1562bd8a6f46ea273ef226404ea9be2676d3..2a192ddabc91bd1839e859c3411d1778b3ad1aab 100644 (file)
@@ -315,10 +315,10 @@ elf64_sparc_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage,
 /* Install a new set of internal relocs.  */
 
 static void
-elf64_sparc_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
-                      asection *asect,
-                      arelent **location,
-                      unsigned int count)
+elf64_sparc_finalize_section_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+                                    asection *asect,
+                                    arelent **location,
+                                    unsigned int count)
 {
   asect->orelocation = location;
   canon_reloc_count (asect) = count;
@@ -908,8 +908,8 @@ static const struct elf_size_info elf64_sparc_size_info =
   elf64_sparc_canonicalize_reloc
 #define bfd_elf64_canonicalize_dynamic_reloc \
   elf64_sparc_canonicalize_dynamic_reloc
-#define bfd_elf64_set_reloc \
-  elf64_sparc_set_reloc
+#define bfd_elf64_finalize_section_relocs \
+  elf64_sparc_finalize_section_relocs
 #define elf_backend_add_symbol_hook \
   elf64_sparc_add_symbol_hook
 #define elf_backend_get_symbol_type \
index 48fb3082e8e6c3a8d7ee68f975793eced92cdfa0..c190dd3235377537bad30613af8a9599bbfe3cad 100644 (file)
@@ -46,8 +46,8 @@
 #ifndef bfd_elfNN_canonicalize_reloc
 #define bfd_elfNN_canonicalize_reloc   _bfd_elf_canonicalize_reloc
 #endif
-#ifndef bfd_elfNN_set_reloc
-#define bfd_elfNN_set_reloc            _bfd_generic_set_reloc
+#ifndef bfd_elfNN_finalize_section_relocs
+#define bfd_elfNN_finalize_section_relocs _bfd_generic_finalize_section_relocs
 #endif
 #ifndef bfd_elfNN_find_nearest_line
 #define bfd_elfNN_find_nearest_line    _bfd_elf_find_nearest_line
index 571988e02bfee337894d604614ca0f9e74d7d0b7..f19e2afabed85cf21d9595e6223207e4bb72167f 100644 (file)
@@ -260,7 +260,7 @@ msdos_set_section_contents (bfd *abfd,
 #define msdos_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
 
 #define msdos_canonicalize_reloc _bfd_norelocs_canonicalize_reloc
-#define msdos_set_reloc _bfd_norelocs_set_reloc
+#define msdos_finalize_section_relocs _bfd_norelocs_finalize_section_relocs
 #define msdos_get_reloc_upper_bound _bfd_norelocs_get_reloc_upper_bound
 #define msdos_32_bfd_link_split_section  _bfd_generic_link_split_section
 
index 870bd6f3de44f6ea1d271c739cd17df38cbe0ad7..b9a1ca44224a80b7c50fd4dece0476f58f42149c 100644 (file)
@@ -447,7 +447,7 @@ extern long _bfd_norelocs_get_reloc_upper_bound
   (bfd *, asection *) ATTRIBUTE_HIDDEN;
 extern long _bfd_norelocs_canonicalize_reloc
   (bfd *, asection *, arelent **, asymbol **) ATTRIBUTE_HIDDEN;
-extern void _bfd_norelocs_set_reloc
+extern void _bfd_norelocs_finalize_section_relocs
   (bfd *, asection *, arelent **, unsigned int) ATTRIBUTE_HIDDEN;
 extern reloc_howto_type *_bfd_norelocs_bfd_reloc_type_lookup
   (bfd *, bfd_reloc_code_real_type) ATTRIBUTE_HIDDEN;
index 0520602ae2c5c375c223b43188555456c4a93351..8be826653424ae04de179b395c40cc28ebd9ff2e 100644 (file)
@@ -200,10 +200,10 @@ _bfd_norelocs_canonicalize_reloc (bfd *abfd ATTRIBUTE_UNUSED,
 }
 
 void
-_bfd_norelocs_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
-                        asection *sec ATTRIBUTE_UNUSED,
-                        arelent **relptr ATTRIBUTE_UNUSED,
-                        unsigned int count ATTRIBUTE_UNUSED)
+_bfd_norelocs_finalize_section_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+                                      asection *sec ATTRIBUTE_UNUSED,
+                                      arelent **relptr ATTRIBUTE_UNUSED,
+                                      unsigned int count ATTRIBUTE_UNUSED)
 {
   /* Do nothing.  */
 }
index bc6ca4f14bb47a543d659ed5c11fdc4d6bf44f7c..5d39478523659b05eb94ca5a2066a4ef96fca8a3 100644 (file)
@@ -453,7 +453,7 @@ extern long _bfd_norelocs_get_reloc_upper_bound
   (bfd *, asection *) ATTRIBUTE_HIDDEN;
 extern long _bfd_norelocs_canonicalize_reloc
   (bfd *, asection *, arelent **, asymbol **) ATTRIBUTE_HIDDEN;
-extern void _bfd_norelocs_set_reloc
+extern void _bfd_norelocs_finalize_section_relocs
   (bfd *, asection *, arelent **, unsigned int) ATTRIBUTE_HIDDEN;
 extern reloc_howto_type *_bfd_norelocs_bfd_reloc_type_lookup
   (bfd *, bfd_reloc_code_real_type) ATTRIBUTE_HIDDEN;
@@ -3530,7 +3530,7 @@ bfd_byte *bfd_generic_get_relocated_section_contents
     bool relocatable,
     asymbol **symbols) ATTRIBUTE_HIDDEN;
 
-void _bfd_generic_set_reloc
+void _bfd_generic_finalize_section_relocs
    (bfd *abfd,
     sec_ptr section,
     arelent **relptr,
index c0b8a399bcc5949ada16c8aee84312beaaae1463..e1d81d2c0d99654ec7af4b844b84b4457d180461 100644 (file)
@@ -58,7 +58,7 @@
 #define bfd_mach_o_bfd_copy_private_bfd_data         _bfd_generic_bfd_copy_private_bfd_data
 #define bfd_mach_o_core_file_matches_executable_p     generic_core_file_matches_executable_p
 #define bfd_mach_o_core_file_pid                     _bfd_nocore_core_file_pid
-#define bfd_mach_o_set_reloc                         _bfd_generic_set_reloc
+#define bfd_mach_o_finalize_section_relocs           _bfd_generic_finalize_section_relocs
 
 #define bfd_mach_o_get_dynamic_symtab_upper_bound     bfd_mach_o_get_symtab_upper_bound
 #define bfd_mach_o_canonicalize_dynamic_symtab       bfd_mach_o_canonicalize_symtab
index e3a9a1a9683bca30568e3bdf9971c3437373d116..aea90fbc32761ab457a43f9e7a8aa37290b8095c 100644 (file)
@@ -8362,10 +8362,10 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
 
 /*
 INTERNAL_FUNCTION
-       _bfd_generic_set_reloc
+       _bfd_generic_finalize_section_relocs
 
 SYNOPSIS
-       void _bfd_generic_set_reloc
+       void _bfd_generic_finalize_section_relocs
          (bfd *abfd,
           sec_ptr section,
           arelent **relptr,
@@ -8376,10 +8376,10 @@ DESCRIPTION
 */
 
 void
-_bfd_generic_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
-                       sec_ptr section,
-                       arelent **relptr,
-                       unsigned int count)
+_bfd_generic_finalize_section_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+                                     sec_ptr section,
+                                     arelent **relptr,
+                                     unsigned int count)
 {
   section->orelocation = relptr;
   section->reloc_count = count;
index 4648f771fcf674dda811f3c538b8aff41d07b7c9..d256a6629f6c1b07939233bc8510ce1cb012deef 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -6789,7 +6789,7 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
 #define som_bfd_set_private_flags              _bfd_generic_bfd_set_private_flags
 #define som_find_inliner_info                  _bfd_nosymbols_find_inliner_info
 #define som_bfd_link_check_relocs              _bfd_generic_link_check_relocs
-#define som_set_reloc                          _bfd_generic_set_reloc
+#define som_finalize_section_relocs            _bfd_generic_finalize_section_relocs
 
 const bfd_target hppa_som_vec =
 {
index 9b1b5b3350dffc4c9ddfd102d53f92747dcccf51..864ff625f55fb1db04dc143a94c66a4c7f8fe7a1 100644 (file)
@@ -431,14 +431,15 @@ BFD_JUMP_TABLE macros.
 .#define BFD_JUMP_TABLE_RELOCS(NAME) \
 .  NAME##_get_reloc_upper_bound, \
 .  NAME##_canonicalize_reloc, \
-.  NAME##_set_reloc, \
+.  NAME##_finalize_section_relocs, \
 .  NAME##_bfd_reloc_type_lookup, \
 .  NAME##_bfd_reloc_name_lookup
 .
 .  long        (*_get_reloc_upper_bound) (bfd *, sec_ptr);
 .  long        (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
 .                                  struct bfd_symbol **);
-.  void        (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
+.  void        (*_bfd_finalize_section_relocs) (bfd *, sec_ptr, arelent **,
+.                                       unsigned int);
 .  {* See documentation on reloc types.  *}
 .  reloc_howto_type *
 .      (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
index c199dda1c54f53cb8765368199d652534c97efcc..b17c255e8331398acdbab7efd1766b042c2ffdda 100644 (file)
@@ -5652,7 +5652,7 @@ alpha_vms_canonicalize_reloc (bfd *abfd, asection *section, arelent **relptr,
 
 /* Install a new set of internal relocs.  */
 
-#define alpha_vms_set_reloc _bfd_generic_set_reloc
+#define alpha_vms_finalize_section_relocs _bfd_generic_finalize_section_relocs
 
 \f
 /* This is just copied from ecoff-alpha, needs to be fixed probably.  */
index 7aef75f63ba8df7c2eae2ea0afdd7c18432c2b5e..aea69ba886a9c3985c2560983671320095250ff3 100644 (file)
@@ -4555,7 +4555,7 @@ copy_relocations_in_section (bfd *ibfd, sec_ptr isection, bfd *obfd)
     }
 
   if (relsize == 0)
-    bfd_set_reloc (obfd, osection, NULL, 0);
+    bfd_finalize_section_relocs (obfd, osection, NULL, 0);
   else
     {
       if (isection->orelocation != NULL)
@@ -4596,7 +4596,8 @@ copy_relocations_in_section (bfd *ibfd, sec_ptr isection, bfd *obfd)
          *w_relpp = 0;
        }
 
-      bfd_set_reloc (obfd, osection, relcount == 0 ? NULL : relpp, relcount);
+      bfd_finalize_section_relocs (obfd, osection,
+                                  relcount == 0 ? NULL : relpp, relcount);
     }
   return true;
 }
index 4088f20d50fe7d6238ab3cdaef02456c542a9007..afeadf161c1b8446710b9ca07c25ce8c04b26e49 100644 (file)
@@ -685,7 +685,7 @@ write_coff_file (const char *filename, const char *target,
       return false;
     }
 
-  bfd_set_reloc (abfd, sec, cwi.relocs, cwi.reloc_count);
+  bfd_finalize_section_relocs (abfd, sec, cwi.relocs, cwi.reloc_count);
 
   offset = 0;
   for (d = cwi.dirs.d; d != NULL; d = d->next)
index 3972951c2984fffa9adad68ebb36a0384048e658..b01ef97576389c6adbd4f46c301475b6f79af231 100644 (file)
@@ -1493,7 +1493,7 @@ coff_adjust_section_syms (bfd *abfd ATTRIBUTE_UNUSED,
 
   secsym = section_symbol (sec);
   /* This is an estimate; we'll plug in the real value using
-     SET_SECTION_RELOCS later */
+     FINALIZE_SECTION_RELOCS later */
 #ifdef OBJ_XCOFF
   if (S_GET_STORAGE_CLASS (secsym) == C_DWARF)
     SA_SET_SECT_NRELOC (secsym, nrelocs);
@@ -1518,11 +1518,12 @@ coff_frob_file_after_relocs (void)
    in its aux entry.  */
 
 void
-obj_coff_set_section_relocs (asection *sec, arelent **relocs, unsigned int n)
+obj_coff_finalize_section_relocs (asection *sec, arelent **relocs,
+                                 unsigned int n)
 {
   symbolS *sect_sym;
 
-  bfd_set_reloc (stdoutput, sec, n ? relocs : NULL, n);
+  bfd_finalize_section_relocs (stdoutput, sec, n ? relocs : NULL, n);
   sect_sym = section_symbol (sec);
 #ifdef OBJ_XCOFF
   if (S_GET_STORAGE_CLASS (sect_sym) == C_DWARF)
index 0e64a8aed3f372fe8ede023f986781ff860d7abf..8fb39dbfcd2854386bb46e2ba449c66761945c67 100644 (file)
@@ -294,9 +294,10 @@ extern void coff_pop_insert (void);
 #define INIT_STAB_SECTION(stab, str) obj_coff_init_stab_section (stab, str)
 
 /* We need to store the number of relocations in the section aux entry.  */
-#define SET_SECTION_RELOCS(sec, relocs, n) \
-  obj_coff_set_section_relocs (sec, relocs, n)
-extern void obj_coff_set_section_relocs (asection *, arelent **, unsigned int);
+#define FINALIZE_SECTION_RELOCS(sec, relocs, n) \
+  obj_coff_finalize_section_relocs (sec, relocs, n)
+extern void obj_coff_finalize_section_relocs (asection *, arelent **,
+                                             unsigned int);
 
 extern int  S_SET_DATA_TYPE              (symbolS *, int);
 extern int  S_SET_STORAGE_CLASS          (symbolS *, int);
index cf89f1f54056ba10205eab8c112123438505692a..06ace7a0756c2f31e5ff9de16eb4b93cf4ac7293 100644 (file)
@@ -1891,7 +1891,7 @@ obj_mach_o_reorder_section_relocs (asection *sec, arelent **rels, unsigned int n
       rels[i] = rels[n - i - 1];
       rels[n - i - 1] = r;
     }
-  bfd_set_reloc (stdoutput, sec, rels, n);
+  bfd_finalize_section_relocs (stdoutput, sec, rels, n);
 }
 
 /* Relocation rules are different in frame sections.  */
index a0e3624543257fc930413187ddee5b5439f8a109..40dd9fb0c1572da30c4fd8d5d083138d0ad5edd4 100644 (file)
@@ -99,7 +99,7 @@ extern void obj_mach_o_post_relax_hook (void);
 #define obj_frob_file_after_relocs obj_mach_o_frob_file_after_relocs
 extern void obj_mach_o_frob_file_after_relocs (void);
 
-#define SET_SECTION_RELOCS(sec, relocs, n) \
+#define FINALIZE_SECTION_RELOCS(sec, relocs, n) \
   obj_mach_o_reorder_section_relocs (sec, relocs, n)
 extern void obj_mach_o_reorder_section_relocs (asection *, arelent **,
                                               unsigned int);
index 981f864fce8f2734b2f3273b7a82dec46ddeced8..f840efa7a8ca30fccb3dec78c914d6ac15fe4c8b 100644 (file)
@@ -1697,9 +1697,9 @@ completed, but before the relocations have been generated.
 If you define this macro, GAS will call it after the relocs have been
 generated.
 
-@item SET_SECTION_RELOCS (@var{sec}, @var{relocs}, @var{n})
-@cindex SET_SECTION_RELOCS
-If you define this, it will be called to set relocations for the section
+@item FINALIZE_SECTION_RELOCS (@var{sec}, @var{relocs}, @var{n})
+@cindex FINALIZE_SECTION_RELOCS
+If you define this, it will be called to finalize relocations for the section
 @var{sec}.  The list of relocations is in @var{relocs}, and the number of
 relocations is in @var{n}.
 @end table
index 8869461e3059c1e2dcb925e4e7a37a1306c8ee71..b3427145571283f5ce09c2a077c2227e29cd7b69 100644 (file)
@@ -28,9 +28,9 @@
 #include "compress-debug.h"
 #include "codeview.h"
 
-#ifndef SET_SECTION_RELOCS
-#define SET_SECTION_RELOCS(sec, relocs, n)     \
-  bfd_set_reloc (stdoutput, sec, n ? relocs : NULL, n)
+#ifndef FINALIZE_SECTION_RELOCS
+#define FINALIZE_SECTION_RELOCS(sec, relocs, n)        \
+  bfd_finalize_section_relocs (stdoutput, sec, n ? relocs : NULL, n)
 #endif
 
 #ifndef TC_FORCE_RELOCATION
@@ -1419,7 +1419,7 @@ write_relocs (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
   }
 #endif
 
-  SET_SECTION_RELOCS (sec, relocs, n);
+  FINALIZE_SECTION_RELOCS (sec, relocs, n);
 
 #ifdef DEBUG3
   {
index c1c60b3f47419cfb608e5961eae3aafbb20fc1c0..c5a128072ed5c68551863470638d14e5c81ec132 100644 (file)
@@ -10640,7 +10640,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *p)
     }
 
   if (relsize == 0)
-    bfd_set_reloc (obfd, osection, NULL, 0);
+    bfd_finalize_section_relocs (obfd, osection, NULL, 0);
   else
     {
       relpp = (arelent **) xmalloc (relsize);
@@ -10651,8 +10651,8 @@ copy_section (bfd *ibfd, sec_ptr isection, void *p)
          goto loser;
        }
 
-      bfd_set_reloc (obfd, osection,
-                    relcount == 0 ? NULL : relpp, relcount);
+      bfd_finalize_section_relocs (obfd, osection,
+                                  relcount == 0 ? NULL : relpp, relcount);
       if (relcount == 0)
        free (relpp);
     }