Tue Jan 19 09:06:14 1993 Ian Lance Taylor (ian@cygnus.com)
+ * aoutx.h (swap_ext_reloc_in, swap_std_reloc_in),
+ bout.c (b_out_slurp_reloc_table),
+ coff-mips.c (ecoff_swap_reloc_in),
+ coff-msym.c (ecoff_swap_sym_in, ecoff_swap_rndx_in,
+ ecoff_swap_opt_in): Added casts to int to avoid muttering by
+ MIPS compiler.
+
* bfd-in.h (bfd_asymbol_value): Add needed parentheses.
* libcoff-in.h: Update prototype for coff_count_linenumbers.
byte stream memory image, into the internal exec_header
structure.
-EXAMPLE
+SYNOPSIS
void aout_<size>_swap_exec_header_in,
(bfd *abfd,
struct external_exec *raw_bytes,
Swaps the information in an internal exec header structure
into the supplied buffer ready for writing to disk.
-EXAMPLE
+SYNOPSIS
void aout_<size>_swap_exec_header_out
(bfd *abfd,
struct internal_exec *execp,
environments "finish up" function just before returning, to
handle any last-minute setup.
-EXAMPLE
+SYNOPSIS
bfd_target *aout_<size>_some_aout_object_p
(bfd *abfd,
bfd_target *(*callback_to_real_object_p)());
DESCRIPTION
This routine initializes a BFD for use with a.out files.
-EXAMPLE
+SYNOPSIS
boolean aout_<size>_mkobject, (bfd *);
*/
If the architecture is understood, machine type 0 (default)
should always be understood.
-EXAMPLE
+SYNOPSIS
enum machine_type aout_<size>_machine_type
(enum bfd_architecture arch,
unsigned long machine));
values supplied. Verifies that the format can support the
architecture required.
-EXAMPLE
+SYNOPSIS
boolean aout_<size>_set_arch_mach,
(bfd *,
enum bfd_architecture,
/*
FUNCTION
- aout_<size>new_section_hook
+ aout_<size>_new_section_hook
DESCRIPTION
Called by the BFD in response to a @code{bfd_make_section}
request.
-EXAMPLE
+SYNOPSIS
boolean aout_<size>_new_section_hook,
(bfd *abfd,
asection *newsect));
aout_symbol_type *new =
(aout_symbol_type *)bfd_zalloc (abfd, sizeof (aout_symbol_type));
new->symbol.the_bfd = abfd;
-
+
return &new->symbol;
}
PUT_WORD (abfd, 0, (unsigned char *)nsp.e_strx);
}
- if (g->the_bfd->xvec->flavour == abfd->xvec->flavour)
+ if (bfd_asymbol_flavour(g) == abfd->xvec->flavour)
{
bfd_h_put_16(abfd, aout_symbol(g)->desc, nsp.e_desc);
bfd_h_put_8(abfd, aout_symbol(g)->other, nsp.e_other);
/* now the fun stuff */
if (abfd->xvec->header_byteorder_big_p != false) {
- r_index = (bytes->r_index[0] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[2];
+ r_index = ( ((int) bytes->r_index[0] << 16)
+ | ((int) bytes->r_index[1] << 8)
+ | (int) bytes->r_index[2]);
r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
r_type = (bytes->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
>> RELOC_EXT_BITS_TYPE_SH_BIG;
} else {
- r_index = (bytes->r_index[2] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[0];
+ r_index = ( ((int) bytes->r_index[2] << 16)
+ | ((int) bytes->r_index[1] << 8)
+ | (int) bytes->r_index[0]);
r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
r_type = (bytes->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
>> RELOC_EXT_BITS_TYPE_SH_LITTLE;
/* now the fun stuff */
if (abfd->xvec->header_byteorder_big_p != false) {
- r_index = (bytes->r_index[0] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[2];
+ r_index = ( ((int) bytes->r_index[0] << 16)
+ | ((int) bytes->r_index[1] << 8)
+ | (int) bytes->r_index[2]);
r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
r_baserel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_BASEREL_BIG));
r_length = (bytes->r_type[0] & RELOC_STD_BITS_LENGTH_BIG)
>> RELOC_STD_BITS_LENGTH_SH_BIG;
} else {
- r_index = (bytes->r_index[2] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[0];
+ r_index = ( ((int) bytes->r_index[2] << 16)
+ | ((int) bytes->r_index[1] << 8)
+ | (int) bytes->r_index[0]);
r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
r_baserel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_BASEREL_LITTLE));
if (section_code == '?')
{
int type_code = aout_symbol(symbol)->type & 0xff;
- char *stab_name = aout_stab_name(type_code);
+ CONST char *stab_name = aout_stab_name(type_code);
char buf[10];
if (stab_name == NULL)
{
cache_ptr->howto = 0;
if (abfd->xvec->header_byteorder_big_p)
{
- symnum = (raw[4] << 16) | (raw[5] << 8) | raw[6];
+ symnum = ((int) raw[4] << 16) | ((int) raw[5] << 8) | (int) raw[6];
}
else
{
- symnum = (raw[6] << 16) | (raw[5] << 8) | raw[4];
+ symnum = ((int) raw[6] << 16) | ((int) raw[5] << 8) | (int) raw[4];
}
if (raw[7] & extern_mask)
| ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
>> SYM_BITS2_SC_SH_BIG);
intern->reserved = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
- intern->index = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
+ intern->index = (((int) ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
<< SYM_BITS2_INDEX_SH_LEFT_BIG)
- | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
- | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
+ | ((int) ext->s_bits3[0]
+ << SYM_BITS3_INDEX_SH_LEFT_BIG)
+ | ((int) ext->s_bits4[0]
+ << SYM_BITS4_INDEX_SH_LEFT_BIG);
} else {
intern->st = (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
>> SYM_BITS1_ST_SH_LITTLE;
| ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
<< SYM_BITS2_SC_SH_LEFT_LITTLE);
intern->reserved = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
- intern->index = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
+ intern->index = (((int) ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
>> SYM_BITS2_INDEX_SH_LITTLE)
- | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
- | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
+ | ((int) ext->s_bits3[0]
+ << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
+ | ((int) ext->s_bits4[0]
+ << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
}
#ifdef TEST
intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_BIG)
| ((ext->r_bits[1] & RNDX_BITS1_RFD_BIG)
>> RNDX_BITS1_RFD_SH_BIG);
- intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_BIG)
+ intern->index = (((int) ext->r_bits[1] & RNDX_BITS1_INDEX_BIG)
<< RNDX_BITS1_INDEX_SH_LEFT_BIG)
- | (ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_BIG)
- | (ext->r_bits[3] << RNDX_BITS3_INDEX_SH_LEFT_BIG);
+ | ((int) ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_BIG)
+ | ((int) ext->r_bits[3] << RNDX_BITS3_INDEX_SH_LEFT_BIG);
} else {
intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_LITTLE)
| ((ext->r_bits[1] & RNDX_BITS1_RFD_LITTLE)
<< RNDX_BITS1_RFD_SH_LEFT_LITTLE);
- intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_LITTLE)
+ intern->index = (((int) ext->r_bits[1] & RNDX_BITS1_INDEX_LITTLE)
>> RNDX_BITS1_INDEX_SH_LITTLE)
- | (ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_LITTLE)
- | (ext->r_bits[3] << RNDX_BITS3_INDEX_SH_LEFT_LITTLE);
+ | ((int) ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_LITTLE)
+ | ((int) ext->r_bits[3] << RNDX_BITS3_INDEX_SH_LEFT_LITTLE);
}
#ifdef TEST
if (abfd->xvec->header_byteorder_big_p != false)
{
intern->ot = ext->o_bits1[0];
- intern->value = ((ext->o_bits2[0] << OPT_BITS2_VALUE_SH_LEFT_BIG)
- | (ext->o_bits3[0] << OPT_BITS2_VALUE_SH_LEFT_BIG)
- | (ext->o_bits4[0] << OPT_BITS2_VALUE_SH_LEFT_BIG));
+ intern->value = (((int) ext->o_bits2[0]
+ << OPT_BITS2_VALUE_SH_LEFT_BIG)
+ | ((int) ext->o_bits3[0]
+ << OPT_BITS2_VALUE_SH_LEFT_BIG)
+ | ((int) ext->o_bits4[0]
+ << OPT_BITS2_VALUE_SH_LEFT_BIG));
}
else
{
intern->ot = ext->o_bits1[0];
- intern->value = ((ext->o_bits2[0] << OPT_BITS2_VALUE_SH_LEFT_LITTLE)
- | (ext->o_bits3[0] << OPT_BITS2_VALUE_SH_LEFT_LITTLE)
- | (ext->o_bits4[0] << OPT_BITS2_VALUE_SH_LEFT_LITTLE));
+ intern->value = (((int) ext->o_bits2[0]
+ << OPT_BITS2_VALUE_SH_LEFT_LITTLE)
+ | ((int) ext->o_bits3[0]
+ << OPT_BITS2_VALUE_SH_LEFT_LITTLE)
+ | ((int) ext->o_bits4[0]
+ << OPT_BITS2_VALUE_SH_LEFT_LITTLE));
}
ecoff_swap_rndx_in (abfd->xvec->header_byteorder_big_p != false,