]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 33453 backend_finish_dynamic_sections final link buffer
authorAlan Modra <amodra@gmail.com>
Wed, 26 Nov 2025 22:31:31 +0000 (09:01 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 26 Nov 2025 22:41:56 +0000 (09:11 +1030)
This adds a pointer parameter to backend_finish_dynamic_sections, to
give the function access to the final link section contents buffer.
The patch is entirely mechanical changes in preparation for the next
patch.  No use is made of the buffer here.

52 files changed:
bfd/elf-bfd.h
bfd/elf-m10300.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-bfin.c
bfd/elf32-cr16.c
bfd/elf32-cris.c
bfd/elf32-csky.c
bfd/elf32-frv.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68k.c
bfd/elf32-metag.c
bfd/elf32-microblaze.c
bfd/elf32-nds32.c
bfd/elf32-or1k.c
bfd/elf32-ppc.c
bfd/elf32-rl78.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score.h
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-vax.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfnn-kvx.c
bfd/elfnn-loongarch.c
bfd/elfnn-riscv.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h
bfd/elfxx-sparc.c
bfd/elfxx-sparc.h
bfd/elfxx-tilegx.c
bfd/elfxx-tilegx.h
bfd/elfxx-x86.c
bfd/elfxx-x86.h

index b0f16fd187116b6279b740748b5cbb8ca7e42ee5..d1368ece9016a11f44950b3ec91dcc9e349357c5 100644 (file)
@@ -1305,7 +1305,7 @@ struct elf_backend_data
      output file.  The FINISH_DYNAMIC_SYMBOL will have been called on
      all dynamic symbols.  */
   bool (*elf_backend_finish_dynamic_sections)
-    (bfd *output_bfd, struct bfd_link_info *info);
+    (bfd *output_bfd, struct bfd_link_info *info, bfd_byte *);
 
   /* A function to do any beginning processing needed for the ELF file
      before building the ELF headers and computing file positions.  */
index c2ed6e87a9145675b4689da68c6064542b491a26..7ffc9d68711fd80cb1c5b075bb5ec0f12cbff994 100644 (file)
@@ -5336,8 +5336,9 @@ _bfd_mn10300_elf_finish_dynamic_symbol (bfd * output_bfd,
 /* Finish up the dynamic sections.  */
 
 static bool
-_bfd_mn10300_elf_finish_dynamic_sections (bfd * output_bfd,
-                                         struct bfd_link_info * info)
+_bfd_mn10300_elf_finish_dynamic_sections (bfd *output_bfd,
+                                         struct bfd_link_info *info,
+                                         bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *      dynobj;
   asection * sgot;
index b5c2d9bd1dac70677e8c0f7d7fd91228f04c2bc9..c1a9fb699a4189920d381ab0d0888d46db439219 100644 (file)
@@ -2580,7 +2580,8 @@ arc_create_forced_local_got_entries_for_tls (struct bfd_hash_entry *bh,
 
 static bool
 elf_arc_finish_dynamic_sections (bfd * output_bfd,
-                                struct bfd_link_info *info)
+                                struct bfd_link_info *info,
+                                bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_link_hash_table *htab = elf_hash_table (info);
   bfd *dynobj = (elf_hash_table (info))->dynobj;
index 16a7544bf17523bf74b777f709097546d9faaddd..24dde624d55836a792f7da572e7710146e43b1e2 100644 (file)
@@ -17217,7 +17217,8 @@ arm_put_trampoline (struct elf32_arm_link_hash_table *htab, bfd *output_bfd,
 /* Finish up the dynamic sections.  */
 
 static bool
-elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info)
+elf32_arm_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd * dynobj;
   asection * sgot;
index a3f66ab138e04b45d65ca307e8b49ba834659a9f..279e31b56c6e56e457d0009b0b8b6afb6f170235 100644 (file)
@@ -4218,7 +4218,8 @@ bfinfdpic_elf_discard_info (bfd *ibfd,
 
 static bool
 elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd,
-                                       struct bfd_link_info *info)
+                                        struct bfd_link_info *info,
+                                        bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
@@ -4861,7 +4862,8 @@ bfin_link_hash_table_create (bfd * abfd)
 
 static bool
 bfin_finish_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
-                             struct bfd_link_info *info)
+                             struct bfd_link_info *info,
+                             bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 9ddf654078c62343780df12d39da6c8941104303..06ba71ac1c4422540b4f40f5a20e1af4209f3f87 100644 (file)
@@ -2579,8 +2579,9 @@ _bfd_cr16_elf_finish_dynamic_symbol (bfd * output_bfd,
 /* Finish up the dynamic sections.  */
 
 static bool
-_bfd_cr16_elf_finish_dynamic_sections (bfd * output_bfd,
-                                      struct bfd_link_info * info)
+_bfd_cr16_elf_finish_dynamic_sections (bfd *output_bfd,
+                                      struct bfd_link_info *info,
+                                      bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *      dynobj;
   asection * sgot;
index 7d90b836e353adab7108a4924c405897b3cee5f0..463ac32f3ead621cc482d9cbffc450e743866783 100644 (file)
@@ -2310,7 +2310,8 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 elf_cris_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sgot;
index 239cf72fdb060de11df01660efb1023b08661f9d..d648ed5b9606cb373d463073553e9e6b1ca22191 100644 (file)
@@ -2272,7 +2272,8 @@ csky_elf_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 csky_elf_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct csky_elf_link_hash_table *htab;
   bfd *dynobj;
index 7dd354b8eac37c9a4a0620460334e3890184a47e..5a0c3e67834760043cbcbbccaa3e5878d9504f86 100644 (file)
@@ -5685,7 +5685,8 @@ elf32_frvfdpic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
 
 static bool
 elf32_frv_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-                                  struct bfd_link_info *info ATTRIBUTE_UNUSED)
+                                  struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   /* Nothing to be done for non-FDPIC.  */
   return true;
@@ -5693,7 +5694,8 @@ elf32_frv_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
 static bool
 elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd,
-                                       struct bfd_link_info *info)
+                                       struct bfd_link_info *info,
+                                       bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 4721cad619a2d92f59e91332665d274b2d5997c7..daafff74f82cabd0c71c318fb8f912abbd7edbe3 100644 (file)
@@ -4369,7 +4369,8 @@ elf32_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 
 static bool
 elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   struct elf32_hppa_link_hash_table *htab;
index c88713344274780e70da8bc1f8d1d3392df0a1ac..abb361be993986d0f4121840fcf94d34ed7bfa7a 100644 (file)
@@ -4137,11 +4137,12 @@ elf_i386_reloc_type_class (const struct bfd_link_info *info,
 
 static bool
 elf_i386_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf)
 {
   struct elf_x86_link_hash_table *htab;
 
-  htab = _bfd_x86_elf_finish_dynamic_sections (output_bfd, info);
+  htab = _bfd_x86_elf_finish_dynamic_sections (output_bfd, info, buf);
   if (htab == NULL)
     return false;
 
index ec916aaf1b40682cfbefc076f610af6e60ba9240..71978065b9591869fb91db7c07cea6806ee658fe 100644 (file)
@@ -1257,7 +1257,8 @@ lm32_elf_check_relocs (bfd *abfd,
 
 static bool
 lm32_elf_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_lm32_link_hash_table *htab;
   bfd *dynobj;
index 93cd2d525d912a4518d1f097f57765eb5841a3a3..bbc1225178e29bc78db2f36556529bd2012ece3d 100644 (file)
@@ -751,7 +751,8 @@ m32c_elf_check_relocs
 
 static bool
 m32c_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj = elf_hash_table (info)->dynobj;
   asection *splt = elf_hash_table (info)->splt;
index f21939bf774a0fa9ecfa334c9f9381501b4353e2..02a563efacfd2c3ed952d83eeb8c76c835c8996a 100644 (file)
@@ -3067,7 +3067,8 @@ m32r_elf_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 m32r_elf_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_link_hash_table *htab;
   bfd *dynobj;
index 41bc5aef0aa3a26d96c1049c26c8c4593fb23680..efe98b59f39dac08ffb4befa97de976d049e122a 100644 (file)
@@ -4270,7 +4270,8 @@ elf_m68k_finish_dynamic_symbol (bfd *output_bfd,
 /* Finish up the dynamic sections.  */
 
 static bool
-elf_m68k_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+elf_m68k_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sgot;
index ca95aad17e8464b07f0057c06110442cf116274a..65a9e6f44a1a8edf746d6913c383d87f2d604be0 100644 (file)
@@ -3104,7 +3104,8 @@ elf_metag_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 
 static bool
 elf_metag_finish_dynamic_sections (bfd *output_bfd,
-                                  struct bfd_link_info *info)
+                                  struct bfd_link_info *info,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   struct elf_metag_link_hash_table *htab;
index ede21310cf2750849666638096843c6a5ff589f7..e13383963adb7fc0b1f9afc5ce3ca70ff5753e2e 100644 (file)
@@ -3320,7 +3320,8 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 microblaze_elf_finish_dynamic_sections (bfd *output_bfd,
-                                       struct bfd_link_info *info)
+                                       struct bfd_link_info *info,
+                                       bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn, *sgot;
index 2341939e2a7ce8ec62210f6c76c7da8a85667fb4..acfc659773d475b60c7224586617f9e37160bfa6 100644 (file)
@@ -6344,7 +6344,8 @@ nds32_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
 /* Finish up the dynamic sections.  */
 
 static bool
-nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 10abd878c1c5cb3667536533f14adba677ff8c25..e6e25a875d41bce63ef49468142d2bb201abff09 100644 (file)
@@ -2320,7 +2320,8 @@ or1k_write_plt_entry (bfd *output_bfd, bfd_byte *contents, unsigned insnj,
 
 static bool
 or1k_elf_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn, *sgot;
index dd094357c1c5116acaffb0f966c18eb0a0030560..6ed220d572c5a4a1adbdaadbf86e1e4cd069a1d6 100644 (file)
@@ -9920,7 +9920,8 @@ ppc_elf_reloc_type_class (const struct bfd_link_info *info,
 
 static bool
 ppc_elf_finish_dynamic_sections (bfd *output_bfd,
-                                struct bfd_link_info *info)
+                                struct bfd_link_info *info,
+                                bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   asection *sdyn;
   struct ppc_elf_link_hash_table *htab;
index b44fabbcdbedc547a06d5bfd7f7f9875f1272f5c..16897ccad9029793c771008b790b2ef533dda16d 100644 (file)
@@ -1409,7 +1409,8 @@ rl78_elf_check_relocs
 
 static bool
 rl78_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *splt;
index b53d1a49dd3eb6b4f53344e89cf3c99c27931cf5..5e0c783b39aabff1674f77e984353d08e6f90f1b 100644 (file)
@@ -3610,7 +3610,8 @@ elf_s390_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 
 static bool
 elf_s390_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_s390_link_hash_table *htab;
   bfd *dynobj;
index 7084e4d9f4f6e3e063d2b76dde0bb17290142dea..684144f39a6def8040fe20bd19b063aab6f325db 100644 (file)
@@ -3550,7 +3550,8 @@ s3_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd,
 /* Finish up the dynamic sections.  */
 static bool
 s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd,
-                                         struct bfd_link_info *info)
+                                         struct bfd_link_info *info,
+                                         bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
@@ -4216,12 +4217,13 @@ _bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd,
-                                       struct bfd_link_info *info)
+                                       struct bfd_link_info *info,
+                                       bfd_byte *buf)
 {
   if (bfd_get_mach (output_bfd) == bfd_mach_score3)
-    return s3_bfd_score_elf_finish_dynamic_sections (output_bfd, info);
+    return s3_bfd_score_elf_finish_dynamic_sections (output_bfd, info, buf);
   else
-    return s7_bfd_score_elf_finish_dynamic_sections (output_bfd, info);
+    return s7_bfd_score_elf_finish_dynamic_sections (output_bfd, info, buf);
 }
 
 static bool
index 0dee807c9c13c51467f29b882b33620351f3520d..b982ed9babfdf821b5fed087411cedd1cf29571e 100644 (file)
@@ -99,8 +99,8 @@ s7_bfd_score_elf_finish_dynamic_symbol (bfd *,
                                        Elf_Internal_Sym *) ATTRIBUTE_HIDDEN;
 
 extern bool
-s7_bfd_score_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *)
-  ATTRIBUTE_HIDDEN;
+s7_bfd_score_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *,
+                                         bfd_byte *) ATTRIBUTE_HIDDEN;
 
 extern bool
 s7_bfd_score_elf_fake_sections (bfd *,
index eb8b1eb15aab517168e789e7ac708546ed4c3a88..a74c7279bce56f4679baf52aeef0525060481f2b 100644 (file)
@@ -3362,7 +3362,8 @@ s7_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd,
 
 bool
 s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd,
-                                         struct bfd_link_info *info)
+                                         struct bfd_link_info *info,
+                                         bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index da00593e96d76cee2873240b7a38b1768832d429..7df228de591237b25000b98b1da606d631e21333 100644 (file)
@@ -6245,7 +6245,8 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
 /* Finish up the dynamic sections.  */
 
 static bool
-sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info,
+                               bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_sh_link_hash_table *htab;
   asection *sgotplt;
index adea6d0d51cbb71328edb4e423abd9b1151ef970..00cf73fd10843d80e9af6760e8337b91778bae2b 100644 (file)
@@ -5135,7 +5135,8 @@ spu_elf_relocate_section (bfd *output_bfd,
 
 static bool
 spu_elf_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-                                struct bfd_link_info *info ATTRIBUTE_UNUSED)
+                                struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                                bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   return true;
 }
index 564bb72b3e89403638ce0e2cb0987d729be35e2c..c3a434ef83b4ebc58eebe1e1d12b8779c090d281 100644 (file)
@@ -3362,7 +3362,8 @@ elf32_tic6x_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
 
 static bool
 elf32_tic6x_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-                                    struct bfd_link_info *info)
+                                    struct bfd_link_info *info,
+                                    bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf32_tic6x_link_hash_table *htab;
   bfd *dynobj;
index 05746e9d6b69a5daa57b1c27ab0b33336b7c054f..63aa148bc806b0351c3c58c89edaed2aa46ffa6d 100644 (file)
@@ -3581,7 +3581,8 @@ tilepro_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
 
 static bool
 tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
-                                    struct bfd_link_info *info)
+                                    struct bfd_link_info *info,
+                                    bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 8d5c18d00f8af996666144a8007344550c22b8d4..0d0bb0d8b15fb7efec2165f37eeefac53be8ecc9 100644 (file)
@@ -43,7 +43,8 @@ static int elf_vax_relocate_section (bfd *, struct bfd_link_info *,
 static bool elf_vax_finish_dynamic_symbol (bfd *, struct bfd_link_info *,
                                           struct elf_link_hash_entry *,
                                           Elf_Internal_Sym *);
-static bool elf_vax_finish_dynamic_sections (bfd *, struct bfd_link_info *);
+static bool elf_vax_finish_dynamic_sections (bfd *, struct bfd_link_info *,
+                                            bfd_byte *);
 static bfd_vma elf_vax_plt_sym_val (bfd_vma, const asection *,
                                    const arelent *);
 
@@ -1733,7 +1734,8 @@ elf_vax_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
 /* Finish up the dynamic sections.  */
 
 static bool
-elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info,
+                                bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sgot;
index 471eb2e6c91acffb5dc3304a5f1c09c817c6afa0..7f330eb374848435efb1253d3e9783497f3d8ddd 100644 (file)
@@ -958,7 +958,8 @@ xstormy16_elf_relocate_section (bfd *                       output_bfd ATTRIBUTE_UNUSED,
 
 static bool
 xstormy16_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
-                                      struct bfd_link_info *info)
+                                      struct bfd_link_info *info,
+                                      bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj = elf_hash_table (info)->dynobj;
   asection *splt = elf_hash_table (info)->splt;
index 20b6292c14ec3288c4d9d60d1ff2d975ccb8f5e0..403e218a3b32d875ac1cda4f678e8bbe17814173 100644 (file)
@@ -3215,7 +3215,8 @@ elf_xtensa_combine_prop_entries (bfd *output_bfd,
 
 static bool
 elf_xtensa_finish_dynamic_sections (bfd *output_bfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_xtensa_link_hash_table *htab;
   bfd *dynobj;
index 077539bdcfd62ceeae72b3695988d26d4c24d705..932f65df07c1ec95689c564fb3f6c9cfb082b603 100644 (file)
@@ -4905,7 +4905,8 @@ elf64_alpha_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
 
 static bool
 elf64_alpha_finish_dynamic_sections (bfd *output_bfd,
-                                    struct bfd_link_info *info)
+                                    struct bfd_link_info *info,
+                                    bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index befe6fc3a5b9db10768ac5f2947f7d8cfcc7e986..026c8a609562dd9438abb1613b2e14a77db24ae0 100644 (file)
@@ -192,7 +192,7 @@ static bool elf64_hppa_finish_dynamic_symbol
    struct elf_link_hash_entry *, Elf_Internal_Sym *);
 
 static bool elf64_hppa_finish_dynamic_sections
-  (bfd *, struct bfd_link_info *);
+  (bfd *, struct bfd_link_info *, bfd_byte *);
 
 static bool elf64_hppa_check_relocs
   (bfd *, struct bfd_link_info *,
@@ -2424,7 +2424,8 @@ elf64_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 
 static bool
 elf64_hppa_finish_dynamic_sections (bfd *output_bfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 538b7237c6b1f2b1bab2667775abf070c84802ef..74f1551fbdddffacee8cb676d79663b04303030c 100644 (file)
@@ -4054,7 +4054,8 @@ elf64_ia64_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 elf64_ia64_finish_dynamic_sections (bfd *abfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf64_ia64_link_hash_table *ia64_info;
   bfd *dynobj;
index 818609142ef3b833279fdcc936a7512fcd647543..48af990e9e4526cc3e7e2c9265edacb020b863a8 100644 (file)
@@ -18248,7 +18248,8 @@ ppc64_elf_reloc_type_class (const struct bfd_link_info *info,
 
 static bool
 ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
-                                  struct bfd_link_info *info)
+                                  struct bfd_link_info *info,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct ppc_link_hash_table *htab;
   bfd *dynobj;
index 5df77f2fe88dca898957ba69a190504b9df7159a..decd742a8d5431c8a4938ca88f6cdf4d1bb587fe 100644 (file)
@@ -3841,7 +3841,8 @@ elf_s390_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 
 static bool
 elf_s390_finish_dynamic_sections (bfd *output_bfd,
-                                 struct bfd_link_info *info)
+                                 struct bfd_link_info *info,
+                                 bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_s390_link_hash_table *htab;
   bfd *dynobj;
index 26c6f0efc4ce4ad50b84c9d6b6e1348188c7dddb..337394fc4786c3cd22b274bf52fe52b94cf4f95c 100644 (file)
@@ -5651,11 +5651,12 @@ elf_x86_64_reloc_type_class (const struct bfd_link_info *info,
 
 static bool
 elf_x86_64_finish_dynamic_sections (bfd *output_bfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf)
 {
   struct elf_x86_link_hash_table *htab;
 
-  htab = _bfd_x86_elf_finish_dynamic_sections (output_bfd, info);
+  htab = _bfd_x86_elf_finish_dynamic_sections (output_bfd, info, buf);
   if (htab == NULL)
     return false;
 
index fb975d918038f84daea3ed9b487e92204b9850a9..7a5f54b926f43876609171e5f6ec9b9f7b177e69 100644 (file)
@@ -13737,7 +13737,8 @@ _bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
   /* If we have created any dynamic sections, then output them.  */
   if (dynobj != NULL)
     {
-      if (! (*bed->elf_backend_finish_dynamic_sections) (abfd, info))
+      if (! (*bed->elf_backend_finish_dynamic_sections) (abfd, info,
+                                                        flinfo.contents))
        goto error_return;
 
       /* Check for DT_TEXTREL (late, in case the backend removes it).  */
index 89cf50bf2a77b5cdf7f735b5bc4b51bd1c4863dc..b104e40d1ab7955bd0553dc4c0f2db958953f582 100644 (file)
@@ -10219,7 +10219,8 @@ elfNN_aarch64_init_small_plt0_entry (bfd *output_bfd ATTRIBUTE_UNUSED,
 
 static bool
 elfNN_aarch64_finish_dynamic_sections (bfd *output_bfd,
-                                      struct bfd_link_info *info)
+                                      struct bfd_link_info *info,
+                                      bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_aarch64_link_hash_table *htab;
   bfd *dynobj;
index e0c3a8c9428a355ec1832d0112201982891a67bb..43113cabccf4549f33d749821c815d40e8c74637 100644 (file)
@@ -4597,7 +4597,8 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd,
 
 static bool
 elfNN_ia64_finish_dynamic_sections (bfd *abfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elfNN_ia64_link_hash_table *ia64_info;
   bfd *dynobj;
index 853ccfd0e95ae21c3ee28e4484699c264f0a3f3e..297785fe05de9384bcf7c189b6b7677f233b6e9c 100644 (file)
@@ -4548,7 +4548,8 @@ elfNN_kvx_init_small_plt0_entry (bfd *output_bfd ATTRIBUTE_UNUSED,
 
 static bool
 elfNN_kvx_finish_dynamic_sections (bfd *output_bfd,
-                                  struct bfd_link_info *info)
+                                  struct bfd_link_info *info,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_kvx_link_hash_table *htab;
   bfd *dynobj;
index a2d40a8e023e22d6957ea8021d81007ca42a8b14..ddb809760ab710189c49d9cd8f7b608102c5efd4 100644 (file)
@@ -6348,7 +6348,8 @@ elf_loongarch_output_arch_local_syms
 
 static bool
 loongarch_elf_finish_dynamic_sections (bfd *output_bfd,
-                                      struct bfd_link_info *info)
+                                      struct bfd_link_info *info,
+                                      bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn, *plt, *gotplt = NULL;
index a81a99014b3769f212d6037faad9745db0aa5aca..345b3bb96fd7fa8ecd893f4e8789876550558850 100644 (file)
@@ -3760,7 +3760,8 @@ riscv_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
 
 static bool
 riscv_elf_finish_dynamic_sections (bfd *output_bfd,
-                                  struct bfd_link_info *info)
+                                  struct bfd_link_info *info,
+                                  bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index b8809a4b1da08ebe57506e7c0063fc1548243459..e37c45fec15dc00ccbf254332c48cd50ad8bf843 100644 (file)
@@ -11929,7 +11929,8 @@ mips_vxworks_finish_shared_plt (bfd *output_bfd, struct bfd_link_info *info)
 
 bool
 _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
-                                      struct bfd_link_info *info)
+                                      struct bfd_link_info *info,
+                                      bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 33e02b7bb679bb31503c7768ec55f4d91d9c4dc5..55f8a964db903ca3459f5dd5aa0b6d7a3e40017a 100644 (file)
@@ -80,7 +80,7 @@ extern bool _bfd_mips_vxworks_finish_dynamic_symbol
   (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
    Elf_Internal_Sym *) ATTRIBUTE_HIDDEN;
 extern bool _bfd_mips_elf_finish_dynamic_sections
-  (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;
+  (bfd *, struct bfd_link_info *, bfd_byte *) ATTRIBUTE_HIDDEN;
 extern bool _bfd_mips_elf_sort_relocs_p
   (asection *) ATTRIBUTE_HIDDEN;
 extern void _bfd_mips_final_write_processing
index 0a80e7c7f5a4ef343941153b6677efebbc39a722..bd1dcf78b62428aefe2cca05fd736d8876ab4134 100644 (file)
@@ -4696,7 +4696,9 @@ pie_finish_undefweak_symbol (struct bfd_hash_entry *bh,
 }
 
 bool
-_bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+_bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd,
+                                       struct bfd_link_info *info,
+                                       bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index 26fec7566e81302dbcab677df4cb013488fc74c9..16abaa9a86b3a751e11fdfbe96d462c58019ec38 100644 (file)
@@ -127,7 +127,7 @@ extern bool _bfd_sparc_elf_finish_dynamic_symbol
   (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
    Elf_Internal_Sym *sym) ATTRIBUTE_HIDDEN;
 extern bool _bfd_sparc_elf_finish_dynamic_sections
-  (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;
+  (bfd *, struct bfd_link_info *, bfd_byte *) ATTRIBUTE_HIDDEN;
 extern bool _bfd_sparc_elf_fixup_symbol
   (struct bfd_link_info *, struct elf_link_hash_entry *) ATTRIBUTE_HIDDEN;
 extern bool _bfd_sparc_elf_object_p
index cdbeac1a30cf4ec22f85e0102b37367a6f183666..29371693dfdce74b79d224373c3b45f98323ba12 100644 (file)
@@ -3960,7 +3960,8 @@ tilegx_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
 
 bool
 tilegx_elf_finish_dynamic_sections (bfd *output_bfd,
-                                   struct bfd_link_info *info)
+                                   struct bfd_link_info *info,
+                                   bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   bfd *dynobj;
   asection *sdyn;
index c6a560a604f7fce00f4cf0e317f020231baf3f28..38713c35e0b224fc7d3990fcb6a4e06e7c8ec0aa 100644 (file)
@@ -95,7 +95,7 @@ tilegx_elf_finish_dynamic_symbol (bfd *,
                                  Elf_Internal_Sym *) ATTRIBUTE_HIDDEN;
 
 extern bool
-tilegx_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *)
+tilegx_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *, bfd_byte *)
   ATTRIBUTE_HIDDEN;
 
 extern bool
index 1f7024f09c7eec1f3ae7f227babea66d3a450ded..67fba0fa553041df00b12f09d40a8812075d6a3c 100644 (file)
@@ -2762,7 +2762,8 @@ _bfd_x86_elf_late_size_sections (bfd *output_bfd,
 
 struct elf_x86_link_hash_table *
 _bfd_x86_elf_finish_dynamic_sections (bfd *output_bfd,
-                                     struct bfd_link_info *info)
+                                     struct bfd_link_info *info,
+                                     bfd_byte *buf ATTRIBUTE_UNUSED)
 {
   struct elf_x86_link_hash_table *htab;
   const struct elf_backend_data *bed;
index 9ed1864b9cc68fab91352c866580ce3d1f07b94a..7e196cd0475e99b91f82f3622e3ef645e5e5d961 100644 (file)
@@ -884,7 +884,7 @@ extern bool _bfd_x86_elf_late_size_sections
   (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;
 
 extern struct elf_x86_link_hash_table *_bfd_x86_elf_finish_dynamic_sections
-  (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;
+  (bfd *, struct bfd_link_info *, bfd_byte *) ATTRIBUTE_HIDDEN;
 
 extern bool _bfd_x86_elf_early_size_sections
   (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;