+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.
/* 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. */
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;
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
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. */
. 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. *}
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;
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];
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;
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;
/* 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;
/* 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;
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;
/* 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;
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;
/* 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;
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;
/* 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;
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;
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;
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;
/* 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;
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;
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;
/* 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;
/* 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;
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;
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;
/* 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;
/* 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;
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)
{
/* 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;
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;
/* 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;
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;
/* 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
/* 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;
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;
/* 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;
/* 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;
/* 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;
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;
/* 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;
/* 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;
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");
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)
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)
/* 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;
/* 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;
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;
/* 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;
/* 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;
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;
--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)
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);
/* 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;
/* 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;
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;
/* 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;
->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;
/* 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;
/* 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;
/* 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;
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;
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;
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));
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;
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;
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;
}
}
- 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;
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;
{
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;
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;
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;
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)
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;
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;
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;
/* 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;
/* 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;
/* 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;
/* 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;
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;
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;
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;
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))
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;
}
/* 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))
}
/* 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))
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;
/* 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;
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;
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
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;
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");
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;
/* 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;
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;
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;
/* 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;
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;
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;
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;
/* 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;
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;
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;
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;
/* 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;
/* 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;
}
/* 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;
/* 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;
{
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;
for (inputobj = info->input_bfds;
inputobj;
- inputobj = inputobj->link_next)
+ inputobj = inputobj->link.next)
{
asection *s;
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
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
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)
{
/* 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)
{
{
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)
{
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;
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;
/* 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;
/* 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;
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;
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;
/* 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;
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;
/* 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;
/* 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))
/* 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;
{
/* 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);
/* 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;
/* 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;
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
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;
/* 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. */
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;
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
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");
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;
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)
{
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)
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)
{
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;
{
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;
/* 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;
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;
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;
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))
{
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))
{
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;
+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
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;
+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.
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;
/* 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;
/* 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;
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;
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);
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)
|| 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;
|| 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;
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;
/* 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;
/* 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 ;
}
/* 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;
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))
{
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
/* 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;
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
/* 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;
/* 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);
{
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);
/* 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)
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;
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;
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;
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;
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;