Commit Graph

20 Commits

Author SHA1 Message Date
Fred Fish
ea3f058549 * syms.c (coff_section_type): Make arg const.
* irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
	to make_bfd_asection().
	* elf-bfd.h (bfd_section_from_phdr): Add prototype.
	* elfcode.h (bfd_section_from_phdr): Remove prototype.
	(_bfd_elf_stringtab_init): Remove prototype.

	* netbsd-core.c (swap_abort): Add prototype.
	* aix386-core.c (swap_abort): Ditto & make static
	* hpux-core.c (swap_abort): Ditto & make static.
	* irix-core.c (swap_abort): Ditto & make static.
	* ptrace-core.c (swap_abort): Ditto & make static.
	* trad-core.c (swap_abort): Ditto & make static.
	* coffswap.h (coff_swap_reloc_in): Ditto.
	(coff_swap_reloc_out): Ditto.
	(coff_swap_filehdr_in): Ditto.
	(coff_swap_filehdr_out): Ditto.
	(coff_swap_sym_in): Ditto.
	(coff_swap_sym_out): Ditto.
	(coff_swap_aux_in): Ditto.
	(coff_swap_aux_out): Ditto.
	(coff_swap_lineno_in): Ditto.
	(coff_swap_lineno_out): Ditto.
	(coff_swap_aouthdr_in): Ditto.
	(coff_swap_aouthdr_out): Ditto.
	(coff_swap_scnhdr_in): Ditto.
	(coff_swap_scnhdr_out): Ditto.
	* ihex.c (ihex_sizeof_headers): Ditto.
	* tekhex.c (getsym): Ditto.
	(find_chunk): Ditto & make static.
	(insert_byte): Ditto.
	(first_phase): Ditto.
	(pass_over): Ditto.
	(tekhex_get_symtab): Ditto & make static.
	(tekhex_get_symtab_upper_bound): Ditto & make static.
	(tekhex_mkobject): Ditto.
	(tekhex_object_p): Ditto.
	(move_section_contents): Ditto.
	(tekhex_get_section_contents): Ditto.
	(tekhex_set_arch_mach): Ditto & make static.
	(tekhex_set_section_contents): Ditto.
	(writevalue): Ditto.
	(writesym): Ditto.
	(out): Ditto.
	(tekhex_write_object_contents): Ditto.
	(tekhex_sizeof_headers): Ditto.
	(tekhex_make_empty_symbol): Ditto.
	(tekhex_get_symbol_info): Ditto.
	(tekhex_print_symbol): Ditto.
	* irix-core.c (make_bfd_asection): Ditto.
	(irix_core_core_file_p): Ditto.
	(irix_core_core_file_failing_command): Ditto.
	(irix_core_core_file_failing_signal): Ditto.
	(irix_core_core_file_matches_executable_p): Ditto.
	(irix_core_make_empty_symbol): Ditto.
	* coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
	* srec.c (srec_new_symbol): Ditto.
	(srec_get_section_contents): Ditto.
	(srec_set_arch_mach): Ditto.
	(srec_set_section_contents): Ditto.
	(internal_srec_write_object_contents): Ditto.
	(srec_write_object_contents): Ditto.
	(symbolsrec_write_object_contents): Ditto.
	(srec_sizeof_headers): Ditto.
	(srec_make_empty_symbol): Ditto.
	(srec_get_symtab_upper_bound): Ditto.
	(srec_get_symtab): Ditto.
	(srec_print_symbol): Ditto and make static.
	* elf.c (elf_read): Ditto
	(assign_section_numbers): Ditto.
	(elf_fake_sections): Ditto.
	(sym_is_global): Ditto.
	(elf_map_symbols): Ditto.
	(get_program_header_size): Ditto.
	* coffgen.c (make_a_section_from_file): Ditto.
	(coff_real_object_p): Ditto.
	(fixup_symbol_value): Ditto.
	(build_debug_section): Ditto.
	(copy_name): Ditto.
	* syms.c (coff_section_type): Ditto.
