diff options
author | Dave Anglin <dave.anglin@nrc.ca> | 2002-10-25 02:45:54 +0000 |
---|---|---|
committer | Dave Anglin <dave.anglin@nrc.ca> | 2002-10-25 02:45:54 +0000 |
commit | 0593dbd37b565456ed00effb04039adf8625da62 (patch) | |
tree | b6bbc7745b4c2d1b80f5778a4fd1f437339f6e79 /bfd/aoutx.h | |
parent | a410b909c2c334451e3e9e5f01966e7f730a4745 (diff) | |
download | binutils-redhat-0593dbd37b565456ed00effb04039adf8625da62.tar.gz |
* aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
unsigned int.
(NAME(aout,final_link)): Cast enum used in assignment.
(aout_link_write_symbols): Cast enums in comparisons, int values to
boolean, enums in assignments to int.
(aout_link_input_section_std): Cast rel->r_index to unsigned int.
(aout_link_input_section_ext): Likewise. Cast enums used in comparisons
with unsigned ints.
(aout_link_reloc_link_order): Cast enum to int in assignment.
* archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
calls to char *.
* bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
assignment.
* bfd-in2.h (bfd_set_section_vma): Likewise.
* bfd.c (bfd_record_phdr): Cast enums in assignments.
* binary.c (bfd_alloc): Cast enum to long.
* coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
* dwarf2.c (read_abbrevs): Add casts to enum types.
(read_attribute_value): Likewise.
(arange_add): Cast result of bfd_zalloc call.
(comp_unit_contains_address): Return true and false.
(comp_unit_find_nearest_line): Cast return to boolean.
* format.c (bfd_check_format_matches, bfd_set_format): Likewise.
* gen-aout.c: define macro '_' if not defined.
* libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
(bfd_bwrite): Cast bfd_realloc to bfd_byte *.
(bfd_write_bigendian_4byte_int): Cast return to boolean.
(bfd_seek): Cast bfd_realloc to bfd_byte *.
(bfd_generic_is_local_label_name): Cast return to boolean.
* libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
* linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
struct bfd_hash_entry *.
(_bfd_generic_link_hash_newfunc): likewise.
(_bfd_generic_final_link): Cast enum to unsigned int.
* merge.c (sec_merge_emit): Cast return to boolean.
(merge_strings): Add casts to const unsigned char *.
* reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
(bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
* section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
struct bfd_hash_entry *.
(bfd_set_section_content): Add cast to PTR in comparison.
* simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
simple_dummy_unattached_reloc,
bfd_simple_get_relocated_section_contents): Add K&R declarations and
function definitions.
* srec.c (S3Forced): Initialize to false.
(srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
* stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
(_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
* syms.c (bfd_is_undefined_symclass): Cast return to boolean.
(_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
comparisons.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r-- | bfd/aoutx.h | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 7fa334ab48..107772dfc3 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -2261,8 +2261,8 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount) /* Now the fun stuff. */ if (bfd_header_big_endian (abfd)) { - r_index = ((bytes->r_index[0] << 16) - | (bytes->r_index[1] << 8) + r_index = (((unsigned int) bytes->r_index[0] << 16) + | ((unsigned int) bytes->r_index[1] << 8) | 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) @@ -2270,8 +2270,8 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount) } else { - r_index = ((bytes->r_index[2] << 16) - | (bytes->r_index[1] << 8) + r_index = (((unsigned int) bytes->r_index[2] << 16) + | ((unsigned int) bytes->r_index[1] << 8) | 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) @@ -2283,9 +2283,9 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount) /* Base relative relocs are always against the symbol table, regardless of the setting of r_extern. r_extern just reflects whether the symbol the reloc is against is local or global. */ - if (r_type == RELOC_BASE10 - || r_type == RELOC_BASE13 - || r_type == RELOC_BASE22) + if (r_type == (unsigned int) RELOC_BASE10 + || r_type == (unsigned int) RELOC_BASE13 + || r_type == (unsigned int) RELOC_BASE22) r_extern = 1; if (r_extern && r_index > symcount) @@ -2320,8 +2320,8 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount) /* Now the fun stuff. */ if (bfd_header_big_endian (abfd)) { - r_index = ((bytes->r_index[0] << 16) - | (bytes->r_index[1] << 8) + r_index = (((unsigned int) bytes->r_index[0] << 16) + | ((unsigned int) bytes->r_index[1] << 8) | 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)); @@ -2333,8 +2333,8 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount) } else { - r_index = ((bytes->r_index[2] << 16) - | (bytes->r_index[1] << 8) + r_index = (((unsigned int) bytes->r_index[2] << 16) + | ((unsigned int) bytes->r_index[1] << 8) | 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)); @@ -3891,7 +3891,7 @@ NAME(aout,final_link) (abfd, info, callback) for (p = o->link_order_head; p != NULL; p = p->next) { if (p->type == bfd_indirect_link_order) - p->u.indirect.section->linker_mark = true; + p->u.indirect.section->linker_mark = (unsigned int) true; } } @@ -4440,7 +4440,7 @@ aout_link_write_symbols (finfo, input_bfd) characters in the symbol names, not including the file numbers in types (the first number after an open parenthesis). */ - if (type == N_BINCL) + if (type == (int) N_BINCL) { struct external_nlist *incl_sym; int nest; @@ -4454,13 +4454,13 @@ aout_link_write_symbols (finfo, input_bfd) int incl_type; incl_type = H_GET_8 (input_bfd, incl_sym->e_type); - if (incl_type == N_EINCL) + if (incl_type == (int) N_EINCL) { if (nest == 0) break; --nest; } - else if (incl_type == N_BINCL) + else if (incl_type == (int) N_BINCL) ++nest; else if (nest == 0) { @@ -4485,7 +4485,7 @@ aout_link_write_symbols (finfo, input_bfd) /* If we have already included a header file with the same value, then replace this one with an N_EXCL symbol. */ - copy = ! finfo->info->keep_memory; + copy = (boolean) (! finfo->info->keep_memory); incl_entry = aout_link_includes_lookup (&finfo->includes, name, true, copy); if (incl_entry == NULL) @@ -4513,7 +4513,7 @@ aout_link_write_symbols (finfo, input_bfd) /* This is a duplicate header file. We must change it to be an N_EXCL entry, and mark all the included symbols to prevent outputting them. */ - type = N_EXCL; + type = (int) N_EXCL; nest = 0; for (incl_sym = sym + 1, incl_map = symbol_map + 1; @@ -4523,7 +4523,7 @@ aout_link_write_symbols (finfo, input_bfd) int incl_type; incl_type = H_GET_8 (input_bfd, incl_sym->e_type); - if (incl_type == N_EINCL) + if (incl_type == (int) N_EINCL) { if (nest == 0) { @@ -4532,7 +4532,7 @@ aout_link_write_symbols (finfo, input_bfd) } --nest; } - else if (incl_type == N_BINCL) + else if (incl_type == (int) N_BINCL) ++nest; else if (nest == 0) *incl_map = -1; @@ -4887,8 +4887,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs, if (bfd_header_big_endian (input_bfd)) { - r_index = ((rel->r_index[0] << 16) - | (rel->r_index[1] << 8) + r_index = (((unsigned int) rel->r_index[0] << 16) + | ((unsigned int) rel->r_index[1] << 8) | rel->r_index[2]); r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG)); r_pcrel = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_BIG)); @@ -4900,8 +4900,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs, } else { - r_index = ((rel->r_index[2] << 16) - | (rel->r_index[1] << 8) + r_index = (((unsigned int) rel->r_index[2] << 16) + | ((unsigned int) rel->r_index[1] << 8) | rel->r_index[0]); r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE)); r_pcrel = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE)); @@ -5223,8 +5223,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, if (bfd_header_big_endian (input_bfd)) { - r_index = ((rel->r_index[0] << 16) - | (rel->r_index[1] << 8) + r_index = (((unsigned int) rel->r_index[0] << 16) + | ((unsigned int) rel->r_index[1] << 8) | rel->r_index[2]); r_extern = (0 != (rel->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG)); r_type = ((rel->r_type[0] & RELOC_EXT_BITS_TYPE_BIG) @@ -5232,8 +5232,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, } else { - r_index = ((rel->r_index[2] << 16) - | (rel->r_index[1] << 8) + r_index = (((unsigned int) rel->r_index[2] << 16) + | ((unsigned int) rel->r_index[1] << 8) | rel->r_index[0]); r_extern = (0 != (rel->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE)); r_type = ((rel->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE) @@ -5249,16 +5249,16 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, /* We are generating a relocateable output file, and must modify the reloc accordingly. */ if (r_extern - || r_type == RELOC_BASE10 - || r_type == RELOC_BASE13 - || r_type == RELOC_BASE22) + || r_type == (unsigned int) RELOC_BASE10 + || r_type == (unsigned int) RELOC_BASE13 + || r_type == (unsigned int) RELOC_BASE22) { /* If we know the symbol this relocation is against, convert it into a relocation against a section. This is what the native linker does. */ - if (r_type == RELOC_BASE10 - || r_type == RELOC_BASE13 - || r_type == RELOC_BASE22) + if (r_type == (unsigned int) RELOC_BASE10 + || r_type == (unsigned int) RELOC_BASE13 + || r_type == (unsigned int) RELOC_BASE22) h = NULL; else h = sym_hashes[r_index]; @@ -5426,9 +5426,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, relocation = 0; } } - else if (r_type == RELOC_BASE10 - || r_type == RELOC_BASE13 - || r_type == RELOC_BASE22) + else if (r_type == (unsigned int) RELOC_BASE10 + || r_type == (unsigned int) RELOC_BASE13 + || r_type == (unsigned int) RELOC_BASE22) { struct external_nlist *sym; int type; @@ -5510,9 +5510,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, to skip this reloc. */ if (hundef && ! finfo->info->shared - && r_type != RELOC_BASE10 - && r_type != RELOC_BASE13 - && r_type != RELOC_BASE22) + && r_type != (unsigned int) RELOC_BASE10 + && r_type != (unsigned int) RELOC_BASE13 + && r_type != (unsigned int) RELOC_BASE22) { const char *name; @@ -5526,7 +5526,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, return false; } - if (r_type != RELOC_SPARC_REV32) + if (r_type != (unsigned int) RELOC_SPARC_REV32) r = MY_final_link_relocate (howto_table_ext + r_type, input_bfd, input_section, contents, r_addr, relocation, @@ -5555,9 +5555,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs, if (h != NULL) name = h->root.root.string; else if (r_extern - || r_type == RELOC_BASE10 - || r_type == RELOC_BASE13 - || r_type == RELOC_BASE22) + || r_type == (unsigned int) RELOC_BASE10 + || r_type == (unsigned int) RELOC_BASE13 + || r_type == (unsigned int) RELOC_BASE22) name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); else @@ -5673,7 +5673,7 @@ aout_link_reloc_link_order (finfo, o, p) int r_relative; int r_length; - r_pcrel = howto->pc_relative; + r_pcrel = (int) howto->pc_relative; r_baserel = (howto->type & 8) != 0; r_jmptable = (howto->type & 16) != 0; r_relative = (howto->type & 32) != 0; |