/* BFD back-end for IBM RS/6000 "XCOFF" files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
return false;
}
\f
-
void
_bfd_xcoff_swap_sym_in (abfd, ext1, in1)
bfd *abfd;
SYMENT *ext = (SYMENT *)ext1;
struct internal_syment *in = (struct internal_syment *)in1;
- if(ext->e.e_name[0] != 0)
+ if (ext->e.e_name[0] != 0)
{
memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
}
struct internal_syment *in = (struct internal_syment *)inp;
SYMENT *ext =(SYMENT *)extp;
- if(in->_n._n_name[0] != 0)
+ if (in->_n._n_name[0] != 0)
{
memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
}
end:
return bfd_coff_auxesz (abfd);
}
-
\f
/* The XCOFF reloc table. Actually, XCOFF relocations specify the
bitsize and whether they are signed or not, along with a
return NULL;
}
}
-
\f
/* XCOFF archive support. The original version of this code was by
Damon A. Permezel. It was enhanced to permit cross support, and
/* Write out an XCOFF armap. */
-/*ARGSUSED*/
static boolean
xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
bfd *abfd;
struct xcoff_ar_hdr_big hdr;
char *p;
unsigned char buf[4];
+ const bfd_arch_info_type *arch_info = NULL;
bfd *sub;
file_ptr fileoff;
- const bfd_arch_info_type *arch_info;
bfd *object_bfd;
unsigned int i;
if (bits64)
sprintf (hdr.nextoff, "%d", 0);
else
- sprintf (hdr.nextoff, "%d", (strtol (prevoff, (char **) NULL, 10)
+ sprintf (hdr.nextoff, "%ld", (strtol (prevoff, (char **) NULL, 10)
+ 4 + orl_ccount * 4 + stridx));
memcpy (hdr.prevoff, prevoff, sizeof (hdr.prevoff));
sprintf (hdr.date, "%d", 0);
if (ob != object_bfd)
arch_info = bfd_get_arch_info (ob);
- if ((arch_info->bits_per_address == 64) != bits64)
+
+ if (arch_info && (arch_info->bits_per_address == 64) != bits64)
continue;
name = *map[i].name;
return true;
}
-/*ARGSUSED*/
static boolean
xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
bfd *abfd;
unsigned int i;
unsigned int orl_count_32, orl_count_64;
unsigned int stridx_32, stridx_64;
- const bfd_arch_info_type *arch_info;
+ const bfd_arch_info_type *arch_info = NULL;
bfd *object_bfd;
/* First, we look through the symbols and work out which are
if (ob != object_bfd)
arch_info = bfd_get_arch_info (ob);
len = strlen (*map[i].name) + 1;
- if (arch_info->bits_per_address == 64)
+ if (arch_info && arch_info->bits_per_address == 64)
{
orl_count_64++;
stridx_64 += len;
return true;
}
-/*ARGSUSED*/
boolean
_bfd_xcoff_write_armap (abfd, elength, map, orl_count, stridx)
bfd *abfd;
/* We can't use the usual coff_sizeof_headers routine, because AIX
always uses an a.out header. */
-/*ARGSUSED*/
int
_bfd_xcoff_sizeof_headers (abfd, reloc)
bfd *abfd;
size += abfd->section_count * SCNHSZ;
return size;
}
-\f
-