Commit Graph

1005 Commits

Author SHA1 Message Date
Jakub Jelinek e9e446227d * readelf.c (get_file_type, get_machine_name, get_osabi_name,
get_segment_type, get_section_type_name, get_elf_class,
	get_data_encoding, get_group_flags, dynamic_section_mips_val,
	get_symbol_binding, get_symbol_type, get_TAG_name, get_FORM_name,
	get_AT_name, process_mips_specific, process_gnu_liblist,
	get_note_type, get_netbsd_elfcore_note_type): Use snprintf instead of
	sprintf where needed.
	(get_dynamic_type): Likewise.  Increase buff to 64 bytes.
	(get_elf_section_flags): Increase buff to 33 bytes.  Avoid
	using strcat.
	(get_dynamic_flags): Renamed to...
	(print_dynamic_flags): ... this.  Print the flags to stdout instead
	of returning them as string.
	(process_dynamic_section): Adjust caller.
2005-02-28 15:27:16 +00:00
Svein Seldal e5f129ad9c Changed my own mail address 2005-02-27 18:44:55 +00:00
H.J. Lu 35515c66de 2005-02-25 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (display_debug_ranges): Print out offset for end of
	list.
2005-02-25 22:12:12 +00:00
Alan Modra 9210d87943 * dlltool.c: Warning fixes.
* objdump.c: Likewise.
2005-02-23 12:25:57 +00:00
Alan Modra dc3c06c291 * Makefile.am (syslex.o, sysinfo.o): Pass AM_CFLAGS to compiler.
(syslex.o, sysinfo.o, dlltool.o, rescoff.o): Remove duplicate
	dependencies.  Run "make dep-am".
	* nlmconv.c: Warning fixes.
	* readelf.c: Likewise.
	* srconv.c: Likewise.
	* sysdump.c: Likewise.
	* sysinfo.y: Likewise.
	* syslex.l: Likewise.  Use yyleng instead of strlen, memcpy instead
	of strcpy.
	* Makefile.in: Regenerate.