1996-09-11 04:25:57 +00:00
Ian Lance Taylor
f104a86e1b update copyright 1996-01-29 22:09:49 +00:00
Ian Lance Taylor
052b35d2e7 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
* syms.c (BSF_OBJECT): Define.
	(bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
	* bfd-in2.h: Rebuild.
	* elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
	STT_OBJECT symbol.
	* elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
	is set.
1996-01-29 22:04:32 +00:00
Ian Lance Taylor
86aac8eabe * syms.c: Include "bfdlink.h".
(struct stab_find_info): Define.
	(_bfd_stab_section_find_nearest_line): New function.
	* libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
	* libbfd.h: Rebuild.
	* elf-bfd.h (struct elf_obj_tdata): Add line_info field.
	* elf.c (_bfd_elf_find_nearest_line): Try calling
	_bfd_stab_section_find_nearest_line before searching the ELF
	symbol table.  Find the closest STT_FUNC symbol, not the last one.
	* libcoff-in.h (coff_data_type): Add line_info field.
	* libcoff.h: Rebuild.
	* coffgen.c (coff_find_nearest_line): Try calling
	_bfd_stab_section_find_nearest_line before searching the COFF
	symbol table.
	* Makefile.in: Rebuild dependencies.
1996-01-26 23:42:58 +00:00
Ian Lance Taylor
3fe22b980b * aoutx.h (NAME(aout,slurp_reloc_table)): Cast argument to size_t
for malloc.
	* coff-mips.c (mips_relocate_section): Likewise, for memmove.
	(mips_relax_section): Likewise, for malloc.
	* cofflink.c (process_embedded_commands): Likewise.
	(_bfd_coff_final_link): Likewise.
	* ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
	(ecoff_final_link_debug_accumulate): Likewise.
	(ecoff_indirect_link_order): Likewise, for memcpy and malloc.
	(ecoff_reloc_link_order): Likewise, for malloc.
	* ecofflink.c (ecoff_align_debug): Likewise, for memset.
	(ecoff_write_symhdr): Likewise, for malloc.
	* elf32-hppa.c (elf32_hppa_read_symext_info): Likewise.
	* elf.c (assign_file_positions_except_relocs): Likewise, for
	qsort.
	* elf32-mips.c (mips_elf_read_ecoff_info): Likewise, for malloc.
	* elfcode.h (elf_slurp_reloc_table): Likewise.
	* elfcore.h (elf_corefile_note): Likewise.
	* elflink.h (elf_link_add_object_symbols): Likewise.
	(elf_link_read_relocs): Likewise.
	(NAME(bfd_elf,size_dynamic_sections)): Likewise, for memset.
	* i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
	* ieee.c (do_with_relocs): Likewise.
	* linker.c (default_indirect_link_order): Likewise, for malloc.
	* nlmcode.h (nlm_object_p): Likewise.
	(nlm_write_object_contents): Likewise.
	* oasys.c (oasys_set_section_contents): Likewise, for memcpy.
	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise,
	for malloc.
	* section.c (bfd_get_section_contents): Likewise, for memcpy.
	* srec.c (srec_get_section_contents): Likewise.
	(srec_set_section_contents): Likewise.
	* sunos.c (bfd_sunos_size_dynamic_sections): Likewise, for
	realloc and memset.
	(sunos_scan_relocs): Likewise, for malloc.
	(sunos_scan_dynamic_symbol): Likewise, for realloc.
	* syms.c (_bfd_generic_read_minisymbols): Likewise, for malloc.
	* versados.c (versados_get_section_contents): Likewise, for
	memcpy.
1995-07-13 18:14:45 +00:00
Ian Lance Taylor
c3246d9b00 * targets.c (bfd_target): Add fields _read_minisymbols and
_minisymbol_to_symbol.
	(BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and
	_minisymbol_to_symbol.
	(bfd_read_minisymbols): Define.
	(bfd_minisymbol_to_symbol): Define.
	* syms.c (_bfd_generic_read_minisymbols): Define.
	(_bfd_generic_minisymbol_to_symbol): Define.
	* libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define.
	(_bfd_nosymbols_minisymbol_to_symbol): Define.
	(_bfd_generic_read_minisymbols): Declare.
	(_bfd_generic_minisymbol_to_symbol): Declare.
	* bfd-in2.h: Rebuild.
	* libbfd.h: Rebuild.
	* aoutx.h (MINISYM_THRESHOLD): Define.
	(NAME(aout,read_minisymbols)): New function.
	(NAME(aout,minisymbol_to_symbol)): New function.
	* libaout.h (NAME(aout,read_minisymbols)): Declare.
	(NAME(aout,minisymbol_to_symbol)): Declare.
	* aout-target.h (MY_read_minisymbols): Define.
	(MY_minisymbol_to_symbol): Define.
	* All targets: Define read_minisymbols and minisymbol_to_symbol.
PR 5332.
1995-07-13 14:46:06 +00:00
Steve Chamberlain
89665c8562 Wed Jun 28 18:04:42 1995 Steve Chamberlain <sac@slash.cygnus.com>
* Makefile.in: versados.o is now conditionally built.
	* coffcode.h (add_data_entry): New function.
	(coff_write_object_contents): Clean up. Calculate
	data entries.
	* cofflink.c (_bfd_coff_generic_relocate_section):
	.reloc and .edata sections are IMAGE_BASED too.
	If there's a base_file then write out base information.
	* configure.host (i386-*-pe): New.
	* syms.c (coff_section_type): Only scan prefixes.
	* targets.c (bfd_target_vector): Versados is now conditionally
	built.
	* config/m68k-coff.mt: Build versados.o
	* hosts/i386pe.h: New file.
1995-06-29 01:17:58 +00:00
Ian Lance Taylor
ec591fcf45 * syms.c (stt): Add .rdata and .rodata.
PR 5714.
1994-09-29 16:30:12 +00:00
David MacKenzie
57a1867e6c * Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
	Indent some of them to GNU standards.

	* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
	cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
	elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
	libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
	Update copyright years.
1994-03-15 15:13:13 +00:00
Ian Lance Taylor
0ee75d02e5 * syms.c (BSF_DYNAMIC): New symbol flag.
(bfd_print_symbol_vandf): Print it.
	* bfd-in2.h: Rebuilt.
	* libaout.h (struct aout_backend_data): New read_dynamic_symbols
	and read_dynamic_relocs fields.
	(struct aoutdata): New dynamic_info field.
	(obj_aout_dynamic_info): New accessor macro.
	* sunos.c (struct sunos_dynamic_info): New structure.
	(sunos_read_dynamic_info, MY(read_dynamic_symbols),
	MY(read_dynamic_relocs)): New functions to read dynamic symbols
	and relocs.
	* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
	dynamically linked, set SEC_RELOC for both the .text and .data
	sections.
	(translate_from_native_sym_flags): Don't set BSF_LOCAL for an
	undefined symbol.
	(translate_symbol_table): New function, split out of
	slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
	(NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
	(NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
	(NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
	return value.
	* aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
	out dynamic symbols or relocs against reloc symbols, since they
	are already in the .text section and we wouldn't know where to
	write them anyhow.
	(sunos4_aout_backend): Initialize read_dynamic_symbols and
	read_dynamic_relocs fields.
	* aout-target.h (MY(backend_data)): Initialize
	read_dynamic_symbols and read_dynamic_relocs fields.
1994-01-21 06:29:21 +00:00
Stan Shebs
c91884b377 Mon Jan 3 13:05:08 1994 Stan Shebs (shebs@andros.cygnus.com)
* syms.c (bfd_print_symbol_vandf): Change PTR to FILE *.
	* hosts/irix4.h (exit): Declare properly.
1994-01-03 22:02:48 +00:00
David MacKenzie
c188b0bec3 doc cleanup 1993-11-05 19:51:52 +00:00
Roland Pesch
151760d0d7 bfd.c: use `<<foo>>' instead of @file{foo}
section.c, syms.c: @* rather than * at beginning of menu lines
1992-01-29 01:04:30 +00:00
Steve Chamberlain
e98e6ec111 Uses the new small reloc type now.
Currently self hosts on sun4 and sun3
1992-01-24 22:44:51 +00:00
Steve Chamberlain
0cda46cff1 New documentation style 1991-12-01 00:39:12 +00:00
Per Bothner
3721706073 Two small bug-fixes (affecting ar and nm). 1991-11-29 20:31:57 +00:00
Per Bothner
7de245d362 Moved bfd_stab_name() and bfd_stab_names[]
from syms.c to new file stab-syms.c.
	Renamed to  aout_stab_name() and aout_stab_names[].
	Also, since GNU extended type codes such as N_SETT are no longer
	in ../include/stab.def, include them manually.
1991-11-22 05:00:08 +00:00
Fred Fish
7d68537f73 Trivial change to comment to remove redundant "to". 1991-11-15 03:14:20 +00:00
Roland Pesch
188d6d224e Fixed minor typos. 1991-08-19 23:03:12 +00:00
Roland Pesch
6724ff46c8 Mon Aug 19 13:48:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
* aoutx.h, archive.c, archures.c, bfd.c, bfd.texinfo, cache.c,
	coffcode.h, core.c, format.c, libbfd.c, libbfd.h, libcoff.h,
	opncls.c, reloc.c, section.c, syms.c, targets.c (documentation
	segments): used BFD (caps) more consistently as a name in
	discourse, fixed a few other minor typos and uses of fonts
1991-08-19 20:52:38 +00:00