summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-06-27 11:54:09 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-06-27 11:54:09 +0000
commit8f183b8c0d86c0919a52c0535c5aa60deacec542 (patch)
tree47e6dc9bca161f58c0cb396f2a98fe89cdc45391
parente0e6a14256086a364c840e343c36a28390bd395c (diff)
downloadgdb-8f183b8c0d86c0919a52c0535c5aa60deacec542.tar.gz
bfd/
* bfd.c (struct bfd): Rename "next" to "archive_next". * archive.c: Rename uses throughout file. * archive64.c: Likewise. * coff-rs6000.c: Likewise. * ecoff.c: Likewise. * som.c: Likewise. * bfd-in2.h: Regenerate. binutils/ * ar.c: Rename uses of bfd.next to bfd.archive_next throughout. * arsup.c: Likewise. * binemul.c: Likewise. * objcopy.c: Likewise. * dlltool.c: Likewise. ld/ * pe-dll.c: Rename uses of bfd.next to bfd.archive_next throughout.
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/archive.c25
-rw-r--r--bfd/archive64.c2
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/bfd.c2
-rw-r--r--bfd/coff-rs6000.c29
-rw-r--r--bfd/ecoff.c2
-rw-r--r--bfd/som.c10
8 files changed, 49 insertions, 31 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a35e408636c..cdb4784efe4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,13 @@
2007-06-27 Alan Modra <amodra@bigpond.net.au>
+ * bfd.c (struct bfd): Rename "next" to "archive_next".
+ * archive.c: Rename uses throughout file.
+ * archive64.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * ecoff.c: Likewise.
+ * som.c: Likewise.
+ * bfd-in2.h: Regenerate.
+
* elf32-ppc.c (ppc_elf_select_plt_layout): Properly iterate over
input bfds.
* elf32-spu.c (spu_elf_create_sections): Likewise.
diff --git a/bfd/archive.c b/bfd/archive.c
index f209c401fe3..053ad47dfdd 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1234,7 +1234,9 @@ _bfd_construct_extended_name_table (bfd *abfd,
*tablen = 0;
/* Figure out how long the table should be. */
- for (current = abfd->archive_head; current != NULL; current = current->next)
+ for (current = abfd->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
const char *normal;
unsigned int thislen;
@@ -1286,8 +1288,9 @@ _bfd_construct_extended_name_table (bfd *abfd,
*tablen = total_namelen;
strptr = *tabloc;
- for (current = abfd->archive_head; current != NULL; current =
- current->next)
+ for (current = abfd->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
const char *normal;
unsigned int thislen;
@@ -1637,7 +1640,9 @@ _bfd_write_archive_contents (bfd *arch)
/* Verify the viability of all entries; if any of them live in the
filesystem (as opposed to living in an archive open for input)
then construct a fresh ar_hdr for them. */
- for (current = arch->archive_head; current; current = current->next)
+ for (current = arch->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
/* This check is checking the bfds for the objects we're reading
from (which are usually either an object file or archive on
@@ -1705,7 +1710,9 @@ _bfd_write_archive_contents (bfd *arch)
}
}
- for (current = arch->archive_head; current; current = current->next)
+ for (current = arch->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
char buffer[DEFAULT_BUFFERSIZE];
unsigned int remaining = arelt_size (current);
@@ -1802,12 +1809,12 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
/* Drop all the files called __.SYMDEF, we're going to make our own. */
while (arch->archive_head &&
strcmp (arch->archive_head->filename, "__.SYMDEF") == 0)
- arch->archive_head = arch->archive_head->next;
+ arch->archive_head = arch->archive_head->archive_next;
/* Map over each element. */
for (current = arch->archive_head;
current != NULL;
- current = current->next, elt_no++)
+ current = current->archive_next, elt_no++)
{
if (bfd_check_format (current, bfd_object)
&& (bfd_get_file_flags (current) & HAS_SYMS) != 0)
@@ -1964,7 +1971,7 @@ bsd_write_armap (bfd *arch,
{
firstreal += arelt_size (current) + sizeof (struct ar_hdr);
firstreal += firstreal % 2;
- current = current->next;
+ current = current->archive_next;
}
while (current != map[count].u.abfd);
}
@@ -2134,7 +2141,7 @@ coff_write_armap (bfd *arch,
archive_member_file_ptr += arelt_size (current) + sizeof (struct ar_hdr);
/* Remember aboout the even alignment. */
archive_member_file_ptr += archive_member_file_ptr % 2;
- current = current->next;
+ current = current->archive_next;
}
/* Now write the strings themselves. */
diff --git a/bfd/archive64.c b/bfd/archive64.c
index d02b74999c0..5e2bf1198c2 100644
--- a/bfd/archive64.c
+++ b/bfd/archive64.c
@@ -215,7 +215,7 @@ bfd_elf64_archive_write_armap (bfd *arch,
+ sizeof (struct ar_hdr));
/* remember about the even alignment */
archive_member_file_ptr += archive_member_file_ptr % 2;
- current = current->next;
+ current = current->archive_next;
}
/* now write the strings themselves */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index e08dddf0595..e09d836e0d1 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -4646,7 +4646,7 @@ struct bfd
/* Stuff only useful for archives. */
void *arelt_data;
struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *next; /* The next BFD in the archive. */
+ struct bfd *archive_next; /* The next BFD in the archive. */
struct bfd *archive_head; /* The first BFD in the archive. */
bfd_boolean has_armap;
diff --git a/bfd/bfd.c b/bfd/bfd.c
index e4c733c86fd..b1c49aa08f4 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -139,7 +139,7 @@ CODE_FRAGMENT
. {* Stuff only useful for archives. *}
. void *arelt_data;
. struct bfd *my_archive; {* The containing archive BFD. *}
-. struct bfd *next; {* The next BFD in the archive. *}
+. struct bfd *archive_next; {* The next BFD in the archive. *}
. struct bfd *archive_head; {* The first BFD in the archive. *}
. bfd_boolean has_armap;
.
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index ae75f65b566..f446f497306 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1649,7 +1649,7 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
+ SXCOFFARFMAG
+ arelt_size (sub));
fileoff = (fileoff + 1) &~ 1;
- sub = sub->next;
+ sub = sub->archive_next;
}
for (i = 0; i < orl_count; i++)
@@ -1820,7 +1820,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
}
i++;
}
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -1924,7 +1924,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ SXCOFFARFMAG
+ arelt_size (current_bfd));
fileoff += fileoff & 1;
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -1945,7 +1945,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
}
i++;
}
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -2020,7 +2020,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ SXCOFFARFMAG
+ arelt_size (current_bfd));
fileoff += fileoff & 1;
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -2041,7 +2041,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
}
i++;
}
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -2100,7 +2100,7 @@ xcoff_write_archive_contents_old (abfd)
count = 0;
total_namlen = 0;
- for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
+ for (sub = abfd->archive_head; sub != NULL; sub = sub->archive_next)
{
++count;
total_namlen += strlen (normalize_filename (sub)) + 1;
@@ -2116,7 +2116,9 @@ xcoff_write_archive_contents_old (abfd)
hasobjects = FALSE;
prevoff = 0;
nextoff = SIZEOF_AR_FILE_HDR;
- for (sub = abfd->archive_head, i = 0; sub != NULL; sub = sub->next, i++)
+ for (sub = abfd->archive_head, i = 0;
+ sub != NULL;
+ sub = sub->archive_next, i++)
{
const char *name;
bfd_size_type namlen;
@@ -2264,7 +2266,7 @@ xcoff_write_archive_contents_old (abfd)
abfd) != XCOFFARMAG_ELEMENT_SIZE)
return FALSE;
}
- for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
+ for (sub = abfd->archive_head; sub != NULL; sub = sub->archive_next)
{
const char *name;
bfd_size_type namlen;
@@ -2334,7 +2336,7 @@ xcoff_write_archive_contents_big (abfd)
hasobjects = FALSE;
for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0;
current_bfd != NULL;
- current_bfd = current_bfd->next, count++)
+ current_bfd = current_bfd->archive_next, count++)
{
total_namlen += strlen (normalize_filename (current_bfd)) + 1;
@@ -2356,7 +2358,7 @@ xcoff_write_archive_contents_big (abfd)
nextoff = SIZEOF_AR_FILE_HDR_BIG;
for (current_bfd = abfd->archive_head, i = 0;
current_bfd != NULL;
- current_bfd = current_bfd->next, i++)
+ current_bfd = current_bfd->archive_next, i++)
{
const char *name;
bfd_size_type namlen;
@@ -2523,8 +2525,9 @@ xcoff_write_archive_contents_big (abfd)
offsets = NULL;
}
- for (current_bfd = abfd->archive_head; current_bfd != NULL;
- current_bfd = current_bfd->next)
+ for (current_bfd = abfd->archive_head;
+ current_bfd != NULL;
+ current_bfd = current_bfd->archive_next)
{
const char *name;
size_t namlen;
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 55a95969b72..45cdb1ddb43 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -3097,7 +3097,7 @@ _bfd_ecoff_write_armap (bfd *abfd,
{
firstreal += arelt_size (current) + sizeof (struct ar_hdr);
firstreal += firstreal % 2;
- current = current->next;
+ current = current->archive_next;
}
while (current != map[i].u.abfd);
}
diff --git a/bfd/som.c b/bfd/som.c
index 4429fcfc594..28eb885bfe2 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -5768,7 +5768,7 @@ som_bfd_prep_for_ar_write (bfd *abfd,
if (curr_bfd->format != bfd_object
|| curr_bfd->xvec->flavour != bfd_target_som_flavour)
{
- curr_bfd = curr_bfd->next;
+ curr_bfd = curr_bfd->archive_next;
continue;
}
@@ -5813,7 +5813,7 @@ som_bfd_prep_for_ar_write (bfd *abfd,
(*stringsize)++;
}
- curr_bfd = curr_bfd->next;
+ curr_bfd = curr_bfd->archive_next;
}
return TRUE;
}
@@ -5922,7 +5922,7 @@ som_bfd_ar_write_symbol_stuff (bfd *abfd,
if (curr_bfd->format != bfd_object
|| curr_bfd->xvec->flavour != bfd_target_som_flavour)
{
- curr_bfd = curr_bfd->next;
+ curr_bfd = curr_bfd->archive_next;
continue;
}
@@ -6038,7 +6038,7 @@ som_bfd_ar_write_symbol_stuff (bfd *abfd,
linker requires objects begin on an even boundary. So round
up the current offset as necessary. */
curr_som_offset = (curr_som_offset + 0x1) &~ (unsigned) 1;
- curr_bfd = curr_bfd->next;
+ curr_bfd = curr_bfd->archive_next;
som_index++;
}
@@ -6144,7 +6144,7 @@ som_write_armap (bfd *abfd,
if (curr_bfd->format == bfd_object
&& curr_bfd->xvec->flavour == bfd_target_som_flavour)
lst.module_count++;
- curr_bfd = curr_bfd->next;
+ curr_bfd = curr_bfd->archive_next;
}
lst.module_limit = lst.module_count;
lst.dir_loc = lst_size;