Various noise

This commit is contained in:
Steve Chamberlain 1991-04-03 22:09:43 +00:00
parent a7fe4c5997
commit 0452b5aacf
1 changed files with 56 additions and 51 deletions

View File

@ -28,6 +28,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* $Id$
* $Log$
* Revision 1.2 1991/04/03 22:09:43 steve
* Various noise
*
* Revision 1.1.1.1 1991/03/21 21:10:42 gumby
* Back from Intel with Steve
*
* Revision 1.1 1991/03/21 21:10:42 gumby
* Initial revision
*
@ -259,7 +265,7 @@ snarf_ar_hdr (abfd)
namelen = 0;
while (namelen < ar_maxnamelen(abfd) &&
while (namelen < (unsigned)ar_maxnamelen(abfd) &&
( hdr.ar_name[namelen] != 0 &&
hdr.ar_name[namelen] != ' ' &&
hdr.ar_name[namelen] != ar_padchar(abfd))) {
@ -903,7 +909,7 @@ _bfd_write_archive_contents (arch)
BFD_SEND (arch, _bfd_truncate_arname,(arch,
current->filename,
arch_hdr(current)));
(char *) arch_hdr(current)));
}
@ -959,10 +965,12 @@ _bfd_write_archive_contents (arch)
return false;
}
if (bfd_seek (current, 0L, SEEK_SET) != 0L) goto syserr;
while (remaining) {
unsigned int amt = ((remaining <= DEFAULT_BUFFERSIZE) ? remaining :
DEFAULT_BUFFERSIZE);
while (remaining)
{
unsigned int amt = DEFAULT_BUFFERSIZE;
if (amt > remaining) {
amt = remaining;
}
if (bfd_read (buffer, amt, 1, current) != amt) goto syserr;
if (bfd_write (buffer, amt, 1, arch) != amt) goto syserr;
remaining -= amt;
@ -1011,19 +1019,15 @@ compute_and_write_armap (arch, elength)
unsigned int src_count;
storage = get_symtab_upper_bound (current);
if (storage == 0) {
nosymz:
fprintf (stderr, "%s: Symflags set but there are none?\n",
bfd_get_filename (current));
exit (1);
}
if (storage != 0) {
syms = (asymbol **) zalloc (storage);
if (syms == NULL) {
bfd_error = no_memory; /* FIXME -- memory leak */
return false;
}
symcount = bfd_canonicalize_symtab (current, syms);
if (symcount == 0) goto nosymz;
/* Now map over all the symbols, picking out the ones we want */
for (src_count = 0; src_count <symcount; src_count++) {
@ -1049,6 +1053,7 @@ compute_and_write_armap (arch, elength)
}
}
}
}
/* OK, now we have collected all the data, let's write them out */
if (!BFD_SEND (arch, write_armap,
(arch, elength, map, orl_count, stridx))) {