2005-02-22 12:57:27 +00:00
H.J. Lu ebe372c1dd bfd/
2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
	SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
	Replace SEC_SHARED with SEC_COFF_SHARED.
	(styp_to_sec_flags): Likewise.

	* elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
	(TARGET_LITTLE_SYM): Likewise.

	* section.c (SEC_ARCH_BIT_0): Removed.
	(SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
	SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
	(SEC_SHARED): Renamed to ...
	(SEC_COFF_SHARED): This.
	(SEC_BLOCK): Renamed to ...
	(SEC_TIC54X_BLOCK): This.
	(SEC_CLINK): Renamed to ...
	(SEC_TIC54X_CLINK): This.
	(SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
	SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
	end.
	* bfd-in2.h: Regenerated.

binutils/

2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* objcopy.c (parse_flags): Replace SEC_SHARED with
	SEC_COFF_SHARED.

	* objdump.c (dump_section_header): Dump SEC_TIC54X_BLOCK and
	SEC_TIC54X_CLINK for TI c54x only. Remove SEC_ARCH_BIT_0. Dump
	SEC_COFF_SHARED for COFF only.

gas/

2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-coff.c (obj_coff_section): Replace SEC_SHARED with
	SEC_COFF_SHARED.

	* config/tc-tic54x.c (tic54x_bss): Replace SEC_BLOCK with
	SEC_TIC54X_BLOCK.
	(demand_empty_rest_of_line): Likewise.
	(tic54x_sblock): Likewise.
	(tic54x_clink): Replace with SEC_CLINK with SEC_TIC54X_CLINK.

ld/

2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>

	* ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
	tic54x input only.
	(lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
	and ECOFF output only.
2005-02-22 00:50:07 +00:00
Alan Modra 72f4774460 * Makefile.am: Run "make dep-am"
* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
2005-02-21 11:48:59 +00:00
Alan Modra 665435215e * readelf.c (BYTE_GET8): Delete. Replace uses with BYTE_GET.
(byte_get_little_endian): Don't handle size of -8.
	(byte_get_signed, byte_get_big_endian): Likewise.
	(print_dec_vma, print_hex_vma): New functions.
	(print_vma): Use them.  Return chars output.
	(get_dynamic_data): Return a bfd_vma array.  Add ent_size parm.
	(process_symbol_table): Handle alpha and s390 .hash.
2005-02-21 02:55:56 +00:00
H.J. Lu 904c75ac4f 2005-02-18 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (display_debug_loc): Print out offset for end of
	list.
2005-02-18 15:58:45 +00:00
Joseph Myers ac40b91956 * Makefile.am (TOOL_PROGS): Add objdump.
* Makefile.in: Regenerate.
2005-02-18 02:22:03 +00:00
Alan Modra 0af6db78f3 * deflex.l (YY_NO_UNPUT): Define.
* rclex.l (YY_NO_UNPUT): Define.
	* rcparse.y (null_unichar): New static var.
	(res_null_text): Use it rather than attempting to init from wchar_t.
	* windres.c: Include assert.h and time.h before getopt.h.
	Include config.h and unistd.h too.
2005-02-17 12:59:59 +00:00
Nick Clifton 4d116f4d9d Remove prototype for localetime altogether. It should not be needed on modern
systems and older systems can live with the warning.
2005-02-16 12:55:43 +00:00
Nick Clifton b5e6aa6331 Provide a full prototype for the localtime() function in order to avoid a
compile time warning.
2005-02-15 14:31:13 +00:00
H.J. Lu d1f5c6e34f 2005-02-10 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (group_count): Don't initialize it.
	(process_section_groups): Reurn 1 if we won't do unwind nor
	section groups. Set group_count to 0 before counting group
	sections and return 1 if there are no group sections. Reread
	SHT_SYMTAB/SHT_STRTAB sections only when needed. Don't skip
	section 0.
	(process_object): Only set do_unwind to 0 if
	process_section_groups return 0.
2005-02-11 15:48:11 +00:00
Ian Lance Taylor 3517749cb8 * MAINTAINERS: Update my e-mail address. 2005-02-10 23:34:43 +00:00
Mark Mitchell 0dffe982d8 * MAINTAINERS: Add Paul Brook and Mark Mitchell as ARM (Symbian)
maintainers.
2005-02-10 08:01:41 +00:00
Nick Clifton c4cf382105 Add Inderpreet Singh as maintainer of MAXQ. 2005-02-07 16:05:11 +00:00
Richard Sandiford 89fac5e3c3 * readelf.c (eh_addr_size): New variable.
(find_section): Move earlier in file.  Return empty sections too.
	(process_program_headers): Use find_section to find .dynamic.
	(process_section_headers): Initialize eh_addr_size.
	(dump_ia64_unwind, slurp_ia64_unwind_table, ia64_process_unwind)
	(dump_hppa_unwind, slurp_hppa_unwind_table, hppa_process_unwind)
	(display_debug_frames): Use it instead of local addr_size variable.
	(size_of_encoded_value): Get pointer size from eh_addr_size rather
	than is_32bit_elf.
2005-01-31 20:35:25 +00:00
Andrew Cagney c46f8c5116 2005-01-31 Andrew Cagney <cagney@gnu.org>
* gettext.m4: Only set ENABLE_NLS when gettext is present.
2005-01-31 20:32:45 +00:00
Nick Clifton d342277e67 Update reported copyright dates. 2005-01-31 17:36:24 +00:00
Alan Modra 8615f3f213 bfd/
* elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
	loadable reloc sections.
	(_bfd_elf_canonicalize_dynamic_reloc): Likewise.
	(_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
binutils/
	* nm.c (display_rel_file): Read dynamic syms before calling
	bfd_get_synthetic_symtab.
2005-01-25 10:33:55 +00:00
Ben Elliston 84e43642e3 * dlltool.c (dump_iat): Remove unused function.
(gen_exp_file): Remove #if 0'd code.
	(make_one_lib_file): Likewise.
	* srconv.c: Remove #if 0'd code throughout.
	* size.c (lprint_number): Remove.
	(print_berkeley_format): Remove #if 0'd code.
	* ar.c (do_quick_append): Remove declaration and definiton.
	(main): Remove #if 0'd code.
	* filemode.c (filemodestring): Remove #if 0'd function.
	* sysdump.c (unit_info_list): Remove function.
	(object_body_list): Likewise.
	(program_structure): Likewise.
	(debug_list): Likewise.
	(module): Remove #if 0'd code.
2005-01-21 05:40:24 +00:00
Mark Mitchell a332ee82c2 * BRANCHES: Add binutils-2_15-branch. 2005-01-21 03:14:37 +00:00
Mark Mitchell 619b8b6074 * MAINTAINERS: Document branch policy.
* BRANCHES: New file.
2005-01-20 21:59:05 +00:00
Fred Fish 9d317d3425 Fix misspelling in previous checkin 2005-01-19 23:43:00 +00:00
Fred Fish e39893d75a 2005-01-19 Fred Fish <fnf@specifixinc.com>
* NEWS: Make note of the new MIPS disassembly option "no-aliases".
	* doc/binutils.texi (objdump): Document the "no-aliases"
	disassembly option.
2005-01-19 23:35:26 +00:00
Nick Clifton b09a777222 PR binutils/647
* rcparse.y (RCDATA): Allow a filename to be supplied as the parameter.
  Parse it with define_rcdata_file().
* resrc.c (define_rcdata_file): New function.
* windres.h: Provide a prototype for the new function.

* resrc.c (define_user_file): Fix typo by replacing "font file" with "file".
2005-01-17 16:24:12 +00:00
Jason Thorpe ccf33464fc 2005-01-16 Jason Thorpe <thorpej@netbsd.org>
* MAINTAINERS: Update my email address.
2005-01-16 23:47:40 +00:00
Danny Smith a0ce7f12db * dlltool.c (set_dll_name_from_def): New function. Strip name
to basename, with warning.
	(def_name): Use it.
	(def_library): Likwise.
	(main): Strip arg of --dllname to basename, with warning.
	Only use basename of exp_name when inferring dll_name.
2005-01-16 09:25:06 +00:00
Nick Clifton 195a97ce8e PR binutils/637
* doc/binutils.texi (c++filt): Use uppercase CXXFILT in the footnote in order
to prevent the sed script in the Makefile from converting it into c++filt.
2005-01-11 11:58:49 +00:00
H.J. Lu 0853c0928a 2005-01-10 H.J. Lu <hongjiu.lu@intel.com>
BZ 635
	readelf.c (saved_base_address): Removed.
	(decode_64bit_range): Likewise.
	(decode_range): Likewise.
	(display_64bit_debug_ranges): Likewise.
	(debug_info): Add range_lists, num_range_lists and
	max_range_lists.
	(read_and_display_attr_value): Handle do_debug_ranges.
	(process_debug_info): Likewise.
	(display_debug_ranges): Rewrite.
	(process_object): Free range_lists.
2005-01-10 17:28:37 +00:00
Andreas Schwab 0bcb06d2f2 binutils/:
* configure.in: Don't define SKIP_ZEROES.
	* configure: Regenerate.
	* objdump.c (disassemble_data): Set skip_zeroes and
	skip_zeroes_at_end in disasm_info to defaults.
	(DEFAULT_SKIP_ZEROES): Rename from SKIP_ZEROES and always define.
	(DEFAULT_SKIP_ZEROES_AT_END): Rename from SKIP_ZEROES_AT_END and
	always define.
	(disassemble_bytes): Use skip_zeroes and skip_zeroes_at_end from
	objdump_disasm_info.

include/:
	* dis-asm.h (struct disassemble_info): Add skip_zeroes and
	skip_zeroes_at_end.

opcodes/:
	* disassemble.c (disassemble_init_for_target) <case
	bfd_arch_ia64>: Set skip_zeroes to 16.
	<case bfd_arch_tic4x>: Set skip_zeroes to 32.
2005-01-10 09:54:50 +00:00
H.J. Lu e54b12b779 2005-01-05 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (display_debug_loc): Display base address
	specifiers.  Always output <End of list>.
2005-01-05 17:29:41 +00:00
H.J. Lu b38c701560 2005-01-05 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (have_frame_base): New.
	(need_base_address): Likewise.
	(saved_base_address): Likewise.
	(decode_location_expression): Return 1 if DW_AT_frame_base is
	needed.
	(debug_info): Add base_address and a have_frame_base pointer.
	(read_and_display_attr_value): Replace saved_DW_AT_low_pc with
	saved_base_address. Record base address. Set have_frame_base.
	Record if a location list has DW_AT_frame_base. Display if a
	location expression has no DW_AT_frame_base but needs one. Set
	saved_base_address only if needed.
	(process_debug_info): Clear have_frame_base, saved_base_address
	and set need_base_address.
	(display_debug_loc): Display if a location expression has no
	DW_AT_frame_base but needs one. Display if start >= end. Don't
	adjust for section address. Properly handle base address.
	(process_object): Free the have_frame_base pointer in
	debug_info.
2005-01-05 16:15:47 +00:00
H.J. Lu b0660586ab 2005-01-04 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (display_debug_loc): Display offsets for hole and
	overlap.
	(display_debug_str): Add a newline at the end.
2005-01-04 23:37:18 +00:00
Nick Clifton 98faa4ff6b (oops - forogot to update the year in the copyright notice) 2005-01-04 15:51:47 +00:00
Nick Clifton 8b626bcf2c PR binutils/630
* nlmconv.c (main): Only store the basename of the output filename in the
module table.
2005-01-04 15:47:38 +00:00
Nick Clifton 5b18a4bc09 BZ 615
* readelf.c (process_debug_info): New.
(debug_info): Add num_loc_offsets, loc_offsets and
last_loc_offset_p.
(get_debug_info): Use process_debug_info.
(display_debug_loc): Properly handle location list. Warn if bad
location lists are encoutnered.
(read_and_process_attr_value): New.
(read_and_display_attr_value): Use "%lx" for DW_FORM_data4.
(display_debug_info): Use process_debug_info.
(process_object): Also free loc_offsets in debug_information.
2005-01-04 11:20:45 +00:00
Nick Clifton c9bc3b3d29 Add prototype for printf() and make type of "string" array be "char" in
order to avoid compile time warnings.
2005-01-04 10:13:02 +00:00
Alan Modra ca0548b640 * binutils-all/readelf.ss: Allow for both .rel and .rela sections. 2004-12-30 22:37:31 +00:00
Alan Modra 180e47e2d7 * objdump.c (remove_useless_symbols): Discard section symbols. 2004-12-30 22:33:20 +00:00
H.J. Lu 0c548fce69 2004-12-27 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (read_leb128): Support 64bit host.
2004-12-27 19:08:31 +00:00
Nick Clifton 76a5626062 readelf.c (last_pointer_size, warned_about_missing_comp_units):
New variables associated with obtaining the pointer size for a comp_unit.
  (get_pointer_size_of_comp_unit): Add an extra parameter - the name of the
  section requesting the pointer size.  Use this name in error messages.  If
  there are not enough comp_units available produce a warning message, but
  return the last known pointer size so that section dumping can continue.
  (get_debug_info): Reset the new variables.
  (display_debug_lines): Add extra parameter to invocation of
  get_pointer_size_of_comp_unit and remove error message when it returns 0.
  (display_debug_loc): Likewise.
2004-12-22 11:04:44 +00:00
Jan Beulich bcf32829af binutils/
2004-12-15 Jan Beulich  <jbeulich@novell.com>

	* doc/binutils.texi: Document --strip-unneeded-symbol and
	--strip-unneeded-symbols.
	* objcopy.c (strip_unneeded_list): New.
	(enum command_line_switch): Add OPTION_STRIP_UNNEEDED_SYMBOL
	and OPTION_STRIP_UNNEEDED_SYMBOLS.
	(copy_options): Add  --strip-unneeded-symbol and
	--strip-unneeded-symbols.
	(copy_usage): Likewise.
	(filter_symbols): Suppress copying of symbol if in strip_unneeded_list
	and the symbol is not needed.
	(copy_main): Handle OPTION_STRIP_UNNEEDED_SYMBOL and
	OPTION_STRIP_UNNEEDED_SYMBOLS.
2004-12-16 13:16:33 +00:00
Ian Lance Taylor ebcb91b7dc * readelf.c (get_machine_flags): Handle E_MIPS_MACH_9000. 2004-12-09 06:19:12 +00:00
Ben Elliston a2f33459ce * arlex.l: Fix formatting. 2004-12-09 01:46:27 +00:00
Ben Elliston 36607f990c * doc/Makefile.am (config.texi): Emit a @set UPDATED command to
config.texi whose value is the current month and year.
	* doc/Makefile.in: Rebuild.
	* doc/binutils.texi: Set the document subtitle to be the value of
	the Texinfo UPDATED variable (obtained from config.texi).
2004-12-08 02:50:40 +00:00
Ben Elliston 2aa9814eac PR binutils/249
* doc/binutils.texi (def file format): New node.
	(dlltool): Use the tool name as the @chapter name, like all the
	other binutils.  Use @file{.def} throughout for consistency.
2004-12-06 21:20:50 +00:00
Ben Elliston c7de92161e * dlltool.c: Comment fix. 2004-12-06 05:45:27 +00:00
Ben Elliston 2423fbe6a1 * doc/binutils.texi: Update copyright years. 2004-12-06 05:35:31 +00:00