diff options
author | Ian Lance Taylor <ian@airs.com> | 1993-12-31 21:51:05 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1993-12-31 21:51:05 +0000 |
commit | 728472f17007c03cb88525ffe4042c4370b26e78 (patch) | |
tree | 140bc3692c15364d956dcebd991cb93fca387d8c /bfd/aoutx.h | |
parent | 1d166443d458b03f3fc1c1823456b91b930f5507 (diff) | |
download | gdb-728472f17007c03cb88525ffe4042c4370b26e78.zip gdb-728472f17007c03cb88525ffe4042c4370b26e78.tar.gz gdb-728472f17007c03cb88525ffe4042c4370b26e78.tar.bz2 |
Minor cleanups suggested by CodeCenter.
* aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
appropriate.
* aoutx.h (struct external_exec): Removed unnecessary declaration.
(NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
(adjust_z_magic): Removed useless variable data_vma.
(stringtab_init): Initialize hash_zero.
(add_to_stringtab): Removed unused fourth argument.
(NAME(aout,swap_std_reloc_out)): Removed useless variable
r_addend.
(aout_link_input_section): Added some casts.
* archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
Minor code rewriting to make it more C like.
(do_slurp_bsd_armap): Added some casts.
* ecoff.c (ecoff_write_object_contents): Removed useless variable
scn_base.
(ecoff_write_armap): Added some casts. Use "" rather than "\0".
* ecofflink.c (bfd_ecoff_write_debug): Added a cast.
* libaout.h (struct internal_exec): Removed unnecessary
declaration.
* linker.c (_bfd_generic_indirect_link_order): Added a cast.
* opncls.c (new_bfd): Removed a cast.
* reloc.c (bfd_generic_get_relocated_section_contents): Added
some casts.
* srec.c (internal_srec_write_object_contents): Removed useless
variable bytes_written.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r-- | bfd/aoutx.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 57eeaa6..8e05efe 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -128,7 +128,6 @@ DESCRIPTION #include <ansidecl.h> #include "bfdlink.h" -struct external_exec; #include "libaout.h" #include "libbfd.h" #include "aout/aout64.h" @@ -409,6 +408,10 @@ DEFUN(NAME(aout,some_aout_object_p),(abfd, execp, callback_to_real_object_p), /* The default symbol entry size is that of traditional Unix. */ obj_symbol_entry_size (abfd) = EXTERNAL_NLIST_SIZE; + obj_aout_external_syms (abfd) = NULL; + obj_aout_external_strings (abfd) = NULL; + obj_aout_sym_hashes (abfd) = NULL; + /* Create the sections. This is raunchy, but bfd_close wants to reclaim them. */ @@ -737,7 +740,6 @@ adjust_z_magic (abfd, execp) file_ptr text_end; CONST struct aout_backend_data *abdp; int ztih; /* Nonzero if text includes exec header. */ - bfd_vma data_vma; abdp = aout_backend_info (abfd); @@ -769,7 +771,6 @@ adjust_z_magic (abfd, execp) vma = obj_textsec(abfd)->vma + obj_textsec(abfd)->_raw_size; obj_datasec(abfd)->vma = BFD_ALIGN (vma, adata(abfd).segment_size); } - data_vma = obj_datasec(abfd)->vma; if (abdp && abdp->zmagic_mapped_contiguous) { text_pad = (obj_datasec(abfd)->vma @@ -1585,6 +1586,7 @@ stringtab_init (tab) { tab->strings = 0; tab->output_order = 0; + tab->hash_zero = 0; tab->end = &tab->output_order; /* Initial string table length includes size of length field. */ @@ -1628,11 +1630,10 @@ log2 (num) entry into the string table should be irrelevant -- it just has to return a valid index. */ static bfd_size_type -add_to_stringtab (abfd, str, tab, check) +add_to_stringtab (abfd, str, tab) bfd *abfd; CONST char *str; struct stringtab_data *tab; - int check; { struct stringtab_entry **ep; register struct stringtab_entry *entry; @@ -1916,7 +1917,6 @@ DEFUN(NAME(aout,swap_std_reloc_out),(abfd, g, natptr), unsigned int r_length; int r_pcrel; int r_baserel, r_jmptable, r_relative; - unsigned int r_addend; asection *output_section = sym->section->output_section; PUT_WORD(abfd, g->address, natptr->r_address); @@ -1929,7 +1929,10 @@ DEFUN(NAME(aout,swap_std_reloc_out),(abfd, g, natptr), r_jmptable = 0; r_relative = 0; +#if 0 + /* For a standard reloc, the addend is in the object file. */ r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma; +#endif /* name was clobbered by aout_write_syms to be symbol index */ @@ -2401,6 +2404,8 @@ DEFUN(NAME(aout,get_symtab_upper_bound),(abfd), return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *)); } + +/*ARGSUSED*/ alent * DEFUN(NAME(aout,get_lineno),(ignore_abfd, ignore_symbol), bfd *ignore_abfd AND @@ -2409,6 +2414,7 @@ DEFUN(NAME(aout,get_lineno),(ignore_abfd, ignore_symbol), return (alent *)NULL; } +/*ARGSUSED*/ void DEFUN(NAME(aout,get_symbol_info),(ignore_abfd, symbol, ret), bfd *ignore_abfd AND @@ -2435,6 +2441,7 @@ DEFUN(NAME(aout,get_symbol_info),(ignore_abfd, symbol, ret), } } +/*ARGSUSED*/ void DEFUN(NAME(aout,print_symbol),(ignore_abfd, afile, symbol, how), bfd *ignore_abfd AND @@ -2588,6 +2595,7 @@ DEFUN(NAME(aout,find_nearest_line),(abfd, } +/*ARGSUSED*/ int DEFUN(NAME(aout,sizeof_headers),(abfd, execable), bfd *abfd AND @@ -2972,7 +2980,6 @@ aout_link_add_symbols (abfd, info) else copy = true; - /* We keep a list of the linker hash table entries that correspond to particular symbols. We could just look them up in the hash table, but keeping the list is more efficient. Perhaps this @@ -3718,7 +3725,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr, /* Get the section contents. */ input_size = bfd_section_size (input_bfd, input_section); contents = (bfd_byte *) alloca (input_size); - if (! bfd_get_section_contents (input_bfd, input_section, contents, + if (! bfd_get_section_contents (input_bfd, input_section, (PTR) contents, (file_ptr) 0, input_size)) return false; @@ -3747,7 +3754,8 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr, /* Write out the section contents. */ if (! bfd_set_section_contents (finfo->output_bfd, input_section->output_section, - contents, input_section->output_offset, + (PTR) contents, + input_section->output_offset, input_size)) return false; |