]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Make bfd.link_next field a union
authorAlan Modra <amodra@gmail.com>
Fri, 13 Jun 2014 09:40:57 +0000 (19:10 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 13 Jun 2014 09:40:57 +0000 (19:10 +0930)
This field of struct bfd is currently only used to chain together
linker input files.  This patch prepares to use the field to stash
the linker hash table, which is always created on the linker output
file.

bfd/
* bfd.c (struct bfd): Replace link_next with a union.
* aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
* ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
* elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
* elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
* elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
* elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
* elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
* elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
* elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
* elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
* elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
* elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
* sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
* bfd-in2.h: Regenerate.
include/
* bfdlink.h: Update for bfd.link_next change.
ld/
* emultempl/cr16elf.em, * emultempl/elf32.em, * emultempl/genelf.em,
* emultempl/m68kcoff.em, * emultempl/m68kelf.em,
* emultempl/nds32elf.em, * emultempl/pe.em, * emultempl/pep.em,
* ldlang.c, * ldmain.c, * pe-dll.c: Update for bfd.link_next change.

66 files changed:
bfd/ChangeLog
bfd/aoutx.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/cofflink.c
bfd/ecoff.c
bfd/elf-m10300.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-metag.c
bfd/elf32-microblaze.c
bfd/elf32-nds32.c
bfd/elf32-nios2.c
bfd/elf32-or1k.c
bfd/elf32-ppc.c
bfd/elf32-rl78.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c
bfd/linker.c
bfd/pdp11.c
bfd/peXXigen.c
bfd/simple.c
bfd/sunos.c
bfd/vms-alpha.c
bfd/xcofflink.c
include/ChangeLog
include/bfdlink.h
ld/ChangeLog
ld/emultempl/cr16elf.em
ld/emultempl/elf32.em
ld/emultempl/genelf.em
ld/emultempl/m68kcoff.em
ld/emultempl/m68kelf.em
ld/emultempl/nds32elf.em
ld/emultempl/pe.em
ld/emultempl/pep.em
ld/ldlang.c
ld/ldmain.c
ld/pe-dll.c

index 009612e3d912c4f458d866e92c4f43eba5976688..b3378619abd5f79687e7735df4e42aade45020a8 100644 (file)
@@ -1,3 +1,21 @@
+2014-06-13  Alan Modra  <amodra@gmail.com>
+
+       * bfd.c (struct bfd): Replace link_next with a union.
+       * aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
+       * ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
+       * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
+       * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
+       * elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
+       * elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
+       * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
+       * elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
+       * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
+       * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
+       * elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
+       * elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
+       * sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
+       * bfd-in2.h: Regenerate.
+
 2014-06-11  Alan Modra  <amodra@gmail.com>
 
        * linker.c (unwrap_hash_lookup): Add missing parens.
index 79abe42b23e8cff4499efb80d8e6fab46b2f96bb..a2f7d1667b6649639f3f6ab62adbd1634aac3496 100644 (file)
@@ -5309,7 +5309,7 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd)
 
 /* Do the final link step.  This is called on the output BFD.  The
    INFO structure should point to a list of BFDs linked through the
-   link_next field which can be used to find each BFD which takes part
+   link.next field which can be used to find each BFD which takes part
    in the output.  Also, each section in ABFD should point to a list
    of bfd_link_order structures which list all the input sections for
    the output section.  */
