aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-06-13 19:10:57 +0930
committerAlan Modra <amodra@gmail.com>2014-06-13 19:10:57 +0930
commitc72f2fb2bb6a3e1850b081dbfce4040970fae8e6 (patch)
tree956ef2777825e25830add0776f1155ff6181c654
parent07cccc39f31f4b77607fd9487f33e242969475ca (diff)
downloadgdb-c72f2fb2bb6a3e1850b081dbfce4040970fae8e6.zip
gdb-c72f2fb2bb6a3e1850b081dbfce4040970fae8e6.tar.gz
gdb-c72f2fb2bb6a3e1850b081dbfce4040970fae8e6.tar.bz2
Make bfd.link_next field a union
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.
-rw-r--r--bfd/ChangeLog18
-rw-r--r--bfd/aoutx.h6
-rw-r--r--bfd/bfd-in2.h8
-rw-r--r--bfd/bfd.c8
-rw-r--r--bfd/coff-ppc.c2
-rw-r--r--bfd/coff-rs6000.c2
-rw-r--r--bfd/cofflink.c4
-rw-r--r--bfd/ecoff.c2
-rw-r--r--bfd/elf-m10300.c4
-rw-r--r--bfd/elf32-arm.c16
-rw-r--r--bfd/elf32-avr.c6
-rw-r--r--bfd/elf32-hppa.c8
-rw-r--r--bfd/elf32-i386.c2
-rw-r--r--bfd/elf32-lm32.c4
-rw-r--r--bfd/elf32-m32c.c4
-rw-r--r--bfd/elf32-m32r.c2
-rw-r--r--bfd/elf32-m68hc1x.c8
-rw-r--r--bfd/elf32-metag.c8
-rw-r--r--bfd/elf32-microblaze.c2
-rw-r--r--bfd/elf32-nds32.c8
-rw-r--r--bfd/elf32-nios2.c8
-rw-r--r--bfd/elf32-or1k.c2
-rw-r--r--bfd/elf32-ppc.c8
-rw-r--r--bfd/elf32-rl78.c4
-rw-r--r--bfd/elf32-s390.c4
-rw-r--r--bfd/elf32-score.c2
-rw-r--r--bfd/elf32-score7.c2
-rw-r--r--bfd/elf32-sh.c2
-rw-r--r--bfd/elf32-spu.c28
-rw-r--r--bfd/elf32-tic6x.c6
-rw-r--r--bfd/elf32-tilepro.c2
-rw-r--r--bfd/elf32-xstormy16.c4
-rw-r--r--bfd/elf32-xtensa.c14
-rw-r--r--bfd/elf64-alpha.c2
-rw-r--r--bfd/elf64-hppa.c2
-rw-r--r--bfd/elf64-ia64-vms.c2
-rw-r--r--bfd/elf64-mmix.c2
-rw-r--r--bfd/elf64-ppc.c30
-rw-r--r--bfd/elf64-s390.c4
-rw-r--r--bfd/elf64-x86-64.c2
-rw-r--r--bfd/elflink.c26
-rw-r--r--bfd/elfnn-aarch64.c6
-rw-r--r--bfd/elfxx-mips.c6
-rw-r--r--bfd/elfxx-sparc.c2
-rw-r--r--bfd/elfxx-tilegx.c2
-rw-r--r--bfd/linker.c4
-rw-r--r--bfd/pdp11.c6
-rw-r--r--bfd/peXXigen.c2
-rw-r--r--bfd/simple.c2
-rw-r--r--bfd/sunos.c2
-rw-r--r--bfd/vms-alpha.c6
-rw-r--r--bfd/xcofflink.c14
-rw-r--r--include/ChangeLog4
-rw-r--r--include/bfdlink.h2
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/emultempl/cr16elf.em4
-rw-r--r--ld/emultempl/elf32.em6
-rw-r--r--ld/emultempl/genelf.em2
-rw-r--r--ld/emultempl/m68kcoff.em4
-rw-r--r--ld/emultempl/m68kelf.em4
-rw-r--r--ld/emultempl/nds32elf.em6
-rw-r--r--ld/emultempl/pe.em4
-rw-r--r--ld/emultempl/pep.em4
-rw-r--r--ld/ldlang.c4
-rw-r--r--ld/ldmain.c2
-rw-r--r--ld/pe-dll.c12
66 files changed, 216 insertions, 179 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 009612e..b337861 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 79abe42..a2f7d16 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -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
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8b7f2ee..722cc2b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -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. */
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 41de1bb..6414865 100644
--- 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. *}
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index cf173a2..3c39afa 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -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;
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 4c41740..39b2db3 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -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];
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index bfb1ebb..d4e3345 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -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;
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index ed163d6..cf38e3e 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -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;
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 68307de..413e9da 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -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;
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 526d4f8..e0f1d1d 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -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;
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 45710a1..60a2c7f 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -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;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 1cc419c..262befd 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -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;
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 4470c52..e33a8c6 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -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;
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index 98db714..e694055 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -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)
{
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index ed7df9a..3e2c802 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -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;
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 9c59c02..8dba9f0 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -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;
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 747dafc..c96625c 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -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;
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index d1d4b41..b48ebb4 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -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;
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 9837b18..a4cc6a3 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -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;
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index 873a00f..d1a2c30 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -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)
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index f33b38a..4ce670b 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -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;
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index 956ec38..2353d0d 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -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;
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 344845d..bc793d7 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -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;
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 5e62edd..9124e0a 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -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;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 09b1fca..11c726f 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -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;
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 3223d46..1ab54cd 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -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;
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index c241077..0b3cf20 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -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;
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 259ddf0..34dfea2 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -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;
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index ac9c184..13806ad 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -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;
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index e3e897c..8381cfa 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -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;
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 4e6561d..b9a31d5 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -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;
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index 74adf64..f918a1e 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -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;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index adc0a02..09862e3 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -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))
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 403e436..968e45c 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -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;
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index b57497d..86f652d 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -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;
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 069340a..d14b909 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -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;
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index ad6757f..58fca92 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -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
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index b8d7465..1d5d4ab 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -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;
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 831c4a2..d7b2f08 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -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;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index f735e31..d230776 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -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;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6756fb1..2d953b5 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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;
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index d917c7e..65ca2a4 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -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;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 49da874..dddf83e 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -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);
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index a2bff23..3470f24 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -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;
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index d45f200..e206bc7 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -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;
diff --git a/bfd/linker.c b/bfd/linker.c
index 2e21054..1afe4ed 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -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;
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index e728928..8999af2 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -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
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 3a0dd13..3808d39 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -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");
diff --git a/bfd/simple.c b/bfd/simple.c
index 1331f9b..7d256bf 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -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;
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 99bed8d..27a658e 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -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)
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 1d2250e..66a1999 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -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;
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index ee90151..9841de6 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -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;
diff --git a/include/ChangeLog b/include/ChangeLog
index 253b066..eaf81fd 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -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
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 509d626..391b3a9 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -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;
diff --git a/ld/ChangeLog b/ld/ChangeLog
index d84e665..e1abf43 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
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.
* Makefile.in: Regenerate.
diff --git a/ld/emultempl/cr16elf.em b/ld/emultempl/cr16elf.em
index 730235e..02f5220 100644
--- a/ld/emultempl/cr16elf.em
+++ b/ld/emultempl/cr16elf.em
@@ -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;
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 3ebf3b5..39b4ccd 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -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);
diff --git a/ld/emultempl/genelf.em b/ld/emultempl/genelf.em
index 8561c17..5c5e1cb 100644
--- a/ld/emultempl/genelf.em
+++ b/ld/emultempl/genelf.em
@@ -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)
diff --git a/ld/emultempl/m68kcoff.em b/ld/emultempl/m68kcoff.em
index e46889a..1a95d7c 100644
--- a/ld/emultempl/m68kcoff.em
+++ b/ld/emultempl/m68kcoff.em
@@ -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;
diff --git a/ld/emultempl/m68kelf.em b/ld/emultempl/m68kelf.em
index 35b3088..c5cfe77 100644
--- a/ld/emultempl/m68kelf.em
+++ b/ld/emultempl/m68kelf.em
@@ -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;
diff --git a/ld/emultempl/nds32elf.em b/ld/emultempl/nds32elf.em
index 96e6aa3..cad6715 100644
--- a/ld/emultempl/nds32elf.em
+++ b/ld/emultempl/nds32elf.em
@@ -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))
{
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 3a37508..0466eb3 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -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;
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 1f78655..6e3ecd8 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -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;
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 585914f..add86da 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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);
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 2d987b8..d4be6f0 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -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);
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 0455606..d38f30d 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -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;