@@ -5356,7 +5356,7 @@ NAME (aout, final_link) (bfd *abfd,
   max_contents_size = 0;
   max_relocs_size = 0;
   max_sym_count = 0;
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       bfd_size_type sz;
 
@@ -5495,7 +5495,7 @@ NAME (aout, final_link) (bfd *abfd,
 
      We use the output_has_begun field of the input BFDs to see
      whether we have already handled it.  */
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     sub->output_has_begun = FALSE;
 
   /* Mark all sections which are to be included in the link.  This
index 8b7f2eef4bcf51db39810a3dc7f6964ddc89b851..722cc2bbe0d1d93974dfe5b4ffda8a8230b894c1 100644 (file)
@@ -6394,8 +6394,12 @@ struct bfd
   struct bfd *nested_archives; /* List of nested archive in a flattened
                                   thin archive.  */
 
-  /* A chain of BFD structures involved in a link.  */
-  struct bfd *link_next;
+  union {
+    /* For input BFDs, a chain of BFDs involved in a link.  */
+    struct bfd *next;
+    /* For output BFD, the linker hash table.  */
+    struct bfd_link_hash_table *hash;
+  } link;
 
   /* A field used by _bfd_generic_link_add_archive_symbols.  This will
      be used only for archive elements.  */
index 41de1bbd4d88070613ab1321e3f21980cb69622d..641486514cfd585e4d079c98eb6ee35ae89c391f 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -219,8 +219,12 @@ CODE_FRAGMENT
 .  struct bfd *nested_archives; {* List of nested archive in a flattened
 .                                  thin archive.  *}
 .
-.  {* A chain of BFD structures involved in a link.  *}
-.  struct bfd *link_next;
+.  union {
+.    {* For input BFDs, a chain of BFDs involved in a link.  *}
+.    struct bfd *next;
+.    {* For output BFD, the linker hash table.  *}
+.    struct bfd_link_hash_table *hash;
+.  } link;
 .
 .  {* A field used by _bfd_generic_link_add_archive_symbols.  This will
 .     be used only for archive elements.  *}
index cf173a284ea8ac5b190c75bfb9532cd35289c4c0..3c39afae7a86b2dad00ec42e8186ca9c7a1aeb0c 100644 (file)
@@ -2149,7 +2149,7 @@ ppc_bfd_coff_final_link (bfd *abfd, struct bfd_link_info *info)
      the opportunity to clear the output_has_begun fields of all the
      input BFD's.  */
   max_sym_count = 0;
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       bfd_size_type sz;
 
index 4c41740a5804f7b025da91a03f4c608be47608b7..39b2db3b7c3f137b11ce9b44ba9b84e8de8ee928 100644 (file)
@@ -2608,7 +2608,7 @@ _bfd_xcoff_sizeof_headers (bfd *abfd,
        return -1;
 
       /* Sum.  */
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
        for (s = sub->sections; s != NULL; s = s->next)
          {
            struct nbr_reloc_lineno *e = &n_rl[s->output_section->index];
index bfb1ebba01340f998fc051a3c48e9a653e646b09..d4e3345b5d164380150384588cbe3b076d9ab5c1 100644 (file)
@@ -860,7 +860,7 @@ _bfd_coff_final_link (bfd *abfd,
      the opportunity to clear the output_has_begun fields of all the
      input BFD's.  */
   max_sym_count = 0;
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       size_t sz;
 
@@ -945,7 +945,7 @@ _bfd_coff_final_link (bfd *abfd,
   if (flaginfo.info->strip != strip_all && flaginfo.info->discard != discard_all)
     {
       /* Add local symbols from foreign inputs.  */
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
        {
          unsigned int i;
 
index ed163d683512a51e6ce87664196c77d3ded584fc..cf38e3ef7b87b8b8c73ac079946c9b8bc4d7a999 100644 (file)
@@ -4447,7 +4447,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
   /* Accumulate the debugging symbols from each input BFD.  */
   for (input_bfd = info->input_bfds;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_boolean ret;
 
index 68307de65ae634037b103d9e3bade22d7949b8fe..413e9da90d1d6dc25fb6eaea109ebaba2eb15537 100644 (file)
@@ -2679,7 +2679,7 @@ mn10300_elf_relax_section (bfd *abfd,
       /* Iterate over all the input bfds.  */
       for (input_bfd = link_info->input_bfds;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next)
+          input_bfd = input_bfd->link.next)
        {
          /* We're going to need all the symbols for each bfd.  */
          symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -3022,7 +3022,7 @@ mn10300_elf_relax_section (bfd *abfd,
         a "call" instruction.  */
       for (input_bfd = link_info->input_bfds;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next)
+          input_bfd = input_bfd->link.next)
        {
          /* We're going to need all the local symbols for each bfd.  */
          symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
index 526d4f8490f81561895b77b409fbe813bf203323..e0f1d1da704a48a83b766fb48d0107bbeb5f8841 100644 (file)
@@ -4436,7 +4436,7 @@ elf32_arm_setup_section_lists (bfd *output_bfd,
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -5045,7 +5045,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
       num_a8_fixes = 0;
       for (input_bfd = info->input_bfds, bfd_indx = 0;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next, bfd_indx++)
+          input_bfd = input_bfd->link.next, bfd_indx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *section;
@@ -10911,7 +10911,7 @@ elf32_arm_fix_exidx_coverage (asection **text_section_order,
 
   /* Walk over all EXIDX sections, and create backlinks from the corrsponding
      text sections.  */
-  for (inp = info->input_bfds; inp != NULL; inp = inp->link_next)
+  for (inp = info->input_bfds; inp != NULL; inp = inp->link.next)
     {
       asection *sec;
 
@@ -12991,7 +12991,7 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info,
   while (again)
     {
       again = FALSE;
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
        {
          asection *o;
 
@@ -13729,7 +13729,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -13906,7 +13906,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
   elf_link_hash_traverse (& htab->root, allocate_dynrelocs_for_symbol, info);
 
   /* Here we rummage through the found bfds to collect glue information.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       if (! is_arm_elf (ibfd))
        continue;
@@ -15072,7 +15072,7 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd,
      mapping symbols.  */
   for (input_bfd = info->input_bfds;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       if ((input_bfd->flags & (BFD_LINKER_CREATED | HAS_SYMS)) == HAS_SYMS)
        for (osi.sec = input_bfd->sections;
@@ -15230,7 +15230,7 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd,
       elf_link_hash_traverse (&htab->root, elf32_arm_output_plt_map, &osi);
       for (input_bfd = info->input_bfds;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next)
+          input_bfd = input_bfd->link.next)
        {
          struct arm_local_iplt_info **local_iplt;
          unsigned int i, num_syms;
index 45710a1b104bf4ffd95a19f7da7b0249df6150c2..60a2c7f513b536d1b32769428655e93a31e79ad9 100644 (file)
@@ -2822,7 +2822,7 @@ elf32_avr_setup_section_lists (bfd *output_bfd,
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -2896,7 +2896,7 @@ get_local_syms (bfd *input_bfd, struct bfd_link_info *info)
      export stubs.  */
   for (bfd_indx = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
+       input_bfd = input_bfd->link.next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
 
@@ -2973,7 +2973,7 @@ elf32_avr_size_stubs (bfd *output_bfd,
       bfd_hash_traverse (&htab->bstab, avr_mark_stub_not_to_be_necessary, htab);
       for (input_bfd = info->input_bfds, bfd_indx = 0;
            input_bfd != NULL;
-           input_bfd = input_bfd->link_next, bfd_indx++)
+           input_bfd = input_bfd->link.next, bfd_indx++)
         {
           Elf_Internal_Shdr *symtab_hdr;
           asection *section;
index 1cc419c7798fb53b0a7aa8a2edb2729b5852fa6a..262befd7add71c60c4a1cf043280880b671b8b0c 100644 (file)
@@ -2228,7 +2228,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got and .plt offsets for local syms, and space for local
      dynamic relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -2503,7 +2503,7 @@ elf32_hppa_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -2694,7 +2694,7 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info)
      export stubs.  */
   for (bfd_indx = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
+       input_bfd = input_bfd->link.next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
 
@@ -2868,7 +2868,7 @@ elf32_hppa_size_stubs
 
       for (input_bfd = info->input_bfds, bfd_indx = 0;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next, bfd_indx++)
+          input_bfd = input_bfd->link.next, bfd_indx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *section;
index 4470c52f8f987fbee356202065ff4aeaeaffde8d..e33a8c6d5e39a592986e8bb8dc219d042d5ad7a1 100644 (file)
@@ -2686,7 +2686,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 98db714f32cd6b0542e7001b2d506691215ca571..e694055a9bd4aea676b60bea087baee21ac8a927 100644 (file)
@@ -2146,7 +2146,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -2324,7 +2324,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
       int r32_count = 0;
       int rgot_count = 0;
       /* Look for deleted sections.  */
-      for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
         {
           for (s = ibfd->sections; s != NULL; s = s->next)
             {
index ed7df9ab677bea8ba923ba3b74dbaf72572f210f..3e2c8027e30ad188e8bbf0d4213a10739e948b2c 100644 (file)
@@ -1110,7 +1110,7 @@ m32c_elf_relax_plt_section (asection *splt,
 
   /* Likewise for local symbols, though that's somewhat less convenient
      as we have to walk the list of input bfds and swap in symbol data.  */
-  for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link.next)
     {
       bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd);
       Elf_Internal_Shdr *symtab_hdr;
@@ -1184,7 +1184,7 @@ m32c_elf_relax_plt_section (asection *splt,
       elf_link_hash_traverse (elf_hash_table (info),
                              m32c_relax_plt_realloc, &entry);
 
-      for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link.next)
        {
          bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd);
          unsigned int nlocals = elf_tdata (ibfd)->symtab_hdr.sh_info;
index 9c59c02090c7853f3bb827730a9998be802a54d0..8dba9f0a3e515e0f0f0c4ee7c6c31597023b1d1c 100644 (file)
@@ -2177,7 +2177,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 747dafc72bc0a75c5b6b470554cdf3f787e0276e..c96625cde6c86ccfd1a6366340a5afd125b90585 100644 (file)
@@ -254,7 +254,7 @@ elf32_m68hc11_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   text_section = 0;
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -342,7 +342,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     bfd_count += 1;
 
   /* We want to read in symbol extension records only once.  To do this
@@ -356,7 +356,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
   /* Walk over all the input BFDs, swapping in local symbols.  */
   for (input_bfd = info->input_bfds, bfd_indx = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
+       input_bfd = input_bfd->link.next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
 
@@ -386,7 +386,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
 
   for (input_bfd = info->input_bfds, bfd_indx = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
+       input_bfd = input_bfd->link.next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
       struct elf_link_hash_entry ** sym_hashes;
index d1d4b414ba0a8011cd9c84a6a034432db43267b5..b48ebb4905a8248b2d456a25b2dea2d6a9b0801e 100644 (file)
@@ -2847,7 +2847,7 @@ elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -3725,7 +3725,7 @@ elf_metag_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -3907,7 +3907,7 @@ get_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *input_bfd,
   /* Walk over all the input BFDs, swapping in local symbols.  */
   for (bfd_indx = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
+       input_bfd = input_bfd->link.next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
 
@@ -4004,7 +4004,7 @@ elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd,
 
       for (input_bfd = info->input_bfds, bfd_indx = 0;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next, bfd_indx++)
+          input_bfd = input_bfd->link.next, bfd_indx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *section;
index 9837b18aabf917f87f46065fdc809f30b145466c..a4cc6a3fd6b3e621fd4b19f0aea6f17353e789c6 100644 (file)
@@ -2973,7 +2973,7 @@ microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 873a00f36094cf9371ba1a4a68f81bb68c88f7fa..d1a2c3035cd084fa720b0211840733fcb96451d4 100644 (file)
@@ -3599,7 +3599,7 @@ nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -12677,7 +12677,7 @@ nds32_elf_ex9_build_itable (struct bfd_link_info *link_info)
   bfd_byte *contents = NULL;
 
   for (it_abfd = link_info->input_bfds; it_abfd != NULL;
-       it_abfd = it_abfd->link_next)
+       it_abfd = it_abfd->link.next)
     {
       /* Find the section .ex9.itable, and put all entries into it.  */
       table_sec = bfd_get_section_by_name (it_abfd, ".ex9.itable");
@@ -13613,7 +13613,7 @@ nds32_elf_ex9_reloc_jmp (struct bfd_link_info *link_info)
   if (update_ex9_table == 0)
     {
       for (it_abfd = link_info->input_bfds; it_abfd != NULL;
-          it_abfd = it_abfd->link_next)
+          it_abfd = it_abfd->link.next)
        {
          table_sec = bfd_get_section_by_name (it_abfd, ".ex9.itable");
          if (table_sec != NULL)
@@ -14174,7 +14174,7 @@ nds32_elf_ex9_itb_base (struct bfd_link_info *link_info)
   target_optimize  = table->target_optimize;
 
   for (abfd = link_info->input_bfds; abfd != NULL;
-       abfd = abfd->link_next)
+       abfd = abfd->link.next)
     {
       sec = bfd_get_section_by_name (abfd, ".ex9.itable");
       if (sec != NULL)
index f33b38a71d71e244b657174db72834758dc8ba3e..4ce670b652745f89b5fe6dc952bb6204f0e1f830 100644 (file)
@@ -1383,7 +1383,7 @@ nios2_elf32_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -1718,7 +1718,7 @@ get_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *input_bfd,
   /* Walk over all the input BFDs, swapping in local symbols.  */
   for (bfd_indx = 0;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
+       input_bfd = input_bfd->link.next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
 
@@ -1783,7 +1783,7 @@ nios2_elf32_size_stubs (bfd *output_bfd, bfd *stub_bfd,
 
       for (input_bfd = info->input_bfds, bfd_indx = 0;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next, bfd_indx++)
+          input_bfd = input_bfd->link.next, bfd_indx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *section;
@@ -4891,7 +4891,7 @@ nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 956ec387ec14f7361e95812f72e7463e0a21b592..2353d0d50347354f1bbe8ea6633f32502a40c8a8 100644 (file)
@@ -2464,7 +2464,7 @@ or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 344845d76c4161d4cef2e03c5b0f844cfc8640bd..bc793d737c45f662a54508cd5cd3d1d8d7d8fcfd 100644 (file)
@@ -2629,7 +2629,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
   apuinfo_list_init ();
 
   /* Read in the input sections contents.  */
-  for (ibfd = link_info->input_bfds; ibfd; ibfd = ibfd->link_next)
+  for (ibfd = link_info->input_bfds; ibfd; ibfd = ibfd->link.next)
     {
       unsigned long datum;
 
@@ -4828,7 +4828,7 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED,
             --secure-plt and we never see REL16 relocs.  */
          if (plt_type == PLT_UNSET)
            plt_type = PLT_OLD;
-         for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+         for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
            if (is_ppc_elf (ibfd))
              {
                if (ppc_elf_tdata (ibfd)->has_rel16)
@@ -5197,7 +5197,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
      notify relocate_section that optimization can be done, and
      adjust got and plt refcounts.  */
   for (pass = 0; pass < 2; ++pass)
-    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
       {
        Elf_Internal_Sym *locsyms = NULL;
        Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd);
@@ -6130,7 +6130,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 5e62edd30216c1ae7a042309abf557804091cd05..9124e0a2c51ed1d789a148b85afeec237fbf49c2 100644 (file)
@@ -1370,7 +1370,7 @@ rl78_elf_relax_plt_section (bfd *dynobj,
 
   /* Likewise for local symbols, though that's somewhat less convenient
      as we have to walk the list of input bfds and swap in symbol data.  */
-  for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link.next)
     {
       bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd);
       Elf_Internal_Shdr *symtab_hdr;
@@ -1444,7 +1444,7 @@ rl78_elf_relax_plt_section (bfd *dynobj,
       elf_link_hash_traverse (elf_hash_table (info),
                              rl78_relax_plt_realloc, &entry);
 
-      for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link.next)
        {
          bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd);
          unsigned int nlocals = elf_tdata (ibfd)->symtab_hdr.sh_info;
index 09b1fcafbebb4a80e1715d4d312d95e34e442652..11c726fc7e8e799ddab6d36545d9022c1fd1a4b5 100644 (file)
@@ -2045,7 +2045,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -3903,7 +3903,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
        ->this_hdr.sh_entsize = 4;
     }
   /* Finish dynamic symbol for local IFUNC symbols.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct plt_entry *local_plt;
       Elf_Internal_Sym *isym;
index 3223d46100179c708302296c7089423be5074a6c..1ab54cd2b3c41705f8648a0f8c3528c8139ce20a 100644 (file)
@@ -3199,7 +3199,7 @@ s3_bfd_score_elf_always_size_sections (bfd *output_bfd,
 
   /* Calculate the total loadable size of the output.  That will give us the
      maximum number of GOT_PAGE entries required.  */
-  for (sub = info->input_bfds; sub; sub = sub->link_next)
+  for (sub = info->input_bfds; sub; sub = sub->link.next)
     {
       asection *subsection;
 
index c24107771aa0aa38640ef7e12af4426c0aeb1bc4..0b3cf2026f91d1a4c3f345a0ce97261e01ec008e 100644 (file)
@@ -3006,7 +3006,7 @@ s7_bfd_score_elf_always_size_sections (bfd *output_bfd,
 
   /* Calculate the total loadable size of the output.  That will give us the
      maximum number of GOT_PAGE entries required.  */
-  for (sub = info->input_bfds; sub; sub = sub->link_next)
+  for (sub = info->input_bfds; sub; sub = sub->link.next)
     {
       asection *subsection;
 
index 259ddf08a1801349deca87d63e1a8c623281a6d4..34dfea2197e58fcdec2558e4b085b55b98d65ba6 100644 (file)
@@ -3341,7 +3341,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index ac9c184eaf14fa211f1e0986dbcf89a4eaed3f3b..13806ad1bd1019d30e088fc8424d298d08634e75 100644 (file)
@@ -555,7 +555,7 @@ spu_elf_create_sections (struct bfd_link_info *info)
   struct spu_link_hash_table *htab = spu_hash_table (info);
   bfd *ibfd;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     if (bfd_get_section_by_name (ibfd, SPU_PTNOTE_SPUNAME) != NULL)
       break;
 
@@ -1520,7 +1520,7 @@ process_stubs (struct bfd_link_info *info, bfd_boolean build)
   struct spu_link_hash_table *htab = spu_hash_table (info);
   bfd *ibfd;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       extern const bfd_target spu_elf32_vec;
       Elf_Internal_Shdr *symtab_hdr;
@@ -2936,7 +2936,7 @@ discover_functions (struct bfd_link_info *info)
   bfd_boolean gaps = FALSE;
 
   bfd_idx = 0;
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     bfd_idx++;
 
   psym_arr = bfd_zmalloc (bfd_idx * sizeof (*psym_arr));
@@ -2948,7 +2948,7 @@ discover_functions (struct bfd_link_info *info)
 
   for (ibfd = info->input_bfds, bfd_idx = 0;
        ibfd != NULL;
-       ibfd = ibfd->link_next, bfd_idx++)
+       ibfd = ibfd->link.next, bfd_idx++)
     {
       extern const bfd_target spu_elf32_vec;
       Elf_Internal_Shdr *symtab_hdr;
@@ -3056,7 +3056,7 @@ discover_functions (struct bfd_link_info *info)
         relocations.  */
       for (ibfd = info->input_bfds, bfd_idx = 0;
           ibfd != NULL;
-          ibfd = ibfd->link_next, bfd_idx++)
+          ibfd = ibfd->link.next, bfd_idx++)
        {
          asection *sec;
 
@@ -3070,7 +3070,7 @@ discover_functions (struct bfd_link_info *info)
 
       for (ibfd = info->input_bfds, bfd_idx = 0;
           ibfd != NULL;
-          ibfd = ibfd->link_next, bfd_idx++)
+          ibfd = ibfd->link.next, bfd_idx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *sec;
@@ -3109,7 +3109,7 @@ discover_functions (struct bfd_link_info *info)
            }
        }
 
-      for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
        {
          extern const bfd_target spu_elf32_vec;
          asection *sec;
@@ -3152,7 +3152,7 @@ discover_functions (struct bfd_link_info *info)
 
   for (ibfd = info->input_bfds, bfd_idx = 0;
        ibfd != NULL;
-       ibfd = ibfd->link_next, bfd_idx++)
+       ibfd = ibfd->link.next, bfd_idx++)
     {
       if (psym_arr[bfd_idx] == NULL)
        continue;
@@ -3181,7 +3181,7 @@ for_each_node (bfd_boolean (*doit) (struct function_info *,
 {
   bfd *ibfd;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       extern const bfd_target spu_elf32_vec;
       asection *sec;
@@ -3330,7 +3330,7 @@ build_call_tree (struct bfd_link_info *info)
   bfd *ibfd;
   unsigned int depth;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       extern const bfd_target spu_elf32_vec;
       asection *sec;
@@ -3707,7 +3707,7 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size)
 
   memset (&dummy_caller, 0, sizeof (dummy_caller));
   lib_count = 0;
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       extern const bfd_target spu_elf32_vec;
       asection *sec;
@@ -4252,7 +4252,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info)
     goto err_exit;
 
   bfd_count = 0;
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     ++bfd_count;
   bfd_arr = bfd_malloc (bfd_count * sizeof (*bfd_arr));
   if (bfd_arr == NULL)
@@ -4262,7 +4262,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info)
   count = 0;
   bfd_count = 0;
   total_overlay_size = 0;
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       extern const bfd_target spu_elf32_vec;
       asection *sec;
@@ -5395,7 +5395,7 @@ spu_elf_size_sections (bfd * output_bfd, struct bfd_link_info *info)
       bfd *ibfd;
       size_t size;
 
-      for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
        {
          asection *isec;
 
index e3e897c58635fc6b2209a70ab9550058b164e828..8381cfa76430830c37928a4e930b455c3f3356fa 100644 (file)
@@ -1919,7 +1919,7 @@ elf32_tic6x_gc_mark_extra_sections (struct bfd_link_info *info,
   while (again)
     {
       again = FALSE;
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
        {
          asection *o;
 
@@ -3309,7 +3309,7 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -4051,7 +4051,7 @@ elf32_tic6x_fix_exidx_coverage (asection **text_section_order,
 
   /* Walk over all EXIDX sections, and create backlinks from the corrsponding
      text sections.  */
-  for (inp = info->input_bfds; inp != NULL; inp = inp->link_next)
+  for (inp = info->input_bfds; inp != NULL; inp = inp->link.next)
     {
       asection *sec;
 
index 4e6561db23a1c80188a4e46bbaa18fd7a16a5f1f..b9a31d5c4767da1db174d2fc6f05741bfa2dda86 100644 (file)
@@ -2472,7 +2472,7 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 74adf6487f5a0b93c69da81f9f2c97d420dc42ac..f918a1eb8cdf8979a88c93ce7b4bb27c675072cc 100644 (file)
@@ -610,7 +610,7 @@ xstormy16_elf_relax_section (bfd *dynobj,
 
   /* Likewise for local symbols, though that's somewhat less convenient
      as we have to walk the list of input bfds and swap in symbol data.  */
-  for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link.next)
     {
       bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd);
       Elf_Internal_Shdr *symtab_hdr;
@@ -684,7 +684,7 @@ xstormy16_elf_relax_section (bfd *dynobj,
       elf_link_hash_traverse (elf_hash_table (info),
                              xstormy16_relax_plt_realloc, &entry);
 
-      for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link.next)
        {
          bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd);
          unsigned int nlocals = elf_tdata (ibfd)->symtab_hdr.sh_info;
index adc0a02216e0bfc171cb57eab1c205635a7f772c..09862e3c2ca876ca23ebcc3a405788819763f837 100644 (file)
@@ -1561,7 +1561,7 @@ elf_xtensa_allocate_local_got_size (struct bfd_link_info *info)
   if (htab == NULL)
     return;
 
-  for (i = info->input_bfds; i; i = i->link_next)
+  for (i = info->input_bfds; i; i = i->link.next)
     {
       bfd_signed_vma *local_got_refcounts;
       bfd_size_type j, cnt;
@@ -1700,7 +1700,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
         literal tables.  */
       sgotloc = htab->sgotloc;
       sgotloc->size = spltlittbl->size;
-      for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+      for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
        {
          if (abfd->flags & DYNAMIC)
            continue;
@@ -6746,14 +6746,14 @@ analyze_relocations (struct bfd_link_info *link_info)
   bfd_boolean is_relaxable = FALSE;
 
   /* Initialize the per-section relaxation info.  */
-  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     for (sec = abfd->sections; sec != NULL; sec = sec->next)
       {
        init_xtensa_relax_info (sec);
       }
 
   /* Mark relaxable sections (and count relocations against each one).  */
-  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     for (sec = abfd->sections; sec != NULL; sec = sec->next)
       {
        if (!find_relaxable_sections (abfd, sec, link_info, &is_relaxable))
@@ -6765,7 +6765,7 @@ analyze_relocations (struct bfd_link_info *link_info)
     return TRUE;
 
   /* Allocate space for source_relocs.  */
-  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     for (sec = abfd->sections; sec != NULL; sec = sec->next)
       {
        xtensa_relax_info *relax_info;
@@ -6782,7 +6782,7 @@ analyze_relocations (struct bfd_link_info *link_info)
       }
 
   /* Collect info on relocations against each relaxable section.  */
-  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     for (sec = abfd->sections; sec != NULL; sec = sec->next)
       {
        if (!collect_source_relocs (abfd, sec, link_info))
@@ -6790,7 +6790,7 @@ analyze_relocations (struct bfd_link_info *link_info)
       }
 
   /* Compute the text actions.  */
-  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     for (sec = abfd->sections; sec != NULL; sec = sec->next)
       {
        if (!compute_text_actions (abfd, sec, link_info))
index 403e43697b5bcc5069e4056e629f4ef5e9f781de..968e45c685a44317e50de2a7b6d1cf8e6913f465 100644 (file)
@@ -2481,7 +2481,7 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info,
      consisting of all of the input files.  */
   if (got_list == NULL)
     {
-      for (i = info->input_bfds; i ; i = i->link_next)
+      for (i = info->input_bfds; i ; i = i->link.next)
        {
          bfd *this_got;
 
index b57497d4b53550027b6b806d3ffcd5b168db122d..86f652dcc38104adcd749f51481fce6bd1845be6 100644 (file)
@@ -1580,7 +1580,7 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 
   /* Set up DLT, PLT and OPD offsets for local syms, and space for local
      dynamic relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_dlt;
       bfd_signed_vma *end_local_dlt;
index 069340aedf616f087720ecd2bfcfd468f048368f..d14b909e4043941e579214426885c3709a9f5926 100644 (file)
@@ -2818,7 +2818,7 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
         return FALSE;
 
       /* Add entries for shared libraries.  */
-      for (abfd = info->input_bfds; abfd; abfd = abfd->link_next)
+      for (abfd = info->input_bfds; abfd; abfd = abfd->link.next)
         {
           char *soname;
           size_t soname_len;
index ad6757f518b289fded4f48a1120dbc4d011954b7..58fca928209e83817d8635cd865a296829d59778 100644 (file)
@@ -2322,7 +2322,7 @@ _bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED,
   bfd *ibfd;
 
   /* Set the initial size of sections.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     bfd_map_over_sections (ibfd, mmix_set_relaxable_size, info);
 
   /* The bpo_greg_owner bfd is supposed to have been set by
index b8d74658b8a0fc273c202da6670125546f2df2f1..1d5d4ab2b7463ff7546f173917425b62f3aa3e08 100644 (file)
@@ -7558,7 +7558,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info)
   if (htab == NULL)
     return FALSE;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       asection *sec;
       Elf_Internal_Rela *relstart, *rel, *relend;
@@ -8105,7 +8105,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info)
      and plt refcounts.  */
   toc_ref = NULL;
   for (pass = 0; pass < 2; ++pass)
-    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
       {
        Elf_Internal_Sym *locsyms = NULL;
        asection *toc = bfd_get_section_by_name (ibfd, ".toc");
@@ -8602,7 +8602,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
 
   htab->do_toc_opt = 1;
   toc_inf.global_toc_syms = TRUE;
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       asection *toc, *sec;
       Elf_Internal_Shdr *symtab_hdr;
@@ -9662,7 +9662,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct got_entry **lgot_ents;
       struct got_entry **end_lgot_ents;
@@ -9784,7 +9784,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd,
     elf_link_hash_traverse (&htab->elf, size_global_entry_stubs, info);
 
   first_tlsld = NULL;
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct got_entry *ent;
 
@@ -9892,7 +9892,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd,
        return FALSE;
     }
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       if (!is_ppc64_elf (ibfd))
        continue;
@@ -11071,7 +11071,7 @@ ppc64_elf_setup_section_lists (struct bfd_link_info *info)
   /* Find the top input section id.  */
   for (input_bfd = info->input_bfds, top_id = 3;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     {
       for (section = input_bfd->sections;
           section != NULL;
@@ -11252,7 +11252,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
   elf_link_hash_traverse (&htab->elf, merge_global_got, info);
 
   /* And tlsld_got.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct got_entry *ent, *ent2;
 
@@ -11263,7 +11263,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
       if (!ent->is_indirect
          && ent->got.offset != (bfd_vma) -1)
        {
-         for (ibfd2 = ibfd->link_next; ibfd2 != NULL; ibfd2 = ibfd2->link_next)
+         for (ibfd2 = ibfd->link.next; ibfd2 != NULL; ibfd2 = ibfd2->link.next)
            {
              if (!is_ppc64_elf (ibfd2))
                continue;
@@ -11285,7 +11285,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
   htab->elf.irelplt->size -= htab->got_reli_size;
   htab->got_reli_size = 0;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       asection *got, *relgot;
 
@@ -11305,7 +11305,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
 
   /* Now reallocate the got, local syms first.  We don't need to
      allocate section contents again since we never increase size.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct got_entry **lgot_ents;
       struct got_entry **end_lgot_ents;
@@ -11362,7 +11362,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
 
   elf_link_hash_traverse (&htab->elf, reallocate_got, info);
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct got_entry *ent;
 
@@ -11386,7 +11386,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
 
   done_something = htab->elf.irelplt->rawsize != htab->elf.irelplt->size;
   if (!done_something)
-    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
       {
        asection *got;
 
@@ -11953,7 +11953,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
 
       for (input_bfd = info->input_bfds, bfd_indx = 0;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next, bfd_indx++)
+          input_bfd = input_bfd->link.next, bfd_indx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *section;
@@ -15064,7 +15064,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
   /* We need to handle writing out multiple GOT sections ourselves,
      since we didn't add them to DYNOBJ.  We know dynobj is the first
      bfd.  */
-  while ((dynobj = dynobj->link_next) != NULL)
+  while ((dynobj = dynobj->link.next) != NULL)
     {
       asection *s;
 
index 831c4a2dc05a0b2419eb800988a2ad180794c769..d7b2f084bc61ff69767965b9d4dc0b7790e9fde5 100644 (file)
@@ -1995,7 +1995,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
@@ -3717,7 +3717,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
     }
 
   /* Finish dynamic symbol for local IFUNC symbols.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct plt_entry *local_plt;
       Elf_Internal_Sym *isym;
index f735e317ca4b39042daf1702349423d815269cfa..d230776eab77ebb64491bafd5a543a9126426bad 100644 (file)
@@ -2935,7 +2935,7 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 6756fb1312c193318af56f922179ffcfe545a71f..2d953b57a06534d54273b6af0d70e579f616d104 100644 (file)
@@ -5488,7 +5488,7 @@ _bfd_elf_size_group_sections (struct bfd_link_info *info)
 {
   bfd *ibfd;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour
        && !_bfd_elf_fixup_group_sections (ibfd, bfd_abs_section_ptr))
       return FALSE;
@@ -5615,7 +5615,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
 
       for (inputobj = info->input_bfds;
           inputobj;
-          inputobj = inputobj->link_next)
+          inputobj = inputobj->link.next)
        {
          asection *s;
 
@@ -5881,7 +5881,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
              asection *o;
 
              for (sub = info->input_bfds; sub != NULL;
-                  sub = sub->link_next)
+                  sub = sub->link.next)
                if (bfd_get_flavour (sub) == bfd_target_elf_flavour)
                  for (o = sub->sections; o != NULL; o = o->next)
                    if (elf_section_data (o)->this_hdr.sh_type
@@ -6711,7 +6711,7 @@ _bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info)
   if (!is_elf_hash_table (info->hash))
     return FALSE;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     if ((ibfd->flags & DYNAMIC) == 0)
       for (sec = ibfd->sections; sec != NULL; sec = sec->next)
        if ((sec->flags & SEC_MERGE) != 0
@@ -10929,7 +10929,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
      we could write the relocs out and then read them again; I don't
      know how bad the memory loss will be.  */
 
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     sub->output_has_begun = FALSE;
   for (o = abfd->sections; o != NULL; o = o->next)
     {
@@ -10991,7 +10991,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
   /* Free symbol buffer if needed.  */
   if (!info->reduce_memory_overheads)
     {
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
        if (bfd_get_flavour (sub) == bfd_target_elf_flavour
            && elf_tdata (sub)->symbuf)
          {
@@ -11677,7 +11677,7 @@ _bfd_elf_gc_mark_hook (asection *sec,
            {
              bfd *i;
 
-             for (i = info->input_bfds; i; i = i->link_next)
+             for (i = info->input_bfds; i; i = i->link.next)
                {
                  sec = bfd_get_section_by_name (i, sec_name);
                  if (sec)
@@ -11826,7 +11826,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info,
 {
   bfd *ibfd;
 
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       asection *isec;
       bfd_boolean some_kept;
@@ -11954,7 +11954,7 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
   unsigned long section_sym_count;
   struct elf_gc_sweep_symbol_info sweep_info;
 
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       asection *o;
 
@@ -12207,7 +12207,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
   /* Try to parse each bfd's .eh_frame section.  Point elf_eh_frame_section
      at the .eh_frame section if we can mark the FDEs individually.  */
   _bfd_elf_begin_eh_frame_parsing (info);
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       asection *sec;
       struct elf_reloc_cookie cookie;
@@ -12247,7 +12247,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
 
   /* Grovel through relocs to find out who stays ...  */
   gc_mark_hook = bed->gc_mark_hook;
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       asection *o;
 
@@ -12556,7 +12556,7 @@ bfd_elf_gc_common_finalize_got_offsets (bfd *abfd,
     gotoff = bed->got_header_size;
 
   /* Do the local .got entries first.  */
-  for (i = info->input_bfds; i; i = i->link_next)
+  for (i = info->input_bfds; i; i = i->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_size_type j, locsymcount;
@@ -12688,7 +12688,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
     return FALSE;
 
   _bfd_elf_begin_eh_frame_parsing (info);
-  for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     {
       if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
        continue;
index d917c7e5139832d48b26b2d9754fd4f8e8bab737..65ca2a4a930ab7366d895533f9cc92db3ce5372a 100644 (file)
@@ -2487,7 +2487,7 @@ elfNN_aarch64_setup_section_lists (bfd *output_bfd,
 
   /* Count the number of input BFDs and find the top input section id.  */
   for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
-       input_bfd != NULL; input_bfd = input_bfd->link_next)
+       input_bfd != NULL; input_bfd = input_bfd->link.next)
     {
       bfd_count += 1;
       for (section = input_bfd->sections;
@@ -2691,7 +2691,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd,
       asection *stub_sec;
 
       for (input_bfd = info->input_bfds, bfd_indx = 0;
-          input_bfd != NULL; input_bfd = input_bfd->link_next, bfd_indx++)
+          input_bfd != NULL; input_bfd = input_bfd->link.next, bfd_indx++)
        {
          Elf_Internal_Shdr *symtab_hdr;
          asection *section;
@@ -6289,7 +6289,7 @@ elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       struct elf_aarch64_local_symbol *locals = NULL;
       Elf_Internal_Shdr *symtab_hdr;
index 49da874dc544bcd8080295e2b6c26cf9bebdda4a..dddf83e8f6fb517e4ab04525c4ece9a902fa85f9 100644 (file)
@@ -4737,7 +4737,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
   /* Try to merge the GOTs of input bfds together, as long as they
      don't seem to exceed the maximum GOT size, choosing one of them
      to be the primary GOT.  */
-  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
     {
       gg = mips_elf_bfd_got (ibfd, FALSE);
       if (gg && !mips_elf_merge_got (ibfd, gg, &got_per_bfd_arg))
@@ -9092,7 +9092,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info)
   /* Calculate the total loadable size of the output.  That
      will give us the maximum number of GOT_PAGE entries
      required.  */
-  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
     {
       asection *subsection;
 
@@ -9141,7 +9141,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info)
     {
       /* Record that all bfds use G.  This also has the effect of freeing
         the per-bfd GOTs, which we no longer need.  */
-      for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+      for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
        if (mips_elf_bfd_got (ibfd, FALSE))
          mips_elf_replace_bfd_got (ibfd, g);
       mips_elf_replace_bfd_got (output_bfd, g);
index a2bff234d6906a9b693ab4afa9a9b11e0823941b..3470f247ab0c0d35e2dcf7d72d02f144e8e80ab9 100644 (file)
@@ -2567,7 +2567,7 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index d45f20090b85f3b8084808b40f0210a6e1b7dd34..e206bc72d6b5bdc1283d61d6a7bdf2b3baa53c5e 100644 (file)
@@ -2733,7 +2733,7 @@ tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
-  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
index 2e21054a6d38b87d460aba44a687ba6f998bec50..1afe4ed6f3ed66c39c7dd0bdb9761e6f75976a97 100644 (file)
@@ -313,7 +313,7 @@ SUBSUBSECTION
 
        The <<input_bfds>> field of the <<bfd_link_info>> structure
        will point to a list of all the input files included in the
-       link.  These files are linked through the <<link_next>> field
+       link.  These files are linked through the <<link.next>> field
        of the <<bfd>> structure.
 
        Each section in the output file will have a list of
@@ -2046,7 +2046,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
        p->u.indirect.section->linker_mark = TRUE;
 
   /* Build the output symbol table.  */
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     if (! _bfd_generic_link_output_symbols (abfd, sub, info, &outsymalloc))
       return FALSE;
 
index e7289286898f0b911d7b5baa0be449f8872528f1..8999af2b767f953d218559b656a091742298f397 100644 (file)
@@ -3638,7 +3638,7 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd)
 
 /* Do the final link step.  This is called on the output BFD.  The
    INFO structure should point to a list of BFDs linked through the
-   link_next field which can be used to find each BFD which takes part
+   link.next field which can be used to find each BFD which takes part
    in the output.  Also, each section in ABFD should point to a list
    of bfd_link_order structures which list all the input sections for
    the output section.  */
@@ -3685,7 +3685,7 @@ NAME (aout, final_link) (bfd *abfd,
   max_contents_size = 0;
   max_relocs_size = 0;
   max_sym_count = 0;
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       size_t sz;
 
@@ -3823,7 +3823,7 @@ NAME (aout, final_link) (bfd *abfd,
 
      We use the output_has_begun field of the input BFDs to see
      whether we have already handled it.  */
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     sub->output_has_begun = FALSE;
 
   /* Mark all sections which are to be included in the link.  This
index 3a0dd132670c2c3a0962fde5e2b4c05072cf8a7b..3808d39f812ad7864fa5517f67b293f2cea52e6a 100644 (file)
@@ -3941,7 +3941,7 @@ rsrc_process_section (bfd * abfd,
 
   for (input = pfinfo->info->input_bfds;
        input != NULL;
-       input = input->link_next)
+       input = input->link.next)
     {
       asection * rsrc_sec = bfd_get_section_by_name (input, ".rsrc");
 
index 1331f9b61e9837c205f38eda3f9adc63985832ba..7d256bf36ef5441ec4949283d6a47ce3a2c74d13 100644 (file)
@@ -207,7 +207,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
   memset (&link_info, 0, sizeof (link_info));
   link_info.output_bfd = abfd;
   link_info.input_bfds = abfd;
-  link_info.input_bfds_tail = &abfd->link_next;
+  link_info.input_bfds_tail = &abfd->link.next;
 
   link_info.hash = _bfd_generic_link_hash_table_create (abfd);
   link_info.callbacks = &callbacks;
index 99bed8da0cc978c3101a83fc01f3160146203151..27a658eb415e25fa1c53af5753ad7b10281a67c9 100644 (file)
@@ -1891,7 +1891,7 @@ bfd_sunos_size_dynamic_sections (bfd *output_bfd,
      to determine the number of dynamic relocs we need, and, more
      importantly, there is no other way to know which symbols should
      get an entry in the procedure linkage table.  */
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       if ((sub->flags & DYNAMIC) == 0
          && sub->xvec == output_bfd->xvec)
index 1d2250e979bdf7598508e8e6d58a7369ab7076df..66a1999efe3960d8ddf5e1795defa48a59aa7e8d 100644 (file)
@@ -8652,7 +8652,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
     {
       bfd *startbfd = NULL;
 
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
         {
           /* Consider only VMS object files.  */
           if (sub->xvec != abfd->xvec)
@@ -8756,7 +8756,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
     dmt = NULL;
 
   /* Read all sections from the inputs.  */
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       if (sub->flags & DYNAMIC)
         {
@@ -8807,7 +8807,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
           unsigned int off = 0;
 
           /* For each object file (ie for each module).  */
-          for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+          for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
             {
               asection *sub_dst;
               struct vms_dmt_header *dmth = NULL;
index ee90151e8637fe965d727f2438cacc704875280a..9841de6b07b18dae0ef44db677321473aa366c63 100644 (file)
@@ -2985,7 +2985,7 @@ xcoff_sweep (struct bfd_link_info *info)
 {
   bfd *sub;
 
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       asection *o;
 
@@ -3710,7 +3710,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd,
 
       /* We still need to call xcoff_mark, in order to set ldrel_count
         correctly.  */
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
        {
          asection *o;
 
@@ -3804,7 +3804,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd,
      and figure out the contents of the .debug section.  */
   debug_strtab = xcoff_hash_table (info)->debug_strtab;
 
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       asection *subdeb;
       bfd_size_type symcount;
@@ -3973,7 +3973,7 @@ bfd_xcoff_link_generate_rtinit (bfd *abfd,
   bim->size = 0;
   bim->buffer = 0;
 
-  abfd->link_next = 0;
+  abfd->link.next = 0;
   abfd->format = bfd_object;
   abfd->iostream = (void *) bim;
   abfd->flags = BFD_IN_MEMORY;
@@ -5041,7 +5041,7 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo)
   section_index = -1;
   for (input_bfd = flinfo->info->input_bfds;
        input_bfd != NULL;
-       input_bfd = input_bfd->link_next)
+       input_bfd = input_bfd->link.next)
     for (sec = input_bfd->sections; sec != NULL; sec = sec->next)
       if ((sec->flags & SEC_MARK) != 0 && xcoff_toc_section_p (sec))
        {
@@ -5073,7 +5073,7 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo)
       best_address = toc_end;
       for (input_bfd = flinfo->info->input_bfds;
           input_bfd != NULL;
-          input_bfd = input_bfd->link_next)
+          input_bfd = input_bfd->link.next)
        for (sec = input_bfd->sections; sec != NULL; sec = sec->next)
          if ((sec->flags & SEC_MARK) != 0 && xcoff_toc_section_p (sec))
            {
@@ -6103,7 +6103,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
      input BFD's.  We want at least 6 symbols, since that is the
      number which xcoff_write_global_symbol may need.  */
   max_sym_count = 6;
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       bfd_size_type sz;
 
index 253b0660df72def462d2daad86a86e8882a215cf..eaf81fdbc708f986f24ade5ab86e68eac8d88128 100644 (file)
@@ -1,3 +1,7 @@
+2014-06-13  Alan Modra  <amodra@gmail.com>
+
+       * bfdlink.h: Update for bfd.link_next change.
+
 2014-06-10  Alan Modra  <amodra@gmail.com>
 
        PR ld/16910
index 509d626f383c5899344edf0b1358d80876ea325e..391b3a981bfc9fbb147e9ff503237a6a824915d1 100644 (file)
@@ -469,7 +469,7 @@ struct bfd_link_info
   bfd *output_bfd;
 
   /* The list of input BFD's involved in the link.  These are chained
-     together via the link_next field.  */
+     together via the link.next field.  */
   bfd *input_bfds;
   bfd **input_bfds_tail;
 
index d84e6651aa4d51557eaf7b59679991c32a4ec733..e1abf43b73329dd03c68fda2ed03bc4cd255942d 100644 (file)
@@ -1,3 +1,10 @@
+2014-06-13  Alan Modra  <amodra@gmail.com>
+
+       * emultempl/cr16elf.em, * emultempl/elf32.em, * emultempl/genelf.em,
+       * emultempl/m68kcoff.em, * emultempl/m68kelf.em,
+       * emultempl/nds32elf.em, * emultempl/pe.em, * emultempl/pep.em,
+       * ldlang.c, * ldmain.c, * pe-dll.c: Update for bfd.link_next change.
+
 2014-06-13  Alan Modra  <amodra@gmail.com>
 
        * Makefile.am (ALL_EMULATION_SOURCES): Add enios2elf.c, enios2linux.c.
index 730235ebede5f7360740ded6a49617d05fd99eee..02f5220ca319c8311bc554a6c2bc7ecec796e469 100644 (file)
@@ -47,7 +47,7 @@ cr16_elf_after_open (void)
         input file with a nonzero .data section.  The BFD backend will fill in
         these sections with magic numbers which can be used to relocate the
         data section at run time.  */
-      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
        {
          asection *datasec;
 
@@ -139,7 +139,7 @@ cr16elf_before_allocation (void)
 
    /* If we are generating embedded relocs, call a special BFD backend
         routine to do the work.  */
-   for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+   for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
       {
          asection *datasec, *relsec;
          char *errmsg;
index 3ebf3b59077d8ffe7915a6b77aa50eaabc28396c..39b4ccd4f171824501a1fd48d11c88cb99e614de 100644 (file)
@@ -1014,7 +1014,7 @@ gld${EMULATION_NAME}_after_open (void)
 
       /* Find an ELF input.  */
       for (abfd = link_info.input_bfds;
-          abfd != (bfd *) NULL; abfd = abfd->link_next)
+          abfd != (bfd *) NULL; abfd = abfd->link.next)
        if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
          break;
 
@@ -1051,7 +1051,7 @@ gld${EMULATION_NAME}_after_open (void)
       bfd_boolean warn_eh_frame = FALSE;
       asection *s;
 
-      for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
+      for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
        {
          if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
            elfbfd = abfd;
@@ -1459,7 +1459,7 @@ gld${EMULATION_NAME}_before_allocation (void)
   if (rpath == NULL)
     rpath = (const char *) getenv ("LD_RUN_PATH");
 
-  for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
+  for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
     if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
       {
        const char *audit_libs = elf_dt_audit (abfd);
index 8561c17d68833650c56425cc59abbc24a6487307..5c5e1cbf4f44ac0bb75ba7a572363ccc12a34350 100644 (file)
@@ -38,7 +38,7 @@ gld${EMULATION_NAME}_after_open (void)
   after_open_default ();
 
   if (link_info.relocatable)
-    for (ibfd = link_info.input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    for (ibfd = link_info.input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
       if ((syms = bfd_get_outsymbols (ibfd)) != NULL
          && bfd_get_flavour (ibfd) == bfd_target_elf_flavour)
        for (sec = ibfd->sections; sec != NULL; sec = sec->next)
index e46889a0ff1e812f33dc194784784bb4a5925cf6..1a95d7cad64fff63d835b179c18f319d6b9ccaa3 100644 (file)
@@ -67,7 +67,7 @@ gld${EMULATION_NAME}_after_open (void)
       || link_info.relocatable)
     return;
 
-  for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
     {
       asection *datasec;
 
@@ -133,7 +133,7 @@ gld${EMULATION_NAME}_after_allocation (void)
       || link_info.relocatable)
     return;
 
-  for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
     {
       asection *datasec, *relsec;
       char *errmsg;
index 35b30881225213db2b92c97d4ccb251a52c52683..c5cfe77b2e1bfa019498c23ecc9e24017701a9e0 100644 (file)
@@ -75,7 +75,7 @@ m68k_elf_after_open (void)
         input file with a nonzero .data section.  The BFD backend will fill in
         these sections with magic numbers which can be used to relocate the
         data section at run time.  */
-      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
        {
          asection *datasec;
 
@@ -153,7 +153,7 @@ m68k_elf_after_allocation (void)
 
       /* If we are generating embedded relocs, call a special BFD backend
         routine to do the work.  */
-      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
        {
          asection *datasec, *relsec;
          char *errmsg;
index 96e6aa3810b6e1d66bbd7f1ea0b44a5131c8937d..cad67158ddc022ece7c88359e83a327581e6a38f 100644 (file)
@@ -105,7 +105,7 @@ nds32_elf_after_open (void)
 
   /* For now, make sure all object files are of the same architecture.
      We may try to merge object files with different architecture together.  */
-  for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+  for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
     {
       if (arch_ver == (unsigned int)-1 && E_N1_ARCH != (elf_elfheader (abfd)->e_flags & EF_NDS_ARCH))
        arch_ver = elf_elfheader (abfd)->e_flags & EF_NDS_ARCH ;
@@ -125,7 +125,7 @@ nds32_elf_after_open (void)
        }
 
       /* Append .ex9.itable section in the last input object file.  */
-      if (!link_info.relocatable && abfd->link_next == NULL)
+      if (!link_info.relocatable && abfd->link.next == NULL)
        {
          asection *itable;
          struct bfd_link_hash_entry *h;
@@ -165,7 +165,7 @@ nds32_elf_after_open (void)
   if (elf_hash_table (&link_info)->dynamic_sections_created
       || link_info.shared || link_info.pie)
     {
-      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
+      for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
        {
          if (!(elf_elfheader (abfd)->e_flags & E_NDS32_HAS_PIC))
            {
index 3a375083d0824ba4c16b1ae9fe5bfc6110442f7c..0466eb3f631e16ae580344f32406f39be5fa58a3 100644 (file)
@@ -1433,7 +1433,7 @@ gld_${EMULATION_NAME}_after_open (void)
        printf ("-%s\n", sym->root.string);
       bfd_hash_traverse (&link_info.hash->table, pr_sym, NULL);
 
-      for (a = link_info.input_bfds; a; a = a->link_next)
+      for (a = link_info.input_bfds; a; a = a->link.next)
        printf ("*%s\n",a->filename);
     }
 #endif
@@ -1444,7 +1444,7 @@ gld_${EMULATION_NAME}_after_open (void)
 
       /* Find a COFF input.  */
       for (abfd = link_info.input_bfds;
-          abfd != (bfd *) NULL; abfd = abfd->link_next)
+          abfd != (bfd *) NULL; abfd = abfd->link.next)
        if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
          break;
 
index 1f7865565683fdb4abe77c1b6533cc1c80df3a79..6e3ecd80011cbfb1fef92ffa731c34dfbc668166 100644 (file)
@@ -1391,7 +1391,7 @@ gld_${EMULATION_NAME}_after_open (void)
        printf ("-%s\n", sym->root.string);
       bfd_hash_traverse (&link_info.hash->table, pr_sym, NULL);
 
-      for (a = link_info.input_bfds; a; a = a->link_next)
+      for (a = link_info.input_bfds; a; a = a->link.next)
        printf ("*%s\n",a->filename);
     }
 #endif
@@ -1402,7 +1402,7 @@ gld_${EMULATION_NAME}_after_open (void)
 
       /* Find a COFF input.  */
       for (abfd = link_info.input_bfds;
-          abfd != (bfd *) NULL; abfd = abfd->link_next)
+          abfd != (bfd *) NULL; abfd = abfd->link.next)
        if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
          break;
 
index 585914fe387a7a3776c36608e71ea16e700ec3fe..add86dadbd736eb4b244027f3796c76225a81b2a 100644 (file)
@@ -6228,11 +6228,11 @@ ldlang_add_file (lang_input_statement_type *entry)
 
   /* The BFD linker needs to have a list of all input BFDs involved in
      a link.  */
-  ASSERT (entry->the_bfd->link_next == NULL);
+  ASSERT (entry->the_bfd->link.next == NULL);
   ASSERT (entry->the_bfd != link_info.output_bfd);
 
   *link_info.input_bfds_tail = entry->the_bfd;
-  link_info.input_bfds_tail = &entry->the_bfd->link_next;
+  link_info.input_bfds_tail = &entry->the_bfd->link.next;
   entry->the_bfd->usrdata = entry;
   bfd_set_gp_size (entry->the_bfd, g_switch_value);
 
index 2d987b827a7a893bdb3e78bc65054b02eb96857f..d4be6f0e2ef62c1c9516f6a24a5eb6185934a6be 100644 (file)
@@ -1213,7 +1213,7 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
     {
       bfd *b;
       /* Search all input files for a reference to SYMBOL.  */
-      for (b = info->input_bfds; b; b = b->link_next)
+      for (b = info->input_bfds; b; b = b->link.next)
        if (b != abfd && symbol_warning (warning, symbol, b))
          return TRUE;
       einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
index 0455606756209f884d1bab9dc77eb08f2664714f..d38f30da692ca9d0f6bff940c72d56d2897556f6 100644 (file)
@@ -654,7 +654,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
 
   /* First, run around to all the objects looking for the .drectve
      sections, and push those into the def file too.  */
-  for (b = info->input_bfds; b; b = b->link_next)
+  for (b = info->input_bfds; b; b = b->link.next)
     {
       s = bfd_get_section_by_name (b, ".drectve");
       if (s)
@@ -700,7 +700,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
   if ((pe_dll_export_everything || pe_def_file->num_exports == 0)
       && !pe_dll_exclude_all_symbols)
     {
-      for (b = info->input_bfds; b; b = b->link_next)
+      for (b = info->input_bfds; b; b = b->link.next)
        {
          asymbol **symbols;
          int nsyms;
@@ -1267,7 +1267,7 @@ pe_walk_relocs_of_symbol (struct bfd_link_info *info,
   bfd *b;
   asection *s;
 
-  for (b = info->input_bfds; b; b = b->link_next)
+  for (b = info->input_bfds; b; b = b->link.next)
     {
       asymbol **symbols;
 
@@ -1330,7 +1330,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
   struct bfd_section *s;
 
   total_relocs = 0;
-  for (b = info->input_bfds; b; b = b->link_next)
+  for (b = info->input_bfds; b; b = b->link.next)
     for (s = b->sections; s; s = s->next)
       total_relocs += s->reloc_count;
 
@@ -1338,7 +1338,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
 
   total_relocs = 0;
   bi = 0;
-  for (bi = 0, b = info->input_bfds; b; bi++, b = b->link_next)
+  for (bi = 0, b = info->input_bfds; b; bi++, b = b->link.next)
     {
       arelent **relocs;
       int relsize, nrelocs;
@@ -2726,7 +2726,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename, struct bfd_link_
   ar_head = make_head (outarch);
 
   /* Iterate the input BFDs, looking for exclude-modules-for-implib.  */
-  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+  for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
     {
       /* Iterate the exclude list.  */
       struct exclude_list_struct *ex;