summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/binutils
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-06-16 05:45:41 +0000
committerobrien <obrien@FreeBSD.org>2004-06-16 05:45:41 +0000
commitabfa7c9435b930b7b0628c3d5aecb3d2bd2939ae (patch)
tree1b1eca723e1299baef96baf728843d50abdf24a8 /contrib/binutils/binutils
parented2b7f732a9e0add59e9276fb35caeac694ca2c7 (diff)
parent2504df11e1275f63f4c53377bf91eee996360cb5 (diff)
downloadFreeBSD-src-abfa7c9435b930b7b0628c3d5aecb3d2bd2939ae.zip
FreeBSD-src-abfa7c9435b930b7b0628c3d5aecb3d2bd2939ae.tar.gz
This commit was generated by cvs2svn to compensate for changes in r130561,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/binutils/binutils')
-rw-r--r--contrib/binutils/binutils/ChangeLog2932
-rw-r--r--contrib/binutils/binutils/ChangeLog-00012060
-rw-r--r--contrib/binutils/binutils/ChangeLog-02032181
-rw-r--r--contrib/binutils/binutils/ChangeLog-91974
-rw-r--r--contrib/binutils/binutils/ChangeLog-98992
-rw-r--r--contrib/binutils/binutils/MAINTAINERS60
-rw-r--r--contrib/binutils/binutils/Makefile.am69
-rw-r--r--contrib/binutils/binutils/Makefile.in81
-rw-r--r--contrib/binutils/binutils/NEWS51
-rw-r--r--contrib/binutils/binutils/README77
-rw-r--r--contrib/binutils/binutils/acinclude.m42
-rw-r--r--contrib/binutils/binutils/aclocal.m418
-rw-r--r--contrib/binutils/binutils/addr2line.c71
-rw-r--r--contrib/binutils/binutils/ar.c382
-rw-r--r--contrib/binutils/binutils/arlex.l6
-rw-r--r--contrib/binutils/binutils/arparse.y10
-rw-r--r--contrib/binutils/binutils/arsup.c70
-rw-r--r--contrib/binutils/binutils/arsup.h36
-rw-r--r--contrib/binutils/binutils/binemul.c79
-rw-r--r--contrib/binutils/binutils/binemul.h32
-rw-r--r--contrib/binutils/binutils/bucomm.c268
-rw-r--r--contrib/binutils/binutils/bucomm.h70
-rw-r--r--contrib/binutils/binutils/budbg.h26
-rw-r--r--contrib/binutils/binutils/budemang.c6
-rw-r--r--contrib/binutils/binutils/budemang.h4
-rw-r--r--contrib/binutils/binutils/coffdump.c68
-rw-r--r--contrib/binutils/binutils/coffgrok.c81
-rw-r--r--contrib/binutils/binutils/coffgrok.h2
-rw-r--r--contrib/binutils/binutils/config.in12
-rwxr-xr-xcontrib/binutils/binutils/configure993
-rw-r--r--contrib/binutils/binutils/configure.in34
-rw-r--r--contrib/binutils/binutils/cxxfilt.c291
-rw-r--r--contrib/binutils/binutils/debug.c907
-rw-r--r--contrib/binutils/binutils/debug.h312
-rw-r--r--contrib/binutils/binutils/deflex.l36
-rw-r--r--contrib/binutils/binutils/dep-in.sed1
-rw-r--r--contrib/binutils/binutils/dlltool.c833
-rw-r--r--contrib/binutils/binutils/dlltool.h32
-rw-r--r--contrib/binutils/binutils/dllwrap.c63
-rw-r--r--contrib/binutils/binutils/doc/Makefile.am28
-rw-r--r--contrib/binutils/binutils/doc/Makefile.in31
-rw-r--r--contrib/binutils/binutils/doc/addr2line.111
-rw-r--r--contrib/binutils/binutils/doc/ar.113
-rw-r--r--contrib/binutils/binutils/doc/binutils.texi932
-rw-r--r--contrib/binutils/binutils/doc/cxxfilt.man53
-rw-r--r--contrib/binutils/binutils/doc/dlltool.127
-rw-r--r--contrib/binutils/binutils/doc/fdl.texi368
-rw-r--r--contrib/binutils/binutils/doc/nm.117
-rw-r--r--contrib/binutils/binutils/doc/objcopy.1161
-rw-r--r--contrib/binutils/binutils/doc/objdump.1127
-rw-r--r--contrib/binutils/binutils/doc/ranlib.111
-rw-r--r--contrib/binutils/binutils/doc/readelf.153
-rw-r--r--contrib/binutils/binutils/doc/size.113
-rw-r--r--contrib/binutils/binutils/doc/strings.121
-rw-r--r--contrib/binutils/binutils/doc/strip.1114
-rw-r--r--contrib/binutils/binutils/filemode.c23
-rw-r--r--contrib/binutils/binutils/ieee.c2297
-rw-r--r--contrib/binutils/binutils/objcopy.c1437
-rw-r--r--contrib/binutils/binutils/objdump.c2304
-rw-r--r--contrib/binutils/binutils/po/Make-in24
-rw-r--r--contrib/binutils/binutils/po/POTFILES.in1
-rw-r--r--contrib/binutils/binutils/po/binutils.pot1583
-rw-r--r--contrib/binutils/binutils/prdbg.c1876
-rw-r--r--contrib/binutils/binutils/rclex.c351
-rw-r--r--contrib/binutils/binutils/rclex.l34
-rw-r--r--contrib/binutils/binutils/rdcoff.c226
-rw-r--r--contrib/binutils/binutils/rddbg.c134
-rw-r--r--contrib/binutils/binutils/readelf.c4594
-rw-r--r--contrib/binutils/binutils/rename.c35
-rw-r--r--contrib/binutils/binutils/resbin.c274
-rw-r--r--contrib/binutils/binutils/rescoff.c63
-rw-r--r--contrib/binutils/binutils/resrc.c397
-rw-r--r--contrib/binutils/binutils/size.c105
-rw-r--r--contrib/binutils/binutils/srconv.c286
-rw-r--r--contrib/binutils/binutils/stabs.c1694
-rw-r--r--contrib/binutils/binutils/sysdump.c127
-rw-r--r--contrib/binutils/binutils/unwind-ia64.c219
-rw-r--r--contrib/binutils/binutils/unwind-ia64.h14
-rw-r--r--contrib/binutils/binutils/version.c32
-rw-r--r--contrib/binutils/binutils/wrstabs.c787
80 files changed, 18387 insertions, 14772 deletions
diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog
index 95d72cf..185b21b 100644
--- a/contrib/binutils/binutils/ChangeLog
+++ b/contrib/binutils/binutils/ChangeLog
@@ -1,2880 +1,132 @@
-2002-11-07 Nick Clifton <nickc@redhat.com>
-
- * configure.in (LINGUAS): Add 'da'.
- * configure: Regenerate.
- * po/da.po: New Danish translation.
-
-2002-10-30 Daniel Jacobowitz <drow@mvista.com>
-
- * po/binutils.pot: Regenerated.
-
-2002-10-28 Daniel Jacobowitz <drow@mvista.com>
-
- Merge from mainline:
- 2002-10-21 Alan Modra <amodra@bigpond.net.au>
- * bucomm.c (list_supported_targets): Use bfd_target_list.
-
- 2002-10-09 Daniel Jacobowitz <drow@mvista.com>
- * readelf.c (display_debug_info): Ignore empty .rela.debug_info
- sections. Allow relocations against the absolute symbol. Don't
- use the value in compunit.cu_abbrev_offset if we found a RELA
- relocation.
-
-2002-10-21 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * objdump.c (dump_data): Correct addr_offset for opb != 1.
-
-2002-09-23 Daniel Jacobowitz <drow@mvista.com>
-
- Merge from mainline:
- 2002-09-11 Nick Clifton <nickc@redhat.com>
- * po/tr.po: Updated Turkish translation.
-
- 2002-08-14 Luke Dunstan <infidel@users.sourceforge.net>
- * rcparse.y (acc_entry): Don't warn about ALT use with
- non-VIRTKEY.
-
- 2002-08-09 Nick Clifton <nickc@redhat.com>
- * po/sv.po: Updated Swedish translation.
-
- 2002-07-31 Nick Clifton <nickc@redhat.com>
- * addr2line.c (process_file): Rename parameter 'filename' to
- 'file_name' in order to avoid shadowing global symbol of the
- same name.
- (main): Likewise.
-
-2002-07-30 Daniel Jacobowitz <drow@mvista.com>
-
- Merge from mainline:
- 2002-07-30 Jakub Jelinek <jakub@redhat.com>
- * readelf.c (OPTION_DEBUG_DUMP): Define.
- (options): Use it.
- (usage): Update help.
- (parse_args): Handle --debug-dump separately from -w.
- * doc/binutils.texi (readelf): Update documentation.
-
-2002-07-25 Nick Clifton <nickc@redhat.com>
-
- * po/es.po: Updated Spanish translation.
- * po/fr.po: Updated French translation.
-
-2002-07-24 Nick Clifton <nickc@redhat.com>
-
- * po/es.po: Updated Spanish translation.
-
-2002-07-23 Daniel Jacobowitz <drow@mvista.com>
-
- * po/binutils.pot: Regenerated.
-
-2002-07-23 Nick Clifton <nickc@redhat.com>
+2004-05-13 Nick Clifton <nickc@redhat.com>
* po/fr.po: Updated French translation.
-2002-07-23 Eric S. Raymond <esr@golux.thyrsus.com>
-
- * doc/binutils.texi (addr2line <man synopsis>): Correct brackets.
-
-2002-07-20 Alan Modra <amodra@bigpond.net.au>
-
- * budemang.c: Include config.h and string.h/strings.h.
-
-2002-07-16 Nick Clifton <nickc@cambridge.redhat.com>
-
- * NEWS: Add 'Changes in 2.13'.
-
-2002-07-10 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (get_dynamic_type): Handle DT_GNU_PRELINKED,
- DT_GNU_CONFLICT* and DT_GNU_LIBLISZ*.
- (get_section_type_name): Handle SHT_GNU_LIBLIST.
- (process_dynamic_segment): Handle DT_GNU_CONFLICTSZ,
- DT_GNU_LIBLISTSZ and DT_GNU_PRELINKED.
- (process_gnu_liblist): New.
- (process_file): Call it.
-
-2002-07-03 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
- * Makefile.in: Regenerate.
-
-2002-07-02 Alan Modra <amodra@bigpond.net.au>
-
- * budemang.c: New file, "demangle" function.
- * budemang.h: New file.
- * addr2line.c (translate_addresses): Use "demangle".
- * nm.c (print_symname): Likewise.
- * objdump.c (objdump_print_symname): Likewise.
- (dump_symbols): Likewise. Also, don't use bfd_asymbol_name macro
- here since that obfuscates.
- * rdcoff.c: Don't #include demangle.h.
- * Makefile.am (CFILES): Add budemang.c, emul_aix.c,
- emul_vanilla.c. Remove emul_$(EMULATION).c. Sort.
- (HFILES): Add budemang.h. Sort.
- (nm_new_SOURCES, objdump_SOURCES, addr2line_SOURCES): Add budemang.c.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2002-07-01 Matt Thomas <matt@3am-software.com>
-
- * readelf.c: Include "elf/vax.h".
- (guess_is_rela): Move EM_VAX from unknown to RELA case.
- (dump_relocations): Handle VAX relocations.
- (get_machine_flags): Handle VAX machine flags.
-
-2002-06-29 Stephane Carrez <stcarrez@nerim.fr>
-
- * readelf.c (dump_relocations): Handle 68HC11/68HC12 relocations.
-
-2002-06-26 Nick Clifton <nickc@cambridge.redhat.com>
-
- * MAINTAINERS: Remove Tom Rix from d10v and pcc maintainerships.
-
-2002-06-26 Alan Modra <amodra@bigpond.net.au>
-
- * nm.c (print_symname): When demangling, strip leading dots from
- symbol names to avoid confusing the demangler.
-
-2002-06-25 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
- * Makefile.in: Regenerated.
-
-2002-06-21 Igor Schein <igor@txc.com>
-
- * configure.in: Quote bu_cv_have_fopen64.
- * configure: Regenerate.
-
-2002-06-21 Mitsru Chinen <chinen@jp.ibm.com>
-
- * configure.in: Check for strcoll.
- * configure: Regenerate.
- * config.in: Regenerate.
- * nm.c (main): Set locale for LC_COLLATE category.
- (non_numeric_forward): Use strcoll if available.
-
-2002-06-20 Dave Brolley <brolley@redhat.com>
-
- * MAINTAINERS: Add self as fr30 and frv maintainer.
-
-2002-06-18 H.J. Lu (hjl@gnu.org)
-
- * nm.c: Include "elf/common.h".
- (extended_symbol_info): Add elfinfo, a pointer to
- elf_symbol_type.
- (SYM_SIZE): Use elfinfo if it is not NULL.
- (get_symbol_type): New function.
- (display_archive): Set print_width for each archive member.
- (display_file): Likewise.
- (display_rel_file): Don't set print_width here.
- (print_object_filename_sysv): Handle print_width.
- (print_archive_member_sysv): Likewise.
- (print_symbols): Pass (bfd_vma) 0 to print_symbol.
- (print_symbol): Set the elfinfo field in extended_symbol_info
- for ELF.
- (print_object_filename_sysv): Fix the output format.
- (print_symbol_info_sysv): Print type and section for ELF.
-
-2002-06-18 Elias Athanasopoulos <eathan@otenet.gr>
-
- * nm.c (print_size_symbols): Remove assignment, which makes
- the symbol's size equal to its value when --size-sort is
- used.
-
-2002-06-18 Dave Brolley <brolley@redhat.com>
-
- From Catherine Moore:
- * readelf.c (elf/frv.h): #include it.
- (guess_is_rela): Support EM_CYGNUS_FRV.
- (dump_relocations): Ditto.
- (get_machine_name): Ditto.
- * Makefile.am (readelf.o): add dependency on $(INCDIR)/elf/frv.h.
-
-2002-06-18 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (get_file_header): Only read the first section header if
- e_shoff is non-zero.
-
-2002-06-15 H.J. Lu (hjl@gnu.org)
-
- * nm.c (print_size): New variable. Initialize to 0.
- (long_options): Add 'S'/"print-size".
- (main): Handle 'S'.
- (print_symbol_info_bsd): Print size only if print_size is not
- 0.
-
- * doc/binutils.texi: Document -S/--print-size.
-
-2002-6-13 Elias Athanasopoulos <eathan@otenet.gr>
-
- * nm.c (struct extended_symbol_info): New strcuture: Add the size
- of the symbols to the information provided by the symbol_info
- structure.
- (print_symbols): Pass the symbol size to print_symbol.
- (print_size_symbols): Pass the symbol size to print_symbol.
- (print_symbol): Extra argument: The size of the symbol. Store
- this in the extended_symbol_info structure.
- (print_symbol_info): Change type of info parameter to
- extended_symbol_info. Display the size, if known.
- (print_symbol_info_posix): Likewise.
- (print_symbol_info_sysv): Likewise.
-
-2002-06-08 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
- * doc/Makefile.in: Regnerate.
-
- * bucomm.c: Replace CONST with const.
- * nm.c: Likewise.
- * objdump.c: Likewise.
-
-2002-06-07 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (DW_CFA_GNU_args_size): Don't define.
- (DW_CFA_GNU_negative_offset_extended): Likewise.
- (DW_CFA_GNU_window_save): Likewise.
- (display_debug_frames): Handle DW_CFA_offset_extended_sf,
- DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf.
-
-2002-06-07 Elias Athanasopoulos <eathan@otenet.gr>
-
- * nm.c: When computing size of symbols for an ELF target use the
- internal size field.
-
-2002-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * testsuite/binutils-all/objcopy.exp: clear xfail for
- "hppa*64*-*-hpux*".
- * testsuite/binutils-all/hppa/objdump.exp: Return if
- "*64*-*-*".
-
-2002-06-05 Alan Modra <amodra@bigpond.net.au>
-
- * objcopy.c (copy_section): Don't copy SEC_GROUP sections.
-
-2002-06-03 Elias Athanasopoulos <eathan@otenet.gr>
-
- * objdump.c: Fix formatting.
-
-2002-05-29 Ben Elliston <bje@redhat.com>
-
- * MAINTAINERS: Add self as M68k maintainer.
-
-2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
-
- * readelf.c: Modified/Added DLX elf support.
-
-2002-05-27 Nick Clifton <nickc@cambridge.redhat.com>
-
- * arsup.c: Fix formatting.
- * debug.c (debug_record_label): Add missing colon to error
- message.
- * ieee.c (parse_ieee_ty): Fix spelling typo.
- * readelf.c (process_program_headers): Remove English assumption
- about making a plural word.
- (process_section_headers): Likewise.
- (process_relocs): Allow quotes to be translated.
- (process_unwind): Likewise,
- (process_mips_specific): Improve error message.
- (get_note_type): Fix spelling typo.
-
- * configure.in (ALL_LINGUAS): Add sv
- * po/sv.po: New file.
-
-2002-05-27 Alan Modra <amodra@bigpond.net.au>
-
- * unwind-ia64.c (unw_print_brmask): Don't use sprintf.
- (unw_print_grmask): Likewise.
- (unw_print_frmask): Likewise.
-
-2002-05-26 Kazu Hirata <kazu@cs.umass.edu>
-
- * arsup.c: Remove ARGSUSED.
- * debug.c: Likewise.
- * ieee.c: Likewise.
- * nlmconv.c: Likewise.
- * prdbg.c: Likewise.
- * stabs.c: Likewise.
- * wrstabs.c: Likewise.
-
-2002-05-25 Alan Modra <amodra@bigpond.net.au>
-
- * arlex.l: Use #include "" instead of <> for local header files.
- * coffdump.c: Likewise.
- * coffgrok.c: Likewise.
- * nlmconv.c: Likewise.
- * nlmheader.y: Likewise.
- * srconv.c: Likewise.
- * strings.c: Likewise.
- * sysdump.c: Likewise.
- * unwind-ia64.h: Likewise.
- * windres.h: Likewise.
- * winduni.h: Likewise.
-
-2002-05-24 Tom Rix <trix@redhat.com>
-
- * MAINTAINERS: Add self as the d10v maintainer.
-
-2002-05-24 TAMURA Kent <kent@netbsd.org>
-
- * configure.in: Builds dlltool for i386-netbsdpe.
- * configure: Regenerate.
-
-2002-05-23 Kazu Hirata <kazu@cs.umass.edu>
-
- * size.c: Fix formatting.
- * srconv.c: Likewise.
- * stabs.c: Likewise.
- * sysdump.c: Likewise.
- * unwind-ia64.c: Likewise.
- * wrstabs.c: Likewise.
-
-2002-05-23 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (get_segment_type): Add PT_TLS.
- (get_elf_section_flags): Add SHF_TLS.
- (get_dynamic_flags): Optimize. Add DF_STATIC_TLS.
- (process_dynamic_segment): Use puts instead of printf.
- (get_symbol_type): Support STT_TLS.
- * objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT,
- SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS.
- Add SEC_THREAD_LOCAL.
-
-2002-05-23 Kazu Hirata <kazu@cs.umass.edu>
-
- * rdcoff.c: Fix formatting.
- * rddbg.c: Likewise.
- * readelf.c: Likewise.
- * rename.c: Likewise.
- * resbin.c: Likewise.
- * resrc.c: Likewise.
- * resres.c: Likewise.
-
-2002-05-21 Kazu Hirata <kazu@cs.umass.edu>
-
- * filemode.c: Fix formatting.
- * ieee.c: Likewise.
- * is-ranlib.c: Likewise.
- * is-strip.c: Likewise.
- * maybe-ranlib.c: Likewise.
- * maybe-strip.c: Likewise.
- * nlmconv.c: Likewise.
- * nm.c: Likewise.
- * not-ranlib.c: Likewise.
- * not-strip.c: Likewise.
- * objcopy.c: Likewise.
- * objdump.c: Likewise.
-
-2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * objdump.c (dump_headers): Fix output formatting for ELF32
- architectures in a BFD64 enabled toolchain.
-
-2002-05-20 Kazu Hirata <kazu@cs.umass.edu>
-
- * debug.c: Fix formatting.
- * debug.h: Likewise.
- * dlltool.c: Likewise.
- * dllwrap.c: Likewise.
- * emul_aix.c: Likewise.
- * emul_vanilla.c: Likewise.
-
-2002-05-19 Kazu Hirata <kazu@cs.umass.edu>
-
- * addr2line.c: Fix formatting.
- * ar.c: Likewise.
- * arsup.c: Likewise.
- * arsup.h: Likewise.
- * binemul.c: Likewise.
- * binemul.h: Likewise.
- * bucomm.c: Likewise.
- * coffdump.c: Likewise.
- * coffgrok.c: Likewise.
- * coffgrok.h: Likewise.
-
-2002-05-16 Marek Michalkiewicz <marekm@amelek.gda.pl>
-
- * MAINTAINERS: Add myself as the second AVR port maintainer.
-
-2002-05-16 Stephane Carrez <stcarrez@nerim.fr>
-
- * MAINTAINERS: Update my email address.
-
-2002-05-09 Nick Clifton <nickc@cambridge.redhat.com>
-
- * MAINTAINERS: Add Jason Thorpe as VAX maintainer.
-
-2002-05-09 Alan Modra <amodra@bigpond.net.au>
-
- * configure.in: Replace `*pe' with `pe' throughout.
- * configure: Regenerate.
-
-2002-05-07 Federico G. Schwindt <fgsch@olimpo.com.br>
-
- * Makefile.am: Honour DESTDIR.
- * Makefile.in: Regenerate.
-
-2002-05-06 Alan Modra <amodra@bigpond.net.au>
-
- * dlltool.c (process_def_file): Add missing prototype.
- (new_directive, assemble_file, main): Likewise.
- (process_def_file, new_directive): Make static.
- (inform): Rewrite using VA_FIXEDARG.
- * dllwrap.c (mybasename): Add missing prototype.
- (strhash, main): Likewise.
- (inform): Rewrite using VA_FIXEDARG.
- (warn): Likewise.
- (cleanup_and_exit): Use old style function definition.
- (strhash): Likewise.
- * windres.c (define_resource): Use one memset to clear all of
- struct res_resource.
-
- * rcparse.y: Remove newcmd rule. Move rcparse_discard_strings
- call to rules that need no lookahead. Check for no lookahead.
-
-2002-05-06 Borut Razem <borut.razem@siol.net>
-
- * rclex.l (get_string): Correct "strings" list handling.
- * resrc.c (read_rc_file): Discard strings.
-
-2002-05-04 Alan Modra <amodra@bigpond.net.au>
-
- * ar.c (replace_members): Remove unused var. Formatting fix.
- * binemul.c (ar_emul_default_parse_arg): Add ATTRIBUTE_UNUSED.
-
- * MAINTAINERS: Sort port maintainers by CPU.
-
-2002-05-04 Bob Byrnes <byrnes@curl.com>
-
- * size.c (display_archive): Add last_arfile and code to close archives.
-
-2002-05-01 Alan Modra <amodra@bigpond.net.au>
-
- * nm.c (print_symbol): Check returned filename from
- bfd_find_nearest_line is non-NULL.
-
-2002-04-25 Elena Zannoni <ezannoni@redhat.com>
-
- * readelf.c (get_AT_name): Handle DW_AT_GNU_vector.
-
-2002-04-24 Christian Groessler <chris@groessler.org>
-
- * MAINTAINERS: Changed my email address.
-
-2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * arparse.y: Fix syntax warning.
-
-2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c (fetch_location_list): Remove unused function.
-
- * readelf.c (process_corefile_note_segment): Catch corrupt notes
- and display a warning message, then exit the loop.
-
- * rcparse.y: Set MEMFLAG_DISCARDABLE by default.
-
-2002-04-15 Nick Clifton <nickc@cambridge.redhat.com>
-
- * resrc.c (write_rc_dialog): If charset is non-default value
- display all of the DIALOGEX parameters.
-
-2002-04-15 Eric Kohl <ekohl@rz-online.de>
-
- * rcparse.y: Allow two to five parameter in FONT statement of
- DIALOGEX resources.
- * resbin.c (bin_to_res_dialog): Fixed read/write code for dialogex
- resource data.
- (res_to_bin_dialog): Likewise.
- * windres.h: Added misssing charset variable to dialog_ex
- structure.
-
-2002-04-10 Nick Clifton <nickc@cambridge.redhat.com>
-
- * rcparse.y: Set MEMFLAG_PURE by default.
-
-2002-04-09 Bernd Herd <info@herdsoft.com>
-
- * rcparse.y: CLASS definitions in DIALOG resources
- are quoted.
- Fix typo in BEDIT warning.
- Don't add default dialog style when explicit style specified.
- Add WS_CAPTION dialog style if CAPTION is specified.
-
- * rclex.l (handle_quotes): "\xhex" encoding in strings corrected.
- (handle_quotes) "\a" escape (used for right justified key
- definitions in menus) is encodes as binary 8.
-
- * resrc.c (write_rc_dialog): Print style even if it is 0.
- (write_rc_directory): Fix overlooked sublang shift bug.
- (bin_to_res_dialog): Don't print empty dialog caption.
-
- * resbin.c (bin_to_res_dialog): Use signature to identify
- DIALOGEX.
-
- * windres.c (main): Set default LANGUAGE to english/us.
-
-2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk>
-
- * resrc.c: print CLASS names in quotes
-
-2002-04-09 J"orn Rennecke <joern.rennecke@superh.com>
-
- * MAINTAINERS: Update my email address.
-
-2002-04-04 Alan Modra <amodra@bigpond.net.au>
-
- * dep-in.sed: Cope with absolute paths.
- * Makefile.am (dep.sed): Subst TOPDIR.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2002-03-27 Peter Targett <peter.targett@arc.com>
-
- * MAINTAINERS: Update my email address.
-
-2002-03-21 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
- * doc/Makefile.in: Regenerate.
- * po/POTFILES.in: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * configure: Regenerate.
-
-2002-03-20 Daniel Berlin <dan@dberlin.org>
-
- * readelf.c: Add support for displaying dwarf2 location lists.
- (do_debug_loc, debug_loc_section, debug_loc_size): New.
- (parse_args): Use 'O' as shorthand for displaying location list
- section.
- (process_section_headers): Handle debug_loc as well.
- (load_debug_loc): New.
- (free_debug_loc): New.
- (fetch_location_list): New.
- (display_debug_loc): New.
- (display_debug_info): Call load_debug_loc and free_debug_loc.
- (debug_displays): We can display .debug_loc now, too.
- (usage): Update usage string.
- (read_and_display_attr_value): Note location lists, but don't
- display them inline.
-
-2002-03-18 Tom Rix <trix@redhat.com>
-
- * Makefile.am: Add binutils emulation support.
- * configure.in: Same.
- * configure.tgt: New file. Same.
- * ar.c (main): Use ar_emul_parse_arg.
- (usage): Use ar_emul_usage.
- (replace_members): Use ar_emul_replace, ar_emul_append.
- * binemul.c: New file. Define the binutils emulation
- layer. Define default methods.
- * binemul.h: New file. Binutils emulation layer header file.
- * emul_aix.c: New file. AIX binutils emulation.
- * emul_vanilla.c: New file. Default binutils emulation.
- * Makefile.in: Regenerate.
- * configure: Same.
-
-2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/fr.po: Updated version.
-
-2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/fr.po: Updated version.
-
-2002-03-07 Daniel Jacobowitz <drow@mvista.com>
-
- * README: Update some version numbers.
-
-2002-03-07 Daniel Jacobowitz <drow@mvista.com>
-
- * doc/binutils.texi (Target Selection): Fix LD crossreferences.
- (Architecture Selection): Likewise.
-
-2002-03-01 Dmitry Timoshkov <dmitry@baikal.ru>
-
- * dlltool.c (gen_exp_file): Take into account --kill-at (-k) while
- generating .exp file.
-
-2002-02-21 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c (dump_relocations): Fix typo.
-
-2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
-
- * NEWS: Mark 2.12 branch.
-
-2002-02-18 Timothy Daly <remote_bob@yahoo.com>
-
- * readelf.c (dump_relocations): Display 2nd and 3rd reloc
- types for 64-bit MIPS. Narrow some fields for 80-char
- output.
- (dump_relocations): Change spelling from 'unrecognised'
- to 'unrecognized'.
- (decode_ARM_machine_flags): Likewise.
- (parse_args): Likewise.
- (read_and_display_attr_value): Likewise.
- (display_debug_section): Likewise.
-
-2002-02-15 Hans-Peter Nilsson <hp@bitrange.com>
-
- * NEWS: Mention support for MMIX.
-
-2002-02-13 Matt Fredette <fredette@netbsd.org>
-
- * readelf.c (get_machine_flags): Recognize EF_M68000.
-
-2002-02-12 Alexandre Oliva <aoliva@redhat.com>
-
- * MAINTAINERS: Added self as MN10300 co-maintainer.
-
-2002-02-12 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (get_ppc64_dynamic_type): Handle DT_PPC64_OPD and
- DT_PPC64_OPDSZ.
-
-2002-02-11 Daniel Jacobowitz <drow@mvista.com>
-
- * MAINTAINERS: List myself as branch maintainer.
-
-2002-02-11 Alan Modra <amodra@bigpond.net.au>
-
- * configure: Regenerate.
- * objcopy.c: Update copyright date.
- * doc/Makefile.in: Regenerate.
-
-2002-02-10 Daniel Jacobowitz <drow@mvista.com>
-
- * nlmconv.c: Back out localtime PARAMS change.
-
-2002-02-11 Alan Modra <amodra@bigpond.net.au>
-
- * objcopy.c (MKDIR): Define.
- (copy_archive): Make name_list.name const. Use MKDIR.
- Handle duplicate files in archives by making more temp dirs.
-
-2002-02-10 Daniel Jacobowitz <drow@mvista.com>
-
- * coffdump.c: Include "getopt.h" after "bucomm.h"
- so that macros are defined correctly.
- * nlmconv.c: Add PARAMS ((const time_t *)) to localtime
- prototype. Prototype main.
- * nlmheader.y: Add PARAMS ((int)) to strerror prototype.
-
-2002-02-06 Alexandre Oliva <aoliva@redhat.com>
-
- * MAINTAINERS: Added self as SH co-maintainer.
-
-2002-02-05 Nick Clifton <nickc@redhat.com>
+2004-04-09 Daniel Jacobowitz <drow@mvista.com>
- * po/tr.po: Updated translation.
-
-2002-02-01 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Run "make dep-am"
- * Makefile.in: Regenerate.
-
-2002-01-29 Daniel Jacobowitz <drow@mvista.com>
-
- * nm.c (print_value): Mark abfd unused.
-
-2002-01-29 Daniel Jacobowitz <drow@mvista.com>
-
- * unwind-ia64.c (unw_decoder): Change second argument
- to unsigned int, to match function prototypes.
-
-2002-01-29 Daniel Jacobowitz <drow@mvista.com>
-
- * objdump.c: Include "getopt.h" after "bucomm.h" so that
- __GNU_LIBRARY__ will be defined.
- * size.c: Likewise.
-
-2002-01-27 Daniel Jacobowitz <drow@mvista.com>
-
- * configure: Regenerated.
-
-2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
-
- * doc/Makefile.am (install): Depend on install-info.
- * doc/Makefile.in: Regenerate.
-
-2002-01-25 Jason R. Thorpe <thorpej@wasabisystems.com>
-
- * objcopy.c (strip_usage): Document -d as an alias
- --strip-debug.
-
- * size.c (usage): Document [-t | --totals] options.
- (long_options): Add --totals option.
- (main): If the [-t | --totals] option is specified and
- the output format is Berkeley-style, print the total
- text, data, and bss sizes of all objects listed.
- (print_berkeley_format): If the [-t | --totals] option
- is specified, track the total text, data, and bss
- sizes.
- * doc/binutils.texi (size): Document [-t | --totals] options.
- (strip): Document -d as an alias for --strip-debug.
- * NEWS: Mention new feature of size.
-
-2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/fr.po: Updated version.
- * po/es.po: Updated version.
-
-2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
-
- * addr2line.c (usage): Update text to provide verbose
- description of the command line options.
- * ar.c (usage): Update text to provide verbose
- description of the command line options.
- (main): Accept -h and -H when running as ranlib.
- * coffdump.c (show_usage): Update text to provide verbose
- description of the command line options.
- * dlltool.c (main): Accept -H as an alias for --help.
- * nlmconv.c (show_usage): Update text to provide verbose
- description of the command line options.
- * nm.c (usage): Replace OPTIONS with option(s).
- (main): Accept -H as an alias for --help.
- * objcopy.c (strip_main): Accept -H as an alias for --help.
- * objdump.c (main): Accept -v as an alias for --verbose.
- * readelf.c (usage): Adjust format to match style used in
- other binutils.
- * size.c (usage): Update text to provide verbose description
- of the command line options.
- (main): Accept -v, -h and -H as command line options.
- * srconv.c (show_usage): Update text to provide verbose
- description of the command line options.
- * strings.c (main): Accept -H and -v as command line options.
- (usage): Update text to provide verbose description of the
- command line options.
- * sysdump.c (show_usage): Update text to provide verbose
- description of the command line options.
- * windres.c (usage): Adjust format to match style used in
- other binutils.
-
- * coffdump.c: Fix formatting.
- * nlmconv.c: Fix formatting.
- * srconv.c: Fix formatting.
- * sysdump.c: Fix formatting.
-
-2002-01-22 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2002-01-18 Andreas Jaeger <aj@suse.de>
-
- * version.c (print_version): Update year.
-
-2002-01-17 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (get_machine_name): Handle EM_PPC64.
- (guess_is_rela): Here too.
-
-2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/binutils.pot: Regenerate.
- * po/fr.po: Regenerate.
- * po/tr.po: Regenerate.
-
-2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/tr.po: Import new version.
-
-2002-01-16 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (get_ppc64_dynamic_type): New.
- (get_dynamic_type): Call it.
-
-2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
-
- * objcopy.c (copy_usage): Use "options" instead of "switches".
- (strip_usage): Use "options" instead of "switches".
- * doc/binutils.texi (dlltool): Refer to "options" instead of
- "switches".
-
-2002-01-14 Richard Earnshaw <rearnsha@arm.com>
-
- * MAINTAINERS: Add self as co-maintainer for the ARM code.
-
-2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/es.po: Import from translation project.
- * configure.in (ALL_LINGUAS): Add es.
- * configure: Regenerate.
-
-2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
-
- * readelf.c (get_netbsd_elfcore_note_type): Use
- NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
-
-2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
-
- * readelf.c: Update copyright years.
- (get_note_type): Return a const char *.
- (get_netbsd_elfcore_note_type): New function.
- (process_note): Use get_netbsd_elfcore_note_type to get
- the note type string for NetBSD ELF core files.
-
-2002-01-06 Steve Ellcey <sje@cup.hp.com>
-
- * readelf.c (get_ia64_segment_type): Add support for macros.
- (get_segment_type): Add support for IA64 specific macros.
-
-2001-12-20 Julian v. Bock <julian@wongr.net>
-
- * readelf.c (print_symbol): New function: Print a formatted symbol
- name. If --wide is specified do not truncate it.
- (dump_relocations): Use print_symbol() to print symbol names.
- (process_symbol_table): Likewise.
- (process_syminfo): Likewise.
- (process_mips_specific): Likewise.
- (usage): Document new feature of --wide switch.
- * doc/binutils.texi (objdump): Document additional behaviour of
- --wide.
-
-2001-12-18 Michael Snyder <msnyder@redhat.com>
-
- * objcopy.c (copy_file): Accept corefiles (format bfd_core).
- (copy_object): Don't set the start address or flags of a core file.
- (copy_section): Don't relocate a core file. Don't copy contents
- if the input section has the contents flag set, but the output
- section does not (which happens with the fake 'note' pseudo-
- sections that BFD creates for corefiles).
-
-2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * readelf.c (get_machine_flags): Recognize header flags for ABI and
- ASE extensions. More robust code for ISA checking. Ignore empty fields
- in header flags for GNU extensions.
-
-2001-12-18 Alan Modra <amodra@bigpond.net.au>
-
- * objcopy.c (copy_archive): Set output bfd format outside the loop.
-
-2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
-
- * po/ja.po: Import from translation project.
- * configure.in (ALL_LINGUAS): Add ja.
- * configure: Regenerate.
-
-2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * addr2line.c (main): Protoype.
- * ar.c (main): Protoype.
- * nm.c (main): Protoype.
- * objcopy.c (main): Protoype.
- * objdump.c (main): Protoype.
- * size.c (main): Protoype.
- * strings.c (main): Protoype.
-
-2001-12-17 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (symtab_shndx_hdr): New global.
- (SECTION_HEADER_INDEX): Define.
- (SECTION_HEADER_NUM): Define.
- (SECTION_HEADER): Define.
- (GET_ELF_SYMBOLS): Pass two params rather than three.
- (get_32bit_elf_symbols): Take file and section args. Read and
- use SHT_SYMTAB_SHNDX.
- (get_64bit_elf_symbols): Likewise.
- (dump_relocations): Use SECTION_HEADER to index "section_headers".
- (process_section_headers): Likewise. Use SECTION_HEADER_NUM too.
- Remember symtab_shdx_hdr.
- (process_program_headers): Scan from index 1 for segment map.
- (slurp_ia64_unwind_table): Use SECTION_HEADER to index
- "section_headers".
- (process_relocs): Likewise. Also adjust call to GET_ELF_SYMBOLS.
- (process_unwind): Likewise.
- (process_version_sections): Likewise.
- (process_symbol_table): Likewise.
- (display_debug_info): Likewise.
- (process_dynamic_segment): Fake up a symtab section for changed
- GET_ELF_SYMBOLS.
- (get_symbol_index_type): Check SHN_LOOS before SHN_LORESERVE.
- (process_program_headers): Kill signed/unsigned warning.
- (load_debug_str): Likewise.
- (display_debug_info): Likewise.
-
-2001-12-13 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
-
-2001-12-11 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (process_file_header): Print extended e_shnum and
- e_shdtrndx values. Set elf_header values for same.
- (get_32bit_section_headers): Add "num" arg to read "num" headers.
- (get_64bit_section_headers): Likewise.
- (process_section_headers): Update calls.
- (get_file_header): Call get_32bit_section_headers or 64bit variant.
-
-2001-12-10 Jakub Jelinek <jakub@redhat.com>
-
- * objcopy.c (setup_section): Copy entsize.
-
-2001-12-07 Geoffrey Keating <geoffk@redhat.com>
-
- * readelf.c (guess_is_rela): Add support for stormy16.
- (dump_relocations): Likewise.
- (get_machine_name): Likewise.
-
-2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
-
- * dllwrap.c (main) Replace multiple strings describing a
- single error with a single, newline escaped sentence to permit
- better translation into foreign languages.
-
- * readelf.c (get_elf_class): Remove internalionalisation of ELF
- class names.
-
-2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * strings.c (get_char): Initialize value.
-
-2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * arlex.l: Silence compile warnings.
- * arsup.h: Likewise. Fix formatting.
-
-2001-12-04 Jakub Jelinek <jakub@redhat.com>
-
- * strings.c: Include config.h before bfd.h.
- (file_off): New type.
- (file_open): Define.
- (print_strings): Use file_off instead of file_ptr. Print addresses
- which don't fit into long correctly.
- (get_char): Use file_off instead of file_ptr. Use getc_unlocked if
- available.
- (strings_file): Use file_off instead of file_ptr. Use file_open.
- * configure.in: Check for getc_unlocked.
- Check for fopen64 and whether _LARGEFILE64_SOURCE needs to
- be defined for it.
- * configure: Rebuilt.
- * config.h.in: Rebuilt.
-
-2001-11-29 H.J. Lu <hjl@gnu.org>
-
- * bucomm.c (make_tempname): Revert the changes made on
- 2001-11-14 and 2001-11-12. They won't work with directories.
-
-2001-11-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * binutils/Makefile.am (check-DEJAGNU): Pass CC_FOR_TARGET and
- CFLAGS_FOR_TARGET to runtest in environment.
- * Makefile.in: Rebuild.
- * doc/Makefile.in: Rebuild.
-
-2001-11-28 Mike Stump <mrs@wrs.com>
-
- * objcopy.c (setup_section): Preserve SEC_RELOC when
- --set-section-flags is used.
-
-2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c (do_debug_str): New variable.
- (display_debug_str): New function: Display the contents of a
- .debug_str section.
- (load_debug_str): New function: Load in the contents of a
- .debug_str section.
- (free_debug_str): New function: Free the memory used by
- load_debug_str().
- (fetch_indirect_string): Retrieve a string from the .debug_str
- section.
- (usage): Add -ws.
- (parse_args): Accept -ws.
- (process_section_headers): Allow the display of the .debug_str
+ Merge from mainline:
+ 2004-04-07 Benjamin Monate <benjamin.monate@cea.fr>
+ PR 86
+ * arsup.c (ar_save): Use smart_rename.
+
+ 2004-04-01 Dean Luick <luick@cray.com>
+ * readelf.c (display_debug_pubnames): Align offset and data
+ columns.
+ (read_and_display_attr_value): Add missing break;
+ (debug_displays): Enable the display of the .debug_pubtypes
section.
- (read_and_display_attr_value): Use fetch_indirect_string. Show
- offset into .debug_str section.
- (display_debug_info): Use load_debug_str and free_debug_str.
- (debug_displays): Add .debug_str.
- * doc/binutils.texi: Document -ws.
-
-2001-11-19 Andreas Jaeger <aj@suse.de>
-
- * testsuite/binutils-all/objdump.exp: Add x86-64.
-
-2001-11-15 Andreas Schwab <schwab@suse.de>
-
- * readelf.c: Fix warnings without terminating newline.
-
-2001-11-15 Alan Modra <amodra@bigpond.net.au>
-
- * doc/binutils.texi (objdump): Document ppc -M options.
-
-2001-11-14 Andreas Jaeger <aj@suse.de>
-
- * doc/binutils.texi (objdump): Fix description to use x86-64.
-
-2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
-
- * bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since
- not all systems provide mkstemp.
-
-2001-11-14 Alan Modra <amodra@bigpond.net.au>
-
- * doc/binutils.texi (objdump): Document x86 -M options.
-
-2001-11-13 Keith Walker <keith.walker@arm.com>
-
- * readelf.c (read_and_display_attr_value): New function to
- handle DW_FORM_indirect.
- (read_and_display_attr): Use it.
-
-2001-11-13 Geoffrey Keating <geoffk@redhat.com>
-
- * readelf.c (display_debug_lines): Deal with unknown standard
- opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin,
- DW_LNS_set_isa.
-
-2001-11-13 Timothy Wall <twall@alum.mit.edu>
-
- * MAINTAINERS: Add self as tic54x maintainer. This target
- includes the IBM C54XDSP clone.
-
-2001-11-12 * Steven J. Hill <sjhill@realitydiluted.com>
-
- * bucomm.c (make_tempname): Use mkstemp in place of mktemp.
-
-2001-11-09 Jeffrey A Law (law@cygnus.com)
-
- * unwind-ia64.c (unw_print_brmask): Fix ISO C portability glitch.
- (unw_print_grmask, unw_print_frmask, unw_print_abreg): Likewise.
- (unw_print_xyreg, unw_decode_x1, unw_decode_x2): Likewise.
- (unw_decode_x3, unw_decode_r1, unw_decode_r2): Likewise.
- (unw_decode_r3, unw_decode_p1, unw_decode_p2_p5): Likewise.
- (unw_decode_p6, unw_decode_p7_p10, unw_decode_b1): Likewise.
- (unw_decode_b2, unw_decode_b3_b4): Likewise.
-
- * readelf.c (get_elf_class): Fix ISO portability glitch.
- (get_data_encoding, get_osabi_name, request_dump): Likewise.
-
-2001-11-07 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (debug_str, debug_str_size): New.
- (display_debug_abbrev): If no abbrevs were read, skip the CU.
- Call free_abbrevs.
- (read_and_display_addr): Handle DW_FORM_strp.
- (display_debug_info): Read .debug_str section if present,
- so that DW_FORM_strp can be handled.
- Fix test for non-existant .debug_abbrev section.
-
-2001-11-05 Jakub Jelinek <jakub@redhat.com>
-
- * arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.
-
- * arsup.c (ar_open): Prepend tmp- to basename, not whole path.
-
-2001-11-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * MAINTAINERS: Add self as s390/s390x maintainer.
-
-2001-11-02 Tom Rix <trix@bluey.cygnus.com>
-
- * MAINTAINERS: Add self as PPC XCOFF maintainer.
-
-2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
-
- * configure.in (ALL_LINGUAS): Add "fr" and "tr".
- * configure: Regernate.
- * po/fr.po: New file.
- * po/tr.po: New file.
-
-2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * MAINTAINERS: Add self as MMIX port maintainer.
- * readelf.c: Include elf/mmix.h.
- (guess_is_rela): MMIX is RELA.
- (dump_relocations): Handle MMIX relocations.
- * Makefile.am: Regenerate dependencies.
- * Makefile.in: Regenerate.
-
-2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c (parse_args): Handle multiple options to the -w
- switch.
-
-2001-10-12 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (get_section_type_name): Don't print SHT_ prefix for
- LOPROC, LOOS and LOUSER.
-
-2001-10-11 J"orn Rennecke <amylaar@onetel.net.uk>
-
- * MAINTAINERS: Update my email address.
-
-2001-10-03 Alan Modra <amodra@bigpond.net.au>
-
- * doc/Makefile.in: Regenerate.
- * configure: Regenerate.
-
-2001-10-02 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c (display_debug_line, display_debug_pubnames,
- display_debug_info, display_debug_frames): Detect and warn
- about 64-bit format entries.
- (display_debug_aranges): Reword 64-bit warning.
- (debug_displays): Add .debug_pubtypes as a known, but not yet
- supported, debug section.
-
-2001-10-02 Alan Modra <amodra@bigpond.net.au>
-
- * coffdump.c (PROGRAM_VERSION): Delete.
- (main <'V'>): Call print_version.
- * srconv.c: Likewise.
- * sysdump.c: Likewise.
- * version.c (program_version): Remove.
- (print_version): Use BFD_VERSION_STRING. Just print the current
- year in copyright message.
- * addr2line.c (program_version): Remove unused declaration.
- * objdump.c (display_target_tables): Use BFD_VERSION_STRING in
- place of BFD_VERSION.
- * Makefile.am (Makefile): Depend on bfd/configure.in.
- (cplus-dem.o): Depend on Makefile.
- Run "make dep-am".
- * Makefile.in: Regenerate.
-
-2001-10-01 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c (display_debug_aranges): Detect and warn about DWARF64
- format .debug_arange sections.
- (main): Add missing prototype.
-
-2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * Makefile.am: Update dependencies with "make dep-am".
- * Makefile.in: Regenerate.
-
-2001-09-28 Richard Henderson <rth@redhat.com>
-
- * objdump.c (dump_section_header): Dump SEC_ARCH_BIT_0.
-
-2001-09-26 Alan Modra <amodra@bigpond.net.au>
-
- * bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,
- VA_CLOSE.
- (non_fatal): Likewise.
- * objdump.c (objdump_sprintf): Likewise.
- * readelf.c (error): Likewise.
- (warn): Likewise.
-
-2001-09-25 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (do_wide): New.
- (options): Add --wide.
- (usage, parse_args): Likewise.
- (process_program_headers): Put each segment on a single line if
- --wide is given.
- (process_section_headers): Put each section on a single line if
- --wide is given.
- * doc/binutils.texi: Document it.
- * NEWS: Likewise.
-
-2001-09-25 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (print_vma): Print 8 digits of low hex value.
-
-2001-09-24 Andreas Jaeger <aj@suse.de>
-
- * nlmconv.c: Fix warnings about unused attributes and function
- prototypes.
-
- * strings.c: Add prototype for get_char.
-
-2000-09-19 H.J. Lu <hjl@gnu.org>
-
- * doc/Makefile.am ($(DEMANGLER_NAME).1): Try cxxfilt.man and
- $(srcdir)/cxxfilt.man.
- * doc/Makefile.in: Rebuild.
-
-2001-09-19 Alan Modra <amodra@bigpond.net.au>
-
- * objcopy.c (copy_main): Correct rename-section string parsing.
- Consolidate new_name parsing, and error messages.
-
-2001-09-18 Bruno Haible <haible@clisp.cons.org>
-
- * addr2line.c: Don't include <ctype.h>.
- (main): For gettext, also set the LC_CTYPE locate facet.
- * ar.c (main): Likewise.
- * coffdump.c (main): Likewise.
- * dlltool.c: Include "safe-ctype.h" instead of <ctype.h>.
- (main): For gettext, also set the LC_CTYPE locate facet.
- Use ISALNUM instead of isalpha/isdigit.
- * dllwrap.c: Don't include <ctype.h>.
- (main): For gettext, also set the LC_CTYPE locate facet.
- * nlmconv.c: Include "safe-ctype.h" instead of <ctype.h>.
- (main): For gettext, also set the LC_CTYPE locate facet.
- Use TOUPPER instead of islower/toupper.
- * nlmheader.y: Include "safe-ctype.h" instead of <ctype.h>.
- (yylex): Use ISSPACE/ISALNUM instead of isspace/isalnum.
- Use TOUPPER instead of islower/toupper.
- * nm.c (main): For gettext, also set the LC_CTYPE locate facet.
- * objcopy.c (main): Likewise.
- * objdump.c: Include "safe-ctype.h" instead of <ctype.h>.
- (disassemble_bytes): Use ISPRINT instead of isprint.
- (dump_section_stabs): Use ISDIGIT instead of isdigit.
- (dump_data): Use ISPRINT instead of isprint.
- (main): For gettext, also set the LC_CTYPE locate facet.
- * rclex.l: Include "safe-ctype.h" instead of <ctype.h>.
- (cpp_line, handle_quotes): Use ISSPACE instead of isspace.
- * rcparse.y: Include "safe-ctype.h" instead of <ctype.h>.
- Use TOUPPER instead of islower/toupper.
- * readelf.c (main): For gettext, also set the LC_CTYPE locate facet.
- * resrc.c: Include "safe-ctype.h" instead of <ctype.h>.
- (write_rc_accelerators): Use ISPRINT instead of isprint.
- (write_rc_rcdata): Likewise.
- * size.c (main): For gettext, also set the LC_CTYPE locate facet.
- * srconv.c (main): Likewise.
- * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
- (parse_number): Use ISDIGIT/ISUPPER/ISLOWER instead of
- isdigit/isupper/islower.
- (parse_stab_string, parse_stab_type, parse_stab_argtypes,
- parse_stab_array_type, stab_demangle_count, stab_demangle_get_count,
- stab_demangle_prefix, stab_demangle_qualified,
- stab_demangle_template, stab_demangle_type,
- stab_demangle_fund_type): Use ISDIGIT instead of isdigit.
- * strings.c: Include "safe-ctype.h" instead of <ctype.h>.
- (isgraphic): Use ISPRINT instead of isascii/isprint.
- (main): Remove HAVE_LC_MESSAGES dependency.
- * sysdump.c: Include "safe-ctype.h" instead of <ctype.h>.
- (pbarray): Use ISPRINT instead of isprint.
- (main): For gettext, also set the LC_CTYPE locate facet.
- * windres.c: Include "safe-ctype.h" instead of <ctype.h>.
- (format_from_filename): Use ISPRINT instead of isprint.
- (main): For gettext, also set the LC_CTYPE locate facet.
- * winduni.c: Include "safe-ctype.h" instead of <ctype.h>.
- (unicode_print): Use ISPRINT instead of isprint.
- * wrstabs.c: Include "safe-ctype.h" instead of <ctype.h>.
- (stab_variable): Use ISDIGIT instead of isdigit.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * ar.c (print_contents): Cast args of bfd_seek to the right types.
- Replace bfd_read call with call to bfd_bread.
- (extract_file): Likewise.
-
- * objdump.c (dump_section_header): Cast section->filepos to
- unsigned long to suit printf format string.
- * readelf.c (process_section_headers): Similarly for sh_offset.
- (process_unwind): Likewise.
-
-2001-09-14 Nick Clifton <nickc@cambridge.redhat.com>
-
- * strings.c (encoding, encoding_bytes): New variables.
- (long_options): Add --encoding.
- (main): Accept -e and --encoding.
- (get_char): New function. Read a, possibly wide, character from
- the input stream.
- (print_strings): Use get_char().
- (usage): Document new command line option.
- * doc/binutils.texi: Document new command line option.
- * NEWS: Announce new command line option.
-
-2001-09-12 Alexandre Oliva <aoliva@redhat.com>
-
- * readelf.c (guess_is_rela, dump_relocations, get_machine_name,
- get_machine_flags): Added EM_M32R, EM_D10V, EM_V850, EM_D30V,
- EM_MN10200, EM_MN10300, EM_FR30, EM_AVR_OLD and EM_PJ_OLD.
- Removed EM_CYGNUS_ARC.
-
-2001-09-04 Jeffrey A Law (law@cygnus.com)
-
- * readelf.c: Include elf/h8 for H8 series definitions.
- (guess_is_rela): H8 series if RELA.
- (dump_relocations): Handle H8 series relocations.
-
-2001-08-31 Eric Christopher <echristo@redhat.com>
-
- * readelf.c (get_machine_flags): Remove E_MIPS_MACH_MIPS32_4K.
-
-2001-08-29 Peter Targett <peter.targett@arccores.com>
-
- * MAINTAINERS: Include ARC Maintainer.
-
-2001-08-29 Ben Elliston <bje@redhat.com>
-
- * stabs.c (stab_demangle_template): Initialise s4.
-
-2001-08-27 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (dump_relocations): Recognise EM_PPC64.
-
-2001-08-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * readelf.c (get_machine_flags): Add detection of EF_MIPS_32BITMODE.
-
-2001-08-25 H.J. Lu <hjl@gnu.org>
-
- * nm.c (print_width): New.
- (display_rel_file): Set `print_width' according to
- bfd_sprintf_vma.
- (print_symbol_info_bsd): Check `print_width' instead of BFD64.
-
-2001-08-24 Alexandre Oliva <aoliva@redhat.com>
-
- * objcopy.c (use_alt_mach_code): New variable.
- (OPTION_ALT_MACH_CODE): Define.
- (copy_options): Added --alt-machine-code.
- (copy_main): Handle it.
- (copy_object): Switch to alternate machine code if requested.
- * doc/binutils.texi: Document new option.
- * NEWS: Likewise.
-
-2001-08-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * readelf.c (get_machine_flags): Add detection of EF_MIPS_UCODE.
-
-2001-08-21 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (dump_relocations): Support ELF64 on 32bit hosts.
- (display_debug_info): Cast for 64bit hosts.
- (display_debug_frames): Likewise.
- (process_mips_specific): Likewise.
-
-2001-08-21 Andreas Jaeger <aj@suse.de>
-
- * coffgrok.h: Add missing parameter for prototype of coff_grok.
-
- * sysdump.c: Add missing prototypes.
- * srconv.c: Likewise.
- * unwind-ia64.c: Likewise.
- * coffdump.c: Likewise.
-
- * sysinfo.y: Print prototypes, include <ansidecl.h>.
-
- * coffgrok.c: Add missing prototypes, include libiberty.h instead
- of declaring xcalloc.
-
-2001-08-10 H.J. Lu <hjl@gnu.org>
-
- * nm.c (print_value): Add one arg, bfd *.
- (print_value): Replace fprintf_vma with bfd_fprintf_vma.
- (print_symbol_info_bsd): Also pass `abfd' to print_value ().
- (print_symbol_info_sysv): Likewise.
- (print_symbol_info_posix): Likewise.
-
- * objdump.c (dump_section_header): Replace printf_vma with
- bfd_printf_vma.
- (print_section_stabs): Likewise.
- (dump_bfd_header): Likewise.
- (objdump_print_value): Replace sprintf_vma with
- bfd_sprintf_vma.
- (disassemble_bytes): Likewise.
- (dump_reloc_set): Likewise.
-
-2001-08-10 Andreas Jaeger <aj@suse.de>
-
- * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
- to build warnings.
- * configure: Regenerate.
-
-2001-08-09 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c: Add missing prototypes.
- * objdump.c: Likewise. Format existing prototypes.
-
-2001-08-08 Alexandre Oliva <aoliva@redhat.com>
-
- * readelf.c (display_debug_info): Add to abbrev_offset the addend
- of any RELA relocation for the abbrev_offset memory location that
- refers to the .debug_abbrev section symbol.
-
-2001-08-07 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (process_file): Return 0 if OK, otherwise return 1.
- (main): Return process_file ().
-
-2001-08-05 Philip Blundell <philb@gnu.org>
-
- * doc/binutils.texi: Use "Thumb" not "THUMB".
-
-2001-08-03 John Healy <jhealy@redhat.com>
-
- Patch suggested by Frank Eigler <fche@redhat.com>.
- * objdump.c (disassemble_data): Fill in section member of the
- disasm_info structure.
-
-2001-08-03 Tom Walsh <tom@cyberiansoftware.com>
-
- * configure.in: Added --with-windres option.
- * configure: Regenerated.
-
-2001-07-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * doc/binutils.texi: Use @command{name} for commands;
- use @option{-opt} for options; use @table @env for list of options;
- remove spaces arround [ | ] in synopsis.
-
- * doc/Makefile.am (POD2MAN): Use 'GNU Development Tools' for the
- center title.
-
-2001-07-31 Nick Clifton <nickc@cambridge.redhat.com>
-
- * objcopy.c: Fix formatting.
- (section_rename): New structure.
- (OPTION_RENAME_SECTION): New switch.
- (copy_usage): Document new switch.
- (add_section_rename): New function: Add a node to the section
- rename list.
- (find_section_rename): New function: Find the new name and
- flags for a section.
- (setup_section): Call find_section_name to determine the name
- of the output section.
- (copy_main): Handle OPTION_RENAME_SECTION.
- * binutils.texi: Document new switch.
- * NEWS: Mention new switch.
-
-2001-07-30 Nick Clifton <nickc@cambridge.redhat.com>
- * README: Rename bug-gnu-utils@gcc.org to bug-binutils@gcc.org.
- * MAINTAINERS: Rename bug-gnu-utils@gcc.org to
- bug-binutils@gcc.org.
+ 2004-03-21 Richard Henderson <rth@redhat.com>
+ * readelf.c (display_debug_frames): Don't crash for mismatched
+ DW_CFA_restore_state.
-2001-07-28 Matthias Kramm <kramm@quiss.org>
+ 2004-03-10 Ben Elliston <bje@gnu.org>
+ * MAINTAINERS: Update my mail address.
- * bucomm.c (list_supported_architectures): New function.
- * bucomm.h (list_supported_architectures): Declare.
- * objdump.c (usage): Call the above.
+ 2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
+ * deflex.l: Handle "PRIVATE" string.
+ * defparse.y (%token): Add PRIVATE.
+ (%type): Add opt_PRIVATE.
+ (expline): Pass opt_PRIVATE to def_exports.
+ (opt_PRIVATE): Handle PRIVATE token.
+ * dlltool.h (def_exports): Add 7th param for private flag to
+ declaration.
+ * dlltool.c: Add PRIVATE to comment on EXPORTS syntax.
+ (struct export): Add 'private' field.
+ (def_exports): Set 'private' field of struct exports.
+ (scan_drectve_symbols): Adjust calls to def_exports.
+ (scan_filtered_symbols): Likewise.
+ (dump_def_info): Print 'private' field.
+ (gen_def_file): Likewise.
+ (gen_lib_file): Skip generation of lib object if private.
+ Delete tmp object files in same order as they were generated.
+ Don't delete non-existent private object files.
-2001-07-25 Dave Brolley <brolley@redhat.com>
+ 2004-02-27 Andreas Schwab <schwab@suse.de>
+ * ar.c (main): Support POSIX-compatible argument parsing.
- * objdump.c (SKIP_ZEROES): Only define it if it is not already defined.
- (SKIP_ZEROES_AT_END): Only define it if it is not already defined.
+ 2004-02-23 Daniel Lucq <daniel@lucq.org>
+ * readelf.c (process_mips_specific): Print conflictsno as an
+ unsigned long.
-2001-07-19 Nick Clifton <nickc@cambridge.redhat.com>
+ 2004-02-21 Dmitry Timoshkov <dmitry@baikal.ru>
+ * dlltool.c (gen_exp_file): Always output names for forwarded symbols.
- * README: Update for 2.11. Change bug reporting email address.
- * MAINTAINERS: Tidy up. Change bug reporting email address.
+ 2004-02-19 Jakub Jelinek <jakub@redhat.com>
+ * objcopy.c (copy_section): Avoid warnings.
-2001-07-16 DJ Delorie <dj@redhat.com>
+2004-02-14 Andrew Cagney <cagney@redhat.com>
- * resres.c (write_res_header): Align header size.
- (res_align_file): Calculate alignment correctly.
+ * ar.c (remove_output): Use bfd_cache_close.
+ * arsup.c (ar_end): Ditto.
- * rcparse.y (styles): use SUBLANG_SHIFT instead of 8 (or the more
- correct 10).
- * resrc.c (write_rc_resource): Likewise.
- * windres.h (SUBLANG_SHIFT): Define - as 10.
+2004-01-21 Roland McGrath <roland@redhat.com>
-2001-07-15 Nick Clifton <nickc@cambridge.redhat.com>
+ * readelf.c (get_note_type): Match NT_AUXV.
- * MAINTAINERS: Add Christian Groessler as maintainer for z8k port.
+2004-01-20 Nick Clifton <nickc@redhat.com>
-2001-07-11 Nick Clifton <nickc@cambridge.redhat.com>
+ * version.c (print_version): Update copyright year to 2004.
- * MAINTAINERS: Add notes about branch checkins.
+2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-2001-07-05 Daniel Berlin <dan@cgsoftware.com>
-
- * readelf.c (display_debug_macinfo): New function, display
- .debug_macinfo section.
- (do_debug_macinfo): New variable.
- (parse_args): Handle "-w[mM]" to mean display macro info.
- (process_section_headers): Handle debug_macinfo.
- (debug_displays): Replace unsupported function with macinfo
- function for .debug_macinfo display.
- * doc/binutils.texi: Document new command line switch.
- * NEWS: Document new feature of readelf.
-
-2001-07-05 H.J. Lu <hjl@gnu.org>
-
- * objcopy.c (filter_symbols): Don't turn undefined symbols
- into local.
-
-2001-07-03 H.J. Lu <hjl@gnu.org>
-
- * doc/Makefile.am (addr2line.1): Use addr2line.pod instead of
- $@.pod.
- (ar.1): Likewise.
- (dlltool.1): Likewise.
- (nlmconv.1): Likewise.
- (nm.1): Likewise.
- (objcopy.1): Likewise.
- (objdump.1): Likewise.
- (ranlib.1): Likewise.
- (readelf.1): Likewise.
- (size.1): Likewise.
- (strings.1): Likewise.
- (strip.1): Likewise.
- (windres.1): Likewise.
- (cxxfilt.man): Use $(DEMANGLER_NAME).pod instead of $@.pod.
- ($(DEMANGLER_NAME).1): Also substitute cxxfilt with
- $(DEMANGLER_NAME).
- (as.1): Removed.
- * doc/Makefile.in: Regenerated.
-
-2001-07-03 Nick Clifton <nickc@cambridge.redhat.com>
-
- * MAINTAINERS: Change MIPS maintainer to Eric Christopher.
-
-2001-07-01 Daniel Berlin <dan@cgsoftware.com>
-
- * readelf.c: Support DWARF 2.1 tags, encodings, languages.
-
-2001-06-29 James Cownie <jcownie@etnus.com>
-
- * readelf.c: Support DWARF 2.1 attributes.
-
-2001-06-28 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (GET_DATA_ALLOC): Remove.
- (GET_DATA): Remove.
- (get_data): New function combining above macros, with an extra
- test for zero size.
- (slurp_rela_relocs): Use get_data, and catch error return.
- (slurp_rel_relocs): Likewise.
- (get_32bit_program_headers): Likewise.
- (get_64bit_program_headers): Likewise.
- (get_32bit_section_headers): Likewise.
- (get_64bit_section_headers): Likewise.
- (get_32bit_elf_symbols): Likewise.
- (get_64bit_elf_symbols): Likewise.
- (process_section_headers): Likewise.
- (process_relocs): Likewise.
- (slurp_ia64_unwind_table): Likewise.
- (process_unwind): Likewise.
- (get_32bit_dynamic_segment): Likewise.
- (get_64bit_dynamic_segment): Likewise.
- (process_dynamic_segment): Likewise.
- (process_version_sections): Likewise.
- (process_symbol_table): Likewise.
- (dump_section): Likewise.
- (display_debug_info): Likewise.
- (display_debug_section): Likewise.
- (process_section_contents): Likewise.
- (process_corefile_note_segment): Likewise.
- (process_mips_specific): Likewise. Also free econf32, econf64.
-
-2001-06-25 Alan Modra <amodra@bigpond.net.au>
-
- * readelf.c (dump_relocations): Print "bad symbol index" if
- symtab == NULL with non-zero symtab_index.
- (process_relocs): Don't bomb if reloc section has no symsec.
-
-2001-06-24 H.J. Lu <hjl@gnu.org>
-
- * objcopy.c (strip_main): Revert the change made on 2001-05-30
- by accident.
- (copy_main): Apply the the change made to strip_main on
- 2001-05-30 by accident.
-
-2001-06-23 Andreas Jaeger <aj@suse.de>
-
- * unwind-ia64.c (unw_decode_x1): Add unused attribute for
- parameter 'code'.
- (unw_decode_x2): Likewise.
- (unw_decode_x3): Likewise.
- (unw_decode_x4): Likewise.
-
-2001-06-23 Ben Elliston <bje@redhat.com>
-
- * MAINTAINERS: Add myself as M88k maintainer.
-
-2001-06-22 Jocelyn Mayer <jocelyn.mayer@netgem.com>
-
- * objcopy.c (strip_main): Support -o or --output-file command lien
- switch.
-
-2001-06-19 H.J. Lu <hjl@gnu.org>
-
- * doc/Makefile.in: Regenerated.
-
-2001-06-19 Nick Clifton <nickc@cambridge.redhat.com>
-
- * readelf.c: Restore formatting.
-
-2001-06-18 H.J. Lu <hjl@gnu.org> & Nick Clifton <nickc@redhat.com>
-
- * Makefile.am: Move documentation into doc subdirectory.
- * Makefile.in: Regenerated.
- * binutils.texi: Move into doc subdirectory.
- * addr2line.1: Removed.
- * ar.1: Likewise.
- * dlltool.1: Likewise.
- * nlmconv.1: Likewise.
- * nm.1: Likewise.
- * objcopy.1: Likewise.
- * objdump.1: Likewise.
- * ranlib.1: Likewise.
- * readelf.1: Likewise.
- * size.1: Likewise.
- * strings.1: Likewise.
- * strip.1: Likewise.
- * windres.1: Likewise.
- * cxxfilt.man: Likewise.
- * doc: New Directory.
- * doc/Makefile.am: New file.
- * doc/Makefile.in: Generate.
-
-2001-06-09 Alan Modra <amodra@bigpond.net.au>
-
- * NEWS: Fix a typo. Mention hppa64-elf. Add binutils-2.11 marker.
-
-2001-06-01 Alan Modra <amodra@bigpond.net.au>
-
- * MAINTAINERS: Update my email address.
-
-2001-05-30 Honda Hiroki <hhonda@kobe-catv.ne.jp>
-
- * objcopy.c: Add new switches: --keep-global-symbol,
- --keep-symbols, --localize-symbols, --keep-global-symbols and
- --weaken-symbols.
- * binutils.texi: Document new switches.
- * objcopy.1: Regenerate.
- * NEWS: Announce new feature.
-
-2001-05-28 Andreas Jaeger <aj@suse.de>
-
- * readelf.c (display_debug_frames): Fix warnings: Remove unused
- variables, fix format strings.
-
-2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
-
- * objdump.c (disassemble_bytes): Remove section VMA adjustment
- when computing the address of the line to show.
-
-2001-05-16 Richard Henderson <rth@redhat.com>
-
- * readelf.c (do_debug_frames_interp): New.
- (byte_get_little_endian): If BFD64, always read entire 8-byte fields.
- (byte_get_big_endian): Likewise.
- (parse_args) ['F']: Set do_debug_frames_interp.
- (Frame_Chunk): Make data_factor signed, add fde_encoding.
- (frame_display_row): Don't trunc pc_begin to int.
- (size_of_encoded_value): New.
- (display_debug_frames): Handle 64-bit targets. Print raw data
- unless do_debug_frames_interp.
- (debug_displays): Remove duplicate .debug_frame.
-
-2001-05-15 Ralf Baechle <ralf@gnu.org>
-
- * readelf.c: Replace uses of EM_MIPS_RS4_BE with EM_MIPS_RS3_LE.
- The former constant was never in active use and is used otherwise
- by the ABI.
-
-2001-05-11 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (process_unwind): Print all unwind sections, not just
- one.
-
-2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * readelf.c (process_unwind): Remove const specifier.
-
-2001-04-27 Michal Svec <rebel@atrey.karlin.mff.cuni.cz>
-
- * strings.c (isgraphic): Do not use isascii() unless it is needed
- for isprint() to work.
- (main): Set the locale domain to LC_ALL not just LC_MESSAGES.
-
-2001-04-27 Johan Rydberg <jrydberg@opencores.org>
-
- * NEWS: Announce support for OpenRISC.
-
-2001-04-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * dlltool.c (do_default_excludes): Initialise to true.
-
-2001-04-10 Alan Modra <amodra@one.net.au>
-
- * MAINTAINERS: Update my email address
- * nm.c (print_symbol_info_bsd): Use a simple printf string.
-
-2001-04-05 Hans-Peter Nilsson <hp@axis.com>
-
- * readelf.c (display_debug_lines): Fix typo for "Prologue".
-
-2001-03-30 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (process_unwind): Just return if do_unwind is 0.
-
-2001-03-28 Roger Sayle <roger@metaphorics.com>
-
- * dlltool.c (make_one_lib_file): Fix section flags for
- .text, .data and .bss in stub ds*.o files to match those
- generated by gas.
-
-2001-03-29 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (process_unwind): Only do unwind sections for
- IA64.
-
-2001-03-28 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am ($(srcdir)/dlltool.1): Remove the extra target.
- * Makefile.in: Regenerate.
-
-2001-03-26 Andreas Jaeger <aj@suse.de>
-
- * binutils.texi (nm): Fix texi syntax.
-
-2001-03-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * binutils.texi: Put @c man begin and @c man end indications
- to generate man pages using texi2pod and pod2man. Put @c man title
- to identify each man. Add SEEALSO entries.
- * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variable.
- (man_MANS): Add dlltool.1, nlmconv.1, readelf.1, windres.1,
- sort the list.
- (*.1): Build the man pages from binutils.texi.
- * Makefile.in: Regenerate.
-
-2001-03-13 Eric Kohl <ekohl@rz-online.de>
-
- * defparse.y (opt_equal_name): allow "." in name.
- * dlltool.c (def_exports): Added ability to generate forwarded exports.
- (gen_exp_file): Likewise.
-
-2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
-
- * NEWS: Document addition of -B switch to objcopy.
- * binutils.texi: Document addition of -B switch to objcopy.
- * objcopy.c: (copy_options): Add --binary-architecture.
- (copy_usage): Document -B/--binary-architecture.
- (copy_main): Support -B/--binary-architecture. Set
- bfd_external_binary_architecture.
-
-2001-03-11 Andreas Jaeger <aj@suse.de>
-
- * readelf.c (guess_is_rela): Handle EM_S390_OLD.
- (dump_relocations): Likewise.
- (get_machine_name): Likewise.
-
-2001-02-28 Nick Clifton <nickc@redhat.com>
-
- * readelf.c: (struct unw_aux_info): Remove const modifier for
- 'strtab' field.
- (process_unwind): Remove non-K&R compliant LHS type cast in call
- to GET_DATA_ALLOC macro.
-
-2001-02-28 Philip Blundell <pb@futuretv.com>
-
- * readelf.c (decode_ARM_machine_flags): Explicitly mention which
- ABI is in use; remove ambiguity between the "unknown" EABI and
- unrecognised ABIs. Handle version 2 ARM EABI. Update uses of
- renamed EF_xx constants.
-
-2001-02-27 Alan Modra <alan@linuxcare.com.au>
-
- * configure.in (BFD_VERSION): New.
- (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
- * configure: Regenerate.
- * Makefile.am: Run "make dep-am"
- * Makefile.in: Regenerate.
-
-2001-02-14 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS: Add "Obvious Fix" rule.
-
-2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * unwind-ia64.c: Don't use ANSI C preprocessor stringisation and string
- literal concatenation.
-
-2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * readelf.c (struct unw_aux_info): Remove const from the info member.
- (process_unwind): Don't type-cast the third argument to the
- GET_DATA_ALLOC macro.
-
-2001-02-11 Nick Clifton <nickc@redhat.com>
-
- * readelf.c (dump_relocations): Free corrected allocated
- array.
- (process_unwind): Fix compile time warning.
-
-2001-02-10 Nick Clifton <nickc@redhat.com>
-
- * binutils.texi: Document new --unwind option to readelf.
-
-2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * readelf.c: Add linux target for S/390.
-
-2001-02-10 Alan Modra <alan@linuxcare.com.au>
-
- * nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
- printf is a macro.
-
-2001-02-08 Hans-Peter Nilsson <hp@bitrange.com>
-
- * acinclude.m4 (AM_PROG_LEX): Override installed definition.
+ * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
+ throughout.
* aclocal.m4: Regenerate.
* configure: Regenerate.
-2001-02-07 Todd Vierling <tv@wasabisystems.com>
-
- * bucomm.c (bfd_target_vector): Change extern array to pointer.
- * objdump.c (bfd_target_vector): Likewise.
-
-2001-02-07 David Mosberger <davidm@hpl.hp.com>
-
- * readelf.c (process_unwind): New function.
- (slurp_ia64_unwind_table): Ditto.
- (dump_ia64_unwind): Ditto.
- (find_symbol_for_address): Ditto.
- (slurp_rela_relocs): New function (split off from dump_relocations()).
- (slurp_rel_relocs): Ditto.
- (parse_args): Handle '-u' option.
-
- * unwind-ia64.c: New file.
- * unwind-ia64.h: New file.
- * Makefile.am: Include unwind-ia64.c in readelf build.
- * Makefile.in: Regenerate.
- * po/binutils.pot: Regenerate.
-
-2001-02-04 Philip Blundell <philb@gnu.org>
-
- * configure.in (OBJDUMP_DEFS): Match `arm*-*', not just `arm-*'.
- * configure: Regenerate.
-
-2001-01-31 Steve deRosier <sderosier@vari-lite.com>
-
- * ieee.c (ieee_add_bb11): Don't check for backslashes
- unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
-
-2001-01-24 Mark Elbrecht <snowball3@bigfoot.com>
-
- * ieee.c: Update copyright.
- (ieee_start_compilation_unit): Don't check for backslashes
- unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
-
- * stabs.c: Update copyright. Include "filenames.h".
- (parse_stab): Use IS_ABSOLUTE_PATH. Ignore N_WARNING stabs.
-
-2001-01-23 Jakub Jelinek <jakub@redhat.com>
-
- * readelf.c (process_version_sections): Check if VERDEF or VERNEED
- sections are present before using them. Remove code duplication.
- (process_symbol_table): Check if VERDEF or VERNEED sections are
- present before using them.
-
-2001-01-17 Nick Clifton <nickc@redhat.com>
-
- * objcopy.c (copy_object): Fail if attempting to convert the
- endianness of the input object file.
-
- * binutils.texi: Explain that objcopy cannot convert endianness.
-
-2001-01-16 Nick Clifton <nickc@redhat.com>
-
- * readelf.c (string_table_length): New variable.
- (SECTION_NAME): Catch out of range indices and missing section
- pointers.
- (process_section_headers): Delete useless local variable
- string_table_offset. Set the value of string_table_length
- after loading the string table.
- (process_mips_specific): Use SECTION_NAME macro.
- (process_file): Set string_table_length to 0 when it is freed.
-
-2001-01-12 Nick Clifton <nickc@redhat.com>
-
- * version.c (print_version): Update copyright date.
-
-2001-01-11 Peter Targett <peter.targett@arccores.com>
-
- * readelf.c (dump_relocations): Include selection with EM_ARC.
- (get_machine_name) Update name to "ARC".
-
-2001-01-09 Nick Clifton <nickc@redhat.com>
-
- * Makefile.am: Add rule to build objdump.o from objdump.c and
- using OBJDUMP_DEFS.
- * Makefile.in: Regenerate.
-
- * configure.in: Define OBJDUMP_DEFS. Default to empty.
- (arm, xscale, d10v): For these targets define OBJDUMP_DEFS to
- -DDISASSEMBLER_NEEDS_RELOCS.
- * configure: Regenerate.
-
- * objdump.c (disassemble_bytes): If DISASSEMBLER_NEEDS_RELOCS
- is defined read in the relocs even if dump_reloc_info is
- false.
-
-2001-01-07 Philip Blundell <philb@gnu.org>
-
- * binutils.texi (Bug Reporting): Replace `bug-gnu-utils' with
- `bug-binutils'.
- * README: Likewise.
-
-2000-12-19 Nick Clifton <nickc@redhat.com>
-
- * dlltool.c: Add missing support for arm-epoc-pe.
- * configure.in: Add missing support for arm-epoc-pe.
- * configure: Regenerate.
-
-2000-12-15 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS: Add Diego Novillo as a maintainer for the Intel
- Mode parts of the x86 port.
-
-2000-12-04 Andreas Jaeger <aj@suse.de>
-
- * readelf.c (guess_is_rela): Add EM_X86_64.
- (dump_relocations): Add EM_X86_64.
- (get_machine_name): Add EM_X86_64.
- Include "elf/x86-64.h".
-
-2000-12-12 Nick Clifton <nickc@redhat.com>
-
- * readelf.c: Fix formatting.
-
-2000-12-11 Jan Hubicka <jh@suse.cz>
-
- * MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer.
-
-2000-12-07 Andrew Haley <aph@redhat.com>
-
- * readelf.c (display_debug_frames): Only display columns that are
- referenced by the frame debug info.
-
-2000-12-05 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS: Add Jason Merrill as DWARF2 maintainer.
-
-2000-12-04 Jason Merrill <jason@redhat.com>
-
- * readelf.c (process_section_headers): Handle linkonce.wi sections.
- (display_debug_section): Likewise.
- (display_debug_info): Display CU header before bailing.
-
-2000-12-01 Chris Demetriou <cgd@sibyte.com>
-
- * readelf.c (get_machine_flags): Recognize MIPS32 ISA in
- EF_MIPS_ARCH. Replace use of E_MIPS_MACH_MIPS32 with
- E_MIPS_MACH_MIPS32_4K and adjust printed CPU name similarly.
-
- * readelf.c (get_machine_flags): Add cases for E_MIPS_ARCH_5,
- and E_MIPS_ARCH_64.
-
- * readelf.c (get_machine_flags): Add case for
- E_MIPS_MACH_SB1.
-
-2000-11-30 Richard Earnshaw <rearnsha@arm.com>
-
- * readelf.c (frame_display_row): Output 's' for DW_CFA_same_value.
-
-2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
-
- * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers.
- Change sourceware.cygnus.com to sources.redhat.com.
- Fix typo for "amongst".
-
-2000-11-28 Nick Clifton <nickc@redhat.com>
-
- * strip.1 (COPYING): Mention that the GNU Free Documentation
- License is present in the sources, but not the output, and
- also available from the GNU website.
- (GNU Free Documentation License): Comment out this section.
- * strings.1: Ditto.
- * size.1: Ditto.
- * ranlib.1: Ditto.
- * objdump.1: Ditto.
- * objcopy.1: Ditto.
- * nm.1: Ditto.
- * nlmconv.1: Ditto.
- * ar.1: Ditto.
- * addr2line.1: Ditto.
-
-2000-11-27 DJ Delorie <dj@redhat.com>
-
- * readelf.c (usage): Add -wf (--debug-dump=frames) option.
- (parse_args): Support -wf option.
- (process_section_headers): Ditto.
- (debug_displays): Ditto.
- (display_debug_frames): New, dump *_frame sections.
- (frame_need_space): Support for above.
- (frame_display_row): Ditto.
- * binutils.texi: Document it.
-
-2000-11-24 Nick Clifton <nickc@redhat.com>
-
- * NEWS: Announce support for v5t, v5te and XScale.
-
-2000-11-22 Nick Clifton <nickc@redhat.com>
-
- * readelf.c (get_machine_name): Add EM_JAVELIN, EM_FIREPATH,
- EM_ZSP, EM_MMIX, EM_HUANY, EM_PRISM.
- (get_section_type_name): Add SHT_GROUP and SHT_SYMTAB_SHNDX.
- (get_elf_section_flags: Add SHF_GROUP.
- (process_section_headers): Adjust output for 32-bit binaries
- to look nice on an 80 column terminal.
-
-2000-11-20 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (get_osabi_name): Change ELFOSABI_MONTEREY to
- ELFOSABI_AIX.
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * readelf.c (display_debug_lines): Adjust last change to
- use sizeof (external->li_length).
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * readelf.c (display_debug_lines): Fix section length check
- and end_of_sequence computation.
-
-2000-11-06 Nick Clifton <nickc@redhat.com>
-
- * binutils.texi: Add GNU Free Documentation License.
- * objcopy.1: Add GNU Free Documentation License.
- * objdump.1: Add GNU Free Documentation License.
- * addr2line.1: Add GNU Free Documentation License.
- * ar.1: Add GNU Free Documentation License.
- * nlmconv.1: Add GNU Free Documentation License.
- * nm.1: Add GNU Free Documentation License.
- * ranlib.1: Add GNU Free Documentation License.
- * size.1: Add GNU Free Documentation License.
- * strings.1: Add GNU Free Documentation License.
- * strip.1: Add GNU Free Documentation License.
-
-2000-10-06 Luciano Gemme <ishitawa@yahoo.com>
-
- * objcopy.c (--srec-len=nn): New parameter to set the
- maximum length of generated Srecords.
- (--srec-forceS3): New parameter that restricts the generation of
- Srecords to type S3 only.
- * binutils.texi: Document new command line switches.
- * objcopy.1: Docuemnt the new command line switches.
- * NEWS: Announce the existence of the new command line switches.
-
-2000-10-31 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS: Add Jim Wilson as the maintainer for the IA64
- code. Add Eric Chrisopher as maintainer of MN10300 port.
-
-2000-10-12 Roger Sayle <roger@metaphorics.com>
-
- * Make comma after string after icon/control optional.
-
-2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
- * readelf.c (get_machine_flags): Also print EF_MIPS_MACH field.
-
- * NEWS: Mention support for MIPS32.
-
-2000-09-08 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS: Add Stephane Carrez as maintainer for 68HC[11|12].
-
-2000-09-07 H.J. Lu <hjl@gnu.org>
-
- * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
- * configure: Rebuild.
-
-2000-09-06 Alexandre Oliva <aoliva@redhat.com>
-
- * configure: Rebuilt with new libtool.m4.
-
-2000-09-05 Nick Clifton <nickc@redhat.com>
-
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * configure: Regenerate.
-
-2000-09-04 Todd Vierling <tv@wasabisystems.com>
-
- * strip.1: Fix stray '\' in -o formatting.
-
-2000-09-02 Nick Clifton <nickc@redhat.com>
-
- * configure.in: Increase version number to 2.10.91.
- * configure: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * po/binutils.pot: Regenerate.
-
-2000-08-31 Alexandre Oliva <aoliva@redhat.com>
-
- * acinclude.m4: Include libtool and gettext macros from the
- top level.
- * aclocal.m4, configure: Rebuilt.
-
-2000-08-30 Jamie Guinan <guinan@bluebutton.com>
-
- * resrc.c (close_input_stream): Delete extraneous logic
-
-2000-08-24 Hans-Peter Nilsson <hp@axis.com>
-
- * NEWS: Mention support for CRIS.
-
-2000-08-21 Nick Clifton <nickc@redhat.com>
-
- * addr2line.c: Changed email address for Ulrich Lauther.
-
-2000-08-17 Christopher C. Chimelis <chris@debian.org>
-
- * objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common").
-
-2000-08-17 Nick Clifton <nickc@redhat.com>
-
- * readelf.c (display_debug_pubnames): Only issue warning
- message once. Terminate message with a new line.
- (display_debug_aranges): Only display version 2 debug info.
-
-2000-08-14 Todd Vierling <tv@wasabisystems.com>
-
- * objcopy.c (strip_main): Silently accept -d as an alias for -g
- for compatability with old BSD systems.
-
-2000-08-14 Jason Eckhardt <jle@cygnus.com>
-
- * NEWS: Mention i860 support.
-
-2000-08-11 Carlo Wood <carlo@alinoe.com>
-
- * addr2line.c (main): Add const to char *.
-
-2000-08-11 Geoff Keating <geoffk@cygnus.com>
-
- * ar.c (main): Don't crash if called with no arguments
- or only '-X32_64' as an argument.
-
-2000-08-08 DJ Delorie <dj@redhat.com>
-
- * resrc.c: use "gcc -xc" instead of -xc-header
-
-2000-08-05 Jason Eckhardt <jle@cygnus.com>
-
- * readelf.c (elf/i860.h): Include.
- (dump_relocations): Add recognition of i860 architecture.
- (guess_is_rela): Add recognition of i860 architecture.
-
-2000-08-03 Nick Clifton <nickc@cygnus.com>
-
- * MAINTAINERS: Add information about CGEN maintainers.
-
-2000-07-26 Geoff Keating <geoffk@cygnus.com>
-
- * nm.c (main): Ignore '-X32_64' as an option.
- * ar.c (main): Likewise.
- * binutils.texi (nm): Document new option.
- (ar): Likewise.
-
-2000-07-23 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * rdcoff.c (external_coff_symbol_p): K&R-ise.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * binutils.texi: Put back "@end table" deleted by
- accident.
-
-2000-07-05 Kenneth Block <krblock@computer.org>
-
- * nm.c: Add optional style to demangle switch.
- * objdump.c: Add optional style to demangle switch.
- * addr2line.c: Add optional style to demangle switch.
- * binutils.texi: Document optional style to demangle
- switch.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- * MAINTAINERS: Add self as CRIS port maintainer.
- * readelf.c: Include elf/cris.h.
- (guess_is_rela): Handle EM_CRIS.
- (dump_relocations): Ditto.
- (get_machine_name): Ditto.
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Regenerate.
- * po/binutils.pot: Regenerate.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (get_dynamic_type): Change "AUXILARY" to
- "AUXILIARY".
- (process_dynamic_segment): Print out strings for DT_CONFIG,
- DT_DEPAUDIT, DT_AUDIT and DT_RUNPATH.
-
-2000-07-19 Mark Kettenis <kettenis@gnu.org>
-
- * nm.c (usage): Change output of `nm --help' to include a
- description of the purpose of the program and a detailed
- description of the accepted options.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (process_dynamic_segment): Change DF_1_NODEPLIB
- to DF_1_NODEFLIB.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (get_dynamic_type): Fix DT_CHECKSUM.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (get_dynamic_type): Change DT_FEATURE_1 to
- DT_FEATURE.
- (process_dynamic_segment): Likewise.
-
- * readelf.c (get_dynamic_type): Handle DT_CONFIG, DT_DEPAUDIT,
- DT_AUDIT, DT_PLTPAD, DT_MOVETAB and DT_CHECKSUM.
- (process_dynamic_segment): Handle DTF_1_CONFEXP, DF_1_NODEPLIB,
- DF_1_NODUMP and DF_1_CONLFAT.
-
-2000-07-18 Nick Clifton <nickc@cygnus.com>
-
- * binutils.texi (readelf): Fix spelling typo.
-
-2000-07-11 Mark Kettenis <kettenis@gnu.org>
-
- * objdump.c (usage): Make output of `objdump --help' more
- consistent with the rest of the GNU world. Add a line describing
- the purpose of the program.
-
-2000-07-10 David Huggins-Daines <dhd@linuxcare.com>
-
- * stabs.c (parse_stab_range_type): Cast to proper type to fix
- warning.
-
-2000-07-10 Ryan Bradetich <rbradetich@uswest.net>
-
- * readelf.c (get_dynamic_data): Add casts and use unsigned chars
- to fix warnings.
- (process_symbol_table): Ditto.
- (procesS_extended_line_op): Ditto.
- (display_debug_lines): Ditto.
- (display_debug_pubnames): Ditto.
- (read_and_display_attr): Ditto.
-
-2000-07-09 Nick Clifton <nickc@cygnus.com>
-
- * MAINTAINERS: Add several more port specific maintainers.
-
-2000-07-05 Nick Clifton <nickc@cygnus.com>
-
- * MAINTAINERS: Add blanket write privs for Michael Meissner.
-
-2000-06-05 DJ Delorie <dj@redhat.com>
-
- * MAINTAINERS: New.
-
-2000-07-01 Eric Fifer <EFifer@sanwaint.com>
-
- * dllwrap.c: Changed mistaken dyn_string_append() calls
- to dyn_string_append_cstr().
-
-2000-07-01 Alexander Aganichev <AAganichev@hypercom.com>
-
- * stabs.c (parse_stab_type): Divide size in bits by 8 as binutils
- struct debug_type stores size in bytes.
-
-2000-07-01 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
- (CLEANFILES): Add DEPA.
- * Makefile.in: Regenerate.
-
-2000-06-27 Alan Modra <alan@linuxcare.com.au>
-
- * ar.c: Revert incorrect 2000-06-25 patch.
- * bucomm.c: Likewise.
-
-2000-06-25 Mark Elbrecht <snowball3@bigfoot.com>
-
- * rdcoff (parse_coff_symbol): Treat GNU weak symbols as external.
- (external_coff_symbol_p): New function.
- (parse_coff): Use it.
-
-2000-06-25 Alexander Aganichev <AAganichev@hypercom.com>
-
- * ar.c (normalize): Advance past both characters in a DOS based
- <letter>: filepath prefix.
- (main): Likewise.
- * bucomm.c (make_tempname): Likewise.
-
-2000-06-24 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (usage): Fix description of --stabs switch.
-
-2000-06-22 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
- find one.
- * Makefile.in: Regenerate.
-
-2000-06-20 Alexander Aganichev <AAganichev@hypercom.com>
-
- * ar.c (normalize): Correct pointer comparison when checking for
- backslashes.
- (main): Likewise.
- * bucomm.c (make_tempname): Likewise.
-
- * ieee.c (ieee_start_compilation_unit): Correct pointer comparison
- and search for backslashes in the original pathname.
- (ieee_add_bb11): Likewise.
-
-2000-06-18 Nick Clifton <nickc@redhat.com>
-
- * ar.c (print_contents): Improve verbose message.
-
-2000-06-15 H.J. Lu <hjl@gnu.org>
-
- * dyn-string.c: Removed. Not needed with dyn-string.c in
- libiberty.
- * dyn-string.h: Likewise.
-
- * Makefile.am: Remove references to dyn-string.c and
- dyn-string.h. Rebuild dependency.
- * Makefile.in: Rebuild.
-
-2000-06-15 H.J. Lu <hjl@gnu.org>
-
- * binutils.texi: Put a warning on copying relocatable object
- files between two different formats.
-
-2000-06-13 DJ Delorie <dj@cygnus.com>
-
- * rcparse.y (control): ICON controls take an id as the first
- parameter, not an optional string. Also, call new convenience
- function that takes res_id's.
- * resrc.c (define_control): missing text means zero-length string,
- not zero ID.
- (define_icon_control): New.
- * windres.h: declare define_icon_control.
-
-2000-06-13 H.J. Lu <hjl@gnu.org>
-
- * configure: Regenerate.
-
-2000-06-08 David O'Brien <obrien@FreeBSD.org>
-
- * configure.in (VERSION): Update to show this is the CVS mainline.
-
-2000-06-02 David O'Brien <obrien@FreeBSD.org>
-
- * strings.c (isgraphic): Interpret <TAB> as a printable character,
- analogous to <SPACE>.
-
-2000-05-30 Alan Modra <alan@linuxcare.com.au>
-
- * objdump.c (display_target_list): Use bfd_close_all_done, not
- bfd_close to fix crash caused by 2000-05-24 change.
-
-2000-05-25 DJ Delorie <dj@cygnus.com>
-
- * resrc.c (close_input_stream): zero out cpp_pipe after closing it.
-
-2000-05-26 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am: Update dependencies with "make dep-am"
- * Makefile.in: Regenerate.
-
-2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
-
- * ar.c: Include filenames.h.
- (normalize) [HAVE_DOS_BASED_FILE_SYSTEM]: Support backslashes
- and drive letters in file names.
- (main): Support backslashes and drive letters in argv[0]. Drop
- the .exe suffix, if any, in argv[0] if is_ranlib is negative. Use
- FILENAME_CMP instead of strcmp to compare file names.
- (open_inarch) [__GO32__]: Don't ifdef errno != ENOENT test for
- DJGPP v2.
- (do_quick_append) [__GO32__]: Ditto.
- (get_pos_bfd, delete_members, move_members, replace_members):
- Compare file names with FILENAME_CMP.
-
- * bucomm.c: Include filenames.h.
- (make_tempname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support mixed
- forward/backward slashes and drive letters in file names.
-
- * ieee.c (ieee_start_compilation_unit, ieee_add_bb11): Support
- mixed forward/backward slashes and drive letters in file names.
-
- * strings.c (O_BINARY, setmode, SET_BINARY): Define.
- (main) [SET_BINARY]: Use SET_BINARY to switch stdin into binary
- mode.
-
- * objcopy.c: Include filenames.h.
- (main) [HAVE_DOS_BASED_FILE_SYSTEM]: Drop the .exe suffix
- before comparing to "strip".
- Use FILENAME_CMP to compare file names.
-
- * arsup.c: Include filenames.h.
- (map_over_list, ar_delete, ar_replace, ar_extract): Use
- FILENAME_CMP to compare file names.
- (ar_open): Prepend "tmp-" instead of appending "-tmp", to create
- the temporary file name.
-
- * configure.in: Check for setmode.
- * configure: Regenerate.
-
-2000-05-24 Alan Modra <alan@linuxcare.com.au>
-
- * objdump.c (display_target_list): Close the bfd.
- (display_info_table): Likewise.
-
-2000-05-14 H.J. Lu (hjl@gnu.org)
-
- * objcopy.c (filter_symbols): Don't strip global symbols in
- relocatable object files.
-
-2000-05-14 Alan Modra <alan@linuxcare.com.au>
-
- * size.c (usage): Associate short options with corresponding long
- option to give a clue as to their function.
-
-2000-05-14 Philippe De Muyter <phdm@macqel.be>
-
- * size.c (main): Accept and ignore `-f' option.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>
-
- * bucomm.h (gettext, dgettext, dcgettext, textdomain,
- bindtextdomain): Replace defines with those from intl/libgettext.h
- to quieten gcc warnings.
-
-2000-05-12 H.J. Lu <hjl@gnu.org>
-
- * nlmconv.c (temp_filename): Removed.
-
- * nlmconv.c (link_inputs): Use make_temp_file () instead of
- choose_temp_base ().
- * objdump.c (display_target_list): Likewise.
- (display_info_table): Likewise.
-
-2000-05-08 Alan Modra <alan@linuxcare.com.au>
-
- * objcopy.c (setup_section): Add const and gettext calls for err.
+2004-01-12 Jakub Jelinek <jakub@redhat.com>
-2000-05-02 H.J. Lu <hjl@gnu.org>
+ * objcopy.c: Include elf-bfd.h.
+ (is_strip_section): Don't strip debugging sections if
+ STRIP_NONDEBUG.
+ (setup_section): If STRIP_NONDEBUG make SEC_ALLOC sections
+ ~(SEC_LOAD | SEC_HAS_CONTENTS) and on ELF targets also SHT_NOBITS.
- * readelf.c (get_osabi_name): Handle ELFOSABI_NONE instead of
- ELFOSABI_SYSV. Also handle ELFOSABI_NETBSD, ELFOSABI_HURD,
- ELFOSABI_SOLARIS, ELFOSABI_MONTEREY, ELFOSABI_IRIX,
- ELFOSABI_FREEBSD, ELFOSABI_TRU64, ELFOSABI_MODESTO
- and ELFOSABI_OPENBSD.
+ * objcopy.c (copy_section): Free relpp if relcount == 0.
-2000-05-02 Kazu Hirata <kazu@hxi.com>
+2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
- * coffgrok.c: Add ATTRIBUTE_UNUSED as appropriate.
- * srconv.c: Likewise.
- * sysdump.c: Likewise.
+ * stabs.c (parse_stab_argtypes): Handle g++ ABI version 3 names.
+ (stab_demangle_argtypes): Likewise.
+ (stab_demangle_v3_argtypes): New static function.
+ (stab_demangle_v3_arg): New static function.
-2000-04-23 Denis Chertykov <denisc@overta.ru>
+2004-01-12 Nick Clifton <nickc@redhat.com>
- * readelf.c (guess_is_rela): AVR uses RELA relocations.
- (get_machine_name): machine name for EM_AVR added.
+ * objcopy.c (copy_object): Make the function boolean, returning
+ FALSE upon failure.
+ (copy_archive): Handle the return value from copy_object.
+ (copy_file): Likewise.
-2000-04-21 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
+2004-01-07 Nick Clifton <nickc@redhat.com>
- * Makefile.am (readelf.o): Add elf/ia64.h.
- * Makefile.in: Rebuild.
- * readelf.c: Include elf/ia64.h.
- (guess_is_rela, dump_relocations): Handle EM_IA_64.
-
-2000-04-17 Timothy Wall <twall@cygnus.com>
-
- * objdump.c (disassemble_data): Set octets per byte *after*
- resolving arch/mach for binary files.
-
-2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * arlex.l: Add directives to increase lex buffer size.
-
- * objdump.c, readelf.c: Don't include strarg.h or varargs.h. They are
- already included by bucomm.h.
-
-2000-04-10 Philippe De Muyter <phdm@macqel.be>
-
- * readelf.c (dynamic_segment_mips_val): Call `sprintf', not
- `strftime' since strftime is not available on all systems.
- (process_mips_specific): Ditto.
-
-2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
- --enable-build-warnings option.
- * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
- * Makefile.in, configure: Re-generate.
-
-2000-04-06 Alan Modra <alan@linuxcare.com.au>
-
- * addr2line.c: Update copyright.
- * objcopy.1: Likewise, and title.
- * strings.1: Likewise.
-
- * version.c (print_version): Add 2000.
-
- * rddbg.c (read_section_stabs_debugging_info): Don't use
- bfd_size_type for strx to avoid printf problems if BFD64.
-
- * bucomm.c: (report): Remove `static'.
- Move inclusion of stdarg.h/vararg.h from here.
- * bucomm.h: To here.
- (CONST): Change all occurences to const.
- (report): Declare it.
- (bfd_fatal): Add ATTRIBUTE_NORETURN.
- (fatal): Add ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN.
- (non_fatal): Add ATTRIBUTE_PRINTF_1.
-
- * ar.c (main): Use fatal or non_fatal instead of fprintf.
- Correct a typo in an error message.
- (do_quick_append): Use non_fatal instead of fprintf.
- (move_members): Use fatal instead of fprintf, exit.
- * coffdump.c (main): Same here.
-
- * dlltool.c (display): Delete.
- (warn): Delete.
- (inform): Use `report' instead of `display'.
- (rvaafter): Remove trailing \n from fatal error msg.
- (rvabefore): Ditto.
- (asm_prefix): Ditto.
- (yyerror): Replace `warn' with `non_fatal', and remove \n.
- (def_name): Likewise.
- (run): Likewise.
- (scan_all_symbols): Likewise.
- (gen_lib_file): Likewise.
- (def_library): Likewise. Remove extra program_name too.
- (run): Remove \n from inform strings.
- (scan_drectve_symbols): Likewise.
- (add_excludes): Likewise.
- (scan_open_obj_file): Likewise.
- (gen_exp_file): Likewise.
- (gen_lib_file): Likewise.
- (process_duplicates): Likewise.
-
- * Makefile.am (dllwrap_SOURCES): Add version.c.
- * dllwrap.c (program_version): Delete.
- (print_version): Delete.
- (display): Always print trailing \n.
- (warn): New.
- (delete_temp_files): Use warn instead of fprintf. Use gettext.
- (run): Here too.
- (main): And here.
- (usage): gettext'ify.
- (long_options): Add missing initialisers.
-
- * nlmconv.c (main): Use fatal/non_fatal instead of fprintf.
- (select_output_format): Likewise.
- (powerpc_mangle_relocs): Likewise.
- (link_inputs): Likewise.
-
- * nm.c (set_print_radix): Use fatal instead of fprintf, exit.
- (set_output_format): Likewise.
- (main): Use non_fatal instead of fprintf.
- (display_rel_file): Likewise.
-
- * objdump.c (slurp_symtab): Use non_fatal instead of fprintf.
- (slurp_dynamic_symtab): Same here.
- (disassemble_data): And here.
- (read_section_stabs): And here.
- (read_section_stabs): And here.
- (dump_bfd): And here.
- (main): And here.
- (objdump_sprintf): Use fatal instead of fprintf, exit.
- (disassemble_data): Same here.
-
- * rdcoff.c (parse_coff_type): Use non_fatal instead of fprintf.
- (parse_coff_struct_type): Same here.
- (parse_coff_enum_type): And here.
- (parse_coff): And here.
- * rddbg.c (read_debugging_info): And here.
- * size.c (main): And here.
- * windres.c (format_from_name): And here.
- * wrstabs.c (stab_write_symbol): Here too.
- (write_stabs_in_sections_debugging_info): And here.
- (stab_int_type): And here.
- (stab_struct_field): And here.
- (stab_typdef): And here.
-
- * rescoff.c (read_coff_rsrc): Use fatal instead of fprintf, exit.
- * srconv.c (main): Same here.
- * strings.c (main): And here.
- (integer_arg): And here.
- * sysdump.c (main): And here.
-
-2000-04-06 Timothy Wall <twall@cygnus.com>
-
- * objdump.c (dump_section_header): Print CLINK and BLOCK flags.
-
-2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
-
- * readelf.c (decode_location_expression): Loop through multiple
- operations.
- (read_and_display_attr): Pass in length.
-
- * readelf.c (read_and_display_attr): Add CU offset to references.
- (display_debug_info): Pass it in.
-
-2000-04-06 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (decode_ARM_machine_flags): New function.
- (get_machine_flags): Call decode_ARM_machine_flags for ARM
- targets.
-
- (get_machine_name): Catch EM_AVR
-
-2000-04-05 Alan Modra <alan@linuxcare.com.au>
-
- * binutils.texi: Remove optional `=' from long options that have
- an `=' in the argument.
- * objcopy.1: Here too. Remove extra space on discard-all.
-
- * binutils.texi (objcopy): Mention --redefine-sym.
- * objcopy.1: Here too.
- * NEWS: And here.
-
- * objcopy.c (parse_flags): Split off flag names from error message
- gettext as they are not translated.
- (copy_main): Similarly split off option name for --add-section,
- --set-section-flags, --change-section-vma, --change-section-lma
- error messages.
- Some white space changes.
-
- from Matthew Benjamin <matt@linuxbox.nu>
- * objcopy.c (struct redefine_node): New.
- (redefine_sym_list): New.
- (redefine_list_append): New.
- (lookup_sym_redefinition): New.
- (OPTION_REDEFINE_SYM): New.
- (copy_options): Add --redefine-sym option.
- (copy_usage): Mention it.
- (filter_symbols): Rename symbols on redefine_sym_list.
- (copy_object): Call filter_symbols if redefine_sym_list != NULL.
- (copy_main): Handle OPTION_REDEFINE_SYM.
-
-2000-04-04 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (process_symbol_table): Correctly read in symbol
- versioning information.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/binutils.pot: Regenerate.
-
- * addr2line.c (usage): Restore translated part of bug string.
- * ar.c (usage): Likewise.
- * nlmconv.c (show_usage): Likewise.
- * nm.c (usage): Likewise.
- * objcopy.c (copy_usage): Likewise.
- (strip_usage): Likewise.
- * objdump.c (usage): Likewise.
- * readelf.c (usage): Likewise.
- * size.c (usage): Likewise.
- * strings.c (usage): Likewise.
- * windres.c (usage): Likewise.
-
- * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
- (DEP): Quote when passing vars to sub-make. Add warning
- message to end.
- (DEP1): Rewrite for "gcc -MM".
- (CLEANFILES): Add DEP2.
- Update dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-04 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (GENERATED_HFILES): Add rcparse.h
- (arparse.h): Depend on arparse.c
- (defparse.h, nlmheader.h, rcparse.h, sysinfo.h): Similarly.
-
-2000-04-03 H.J. Lu (hjl@gnu.org)
-
- * size.c (usage): Use REPORT_BUGS_TO.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * bucomm.h: #include "bin-bugs.h"
- * addr2line.c (usage): Use REPORT_BUGS_TO.
- * ar.c (usage): Likewise.
- * nlmconv.c (show_usage): Likewise.
- * nm.c (usage): Likewise.
- (OPTION_TARGET): Define.
- (long_options): Use OPTION_TARGET rather than 200.
- (main): Likewise.
-
- * objcopy.c (copy_usage): Use REPORT_BUGS_TO.
- (strip_usage): Likewise.
- * objdump.c (usage): Likewise.
- * readelf.c (usage): Likewise.
- * strings.c (usage): Likewise.
- * windres.c (usage): Likewise.
-
-2000-03-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * readelf.c: Include sys/types.h before sys/stat.h for ultrix.
-
-2000-03-27 Nick Clifton <nickc@cygnus.com>
-
- * rddbg.c (read_section_stabs_debugging_info): Catch out of range
- string offsets in corrupt stabs entries.
-
-2000-03-27 Alan Modra <alan@linuxcare.com.au>
-
- * readelf.c: Include elf/avr.h
- (dump_relocations): Add EM_AVR case.
-
-2000-03-09 Tim Waugh <twaugh@redhat.com>
-
- * strings.1: Correct '-bytes' to '--bytes'.
-
-2000-03-08 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (install-exec-local): Depend on
- install-binPROGRAMS for parallel make.
- * Makefile.in: Regenerated.
-
-2000-02-27 Ian Lance Taylor <ian@zembu.com>
-
- From Brad Lucier <lucier@math.purdue.edu>:
- * readelf.c (process_dynamic_segment): Add cast to make sure
- argument to %* is int.
+ * readelf.c (find_section): New function. Locates a named
+ section.
+ (get_debug_line_pointer_sizes): New function: Initialises the
+ debug_line_pointer_sizes array.
+ (display_debug_lines): Call get_debug_line_pointer_sizes.
+ (display_debug_loc): Likewise.
+ (load_debug_loc): Use find_section.
+ (load_debug_str): Likewise.
+ (display_debug_info): Likewise.
+ (prescan_debug_info): Delete.
+ (debug_displays): Remove prescan field.
+ (process_section_contents): Do not perform prescans.
-2000-02-25 H.J. Lu <hjl@gnu.org>
+2004-01-03 Alan Modra <amodra@bigpond.net.au>
- * configure.in (AC_SEARCH_LIBS): Pass m, not -lm.
+ * objcopy.c (filter_bytes): Delete. Move code to..
+ (copy_section): ..here. Simplify size adjustment. Divide
+ section lma by interleave.
-2000-02-24 Nick Clifton <nickc@cygnus.com>
+2004-01-02 Nick Clifton <nickc@redhat.com>
- * configure.in: Add arm-wince, mips-pe and sh-pe targets.
+ * po/ru.po: New file: Russian translation.
+ * configure.in (ALL_LINGUAS): Add ru
* configure: Regenerate.
- * dlltool.c: Add support for sh-pe and mips-pe targets.
- * rescoff.c: Add support for sh-pe and mips-pe targets.
-
-2000-02-23 H.J. Lu <hjl@gnu.org>
-
- * readelf.c (get_osabi_name): Handle ELFOSABI_LINUX.
-
-2000-02-22 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (process_symbol_table): Remove use of ELF_ST_OTHER.
-
-2000-02-22 Ian Lance Taylor <ian@zembu.com>
-
- From Brad Lucier <lucier@math.purdue.edu>:
- * readelf.c (process_version_sections): Add casts to make sure
- argument to %* is an int.
- (process_mips_specific): Add casts to make printf arguments match
- format.
-
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * objdump.c (dump_section_header): Change `opb' to unsigned.
- (find_symbol_for_address): Same here.
- (disassemble_data): And here. Change `addr_offset',
- `stop_offset', `nextstop_offset' to unsigned long.
- (dump_data): Change opb to unsigned.
-
-2000-02-18 Frank Ch. Eigler <fche@redhat.com>
-
- * resrc.c: Remove unmatched #if for cygwin.
-
-2000-02-14 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * binutils.texi: Document the change of flavor name from atpcs-special
- to special-atpcs to prevent name conflict in gdb.
-
-2000-02-08 Timothy Wall <twall@redhat.com>
-
- * objdump.c (show_line): Fix bug preventing printing of the very
- first line (line zero) of a file when interlisting source and
- assembly. Added option to print entire context from start of file
- when the first line from that file is encountered.
-
-2000-02-03 Timothy Wall <twall@redhat.com>
-
- * objdump.c (dump_section_header, find_symbol_for_address,
- show_line, disassemble_bytes, disassemble_data, dump_data):
- distinguish between octets and bytes.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.com>
-
- * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to
- check to unresolved symbols.
- (print_symbol_info_sysv): Ditto.
- (print_symbol_info_posix): Ditto.
-
- * binutils.texi: Document new 'V' symclass flag for nm.
-
-2000-01-27 Nick Clifton <nickc@redhat.com>
-
- * binutils.texi (objdump): Document new ARM specific
- disassembler options.
-
- * objdump.c (usage): Call disassembler_usage().
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * readelf.c (get_dynamic_flags): Return buff.
- (process_dynamic_segment): Don't pass error strings to printf
- as format arg.
- (read_and_display_attr): Use lx and ld to print longs.
- (process_corefile_note_segment): Cast bfd_vma to unsigned long
- before printing.
- Update copyright.
-
-2000-01-17 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (get_osabi_name): Recognise ELFOSABI_ARM.
-
-2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * debug.c (debug_name_type): Return DEBUG_TYPE_NULL rather than
- false.
- (debug_tag_type): Here too.
- * ieee.c (ieee_builtin_type): And here.
- * stabs.c (parse_stab_type, parse_stab_array_type): And here.
-
-2000-01-13 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (get_machine_name): Change EM_S370 to return "IBM
- System/370".
-
-2000-01-11 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (get_dynamic_type): Remove DT_ENCODING.
-
-2000-01-10 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (get_note_type): Display NT_WIN32PSTATUS notes.
-
-2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
-
- * windres.c (long_options): Add --use-temp-file and
- --no-use-temp-file options.
- (usage): Document.
- (main): Handle.
-
- * windres.h: Update read_rc_file prototype.
-
- * resrc.c (cpp_temp_file): New static variable.
- (istream_type): New static variable.
- (close_pipe): Delete function.
- (run_cmd): New static function.
- (open_input_stream): New static function.
- (close_input_stream): New static function.
- (look_for_default): Handle DOS directory separator. Use
- open_input_stream instead of popen.
- (read_rc_file): Likewise.
-
- * binutils.texi: Document --use-temp-file, --no-use-temp-file
- options.
-
-2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c (create_compat_implib): New variable.
- (gen_exp_file): Use.
- (make_one_lib_file): Use.
- (long_options): Add --compat-implib option.
- (usage): Handle.
- (main): Handle.
-
- * dllwrap.c (enum target_type): Rename MINGW32_TARGET to MINGW_TARGET.
- (main): Use. Don't look for "32" in cygwin and mingw target names.
-
-2000-01-03 Nick Clifton <nickc@cygnus.com>
-
- * binutils.texi: Document new, ARM specific disassembler
- command line switch "-M force-thumb".
-
-For older changes see ChangeLog-9899
+For older changes see ChangeLog-0203
Local Variables:
mode: change-log
diff --git a/contrib/binutils/binutils/ChangeLog-0001 b/contrib/binutils/binutils/ChangeLog-0001
new file mode 100644
index 0000000..9d14894
--- /dev/null
+++ b/contrib/binutils/binutils/ChangeLog-0001
@@ -0,0 +1,2060 @@
+2001-12-20 Julian v. Bock <julian@wongr.net>
+
+ * readelf.c (print_symbol): New function: Print a formatted symbol
+ name. If --wide is specified do not truncate it.
+ (dump_relocations): Use print_symbol() to print symbol names.
+ (process_symbol_table): Likewise.
+ (process_syminfo): Likewise.
+ (process_mips_specific): Likewise.
+ (usage): Document new feature of --wide switch.
+ * doc/binutils.texi (objdump): Document additional behaviour of
+ --wide.
+
+2001-12-18 Michael Snyder <msnyder@redhat.com>
+
+ * objcopy.c (copy_file): Accept corefiles (format bfd_core).
+ (copy_object): Don't set the start address or flags of a core file.
+ (copy_section): Don't relocate a core file. Don't copy contents
+ if the input section has the contents flag set, but the output
+ section does not (which happens with the fake 'note' pseudo-
+ sections that BFD creates for corefiles).
+
+2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (get_machine_flags): Recognize header flags for ABI and
+ ASE extensions. More robust code for ISA checking. Ignore empty fields
+ in header flags for GNU extensions.
+
+2001-12-18 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (copy_archive): Set output bfd format outside the loop.
+
+2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/ja.po: Import from translation project.
+ * configure.in (ALL_LINGUAS): Add ja.
+ * configure: Regenerate.
+
+2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * addr2line.c (main): Protoype.
+ * ar.c (main): Protoype.
+ * nm.c (main): Protoype.
+ * objcopy.c (main): Protoype.
+ * objdump.c (main): Protoype.
+ * size.c (main): Protoype.
+ * strings.c (main): Protoype.
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (symtab_shndx_hdr): New global.
+ (SECTION_HEADER_INDEX): Define.
+ (SECTION_HEADER_NUM): Define.
+ (SECTION_HEADER): Define.
+ (GET_ELF_SYMBOLS): Pass two params rather than three.
+ (get_32bit_elf_symbols): Take file and section args. Read and
+ use SHT_SYMTAB_SHNDX.
+ (get_64bit_elf_symbols): Likewise.
+ (dump_relocations): Use SECTION_HEADER to index "section_headers".
+ (process_section_headers): Likewise. Use SECTION_HEADER_NUM too.
+ Remember symtab_shdx_hdr.
+ (process_program_headers): Scan from index 1 for segment map.
+ (slurp_ia64_unwind_table): Use SECTION_HEADER to index
+ "section_headers".
+ (process_relocs): Likewise. Also adjust call to GET_ELF_SYMBOLS.
+ (process_unwind): Likewise.
+ (process_version_sections): Likewise.
+ (process_symbol_table): Likewise.
+ (display_debug_info): Likewise.
+ (process_dynamic_segment): Fake up a symtab section for changed
+ GET_ELF_SYMBOLS.
+ (get_symbol_index_type): Check SHN_LOOS before SHN_LORESERVE.
+ (process_program_headers): Kill signed/unsigned warning.
+ (load_debug_str): Likewise.
+ (display_debug_info): Likewise.
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
+
+2001-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (process_file_header): Print extended e_shnum and
+ e_shdtrndx values. Set elf_header values for same.
+ (get_32bit_section_headers): Add "num" arg to read "num" headers.
+ (get_64bit_section_headers): Likewise.
+ (process_section_headers): Update calls.
+ (get_file_header): Call get_32bit_section_headers or 64bit variant.
+
+2001-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * objcopy.c (setup_section): Copy entsize.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+
+ * readelf.c (guess_is_rela): Add support for stormy16.
+ (dump_relocations): Likewise.
+ (get_machine_name): Likewise.
+
+2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * dllwrap.c (main) Replace multiple strings describing a
+ single error with a single, newline escaped sentence to permit
+ better translation into foreign languages.
+
+ * readelf.c (get_elf_class): Remove internalionalisation of ELF
+ class names.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * strings.c (get_char): Initialize value.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * arlex.l: Silence compile warnings.
+ * arsup.h: Likewise. Fix formatting.
+
+2001-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ * strings.c: Include config.h before bfd.h.
+ (file_off): New type.
+ (file_open): Define.
+ (print_strings): Use file_off instead of file_ptr. Print addresses
+ which don't fit into long correctly.
+ (get_char): Use file_off instead of file_ptr. Use getc_unlocked if
+ available.
+ (strings_file): Use file_off instead of file_ptr. Use file_open.
+ * configure.in: Check for getc_unlocked.
+ Check for fopen64 and whether _LARGEFILE64_SOURCE needs to
+ be defined for it.
+ * configure: Rebuilt.
+ * config.h.in: Rebuilt.
+
+2001-11-29 H.J. Lu <hjl@gnu.org>
+
+ * bucomm.c (make_tempname): Revert the changes made on
+ 2001-11-14 and 2001-11-12. They won't work with directories.
+
+2001-11-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * binutils/Makefile.am (check-DEJAGNU): Pass CC_FOR_TARGET and
+ CFLAGS_FOR_TARGET to runtest in environment.
+ * Makefile.in: Rebuild.
+ * doc/Makefile.in: Rebuild.
+
+2001-11-28 Mike Stump <mrs@wrs.com>
+
+ * objcopy.c (setup_section): Preserve SEC_RELOC when
+ --set-section-flags is used.
+
+2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (do_debug_str): New variable.
+ (display_debug_str): New function: Display the contents of a
+ .debug_str section.
+ (load_debug_str): New function: Load in the contents of a
+ .debug_str section.
+ (free_debug_str): New function: Free the memory used by
+ load_debug_str().
+ (fetch_indirect_string): Retrieve a string from the .debug_str
+ section.
+ (usage): Add -ws.
+ (parse_args): Accept -ws.
+ (process_section_headers): Allow the display of the .debug_str
+ section.
+ (read_and_display_attr_value): Use fetch_indirect_string. Show
+ offset into .debug_str section.
+ (display_debug_info): Use load_debug_str and free_debug_str.
+ (debug_displays): Add .debug_str.
+ * doc/binutils.texi: Document -ws.
+
+2001-11-19 Andreas Jaeger <aj@suse.de>
+
+ * testsuite/binutils-all/objdump.exp: Add x86-64.
+
+2001-11-15 Andreas Schwab <schwab@suse.de>
+
+ * readelf.c: Fix warnings without terminating newline.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * doc/binutils.texi (objdump): Document ppc -M options.
+
+2001-11-14 Andreas Jaeger <aj@suse.de>
+
+ * doc/binutils.texi (objdump): Fix description to use x86-64.
+
+2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since
+ not all systems provide mkstemp.
+
+2001-11-14 Alan Modra <amodra@bigpond.net.au>
+
+ * doc/binutils.texi (objdump): Document x86 -M options.
+
+2001-11-13 Keith Walker <keith.walker@arm.com>
+
+ * readelf.c (read_and_display_attr_value): New function to
+ handle DW_FORM_indirect.
+ (read_and_display_attr): Use it.
+
+2001-11-13 Geoffrey Keating <geoffk@redhat.com>
+
+ * readelf.c (display_debug_lines): Deal with unknown standard
+ opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin,
+ DW_LNS_set_isa.
+
+2001-11-13 Timothy Wall <twall@alum.mit.edu>
+
+ * MAINTAINERS: Add self as tic54x maintainer. This target
+ includes the IBM C54XDSP clone.
+
+2001-11-12 * Steven J. Hill <sjhill@realitydiluted.com>
+
+ * bucomm.c (make_tempname): Use mkstemp in place of mktemp.
+
+2001-11-09 Jeffrey A Law (law@cygnus.com)
+
+ * unwind-ia64.c (unw_print_brmask): Fix ISO C portability glitch.
+ (unw_print_grmask, unw_print_frmask, unw_print_abreg): Likewise.
+ (unw_print_xyreg, unw_decode_x1, unw_decode_x2): Likewise.
+ (unw_decode_x3, unw_decode_r1, unw_decode_r2): Likewise.
+ (unw_decode_r3, unw_decode_p1, unw_decode_p2_p5): Likewise.
+ (unw_decode_p6, unw_decode_p7_p10, unw_decode_b1): Likewise.
+ (unw_decode_b2, unw_decode_b3_b4): Likewise.
+
+ * readelf.c (get_elf_class): Fix ISO portability glitch.
+ (get_data_encoding, get_osabi_name, request_dump): Likewise.
+
+2001-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (debug_str, debug_str_size): New.
+ (display_debug_abbrev): If no abbrevs were read, skip the CU.
+ Call free_abbrevs.
+ (read_and_display_addr): Handle DW_FORM_strp.
+ (display_debug_info): Read .debug_str section if present,
+ so that DW_FORM_strp can be handled.
+ Fix test for non-existant .debug_abbrev section.
+
+2001-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ * arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.
+
+ * arsup.c (ar_open): Prepend tmp- to basename, not whole path.
+
+2001-11-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * MAINTAINERS: Add self as s390/s390x maintainer.
+
+2001-11-02 Tom Rix <trix@bluey.cygnus.com>
+
+ * MAINTAINERS: Add self as PPC XCOFF maintainer.
+
+2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add "fr" and "tr".
+ * configure: Regernate.
+ * po/fr.po: New file.
+ * po/tr.po: New file.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * MAINTAINERS: Add self as MMIX port maintainer.
+ * readelf.c: Include elf/mmix.h.
+ (guess_is_rela): MMIX is RELA.
+ (dump_relocations): Handle MMIX relocations.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (parse_args): Handle multiple options to the -w
+ switch.
+
+2001-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_section_type_name): Don't print SHT_ prefix for
+ LOPROC, LOOS and LOUSER.
+
+2001-10-11 J"orn Rennecke <amylaar@onetel.net.uk>
+
+ * MAINTAINERS: Update my email address.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * doc/Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2001-10-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (display_debug_line, display_debug_pubnames,
+ display_debug_info, display_debug_frames): Detect and warn
+ about 64-bit format entries.
+ (display_debug_aranges): Reword 64-bit warning.
+ (debug_displays): Add .debug_pubtypes as a known, but not yet
+ supported, debug section.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * coffdump.c (PROGRAM_VERSION): Delete.
+ (main <'V'>): Call print_version.
+ * srconv.c: Likewise.
+ * sysdump.c: Likewise.
+ * version.c (program_version): Remove.
+ (print_version): Use BFD_VERSION_STRING. Just print the current
+ year in copyright message.
+ * addr2line.c (program_version): Remove unused declaration.
+ * objdump.c (display_target_tables): Use BFD_VERSION_STRING in
+ place of BFD_VERSION.
+ * Makefile.am (Makefile): Depend on bfd/configure.in.
+ (cplus-dem.o): Depend on Makefile.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-10-01 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (display_debug_aranges): Detect and warn about DWARF64
+ format .debug_arange sections.
+ (main): Add missing prototype.
+
+2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-28 Richard Henderson <rth@redhat.com>
+
+ * objdump.c (dump_section_header): Dump SEC_ARCH_BIT_0.
+
+2001-09-26 Alan Modra <amodra@bigpond.net.au>
+
+ * bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,
+ VA_CLOSE.
+ (non_fatal): Likewise.
+ * objdump.c (objdump_sprintf): Likewise.
+ * readelf.c (error): Likewise.
+ (warn): Likewise.
+
+2001-09-25 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (do_wide): New.
+ (options): Add --wide.
+ (usage, parse_args): Likewise.
+ (process_program_headers): Put each segment on a single line if
+ --wide is given.
+ (process_section_headers): Put each section on a single line if
+ --wide is given.
+ * doc/binutils.texi: Document it.
+ * NEWS: Likewise.
+
+2001-09-25 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (print_vma): Print 8 digits of low hex value.
+
+2001-09-24 Andreas Jaeger <aj@suse.de>
+
+ * nlmconv.c: Fix warnings about unused attributes and function
+ prototypes.
+
+ * strings.c: Add prototype for get_char.
+
+2000-09-19 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.am ($(DEMANGLER_NAME).1): Try cxxfilt.man and
+ $(srcdir)/cxxfilt.man.
+ * doc/Makefile.in: Rebuild.
+
+2001-09-19 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (copy_main): Correct rename-section string parsing.
+ Consolidate new_name parsing, and error messages.
+
+2001-09-18 Bruno Haible <haible@clisp.cons.org>
+
+ * addr2line.c: Don't include <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * ar.c (main): Likewise.
+ * coffdump.c (main): Likewise.
+ * dlltool.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ Use ISALNUM instead of isalpha/isdigit.
+ * dllwrap.c: Don't include <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * nlmconv.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ Use TOUPPER instead of islower/toupper.
+ * nlmheader.y: Include "safe-ctype.h" instead of <ctype.h>.
+ (yylex): Use ISSPACE/ISALNUM instead of isspace/isalnum.
+ Use TOUPPER instead of islower/toupper.
+ * nm.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * objcopy.c (main): Likewise.
+ * objdump.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (disassemble_bytes): Use ISPRINT instead of isprint.
+ (dump_section_stabs): Use ISDIGIT instead of isdigit.
+ (dump_data): Use ISPRINT instead of isprint.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * rclex.l: Include "safe-ctype.h" instead of <ctype.h>.
+ (cpp_line, handle_quotes): Use ISSPACE instead of isspace.
+ * rcparse.y: Include "safe-ctype.h" instead of <ctype.h>.
+ Use TOUPPER instead of islower/toupper.
+ * readelf.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * resrc.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (write_rc_accelerators): Use ISPRINT instead of isprint.
+ (write_rc_rcdata): Likewise.
+ * size.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * srconv.c (main): Likewise.
+ * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (parse_number): Use ISDIGIT/ISUPPER/ISLOWER instead of
+ isdigit/isupper/islower.
+ (parse_stab_string, parse_stab_type, parse_stab_argtypes,
+ parse_stab_array_type, stab_demangle_count, stab_demangle_get_count,
+ stab_demangle_prefix, stab_demangle_qualified,
+ stab_demangle_template, stab_demangle_type,
+ stab_demangle_fund_type): Use ISDIGIT instead of isdigit.
+ * strings.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (isgraphic): Use ISPRINT instead of isascii/isprint.
+ (main): Remove HAVE_LC_MESSAGES dependency.
+ * sysdump.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (pbarray): Use ISPRINT instead of isprint.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * windres.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (format_from_filename): Use ISPRINT instead of isprint.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * winduni.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (unicode_print): Use ISPRINT instead of isprint.
+ * wrstabs.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (stab_variable): Use ISDIGIT instead of isdigit.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * ar.c (print_contents): Cast args of bfd_seek to the right types.
+ Replace bfd_read call with call to bfd_bread.
+ (extract_file): Likewise.
+
+ * objdump.c (dump_section_header): Cast section->filepos to
+ unsigned long to suit printf format string.
+ * readelf.c (process_section_headers): Similarly for sh_offset.
+ (process_unwind): Likewise.
+
+2001-09-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * strings.c (encoding, encoding_bytes): New variables.
+ (long_options): Add --encoding.
+ (main): Accept -e and --encoding.
+ (get_char): New function. Read a, possibly wide, character from
+ the input stream.
+ (print_strings): Use get_char().
+ (usage): Document new command line option.
+ * doc/binutils.texi: Document new command line option.
+ * NEWS: Announce new command line option.
+
+2001-09-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * readelf.c (guess_is_rela, dump_relocations, get_machine_name,
+ get_machine_flags): Added EM_M32R, EM_D10V, EM_V850, EM_D30V,
+ EM_MN10200, EM_MN10300, EM_FR30, EM_AVR_OLD and EM_PJ_OLD.
+ Removed EM_CYGNUS_ARC.
+
+2001-09-04 Jeffrey A Law (law@cygnus.com)
+
+ * readelf.c: Include elf/h8 for H8 series definitions.
+ (guess_is_rela): H8 series if RELA.
+ (dump_relocations): Handle H8 series relocations.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+
+ * readelf.c (get_machine_flags): Remove E_MIPS_MACH_MIPS32_4K.
+
+2001-08-29 Peter Targett <peter.targett@arccores.com>
+
+ * MAINTAINERS: Include ARC Maintainer.
+
+2001-08-29 Ben Elliston <bje@redhat.com>
+
+ * stabs.c (stab_demangle_template): Initialise s4.
+
+2001-08-27 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (dump_relocations): Recognise EM_PPC64.
+
+2001-08-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (get_machine_flags): Add detection of EF_MIPS_32BITMODE.
+
+2001-08-25 H.J. Lu <hjl@gnu.org>
+
+ * nm.c (print_width): New.
+ (display_rel_file): Set `print_width' according to
+ bfd_sprintf_vma.
+ (print_symbol_info_bsd): Check `print_width' instead of BFD64.
+
+2001-08-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * objcopy.c (use_alt_mach_code): New variable.
+ (OPTION_ALT_MACH_CODE): Define.
+ (copy_options): Added --alt-machine-code.
+ (copy_main): Handle it.
+ (copy_object): Switch to alternate machine code if requested.
+ * doc/binutils.texi: Document new option.
+ * NEWS: Likewise.
+
+2001-08-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (get_machine_flags): Add detection of EF_MIPS_UCODE.
+
+2001-08-21 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (dump_relocations): Support ELF64 on 32bit hosts.
+ (display_debug_info): Cast for 64bit hosts.
+ (display_debug_frames): Likewise.
+ (process_mips_specific): Likewise.
+
+2001-08-21 Andreas Jaeger <aj@suse.de>
+
+ * coffgrok.h: Add missing parameter for prototype of coff_grok.
+
+ * sysdump.c: Add missing prototypes.
+ * srconv.c: Likewise.
+ * unwind-ia64.c: Likewise.
+ * coffdump.c: Likewise.
+
+ * sysinfo.y: Print prototypes, include <ansidecl.h>.
+
+ * coffgrok.c: Add missing prototypes, include libiberty.h instead
+ of declaring xcalloc.
+
+2001-08-10 H.J. Lu <hjl@gnu.org>
+
+ * nm.c (print_value): Add one arg, bfd *.
+ (print_value): Replace fprintf_vma with bfd_fprintf_vma.
+ (print_symbol_info_bsd): Also pass `abfd' to print_value ().
+ (print_symbol_info_sysv): Likewise.
+ (print_symbol_info_posix): Likewise.
+
+ * objdump.c (dump_section_header): Replace printf_vma with
+ bfd_printf_vma.
+ (print_section_stabs): Likewise.
+ (dump_bfd_header): Likewise.
+ (objdump_print_value): Replace sprintf_vma with
+ bfd_sprintf_vma.
+ (disassemble_bytes): Likewise.
+ (dump_reloc_set): Likewise.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
+ to build warnings.
+ * configure: Regenerate.
+
+2001-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c: Add missing prototypes.
+ * objdump.c: Likewise. Format existing prototypes.
+
+2001-08-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * readelf.c (display_debug_info): Add to abbrev_offset the addend
+ of any RELA relocation for the abbrev_offset memory location that
+ refers to the .debug_abbrev section symbol.
+
+2001-08-07 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_file): Return 0 if OK, otherwise return 1.
+ (main): Return process_file ().
+
+2001-08-05 Philip Blundell <philb@gnu.org>
+
+ * doc/binutils.texi: Use "Thumb" not "THUMB".
+
+2001-08-03 John Healy <jhealy@redhat.com>
+
+ Patch suggested by Frank Eigler <fche@redhat.com>.
+ * objdump.c (disassemble_data): Fill in section member of the
+ disasm_info structure.
+
+2001-08-03 Tom Walsh <tom@cyberiansoftware.com>
+
+ * configure.in: Added --with-windres option.
+ * configure: Regenerated.
+
+2001-07-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * doc/binutils.texi: Use @command{name} for commands;
+ use @option{-opt} for options; use @table @env for list of options;
+ remove spaces arround [ | ] in synopsis.
+
+ * doc/Makefile.am (POD2MAN): Use 'GNU Development Tools' for the
+ center title.
+
+2001-07-31 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * objcopy.c: Fix formatting.
+ (section_rename): New structure.
+ (OPTION_RENAME_SECTION): New switch.
+ (copy_usage): Document new switch.
+ (add_section_rename): New function: Add a node to the section
+ rename list.
+ (find_section_rename): New function: Find the new name and
+ flags for a section.
+ (setup_section): Call find_section_name to determine the name
+ of the output section.
+ (copy_main): Handle OPTION_RENAME_SECTION.
+ * binutils.texi: Document new switch.
+ * NEWS: Mention new switch.
+
+2001-07-30 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * README: Rename bug-gnu-utils@gcc.org to bug-binutils@gcc.org.
+ * MAINTAINERS: Rename bug-gnu-utils@gcc.org to
+ bug-binutils@gcc.org.
+
+2001-07-28 Matthias Kramm <kramm@quiss.org>
+
+ * bucomm.c (list_supported_architectures): New function.
+ * bucomm.h (list_supported_architectures): Declare.
+ * objdump.c (usage): Call the above.
+
+2001-07-25 Dave Brolley <brolley@redhat.com>
+
+ * objdump.c (SKIP_ZEROES): Only define it if it is not already defined.
+ (SKIP_ZEROES_AT_END): Only define it if it is not already defined.
+
+2001-07-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * README: Update for 2.11. Change bug reporting email address.
+ * MAINTAINERS: Tidy up. Change bug reporting email address.
+
+2001-07-16 DJ Delorie <dj@redhat.com>
+
+ * resres.c (write_res_header): Align header size.
+ (res_align_file): Calculate alignment correctly.
+
+ * rcparse.y (styles): use SUBLANG_SHIFT instead of 8 (or the more
+ correct 10).
+ * resrc.c (write_rc_resource): Likewise.
+ * windres.h (SUBLANG_SHIFT): Define - as 10.
+
+2001-07-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Add Christian Groessler as maintainer for z8k port.
+
+2001-07-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Add notes about branch checkins.
+
+2001-07-05 Daniel Berlin <dan@cgsoftware.com>
+
+ * readelf.c (display_debug_macinfo): New function, display
+ .debug_macinfo section.
+ (do_debug_macinfo): New variable.
+ (parse_args): Handle "-w[mM]" to mean display macro info.
+ (process_section_headers): Handle debug_macinfo.
+ (debug_displays): Replace unsupported function with macinfo
+ function for .debug_macinfo display.
+ * doc/binutils.texi: Document new command line switch.
+ * NEWS: Document new feature of readelf.
+
+2001-07-05 H.J. Lu <hjl@gnu.org>
+
+ * objcopy.c (filter_symbols): Don't turn undefined symbols
+ into local.
+
+2001-07-03 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.am (addr2line.1): Use addr2line.pod instead of
+ $@.pod.
+ (ar.1): Likewise.
+ (dlltool.1): Likewise.
+ (nlmconv.1): Likewise.
+ (nm.1): Likewise.
+ (objcopy.1): Likewise.
+ (objdump.1): Likewise.
+ (ranlib.1): Likewise.
+ (readelf.1): Likewise.
+ (size.1): Likewise.
+ (strings.1): Likewise.
+ (strip.1): Likewise.
+ (windres.1): Likewise.
+ (cxxfilt.man): Use $(DEMANGLER_NAME).pod instead of $@.pod.
+ ($(DEMANGLER_NAME).1): Also substitute cxxfilt with
+ $(DEMANGLER_NAME).
+ (as.1): Removed.
+ * doc/Makefile.in: Regenerated.
+
+2001-07-03 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Change MIPS maintainer to Eric Christopher.
+
+2001-07-01 Daniel Berlin <dan@cgsoftware.com>
+
+ * readelf.c: Support DWARF 2.1 tags, encodings, languages.
+
+2001-06-29 James Cownie <jcownie@etnus.com>
+
+ * readelf.c: Support DWARF 2.1 attributes.
+
+2001-06-28 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (GET_DATA_ALLOC): Remove.
+ (GET_DATA): Remove.
+ (get_data): New function combining above macros, with an extra
+ test for zero size.
+ (slurp_rela_relocs): Use get_data, and catch error return.
+ (slurp_rel_relocs): Likewise.
+ (get_32bit_program_headers): Likewise.
+ (get_64bit_program_headers): Likewise.
+ (get_32bit_section_headers): Likewise.
+ (get_64bit_section_headers): Likewise.
+ (get_32bit_elf_symbols): Likewise.
+ (get_64bit_elf_symbols): Likewise.
+ (process_section_headers): Likewise.
+ (process_relocs): Likewise.
+ (slurp_ia64_unwind_table): Likewise.
+ (process_unwind): Likewise.
+ (get_32bit_dynamic_segment): Likewise.
+ (get_64bit_dynamic_segment): Likewise.
+ (process_dynamic_segment): Likewise.
+ (process_version_sections): Likewise.
+ (process_symbol_table): Likewise.
+ (dump_section): Likewise.
+ (display_debug_info): Likewise.
+ (display_debug_section): Likewise.
+ (process_section_contents): Likewise.
+ (process_corefile_note_segment): Likewise.
+ (process_mips_specific): Likewise. Also free econf32, econf64.
+
+2001-06-25 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (dump_relocations): Print "bad symbol index" if
+ symtab == NULL with non-zero symtab_index.
+ (process_relocs): Don't bomb if reloc section has no symsec.
+
+2001-06-24 H.J. Lu <hjl@gnu.org>
+
+ * objcopy.c (strip_main): Revert the change made on 2001-05-30
+ by accident.
+ (copy_main): Apply the the change made to strip_main on
+ 2001-05-30 by accident.
+
+2001-06-23 Andreas Jaeger <aj@suse.de>
+
+ * unwind-ia64.c (unw_decode_x1): Add unused attribute for
+ parameter 'code'.
+ (unw_decode_x2): Likewise.
+ (unw_decode_x3): Likewise.
+ (unw_decode_x4): Likewise.
+
+2001-06-23 Ben Elliston <bje@redhat.com>
+
+ * MAINTAINERS: Add myself as M88k maintainer.
+
+2001-06-22 Jocelyn Mayer <jocelyn.mayer@netgem.com>
+
+ * objcopy.c (strip_main): Support -o or --output-file command lien
+ switch.
+
+2001-06-19 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.in: Regenerated.
+
+2001-06-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c: Restore formatting.
+
+2001-06-18 H.J. Lu <hjl@gnu.org> & Nick Clifton <nickc@redhat.com>
+
+ * Makefile.am: Move documentation into doc subdirectory.
+ * Makefile.in: Regenerated.
+ * binutils.texi: Move into doc subdirectory.
+ * addr2line.1: Removed.
+ * ar.1: Likewise.
+ * dlltool.1: Likewise.
+ * nlmconv.1: Likewise.
+ * nm.1: Likewise.
+ * objcopy.1: Likewise.
+ * objdump.1: Likewise.
+ * ranlib.1: Likewise.
+ * readelf.1: Likewise.
+ * size.1: Likewise.
+ * strings.1: Likewise.
+ * strip.1: Likewise.
+ * windres.1: Likewise.
+ * cxxfilt.man: Likewise.
+ * doc: New Directory.
+ * doc/Makefile.am: New file.
+ * doc/Makefile.in: Generate.
+
+2001-06-09 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Fix a typo. Mention hppa64-elf. Add binutils-2.11 marker.
+
+2001-06-01 Alan Modra <amodra@bigpond.net.au>
+
+ * MAINTAINERS: Update my email address.
+
+2001-05-30 Honda Hiroki <hhonda@kobe-catv.ne.jp>
+
+ * objcopy.c: Add new switches: --keep-global-symbol,
+ --keep-symbols, --localize-symbols, --keep-global-symbols and
+ --weaken-symbols.
+ * binutils.texi: Document new switches.
+ * objcopy.1: Regenerate.
+ * NEWS: Announce new feature.
+
+2001-05-28 Andreas Jaeger <aj@suse.de>
+
+ * readelf.c (display_debug_frames): Fix warnings: Remove unused
+ variables, fix format strings.
+
+2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * objdump.c (disassemble_bytes): Remove section VMA adjustment
+ when computing the address of the line to show.
+
+2001-05-16 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (do_debug_frames_interp): New.
+ (byte_get_little_endian): If BFD64, always read entire 8-byte fields.
+ (byte_get_big_endian): Likewise.
+ (parse_args) ['F']: Set do_debug_frames_interp.
+ (Frame_Chunk): Make data_factor signed, add fde_encoding.
+ (frame_display_row): Don't trunc pc_begin to int.
+ (size_of_encoded_value): New.
+ (display_debug_frames): Handle 64-bit targets. Print raw data
+ unless do_debug_frames_interp.
+ (debug_displays): Remove duplicate .debug_frame.
+
+2001-05-15 Ralf Baechle <ralf@gnu.org>
+
+ * readelf.c: Replace uses of EM_MIPS_RS4_BE with EM_MIPS_RS3_LE.
+ The former constant was never in active use and is used otherwise
+ by the ABI.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (process_unwind): Print all unwind sections, not just
+ one.
+
+2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (process_unwind): Remove const specifier.
+
+2001-04-27 Michal Svec <rebel@atrey.karlin.mff.cuni.cz>
+
+ * strings.c (isgraphic): Do not use isascii() unless it is needed
+ for isprint() to work.
+ (main): Set the locale domain to LC_ALL not just LC_MESSAGES.
+
+2001-04-27 Johan Rydberg <jrydberg@opencores.org>
+
+ * NEWS: Announce support for OpenRISC.
+
+2001-04-17 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * dlltool.c (do_default_excludes): Initialise to true.
+
+2001-04-10 Alan Modra <amodra@one.net.au>
+
+ * MAINTAINERS: Update my email address
+ * nm.c (print_symbol_info_bsd): Use a simple printf string.
+
+2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * readelf.c (display_debug_lines): Fix typo for "Prologue".
+
+2001-03-30 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_unwind): Just return if do_unwind is 0.
+
+2001-03-28 Roger Sayle <roger@metaphorics.com>
+
+ * dlltool.c (make_one_lib_file): Fix section flags for
+ .text, .data and .bss in stub ds*.o files to match those
+ generated by gas.
+
+2001-03-29 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_unwind): Only do unwind sections for
+ IA64.
+
+2001-03-28 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am ($(srcdir)/dlltool.1): Remove the extra target.
+ * Makefile.in: Regenerate.
+
+2001-03-26 Andreas Jaeger <aj@suse.de>
+
+ * binutils.texi (nm): Fix texi syntax.
+
+2001-03-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * binutils.texi: Put @c man begin and @c man end indications
+ to generate man pages using texi2pod and pod2man. Put @c man title
+ to identify each man. Add SEEALSO entries.
+ * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variable.
+ (man_MANS): Add dlltool.1, nlmconv.1, readelf.1, windres.1,
+ sort the list.
+ (*.1): Build the man pages from binutils.texi.
+ * Makefile.in: Regenerate.
+
+2001-03-13 Eric Kohl <ekohl@rz-online.de>
+
+ * defparse.y (opt_equal_name): allow "." in name.
+ * dlltool.c (def_exports): Added ability to generate forwarded exports.
+ (gen_exp_file): Likewise.
+
+2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
+
+ * NEWS: Document addition of -B switch to objcopy.
+ * binutils.texi: Document addition of -B switch to objcopy.
+ * objcopy.c: (copy_options): Add --binary-architecture.
+ (copy_usage): Document -B/--binary-architecture.
+ (copy_main): Support -B/--binary-architecture. Set
+ bfd_external_binary_architecture.
+
+2001-03-11 Andreas Jaeger <aj@suse.de>
+
+ * readelf.c (guess_is_rela): Handle EM_S390_OLD.
+ (dump_relocations): Likewise.
+ (get_machine_name): Likewise.
+
+2001-02-28 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c: (struct unw_aux_info): Remove const modifier for
+ 'strtab' field.
+ (process_unwind): Remove non-K&R compliant LHS type cast in call
+ to GET_DATA_ALLOC macro.
+
+2001-02-28 Philip Blundell <pb@futuretv.com>
+
+ * readelf.c (decode_ARM_machine_flags): Explicitly mention which
+ ABI is in use; remove ambiguity between the "unknown" EABI and
+ unrecognised ABIs. Handle version 2 ARM EABI. Update uses of
+ renamed EF_xx constants.
+
+2001-02-27 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+
+2001-02-14 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add "Obvious Fix" rule.
+
+2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * unwind-ia64.c: Don't use ANSI C preprocessor stringisation and string
+ literal concatenation.
+
+2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * readelf.c (struct unw_aux_info): Remove const from the info member.
+ (process_unwind): Don't type-cast the third argument to the
+ GET_DATA_ALLOC macro.
+
+2001-02-11 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (dump_relocations): Free corrected allocated
+ array.
+ (process_unwind): Fix compile time warning.
+
+2001-02-10 Nick Clifton <nickc@redhat.com>
+
+ * binutils.texi: Document new --unwind option to readelf.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * readelf.c: Add linux target for S/390.
+
+2001-02-10 Alan Modra <alan@linuxcare.com.au>
+
+ * nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
+ printf is a macro.
+
+2001-02-08 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * acinclude.m4 (AM_PROG_LEX): Override installed definition.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2001-02-07 Todd Vierling <tv@wasabisystems.com>
+
+ * bucomm.c (bfd_target_vector): Change extern array to pointer.
+ * objdump.c (bfd_target_vector): Likewise.
+
+2001-02-07 David Mosberger <davidm@hpl.hp.com>
+
+ * readelf.c (process_unwind): New function.
+ (slurp_ia64_unwind_table): Ditto.
+ (dump_ia64_unwind): Ditto.
+ (find_symbol_for_address): Ditto.
+ (slurp_rela_relocs): New function (split off from dump_relocations()).
+ (slurp_rel_relocs): Ditto.
+ (parse_args): Handle '-u' option.
+
+ * unwind-ia64.c: New file.
+ * unwind-ia64.h: New file.
+ * Makefile.am: Include unwind-ia64.c in readelf build.
+ * Makefile.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2001-02-04 Philip Blundell <philb@gnu.org>
+
+ * configure.in (OBJDUMP_DEFS): Match `arm*-*', not just `arm-*'.
+ * configure: Regenerate.
+
+2001-01-31 Steve deRosier <sderosier@vari-lite.com>
+
+ * ieee.c (ieee_add_bb11): Don't check for backslashes
+ unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
+
+2001-01-24 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * ieee.c: Update copyright.
+ (ieee_start_compilation_unit): Don't check for backslashes
+ unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
+
+ * stabs.c: Update copyright. Include "filenames.h".
+ (parse_stab): Use IS_ABSOLUTE_PATH. Ignore N_WARNING stabs.
+
+2001-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (process_version_sections): Check if VERDEF or VERNEED
+ sections are present before using them. Remove code duplication.
+ (process_symbol_table): Check if VERDEF or VERNEED sections are
+ present before using them.
+
+2001-01-17 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_object): Fail if attempting to convert the
+ endianness of the input object file.
+
+ * binutils.texi: Explain that objcopy cannot convert endianness.
+
+2001-01-16 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (string_table_length): New variable.
+ (SECTION_NAME): Catch out of range indices and missing section
+ pointers.
+ (process_section_headers): Delete useless local variable
+ string_table_offset. Set the value of string_table_length
+ after loading the string table.
+ (process_mips_specific): Use SECTION_NAME macro.
+ (process_file): Set string_table_length to 0 when it is freed.
+
+2001-01-12 Nick Clifton <nickc@redhat.com>
+
+ * version.c (print_version): Update copyright date.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * readelf.c (dump_relocations): Include selection with EM_ARC.
+ (get_machine_name) Update name to "ARC".
+
+2001-01-09 Nick Clifton <nickc@redhat.com>
+
+ * Makefile.am: Add rule to build objdump.o from objdump.c and
+ using OBJDUMP_DEFS.
+ * Makefile.in: Regenerate.
+
+ * configure.in: Define OBJDUMP_DEFS. Default to empty.
+ (arm, xscale, d10v): For these targets define OBJDUMP_DEFS to
+ -DDISASSEMBLER_NEEDS_RELOCS.
+ * configure: Regenerate.
+
+ * objdump.c (disassemble_bytes): If DISASSEMBLER_NEEDS_RELOCS
+ is defined read in the relocs even if dump_reloc_info is
+ false.
+
+2001-01-07 Philip Blundell <philb@gnu.org>
+
+ * binutils.texi (Bug Reporting): Replace `bug-gnu-utils' with
+ `bug-binutils'.
+ * README: Likewise.
+
+2000-12-19 Nick Clifton <nickc@redhat.com>
+
+ * dlltool.c: Add missing support for arm-epoc-pe.
+ * configure.in: Add missing support for arm-epoc-pe.
+ * configure: Regenerate.
+
+2000-12-15 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Diego Novillo as a maintainer for the Intel
+ Mode parts of the x86 port.
+
+2000-12-04 Andreas Jaeger <aj@suse.de>
+
+ * readelf.c (guess_is_rela): Add EM_X86_64.
+ (dump_relocations): Add EM_X86_64.
+ (get_machine_name): Add EM_X86_64.
+ Include "elf/x86-64.h".
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c: Fix formatting.
+
+2000-12-11 Jan Hubicka <jh@suse.cz>
+
+ * MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer.
+
+2000-12-07 Andrew Haley <aph@redhat.com>
+
+ * readelf.c (display_debug_frames): Only display columns that are
+ referenced by the frame debug info.
+
+2000-12-05 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Jason Merrill as DWARF2 maintainer.
+
+2000-12-04 Jason Merrill <jason@redhat.com>
+
+ * readelf.c (process_section_headers): Handle linkonce.wi sections.
+ (display_debug_section): Likewise.
+ (display_debug_info): Display CU header before bailing.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * readelf.c (get_machine_flags): Recognize MIPS32 ISA in
+ EF_MIPS_ARCH. Replace use of E_MIPS_MACH_MIPS32 with
+ E_MIPS_MACH_MIPS32_4K and adjust printed CPU name similarly.
+
+ * readelf.c (get_machine_flags): Add cases for E_MIPS_ARCH_5,
+ and E_MIPS_ARCH_64.
+
+ * readelf.c (get_machine_flags): Add case for
+ E_MIPS_MACH_SB1.
+
+2000-11-30 Richard Earnshaw <rearnsha@arm.com>
+
+ * readelf.c (frame_display_row): Output 's' for DW_CFA_same_value.
+
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers.
+ Change sourceware.cygnus.com to sources.redhat.com.
+ Fix typo for "amongst".
+
+2000-11-28 Nick Clifton <nickc@redhat.com>
+
+ * strip.1 (COPYING): Mention that the GNU Free Documentation
+ License is present in the sources, but not the output, and
+ also available from the GNU website.
+ (GNU Free Documentation License): Comment out this section.
+ * strings.1: Ditto.
+ * size.1: Ditto.
+ * ranlib.1: Ditto.
+ * objdump.1: Ditto.
+ * objcopy.1: Ditto.
+ * nm.1: Ditto.
+ * nlmconv.1: Ditto.
+ * ar.1: Ditto.
+ * addr2line.1: Ditto.
+
+2000-11-27 DJ Delorie <dj@redhat.com>
+
+ * readelf.c (usage): Add -wf (--debug-dump=frames) option.
+ (parse_args): Support -wf option.
+ (process_section_headers): Ditto.
+ (debug_displays): Ditto.
+ (display_debug_frames): New, dump *_frame sections.
+ (frame_need_space): Support for above.
+ (frame_display_row): Ditto.
+ * binutils.texi: Document it.
+
+2000-11-24 Nick Clifton <nickc@redhat.com>
+
+ * NEWS: Announce support for v5t, v5te and XScale.
+
+2000-11-22 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_machine_name): Add EM_JAVELIN, EM_FIREPATH,
+ EM_ZSP, EM_MMIX, EM_HUANY, EM_PRISM.
+ (get_section_type_name): Add SHT_GROUP and SHT_SYMTAB_SHNDX.
+ (get_elf_section_flags: Add SHF_GROUP.
+ (process_section_headers): Adjust output for 32-bit binaries
+ to look nice on an 80 column terminal.
+
+2000-11-20 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_osabi_name): Change ELFOSABI_MONTEREY to
+ ELFOSABI_AIX.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (display_debug_lines): Adjust last change to
+ use sizeof (external->li_length).
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (display_debug_lines): Fix section length check
+ and end_of_sequence computation.
+
+2000-11-06 Nick Clifton <nickc@redhat.com>
+
+ * binutils.texi: Add GNU Free Documentation License.
+ * objcopy.1: Add GNU Free Documentation License.
+ * objdump.1: Add GNU Free Documentation License.
+ * addr2line.1: Add GNU Free Documentation License.
+ * ar.1: Add GNU Free Documentation License.
+ * nlmconv.1: Add GNU Free Documentation License.
+ * nm.1: Add GNU Free Documentation License.
+ * ranlib.1: Add GNU Free Documentation License.
+ * size.1: Add GNU Free Documentation License.
+ * strings.1: Add GNU Free Documentation License.
+ * strip.1: Add GNU Free Documentation License.
+
+2000-10-06 Luciano Gemme <ishitawa@yahoo.com>
+
+ * objcopy.c (--srec-len=nn): New parameter to set the
+ maximum length of generated Srecords.
+ (--srec-forceS3): New parameter that restricts the generation of
+ Srecords to type S3 only.
+ * binutils.texi: Document new command line switches.
+ * objcopy.1: Docuemnt the new command line switches.
+ * NEWS: Announce the existence of the new command line switches.
+
+2000-10-31 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Jim Wilson as the maintainer for the IA64
+ code. Add Eric Chrisopher as maintainer of MN10300 port.
+
+2000-10-12 Roger Sayle <roger@metaphorics.com>
+
+ * Make comma after string after icon/control optional.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * readelf.c (get_machine_flags): Also print EF_MIPS_MACH field.
+
+ * NEWS: Mention support for MIPS32.
+
+2000-09-08 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Stephane Carrez as maintainer for 68HC[11|12].
+
+2000-09-07 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
+ * configure: Rebuild.
+
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with new libtool.m4.
+
+2000-09-05 Nick Clifton <nickc@redhat.com>
+
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2000-09-04 Todd Vierling <tv@wasabisystems.com>
+
+ * strip.1: Fix stray '\' in -o formatting.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
+
+2000-08-30 Jamie Guinan <guinan@bluebutton.com>
+
+ * resrc.c (close_input_stream): Delete extraneous logic
+
+2000-08-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * NEWS: Mention support for CRIS.
+
+2000-08-21 Nick Clifton <nickc@redhat.com>
+
+ * addr2line.c: Changed email address for Ulrich Lauther.
+
+2000-08-17 Christopher C. Chimelis <chris@debian.org>
+
+ * objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common").
+
+2000-08-17 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (display_debug_pubnames): Only issue warning
+ message once. Terminate message with a new line.
+ (display_debug_aranges): Only display version 2 debug info.
+
+2000-08-14 Todd Vierling <tv@wasabisystems.com>
+
+ * objcopy.c (strip_main): Silently accept -d as an alias for -g
+ for compatibility with old BSD systems.
+
+2000-08-14 Jason Eckhardt <jle@cygnus.com>
+
+ * NEWS: Mention i860 support.
+
+2000-08-11 Carlo Wood <carlo@alinoe.com>
+
+ * addr2line.c (main): Add const to char *.
+
+2000-08-11 Geoff Keating <geoffk@cygnus.com>
+
+ * ar.c (main): Don't crash if called with no arguments
+ or only '-X32_64' as an argument.
+
+2000-08-08 DJ Delorie <dj@redhat.com>
+
+ * resrc.c: use "gcc -xc" instead of -xc-header
+
+2000-08-05 Jason Eckhardt <jle@cygnus.com>
+
+ * readelf.c (elf/i860.h): Include.
+ (dump_relocations): Add recognition of i860 architecture.
+ (guess_is_rela): Add recognition of i860 architecture.
+
+2000-08-03 Nick Clifton <nickc@cygnus.com>
+
+ * MAINTAINERS: Add information about CGEN maintainers.
+
+2000-07-26 Geoff Keating <geoffk@cygnus.com>
+
+ * nm.c (main): Ignore '-X32_64' as an option.
+ * ar.c (main): Likewise.
+ * binutils.texi (nm): Document new option.
+ (ar): Likewise.
+
+2000-07-23 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * rdcoff.c (external_coff_symbol_p): K&R-ise.
+
+2000-07-20 H.J. Lu <hjl@gnu.org>
+
+ * binutils.texi: Put back "@end table" deleted by
+ accident.
+
+2000-07-05 Kenneth Block <krblock@computer.org>
+
+ * nm.c: Add optional style to demangle switch.
+ * objdump.c: Add optional style to demangle switch.
+ * addr2line.c: Add optional style to demangle switch.
+ * binutils.texi: Document optional style to demangle
+ switch.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * MAINTAINERS: Add self as CRIS port maintainer.
+ * readelf.c: Include elf/cris.h.
+ (guess_is_rela): Handle EM_CRIS.
+ (dump_relocations): Ditto.
+ (get_machine_name): Ditto.
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_dynamic_type): Change "AUXILARY" to
+ "AUXILIARY".
+ (process_dynamic_segment): Print out strings for DT_CONFIG,
+ DT_DEPAUDIT, DT_AUDIT and DT_RUNPATH.
+
+2000-07-19 Mark Kettenis <kettenis@gnu.org>
+
+ * nm.c (usage): Change output of `nm --help' to include a
+ description of the purpose of the program and a detailed
+ description of the accepted options.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_dynamic_segment): Change DF_1_NODEPLIB
+ to DF_1_NODEFLIB.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_dynamic_type): Fix DT_CHECKSUM.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_dynamic_type): Change DT_FEATURE_1 to
+ DT_FEATURE.
+ (process_dynamic_segment): Likewise.
+
+ * readelf.c (get_dynamic_type): Handle DT_CONFIG, DT_DEPAUDIT,
+ DT_AUDIT, DT_PLTPAD, DT_MOVETAB and DT_CHECKSUM.
+ (process_dynamic_segment): Handle DTF_1_CONFEXP, DF_1_NODEPLIB,
+ DF_1_NODUMP and DF_1_CONLFAT.
+
+2000-07-18 Nick Clifton <nickc@cygnus.com>
+
+ * binutils.texi (readelf): Fix spelling typo.
+
+2000-07-11 Mark Kettenis <kettenis@gnu.org>
+
+ * objdump.c (usage): Make output of `objdump --help' more
+ consistent with the rest of the GNU world. Add a line describing
+ the purpose of the program.
+
+2000-07-10 David Huggins-Daines <dhd@linuxcare.com>
+
+ * stabs.c (parse_stab_range_type): Cast to proper type to fix
+ warning.
+
+2000-07-10 Ryan Bradetich <rbradetich@uswest.net>
+
+ * readelf.c (get_dynamic_data): Add casts and use unsigned chars
+ to fix warnings.
+ (process_symbol_table): Ditto.
+ (procesS_extended_line_op): Ditto.
+ (display_debug_lines): Ditto.
+ (display_debug_pubnames): Ditto.
+ (read_and_display_attr): Ditto.
+
+2000-07-09 Nick Clifton <nickc@cygnus.com>
+
+ * MAINTAINERS: Add several more port specific maintainers.
+
+2000-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * MAINTAINERS: Add blanket write privs for Michael Meissner.
+
+2000-06-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: New.
+
+2000-07-01 Eric Fifer <EFifer@sanwaint.com>
+
+ * dllwrap.c: Changed mistaken dyn_string_append() calls
+ to dyn_string_append_cstr().
+
+2000-07-01 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * stabs.c (parse_stab_type): Divide size in bits by 8 as binutils
+ struct debug_type stores size in bytes.
+
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
+
+2000-06-27 Alan Modra <alan@linuxcare.com.au>
+
+ * ar.c: Revert incorrect 2000-06-25 patch.
+ * bucomm.c: Likewise.
+
+2000-06-25 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * rdcoff (parse_coff_symbol): Treat GNU weak symbols as external.
+ (external_coff_symbol_p): New function.
+ (parse_coff): Use it.
+
+2000-06-25 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * ar.c (normalize): Advance past both characters in a DOS based
+ <letter>: filepath prefix.
+ (main): Likewise.
+ * bucomm.c (make_tempname): Likewise.
+
+2000-06-24 Nick Clifton <nickc@cygnus.com>
+
+ * objdump.c (usage): Fix description of --stabs switch.
+
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
+
+2000-06-20 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * ar.c (normalize): Correct pointer comparison when checking for
+ backslashes.
+ (main): Likewise.
+ * bucomm.c (make_tempname): Likewise.
+
+ * ieee.c (ieee_start_compilation_unit): Correct pointer comparison
+ and search for backslashes in the original pathname.
+ (ieee_add_bb11): Likewise.
+
+2000-06-18 Nick Clifton <nickc@redhat.com>
+
+ * ar.c (print_contents): Improve verbose message.
+
+2000-06-15 H.J. Lu <hjl@gnu.org>
+
+ * dyn-string.c: Removed. Not needed with dyn-string.c in
+ libiberty.
+ * dyn-string.h: Likewise.
+
+ * Makefile.am: Remove references to dyn-string.c and
+ dyn-string.h. Rebuild dependency.
+ * Makefile.in: Rebuild.
+
+2000-06-15 H.J. Lu <hjl@gnu.org>
+
+ * binutils.texi: Put a warning on copying relocatable object
+ files between two different formats.
+
+2000-06-13 DJ Delorie <dj@cygnus.com>
+
+ * rcparse.y (control): ICON controls take an id as the first
+ parameter, not an optional string. Also, call new convenience
+ function that takes res_id's.
+ * resrc.c (define_control): missing text means zero-length string,
+ not zero ID.
+ (define_icon_control): New.
+ * windres.h: declare define_icon_control.
+
+2000-06-13 H.J. Lu <hjl@gnu.org>
+
+ * configure: Regenerate.
+
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in (VERSION): Update to show this is the CVS mainline.
+
+2000-06-02 David O'Brien <obrien@FreeBSD.org>
+
+ * strings.c (isgraphic): Interpret <TAB> as a printable character,
+ analogous to <SPACE>.
+
+2000-05-30 Alan Modra <alan@linuxcare.com.au>
+
+ * objdump.c (display_target_list): Use bfd_close_all_done, not
+ bfd_close to fix crash caused by 2000-05-24 change.
+
+2000-05-25 DJ Delorie <dj@cygnus.com>
+
+ * resrc.c (close_input_stream): zero out cpp_pipe after closing it.
+
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.in: Regenerate.
+
+2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * ar.c: Include filenames.h.
+ (normalize) [HAVE_DOS_BASED_FILE_SYSTEM]: Support backslashes
+ and drive letters in file names.
+ (main): Support backslashes and drive letters in argv[0]. Drop
+ the .exe suffix, if any, in argv[0] if is_ranlib is negative. Use
+ FILENAME_CMP instead of strcmp to compare file names.
+ (open_inarch) [__GO32__]: Don't ifdef errno != ENOENT test for
+ DJGPP v2.
+ (do_quick_append) [__GO32__]: Ditto.
+ (get_pos_bfd, delete_members, move_members, replace_members):
+ Compare file names with FILENAME_CMP.
+
+ * bucomm.c: Include filenames.h.
+ (make_tempname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support mixed
+ forward/backward slashes and drive letters in file names.
+
+ * ieee.c (ieee_start_compilation_unit, ieee_add_bb11): Support
+ mixed forward/backward slashes and drive letters in file names.
+
+ * strings.c (O_BINARY, setmode, SET_BINARY): Define.
+ (main) [SET_BINARY]: Use SET_BINARY to switch stdin into binary
+ mode.
+
+ * objcopy.c: Include filenames.h.
+ (main) [HAVE_DOS_BASED_FILE_SYSTEM]: Drop the .exe suffix
+ before comparing to "strip".
+ Use FILENAME_CMP to compare file names.
+
+ * arsup.c: Include filenames.h.
+ (map_over_list, ar_delete, ar_replace, ar_extract): Use
+ FILENAME_CMP to compare file names.
+ (ar_open): Prepend "tmp-" instead of appending "-tmp", to create
+ the temporary file name.
+
+ * configure.in: Check for setmode.
+ * configure: Regenerate.
+
+2000-05-24 Alan Modra <alan@linuxcare.com.au>
+
+ * objdump.c (display_target_list): Close the bfd.
+ (display_info_table): Likewise.
+
+2000-05-14 H.J. Lu (hjl@gnu.org)
+
+ * objcopy.c (filter_symbols): Don't strip global symbols in
+ relocatable object files.
+
+2000-05-14 Alan Modra <alan@linuxcare.com.au>
+
+ * size.c (usage): Associate short options with corresponding long
+ option to give a clue as to their function.
+
+2000-05-14 Philippe De Muyter <phdm@macqel.be>
+
+ * size.c (main): Accept and ignore `-f' option.
+
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
+
+ * bucomm.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
+
+2000-05-12 H.J. Lu <hjl@gnu.org>
+
+ * nlmconv.c (temp_filename): Removed.
+
+ * nlmconv.c (link_inputs): Use make_temp_file () instead of
+ choose_temp_base ().
+ * objdump.c (display_target_list): Likewise.
+ (display_info_table): Likewise.
+
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
+
+ * objcopy.c (setup_section): Add const and gettext calls for err.
+
+2000-05-02 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_osabi_name): Handle ELFOSABI_NONE instead of
+ ELFOSABI_SYSV. Also handle ELFOSABI_NETBSD, ELFOSABI_HURD,
+ ELFOSABI_SOLARIS, ELFOSABI_MONTEREY, ELFOSABI_IRIX,
+ ELFOSABI_FREEBSD, ELFOSABI_TRU64, ELFOSABI_MODESTO
+ and ELFOSABI_OPENBSD.
+
+2000-05-02 Kazu Hirata <kazu@hxi.com>
+
+ * coffgrok.c: Add ATTRIBUTE_UNUSED as appropriate.
+ * srconv.c: Likewise.
+ * sysdump.c: Likewise.
+
+2000-04-23 Denis Chertykov <denisc@overta.ru>
+
+ * readelf.c (guess_is_rela): AVR uses RELA relocations.
+ (get_machine_name): machine name for EM_AVR added.
+
+2000-04-21 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+
+ * Makefile.am (readelf.o): Add elf/ia64.h.
+ * Makefile.in: Rebuild.
+ * readelf.c: Include elf/ia64.h.
+ (guess_is_rela, dump_relocations): Handle EM_IA_64.
+
+2000-04-17 Timothy Wall <twall@cygnus.com>
+
+ * objdump.c (disassemble_data): Set octets per byte *after*
+ resolving arch/mach for binary files.
+
+2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * arlex.l: Add directives to increase lex buffer size.
+
+ * objdump.c, readelf.c: Don't include strarg.h or varargs.h. They are
+ already included by bucomm.h.
+
+2000-04-10 Philippe De Muyter <phdm@macqel.be>
+
+ * readelf.c (dynamic_segment_mips_val): Call `sprintf', not
+ `strftime' since strftime is not available on all systems.
+ (process_mips_specific): Ditto.
+
+2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
+
+2000-04-06 Alan Modra <alan@linuxcare.com.au>
+
+ * addr2line.c: Update copyright.
+ * objcopy.1: Likewise, and title.
+ * strings.1: Likewise.
+
+ * version.c (print_version): Add 2000.
+
+ * rddbg.c (read_section_stabs_debugging_info): Don't use
+ bfd_size_type for strx to avoid printf problems if BFD64.
+
+ * bucomm.c: (report): Remove `static'.
+ Move inclusion of stdarg.h/vararg.h from here.
+ * bucomm.h: To here.
+ (CONST): Change all occurences to const.
+ (report): Declare it.
+ (bfd_fatal): Add ATTRIBUTE_NORETURN.
+ (fatal): Add ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN.
+ (non_fatal): Add ATTRIBUTE_PRINTF_1.
+
+ * ar.c (main): Use fatal or non_fatal instead of fprintf.
+ Correct a typo in an error message.
+ (do_quick_append): Use non_fatal instead of fprintf.
+ (move_members): Use fatal instead of fprintf, exit.
+ * coffdump.c (main): Same here.
+
+ * dlltool.c (display): Delete.
+ (warn): Delete.
+ (inform): Use `report' instead of `display'.
+ (rvaafter): Remove trailing \n from fatal error msg.
+ (rvabefore): Ditto.
+ (asm_prefix): Ditto.
+ (yyerror): Replace `warn' with `non_fatal', and remove \n.
+ (def_name): Likewise.
+ (run): Likewise.
+ (scan_all_symbols): Likewise.
+ (gen_lib_file): Likewise.
+ (def_library): Likewise. Remove extra program_name too.
+ (run): Remove \n from inform strings.
+ (scan_drectve_symbols): Likewise.
+ (add_excludes): Likewise.
+ (scan_open_obj_file): Likewise.
+ (gen_exp_file): Likewise.
+ (gen_lib_file): Likewise.
+ (process_duplicates): Likewise.
+
+ * Makefile.am (dllwrap_SOURCES): Add version.c.
+ * dllwrap.c (program_version): Delete.
+ (print_version): Delete.
+ (display): Always print trailing \n.
+ (warn): New.
+ (delete_temp_files): Use warn instead of fprintf. Use gettext.
+ (run): Here too.
+ (main): And here.
+ (usage): gettext'ify.
+ (long_options): Add missing initialisers.
+
+ * nlmconv.c (main): Use fatal/non_fatal instead of fprintf.
+ (select_output_format): Likewise.
+ (powerpc_mangle_relocs): Likewise.
+ (link_inputs): Likewise.
+
+ * nm.c (set_print_radix): Use fatal instead of fprintf, exit.
+ (set_output_format): Likewise.
+ (main): Use non_fatal instead of fprintf.
+ (display_rel_file): Likewise.
+
+ * objdump.c (slurp_symtab): Use non_fatal instead of fprintf.
+ (slurp_dynamic_symtab): Same here.
+ (disassemble_data): And here.
+ (read_section_stabs): And here.
+ (read_section_stabs): And here.
+ (dump_bfd): And here.
+ (main): And here.
+ (objdump_sprintf): Use fatal instead of fprintf, exit.
+ (disassemble_data): Same here.
+
+ * rdcoff.c (parse_coff_type): Use non_fatal instead of fprintf.
+ (parse_coff_struct_type): Same here.
+ (parse_coff_enum_type): And here.
+ (parse_coff): And here.
+ * rddbg.c (read_debugging_info): And here.
+ * size.c (main): And here.
+ * windres.c (format_from_name): And here.
+ * wrstabs.c (stab_write_symbol): Here too.
+ (write_stabs_in_sections_debugging_info): And here.
+ (stab_int_type): And here.
+ (stab_struct_field): And here.
+ (stab_typdef): And here.
+
+ * rescoff.c (read_coff_rsrc): Use fatal instead of fprintf, exit.
+ * srconv.c (main): Same here.
+ * strings.c (main): And here.
+ (integer_arg): And here.
+ * sysdump.c (main): And here.
+
+2000-04-06 Timothy Wall <twall@cygnus.com>
+
+ * objdump.c (dump_section_header): Print CLINK and BLOCK flags.
+
+2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
+
+ * readelf.c (decode_location_expression): Loop through multiple
+ operations.
+ (read_and_display_attr): Pass in length.
+
+ * readelf.c (read_and_display_attr): Add CU offset to references.
+ (display_debug_info): Pass it in.
+
+2000-04-06 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (decode_ARM_machine_flags): New function.
+ (get_machine_flags): Call decode_ARM_machine_flags for ARM
+ targets.
+
+ (get_machine_name): Catch EM_AVR
+
+2000-04-05 Alan Modra <alan@linuxcare.com.au>
+
+ * binutils.texi: Remove optional `=' from long options that have
+ an `=' in the argument.
+ * objcopy.1: Here too. Remove extra space on discard-all.
+
+ * binutils.texi (objcopy): Mention --redefine-sym.
+ * objcopy.1: Here too.
+ * NEWS: And here.
+
+ * objcopy.c (parse_flags): Split off flag names from error message
+ gettext as they are not translated.
+ (copy_main): Similarly split off option name for --add-section,
+ --set-section-flags, --change-section-vma, --change-section-lma
+ error messages.
+ Some white space changes.
+
+ from Matthew Benjamin <matt@linuxbox.nu>
+ * objcopy.c (struct redefine_node): New.
+ (redefine_sym_list): New.
+ (redefine_list_append): New.
+ (lookup_sym_redefinition): New.
+ (OPTION_REDEFINE_SYM): New.
+ (copy_options): Add --redefine-sym option.
+ (copy_usage): Mention it.
+ (filter_symbols): Rename symbols on redefine_sym_list.
+ (copy_object): Call filter_symbols if redefine_sym_list != NULL.
+ (copy_main): Handle OPTION_REDEFINE_SYM.
+
+2000-04-04 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_symbol_table): Correctly read in symbol
+ versioning information.
+
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * po/binutils.pot: Regenerate.
+
+ * addr2line.c (usage): Restore translated part of bug string.
+ * ar.c (usage): Likewise.
+ * nlmconv.c (show_usage): Likewise.
+ * nm.c (usage): Likewise.
+ * objcopy.c (copy_usage): Likewise.
+ (strip_usage): Likewise.
+ * objdump.c (usage): Likewise.
+ * readelf.c (usage): Likewise.
+ * size.c (usage): Likewise.
+ * strings.c (usage): Likewise.
+ * windres.c (usage): Likewise.
+
+ * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
+ (DEP): Quote when passing vars to sub-make. Add warning
+ message to end.
+ (DEP1): Rewrite for "gcc -MM".
+ (CLEANFILES): Add DEP2.
+ Update dependencies.
+ * Makefile.in: Regenerate.
+
+2000-04-04 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (GENERATED_HFILES): Add rcparse.h
+ (arparse.h): Depend on arparse.c
+ (defparse.h, nlmheader.h, rcparse.h, sysinfo.h): Similarly.
+
+2000-04-03 H.J. Lu (hjl@gnu.org)
+
+ * size.c (usage): Use REPORT_BUGS_TO.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * bucomm.h: #include "bin-bugs.h"
+ * addr2line.c (usage): Use REPORT_BUGS_TO.
+ * ar.c (usage): Likewise.
+ * nlmconv.c (show_usage): Likewise.
+ * nm.c (usage): Likewise.
+ (OPTION_TARGET): Define.
+ (long_options): Use OPTION_TARGET rather than 200.
+ (main): Likewise.
+
+ * objcopy.c (copy_usage): Use REPORT_BUGS_TO.
+ (strip_usage): Likewise.
+ * objdump.c (usage): Likewise.
+ * readelf.c (usage): Likewise.
+ * strings.c (usage): Likewise.
+ * windres.c (usage): Likewise.
+
+2000-03-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * readelf.c: Include sys/types.h before sys/stat.h for ultrix.
+
+2000-03-27 Nick Clifton <nickc@cygnus.com>
+
+ * rddbg.c (read_section_stabs_debugging_info): Catch out of range
+ string offsets in corrupt stabs entries.
+
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
+
+ * readelf.c: Include elf/avr.h
+ (dump_relocations): Add EM_AVR case.
+
+2000-03-09 Tim Waugh <twaugh@redhat.com>
+
+ * strings.1: Correct '-bytes' to '--bytes'.
+
+2000-03-08 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (install-exec-local): Depend on
+ install-binPROGRAMS for parallel make.
+ * Makefile.in: Regenerated.
+
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
+
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * readelf.c (process_dynamic_segment): Add cast to make sure
+ argument to %* is int.
+
+2000-02-25 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (AC_SEARCH_LIBS): Pass m, not -lm.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add arm-wince, mips-pe and sh-pe targets.
+ * configure: Regenerate.
+
+ * dlltool.c: Add support for sh-pe and mips-pe targets.
+ * rescoff.c: Add support for sh-pe and mips-pe targets.
+
+2000-02-23 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_osabi_name): Handle ELFOSABI_LINUX.
+
+2000-02-22 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (process_symbol_table): Remove use of ELF_ST_OTHER.
+
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
+
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * readelf.c (process_version_sections): Add casts to make sure
+ argument to %* is an int.
+ (process_mips_specific): Add casts to make printf arguments match
+ format.
+
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * objdump.c (dump_section_header): Change `opb' to unsigned.
+ (find_symbol_for_address): Same here.
+ (disassemble_data): And here. Change `addr_offset',
+ `stop_offset', `nextstop_offset' to unsigned long.
+ (dump_data): Change opb to unsigned.
+
+2000-02-18 Frank Ch. Eigler <fche@redhat.com>
+
+ * resrc.c: Remove unmatched #if for cygwin.
+
+2000-02-14 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * binutils.texi: Document the change of flavor name from atpcs-special
+ to special-atpcs to prevent name conflict in gdb.
+
+2000-02-08 Timothy Wall <twall@redhat.com>
+
+ * objdump.c (show_line): Fix bug preventing printing of the very
+ first line (line zero) of a file when interlisting source and
+ assembly. Added option to print entire context from start of file
+ when the first line from that file is encountered.
+
+2000-02-03 Timothy Wall <twall@redhat.com>
+
+ * objdump.c (dump_section_header, find_symbol_for_address,
+ show_line, disassemble_bytes, disassemble_data, dump_data):
+ distinguish between octets and bytes.
+
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
+
+ * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to
+ check to unresolved symbols.
+ (print_symbol_info_sysv): Ditto.
+ (print_symbol_info_posix): Ditto.
+
+ * binutils.texi: Document new 'V' symclass flag for nm.
+
+2000-01-27 Nick Clifton <nickc@redhat.com>
+
+ * binutils.texi (objdump): Document new ARM specific
+ disassembler options.
+
+ * objdump.c (usage): Call disassembler_usage().
+
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * readelf.c (get_dynamic_flags): Return buff.
+ (process_dynamic_segment): Don't pass error strings to printf
+ as format arg.
+ (read_and_display_attr): Use lx and ld to print longs.
+ (process_corefile_note_segment): Cast bfd_vma to unsigned long
+ before printing.
+ Update copyright.
+
+2000-01-17 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_osabi_name): Recognise ELFOSABI_ARM.
+
+2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * debug.c (debug_name_type): Return DEBUG_TYPE_NULL rather than
+ false.
+ (debug_tag_type): Here too.
+ * ieee.c (ieee_builtin_type): And here.
+ * stabs.c (parse_stab_type, parse_stab_array_type): And here.
+
+2000-01-13 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_machine_name): Change EM_S370 to return "IBM
+ System/370".
+
+2000-01-11 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_dynamic_type): Remove DT_ENCODING.
+
+2000-01-10 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_note_type): Display NT_WIN32PSTATUS notes.
+
+2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * windres.c (long_options): Add --use-temp-file and
+ --no-use-temp-file options.
+ (usage): Document.
+ (main): Handle.
+
+ * windres.h: Update read_rc_file prototype.
+
+ * resrc.c (cpp_temp_file): New static variable.
+ (istream_type): New static variable.
+ (close_pipe): Delete function.
+ (run_cmd): New static function.
+ (open_input_stream): New static function.
+ (close_input_stream): New static function.
+ (look_for_default): Handle DOS directory separator. Use
+ open_input_stream instead of popen.
+ (read_rc_file): Likewise.
+
+ * binutils.texi: Document --use-temp-file, --no-use-temp-file
+ options.
+
+2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * dlltool.c (create_compat_implib): New variable.
+ (gen_exp_file): Use.
+ (make_one_lib_file): Use.
+ (long_options): Add --compat-implib option.
+ (usage): Handle.
+ (main): Handle.
+
+ * dllwrap.c (enum target_type): Rename MINGW32_TARGET to MINGW_TARGET.
+ (main): Use. Don't look for "32" in cygwin and mingw target names.
+
+2000-01-03 Nick Clifton <nickc@cygnus.com>
+
+ * binutils.texi: Document new, ARM specific disassembler
+ command line switch "-M force-thumb".
+
+For older changes see ChangeLog-9899
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/binutils/ChangeLog-0203 b/contrib/binutils/binutils/ChangeLog-0203
new file mode 100644
index 0000000..c633775
--- /dev/null
+++ b/contrib/binutils/binutils/ChangeLog-0203
@@ -0,0 +1,2181 @@
+2003-12-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * MAINTAINERS: Rename CONFIGURE to BUILD SYSTEM and add myself.
+
+2003-12-29 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (debug_line_pointer_size): Replace with an array
+ called 'debug_line_pointer_sizes'.
+ (num_debug_line_pointer_sizes): New variable.
+ (display_debug_lines): Extract pointer size from the
+ debug_line_pointer_sizes array.
+ (display_debug_loc): Likewise.
+ (prescan_debug_info): Fill in the debug_line_pointer_sizes
+ array.
+
+2003-12-23 Ralf Baechle <ralf@gnu.org>
+ Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * objcopy.c (bfd_flags_to_set, bfd_flags_to_clear): New variables
+ to handle flags for tweaking.
+ (copy_options): New options: impure, pure, readonly-text,
+ writable-text.
+ (copy_usage, copy_object, command_line_switch): Handle the new
+ options.
+ * doc/binutils.texi: Document the new options.
+
+2003-12-22 Jakub Jelinek <jakub@redhat.com>
+
+ * objdump.c (disassemble_bytes): Subtract rel_offset from printed
+ reloc address.
+ (disassemble_section): Set rel_offset to section->vma instead of
+ pinfo->buffer_vma.
+
+2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * readelf.c (guess_is_rela): Changed m32r's default type to RELA.
+
+2003-12-11 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (strip_usage): Add --only-keep-debug.
+ (copy_usage): Likewise.
+
+2003-12-04 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_object): Do not copy the object if the
+ output file's format cannot be set to that of the input file.
+ If the input file's format is unknown, fail.
+
+2003-11-28 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * cxxfilt.c (usage): Mention new -p/--no-params options.
+
+2003-11-28 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (install-exec-local): Remove common term from string
+ comparison.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.am: Don't use $<.
+ * doc/Makefile.in: Regenerate.
+
+2003-11-27 Nick Clifton <nickc@redhat.com>
+
+ * rename.c (smart_rename): Make sure that we have write
+ permission on the destination file before renaming.
+
+2003-11-26 Daniel Jacobowitz <drow@mvista.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * readelf.c: Add a comment describing the difference between
+ readelf and objdump.
+ * doc/binutils.texi (readelf): Likewise.
+
+2003-11-25 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * doc/binutils.texi (dlltool): Document dlltool --temp-prefix
+ option.
+ * dlltool.c (usage): Likewise.
+
+2003-11-22 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * cxxfilt.c (long_options): Add --no-params.
+ (main): Handle -p/--no-params.
+ * doc/binutils.texi (c++filt): Document -p/--no-params.
+
+2003-11-19 Alan Modra <amodra@bigpond.net.au>
+
+ * objdump.c: Wrap long lines, init vars separately from decl.
+ (disassemble_section): Reset require_sec after call to
+ find_symbol_for_address.
+
+2003-11-14 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (find_symbol_for_address): Change parameters so
+ that the entire disassemble_info structure is passed, not just
+ a few fields. Use the symbol_is_valid field to check the
+ validity of located symbols and continue searching if they are
+ not valid.
+ (objdump_print_addr): Alter parameters passed to
+ find_symbol_for_address.
+ (objdump_symbol_at_address): Likewise.
+ (disassemble_section): Likewise. Also use symbol_is_valid
+ function to check the validity of located symbols.
+
+2003-11-13 Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
+
+ * ar.c (open_inarch): Emit a warning when an archive is created
+ (only shown with -v) in order to confrom to POSIX specification.
+
+2003-11-11 Wang Li <charles@linux.net.cn>
+
+ * objcopy.c (wildcard): New variable. True if wildcard pattern
+ matching is allowed in symbol names.
+ (strip_options): Add -w option to enable wildcard pattern
+ matching.
+ (copy_options): Likewise.
+ (copy_usage): Mention new switch.
+ (strip_usage): Likewise.
+ (is_specified_symbol): If performing wildcard matches use fnmatch
+ to compare symbol names with entries on the symbol list.
+ (strip_main): Accept -w switch.
+ (copy_main): Likewise.
+ * Makefile.am: Add dependency on fnmatch.h for objcopy.c
+ * Makefile.in: Regenerate.
+ * doc/binutils.texi: Document new switch.
+ * NEWS: Mention new switch.
+
+2003-11-11 Alan Modra <amodra@bigpond.net.au>
+
+ * objdump.c: Revert rev 1.81 commit.
+
+2003-11-10 Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
+
+ * ar.c (print_contents): Remove "member" from verbose output in
+ order to conform to POSIX specification.
+
+2003-11-10 Alan Modra <amodra@bigpond.net.au>
+
+ * README: Expand bug reporting information.
+
+2003-11-07 Jonathan R. Grant <jg-binutils@jguk.org>
+
+ * bucomm,c (get_file_size): New function. Returns the size of a
+ file.
+ * bucomm.h: Add prototype for get_file_size.
+ * addr2line.c (process_file): Use new function.
+ * ar.c (main, ranlib_only, ranlib_touch): Likewise.
+ * nm.c (display_file): Likewise.
+ * objcopy.c (add_specific_symbols, copy_file, strip_main,
+ copy_main): Likewise.
+ * objdump.c (display_file): Likewise.
+ * size.c (display_file): Likewise.
+ * strings.c (strings_file): Likewise.
+ * readelf.c (process_file): Use similar code to get_file_size.
+
+2003-11-06 Bruno Rohee <bruno@rohee.com>
+
+ * ieee.c: Fix "the the" typo.
+ * stabs.c: Likewise.
+
+2003-10-30 Marshall T. Vandegrift <llasram@wuli.nu>
+
+ * readelf.c (dump_section): Do not dump the contents of SHT_NOBITS
+ sections - they have no file space assigned to their contents.
+
+2003-10-28 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * readelf.c (dump_section): Don't display DEL characters.
+
+2003-10-27 Kazu Hirata <kazu@cs.umass.edu>
+
+ * ChangeLog: Fix typos.
+ * ChangeLog-9197: Likewise.
+ * ChangeLog-9899: Likewise.
+ * NEWS: Likewise.
+ * ar.c: Fix comment typos.
+ * arsup.c: Likewise.
+ * coffgrok.c: Likewise.
+ * debug.c: Likewise.
+ * debug.h: Likewise.
+ * dlltool.c: Likewise.
+ * ieee.c: Likewise.
+ * nm.c: Likewise.
+ * objdump.c: Likewise.
+ * prdbg.c: Likewise.
+ * readelf.c: Likewise.
+ * resrc.c: Likewise.
+ * sysinfo.y: Likewise.
+ * windres.c: Likewise.
+
+2003-10-27 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_section): Do not complain when a target does not
+ support relocations.
+ (mark_symbols_used_in_relocations): Likewise.
+
+2003-10-14 Anil Paranjpe <anilp1@KPITCummins.com>
+
+ * objcopy.c (copy_main): Reads machine flags from arch_info
+ structure.
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * coffgrok.h (coff_section): Replace 'struct sec" with "struct
+ bfd_section".
+
+2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * objdump.c (read_section_stabs): Just read one section, return
+ pointer to it. Add size parameter.
+ (print_section_stabs): Add string offset parameter. Adjust.
+ (struct stab_section_names): Add string offset member.
+ (find_stabs_sections): Correct check for split section suffix,
+ adjust read_section_stabs and print_section_stabs calls.
+ (dump_stabs_section): Clear string_offset, free string table.
+
+2003-10-01 Martin Fuchs <martin-fuchs@gmx.net>
+
+ * resrc.c (define_icon): Fix storage of color attributes 'planes' and
+ 'bit count' in icon groups.
+
+2003-09-30 Chris Demetriou <cgd@broadcom.com>
+
+ * NEWS: Add an indication of the cutoff for 2.14.
+
+2003-09-30 Chris Demetriou <cgd@broadcom.com>
+
+ * readelf.c (get_machine_flags): Handle E_MIPS_ARCH_64R2.
+
+2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (dump_relocations): Support SHN_IA_64_ANSI_COMMON.
+ (get_symbol_index_type): Likewise.
+
+2003-09-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (process_version_sections): Indent version names.
+
+2003-09-15 Anthony Green <green@redhat.com>
+
+ * dlltool.c (prefix_encode): Fix ISO C90 conversion.
+ (dlltmp): Ditto.
+ (dtab): Ditto.
+
+2003-09-14 Andreas Jaeger <aj@suse.de>
+
+ * addr2line.c: Convert to ISO C90 prototypes, change PTR, remove
+ unneeded (void *) casts.
+ * ar.c: Likewise.
+ * arlex.l: Likewise.
+ * arparse.y: Likewise.
+ * arsup.c: Likewise.
+ * binemul.c: Likewise.
+ * binemul.h: Likewise.
+ * bucomm.c: Likewise.
+ * bucomm.h: Likewise.
+ * budbg.h: Likewise.
+ * budemang.c: Likewise.
+ * budemang.h: Likewise.
+ * coffdump.c: Likewise.
+ * coffgrok.c: Likewise.
+ * cxxfilt.c: Likewise.
+ * debug.c: Likewise.
+ * debug.h: Likewise.
+ * deflex.l: Likewise.
+ * dlltool.c: Likewise.
+ * dlltool.h: Likewise.
+ * dllwrap.c: Likewise.
+ * emul_aix.c: Likewise.
+ * filemode.c: Likewise.
+ * ieee.c: Likewise.
+ * nlmconv.c: Likewise.
+ * nlmconv.h: Likewise.
+ * nlmheader.y: Likewise.
+ * nm.c: Likewise.
+ * prdbg.c: Likewise.
+ * rclex.l: Likewise.
+ * rcparse.y: Likewise.
+ * rdcoff.c: Likewise.
+ * rddbg.c: Likewise.
+ * rename.c: Likewise.
+ * resbin.c: Likewise.
+ * rescoff.c: Likewise.
+ * resrc.c: Likewise.
+ * size.c: Likewise.
+ * srconv.c: Likewise.
+ * stabs.c: Likewise.
+ * strings.c: Likewise.
+ * sysdump.c: Likewise.
+ * sysinfo.y: Likewise.
+ * syslex.l: Likewise.
+ * unwind-ia64.c: Likewise.
+ * unwind-ia64.h: Likewise.
+ * version.c: Likewise.
+ * windres.c: Likewise.
+ * windres.h: Likewise.
+ * winduni.c: Likewise.
+ * wrstabs.c: Likewise.
+
+2003-09-10 James E Wilson <wilson@specifixinc.com>
+
+ * MAINTAINERS: Update my e-mail address.
+
+2003-09-09 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * MAINTAINERS: Update my e-mail address.
+
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Make it clear what should be done with patches to
+ the top level configure files (other than config.guess and
+ config.sub). Add binutils@sources.redhat.com as an address to
+ which patches can be sent.
+
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_machine_flags): Recognise V850E1 machine type.
+
+2003-09-03 Andrew Cagney <cagney@redhat.com>
+
+ * objdump.c: Refer to init_disassemble_info in comments.
+ (disassemble_data): Replace INIT_DISASSEMBLE_INFO with
+ init_disassemble_info.
+
+2003-09-03 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (struct objdump_disasm_info): Add new fields
+ 'dynrelbuf', 'dynrelcount' and 'disassemble_fn'.
+ (process_section_p): New function: Returns TRUE if a section
+ can be dumped.
+ (disassemble_section): New function: Contains the body of
+ disassemble_data(), but just for one section.
+ (disassemble_data): Use bfd_map_over_sections to walk section
+ chain.
+ (find_stabs_section): New function: Find a stabs containing
+ section and then dump it.
+ (dump_stabs_section): New function: Use bfd_map_over_sections
+ to find the section to dump.
+ (dump_stabs): Use dump_stabs_section.
+ (dump_section): New function: Display the contents of a
+ section.
+ (dump_data): Use bfd_map_over_sections to display section
+ contents.
+ (dump_relocs_in_section): Display the relocs in a given section.
+ (dump_relocs): Use bfd_map_over_sections to display relocs.
+ (adjust_addresses): New function: Adjust the vma and lma of
+ sections.
+ (dump_bfd): Use bfd_map_over_sections.
+ * doc/binutils.texi: Document the "objdump -s" (no longer)
+ dumps empty sections.
+
+2003-08-24 Jonathan R. Grant <jg-binutils@jguk.org>
+
+ * objdump.c: Improve comments/documentation.
+ dump_data: Eliminate duplicate function calls to bfd_section_size.
+
+2003-09-02 Alan Modra <amodra@bigpond.net.au>
+
+ * MAINTAINERS: Move Dave Anglin's entry to where it belongs.
+
+2003-08-21 Nick Clifton <nickc@redhat.com>
+
+ * po/tr.po: Updated Turkish translation.
+
+2003-08-14 Alan Modra <amodra@bigpond.net.au>
+
+ * dep-in.sed: Remove libintl.h.
+ * Makefile.am (POTFILES.in): Unset LC_COLLATE.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2003-08-11 Ian Lance Taylor <ian@airs.com>
+
+ * readelf.c (process_archive): Fix error handling. Remove memory
+ leak.
+
+ * readelf.c: Add ability to read archives.
+ (archive_file_offset): New variable.
+ (archive_file_size): New variable.
+ (get_data): Include archive_file_offset in file offset
+ calculation when fseeking.
+ (process_program_headers): Likewise.
+ (process_symbol_table): Likewise.
+ (process_dynamic_segment): Handle computation of end of file
+ position when the file is in an archive.
+ (process_object): New function. Contains the body of
+ process_file().
+ (process_archive): New function. Call process_object on each
+ member of an archive.
+ (process_file): Detect archives and handle appropriately.
+ * Makefile.am: Add dependency on aout/ar.h for readelf.c
+ * Makefile.in: Regenerate.
+ * NEWS: Document readelf's new ability.
+ * doc/binutils: Alter text to say that readelf supports archives
+ and 64-bit ELF files.
+
+2003-08-08 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
+2003-08-05 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c: Remove unnecessary prototypes and casts.
+ * objdump.c: Remove unnecessary casts.
+ * readelf.c: Convert to C90. Remove unnecessary prototypes and casts.
+ (get_osabi_name): Move so we don't need a forward declaration.
+
+2003-08-04 Bradley Harrington <bharring@us.ibm.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * objdump.c (include_paths, include_path_count): New vars.
+ (usage): Describe --include.
+ (long_options): Add "include".
+ (add_include_path): New function.
+ (struct print_file_list): Make filename const. Add modname.
+ (try_print_file_open, update_source_path): New functions.
+ (show_line): Use them.
+ (main): Handle 'I' option. Don't check for NULL xrealloc arg.
+
+2003-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * objdump.c: Remove unnecessary prototypes.
+ (disassemble_bytes): Add rel_offset parameter. Simplify reloc skipping
+ code, and print relocs when dump_dynamic_reloc_info.
+ (disassemble_data): Read and handle dynamic relocs. Correct reloc
+ skip code. Formatting.
+ (dump_bfd): Don't dump dynamic relocs when disassembling.
+
+2003-07-29 Ben Elliston <bje@wasabisystems.com>
+
+ * MAINTAINERS: Remove self as M88k maintainer. Future M88k
+ maintenance defaults to the blanket write privilege maintainers.
+
+2003-07-29 Michael Meissner <gnu@the-meissners.org>
+
+ * MAINTAINERS: Updated my email address.
+
+2003-07-29 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c: Update to ISO C.
+
+2003-07-24 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (disassemble_data): Do not ignore sections without the
+ LOAD flag when disassemble_all is true. Only print a message
+ about disassembling a section if it contains some data.
+
+ * po/fr.po: Updated French translation.
+
+2003-07-23 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c: Switch to ISO C. Remove debugging code accidentally
+ left in. Some formatting tidy ups.
+
+2003-07-22 Salvador Eduardo Tropea <set@computer.org>
+
+ * objdump.c: New command line option --debugging-tags.
+ * doc/binutils.texi: Document new command line option.
+ * prdbg.c: Code to print the debug info as tags compatible
+ with ctags.
+ * budbg.h: Adjust prototype.
+ * NEWS: Mention new switch
+
+2003-07-18 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (main) :Accept multiple -M switch.
+ * doc/binutils.texi: Document that multiple -M switches are
+ accepted and that a single -M switch can contain comma
+ separated options.
+
+2003-07-17 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (main): Issue a warning message if multiple -M
+ switches are used.
+
+ * doc/binutils.texi (objdump): Update documentation about -M
+ option.
+
+2003-07-17 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: New Spanish translation.
+
+2003-07-11 Alan Modra <amodra@bigpond.net.au>
+
+ * po/binutils.pot: Regenerate.
+
+2003-07-05 Christopher Faylor <cgf@redhat.com>
+
+ * dlltool.c (prefix_encode): Use a fixed length for alpha.
+
+2003-07-04 Christopher Faylor <cgf@redhat.com>
+
+ * dlltool.c (prefix_encode): New function. Encode temp file prefix
+ from pid.
+ (dlltmp): Pass address of pointer being alloced or suffer neverending
+ mallocs.
+ (make_one_lib_file): Allocate enough space for new longer stub names.
+ (gen_lib_file): Ditto.
+ (main): Generate the temp file prefix from the pid if prefix was not
+ specified on the command line.
+
+2003-07-04 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_data): Print (unsigned) hex values for size and
+ offset in error messages.
+ (process_section_headers): If the string table could not be
+ allocated, do not continue.
+
+2003-07-01 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (dynamic_segment_ia64_val): Print address and newline
+ for sections by default. Comment fix.
+
+2003-06-28 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * rcparse.y (res_text_field): New res_id variable.
+ (res_null_text): New static const struct res_id object,
+ with empty unicode name field.
+ (control): Pop parsing of optresidc up one level. Set
+ res_text_field to $2 except for controls which do not accept
+ a text field. Set res_text_field to res_null_text for the
+ special cases (viz. COMBOBOX, EDITTEXT, LISTBOX, SCROLLBAR).
+ (control_params): Adjust to use res_text_field rather
+ than optresidc.
+ (COMBOBOX): Add comment about discrepency between documented
+ vs. observed default style.
+ * resrc.c (define_control): Make first param const.
+ * windres.h (define_control): Adjust prototype.
+
+2003-06-27 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_object): Replace call to
+ bfd_create_gnu_debuglink_section with separate calls to
+ bfd_add_gnu_debuglink_section and
+ bfd_fill_in_gnu_debuglink_section, separated by a walk over the
+ symbol tables.
+
+2003-06-26 Roland McGrath <roland@redhat.com>
+
+ * readelf.c (loadaddr): Variable removed.
+ (dynamic_info, version_info): Fix type long -> bfd_vma.
+ (program_headers): New variable.
+ (get_program_headers): New function, broken out of
+ process_program_headers.
+ (process_program_headers): Call it. Don't set `loadaddr'.
+ (slurp_ia64_unwind_table): Use get_program_headers.
+ (process_corefile_note_segments): Likewise.
+ (offset_from_vma): New function.
+ (process_relocs, process_dynamic_segment): Call that instead of
+ subtracting `loadaddr'.
+ (process_version_sections, process_symbol_table): Likewise.
+ (process_mips_specific): Likewise.
+
+2003-06-26 Nick Clifton <nickc@redhat.com>
+
+ * objcopy (enum strip_action): Add STRIP_NONDEBUG.
+ (OPTION_ONLY_KEEP_DEBUG): New.
+ (strip_options): Add --only-keep-debug.
+ (copy_options): Likewise.
+ (is_strip_section): Invert return value if STRIP_NONDEBUG is
+ active.
+ (copy_object): Do not copy private data when STRIP_NONDEBUG is
+ active.
+ (setup_section): Likewise.
+ (strip_main): Handle --only-keep-debug.
+ (copy_main): Likewise.
+ * NEWS: Mention new switch
+ * doc/binutils.texi: Document new switch.
+
+2003-06-25 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Correct spelling of "relocatable".
+ * objdump.c: Likewise.
+ * sysroff.info: Likewise.
+
+2003-06-19 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (print_vma): When printing DEC_5 values, if the
+ number is bigger than 99999 switch to using hexadecimal
+ notation.
+
+2003-06-11 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (gnu_debuglink_filename): New variable.
+ (OPTION_ADD_GNU_DEBUGLINK): New switch
+ (copy_options): Describe --add-gnu-debuglink switch.
+ Mention that --strip-debug removes sections as well.
+ (is_strip_section): Process the sections removed and kept
+ lists before checking for debugging sections.
+ (add_redefine_syms_file): Make function static.
+ (copy_object): Use is_strip_section.
+ Check to see if a .gnu_debuglink section should be added. If
+ so, call bfd_add_gnu_debuglink.
+ (setup_section): Use is_strip_section.
+ (copy_section): Use is_strip_section.
+ (copy_main): Handle OPTION_ADD_GNU_DEBUGLINK.
+ * NEWS: Mention new objcopy switch.
+ * doc/binutils.texi: Document new switch.
+
+2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * po/Make-in (DESTDIR): New.
+ (install-data-yes): Support $(DESTDIR).
+ (uninstall): Likewise.
+
+2003-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2003-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_segment_type): Handle PT_GNU_STACK.
+
+2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * NEWS: Document the new BSD/POSIX single-character mapping for
+ .comment/.note sections.
+
+2003-06-02 Chris Demetriou <cgd@broadcom.com>
+ Jason Thorpe <thorpej@wasabisystems.com>
+
+ * objcopy.c (redefine_list_append): Add an argument that
+ indicates the context from which this function is being
+ called. Change all callers.
+ (copy_options): Add a new option, --redefine-syms.
+ (copy_usage): Document new option.
+ (copy_main): Handle the --redefine-syms option.
+ * doc/binutils.text (objcopy): Document new option.
+
+2003-05-31 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (byte_get_signed): New.
+ (get_encoded_value): New.
+ (display_debug_frames): Use it. Always pre-process opcodes.
+
+2003-05-20 Michal Ludvig <mludvig@suse.cz>
+
+ * readelf.c (display_debug_frames): Print both registers
+ for DW_CFA_register.
+
+2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
+
+ * configure.in: Accept i[3-7]86 variants. Escape '[]' for
+ i[3-7]86-*-interix.
+ * configure.in: Regenerate.
+
+2003-05-13 Michael Eager <eager@mvista.com>
+
+ * objcopy.c: Treat identical src/dst file names as if only one
+ entered. One Windows creating an output file of the same name as
+ the input file will delete the input file before it is read.
+
+2003-05-12 Salvador Eduardo Tropea <salvador@inti.gov.ar>
+
+ * debug.c (debug_get_real_type): Extend test for circular debug
+ references.
+
+2003-05-12 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add zh_CN.
+ * configure: Regenerate.
+ * po/zh_CN.po: New file: Chinese (simplified) translation.
+
+2003-05-11 Jason Eckhardt <jle@rice.edu>
+
+ * MAINTAINERS: Update my mail address.
+
+2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (dump_relocations): Enlarge the type field in wide
+ mode by one character.
+
+2003-05-03 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (struct Frame_Chunk): Add cfa_exp.
+ (frame_display_row): Just print "exp" for cfa or register
+ defined by a location expression.
+ (display_debug_frames): Handle DW_CFA_def_cfa_expression,
+ DW_CFA_expression, DW_CFA_MIPS_advance_loc8.
+
+2003-04-30 H.J. Lu <hjl@gnu.org>
+
+ * objdump.c (only): Change it to char **.
+ (only_size): New.
+ (only_used): New.
+ (disassemble_data): Check only as an array.
+ (dump_data): Likewise.
+ (dump_relocs): Likewise.
+ (main): Treat only as an array.
+
+2003-04-24 Dimitrie O. Paun <dpaun@rogers.com>
+
+ * doc/binutils.texi: Fix the documentation for the -fo option.
+
+2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * readelf.c (get_machine_name) <EM_SH>: Amend return value
+ to refer to SuperH.
+
+ * readelf.c (decode_location_expression): Don't add a trailing ';'.
+
+2003-04-23 Dimitrie O. Paun <dpaun@rogers.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * windres.c (long_options): Move close to main, where it is used.
+ Add 'input' and 'output' long options.
+ (main): Accept "-fo" as an alias for "-o". This is for rc
+ comptibility.
+ * doc/binutils.texi: Mention that -fo is accepted as an alias for
+ -o, but discourage its use.
+
+2003-04-22 Dimitrie O. Paun <dpaun@rogers.com>
+
+ * windres.c (format_from_name): Make the exit on error
+ behaviour optional.
+ (main): Rename the -I option to -J. Introduce -I as a synonym
+ for --include-dir. For backwards compatibility also support the
+ old -I behaviour, but issue a deprecation warning.
+ * doc/binutils.texi: Rename -I to -J. Document the new behaviour
+ of the -I option.
+
+2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * readelf.c: Replace references to Mitsubishi M32R with
+ references to Renesas M32R.
+
+2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
+
+ * readelf.c: Replace occurrances of 'Hitachi' with 'Renesas'.
+
+2003-04-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * doc/binutils.texi (objdump) [--debugging]: Suggest readelf -w
+ for debugging information types not supported by objdump.
+
+2003-04-09 Bernd Jendrissek <berndj@prism.co.za>
+
+ * configure.in: Recognize canonical form of i[3-6]86-pe*.
+ * configure: Regenerate.
+
+2003-04-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * readelf.c (display_debug_info): Apply RELA relocations on the
+ entire section.
+ (byte_put_little_endian, byte_put_big_endian): New functions.
+ (byte_put): New variable.
+ (get_file_header): Initialize it.
+
+2003-04-05 Dimitrie O. Paun <dpaun@rogers.com>
+
+ * windres.c: Add -l for compatibility with wrc, and rc.
+ Use the short option as a key for long options that have
+ a synonymous short option.
+ * doc/binutils.texi: Added -l to the list of options.
+
+2003-04-03 Dimitrie O. Paun <dpaun@rogers.com>
+
+ * windres.c: Add -U for compatibility with wrc, rc, and cpp.
+ (main): Just pass the -U option down to the preprocessor.
+ * doc/binutils.texi: Added -U to the list of options.
+
+2003-04-01 Dimitrie O. Paun <dpaun@rogers.com>
+
+ * windres.c (usage): Report -r option.
+ (main): Ignore the -r option.
+ * doc/binutils.texi: Add -r to the list of options.
+
+2003-04-01 Bob Wilson <bob.wilson@acm.org>
+
+ * MAINTAINERS: Add myself as Xtensa maintainer.
+
+2003-04-01 Bob Wilson <bob.wilson@acm.org>
+
+ * readelf.c: Include "elf/xtensa.h".
+ (guess_is_rela): Add EM_XTENSA and EM_XTENSA_OLD to list of
+ targets that use RELA relocations.
+ (dump_relocations): Call elf_xtensa_reloc_type for
+ EM_XTENSA and EM_XTENSA_OLD.
+ (get_machine_name): Handle EM_XTENSA and EM_XTENSA_OLD.
+
+2003-04-01 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Change "arm-pe*" to "arm-*-pe*". Similarly for
+ thumb-pe*, mcore-pe and mcore-*elf.
+ * configure: Regenerate.
+
+2003-03-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * objdump.c (dump_data): Don't truncate the address to long; make
+ the width large enough, and uniform for all entries in a section.
+
+2003-03-31 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c: Include "libiberty.h".
+ (dynamic_relocations): New.
+ (process_relocs): Properly handle dynamic relocation.
+ (process_dynamic_segment): Fill relocation elements in
+ dynamic_info.
+
+2003-03-31 Kevin Buettner <kevinb@redhat.com>
+
+ * readelf.c (read_and_display_attr, read_and_display_attr_value):
+ Add new arguments ``offset_size'' and ``dwarf_version''. Adjust
+ all callers.
+ (display_debug_lines, display_debug_pubnames, display_debug_info)
+ (display_debug_aranges, display_debug_frames, read_and_display_attr)
+ (read_and_display_attr_value): Add 64-bit DWARF support.
+
+2003-03-31 Ian Lance Taylor <ian@airs.com>
+
+ * rcparse.y: Replace uses of 'optstringrc' with 'optresid'.
+ (optresid): Handle a resource id that can be a string or a number.
+ * resrc.c (define_control): Replace 'text' parameter with 'iid' a
+ struct res_id.
+ (define_icon_control): Pass a struct res_id to define_control.
+ * windres.h (define_control): Change prototype.
+
+2003-03-24 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * objcopy (OPTION_FORMATS_INFO): Define.
+ (strip_options): Add "info"/OPTION_FORMATS_INFO option.
+ (copy_options): Likewise.
+ (strip_usage): Add "--info" to usage.
+ (copy_usage): Likewise.
+ (strip_main): Declare formats_info. Iniatilize it to FALSE.
+ Handle "info".
+ (copy_main). Likewise.
+ * doc/binutils.texi. Document the "--info" option for
+ objcopy/strip.
+ * NEWS: Mention the new command line switch.
+
+ * objdump.c (endian_string): Move to bucomm.c.
+ (display_info): Likewise.
+ (display_target_list): Likewise.
+ (display_info_table): Likewise.
+ (display_target_tables): Likewise.
+ (main): Assign the return value of display_info to exit_status.
+ * bucomm.c: Include bfdver.h and libbfd.h
+ (display_target_list): Call bfd_nonfatal instead of nonfatal and
+ return 0 on a non-fatal error, 1 on success.
+ (display_info_table): Likewise.
+ * bucomm.h (display_info): Provide a prototype.
+ * Makefile.am (bucomm.o): Add dependencies on bfdver.h and
+ libbfd.h.
+ * Makefile.in: Regenerate.
+
+2003-03-22 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * dlltool.c (gen_def_file): Put demangled name comments on
+ own line preceding export name.
+
+2003-03-17 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (disassemble_data): Use disasm_info.fprintf_func not
+ printf for emitting new lines.
+
+2003-03-16 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * nm.c (print_symbol_info_bsd): Print the symbol's size instead of
+ the symbol's value when --size-sort is used, unless -S is used.
+ doc/binutils.texi (--size-sort): For non-bsd formats both the
+ value and size of the symbols are displayed.
+
+2003-03-13 Nick Clifton <nickc@redhat.com>
+
+ * po/da.po: Update.
+
+2003-03-12 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Remove Peter Targett as ARC maintainer.
+
+2003-03-10 Ben Elliston <bje@wasabisystems.com>
+
+ * MAINTAINERS: Update my mail address.
+
+2003-03-06 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * stabs.c (BYTES_IN_WORD): Remove definition.
+ * wrstabs.c (BYTES_IN_WORD): Likewise.
+
+2003-03-04 Nick Clifton <nickc@redhat.com>
+
+ * nm.c (main): Print a warning message if --size-sort and
+ --undefined-only are used together.
+
+2003-03-04 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * nm.c (print_symbol): Remove check for undefined_only.
+
+2003-03-03 Nick Clifton <nickc@redhat.com>
+
+ * po/da.po: Installed latest translation.
+
+2003-02-24 Nick Clifton <nickc@redhat.com>
+
+ * README: Update binutils references to 2.13.
+ Add paragraph about using --disable-nls.
+
+2003-02-24 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * doc/binutils.texi (nm --size-sort): Update.
+
+2003-02-21 James E Wilson <wilson@tuliptree.org>
+
+ * MAINTAINERS: Update email address.
+
+2003-02-21 Ian Wienand <ianw@gelato.unsw.edu.au>
+
+ * readelf.c (get_ia64_dynamic_type): New function.
+ (dynamic_segment_ia64_val): New function.
+ (get_dynamic_type): If machine type is EM_IA_64 call
+ get_ia64_dynamic_val.
+ (get_ia64_section_type_name): Handle sections with types in the
+ SHT_IA_64_LOPSREG to SHT_IA_64_HIPSREG range.
+ (get_dynamic_flags): If machine type is EM_IA_64 call
+ dynamic_segment_ia64_val.
+
+2003-02-21 Bob Wilson <bob.wilson@acm.org>
+
+ * doc/binutils.texi: Fix typos and obvious texinfo mistakes. Make
+ section title capitalization more consistent. Update descriptions
+ of various options to be consistent with the code. Fix errors and
+ incomplete list in the description of c++filt format options. Remove
+ information about the linker. Change to be more polite about poor
+ bug reports. Replace FDL appendix with include of fdl.texi.
+ * doc/fdl.texi: New file.
+
+2003-02-21 Roger Sayle <roger@eyesopen.com>
+
+ * objcopy.c (filter_symbols): Fix compilation problems with
+ HP-UX's C compiler.
+
+2003-02-19 Christopher Faylor <cgf@redhat.com>
+
+ * rclex.l (handle_quotes): Fix minor formatting problems introduced in
+ previous change.
+
+2003-02-19 Mark Blackburn <marklist@fangorn.ca>
+
+ * rclex.l (handle_quotes): Handle strings spanning more than one line.
+
+2003-02-12 Bob Wilson <bob.wilson@acm.org>
+
+ * nm.c (usage): Add `java' and `gnat' demangle styles and make
+ quotes consistent.
+ * objdump.c (usage): Ditto. Also fix some typos.
+
+ * readelf.c (parse_args): Include 'H' option in call to getopt_long.
+
+ * debug.c (debug_record_variable): Handle global register variables.
+
+ * stabs.c (parse_stab): For N_SLINE only include
+ function_start_offset if the symbol is within a function;
+ otherwise, the value is absolute.
+
+2003-02-10 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (decode_ARM_machine_flags): Handle the
+ EF_ARM_MAVERICK_FLOAT flag.
+
+2003-02-04 Andreas Schwab <schwab@suse.de>
+
+ * rddbg.c (read_section_stabs_debugging_info): Cast ptrdiff_t to
+ long and use %ld in printf format.
+
+2003-01-28 Richard Sandiford <rsandifo@redhat.com>
+
+ * readelf.c (dump_relocations): Reorder the r_info field for
+ little-endian mips elf64. Move #ifdef BFD64 to cover the new code.
+
+2003-01-21 Daniel Berlin <dan@dberlin.org>
+
+ * readelf.c (display_debug_loc): Skip address base changes.
+
+2003-01-17 Fabio Alemagna <falemagn@aros.org>
+
+ * readelf.c (get_osabi_name): Handle ELFOSABI_AROS, ELFOSABI_OPENVMS
+ and ELFOSABI_NSK.
+
+2003-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c: Include elf/ppc64.h.
+ (dump_relocations <EM_PPC64>): Use elf_ppc64_reloc_type.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2003-01-02 Ben Elliston <bje@redhat.com>
+
+ * readelf.c (guess_is_rela): Handle EM_IQ2000.
+ (get_machine_name): Likewise.
+ (dump_relocations): Likewise.
+ * NEWS: Mention IQ2000 support.
+
+2003-01-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * readelf.c (get_machine_flags): Handle E_MIPS_ARCH_32R2.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * doc/binutils.texi (objdump): Note MIPS HWR (Hardware Register)
+ changes in MIPS -M options.
+
+2002-12-30 Dmitry Diky <diwil@mail.ru>
+
+ * Makefile.am: Add msp430 target.
+ * Makefile.in: Regenerate.
+ * readelf.c: Add support for msp430 target.
+
+2002-12-27 Chris Demetriou <cgd@broadcom.com>
+
+ * doc/binutils.texi (objdump): Document MIPS -M options.
+
+2002-12-23 Andreas Schwab <schwab@suse.de>
+
+ * readelf.c (main): Reset dump request after each file.
+
+2002-12-23 Nick Clifton <nickc@redhat.com>
+
+ * nlmconv.c (main): Pass TRUE as third argument to
+ bfd_arch_get_compatible.
+
+2002-12-23 Nick Clifton <nickc@redhat.com>
+
+ * strings.c (isgraphic): Replace definition with STRING_ISGRAPHIC
+ macro. Handle 'S' encoding, accepting 8-bit characters.
+ (main): Parse 'S' encoding.
+ (get_char): Accept 'S' encoding.
+ (print_strings): Use STRING_ISGRAPHIC.
+ (usage): Document support of 'S' encoding.
+ * doc/binutils.texi: Document support of 'S' encoding/
+ * NEWS: Mention new feature.
+
+2002-12-20 Alan Modra <amodra@bigpond.net.au>
+
+ * README <building ar>: Don't use libibery's needed_list or
+ required_list, instead link libiberty/*.o.
+
+2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
+
+ * doc/binutils.texi: Fix typos.
+
+2002-12-14 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * doc/binutils.texi: Add missing parenthesis.
+
+2002-12-15 Nick Kelsey <nickk@ubicom.com>
+
+ * objcopy.c: Add --prefix-symbols=<prefix> option to rename all
+ symbols by adding the given prefix to the begining of the symbol
+ name. This is useful to provide name space separation regardless
+ of how the object file was created. Added --prefix-sections=
+ <prefix> and --prefix-alloc-sections=<prefix> options to rename all
+ sections (or all sections with the alloc flag set) by adding the given
+ prefix to the begining of the symbol name.
+ * NEWS: Mention this new feature.
+ * doc/binutils.texi: Document this new feature.
+
+2002-12-13 Alan Modra <amodra@bigpond.net.au>
+
+ * dlltool.c (mcore_elf_gen_out_file): Replace all occurrences of
+ dyn_string_append with dyn_string_append_cstr.
+
+ * emul_aix.c (ar_emul_aix_create): Remove unused function.
+
+2002-12-10 James Cownie <jcownie@etnus.com>
+
+ * readelf.h (get_TAG_name, get_AT_name,
+ read_and_display_attr_value): Add support for UPC extensions to
+ DWARF2 spec.
+ * NEWS: Mention this new support.
+
+2002-12-08 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Mention that bfd no longer declares a "boolean" type.
+
+2002-12-07 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (process_program_headers): When setting loadaddr, don't
+ assume segment size is 4k. Use p_align instead.
+ (loadaddr): Change from int to long.
+ (dynamic_addr, dynamic_info, version_info): Likewise.
+ (process_dynamic_segment <syminsz>): Likewise.
+ (process_dynamic_segment): Adjust print format string.
+ (rela_addr, rela_size): Delete.
+ (process_relocs): Formatting.
+
+2002-12-05 Jim Wilson <wilson@redhat.com>
+
+ * configure.in (OBJDUMP_DEFS): Define SKIP_ZEROES as 16 for IA-64.
+ * configure: Regenerate.
+
+2002-12-04 Ian Lance Taylor <ian@airs.com>
+
+ * MAINTAINERS: Change e-mail address back to airs.com.
+
+2002-12-04 Aldy Hernandez <aldyh@redhat.com>
+
+ * MAINTAINERS: Add self.
+
+2002-11-30 Alan Modra <amodra@bigpond.net.au>
+
+ * addr2line.c, ar.c, arsup.c, binemul.c, binemul.h, bucomm.c, bucomm.h,
+ budbg.h, debug.c, debug.h, dlltool.c, emul_aix.c, ieee.c, nlmconv.c,
+ nlmconv.h, nlmheader.y, nm.c, objcopy.c, objdump.c, prdbg.c, rdcoff.c,
+ rddbg.c, readelf.c, rename.c, size.c, stabs.c, strings.c,
+ unwind-ia64.h, wrstabs.c: Replace boolean with bfd_boolean, true with
+ TRUE, false with FALSE. Simplify comparisons of bfd_boolean vars
+ with TRUE/FALSE. Formatting.
+
+2002-11-29 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c Replace occurrences of Elf32_Internal_* and
+ Elf64_Internal_* with Elf_Internal_*.
+ (slurp_rel_relocs): Change Elf_Internal_Rel to Elf_Internal_Rela.
+ Zero r_addend fields.
+ (dump_relocations): Remove relas variable, change Elf_Internal_Rel to
+ Elf_Internal_Rela.
+
+2002-11-23 Nick Clifton <nickc@redhat.com>
+
+ * size.c (usage): Fix typo describing switch for hex format.
+
+2002-11-18 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * testsuite/binutils-all/objcopy.exp: Disable tic4x from test
+ * testsuite/binutils-all/objdump.exp: Setup proper values for tic4x
+ testcase
+
+2002-11-14 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (process_program_headers): Add comment about return
+ value. Ensure that 0 is returned if the headers are not loaded.
+ (process_file): If process_section_headers failed to load the
+ headers disable any tests that rely upon them. Similarly for
+ process_program_headers.
+
+2002-11-12 Nick Clifton <nickc@redhat.com>
+
+ * po/da.po: Updated Danish translation.
+
+2002-11-12 Klee Dienes <kdienes@apple.com>
+
+ * rddbg.c (read_section_stabs_debugging_info): Also recognize
+ LC_SYMTAB.stab/LC_SYMTAB.stabstr as a valid pair of sections.
+
+2002-11-11 Christopher Faylor <cgf@redhat.com>
+
+ * MAINTAINERS: Reinstate DJ Delorie as COFF maintainer. Drop COFF from
+ cgf maintainership.
+
+2002-11-11 Christopher Faylor <cgf@redhat.com>
+
+ * MAINTAINERS: Replace DJ Delorie as PE/COFF maintainer.
+
+2002-11-07 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add 'da'.
+ * configure: Regenerate.
+ * po/da.po: New Danish translation.
+
+ * readelf.c (get_symbol_index_type): Revert part of previous
+ patch: Display unknown symbol types in decimal, not hex.
+
+2002-11-07 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * dlltool.c (add_excludes): Don't prefix excluded fastcall
+ symbols with underscore.
+ (xlate): Ignore add_underscore for decorated fastcall symbols.
+
+2002-11-07 Eric Kohl <ekohl@rz-online.de>
+
+ * deflex.l: Accept '@' as first character of an ID.
+ * dlltool.c (gen_exp_file): Use existing '@' prefix rather than
+ ASM_PREFIX for fastcall symbols.
+ (scan_drectve_symbols): Handle fastcall symbols when generating
+ undecorated aliases for symbols in drectve section.
+ (scan_filtered_symbols): Likewise, with export-all.
+ (xlate): Likewise, with --kill-at.
+ (make_imp_label): New function to handle fastcall symbols
+ correctly.
+ (make_one_lib_file): Use make_imp_label instead of make_label
+ for imp symbols.
+
+2002-11-06 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * MAINTAINERS: Add self as TIC4X maintainer.
+
+2002-11-06 Hiroyuki Machida <machida@sm.sony.co.jp>
+
+ * readelf.c (get_symbol_index_type): Add hex number to
+ PROCESSOR-specific, OS-specific, reserved and unknown symbol
+ types.
+
+2002-11-04 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (byte_get_little_endian): Comment typo fix.
+ (print_symbol): Constify "symbol" arg. Don't pass "symbol" to printf
+ as the format string.
+ (dump_relocations): Correct section sym names.
+ (process_section_headers): Clear symtab_shndx_hdr.
+ (read_and_display_attr_value): Don't pass indirect string to printf
+ as the format string.
+ (display_debug_frames): Indicate when zero terminator found. Decode
+ DW_EH_PE_pcrel addresses.
+
+2002-10-23 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * configure.in: Define SKIP_ZEROES as 32 for tic4x target in
+ order to ensure proper disassembly of the valid 0-value opcode.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2002-10-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * MAINTAINERS: Add self as SH maintainer.
+
+2002-10-23 Ben Elliston <bje@redhat.com>
+
+ * doc/binutils.texi (objdump): Document -z and move the entry for
+ --disassemble-zeroes to the end of the options section (for `z').
+
+2002-10-21 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Discontinue Hans-Peter Nilsson as SH maintainer.
+
+2002-10-21 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * objdump.c (dump_data): Correct addr_offset for opb != 1.
+
+2002-10-15 Alan Modra <amodra@bigpond.net.au>
+
+ * bucomm.c (list_supported_targets): Use bfd_target_list.
+
+ * objcopy.c (copy_file): Report ambiguous bfd_object matches, and
+ other object errors in preference to bfd_core errors.
+
+2002-10-14 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * objdump.c: #include "bfdver.h".
+ * version.c: Likewise.
+ * Makefile.in: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2002-10-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * readelf.c (display_debug_info): Ignore empty .rela.debug_info
+ sections. Allow relocations against the absolute symbol. Don't
+ use the value in compunit.cu_abbrev_offset if we found a RELA
+ relocation.
+
+2002-10-07 Gordon Chaffee <chaffee@netvmg.com>
+
+ * addr2line.c (slurp_symtab): Read in dynamic symbols if no
+ ordinary ones are available.
+
+2002-09-30 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_machine_flags): Handle E_MIPS_MACH_4120,
+ E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
+
+2002-09-17 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.am (CFILES): Add cxxfilt.c.
+ (cxxfilt_SOURCES): Now just cxxfilt.c $(BULIBS).
+ (cxxfilt_LDADD): Delete.
+ Remove all references to underscore.c.
+ Regen dependencies.
+ * configure.in: Define TARGET_PREPENDS_UNDERSCORE in
+ config.h from $UNDERSCORE, rather than AC_SUBSTing it.
+ * binutils/cxxfilt.c: Moved here from gcc/cp, minor
+ adjustments to fit into binutils framework.
+ * configure, config.in, Makefile.in, doc/Makefile.in: Regenerate.
+
+2002-09-12 Roland McGrath <roland@redhat.com>
+
+ * readelf.c (decode_location_expression): DW_OP_calli -> DW_OP_call_ref
+ Handle DW_OP_GNU_push_tls_address.
+
+2002-09-11 Nick Clifton <nickc@redhat.com>
+
+ * po/tr.po: Updated Turkish translation.
+
+2002-09-10 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Ben Elliston as a maintainer for configure and
+ testsuite changes. Add paragraphs about testsuite and config
+ patches.
+
+2002-08-29 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_machine_flags): Remove redundant reference to
+ E_V850EA_ARCH.
+
+2002-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * objdump.c (dump_bfd): Restore lines accidentally deleted in
+ last commit.
+
+2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * objdump.c (dump_headers): Add printing of HAS_LOAD_PAGE flag.
+ (dump_bfd_header): Likewise.
+
+2002-08-27 Alan Modra <amodra@bigpond.net.au>
+
+ * nm.c: Revert last change.
+
+2002-08-26 Alan Modra <amodra@bigpond.net.au>
+
+ * nm.c (display_rel_file): Don't report "no symbols" as an error.
+ * objdump.c (slurp_symtab): Likewise.
+ (slurp_dynamic_symtab): Likewise.
+ (dump_symbols): Likewise. Do print "no symbols" to stdout.
+
+2002-08-24 Geoffrey Keating <geoffk@redhat.com>
+
+ * MAINTAINERS: Change my mailing address.
+
+2002-08-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * MAINTAINERS: Add Dave Anglin as HPPA co-maintainer.
+
+2002-08-22 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Jeff Law as (maintainance) maintainer for
+ HPPA.
+
+2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * readelf.c (parse_args): Change debug_dump_opt to static.
+
+2002-08-16 Sivaguru Sankaridurg <siva@eternal-systems.com>
+
+ * stabs.c (parse_stab_argtype): Pass length of physname to
+ stab_demangle_argtypes.
+ (stab_demangle_argtypes): Add new parameter - length of physname.
+ Pass length of physname on to stab_demangle_prefix.
+ (stab_demangle_prefix): Add new parameter - length of physname.
+ Use length of physname (if supplied) to compute end of function
+ name.
+
+2002-08-15 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c: Include elf/i370.h.
+ (dump_relocations): Handle EM_S370.
+ (dynamic_segment_parisc_val): Print \n.
+ (process_dynamic_segment <DT_BIND_NOW>): Here too.
+
+2002-08-14 Nick Clifton <nickc@redhat.com>
+
+ * nm.c (usage): Change 'gnu-new-abi' to 'gnu-v3'.
+ * objdump.c (usage): Likewise.
+ * doc/binutils.texi: Likewise.
+
+2002-08-14 Luke Dunstan <infidel@users.sourceforge.net>
+
+ * rcparse.y (acc_entry): Don't warn about ALT use with
+ non-VIRTKEY.
+
+2002-08-13 H.J. Lu <hjl@gnu.org>
+
+ * objcopy.c (copy_object): Don't warn about the unsupported
+ architecture unless the input target is defaulted or the
+ output architecture is different from the input.
+
+2002-08-09 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2002-08-05 Alan Modra <amodra@bigpond.net.au>
+
+ * prdbg.c (pr_fix_visibility): Remove assert.
+
+2002-07-31 Nick Clifton <nickc@redhat.com>
+
+ * addr2line.c (process_file): Rename parameter 'filename' to
+ 'file_name' in order to avoid shadowing global symbol of the
+ same name.
+ (main): Likewise.
+
+2002-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (OPTION_DEBUG_DUMP): Define.
+ (options): Use it.
+ (usage): Update help.
+ (parse_args): Handle --debug-dump separately from -w.
+ * doc/binutils.texi (readelf): Update documentation.
+
+2002-07-25 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+ * po/fr.po: Updated French translation.
+
+2002-07-24 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2002-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2002-07-23 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
+2002-07-23 Eric S. Raymond <esr@golux.thyrsus.com>
+
+ * doc/binutils.texi (addr2line <man synopsis>): Correct brackets.
+
+2002-07-20 Alan Modra <amodra@bigpond.net.au>
+
+ * budemang.c: Include config.h and string.h/strings.h.
+
+2002-07-18 Denis Chertykov <denisc@overta.ru>
+ Frank Ch. Eigler <fche@redhat.com>
+
+ * readelf.c: Include "elf/ip2k.h".
+ (guess_is_rela): Add support for EM_IP2K and EM_IP2K_OLD.
+ (dump_relocations): Likewise.
+ (get_machine_name): Likewise.
+ * NEWS: Mention IP2K support.
+
+2002-07-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * NEWS: Add 'Changes in 2.13'.
+
+2002-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_dynamic_type): Handle DT_GNU_PRELINKED,
+ DT_GNU_CONFLICT* and DT_GNU_LIBLISZ*.
+ (get_section_type_name): Handle SHT_GNU_LIBLIST.
+ (process_dynamic_segment): Handle DT_GNU_CONFLICTSZ,
+ DT_GNU_LIBLISTSZ and DT_GNU_PRELINKED.
+ (process_gnu_liblist): New.
+ (process_file): Call it.
+
+2002-07-03 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
+ * Makefile.in: Regenerate.
+
+2002-07-02 Alan Modra <amodra@bigpond.net.au>
+
+ * budemang.c: New file, "demangle" function.
+ * budemang.h: New file.
+ * addr2line.c (translate_addresses): Use "demangle".
+ * nm.c (print_symname): Likewise.
+ * objdump.c (objdump_print_symname): Likewise.
+ (dump_symbols): Likewise. Also, don't use bfd_asymbol_name macro
+ here since that obfuscates.
+ * rdcoff.c: Don't #include demangle.h.
+ * Makefile.am (CFILES): Add budemang.c, emul_aix.c,
+ emul_vanilla.c. Remove emul_$(EMULATION).c. Sort.
+ (HFILES): Add budemang.h. Sort.
+ (nm_new_SOURCES, objdump_SOURCES, addr2line_SOURCES): Add budemang.c.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2002-07-01 Matt Thomas <matt@3am-software.com>
+
+ * readelf.c: Include "elf/vax.h".
+ (guess_is_rela): Move EM_VAX from unknown to RELA case.
+ (dump_relocations): Handle VAX relocations.
+ (get_machine_flags): Handle VAX machine flags.
+
+2002-06-29 Stephane Carrez <stcarrez@nerim.fr>
+
+ * readelf.c (dump_relocations): Handle 68HC11/68HC12 relocations.
+
+2002-06-26 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Remove Tom Rix from d10v and pcc maintainerships.
+
+2002-06-26 Alan Modra <amodra@bigpond.net.au>
+
+ * nm.c (print_symname): When demangling, strip leading dots from
+ symbol names to avoid confusing the demangler.
+
+2002-06-25 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
+ * Makefile.in: Regenerated.
+
+2002-06-21 Igor Schein <igor@txc.com>
+
+ * configure.in: Quote bu_cv_have_fopen64.
+ * configure: Regenerate.
+
+2002-06-21 Mitsru Chinen <chinen@jp.ibm.com>
+
+ * configure.in: Check for strcoll.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * nm.c (main): Set locale for LC_COLLATE category.
+ (non_numeric_forward): Use strcoll if available.
+
+2002-06-20 Dave Brolley <brolley@redhat.com>
+
+ * MAINTAINERS: Add self as fr30 and frv maintainer.
+
+2002-06-18 H.J. Lu (hjl@gnu.org)
+
+ * nm.c: Include "elf/common.h".
+ (extended_symbol_info): Add elfinfo, a pointer to
+ elf_symbol_type.
+ (SYM_SIZE): Use elfinfo if it is not NULL.
+ (get_symbol_type): New function.
+ (display_archive): Set print_width for each archive member.
+ (display_file): Likewise.
+ (display_rel_file): Don't set print_width here.
+ (print_object_filename_sysv): Handle print_width.
+ (print_archive_member_sysv): Likewise.
+ (print_symbols): Pass (bfd_vma) 0 to print_symbol.
+ (print_symbol): Set the elfinfo field in extended_symbol_info
+ for ELF.
+ (print_object_filename_sysv): Fix the output format.
+ (print_symbol_info_sysv): Print type and section for ELF.
+
+2002-06-18 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * nm.c (print_size_symbols): Remove assignment, which makes
+ the symbol's size equal to its value when --size-sort is
+ used.
+
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ From Catherine Moore:
+ * readelf.c (elf/frv.h): #include it.
+ (guess_is_rela): Support EM_CYGNUS_FRV.
+ (dump_relocations): Ditto.
+ (get_machine_name): Ditto.
+ * Makefile.am (readelf.o): add dependency on $(INCDIR)/elf/frv.h.
+
+2002-06-18 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_file_header): Only read the first section header if
+ e_shoff is non-zero.
+
+2002-06-15 H.J. Lu (hjl@gnu.org)
+
+ * nm.c (print_size): New variable. Initialize to 0.
+ (long_options): Add 'S'/"print-size".
+ (main): Handle 'S'.
+ (print_symbol_info_bsd): Print size only if print_size is not
+ 0.
+
+ * doc/binutils.texi: Document -S/--print-size.
+
+2002-6-13 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * nm.c (struct extended_symbol_info): New structure: Add the size
+ of the symbols to the information provided by the symbol_info
+ structure.
+ (print_symbols): Pass the symbol size to print_symbol.
+ (print_size_symbols): Pass the symbol size to print_symbol.
+ (print_symbol): Extra argument: The size of the symbol. Store
+ this in the extended_symbol_info structure.
+ (print_symbol_info): Change type of info parameter to
+ extended_symbol_info. Display the size, if known.
+ (print_symbol_info_posix): Likewise.
+ (print_symbol_info_sysv): Likewise.
+
+2002-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regnerate.
+
+ * bucomm.c: Replace CONST with const.
+ * nm.c: Likewise.
+ * objdump.c: Likewise.
+
+2002-06-07 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (DW_CFA_GNU_args_size): Don't define.
+ (DW_CFA_GNU_negative_offset_extended): Likewise.
+ (DW_CFA_GNU_window_save): Likewise.
+ (display_debug_frames): Handle DW_CFA_offset_extended_sf,
+ DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf.
+
+2002-06-07 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * nm.c: When computing size of symbols for an ELF target use the
+ internal size field.
+
+2002-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * testsuite/binutils-all/objcopy.exp: clear xfail for
+ "hppa*64*-*-hpux*".
+ * testsuite/binutils-all/hppa/objdump.exp: Return if
+ "*64*-*-*".
+
+2002-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (copy_section): Don't copy SEC_GROUP sections.
+
+2002-06-03 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * objdump.c: Fix formatting.
+
+2002-05-29 Ben Elliston <bje@redhat.com>
+
+ * MAINTAINERS: Add self as M68k maintainer.
+
+2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
+
+ * readelf.c: Modified/Added DLX elf support.
+
+2002-05-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * arsup.c: Fix formatting.
+ * debug.c (debug_record_label): Add missing colon to error
+ message.
+ * ieee.c (parse_ieee_ty): Fix spelling typo.
+ * readelf.c (process_program_headers): Remove English assumption
+ about making a plural word.
+ (process_section_headers): Likewise.
+ (process_relocs): Allow quotes to be translated.
+ (process_unwind): Likewise,
+ (process_mips_specific): Improve error message.
+ (get_note_type): Fix spelling typo.
+
+ * configure.in (ALL_LINGUAS): Add sv
+ * po/sv.po: New file.
+
+2002-05-27 Alan Modra <amodra@bigpond.net.au>
+
+ * unwind-ia64.c (unw_print_brmask): Don't use sprintf.
+ (unw_print_grmask): Likewise.
+ (unw_print_frmask): Likewise.
+
+2002-05-26 Kazu Hirata <kazu@cs.umass.edu>
+
+ * arsup.c: Remove ARGSUSED.
+ * debug.c: Likewise.
+ * ieee.c: Likewise.
+ * nlmconv.c: Likewise.
+ * prdbg.c: Likewise.
+ * stabs.c: Likewise.
+ * wrstabs.c: Likewise.
+
+2002-05-25 Alan Modra <amodra@bigpond.net.au>
+
+ * arlex.l: Use #include "" instead of <> for local header files.
+ * coffdump.c: Likewise.
+ * coffgrok.c: Likewise.
+ * nlmconv.c: Likewise.
+ * nlmheader.y: Likewise.
+ * srconv.c: Likewise.
+ * strings.c: Likewise.
+ * sysdump.c: Likewise.
+ * unwind-ia64.h: Likewise.
+ * windres.h: Likewise.
+ * winduni.h: Likewise.
+
+2002-05-24 Tom Rix <trix@redhat.com>
+
+ * MAINTAINERS: Add self as the d10v maintainer.
+
+2002-05-24 TAMURA Kent <kent@netbsd.org>
+
+ * configure.in: Builds dlltool for i386-netbsdpe.
+ * configure: Regenerate.
+
+2002-05-23 Kazu Hirata <kazu@cs.umass.edu>
+
+ * size.c: Fix formatting.
+ * srconv.c: Likewise.
+ * stabs.c: Likewise.
+ * sysdump.c: Likewise.
+ * unwind-ia64.c: Likewise.
+ * wrstabs.c: Likewise.
+
+2002-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_segment_type): Add PT_TLS.
+ (get_elf_section_flags): Add SHF_TLS.
+ (get_dynamic_flags): Optimize. Add DF_STATIC_TLS.
+ (process_dynamic_segment): Use puts instead of printf.
+ (get_symbol_type): Support STT_TLS.
+ * objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT,
+ SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS.
+ Add SEC_THREAD_LOCAL.
+
+2002-05-23 Kazu Hirata <kazu@cs.umass.edu>
+
+ * rdcoff.c: Fix formatting.
+ * rddbg.c: Likewise.
+ * readelf.c: Likewise.
+ * rename.c: Likewise.
+ * resbin.c: Likewise.
+ * resrc.c: Likewise.
+ * resres.c: Likewise.
+
+2002-05-21 Kazu Hirata <kazu@cs.umass.edu>
+
+ * filemode.c: Fix formatting.
+ * ieee.c: Likewise.
+ * is-ranlib.c: Likewise.
+ * is-strip.c: Likewise.
+ * maybe-ranlib.c: Likewise.
+ * maybe-strip.c: Likewise.
+ * nlmconv.c: Likewise.
+ * nm.c: Likewise.
+ * not-ranlib.c: Likewise.
+ * not-strip.c: Likewise.
+ * objcopy.c: Likewise.
+ * objdump.c: Likewise.
+
+2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * objdump.c (dump_headers): Fix output formatting for ELF32
+ architectures in a BFD64 enabled toolchain.
+
+2002-05-20 Kazu Hirata <kazu@cs.umass.edu>
+
+ * debug.c: Fix formatting.
+ * debug.h: Likewise.
+ * dlltool.c: Likewise.
+ * dllwrap.c: Likewise.
+ * emul_aix.c: Likewise.
+ * emul_vanilla.c: Likewise.
+
+2002-05-19 Kazu Hirata <kazu@cs.umass.edu>
+
+ * addr2line.c: Fix formatting.
+ * ar.c: Likewise.
+ * arsup.c: Likewise.
+ * arsup.h: Likewise.
+ * binemul.c: Likewise.
+ * binemul.h: Likewise.
+ * bucomm.c: Likewise.
+ * coffdump.c: Likewise.
+ * coffgrok.c: Likewise.
+ * coffgrok.h: Likewise.
+
+2002-05-16 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * MAINTAINERS: Add myself as the second AVR port maintainer.
+
+2002-05-16 Stephane Carrez <stcarrez@nerim.fr>
+
+ * MAINTAINERS: Update my email address.
+
+2002-05-09 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Add Jason Thorpe as VAX maintainer.
+
+2002-05-09 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in: Replace `*pe' with `pe' throughout.
+ * configure: Regenerate.
+
+2002-05-07 Federico G. Schwindt <fgsch@olimpo.com.br>
+
+ * Makefile.am: Honour DESTDIR.
+ * Makefile.in: Regenerate.
+
+2002-05-06 Alan Modra <amodra@bigpond.net.au>
+
+ * dlltool.c (process_def_file): Add missing prototype.
+ (new_directive, assemble_file, main): Likewise.
+ (process_def_file, new_directive): Make static.
+ (inform): Rewrite using VA_FIXEDARG.
+ * dllwrap.c (mybasename): Add missing prototype.
+ (strhash, main): Likewise.
+ (inform): Rewrite using VA_FIXEDARG.
+ (warn): Likewise.
+ (cleanup_and_exit): Use old style function definition.
+ (strhash): Likewise.
+ * windres.c (define_resource): Use one memset to clear all of
+ struct res_resource.
+
+ * rcparse.y: Remove newcmd rule. Move rcparse_discard_strings
+ call to rules that need no lookahead. Check for no lookahead.
+
+2002-05-06 Borut Razem <borut.razem@siol.net>
+
+ * rclex.l (get_string): Correct "strings" list handling.
+ * resrc.c (read_rc_file): Discard strings.
+
+2002-05-04 Alan Modra <amodra@bigpond.net.au>
+
+ * ar.c (replace_members): Remove unused var. Formatting fix.
+ * binemul.c (ar_emul_default_parse_arg): Add ATTRIBUTE_UNUSED.
+
+ * MAINTAINERS: Sort port maintainers by CPU.
+
+2002-05-04 Bob Byrnes <byrnes@curl.com>
+
+ * size.c (display_archive): Add last_arfile and code to close archives.
+
+2002-05-01 Alan Modra <amodra@bigpond.net.au>
+
+ * nm.c (print_symbol): Check returned filename from
+ bfd_find_nearest_line is non-NULL.
+
+2002-04-25 Elena Zannoni <ezannoni@redhat.com>
+
+ * readelf.c (get_AT_name): Handle DW_AT_GNU_vector.
+
+2002-04-24 Christian Groessler <chris@groessler.org>
+
+ * MAINTAINERS: Changed my email address.
+
+2002-04-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * arparse.y: Fix syntax warning.
+
+2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (fetch_location_list): Remove unused function.
+
+ * readelf.c (process_corefile_note_segment): Catch corrupt notes
+ and display a warning message, then exit the loop.
+
+ * rcparse.y: Set MEMFLAG_DISCARDABLE by default.
+
+2002-04-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * resrc.c (write_rc_dialog): If charset is non-default value
+ display all of the DIALOGEX parameters.
+
+2002-04-15 Eric Kohl <ekohl@rz-online.de>
+
+ * rcparse.y: Allow two to five parameter in FONT statement of
+ DIALOGEX resources.
+ * resbin.c (bin_to_res_dialog): Fixed read/write code for dialogex
+ resource data.
+ (res_to_bin_dialog): Likewise.
+ * windres.h: Added misssing charset variable to dialog_ex
+ structure.
+
+2002-04-10 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * rcparse.y: Set MEMFLAG_PURE by default.
+
+2002-04-09 Bernd Herd <info@herdsoft.com>
+
+ * rcparse.y: CLASS definitions in DIALOG resources
+ are quoted.
+ Fix typo in BEDIT warning.
+ Don't add default dialog style when explicit style specified.
+ Add WS_CAPTION dialog style if CAPTION is specified.
+
+ * rclex.l (handle_quotes): "\xhex" encoding in strings corrected.
+ (handle_quotes) "\a" escape (used for right justified key
+ definitions in menus) is encodes as binary 8.
+
+ * resrc.c (write_rc_dialog): Print style even if it is 0.
+ (write_rc_directory): Fix overlooked sublang shift bug.
+ (bin_to_res_dialog): Don't print empty dialog caption.
+
+ * resbin.c (bin_to_res_dialog): Use signature to identify
+ DIALOGEX.
+
+ * windres.c (main): Set default LANGUAGE to english/us.
+
+2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk>
+
+ * resrc.c: print CLASS names in quotes
+
+2002-04-09 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * MAINTAINERS: Update my email address.
+
+2002-04-04 Alan Modra <amodra@bigpond.net.au>
+
+ * dep-in.sed: Cope with absolute paths.
+ * Makefile.am (dep.sed): Subst TOPDIR.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2002-03-27 Peter Targett <peter.targett@arc.com>
+
+ * MAINTAINERS: Update my email address.
+
+2002-03-21 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2002-03-20 Daniel Berlin <dan@dberlin.org>
+
+ * readelf.c: Add support for displaying dwarf2 location lists.
+ (do_debug_loc, debug_loc_section, debug_loc_size): New.
+ (parse_args): Use 'O' as shorthand for displaying location list
+ section.
+ (process_section_headers): Handle debug_loc as well.
+ (load_debug_loc): New.
+ (free_debug_loc): New.
+ (fetch_location_list): New.
+ (display_debug_loc): New.
+ (display_debug_info): Call load_debug_loc and free_debug_loc.
+ (debug_displays): We can display .debug_loc now, too.
+ (usage): Update usage string.
+ (read_and_display_attr_value): Note location lists, but don't
+ display them inline.
+
+2002-03-18 Tom Rix <trix@redhat.com>
+
+ * Makefile.am: Add binutils emulation support.
+ * configure.in: Same.
+ * configure.tgt: New file. Same.
+ * ar.c (main): Use ar_emul_parse_arg.
+ (usage): Use ar_emul_usage.
+ (replace_members): Use ar_emul_replace, ar_emul_append.
+ * binemul.c: New file. Define the binutils emulation
+ layer. Define default methods.
+ * binemul.h: New file. Binutils emulation layer header file.
+ * emul_aix.c: New file. AIX binutils emulation.
+ * emul_vanilla.c: New file. Default binutils emulation.
+ * Makefile.in: Regenerate.
+ * configure: Same.
+
+2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/fr.po: Updated version.
+
+2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/fr.po: Updated version.
+
+2002-03-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * README: Update some version numbers.
+
+2002-03-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * doc/binutils.texi (Target Selection): Fix LD crossreferences.
+ (Architecture Selection): Likewise.
+
+2002-03-01 Dmitry Timoshkov <dmitry@baikal.ru>
+
+ * dlltool.c (gen_exp_file): Take into account --kill-at (-k) while
+ generating .exp file.
+
+2002-02-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (dump_relocations): Fix typo.
+
+2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * NEWS: Mark 2.12 branch.
+
+2002-02-18 Timothy Daly <remote_bob@yahoo.com>
+
+ * readelf.c (dump_relocations): Display 2nd and 3rd reloc
+ types for 64-bit MIPS. Narrow some fields for 80-char
+ output.
+ (dump_relocations): Change spelling from 'unrecognised'
+ to 'unrecognized'.
+ (decode_ARM_machine_flags): Likewise.
+ (parse_args): Likewise.
+ (read_and_display_attr_value): Likewise.
+ (display_debug_section): Likewise.
+
+2002-02-15 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * NEWS: Mention support for MMIX.
+
+2002-02-13 Matt Fredette <fredette@netbsd.org>
+
+ * readelf.c (get_machine_flags): Recognize EF_M68000.
+
+2002-02-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * MAINTAINERS: Added self as MN10300 co-maintainer.
+
+2002-02-12 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (get_ppc64_dynamic_type): Handle DT_PPC64_OPD and
+ DT_PPC64_OPDSZ.
+
+2002-02-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * MAINTAINERS: List myself as branch maintainer.
+
+2002-02-11 Alan Modra <amodra@bigpond.net.au>
+
+ * configure: Regenerate.
+ * objcopy.c: Update copyright date.
+ * doc/Makefile.in: Regenerate.
+
+2002-02-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * nlmconv.c: Back out localtime PARAMS change.
+
+2002-02-11 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (MKDIR): Define.
+ (copy_archive): Make name_list.name const. Use MKDIR.
+ Handle duplicate files in archives by making more temp dirs.
+
+2002-02-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * coffdump.c: Include "getopt.h" after "bucomm.h"
+ so that macros are defined correctly.
+ * nlmconv.c: Add PARAMS ((const time_t *)) to localtime
+ prototype. Prototype main.
+ * nlmheader.y: Add PARAMS ((int)) to strerror prototype.
+
+2002-02-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * MAINTAINERS: Added self as SH co-maintainer.
+
+2002-02-05 Nick Clifton <nickc@redhat.com>
+
+ * po/tr.po: Updated translation.
+
+2002-02-01 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+
+2002-01-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * nm.c (print_value): Mark abfd unused.
+
+2002-01-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * unwind-ia64.c (unw_decoder): Change second argument
+ to unsigned int, to match function prototypes.
+
+2002-01-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * objdump.c: Include "getopt.h" after "bucomm.h" so that
+ __GNU_LIBRARY__ will be defined.
+ * size.c: Likewise.
+
+2002-01-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure: Regenerated.
+
+2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * doc/Makefile.am (install): Depend on install-info.
+ * doc/Makefile.in: Regenerate.
+
+2002-01-25 Jason R. Thorpe <thorpej@wasabisystems.com>
+
+ * objcopy.c (strip_usage): Document -d as an alias
+ --strip-debug.
+
+ * size.c (usage): Document [-t | --totals] options.
+ (long_options): Add --totals option.
+ (main): If the [-t | --totals] option is specified and
+ the output format is Berkeley-style, print the total
+ text, data, and bss sizes of all objects listed.
+ (print_berkeley_format): If the [-t | --totals] option
+ is specified, track the total text, data, and bss
+ sizes.
+ * doc/binutils.texi (size): Document [-t | --totals] options.
+ (strip): Document -d as an alias for --strip-debug.
+ * NEWS: Mention new feature of size.
+
+2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/fr.po: Updated version.
+ * po/es.po: Updated version.
+
+2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * addr2line.c (usage): Update text to provide verbose
+ description of the command line options.
+ * ar.c (usage): Update text to provide verbose
+ description of the command line options.
+ (main): Accept -h and -H when running as ranlib.
+ * coffdump.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * dlltool.c (main): Accept -H as an alias for --help.
+ * nlmconv.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * nm.c (usage): Replace OPTIONS with option(s).
+ (main): Accept -H as an alias for --help.
+ * objcopy.c (strip_main): Accept -H as an alias for --help.
+ * objdump.c (main): Accept -v as an alias for --verbose.
+ * readelf.c (usage): Adjust format to match style used in
+ other binutils.
+ * size.c (usage): Update text to provide verbose description
+ of the command line options.
+ (main): Accept -v, -h and -H as command line options.
+ * srconv.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * strings.c (main): Accept -H and -v as command line options.
+ (usage): Update text to provide verbose description of the
+ command line options.
+ * sysdump.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * windres.c (usage): Adjust format to match style used in
+ other binutils.
+
+ * coffdump.c: Fix formatting.
+ * nlmconv.c: Fix formatting.
+ * srconv.c: Fix formatting.
+ * sysdump.c: Fix formatting.
+
+2002-01-22 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2002-01-18 Andreas Jaeger <aj@suse.de>
+
+ * version.c (print_version): Update year.
+
+2002-01-17 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (get_machine_name): Handle EM_PPC64.
+ (guess_is_rela): Here too.
+
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/binutils.pot: Regenerate.
+ * po/fr.po: Regenerate.
+ * po/tr.po: Regenerate.
+
+2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/tr.po: Import new version.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (get_ppc64_dynamic_type): New.
+ (get_dynamic_type): Call it.
+
+2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * objcopy.c (copy_usage): Use "options" instead of "switches".
+ (strip_usage): Use "options" instead of "switches".
+ * doc/binutils.texi (dlltool): Refer to "options" instead of
+ "switches".
+
+2002-01-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * MAINTAINERS: Add self as co-maintainer for the ARM code.
+
+2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/es.po: Import from translation project.
+ * configure.in (ALL_LINGUAS): Add es.
+ * configure: Regenerate.
+
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * readelf.c (get_netbsd_elfcore_note_type): Use
+ NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
+
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * readelf.c: Update copyright years.
+ (get_note_type): Return a const char *.
+ (get_netbsd_elfcore_note_type): New function.
+ (process_note): Use get_netbsd_elfcore_note_type to get
+ the note type string for NetBSD ELF core files.
+
+2002-01-06 Steve Ellcey <sje@cup.hp.com>
+
+ * readelf.c (get_ia64_segment_type): Add support for macros.
+ (get_segment_type): Add support for IA64 specific macros.
+
+For older changes see ChangeLog-0001
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/binutils/ChangeLog-9197 b/contrib/binutils/binutils/ChangeLog-9197
index 1ed5416..9861315 100644
--- a/contrib/binutils/binutils/ChangeLog-9197
+++ b/contrib/binutils/binutils/ChangeLog-9197
@@ -2394,7 +2394,7 @@ Thu Jul 13 10:43:59 1995 Ian Lance Taylor <ian@cygnus.com>
* nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t.
* objcopy.c (copy_object): Likewise.
- * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT.
+ * nm.c (HAVE_SBRK): Define except on amigados and WINDOWS_NT.
(struct size_sym): Define.
(show_stats): New static variable.
(long_options): Add undocumented option "stats".
@@ -5200,7 +5200,7 @@ Thu May 16 16:06:55 1991 Steve Chamberlain (steve at cygint.cygnus.com)
consistent with gdb and as: Add 0x when printing hex.
Don't print extra leading zeros.
Attempt to not print "filename.o".
- * objdump.c: Add some enum-to-int casts to accomodate old compilers.
+ * objdump.c: Add some enum-to-int casts to accommodate old compilers.
Fri May 3 22:21:44 1991 John Gilmore (gnu at cygint.cygnus.com)
diff --git a/contrib/binutils/binutils/ChangeLog-9899 b/contrib/binutils/binutils/ChangeLog-9899
index 22f21e2..ad1fdc7 100644
--- a/contrib/binutils/binutils/ChangeLog-9899
+++ b/contrib/binutils/binutils/ChangeLog-9899
@@ -552,7 +552,7 @@ Mon Jun 7 12:14:57 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1999-06-04 Nick Clifton <nickc@cygnus.com>
- * readelf.c: Use 64bit wide fields in internal strcutures even if
+ * readelf.c: Use 64bit wide fields in internal structures even if
targetting a 32bit architecture.
(dump_relocations): Take a new parameter - the number of symbols
in the symbol table.
diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS
index 4ca6ae8..28c9144 100644
--- a/contrib/binutils/binutils/MAINTAINERS
+++ b/contrib/binutils/binutils/MAINTAINERS
@@ -14,14 +14,18 @@ The home page for binutils is:
and patches should be sent to:
- bug-binutils@gnu.org
+ bug-binutils@gnu.org or binutils@sources.redhat.com
with "[Patch]" as part of the subject line. Note - patches to the
-top level configure.in and config.sub scripts should be sent to:
+top level config.guess and config.sub scripts should be sent to:
config-patches@gnu.org
-and not to the binutils list.
+and not to the binutils lists. Patches to the other top level
+configure files (configure, configure.in, config-if, config-ml.in)
+should be sent to the binutils lists, and copied to the gcc and gdb
+lists as well (gcc-patches@gcc.gnu.org and
+gdb-patches@sources.redhat.com).
--------- Blanket Write Privs ---------
@@ -30,12 +34,12 @@ repository without obtaining approval first:
Nick Clifton <nickc@redhat.com> (head maintainer)
Richard Henderson <rth@redhat.com>
- Ian Taylor <ian@zembu.com>
+ Ian Taylor <ian@wasabisystems.com>
Jeff Law <law@redhat.com>
- Jim Wilson <wilson@redhat.com>
+ Jim Wilson <wilson@specifixinc.com>
DJ Delorie <dj@redhat.com>
Alan Modra <amodra@bigpond.net.au>
- Michael Meissner <meissner@redhat.com>
+ Michael Meissner <gnu@the-meissners.org>
--------- Maintainers ---------
@@ -50,39 +54,49 @@ maintainers for a given domain then responsibility falls to the first
maintainer. The first maintainer is free to devolve that
responsibility among the other maintainers.
- ARC Peter Targett <peter.targett@arc.com>
+ ALPHA Richard Henderson <rth@redhat.com>
ARM Nick Clifton <nickc@redhat.com>
ARM Richard Earnshaw <rearnsha@arm.com>
AVR Denis Chertykov <denisc@overta.ru>
AVR Marek Michalkiewicz <marekm@amelek.gda.pl>
+ BUILD SYSTEM Ben Elliston <bje@gnu.org>
+ BUILD SYSTEM Daniel Jacobowitz <dan@debian.org>
CRIS Hans-Peter Nilsson <hp@axis.com>
DWARF2 Jason Merrill <jason@redhat.com>
FR30 Dave Brolley <brolley@redhat.com>
FRV Dave Brolley <brolley@redhat.com>
+ HPPA Dave Anglin <dave.anglin@nrc.ca>
HPPA elf32 Alan Modra <amodra@bigpond.net.au>
- IA64 Jim Wilson <wilson@redhat.com>
- i860 Jason Eckhardt <jle@redhat.com>
+ HPPA elf64 Jeff Law <law@redhat.com> [Basic maintainance only]
+ IA-64 Jim Wilson <wilson@specifixinc.com>
+ IQ2000 Stan Cox <scox@redhat.com>
+ i860 Jason Eckhardt <jle@rice.edu>
ix86 Alan Modra <amodra@bigpond.net.au>
- ix86 COFF,PE DJ Delorie <dj@redhat.com>
+ ix86 PE Christopher Faylor <cgf@redhat.com>
+ ix86 COFF DJ Delorie <dj@redhat.com>
ix86 H.J.Lu <hjl@gnu.org>
ix86 INTEL MODE Diego Novillo <dnovillo@redhat.com>
M68HC11 M68HC12 Stephane Carrez <stcarrez@nerim.fr>
- M68k Ben Elliston <bje@redhat.com>
- M88k Ben Elliston <bje@redhat.com>
+ M68k Ben Elliston <bje@gnu.org>
MIPS Eric Christopher <echristo@redhat.com>
+ MIPS Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
MMIX Hans-Peter Nilsson <hp@bitrange.com>
MN10300 Eric Christopher <echristo@redhat.com>
MN10300 Alexandre Oliva <aoliva@redhat.com>
- PPC Geoff Keating <geoffk@redhat.com>
+ PPC Geoff Keating <geoffk@geoffk.org>
+ PPC vector ext Aldy Hernandez <aldyh@redhat.com>
s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com>
SH Jörn Rennecke <joern.rennecke@superh.com>
- SH Hans-Peter Nilsson <hp@bitrange.com>
SH Alexandre Oliva <aoliva@redhat.com>
+ SH Kaz Kojima <kkojima@rr.iij4u.or.jp>
SPARC Jakub Jelinek <jakub@redhat.com>
+ TESTSUITES Ben Elliston <bje@gnu.org>
+ TIC4X Svein Seldal <svein.seldal@solidas.com>
TIC54X Timothy Wall <twall@alum.mit.edu>
VAX Jason R Thorpe <thorpej@wasabisystems.com>
x86_64 Jan Hubicka <jh@suse.cz>
x86_64 Andreas Jaeger <aj@suse.de>
+ Xtensa Bob Wilson <bob.wilson@acm.org>
z8k Christian Groessler <chris@groessler.org>
@@ -134,3 +148,21 @@ great). If you are uncertain as to whether a patch is appropriate for
the branch, ask the branch maintainer. This is:
Daniel Jacobowitz <dan@debian.org>
+
+ -------- Testsuites ---------------
+
+In general patches to any of the binutils testsuites should be
+considered generic and sent to the binutils mailing list for
+approval. Patches to target specific tests are the responsibility the
+relevent port maintainer(s), and can be approved/checked in by them.
+Other testsuite patches need the approval of a blanket-write-priveleges
+person.
+
+ -------- Configure patches ----------
+
+Patches to the top level configure files (config.sub & config.guess)
+are not the domain of the binutils project and they cannot be approved
+by the binutils group. Instead they should be submitted to the config
+maintainer at:
+
+ config-patches@gnu.org
diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am
index 1fd97ab..324c0ea 100644
--- a/contrib/binutils/binutils/Makefile.am
+++ b/contrib/binutils/binutils/Makefile.am
@@ -87,7 +87,7 @@ GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
CFILES = \
addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \
- coffdump.c coffgrok.c debug.c dlltool.c dllwrap.c \
+ coffdump.c coffgrok.c cxxfilt.c debug.c dlltool.c dllwrap.c \
emul_aix.c emul_vanilla.c filemode.c \
ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
nlmconv.c nm.c not-ranlib.c not-strip.c \
@@ -98,7 +98,7 @@ CFILES = \
windres.c winduni.c wrstabs.c
GENERATED_CFILES = \
- underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
+ arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
defparse.c deflex.c nlmheader.c rcparse.c rclex.c
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
@@ -115,7 +115,7 @@ LIBIBERTY = ../libiberty/libiberty.a
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
po/POTFILES.in: @MAINT@ Makefile
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
EXPECT = `if [ -f $$r/../expect/expect ] ; then \
@@ -180,19 +180,7 @@ objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
objdump.o:objdump.c
$(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c
-underscore.c: stamp-under ; @true
-
-stamp-under: Makefile
- echo '/*WARNING: This file is automatically generated!*/' >underscore.t
- echo "int prepends_underscore = @UNDERSCORE@;" >>underscore.t
- $(SHELL) $(srcdir)/../move-if-change underscore.t underscore.c
- touch stamp-under
-
-cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h Makefile
- $(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
-
-cxxfilt_SOURCES =
-cxxfilt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS)
+cxxfilt_SOURCES = cxxfilt.c $(BULIBS)
ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \
emul_$(EMULATION).c $(BULIBS)
@@ -290,7 +278,7 @@ EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
diststuff: $(EXTRA_DIST) info
-DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
+DISTCLEANFILES = sysinfo sysroff.c sysroff.h \
site.exp site.bak
Makefile: $(BFDDIR)/configure.in
@@ -362,7 +350,7 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
if [ -f $$i$(EXEEXT) ]; then \
j=`echo $$i | sed -e 's/-new//'`; \
k=`echo $$j | sed '$(transform)'`; \
- if [ "$(DESTDIR)$(bindir)/$$k$(EXEEXT)" != "$(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
+ if [ "$(bindir)/$$k" != "$(tooldir)/bin/$$j" ]; then \
rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
@@ -392,9 +380,10 @@ binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
-budemang.o: budemang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/libiberty.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h
+budemang.o: budemang.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
budemang.h
coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
@@ -404,6 +393,9 @@ coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h coffgrok.h
+cxxfilt.o: cxxfilt.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h $(INCDIR)/safe-ctype.h
debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h
@@ -448,12 +440,13 @@ not-strip.o: not-strip.c
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- budbg.h $(INCDIR)/filenames.h
+ budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h budemang.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/progress.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ budemang.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
@@ -474,15 +467,18 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/fr30.h \
$(INCDIR)/elf/frv.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/hppa.h \
- $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/i960.h \
- $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/m68k.h \
- $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \
+ $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/ip2k.h \
+ $(INCDIR)/elf/m32r.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/m68hc11.h \
+ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/msp430.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/x86-64.h \
- $(INCDIR)/elf/xstormy16.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h unwind-ia64.h
+ $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
+ $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/iq2000.h \
+ $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h unwind-ia64.h
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h
@@ -525,8 +521,8 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \
sysroff.h sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
@@ -540,7 +536,6 @@ wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
-underscore.o: underscore.c
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h arsup.h
diff --git a/contrib/binutils/binutils/Makefile.in b/contrib/binutils/binutils/Makefile.in
index 9208082..46eeac8 100644
--- a/contrib/binutils/binutils/Makefile.in
+++ b/contrib/binutils/binutils/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -109,7 +109,6 @@ POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
-UNDERSCORE = @UNDERSCORE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
@@ -200,7 +199,7 @@ GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
CFILES = \
addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \
- coffdump.c coffgrok.c debug.c dlltool.c dllwrap.c \
+ coffdump.c coffgrok.c cxxfilt.c debug.c dlltool.c dllwrap.c \
emul_aix.c emul_vanilla.c filemode.c \
ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
nlmconv.c nm.c not-ranlib.c not-strip.c \
@@ -212,7 +211,7 @@ CFILES = \
GENERATED_CFILES = \
- underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
+ arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
defparse.c deflex.c nlmheader.c rcparse.c rclex.c
@@ -273,8 +272,7 @@ nm_new_SOURCES = nm.c budemang.c $(BULIBS)
objdump_SOURCES = objdump.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-cxxfilt_SOURCES =
-cxxfilt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS)
+cxxfilt_SOURCES = cxxfilt.c $(BULIBS)
ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \
emul_$(EMULATION).c $(BULIBS)
@@ -311,7 +309,7 @@ EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
-DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
+DISTCLEANFILES = sysinfo sysroff.c sysroff.h \
site.exp site.bak
@@ -424,9 +422,10 @@ version.$(OBJEXT) filemode.$(OBJEXT)
strip_new_LDADD = $(LDADD)
strip_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
strip_new_LDFLAGS =
-cxxfilt_OBJECTS =
-cxxfilt_DEPENDENCIES = cplus-dem.o underscore.o \
-../libiberty/libiberty.a
+cxxfilt_OBJECTS = cxxfilt.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+filemode.$(OBJEXT)
+cxxfilt_LDADD = $(LDADD)
+cxxfilt_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
cxxfilt_LDFLAGS =
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LEXLIB = @LEXLIB@
@@ -871,7 +870,7 @@ distclean-generic:
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "arlexldeflexlrclexlarparseharparsecdefparsehdefparsecnlmheaderhnlmheadercrcparsehrcparsec" || rm -f arlexl deflexl rclexl arparseh arparsec defparseh defparsec nlmheaderh nlmheaderc rcparseh rcparsec
+ -test -z "arlex.cdeflex.crclex.carparse.harparse.cdefparse.hdefparse.cnlmheader.hnlmheader.crcparse.hrcparse.c" || rm -f arlex.c deflex.c rclex.c arparse.h arparse.c defparse.h defparse.c nlmheader.h nlmheader.c rcparse.h rcparse.c
mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
@@ -927,7 +926,7 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
po/POTFILES.in: @MAINT@ Makefile
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
check-DEJAGNU: site.exp
@@ -952,17 +951,6 @@ installcheck:
objdump.o:objdump.c
$(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c
-underscore.c: stamp-under ; @true
-
-stamp-under: Makefile
- echo '/*WARNING: This file is automatically generated!*/' >underscore.t
- echo "int prepends_underscore = @UNDERSCORE@;" >>underscore.t
- $(SHELL) $(srcdir)/../move-if-change underscore.t underscore.c
- touch stamp-under
-
-cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h Makefile
- $(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
-
# The following is commented out for the conversion to automake.
# This rule creates a single binary that switches between ar and ranlib
# by looking at argv[0]. Use this kludge to save some disk space.
@@ -1090,7 +1078,7 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
if [ -f $$i$(EXEEXT) ]; then \
j=`echo $$i | sed -e 's/-new//'`; \
k=`echo $$j | sed '$(transform)'`; \
- if [ "$(DESTDIR)$(bindir)/$$k$(EXEEXT)" != "$(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
+ if [ "$(bindir)/$$k" != "$(tooldir)/bin/$$j" ]; then \
rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
@@ -1120,9 +1108,10 @@ binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
-budemang.o: budemang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/libiberty.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h
+budemang.o: budemang.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
budemang.h
coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
@@ -1132,6 +1121,9 @@ coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h coffgrok.h
+cxxfilt.o: cxxfilt.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h $(INCDIR)/safe-ctype.h
debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h
@@ -1176,12 +1168,13 @@ not-strip.o: not-strip.c
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- budbg.h $(INCDIR)/filenames.h
+ budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h budemang.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/progress.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ budemang.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
@@ -1202,15 +1195,18 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/fr30.h \
$(INCDIR)/elf/frv.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/hppa.h \
- $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/i960.h \
- $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/m68k.h \
- $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \
+ $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/ip2k.h \
+ $(INCDIR)/elf/m32r.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/m68hc11.h \
+ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/msp430.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/x86-64.h \
- $(INCDIR)/elf/xstormy16.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h unwind-ia64.h
+ $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
+ $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/iq2000.h \
+ $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h unwind-ia64.h
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h
@@ -1253,8 +1249,8 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \
sysroff.h sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
@@ -1268,7 +1264,6 @@ wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
-underscore.o: underscore.c
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h arsup.h
diff --git a/contrib/binutils/binutils/NEWS b/contrib/binutils/binutils/NEWS
index 5091e3b..a72826e 100644
--- a/contrib/binutils/binutils/NEWS
+++ b/contrib/binutils/binutils/NEWS
@@ -1,4 +1,47 @@
-*- text -*-
+
+* objcopy and strip can now take wildcard patterns in symbol names specified on
+ the command line provided that the --wildcard switch is used to enable them.
+
+* readelf can now parse archives.
+
+* objdump now accepts --debugging-tags to print the debug information in a
+ format compatible with ctags tool.
+
+* objcopy and strip now accept --only-keep-debug to create a file containing
+ those sections that would be stripped out by --strip-debug. The idea is that
+ this can be used in conjunction with the --add-gnu-debuglink switch to create
+ a two part program distribution - one a stripped executable and the other the
+ debugging info.
+
+* objcopy now accepts --add-gnu-debuglink=<file> to insert a .gnu_debuglink
+ section into a (presumably stripped) executable. This allows the debug
+ information for the file to be held in a separate file.
+
+* BFD marks the sections .comment and .note as 'n' in the BSD/POSIX
+ single-character representation. This can be checked by running nm
+ with the -a switch.
+
+Changes in 2.14:
+
+* Added --info switch to objcopy and strip.
+
+* Support for Vitesse IQ2000 added by Red Hat.
+
+* Added 'S' encoding to strings to allow the display of 8-bit characters.
+
+* Added --prefix-symbols=<text>, --prefix-sections=<text> and
+ --prefix-alloc-sections=<text> to objcopy.
+
+* readelf can handle the extensions to the DWARF2 spec used by the Unified
+ Parallel C compiler.
+
+* BFD no longer declares a "boolean" type, to avoid clashes with other
+ headers that declare the same. Users of BFD should replace boolean,
+ false and true, with int, 0 and 1, or define their own boolean type.
+
+* Support for IP2K added by Denis Chertykov.
+
Changes in 2.13:
* Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400
@@ -44,7 +87,7 @@ Changes in binutils 2.11:
* Add --srec-len and --srec-forceS3 command line switch to objcopy.
By Luciano Gemme.
-
+
* Support for the MIPS32, by Anders Norlander.
* Support for the i860, by Jason Eckhardt.
@@ -57,13 +100,13 @@ Changes in binutils 2.10:
* New command line switch to objdump --file-start-context which shows the
entire file contents up to the source line first encountered for a given
- file.
+ file.
* New command line switch to objdump -M (or --disassembler-options) which takes
a parameter which can then be interpreted on a per-target basis by the
disassembler. Used by ARM targets to select register name sets, ISA, APCS or
raw verions.
-
+
* objdump support for -mi386:intel which causes disassembly to be displayed
with intel syntax.
@@ -154,7 +197,7 @@ Changes in binutils 2.6:
Changes in binutils 2.5:
* Changed objdump -dr to dump the relocs interspersed with the assembly
- listing, for a more useful listing of relocateable files.
+ listing, for a more useful listing of relocatable files.
* Changed objdump -d/--disassemble to only disassemble SEC_CODE sections.
Added -D/--disassemble-all option to disassemble all sections.
diff --git a/contrib/binutils/binutils/README b/contrib/binutils/binutils/README
index 6633792..5bc2508 100644
--- a/contrib/binutils/binutils/README
+++ b/contrib/binutils/binutils/README
@@ -18,7 +18,7 @@ Unpacking and Installation -- quick overview
When you unpack the binutils archive file, you will get a directory
called something like `binutils-XXX', where XXX is the number of the
-release. (Probably 2.12 or higher). This directory contains
+release. (Probably 2.13 or higher). This directory contains
various files and sub-directories. Most of the files in the top
directory are for information and for configuration. The actual
source code is in sub-directories.
@@ -83,6 +83,18 @@ To build under openVMS/AXP, see the file makefile.vms in the top level
directory.
+Native Language Support
+=======================
+
+By default Native Language Support will be enabled for binutils. On
+some systems however this support is not present and can lead to error
+messages such as "undefined reference to `libintl_gettext'" when
+building there tools. If that happens the NLS support can be disabled
+by adding the --disable-nls switch to the configure line like this:
+
+ ../binutils-XXX/configure --disable-nls
+
+
If you don't have ar
====================
@@ -100,7 +112,7 @@ ${MAKE} $* all-bfd
cd binutils
MAKE="${MAKE_PROG}"
export MAKE
-${MAKE} $* ar_DEPENDENCIES= ar_LDADD='../bfd/*.o `cat ../libiberty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty/\1,g"` `if test -f ../intl/gettext.o; then echo '../intl/*.o'; fi`' ar
+${MAKE} $* ar_DEPENDENCIES= ar_LDADD='../bfd/*.o ../libiberty/*.o `if test -f ../intl/gettext.o; then echo '../intl/*.o'; fi`' ar
This script will build an ar program in binutils/ar. Move binutils/ar
into a directory on your PATH. After doing this, you can run make as
@@ -110,7 +122,7 @@ the ranlib program in order to build the distribution.
Porting
=======
-Binutils-2.12 supports many different architectures, but there
+Binutils-2.13 supports many different architectures, but there
are many more not supported, including some that were supported
by earlier versions. We are hoping for volunteers to improve this
situation.
@@ -127,9 +139,66 @@ Send bug reports and patches to:
bug-binutils@gnu.org.
+Please include the following in bug reports:
+
+- A description of exactly what went wrong, and exactly what should have
+ happened instead.
+
+- The configuration name(s) given to the "configure" script. The
+ "config.status" file should have this information. This is assuming
+ you built binutils yourself. If you didn't build binutils youself,
+ then we need information regarding your machine and operating system,
+ and it may be more appropriate to report bugs to wherever you obtained
+ binutils.
+
+- The options given to the tool (gas, objcopy, ld etc.) at run time.
+
+- The actual input file that caused the problem.
+
Always mention the version number you are running; this is printed by
running any of the binutils with the --version option. We appreciate
-reports about bugs, but we do not promise to fix them.
+reports about bugs, but we do not promise to fix them, particularly so
+when the bug report is against an old version. If you are able, please
+consider building the latest tools from CVS to check that your bug has
+not already been fixed.
+
+When reporting problems about gas and ld, it's useful to provide a
+testcase that triggers the problem. In the case of a gas problem, we
+want input files to gas and command line switches used. The inputs to
+gas are _NOT_ .c or .i files, but rather .s files. If your original
+source was a C program, you can generate the .s file and see the command
+line options by passing -v -save-temps to gcc in addition to all the
+usual options you use. The reason we don't want C files is that we
+might not have a C compiler around for the target you use. While it
+might be possible to build a compiler, that takes considerable time and
+disk space, and we might not end up with exactly the same compiler you
+use.
+
+In the case of a ld problem, the input files are .o, .a and .so files,
+and possibly a linker script specified with -T. Again, when using gcc
+to link, you can see these files by adding options to the gcc command
+line. Use -v -save-temps -Wl,-t, except that on targets that use gcc's
+collect2, you would add -v -save-temps -Wl,-t,-debug. The -t option
+tells ld to print all files and libraries used, so that, for example,
+you can associate -lc on the ld command line with the actual libc used.
+Note that your simple two line C program to trigger a problem typically
+expands into several megabytes of objects by the time you include
+libraries.
+
+It is antisocial to post megabyte sized attachments to mailing lists, so
+please put large testcases somewhere on an ftp or web site so that only
+interested developers need to download them, or offer to email them on
+request. Better still, try to reduce the testcase, for example, try to
+develop a ld testcase that doesn't use system libraries. However,
+please be sure it is a complete testcase and that it really does
+demonstrate the problem. Also, don't bother paring it down if that will
+cause large delays in filing the bug report.
+
+If you expect to be contributing a large number of test cases, it would
+be helpful if you would look at the test suite included in the release
+(based on the Deja Gnu testing framework, available from the usual ftp
+sites) and write test cases to fit into that framework. This is
+certainly not required.
VMS
===
diff --git a/contrib/binutils/binutils/acinclude.m4 b/contrib/binutils/binutils/acinclude.m4
index 7ffc031..c5ae4d4 100644
--- a/contrib/binutils/binutils/acinclude.m4
+++ b/contrib/binutils/binutils/acinclude.m4
@@ -25,7 +25,7 @@ AC_SUBST(INTLLIBS)
dnl AM_PROG_LEX
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN(AM_PROG_LEX,
+AC_DEFUN([AM_PROG_LEX],
[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
AC_PROG_LEX
diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4
index 1c78dc1..d1f4a36 100644
--- a/contrib/binutils/binutils/aclocal.m4
+++ b/contrib/binutils/binutils/aclocal.m4
@@ -37,6 +37,24 @@ AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
AC_PROG_LEX
AC_DECL_YYTEXT])
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c
index 174a034..354153e 100644
--- a/contrib/binutils/binutils/addr2line.c
+++ b/contrib/binutils/binutils/addr2line.c
@@ -1,5 +1,6 @@
/* addr2line.c -- convert addresses to line number and function name
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
This file is part of GNU Binutils.
@@ -37,9 +38,9 @@
#include "bucomm.h"
#include "budemang.h"
-static boolean with_functions; /* -f, show function names. */
-static boolean do_demangle; /* -C, demangle names. */
-static boolean base_names; /* -s, strip directory names. */
+static bfd_boolean with_functions; /* -f, show function names. */
+static bfd_boolean do_demangle; /* -C, demangle names. */
+static bfd_boolean base_names; /* -s, strip directory names. */
static int naddr; /* Number of addresses to process. */
static char **addr; /* Hex addresses to process. */
@@ -58,18 +59,16 @@ static struct option long_options[] =
{0, no_argument, 0, 0}
};
-static void usage PARAMS ((FILE *, int));
-static void slurp_symtab PARAMS ((bfd *));
-static void find_address_in_section PARAMS ((bfd *, asection *, PTR));
-static void translate_addresses PARAMS ((bfd *));
-static void process_file PARAMS ((const char *, const char *));
+static void usage (FILE *, int);
+static void slurp_symtab (bfd *);
+static void find_address_in_section (bfd *, asection *, void *);
+static void translate_addresses (bfd *);
+static void process_file (const char *, const char *);
/* Print a usage message to STREAM and exit with STATUS. */
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [addr(s)]\n"), program_name);
fprintf (stream, _(" Convert addresses into line number/file name pairs.\n"));
@@ -93,22 +92,18 @@ usage (stream, status)
/* Read in the symbol table. */
static void
-slurp_symtab (abfd)
- bfd *abfd;
+slurp_symtab (bfd *abfd)
{
- long storage;
long symcount;
+ unsigned int size;
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
return;
- storage = bfd_get_symtab_upper_bound (abfd);
- if (storage < 0)
- bfd_fatal (bfd_get_filename (abfd));
-
- syms = (asymbol **) xmalloc (storage);
+ symcount = bfd_read_minisymbols (abfd, FALSE, (void *) &syms, &size);
+ if (symcount == 0)
+ symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, (void *) &syms, &size);
- symcount = bfd_canonicalize_symtab (abfd, syms);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
}
@@ -120,16 +115,14 @@ static bfd_vma pc;
static const char *filename;
static const char *functionname;
static unsigned int line;
-static boolean found;
+static bfd_boolean found;
/* Look for an address in a section. This is called via
bfd_map_over_sections. */
static void
-find_address_in_section (abfd, section, data)
- bfd *abfd;
- asection *section;
- PTR data ATTRIBUTE_UNUSED;
+find_address_in_section (bfd *abfd, asection *section,
+ void *data ATTRIBUTE_UNUSED)
{
bfd_vma vma;
bfd_size_type size;
@@ -156,8 +149,7 @@ find_address_in_section (abfd, section, data)
file_name:line_number and optionally function name. */
static void
-translate_addresses (abfd)
- bfd *abfd;
+translate_addresses (bfd *abfd)
{
int read_stdin = (naddr == 0);
@@ -179,8 +171,8 @@ translate_addresses (abfd)
pc = bfd_scan_vma (*addr++, NULL, 16);
}
- found = false;
- bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL);
+ found = FALSE;
+ bfd_map_over_sections (abfd, find_address_in_section, NULL);
if (! found)
{
@@ -233,13 +225,14 @@ translate_addresses (abfd)
/* Process a file. */
static void
-process_file (file_name, target)
- const char *file_name;
- const char *target;
+process_file (const char *file_name, const char *target)
{
bfd *abfd;
char **matching;
+ if (get_file_size (file_name) < 1)
+ return;
+
abfd = bfd_openr (file_name, target);
if (abfd == NULL)
bfd_fatal (file_name);
@@ -271,12 +264,10 @@ process_file (file_name, target)
bfd_close (abfd);
}
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
const char *file_name;
char *target;
@@ -310,7 +301,7 @@ main (argc, argv)
target = optarg;
break;
case 'C':
- do_demangle = true;
+ do_demangle = TRUE;
if (optarg != NULL)
{
enum demangling_styles style;
@@ -327,10 +318,10 @@ main (argc, argv)
file_name = optarg;
break;
case 's':
- base_names = true;
+ base_names = TRUE;
break;
case 'f':
- with_functions = true;
+ with_functions = TRUE;
break;
case 'v':
case 'V':
diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c
index ea1b456..ec0657d 100644
--- a/contrib/binutils/binutils/ar.c
+++ b/contrib/binutils/binutils/ar.c
@@ -1,6 +1,6 @@
/* ar.c - Archive modify and extract.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -24,7 +24,7 @@
should have long options too. GNU ar used to check file against filesystem
in quick_update and replace operations (would check mtime). Doesn't warn
when name truncated. No way to specify pos_end. Error messages should be
- more consistant. */
+ more consistent. */
#include "bfd.h"
#include "libiberty.h"
@@ -54,54 +54,30 @@
/* Kludge declaration from BFD! This is ugly! FIXME! XXX */
struct ar_hdr *
- bfd_special_undocumented_glue PARAMS ((bfd * abfd, const char *filename));
+ bfd_special_undocumented_glue (bfd * abfd, const char *filename);
/* Static declarations */
-static void
-mri_emul PARAMS ((void));
-
-static const char *
-normalize PARAMS ((const char *, bfd *));
-
-static void
-remove_output PARAMS ((void));
-
-static void
-map_over_members PARAMS ((bfd *, void (*)(bfd *), char **, int));
-
-static void
-print_contents PARAMS ((bfd * member));
-
-static void
-delete_members PARAMS ((bfd *, char **files_to_delete));
+static void mri_emul (void);
+static const char *normalize (const char *, bfd *);
+static void remove_output (void);
+static void map_over_members (bfd *, void (*)(bfd *), char **, int);
+static void print_contents (bfd * member);
+static void delete_members (bfd *, char **files_to_delete);
#if 0
-static void
-do_quick_append PARAMS ((const char *archive_filename,
- char **files_to_append));
+static void do_quick_append
+ (const char *archive_filename, char **files_to_append);
#endif
-static void
-move_members PARAMS ((bfd *, char **files_to_move));
-
-static void
-replace_members PARAMS ((bfd *, char **files_to_replace, boolean quick));
-
-static void
-print_descr PARAMS ((bfd * abfd));
-
-static void
-write_archive PARAMS ((bfd *));
-
-static void
-ranlib_only PARAMS ((const char *archname));
-
-static void
-ranlib_touch PARAMS ((const char *archname));
-
-static void
-usage PARAMS ((int));
+static void move_members (bfd *, char **files_to_move);
+static void replace_members
+ (bfd *, char **files_to_replace, bfd_boolean quick);
+static void print_descr (bfd * abfd);
+static void write_archive (bfd *);
+static void ranlib_only (const char *archname);
+static void ranlib_touch (const char *archname);
+static void usage (int);
/** Globals and flags */
@@ -127,7 +103,7 @@ int newer_only = 0;
/* Controls the writing of an archive symbol table (in BSD: a __.SYMDEF
member). -1 means we've been explicitly asked to not write a symbol table;
- +1 means we've been explictly asked to write it;
+ +1 means we've been explicitly asked to write it;
0 is the default.
Traditionally, the default in BSD has been to not write the table.
However, for POSIX.2 compliance the default is now to write a symbol table
@@ -148,25 +124,25 @@ enum pos
} postype = pos_default;
static bfd **
-get_pos_bfd PARAMS ((bfd **, enum pos, const char *));
+get_pos_bfd (bfd **, enum pos, const char *);
-/* For extract/delete only. If COUNTED_NAME_MODE is true, we only
+/* For extract/delete only. If COUNTED_NAME_MODE is TRUE, we only
extract the COUNTED_NAME_COUNTER instance of that name. */
-static boolean counted_name_mode = 0;
+static bfd_boolean counted_name_mode = 0;
static int counted_name_counter = 0;
/* Whether to truncate names of files stored in the archive. */
-static boolean ar_truncate = false;
+static bfd_boolean ar_truncate = FALSE;
/* Whether to use a full file name match when searching an archive.
This is convenient for archives created by the Microsoft lib
program. */
-static boolean full_pathname = false;
+static bfd_boolean full_pathname = FALSE;
int interactive = 0;
static void
-mri_emul ()
+mri_emul (void)
{
interactive = isatty (fileno (stdin));
yyparse ();
@@ -177,11 +153,7 @@ mri_emul ()
whose name matches one in FILES. */
static void
-map_over_members (arch, function, files, count)
- bfd *arch;
- void (*function) PARAMS ((bfd *));
- char **files;
- int count;
+map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
{
bfd *head;
int match_count;
@@ -204,7 +176,7 @@ map_over_members (arch, function, files, count)
for (; count > 0; files++, count--)
{
- boolean found = false;
+ bfd_boolean found = FALSE;
match_count = 0;
for (head = arch->next; head; head = head->next)
@@ -229,7 +201,7 @@ map_over_members (arch, function, files, count)
continue;
}
- found = true;
+ found = TRUE;
function (head);
}
}
@@ -239,11 +211,10 @@ map_over_members (arch, function, files, count)
}
}
-boolean operation_alters_arch = false;
+bfd_boolean operation_alters_arch = FALSE;
static void
-usage (help)
- int help;
+usage (int help)
{
FILE *s;
@@ -303,9 +274,7 @@ usage (help)
name which we will use in an archive. */
static const char *
-normalize (file, abfd)
- const char *file;
- bfd *abfd;
+normalize (const char *file, bfd *abfd)
{
const char *filename;
@@ -351,12 +320,12 @@ static FILE *output_file = NULL;
static bfd *output_bfd = NULL;
static void
-remove_output ()
+remove_output (void)
{
if (output_filename != NULL)
{
- if (output_bfd != NULL && output_bfd->iostream != NULL)
- fclose ((FILE *) (output_bfd->iostream));
+ if (output_bfd != NULL)
+ bfd_cache_close (output_bfd);
if (output_file != NULL)
fclose (output_file);
unlink (output_filename);
@@ -366,12 +335,10 @@ remove_output ()
/* The option parsing should be in its own function.
It will be when I have getopt working. */
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
char *arg_ptr;
char c;
@@ -386,6 +353,7 @@ main (argc, argv)
char *inarch_filename;
int show_version;
int i;
+ int do_posix = 0;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
@@ -455,7 +423,7 @@ main (argc, argv)
if (is_ranlib)
{
- boolean touch = false;
+ bfd_boolean touch = FALSE;
if (argc < 2
|| strcmp (argv[1], "--help") == 0
@@ -470,7 +438,7 @@ main (argc, argv)
if (strcmp (argv[1], "-t") == 0)
{
++arg_index;
- touch = true;
+ touch = TRUE;
}
while (arg_index < argc)
{
@@ -492,107 +460,125 @@ main (argc, argv)
if (argc < 2)
usage (0);
- arg_ptr = argv[1];
+ arg_index = 1;
+ arg_ptr = argv[arg_index];
if (*arg_ptr == '-')
- ++arg_ptr; /* compatibility */
+ {
+ /* When the first option starts with '-' we support POSIX-compatible
+ option parsing. */
+ do_posix = 1;
+ ++arg_ptr; /* compatibility */
+ }
- while ((c = *arg_ptr++) != '\0')
+ do
{
- switch (c)
+ while ((c = *arg_ptr++) != '\0')
{
- case 'd':
- case 'm':
- case 'p':
- case 'q':
- case 'r':
- case 't':
- case 'x':
- if (operation != none)
- fatal (_("two different operation options specified"));
switch (c)
{
case 'd':
- operation = delete;
- operation_alters_arch = true;
- break;
case 'm':
- operation = move;
- operation_alters_arch = true;
- break;
case 'p':
- operation = print_files;
- break;
case 'q':
- operation = quick_append;
- operation_alters_arch = true;
- break;
case 'r':
- operation = replace;
- operation_alters_arch = true;
- break;
case 't':
- operation = print_table;
- break;
case 'x':
- operation = extract;
+ if (operation != none)
+ fatal (_("two different operation options specified"));
+ switch (c)
+ {
+ case 'd':
+ operation = delete;
+ operation_alters_arch = TRUE;
+ break;
+ case 'm':
+ operation = move;
+ operation_alters_arch = TRUE;
+ break;
+ case 'p':
+ operation = print_files;
+ break;
+ case 'q':
+ operation = quick_append;
+ operation_alters_arch = TRUE;
+ break;
+ case 'r':
+ operation = replace;
+ operation_alters_arch = TRUE;
+ break;
+ case 't':
+ operation = print_table;
+ break;
+ case 'x':
+ operation = extract;
+ break;
+ }
+ case 'l':
+ break;
+ case 'c':
+ silent_create = 1;
+ break;
+ case 'o':
+ preserve_dates = 1;
+ break;
+ case 'V':
+ show_version = TRUE;
+ break;
+ case 's':
+ write_armap = 1;
+ break;
+ case 'S':
+ write_armap = -1;
+ break;
+ case 'u':
+ newer_only = 1;
+ break;
+ case 'v':
+ verbose = 1;
break;
+ case 'a':
+ postype = pos_after;
+ break;
+ case 'b':
+ postype = pos_before;
+ break;
+ case 'i':
+ postype = pos_before;
+ break;
+ case 'M':
+ mri_mode = 1;
+ break;
+ case 'N':
+ counted_name_mode = TRUE;
+ break;
+ case 'f':
+ ar_truncate = TRUE;
+ break;
+ case 'P':
+ full_pathname = TRUE;
+ break;
+ default:
+ /* xgettext:c-format */
+ non_fatal (_("illegal option -- %c"), c);
+ usage (0);
}
- case 'l':
- break;
- case 'c':
- silent_create = 1;
- break;
- case 'o':
- preserve_dates = 1;
- break;
- case 'V':
- show_version = true;
- break;
- case 's':
- write_armap = 1;
- break;
- case 'S':
- write_armap = -1;
- break;
- case 'u':
- newer_only = 1;
- break;
- case 'v':
- verbose = 1;
- break;
- case 'a':
- postype = pos_after;
- break;
- case 'b':
- postype = pos_before;
- break;
- case 'i':
- postype = pos_before;
- break;
- case 'M':
- mri_mode = 1;
- break;
- case 'N':
- counted_name_mode = true;
- break;
- case 'f':
- ar_truncate = true;
- break;
- case 'P':
- full_pathname = true;
- break;
- default:
- /* xgettext:c-format */
- non_fatal (_("illegal option -- %c"), c);
- usage (0);
}
+
+ /* With POSIX-compatible option parsing continue with the next
+ argument if it starts with '-'. */
+ if (do_posix && arg_index + 1 < argc && argv[arg_index + 1][0] == '-')
+ arg_ptr = argv[++arg_index] + 1;
+ else
+ do_posix = 0;
}
+ while (do_posix);
if (show_version)
print_version ("ar");
- if (argc < 3)
+ ++arg_index;
+ if (arg_index >= argc)
usage (0);
if (mri_mode)
@@ -611,7 +597,7 @@ main (argc, argv)
if ((operation == none || operation == print_table)
&& write_armap == 1)
{
- ranlib_only (argv[2]);
+ ranlib_only (argv[arg_index]);
xexit (0);
}
@@ -621,8 +607,6 @@ main (argc, argv)
if (newer_only && operation != replace)
fatal (_("`u' is only meaningful with the `r' option."));
- arg_index = 2;
-
if (postype != pos_default)
posname = argv[arg_index++];
@@ -726,9 +710,7 @@ main (argc, argv)
}
bfd *
-open_inarch (archive_filename, file)
- const char *archive_filename;
- const char *file;
+open_inarch (const char *archive_filename, const char *file)
{
const char *target;
bfd **last_one;
@@ -785,6 +767,8 @@ open_inarch (archive_filename, file)
|| ! bfd_set_format (arch, bfd_archive)
|| ! bfd_close (arch))
bfd_fatal (archive_filename);
+ else if (!silent_create)
+ non_fatal (_("creating %s"), archive_filename);
/* If we die creating a new archive, don't leave it around. */
output_filename = archive_filename;
@@ -825,8 +809,7 @@ open_inarch (archive_filename, file)
}
static void
-print_contents (abfd)
- bfd *abfd;
+print_contents (bfd *abfd)
{
int ncopied = 0;
char *cbuf = xmalloc (BUFSIZE);
@@ -838,7 +821,7 @@ print_contents (abfd)
if (verbose)
/* xgettext:c-format */
- printf (_("\n<member %s>\n\n"), bfd_get_filename (abfd));
+ printf (_("\n<%s>\n\n"), bfd_get_filename (abfd));
bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
@@ -873,8 +856,7 @@ print_contents (abfd)
Gilmore */
void
-extract_file (abfd)
- bfd *abfd;
+extract_file (bfd *abfd)
{
FILE *ostream;
char *cbuf = xmalloc (BUFSIZE);
@@ -966,16 +948,14 @@ extract_file (abfd)
/* Just do it quickly; don't worry about dups, armap, or anything like that */
static void
-do_quick_append (archive_filename, files_to_append)
- const char *archive_filename;
- char **files_to_append;
+do_quick_append (const char *archive_filename, char **files_to_append)
{
FILE *ofile, *ifile;
char *buf = xmalloc (BUFSIZE);
long tocopy, thistime;
bfd *temp;
struct stat sbuf;
- boolean newfile = false;
+ bfd_boolean newfile = FALSE;
bfd_set_error (bfd_error_no_error);
if (stat (archive_filename, &sbuf) != 0)
@@ -998,7 +978,7 @@ do_quick_append (archive_filename, files_to_append)
bfd_fatal (archive_filename);
#endif
- newfile = true;
+ newfile = TRUE;
}
ofile = fopen (archive_filename, FOPEN_AUB);
@@ -1013,9 +993,9 @@ do_quick_append (archive_filename, files_to_append)
{
bfd_fatal (archive_filename);
}
- if (newfile == false)
+ if (!newfile)
{
- if (bfd_check_format (temp, bfd_archive) != true)
+ if (!bfd_check_format (temp, bfd_archive))
/* xgettext:c-format */
fatal (_("%s is not an archive"), archive_filename);
}
@@ -1030,7 +1010,7 @@ do_quick_append (archive_filename, files_to_append)
if (ar_truncate)
temp->flags |= BFD_TRADITIONAL_FORMAT;
- /* assume it's an achive, go straight to the end, sans $200 */
+ /* assume it's an archive, go straight to the end, sans $200 */
fseek (ofile, 0, 2);
for (; files_to_append && *files_to_append; ++files_to_append)
@@ -1080,8 +1060,7 @@ do_quick_append (archive_filename, files_to_append)
#endif /* 0 */
static void
-write_archive (iarch)
- bfd *iarch;
+write_archive (bfd *iarch)
{
bfd *obfd;
char *old_name, *new_name;
@@ -1113,7 +1092,7 @@ write_archive (iarch)
obfd->flags |= BFD_TRADITIONAL_FORMAT;
}
- if (bfd_set_archive_head (obfd, contents_head) != true)
+ if (!bfd_set_archive_head (obfd, contents_head))
bfd_fatal (old_name);
if (!bfd_close (obfd))
@@ -1134,10 +1113,7 @@ write_archive (iarch)
and should be a pos value. */
static bfd **
-get_pos_bfd (contents, default_pos, default_posname)
- bfd **contents;
- enum pos default_pos;
- const char *default_posname;
+get_pos_bfd (bfd **contents, enum pos default_pos, const char *default_posname)
{
bfd **after_bfd = contents;
enum pos realpos;
@@ -1173,13 +1149,11 @@ get_pos_bfd (contents, default_pos, default_posname)
}
static void
-delete_members (arch, files_to_delete)
- bfd *arch;
- char **files_to_delete;
+delete_members (bfd *arch, char **files_to_delete)
{
bfd **current_ptr_ptr;
- boolean found;
- boolean something_changed = false;
+ bfd_boolean found;
+ bfd_boolean something_changed = FALSE;
int match_count;
for (; *files_to_delete != NULL; ++files_to_delete)
@@ -1192,12 +1166,12 @@ delete_members (arch, files_to_delete)
if (!strcmp (*files_to_delete, "__.SYMDEF"))
{
- arch->has_armap = false;
+ arch->has_armap = FALSE;
write_armap = -1;
continue;
}
- found = false;
+ found = FALSE;
match_count = 0;
current_ptr_ptr = &(arch->next);
while (*current_ptr_ptr)
@@ -1214,8 +1188,8 @@ delete_members (arch, files_to_delete)
}
else
{
- found = true;
- something_changed = true;
+ found = TRUE;
+ something_changed = TRUE;
if (verbose)
printf ("d - %s\n",
*files_to_delete);
@@ -1227,7 +1201,7 @@ delete_members (arch, files_to_delete)
current_ptr_ptr = &((*current_ptr_ptr)->next);
}
- if (verbose && found == false)
+ if (verbose && !found)
{
/* xgettext:c-format */
printf (_("No member named `%s'\n"), *files_to_delete);
@@ -1236,7 +1210,7 @@ delete_members (arch, files_to_delete)
;
}
- if (something_changed == true)
+ if (something_changed)
write_archive (arch);
else
output_filename = NULL;
@@ -1246,9 +1220,7 @@ delete_members (arch, files_to_delete)
/* Reposition existing members within an archive */
static void
-move_members (arch, files_to_move)
- bfd *arch;
- char **files_to_move;
+move_members (bfd *arch, char **files_to_move)
{
bfd **after_bfd; /* New entries go after this one */
bfd **current_ptr_ptr; /* cdr pointer into contents */
@@ -1293,12 +1265,9 @@ move_members (arch, files_to_move)
/* Ought to default to replacing in place, but this is existing practice! */
static void
-replace_members (arch, files_to_move, quick)
- bfd *arch;
- char **files_to_move;
- boolean quick;
+replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
{
- boolean changed = false;
+ bfd_boolean changed = FALSE;
bfd **after_bfd; /* New entries go after this one */
bfd *current;
bfd **current_ptr;
@@ -1344,7 +1313,7 @@ replace_members (arch, files_to_move, quick)
{
/* Snip out this entry from the chain. */
*current_ptr = (*current_ptr)->next;
- changed = true;
+ changed = TRUE;
}
goto next_file;
@@ -1355,8 +1324,10 @@ replace_members (arch, files_to_move, quick)
/* Add to the end of the archive. */
after_bfd = get_pos_bfd (&arch->next, pos_end, NULL);
- if (ar_emul_append (after_bfd, *files_to_move, verbose))
- changed = true;
+
+ if (get_file_size (* files_to_move) > 0
+ && ar_emul_append (after_bfd, *files_to_move, verbose))
+ changed = TRUE;
next_file:;
@@ -1370,11 +1341,12 @@ replace_members (arch, files_to_move, quick)
}
static void
-ranlib_only (archname)
- const char *archname;
+ranlib_only (const char *archname)
{
bfd *arch;
+ if (get_file_size (archname) < 1)
+ return;
write_armap = 1;
arch = open_inarch (archname, (char *) NULL);
if (arch == NULL)
@@ -1385,8 +1357,7 @@ ranlib_only (archname)
/* Update the timestamp of the symbol map of an archive. */
static void
-ranlib_touch (archname)
- const char *archname;
+ranlib_touch (const char *archname)
{
#ifdef __GO32__
/* I don't think updating works on go32. */
@@ -1396,6 +1367,8 @@ ranlib_touch (archname)
bfd *arch;
char **matching;
+ if (get_file_size (archname) < 1)
+ return;
f = open (archname, O_RDWR | O_BINARY, 0);
if (f < 0)
{
@@ -1431,8 +1404,7 @@ ranlib_touch (archname)
/* Things which are interesting to map over all or some of the files: */
static void
-print_descr (abfd)
- bfd *abfd;
+print_descr (bfd *abfd)
{
print_arelt_descr (stdout, abfd, verbose);
}
diff --git a/contrib/binutils/binutils/arlex.l b/contrib/binutils/binutils/arlex.l
index c1771a5..ab1ff16 100644
--- a/contrib/binutils/binutils/arlex.l
+++ b/contrib/binutils/binutils/arlex.l
@@ -1,7 +1,7 @@
%{
/* arlex.l - Strange script language lexer */
-/* Copyright 1992, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright 1992, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define YY_NO_UNPUT
-extern int yylex PARAMS ((void));
+extern int yylex (void);
int linenumber;
%}
@@ -87,5 +87,5 @@ int linenumber;
%%
#ifndef yywrap
/* Needed for lex, though not flex. */
-int yywrap() { return 1; }
+int yywrap(void) { return 1; }
#endif
diff --git a/contrib/binutils/binutils/arparse.y b/contrib/binutils/binutils/arparse.y
index cf0ece1..d54de24 100644
--- a/contrib/binutils/binutils/arparse.y
+++ b/contrib/binutils/binutils/arparse.y
@@ -1,7 +1,8 @@
%{
/* arparse.y - Stange script language parser */
-/* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright 1992, 1993, 1995, 1997, 1999, 2003
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -29,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bucomm.h"
#include "arsup.h"
extern int verbose;
-extern int yylex PARAMS ((void));
-static int yyerror PARAMS ((const char *));
+extern int yylex (void);
+static int yyerror (const char *);
%}
%union {
@@ -193,8 +194,7 @@ verbose_command:
%%
static int
-yyerror (x)
- const char *x ATTRIBUTE_UNUSED;
+yyerror (const char *x ATTRIBUTE_UNUSED)
{
extern int linenumber;
diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c
index 7b01d37..5160dc4 100644
--- a/contrib/binutils/binutils/arsup.c
+++ b/contrib/binutils/binutils/arsup.c
@@ -1,5 +1,5 @@
/* arsup.c - Archive support for MRI compatibility
- Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002
+ Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -32,17 +32,14 @@
#include "filenames.h"
static void map_over_list
- PARAMS ((bfd *, void (*function) (bfd *, bfd *), struct list *));
-static void ar_directory_doer PARAMS ((bfd *, bfd *));
-static void ar_addlib_doer PARAMS ((bfd *, bfd *));
+ (bfd *, void (*function) (bfd *, bfd *), struct list *);
+static void ar_directory_doer (bfd *, bfd *);
+static void ar_addlib_doer (bfd *, bfd *);
extern int verbose;
static void
-map_over_list (arch, function, list)
- bfd *arch;
- void (*function) PARAMS ((bfd *, bfd *));
- struct list *list;
+map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
{
bfd *head;
@@ -69,7 +66,7 @@ map_over_list (arch, function, list)
want to hack multiple references. */
for (ptr = list; ptr; ptr = ptr->next)
{
- boolean found = false;
+ bfd_boolean found = FALSE;
bfd *prev = arch;
for (head = arch->next; head; head = head->next)
@@ -77,7 +74,7 @@ map_over_list (arch, function, list)
if (head->filename != NULL
&& FILENAME_CMP (ptr->name, head->filename) == 0)
{
- found = true;
+ found = TRUE;
function (head, prev);
}
prev = head;
@@ -92,18 +89,13 @@ map_over_list (arch, function, list)
FILE *outfile;
static void
-ar_directory_doer (abfd, ignore)
- bfd *abfd;
- bfd *ignore ATTRIBUTE_UNUSED;
+ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
{
print_arelt_descr(outfile, abfd, verbose);
}
void
-ar_directory (ar_name, list, output)
- char *ar_name;
- struct list *list;
- char *output;
+ar_directory (char *ar_name, struct list *list, char *output)
{
bfd *arch;
@@ -130,7 +122,7 @@ ar_directory (ar_name, list, output)
}
void
-DEFUN_VOID(prompt)
+prompt (void)
{
extern int interactive;
@@ -142,7 +134,7 @@ DEFUN_VOID(prompt)
}
void
-maybequit ()
+maybequit (void)
{
if (! interactive)
xexit (9);
@@ -153,9 +145,7 @@ bfd *obfd;
char *real_name;
void
-ar_open (name, t)
- char *name;
- int t;
+ar_open (char *name, int t)
{
char *tname = (char *) xmalloc (strlen (name) + 10);
const char *bname = lbasename (name);
@@ -192,7 +182,7 @@ ar_open (name, t)
return;
}
- if (bfd_check_format(ibfd, bfd_archive) != true)
+ if (!bfd_check_format(ibfd, bfd_archive))
{
fprintf (stderr,
_("%s: file %s is not an archive\n"),
@@ -219,9 +209,7 @@ ar_open (name, t)
}
static void
-ar_addlib_doer (abfd, prev)
- bfd *abfd;
- bfd *prev;
+ar_addlib_doer (bfd *abfd, bfd *prev)
{
/* Add this module to the output bfd. */
if (prev != NULL)
@@ -232,9 +220,7 @@ ar_addlib_doer (abfd, prev)
}
void
-ar_addlib (name, list)
- char *name;
- struct list *list;
+ar_addlib (char *name, struct list *list)
{
if (obfd == NULL)
{
@@ -249,13 +235,12 @@ ar_addlib (name, list)
if (arch != NULL)
map_over_list (arch, ar_addlib_doer, list);
- /* Don't close the bfd, since it will make the elements disasppear. */
+ /* Don't close the bfd, since it will make the elements disappear. */
}
}
void
-ar_addmod (list)
- struct list *list;
+ar_addmod (struct list *list)
{
if (!obfd)
{
@@ -286,15 +271,14 @@ ar_addmod (list)
void
-ar_clear ()
+ar_clear (void)
{
if (obfd)
obfd->archive_head = 0;
}
void
-ar_delete (list)
- struct list *list;
+ar_delete (struct list *list)
{
if (!obfd)
{
@@ -336,7 +320,7 @@ ar_delete (list)
}
void
-ar_save ()
+ar_save (void)
{
if (!obfd)
{
@@ -349,15 +333,14 @@ ar_save ()
bfd_close (obfd);
- rename (ofilename, real_name);
+ smart_rename (ofilename, real_name, 0);
obfd = 0;
free (ofilename);
}
}
void
-ar_replace (list)
- struct list *list;
+ar_replace (struct list *list)
{
if (!obfd)
{
@@ -423,7 +406,7 @@ ar_replace (list)
/* And I added this one. */
void
-ar_list ()
+ar_list (void)
{
if (!obfd)
{
@@ -446,18 +429,17 @@ ar_list ()
}
void
-ar_end ()
+ar_end (void)
{
if (obfd)
{
- fclose ((FILE *)(obfd->iostream));
+ bfd_cache_close (obfd);
unlink (bfd_get_filename (obfd));
}
}
void
-ar_extract (list)
- struct list *list;
+ar_extract (struct list *list)
{
if (!obfd)
{
diff --git a/contrib/binutils/binutils/arsup.h b/contrib/binutils/binutils/arsup.h
index aeec258..e3a1807 100644
--- a/contrib/binutils/binutils/arsup.h
+++ b/contrib/binutils/binutils/arsup.h
@@ -1,5 +1,5 @@
/* arsup.h - archive support header file
- Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1996, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -22,40 +22,40 @@ struct list {
struct list *next;
};
-void maybequit PARAMS ((void));
+void maybequit (void);
-void prompt PARAMS ((void));
+void prompt (void);
-void ar_clear PARAMS ((void));
+void ar_clear (void);
-void ar_replace PARAMS ((struct list *));
+void ar_replace (struct list *);
-void ar_delete PARAMS ((struct list *));
+void ar_delete (struct list *);
-void ar_save PARAMS ((void));
+void ar_save (void);
-void ar_list PARAMS ((void));
+void ar_list (void);
-void ar_open PARAMS ((char *, int));
+void ar_open (char *, int);
-void ar_directory PARAMS ((char *, struct list *, char *));
+void ar_directory (char *, struct list *, char *);
-void ar_addmod PARAMS ((struct list *));
+void ar_addmod (struct list *);
-void ar_addlib PARAMS ((char *, struct list *));
+void ar_addlib (char *, struct list *);
-void ar_end PARAMS ((void));
+void ar_end (void);
-void ar_extract PARAMS ((struct list *));
+void ar_extract (struct list *);
-bfd *open_inarch PARAMS ((const char *archive_filename, const char *));
+bfd *open_inarch (const char *archive_filename, const char *);
-extern int yylex PARAMS ((void));
+extern int yylex (void);
-int yyparse PARAMS ((void));
+int yyparse (void);
/* Functions from ar.c */
-void extract_file PARAMS ((bfd * abfd));
+void extract_file (bfd * abfd);
extern int interactive;
diff --git a/contrib/binutils/binutils/binemul.c b/contrib/binutils/binutils/binemul.c
index 5144793..3f6ed65 100644
--- a/contrib/binutils/binutils/binemul.c
+++ b/contrib/binutils/binutils/binemul.c
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -23,39 +23,32 @@
extern bin_emulation_xfer_type bin_dummy_emulation;
void
-ar_emul_usage (fp)
- FILE *fp;
+ar_emul_usage (FILE *fp)
{
if (bin_dummy_emulation.ar_usage)
bin_dummy_emulation.ar_usage (fp);
}
void
-ar_emul_default_usage (fp)
- FILE *fp;
+ar_emul_default_usage (FILE *fp)
{
AR_EMUL_USAGE_PRINT_OPTION_HEADER (fp);
/* xgettext:c-format */
fprintf (fp, _(" No emulation specific options\n"));
}
-boolean
-ar_emul_append (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- boolean verbose;
+bfd_boolean
+ar_emul_append (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
if (bin_dummy_emulation.ar_append)
return bin_dummy_emulation.ar_append (after_bfd, file_name, verbose);
- return false;
+ return FALSE;
}
-boolean
-ar_emul_default_append (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- boolean verbose;
+bfd_boolean
+ar_emul_default_append (bfd **after_bfd, char *file_name,
+ bfd_boolean verbose)
{
bfd *temp;
@@ -67,26 +60,21 @@ ar_emul_default_append (after_bfd, file_name, verbose)
(*after_bfd)->next = temp;
- return true;
+ return TRUE;
}
-boolean
-ar_emul_replace (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- boolean verbose;
+bfd_boolean
+ar_emul_replace (bfd **after_bfd, char *file_name, bfd_boolean verbose)
{
if (bin_dummy_emulation.ar_replace)
return bin_dummy_emulation.ar_replace (after_bfd, file_name, verbose);
- return false;
+ return FALSE;
}
-boolean
-ar_emul_default_replace (after_bfd, file_name, verbose)
- bfd **after_bfd;
- char *file_name;
- boolean verbose;
+bfd_boolean
+ar_emul_default_replace (bfd **after_bfd, char *file_name,
+ bfd_boolean verbose)
{
bfd *temp;
@@ -98,27 +86,22 @@ ar_emul_default_replace (after_bfd, file_name, verbose)
(*after_bfd)->next = temp;
- return true;
+ return TRUE;
}
-boolean
-ar_emul_create (abfd_out, archive_file_name, file_name)
- bfd **abfd_out;
- char *archive_file_name;
- char *file_name;
+bfd_boolean
+ar_emul_create (bfd **abfd_out, char *archive_file_name, char *file_name)
{
if (bin_dummy_emulation.ar_create)
return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
file_name);
- return false;
+ return FALSE;
}
-boolean
-ar_emul_default_create (abfd_out, archive_file_name, file_name)
- bfd **abfd_out;
- char *archive_file_name;
- char *file_name;
+bfd_boolean
+ar_emul_default_create (bfd **abfd_out, char *archive_file_name,
+ char *file_name)
{
char *target = NULL;
@@ -144,22 +127,20 @@ ar_emul_default_create (abfd_out, archive_file_name, file_name)
|| ! bfd_close (*abfd_out))
bfd_fatal (archive_file_name);
- return true;
+ return TRUE;
}
-boolean
-ar_emul_parse_arg (arg)
- char *arg;
+bfd_boolean
+ar_emul_parse_arg (char *arg)
{
if (bin_dummy_emulation.ar_parse_arg)
return bin_dummy_emulation.ar_parse_arg (arg);
- return false;
+ return FALSE;
}
-boolean
-ar_emul_default_parse_arg (arg)
- char *arg ATTRIBUTE_UNUSED;
+bfd_boolean
+ar_emul_default_parse_arg (char *arg ATTRIBUTE_UNUSED)
{
- return false;
+ return FALSE;
}
diff --git a/contrib/binutils/binutils/binemul.h b/contrib/binutils/binutils/binemul.h
index bbcb16e..59dc2bd 100644
--- a/contrib/binutils/binutils/binemul.h
+++ b/contrib/binutils/binutils/binemul.h
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -24,16 +24,16 @@
#include "bfd.h"
#include "bucomm.h"
-extern void ar_emul_usage PARAMS ((FILE *));
-extern void ar_emul_default_usage PARAMS ((FILE *));
-extern boolean ar_emul_append PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_default_append PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_replace PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_default_replace PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_create PARAMS ((bfd **, char *, char *));
-extern boolean ar_emul_default_create PARAMS ((bfd **, char *, char *));
-extern boolean ar_emul_parse_arg PARAMS ((char *));
-extern boolean ar_emul_default_parse_arg PARAMS ((char *));
+extern void ar_emul_usage (FILE *);
+extern void ar_emul_default_usage (FILE *);
+extern bfd_boolean ar_emul_append (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_default_append (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_replace (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_default_replace (bfd **, char *, bfd_boolean);
+extern bfd_boolean ar_emul_create (bfd **, char *, char *);
+extern bfd_boolean ar_emul_default_create (bfd **, char *, char *);
+extern bfd_boolean ar_emul_parse_arg (char *);
+extern bfd_boolean ar_emul_default_parse_arg (char *);
/* Macros for common output. */
@@ -53,11 +53,11 @@ extern boolean ar_emul_default_parse_arg PARAMS ((char *));
typedef struct bin_emulation_xfer_struct
{
/* Print out the extra options. */
- void (* ar_usage) PARAMS ((FILE *fp));
- boolean (* ar_append) PARAMS ((bfd **, char *, boolean));
- boolean (* ar_replace) PARAMS ((bfd **, char *, boolean));
- boolean (* ar_create) PARAMS ((bfd **, char *, char *));
- boolean (* ar_parse_arg) PARAMS ((char *));
+ void (* ar_usage) (FILE *fp);
+ bfd_boolean (* ar_append) (bfd **, char *, bfd_boolean);
+ bfd_boolean (* ar_replace) (bfd **, char *, bfd_boolean);
+ bfd_boolean (* ar_create) (bfd **, char *, char *);
+ bfd_boolean (* ar_parse_arg) (char *);
}
bin_emulation_xfer_type;
diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c
index 7ffcaba..6573e2d 100644
--- a/contrib/binutils/binutils/bucomm.c
+++ b/contrib/binutils/binutils/bucomm.c
@@ -1,5 +1,5 @@
/* bucomm.c -- Bin Utils COMmon code.
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -23,9 +23,11 @@
loaded, but for now it's not necessary. */
#include "bfd.h"
+#include "bfdver.h"
#include "libiberty.h"
#include "bucomm.h"
#include "filenames.h"
+#include "libbfd.h"
#include <sys/stat.h>
#include <time.h> /* ctime, maybe time_t */
@@ -35,14 +37,18 @@
typedef long time_t;
#endif
#endif
+
+static const char * endian_string (enum bfd_endian);
+static int display_target_list (void);
+static int display_info_table (int, int);
+static int display_target_tables (void);
-/* Error reporting */
+/* Error reporting. */
char *program_name;
void
-bfd_nonfatal (string)
- const char *string;
+bfd_nonfatal (const char *string)
{
const char *errmsg = bfd_errmsg (bfd_get_error ());
@@ -53,17 +59,14 @@ bfd_nonfatal (string)
}
void
-bfd_fatal (string)
- const char *string;
+bfd_fatal (const char *string)
{
bfd_nonfatal (string);
xexit (1);
}
void
-report (format, args)
- const char * format;
- va_list args;
+report (const char * format, va_list args)
{
fprintf (stderr, "%s: ", program_name);
vfprintf (stderr, format, args);
@@ -97,7 +100,7 @@ non_fatal VPARAMS ((const char *format, ...))
different target. */
void
-set_default_bfd_target ()
+set_default_bfd_target (void)
{
/* The macro TARGET is defined by Makefile. */
const char *target = TARGET;
@@ -107,13 +110,12 @@ set_default_bfd_target ()
target, bfd_errmsg (bfd_get_error ()));
}
-/* After a false return from bfd_check_format_matches with
+/* After a FALSE return from bfd_check_format_matches with
bfd_get_error () == bfd_error_file_ambiguously_recognized, print
the possible matching targets. */
void
-list_matching_formats (p)
- char **p;
+list_matching_formats (char **p)
{
fprintf (stderr, _("%s: Matching formats:"), program_name);
while (*p)
@@ -124,9 +126,7 @@ list_matching_formats (p)
/* List the supported targets. */
void
-list_supported_targets (name, f)
- const char *name;
- FILE *f;
+list_supported_targets (const char *name, FILE *f)
{
int t;
const char **targ_names = bfd_target_list ();
@@ -145,11 +145,9 @@ list_supported_targets (name, f)
/* List the supported architectures. */
void
-list_supported_architectures (name, f)
- const char *name;
- FILE *f;
+list_supported_architectures (const char *name, FILE *f)
{
- const char** arch;
+ const char **arch;
if (name == NULL)
fprintf (f, _("Supported architectures:"));
@@ -161,15 +159,205 @@ list_supported_architectures (name, f)
fprintf (f, "\n");
}
+/* The length of the longest architecture name + 1. */
+#define LONGEST_ARCH sizeof ("powerpc:common")
+
+static const char *
+endian_string (enum bfd_endian endian)
+{
+ switch (endian)
+ {
+ case BFD_ENDIAN_BIG: return "big endian";
+ case BFD_ENDIAN_LITTLE: return "little endian";
+ default: return "endianness unknown";
+ }
+}
+
+/* List the targets that BFD is configured to support, each followed
+ by its endianness and the architectures it supports. */
+
+static int
+display_target_list (void)
+{
+ char *dummy_name;
+ int t;
+ int ret = 1;
+
+ dummy_name = make_temp_file (NULL);
+ for (t = 0; bfd_target_vector[t]; t++)
+ {
+ const bfd_target *p = bfd_target_vector[t];
+ bfd *abfd = bfd_openw (dummy_name, p->name);
+ int a;
+
+ printf ("%s\n (header %s, data %s)\n", p->name,
+ endian_string (p->header_byteorder),
+ endian_string (p->byteorder));
+
+ if (abfd == NULL)
+ {
+ bfd_nonfatal (dummy_name);
+ ret = 0;
+ continue;
+ }
+
+ if (! bfd_set_format (abfd, bfd_object))
+ {
+ if (bfd_get_error () != bfd_error_invalid_operation)
+ {
+ bfd_nonfatal (p->name);
+ ret = 0;
+ }
+ bfd_close_all_done (abfd);
+ continue;
+ }
+
+ for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++)
+ if (bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0))
+ printf (" %s\n",
+ bfd_printable_arch_mach ((enum bfd_architecture) a, 0));
+ bfd_close_all_done (abfd);
+ }
+ unlink (dummy_name);
+ free (dummy_name);
+
+ return ret;
+}
+
+/* Print a table showing which architectures are supported for entries
+ FIRST through LAST-1 of bfd_target_vector (targets across,
+ architectures down). */
+
+static int
+display_info_table (int first, int last)
+{
+ int t;
+ int a;
+ int ret = 1;
+ char *dummy_name;
+
+ /* Print heading of target names. */
+ printf ("\n%*s", (int) LONGEST_ARCH, " ");
+ for (t = first; t < last && bfd_target_vector[t]; t++)
+ printf ("%s ", bfd_target_vector[t]->name);
+ putchar ('\n');
+
+ dummy_name = make_temp_file (NULL);
+ for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++)
+ if (strcmp (bfd_printable_arch_mach (a, 0), "UNKNOWN!") != 0)
+ {
+ printf ("%*s ", (int) LONGEST_ARCH - 1,
+ bfd_printable_arch_mach (a, 0));
+ for (t = first; t < last && bfd_target_vector[t]; t++)
+ {
+ const bfd_target *p = bfd_target_vector[t];
+ bfd_boolean ok = TRUE;
+ bfd *abfd = bfd_openw (dummy_name, p->name);
+
+ if (abfd == NULL)
+ {
+ bfd_nonfatal (p->name);
+ ret = 0;
+ ok = FALSE;
+ }
+
+ if (ok)
+ {
+ if (! bfd_set_format (abfd, bfd_object))
+ {
+ if (bfd_get_error () != bfd_error_invalid_operation)
+ {
+ bfd_nonfatal (p->name);
+ ret = 0;
+ }
+ ok = FALSE;
+ }
+ }
+
+ if (ok)
+ {
+ if (! bfd_set_arch_mach (abfd, a, 0))
+ ok = FALSE;
+ }
+
+ if (ok)
+ printf ("%s ", p->name);
+ else
+ {
+ int l = strlen (p->name);
+ while (l--)
+ putchar ('-');
+ putchar (' ');
+ }
+ if (abfd != NULL)
+ bfd_close_all_done (abfd);
+ }
+ putchar ('\n');
+ }
+ unlink (dummy_name);
+ free (dummy_name);
+
+ return ret;
+}
+
+/* Print tables of all the target-architecture combinations that
+ BFD has been configured to support. */
+
+static int
+display_target_tables (void)
+{
+ int t;
+ int columns;
+ int ret = 1;
+ char *colum;
+
+ columns = 0;
+ colum = getenv ("COLUMNS");
+ if (colum != NULL)
+ columns = atoi (colum);
+ if (columns == 0)
+ columns = 80;
+
+ t = 0;
+ while (bfd_target_vector[t] != NULL)
+ {
+ int oldt = t, wid;
+
+ wid = LONGEST_ARCH + strlen (bfd_target_vector[t]->name) + 1;
+ ++t;
+ while (wid < columns && bfd_target_vector[t] != NULL)
+ {
+ int newwid;
+
+ newwid = wid + strlen (bfd_target_vector[t]->name) + 1;
+ if (newwid >= columns)
+ break;
+ wid = newwid;
+ ++t;
+ }
+ if (! display_info_table (oldt, t))
+ ret = 0;
+ }
+
+ return ret;
+}
+
+int
+display_info (void)
+{
+ printf (_("BFD header file version %s\n"), BFD_VERSION_STRING);
+ if (! display_target_list () || ! display_target_tables ())
+ return 1;
+ else
+ return 0;
+}
+
/* Display the archive header for an element as if it were an ls -l listing:
Mode User\tGroup\tSize\tDate Name */
void
-print_arelt_descr (file, abfd, verbose)
- FILE *file;
- bfd *abfd;
- boolean verbose;
+print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose)
{
struct stat buf;
@@ -200,8 +388,7 @@ print_arelt_descr (file, abfd, verbose)
/* Return the name of a temporary file in the same directory as FILENAME. */
char *
-make_tempname (filename)
- char *filename;
+make_tempname (char *filename)
{
static char template[] = "stXXXXXX";
char *tmpname;
@@ -251,9 +438,7 @@ make_tempname (filename)
parsed. */
bfd_vma
-parse_vma (s, arg)
- const char *s;
- const char *arg;
+parse_vma (const char *s, const char *arg)
{
bfd_vma ret;
const char *end;
@@ -265,3 +450,28 @@ parse_vma (s, arg)
return ret;
}
+
+/* Returns the size of the named file. If the file does not
+ exist, or if it is not a real file, then a suitable non-fatal
+ error message is printed and zero is returned. */
+
+off_t
+get_file_size (const char * file_name)
+{
+ struct stat statbuf;
+
+ if (stat (file_name, &statbuf) < 0)
+ {
+ if (errno == ENOENT)
+ non_fatal (_("'%s': No such file"), file_name);
+ else
+ non_fatal (_("Warning: could not locate '%s'. reason: %s"),
+ file_name, strerror (errno));
+ }
+ else if (! S_ISREG (statbuf.st_mode))
+ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
+ else
+ return statbuf.st_size;
+
+ return 0;
+}
diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h
index 0c98a7f..f604053 100644
--- a/contrib/binutils/binutils/bucomm.h
+++ b/contrib/binutils/binutils/bucomm.h
@@ -1,22 +1,22 @@
/* bucomm.h -- binutils common include file.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2002, 2003 Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ This file is part of GNU Binutils.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _BUCOMM_H
#define _BUCOMM_H
@@ -148,46 +148,50 @@ void *alloca ();
#endif
/* bucomm.c */
-void bfd_nonfatal PARAMS ((const char *));
+void bfd_nonfatal (const char *);
-void bfd_fatal PARAMS ((const char *)) ATTRIBUTE_NORETURN;
+void bfd_fatal (const char *) ATTRIBUTE_NORETURN;
-void report PARAMS ((const char *, va_list));
+void report (const char *, va_list);
-void fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-void non_fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void non_fatal (const char *, ...) ATTRIBUTE_PRINTF_1;
-void set_default_bfd_target PARAMS ((void));
+void set_default_bfd_target (void);
-void list_matching_formats PARAMS ((char **p));
+void list_matching_formats (char **);
-void list_supported_targets PARAMS ((const char *, FILE *));
+void list_supported_targets (const char *, FILE *);
-void list_supported_architectures PARAMS ((const char *, FILE *));
+void list_supported_architectures (const char *, FILE *);
-void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose));
+int display_info (void);
-char *make_tempname PARAMS ((char *));
+void print_arelt_descr (FILE *, bfd *, bfd_boolean);
-bfd_vma parse_vma PARAMS ((const char *, const char *));
+char *make_tempname (char *);
+
+bfd_vma parse_vma (const char *, const char *);
+
+off_t get_file_size (const char *);
extern char *program_name;
/* filemode.c */
-void mode_string PARAMS ((unsigned long mode, char *buf));
+void mode_string (unsigned long, char *);
/* version.c */
-extern void print_version PARAMS ((const char *));
+extern void print_version (const char *);
/* rename.c */
-extern void set_times PARAMS ((const char *, const struct stat *));
+extern void set_times (const char *, const struct stat *);
-extern int smart_rename PARAMS ((const char *, const char *, int));
+extern int smart_rename (const char *, const char *, int);
-/* libiberty */
-PTR xmalloc PARAMS ((size_t));
+/* libiberty. */
+void *xmalloc (size_t);
-PTR xrealloc PARAMS ((PTR, size_t));
+void *xrealloc (void *, size_t);
#endif /* _BUCOMM_H */
diff --git a/contrib/binutils/binutils/budbg.h b/contrib/binutils/binutils/budbg.h
index 2bbf72e..f5c03bd 100644
--- a/contrib/binutils/binutils/budbg.h
+++ b/contrib/binutils/binutils/budbg.h
@@ -1,5 +1,5 @@
/* budbg.c -- Interfaces to the generic debugging information routines.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -26,33 +26,33 @@
/* Routine used to read generic debugging information. */
-extern PTR read_debugging_info PARAMS ((bfd *, asymbol **, long));
+extern void *read_debugging_info (bfd *, asymbol **, long);
/* Routine used to print generic debugging information. */
-extern boolean print_debugging_info PARAMS ((FILE *, PTR));
+extern bfd_boolean print_debugging_info
+ (FILE *, void *, bfd *, asymbol **, void *, bfd_boolean);
/* Routines used to read and write stabs information. */
-extern PTR start_stab PARAMS ((PTR, bfd *, boolean, asymbol **, long));
+extern void *start_stab (void *, bfd *, bfd_boolean, asymbol **, long);
-extern boolean finish_stab PARAMS ((PTR, PTR));
+extern bfd_boolean finish_stab (void *, void *);
-extern boolean parse_stab PARAMS ((PTR, PTR, int, int, bfd_vma, const char *));
+extern bfd_boolean parse_stab
+ (void *, void *, int, int, bfd_vma, const char *);
-extern boolean write_stabs_in_sections_debugging_info
- PARAMS ((bfd *, PTR, bfd_byte **, bfd_size_type *, bfd_byte **,
- bfd_size_type *));
+extern bfd_boolean write_stabs_in_sections_debugging_info
+ (bfd *, void *, bfd_byte **, bfd_size_type *, bfd_byte **, bfd_size_type *);
/* Routines used to read and write IEEE debugging information. */
-extern boolean parse_ieee
- PARAMS ((PTR, bfd *, const bfd_byte *, bfd_size_type));
+extern bfd_boolean parse_ieee (void *, bfd *, const bfd_byte *, bfd_size_type);
-extern boolean write_ieee_debugging_info PARAMS ((bfd *, PTR));
+extern bfd_boolean write_ieee_debugging_info (bfd *, void *);
/* Routine used to read COFF debugging information. */
-extern boolean parse_coff PARAMS ((bfd *, asymbol **, long, PTR));
+extern bfd_boolean parse_coff (bfd *, asymbol **, long, void *);
#endif
diff --git a/contrib/binutils/binutils/budemang.c b/contrib/binutils/binutils/budemang.c
index 3f8d385..525a1c8 100644
--- a/contrib/binutils/binutils/budemang.c
+++ b/contrib/binutils/binutils/budemang.c
@@ -1,5 +1,5 @@
/* demangle.c -- A wrapper calling libiberty cplus_demangle
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -36,9 +36,7 @@
other such chars that would otherwise confuse the demangler. */
char *
-demangle (abfd, name)
- bfd *abfd;
- const char *name;
+demangle (bfd *abfd, const char *name)
{
char *res;
const char *p;
diff --git a/contrib/binutils/binutils/budemang.h b/contrib/binutils/binutils/budemang.h
index 60a3c2d..b837d71 100644
--- a/contrib/binutils/binutils/budemang.h
+++ b/contrib/binutils/binutils/budemang.h
@@ -1,5 +1,5 @@
/* demangle.h -- A wrapper calling libiberty cplus_demangle
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -20,6 +20,6 @@
#ifndef BUDEMANG_H
#define BUDEMANG_H
-char *demangle PARAMS ((bfd *, const char *));
+char *demangle (bfd *, const char *);
#endif
diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c
index 8f538e8..039b955 100644
--- a/contrib/binutils/binutils/coffdump.c
+++ b/contrib/binutils/binutils/coffdump.c
@@ -1,5 +1,5 @@
/* Coff file dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -32,23 +32,22 @@
static int atnl;
-static void tab PARAMS ((int));
-static void nl PARAMS ((void));
-static void dump_coff_lines PARAMS ((struct coff_line *));
-static void dump_coff_type PARAMS ((struct coff_type *));
-static void dump_coff_where PARAMS ((struct coff_where *));
-static void dump_coff_visible PARAMS ((struct coff_visible *));
-extern void dump_coff_symbol PARAMS ((struct coff_symbol *));
-static void dump_coff_scope PARAMS ((struct coff_scope *));
-static void dump_coff_sfile PARAMS ((struct coff_sfile *));
-static void dump_coff_section PARAMS ((struct coff_section *));
-extern void coff_dump PARAMS ((struct coff_ofile *));
-static void show_usage PARAMS ((FILE *, int));
-extern int main PARAMS ((int, char **));
+static void tab (int);
+static void nl (void);
+static void dump_coff_lines (struct coff_line *);
+static void dump_coff_type (struct coff_type *);
+static void dump_coff_where (struct coff_where *);
+static void dump_coff_visible (struct coff_visible *);
+extern void dump_coff_symbol (struct coff_symbol *);
+static void dump_coff_scope (struct coff_scope *);
+static void dump_coff_sfile (struct coff_sfile *);
+static void dump_coff_section (struct coff_section *);
+extern void coff_dump (struct coff_ofile *);
+static void show_usage (FILE *, int);
+extern int main (int, char **);
static void
-tab (x)
- int x;
+tab (int x)
{
static int indent;
int i;
@@ -91,14 +90,13 @@ tab (x)
}
static void
-nl ()
+nl (void)
{
atnl = 1;
}
static void
-dump_coff_lines (p)
- struct coff_line *p;
+dump_coff_lines (struct coff_line *p)
{
int i;
int online = 0;
@@ -124,8 +122,7 @@ dump_coff_lines (p)
}
static void
-dump_coff_type (p)
- struct coff_type *p;
+dump_coff_type (struct coff_type *p)
{
tab (1);
printf ("size %d ", p->size);
@@ -244,8 +241,7 @@ dump_coff_type (p)
}
static void
-dump_coff_where (p)
- struct coff_where *p;
+dump_coff_where (struct coff_where *p)
{
tab (1);
switch (p->where)
@@ -284,8 +280,7 @@ dump_coff_where (p)
}
static void
-dump_coff_visible (p)
- struct coff_visible *p;
+dump_coff_visible (struct coff_visible *p)
{
tab (1);
switch (p->type)
@@ -331,8 +326,7 @@ dump_coff_visible (p)
}
void
-dump_coff_symbol (p)
- struct coff_symbol *p;
+dump_coff_symbol (struct coff_symbol *p)
{
tab (1);
printf ("List of symbols");
@@ -365,8 +359,7 @@ dump_coff_symbol (p)
}
static void
-dump_coff_scope (p)
- struct coff_scope *p;
+dump_coff_scope (struct coff_scope *p)
{
if (p)
{
@@ -402,8 +395,7 @@ dump_coff_scope (p)
}
static void
-dump_coff_sfile (p)
- struct coff_sfile *p;
+dump_coff_sfile (struct coff_sfile *p)
{
tab (1);
printf ("List of source files");
@@ -421,8 +413,7 @@ dump_coff_sfile (p)
}
static void
-dump_coff_section(ptr)
- struct coff_section *ptr;
+dump_coff_section (struct coff_section *ptr)
{
int i;
@@ -446,8 +437,7 @@ dump_coff_section(ptr)
}
void
-coff_dump (ptr)
- struct coff_ofile *ptr;
+coff_dump (struct coff_ofile *ptr)
{
int i;
@@ -464,9 +454,7 @@ coff_dump (ptr)
char * program_name;
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
fprintf (file, _(" Print a human readable interpretation of a SYSROFF object file\n"));
@@ -482,9 +470,7 @@ show_usage (file, status)
}
int
-main (ac, av)
- int ac;
- char *av[];
+main (int ac, char **av)
{
bfd *abfd;
struct coff_ofile *tree;
diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c
index 8cab8d5..b2ec98c 100644
--- a/contrib/binutils/binutils/coffgrok.c
+++ b/contrib/binutils/binutils/coffgrok.c
@@ -1,5 +1,5 @@
/* coffgrok.c
- Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -56,30 +56,30 @@ static struct coff_ptr_struct *rawsyms;
static int rawcount;
static bfd *abfd;
-#define PTR_SIZE 4
-#define SHORT_SIZE 2
-#define INT_SIZE 4
-#define LONG_SIZE 4
-#define FLOAT_SIZE 4
-#define DOUBLE_SIZE 8
+#define PTR_SIZE 4
+#define SHORT_SIZE 2
+#define INT_SIZE 4
+#define LONG_SIZE 4
+#define FLOAT_SIZE 4
+#define DOUBLE_SIZE 8
#define INDEXOF(p) ((struct coff_ptr_struct *)(p)-(rawsyms))
-static struct coff_scope *empty_scope PARAMS ((void));
-static struct coff_symbol *empty_symbol PARAMS ((void));
-static void push_scope PARAMS ((int));
-static void pop_scope PARAMS ((void));
-static void do_sections_p1 PARAMS ((struct coff_ofile *));
-static void do_sections_p2 PARAMS ((struct coff_ofile *));
-static struct coff_where *do_where PARAMS ((int));
-static struct coff_line *do_lines PARAMS ((int, char *));
-static struct coff_type *do_type PARAMS ((int));
-static struct coff_visible *do_visible PARAMS ((int));
-static int do_define PARAMS ((int, struct coff_scope *));
-static struct coff_ofile *doit PARAMS ((void));
+static struct coff_scope *empty_scope (void);
+static struct coff_symbol *empty_symbol (void);
+static void push_scope (int);
+static void pop_scope (void);
+static void do_sections_p1 (struct coff_ofile *);
+static void do_sections_p2 (struct coff_ofile *);
+static struct coff_where *do_where (int);
+static struct coff_line *do_lines (int, char *);
+static struct coff_type *do_type (int);
+static struct coff_visible *do_visible (int);
+static int do_define (int, struct coff_scope *);
+static struct coff_ofile *doit (void);
static struct coff_scope *
-empty_scope ()
+empty_scope (void)
{
struct coff_scope *l;
l = (struct coff_scope *) (xcalloc (sizeof (struct coff_scope), 1));
@@ -87,15 +87,14 @@ empty_scope ()
}
static struct coff_symbol *
-empty_symbol ()
+empty_symbol (void)
{
return (struct coff_symbol *) (xcalloc (sizeof (struct coff_symbol), 1));
}
/*int l;*/
static void
-push_scope (link)
- int link;
+push_scope (int link)
{
struct coff_scope *n = empty_scope ();
if (link)
@@ -119,14 +118,13 @@ push_scope (link)
}
static void
-pop_scope ()
+pop_scope (void)
{
top_scope = top_scope->parent;
}
static void
-do_sections_p1 (head)
- struct coff_ofile *head;
+do_sections_p1 (struct coff_ofile *head)
{
asection *section;
int idx;
@@ -175,8 +173,7 @@ do_sections_p1 (head)
}
static void
-do_sections_p2 (head)
- struct coff_ofile *head;
+do_sections_p2 (struct coff_ofile *head)
{
asection *section;
for (section = abfd->sections; section; section = section->next)
@@ -198,8 +195,7 @@ do_sections_p2 (head)
}
static struct coff_where *
-do_where (i)
- int i;
+do_where (int i)
{
struct internal_syment *sym = &rawsyms[i].u.syment;
struct coff_where *where =
@@ -258,9 +254,7 @@ do_where (i)
static
struct coff_line *
-do_lines (i, name)
- int i;
- char *name ATTRIBUTE_UNUSED;
+do_lines (int i, char *name ATTRIBUTE_UNUSED)
{
struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1);
asection *s;
@@ -307,8 +301,7 @@ do_lines (i, name)
static
struct coff_type *
-do_type (i)
- int i;
+do_type (int i)
{
struct internal_syment *sym = &rawsyms[i].u.syment;
union internal_auxent *aux = &rawsyms[i + 1].u.auxent;
@@ -377,7 +370,7 @@ do_type (i)
{
if (aux->x_sym.x_tagndx.p)
{
- /* Refering to a struct defined elsewhere */
+ /* Referring to a struct defined elsewhere */
res->type = coff_structref_type;
res->u.astructref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)];
res->size = res->u.astructref.ref ?
@@ -396,7 +389,7 @@ do_type (i)
}
else
{
- /* No auxents - it's anonynmous */
+ /* No auxents - it's anonymous */
res->type = coff_structref_type;
res->u.astructref.ref = 0;
res->size = 0;
@@ -405,7 +398,7 @@ do_type (i)
case T_ENUM:
if (aux->x_sym.x_tagndx.p)
{
- /* Refering to a enum defined elsewhere */
+ /* Referring to a enum defined elsewhere */
res->type = coff_enumref_type;
res->u.aenumref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)];
res->size = res->u.aenumref.ref->type->size;
@@ -474,8 +467,7 @@ do_type (i)
}
static struct coff_visible *
-do_visible (i)
- int i;
+do_visible (int i)
{
struct internal_syment *sym = &rawsyms[i].u.syment;
struct coff_visible *visible =
@@ -539,9 +531,7 @@ do_visible (i)
}
static int
-do_define (i, b)
- int i;
- struct coff_scope *b;
+do_define (int i, struct coff_scope *b)
{
static int symbol_index;
struct internal_syment *sym = &rawsyms[i].u.syment;
@@ -601,7 +591,7 @@ do_define (i, b)
static
struct coff_ofile *
-doit ()
+doit (void)
{
int i;
int infile = 0;
@@ -728,8 +718,7 @@ doit ()
}
struct coff_ofile *
-coff_grok (inabfd)
- bfd *inabfd;
+coff_grok (bfd *inabfd)
{
long storage;
struct coff_ofile *p;
diff --git a/contrib/binutils/binutils/coffgrok.h b/contrib/binutils/binutils/coffgrok.h
index d071d24..c063f1d 100644
--- a/contrib/binutils/binutils/coffgrok.h
+++ b/contrib/binutils/binutils/coffgrok.h
@@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
int nrelocs;
int size;
struct coff_reloc *relocs;
- struct sec *bfd_section;
+ struct bfd_section *bfd_section;
};
struct coff_ofile
diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in
index d404762..f2bd049 100644
--- a/contrib/binutils/binutils/config.in
+++ b/contrib/binutils/binutils/config.in
@@ -28,9 +28,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -136,12 +133,6 @@
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -208,3 +199,6 @@
/* Configured target name. */
#undef TARGET
+/* Define to 1 if user symbol names have a leading underscore, 0 if not. */
+#undef TARGET_PREPENDS_UNDERSCORE
+
diff --git a/contrib/binutils/binutils/configure b/contrib/binutils/binutils/configure
index 7c163c9..8210910 100755
--- a/contrib/binutils/binutils/configure
+++ b/contrib/binutils/binutils/configure
@@ -53,6 +53,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -167,6 +168,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -337,6 +339,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -502,12 +509,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -546,12 +557,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:550: checking for Cygwin environment" >&5
+echo "configure:561: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 555 "configure"
+#line 566 "configure"
#include "confdefs.h"
int main() {
@@ -562,7 +573,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -579,19 +590,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:583: checking for mingw32 environment" >&5
+echo "configure:594: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 588 "configure"
+#line 599 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -656,7 +667,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:660: checking host system type" >&5
+echo "configure:671: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -677,7 +688,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:681: checking target system type" >&5
+echo "configure:692: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -695,7 +706,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:699: checking build system type" >&5
+echo "configure:710: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -717,249 +728,49 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:724: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:754: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:805: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:734: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 848 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 742 "configure"
#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
-main(){return(0);}
+int main() {
+strerror()
+; return 0; }
EOF
-if { (eval echo configure:853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
+if { (eval echo configure:753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:884: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:912: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:944: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+ LIBS="$LIBS -lcposix"
else
echo "$ac_t""no" 1>&6
- ISC=
fi
+
+
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
@@ -974,7 +785,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:978: checking for a BSD compatible install" >&5
+echo "configure:789: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1027,7 +838,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1031: checking whether build environment is sane" >&5
+echo "configure:842: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1084,7 +895,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1088: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:899: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1130,7 +941,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1134: checking for working aclocal" >&5
+echo "configure:945: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1143,7 +954,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1147: checking for working autoconf" >&5
+echo "configure:958: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1156,7 +967,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1160: checking for working automake" >&5
+echo "configure:971: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1169,7 +980,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1173: checking for working autoheader" >&5
+echo "configure:984: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1182,7 +993,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1186: checking for working makeinfo" >&5
+echo "configure:997: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1265,6 +1076,228 @@ else
enable_fast_install=yes
fi
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1083: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1113: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1164: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1207 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1243: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1271: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1277,7 +1310,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1281: checking for ld used by GCC" >&5
+echo "configure:1314: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1307,10 +1340,10 @@ echo "configure:1281: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1311: checking for GNU ld" >&5
+echo "configure:1344: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1314: checking for non-GNU ld" >&5
+echo "configure:1347: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1345,7 +1378,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1349: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1382: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1362,7 +1395,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1366: checking for $LD option to reload object files" >&5
+echo "configure:1399: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1374,7 +1407,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1378: checking for BSD-compatible nm" >&5
+echo "configure:1411: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1412,7 +1445,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1416: checking whether ln -s works" >&5
+echo "configure:1449: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1433,7 +1466,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1437: checking how to recognise dependant libraries" >&5
+echo "configure:1470: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1543,7 +1576,7 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
+ alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
@@ -1606,13 +1639,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1610: checking for object suffix" >&5
+echo "configure:1643: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1632,7 +1665,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1636: checking for executable suffix" >&5
+echo "configure:1669: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1642,10 +1675,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1675,7 +1708,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1679: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1712: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1737,7 +1770,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1741: checking for file" >&5
+echo "configure:1774: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1808,7 +1841,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1812: checking for $ac_word" >&5
+echo "configure:1845: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1840,7 +1873,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1844: checking for $ac_word" >&5
+echo "configure:1877: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1875,7 +1908,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1879: checking for $ac_word" >&5
+echo "configure:1912: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1907,7 +1940,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1911: checking for $ac_word" >&5
+echo "configure:1944: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1974,8 +2007,21 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1978 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2011 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@@ -1987,6 +2033,7 @@ case $host in
LD="${LD-ld} -64"
;;
esac
+ fi
fi
rm -rf conftest*
;;
@@ -1994,7 +2041,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2012,7 +2059,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2016: checking whether the C compiler needs -belf" >&5
+echo "configure:2063: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2025,14 +2072,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2029 "configure"
+#line 2076 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2205,7 +2252,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2209: checking for $ac_word" >&5
+echo "configure:2256: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2235,7 +2282,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2239: checking for $ac_word" >&5
+echo "configure:2286: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2286,7 +2333,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2290: checking for $ac_word" >&5
+echo "configure:2337: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2318,7 +2365,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2322: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2329,12 +2376,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2333 "configure"
+#line 2380 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2360,12 +2407,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2364: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2411: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2369: checking whether we are using GNU C" >&5
+echo "configure:2416: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2374,7 +2421,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2393,7 +2440,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2397: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2444: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2430,7 +2477,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2434: checking for $ac_word" >&5
+echo "configure:2481: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2461,7 +2508,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2465: checking how to run the C preprocessor" >&5
+echo "configure:2512: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2476,13 +2523,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
+#line 2527 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2493,13 +2540,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2497 "configure"
+#line 2544 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2510,13 +2557,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2514 "configure"
+#line 2561 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2546,7 +2593,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2550: checking for $ac_word" >&5
+echo "configure:2597: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2579,7 +2626,7 @@ test -n "$LEX" || LEX="$missing_dir/missing flex"
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2583: checking for $ac_word" >&5
+echo "configure:2630: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2613,7 +2660,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2617: checking for yywrap in -l$ac_lib" >&5
+echo "configure:2664: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2621,7 +2668,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2625 "configure"
+#line 2672 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2632,7 +2679,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2655,7 +2702,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2659: checking lex output file root" >&5
+echo "configure:2706: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2676,7 +2723,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2680: checking whether yytext is a pointer" >&5
+echo "configure:2727: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2688,14 +2735,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 2692 "configure"
+#line 2739 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_prog_lex_yytext_pointer=yes
else
@@ -2717,11 +2764,11 @@ EOF
fi
-ALL_LINGUAS="fr tr ja es sv da"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ru"
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2725: checking for $ac_word" >&5
+echo "configure:2772: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2749,12 +2796,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2753: checking for ANSI C header files" >&5
+echo "configure:2800: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2758 "configure"
+#line 2805 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2762,7 +2809,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2779,7 +2826,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2783 "configure"
+#line 2830 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2797,7 +2844,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2801 "configure"
+#line 2848 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2818,7 +2865,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2822 "configure"
+#line 2869 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2829,7 +2876,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2853,12 +2900,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2857: checking for working const" >&5
+echo "configure:2904: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2862 "configure"
+#line 2909 "configure"
#include "confdefs.h"
int main() {
@@ -2907,7 +2954,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2928,21 +2975,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2932: checking for inline" >&5
+echo "configure:2979: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2939 "configure"
+#line 2986 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2968,12 +3015,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2972: checking for off_t" >&5
+echo "configure:3019: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2977 "configure"
+#line 3024 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3001,12 +3048,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3005: checking for size_t" >&5
+echo "configure:3052: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
+#line 3057 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3036,19 +3083,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3040: checking for working alloca.h" >&5
+echo "configure:3087: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3045 "configure"
+#line 3092 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3069,12 +3116,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3073: checking for alloca" >&5
+echo "configure:3120: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3078 "configure"
+#line 3125 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3102,7 +3149,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3134,12 +3181,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3138: checking whether alloca needs Cray hooks" >&5
+echo "configure:3185: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3143 "configure"
+#line 3190 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3164,12 +3211,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3168: checking for $ac_func" >&5
+echo "configure:3215: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3173 "configure"
+#line 3220 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3192,7 +3239,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3219,7 +3266,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3223: checking stack direction for C alloca" >&5
+echo "configure:3270: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3227,7 +3274,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3231 "configure"
+#line 3278 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3246,7 +3293,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3267,21 +3314,21 @@ EOF
fi
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3275: checking for $ac_hdr" >&5
+echo "configure:3322: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3280 "configure"
+#line 3327 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3310,12 +3357,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3314: checking for $ac_func" >&5
+echo "configure:3361: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3319 "configure"
+#line 3366 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3338,7 +3385,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3363,7 +3410,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3367: checking for working mmap" >&5
+echo "configure:3414: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3371,7 +3418,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3375 "configure"
+#line 3422 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3399,24 +3446,11 @@ else
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -3524,7 +3558,7 @@ main()
}
EOF
-if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3552,17 +3586,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3556: checking for $ac_hdr" >&5
+echo "configure:3590: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3561 "configure"
+#line 3595 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3592,12 +3626,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3596: checking for $ac_func" >&5
+echo "configure:3630: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3601 "configure"
+#line 3635 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3620,7 +3654,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3649,12 +3683,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3653: checking for $ac_func" >&5
+echo "configure:3687: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+#line 3692 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3677,7 +3711,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3711,19 +3745,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3715: checking for LC_MESSAGES" >&5
+echo "configure:3749: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3720 "configure"
+#line 3754 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3744,7 +3778,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3748: checking whether NLS is requested" >&5
+echo "configure:3782: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3764,7 +3798,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3768: checking whether included gettext is requested" >&5
+echo "configure:3802: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3783,17 +3817,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3787: checking for libintl.h" >&5
+echo "configure:3821: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3792 "configure"
+#line 3826 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3810,19 +3844,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3814: checking for gettext in libc" >&5
+echo "configure:3848: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3819 "configure"
+#line 3853 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3838,7 +3872,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3842: checking for bindtextdomain in -lintl" >&5
+echo "configure:3876: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3846,7 +3880,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3850 "configure"
+#line 3884 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3857,7 +3891,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3873,19 +3907,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3877: checking for gettext in libintl" >&5
+echo "configure:3911: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3882 "configure"
+#line 3916 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3913,7 +3947,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3917: checking for $ac_word" >&5
+echo "configure:3951: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3947,12 +3981,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3951: checking for $ac_func" >&5
+echo "configure:3985: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3956 "configure"
+#line 3990 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3975,7 +4009,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4002,7 +4036,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4006: checking for $ac_word" >&5
+echo "configure:4040: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4038,7 +4072,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4042: checking for $ac_word" >&5
+echo "configure:4076: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4070,7 +4104,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4074 "configure"
+#line 4108 "configure"
#include "confdefs.h"
int main() {
@@ -4078,7 +4112,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4110,7 +4144,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4114: checking for $ac_word" >&5
+echo "configure:4148: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4144,7 +4178,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4148: checking for $ac_word" >&5
+echo "configure:4182: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4180,7 +4214,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4184: checking for $ac_word" >&5
+echo "configure:4218: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4270,7 +4304,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4274: checking for catalogs to be installed" >&5
+echo "configure:4308: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4298,17 +4332,17 @@ echo "configure:4274: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4302: checking for linux/version.h" >&5
+echo "configure:4336: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4307 "configure"
+#line 4341 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4371,7 +4405,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4375: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4409: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -4396,7 +4430,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4400: checking for executable suffix" >&5
+echo "configure:4434: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4406,10 +4440,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -4449,7 +4483,7 @@ AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4453: checking for $ac_word" >&5
+echo "configure:4487: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4488,7 +4522,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4492: checking for a BSD compatible install" >&5
+echo "configure:4526: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4555,7 +4589,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4559: checking for build system executable suffix" >&5
+echo "configure:4593: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4590,17 +4624,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4594: checking for $ac_hdr" >&5
+echo "configure:4628: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4599 "configure"
+#line 4633 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4627,12 +4661,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4631: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4665: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4636 "configure"
+#line 4670 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -4648,7 +4682,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:4652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -4671,19 +4705,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4675: checking for working alloca.h" >&5
+echo "configure:4709: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4680 "configure"
+#line 4714 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -4704,12 +4738,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4708: checking for alloca" >&5
+echo "configure:4742: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4713 "configure"
+#line 4747 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -4737,7 +4771,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -4769,12 +4803,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4773: checking whether alloca needs Cray hooks" >&5
+echo "configure:4807: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4778 "configure"
+#line 4812 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4799,12 +4833,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4803: checking for $ac_func" >&5
+echo "configure:4837: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4808 "configure"
+#line 4842 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4827,7 +4861,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4854,7 +4888,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4858: checking stack direction for C alloca" >&5
+echo "configure:4892: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4862,7 +4896,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4866 "configure"
+#line 4900 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -4881,7 +4915,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -4905,12 +4939,12 @@ fi
for ac_func in sbrk utimes setmode getc_unlocked strcoll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4909: checking for $ac_func" >&5
+echo "configure:4943: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4914 "configure"
+#line 4948 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4933,7 +4967,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4961,19 +4995,19 @@ done
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
# needs to be defined for it
echo $ac_n "checking for fopen64""... $ac_c" 1>&6
-echo "configure:4965: checking for fopen64" >&5
+echo "configure:4999: checking for fopen64" >&5
if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4970 "configure"
+#line 5004 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = fopen64 ("/tmp/foo","r");
; return 0; }
EOF
-if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
bu_cv_have_fopen64=yes
else
@@ -4983,14 +5017,14 @@ else
saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
cat > conftest.$ac_ext <<EOF
-#line 4987 "configure"
+#line 5021 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = fopen64 ("/tmp/foo","r");
; return 0; }
EOF
-if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE"
else
@@ -5022,14 +5056,14 @@ fi
# Some systems have frexp only in -lm, not in -lc.
echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
-echo "configure:5026: checking for library containing frexp" >&5
+echo "configure:5060: checking for library containing frexp" >&5
if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_frexp="no"
cat > conftest.$ac_ext <<EOF
-#line 5033 "configure"
+#line 5067 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5040,7 +5074,7 @@ int main() {
frexp()
; return 0; }
EOF
-if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_frexp="none required"
else
@@ -5051,7 +5085,7 @@ rm -f conftest*
test "$ac_cv_search_frexp" = "no" && for i in m; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5055 "configure"
+#line 5089 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5062,7 +5096,7 @@ int main() {
frexp()
; return 0; }
EOF
-if { (eval echo configure:5066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_frexp="-l$i"
break
@@ -5084,19 +5118,19 @@ else :
fi
echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:5088: checking for time_t in time.h" >&5
+echo "configure:5122: checking for time_t in time.h" >&5
if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5093 "configure"
+#line 5127 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_time_h=yes
else
@@ -5117,19 +5151,19 @@ EOF
fi
echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5121: checking for time_t in sys/types.h" >&5
+echo "configure:5155: checking for time_t in sys/types.h" >&5
if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5126 "configure"
+#line 5160 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_types_h=yes
else
@@ -5152,12 +5186,12 @@ fi
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
echo $ac_n "checking for utime.h""... $ac_c" 1>&6
-echo "configure:5156: checking for utime.h" >&5
+echo "configure:5190: checking for utime.h" >&5
if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5161 "configure"
+#line 5195 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TIME_H
@@ -5168,7 +5202,7 @@ int main() {
struct utimbuf s;
; return 0; }
EOF
-if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_header_utime_h=yes
else
@@ -5189,12 +5223,12 @@ EOF
fi
echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:5193: checking whether fprintf must be declared" >&5
+echo "configure:5227: checking whether fprintf must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5198 "configure"
+#line 5232 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5215,7 +5249,7 @@ int main() {
char *(*pfn) = (char *(*)) fprintf
; return 0; }
EOF
-if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_fprintf=no
else
@@ -5236,12 +5270,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5240: checking whether strstr must be declared" >&5
+echo "configure:5274: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5245 "configure"
+#line 5279 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5262,7 +5296,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -5283,12 +5317,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:5287: checking whether sbrk must be declared" >&5
+echo "configure:5321: checking whether sbrk must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5292 "configure"
+#line 5326 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5309,7 +5343,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:5313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -5330,12 +5364,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5334: checking whether getenv must be declared" >&5
+echo "configure:5368: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5339 "configure"
+#line 5373 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5356,7 +5390,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:5360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -5377,12 +5411,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5381: checking whether environ must be declared" >&5
+echo "configure:5415: checking whether environ must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5386 "configure"
+#line 5420 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5403,7 +5437,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:5407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -5469,7 +5503,7 @@ do
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
else
case $targ in
- i[3456]86*-*-netware*)
+ i[3-7]86*-*-netware*)
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
;;
@@ -5495,12 +5529,12 @@ do
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- arm-pe* | arm-*-wince)
+ arm-*-pe* | arm-*-wince)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- thumb-pe*)
+ thumb-*-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
@@ -5508,16 +5542,21 @@ do
arm*-* | xscale-* | strongarm-* | d10v-*)
OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
;;
- i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32** | i[3-6]86-*-netbsdpe*)
+ i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
- i3-686-*-interix)
+ i[3-7]86-*-interix)
BUILD_DLLTOOL='$(DLLTOOL_PROG)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
;;
+ powerpc*-aix5.[01])
+ ;;
+ powerpc*-aix5.*)
+ OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
+ ;;
powerpc*-*-pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
@@ -5533,15 +5572,21 @@ do
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- mcore-pe)
+ mcore-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- mcore-*elf)
+ mcore-*-elf)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
+ c4x-*-* | tic4x-*-*)
+ OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=32"
+ ;;
+ ia64-*-*)
+ OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=16"
+ ;;
esac
fi
done
@@ -5572,6 +5617,9 @@ if test "x$targ_underscore" = "xyes"; then
else
UNDERSCORE=0
fi
+cat >> confdefs.h <<EOF
+#define TARGET_PREPENDS_UNDERSCORE $UNDERSCORE
+EOF
# Emulation
@@ -5742,7 +5790,6 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -5754,6 +5801,7 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
@@ -5804,7 +5852,6 @@ s%@BUILD_WINDRES@%$BUILD_WINDRES%g
s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
s%@BUILD_MISC@%$BUILD_MISC%g
s%@OBJDUMP_DEFS@%$OBJDUMP_DEFS%g
-s%@UNDERSCORE@%$UNDERSCORE%g
s%@EMULATION@%$EMULATION%g
s%@EMULATION_VECTOR@%$EMULATION_VECTOR%g
diff --git a/contrib/binutils/binutils/configure.in b/contrib/binutils/binutils/configure.in
index 9ca88e8..8889084 100644
--- a/contrib/binutils/binutils/configure.in
+++ b/contrib/binutils/binutils/configure.in
@@ -64,7 +64,7 @@ AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
-ALL_LINGUAS="fr tr ja es sv da"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ru"
CY_GNU_GETTEXT
AM_MAINTAINER_MODE
@@ -208,7 +208,7 @@ do
else
case $targ in
changequote(,)dnl
- i[3456]86*-*-netware*)
+ i[3-7]86*-*-netware*)
changequote([,])dnl
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
@@ -235,12 +235,12 @@ changequote([,])dnl
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- arm-pe* | arm-*-wince)
+ arm-*-pe* | arm-*-wince)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- thumb-pe*)
+ thumb-*-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
@@ -249,17 +249,26 @@ changequote([,])dnl
OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
;;
changequote(,)dnl
- i[3-6]86-pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32** | i[3-6]86-*-netbsdpe*)
+ i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
- i[3-6]86-*-interix)
+changequote(,)dnl
+ i[3-7]86-*-interix)
+changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
;;
+changequote(,)dnl
+ powerpc*-aix5.[01])
+changequote([,])dnl
+ ;;
+ powerpc*-aix5.*)
+ OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
+ ;;
powerpc*-*-pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
@@ -275,15 +284,21 @@ changequote([,])dnl
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- mcore-pe)
+ mcore-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- mcore-*elf)
+ mcore-*-elf)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
+ c4x-*-* | tic4x-*-*)
+ OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=32"
+ ;;
+ ia64-*-*)
+ OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=16"
+ ;;
esac
fi
done
@@ -311,7 +326,8 @@ if test "x$targ_underscore" = "xyes"; then
else
UNDERSCORE=0
fi
-AC_SUBST(UNDERSCORE)
+AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE,
+ [Define to 1 if user symbol names have a leading underscore, 0 if not.])
# Emulation
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
diff --git a/contrib/binutils/binutils/cxxfilt.c b/contrib/binutils/binutils/cxxfilt.c
new file mode 100644
index 0000000..1b297fd
--- /dev/null
+++ b/contrib/binutils/binutils/cxxfilt.c
@@ -0,0 +1,291 @@
+/* Demangler for GNU C++ - main program
+ Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Written by James Clark (jjc@jclark.uucp)
+ Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
+ Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
+
+#include "config.h"
+#include "bfd.h"
+#include "bucomm.h"
+#include "libiberty.h"
+#include "demangle.h"
+#include "getopt.h"
+#include "safe-ctype.h"
+
+static int flags = DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE;
+
+static void demangle_it (char *);
+static void usage (FILE *, int) ATTRIBUTE_NORETURN;
+static void print_demangler_list (FILE *);
+
+static void
+demangle_it (char *mangled_name)
+{
+ char *result;
+
+ /* For command line args, also try to demangle type encodings. */
+ result = cplus_demangle (mangled_name, flags | DMGL_TYPES);
+ if (result == NULL)
+ {
+ printf ("%s\n", mangled_name);
+ }
+ else
+ {
+ printf ("%s\n", result);
+ free (result);
+ }
+}
+
+static void
+print_demangler_list (FILE *stream)
+{
+ const struct demangler_engine *demangler;
+
+ fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
+
+ for (demangler = libiberty_demanglers + 1;
+ demangler->demangling_style != unknown_demangling;
+ ++demangler)
+ fprintf (stream, ",%s", demangler->demangling_style_name);
+
+ fprintf (stream, "}");
+}
+
+static void
+usage (FILE *stream, int status)
+{
+ fprintf (stream, "\
+Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores]\n\
+ [-p] [--no-params]\n",
+ program_name);
+
+ fprintf (stream, "\
+ [-s ");
+ print_demangler_list (stream);
+ fprintf (stream, "]\n");
+
+ fprintf (stream, "\
+ [--format ");
+ print_demangler_list (stream);
+ fprintf (stream, "]\n");
+
+ fprintf (stream, "\
+ [--help] [--version] [arg...]\n");
+ exit (status);
+}
+
+#define MBUF_SIZE 32767
+char mbuffer[MBUF_SIZE];
+
+int strip_underscore = 0;
+
+static const struct option long_options[] = {
+ {"strip-underscores", no_argument, 0, '_'},
+ {"format", required_argument, 0, 's'},
+ {"help", no_argument, 0, 'h'},
+ {"no-params", no_argument, 0, 'p'},
+ {"no-strip-underscores", no_argument, 0, 'n'},
+ {"version", no_argument, 0, 'v'},
+ {0, no_argument, 0, 0}
+};
+
+static const char *standard_symbol_characters (void);
+
+static const char *hp_symbol_characters (void);
+
+/* Return the string of non-alnum characters that may occur
+ as a valid symbol component, in the standard assembler symbol
+ syntax. */
+
+static const char *
+standard_symbol_characters (void)
+{
+ return "_$.";
+}
+
+
+/* Return the string of non-alnum characters that may occur
+ as a valid symbol name component in an HP object file.
+
+ Note that, since HP's compiler generates object code straight from
+ C++ source, without going through an assembler, its mangled
+ identifiers can use all sorts of characters that no assembler would
+ tolerate, so the alphabet this function creates is a little odd.
+ Here are some sample mangled identifiers offered by HP:
+
+ typeid*__XT24AddressIndExpClassMember_
+ [Vftptr]key:__dt__32OrdinaryCompareIndExpClassMemberFv
+ __ct__Q2_9Elf64_Dyn18{unnamed.union.#1}Fv
+
+ This still seems really weird to me, since nowhere else in this
+ file is there anything to recognize curly brackets, parens, etc.
+ I've talked with Srikanth <srikanth@cup.hp.com>, and he assures me
+ this is right, but I still strongly suspect that there's a
+ misunderstanding here.
+
+ If we decide it's better for c++filt to use HP's assembler syntax
+ to scrape identifiers out of its input, here's the definition of
+ the symbol name syntax from the HP assembler manual:
+
+ Symbols are composed of uppercase and lowercase letters, decimal
+ digits, dollar symbol, period (.), ampersand (&), pound sign(#) and
+ underscore (_). A symbol can begin with a letter, digit underscore or
+ dollar sign. If a symbol begins with a digit, it must contain a
+ non-digit character.
+
+ So have fun. */
+static const char *
+hp_symbol_characters (void)
+{
+ return "_$.<>#,*&[]:(){}";
+}
+
+extern int main (int, char **);
+
+int
+main (int argc, char **argv)
+{
+ char *result;
+ int c;
+ const char *valid_symbols;
+ enum demangling_styles style = auto_demangling;
+
+ program_name = argv[0];
+ xmalloc_set_program_name (program_name);
+
+ strip_underscore = TARGET_PREPENDS_UNDERSCORE;
+
+ while ((c = getopt_long (argc, argv, "_nps:", long_options, (int *) 0)) != EOF)
+ {
+ switch (c)
+ {
+ case '?':
+ usage (stderr, 1);
+ break;
+ case 'h':
+ usage (stdout, 0);
+ case 'n':
+ strip_underscore = 0;
+ break;
+ case 'p':
+ flags &= ~ DMGL_PARAMS;
+ break;
+ case 'v':
+ print_version ("c++filt");
+ return (0);
+ case '_':
+ strip_underscore = 1;
+ break;
+ case 's':
+ {
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ {
+ fprintf (stderr, "%s: unknown demangling style `%s'\n",
+ program_name, optarg);
+ return (1);
+ }
+ else
+ cplus_demangle_set_style (style);
+ }
+ break;
+ }
+ }
+
+ if (optind < argc)
+ {
+ for ( ; optind < argc; optind++)
+ {
+ demangle_it (argv[optind]);
+ }
+ }
+ else
+ {
+ switch (current_demangling_style)
+ {
+ case gnu_demangling:
+ case lucid_demangling:
+ case arm_demangling:
+ case java_demangling:
+ case edg_demangling:
+ case gnat_demangling:
+ case gnu_v3_demangling:
+ case auto_demangling:
+ valid_symbols = standard_symbol_characters ();
+ break;
+ case hp_demangling:
+ valid_symbols = hp_symbol_characters ();
+ break;
+ default:
+ /* Folks should explicitly indicate the appropriate alphabet for
+ each demangling. Providing a default would allow the
+ question to go unconsidered. */
+ fatal ("Internal error: no symbol alphabet for current style");
+ }
+
+ for (;;)
+ {
+ int i = 0;
+ c = getchar ();
+ /* Try to read a label. */
+ while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
+ {
+ if (i >= MBUF_SIZE-1)
+ break;
+ mbuffer[i++] = c;
+ c = getchar ();
+ }
+ if (i > 0)
+ {
+ int skip_first = 0;
+
+ mbuffer[i] = 0;
+ if (mbuffer[0] == '.' || mbuffer[0] == '$')
+ ++skip_first;
+ if (strip_underscore && mbuffer[skip_first] == '_')
+ ++skip_first;
+
+ if (skip_first > i)
+ skip_first = i;
+
+ flags |= (int) style;
+ result = cplus_demangle (mbuffer + skip_first, flags);
+ if (result)
+ {
+ if (mbuffer[0] == '.')
+ putc ('.', stdout);
+ fputs (result, stdout);
+ free (result);
+ }
+ else
+ fputs (mbuffer, stdout);
+
+ fflush (stdout);
+ }
+ if (c == EOF)
+ break;
+ putchar (c);
+ fflush (stdout);
+ }
+ }
+
+ return (0);
+}
diff --git a/contrib/binutils/binutils/debug.c b/contrib/binutils/binutils/debug.c
index 3ce609b..5d46b78 100644
--- a/contrib/binutils/binutils/debug.c
+++ b/contrib/binutils/binutils/debug.c
@@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information.
- Copyright 1995, 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -22,7 +22,7 @@
/* This file implements a generic debugging format. We may eventually
have readers which convert different formats into this generic
format, and writers which write it out. The initial impetus for
- this was writing a convertor from stabs to HP IEEE-695 debugging
+ this was writing a converter from stabs to HP IEEE-695 debugging
format. */
#include <stdio.h>
@@ -111,7 +111,7 @@ struct debug_type
struct debug_indirect_type *kindirect;
/* DEBUG_KIND_INT. */
/* Whether the integer is unsigned. */
- boolean kint;
+ bfd_boolean kint;
/* DEBUG_KIND_STRUCT, DEBUG_KIND_UNION, DEBUG_KIND_CLASS,
DEBUG_KIND_UNION_CLASS. */
struct debug_class_type *kclass;
@@ -194,7 +194,7 @@ struct debug_function_type
/* NULL terminated array of argument types. */
debug_type *arg_types;
/* Whether the function takes a variable number of arguments. */
- boolean varargs;
+ bfd_boolean varargs;
};
/* Information kept for a range. */
@@ -222,7 +222,7 @@ struct debug_array_type
/* Upper bound. */
bfd_signed_vma upper;
/* Whether this array is really a string. */
- boolean stringp;
+ bfd_boolean stringp;
};
/* Information kept for a set. */
@@ -232,7 +232,7 @@ struct debug_set_type
/* Base type. */
debug_type type;
/* Whether this set is really a bitstring. */
- boolean bitstringp;
+ bfd_boolean bitstringp;
};
/* Information kept for an offset type (a based pointer). */
@@ -256,7 +256,7 @@ struct debug_method_type
/* A NULL terminated array of argument types. */
debug_type *arg_types;
/* Whether the method takes a variable number of arguments. */
- boolean varargs;
+ bfd_boolean varargs;
};
/* Information kept for a named type. */
@@ -280,7 +280,7 @@ struct debug_field
/* Visibility of the field. */
enum debug_visibility visibility;
/* Whether this is a static member. */
- boolean static_member;
+ bfd_boolean static_member;
union
{
/* If static_member is false. */
@@ -308,7 +308,7 @@ struct debug_baseclass
/* Bit position of the base class in the object. */
unsigned int bitpos;
/* Whether the base class is virtual. */
- boolean virtual;
+ bfd_boolean virtual;
/* Visibility of the base class. */
enum debug_visibility visibility;
};
@@ -335,9 +335,9 @@ struct debug_method_variant
/* The visibility of the function. */
enum debug_visibility visibility;
/* Whether the function is const. */
- boolean constp;
+ bfd_boolean constp;
/* Whether the function is volatile. */
- boolean volatilep;
+ bfd_boolean volatilep;
/* The offset to the function in the virtual function table. */
bfd_vma voffset;
/* If voffset is VOFFSET_STATIC_METHOD, this is a static method. */
@@ -554,47 +554,45 @@ struct debug_type_real_list
/* Local functions. */
-static void debug_error PARAMS ((const char *));
+static void debug_error (const char *);
static struct debug_name *debug_add_to_namespace
- PARAMS ((struct debug_handle *, struct debug_namespace **, const char *,
- enum debug_object_kind, enum debug_object_linkage));
+ (struct debug_handle *, struct debug_namespace **, const char *,
+ enum debug_object_kind, enum debug_object_linkage);
static struct debug_name *debug_add_to_current_namespace
- PARAMS ((struct debug_handle *, const char *, enum debug_object_kind,
- enum debug_object_linkage));
+ (struct debug_handle *, const char *, enum debug_object_kind,
+ enum debug_object_linkage);
static struct debug_type *debug_make_type
- PARAMS ((struct debug_handle *, enum debug_type_kind, unsigned int));
+ (struct debug_handle *, enum debug_type_kind, unsigned int);
static struct debug_type *debug_get_real_type
- PARAMS ((PTR, debug_type, struct debug_type_real_list *));
-static boolean debug_write_name
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_name *));
-static boolean debug_write_type
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_type *, struct debug_name *));
-static boolean debug_write_class_type
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_type *, const char *));
-static boolean debug_write_function
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- const char *, enum debug_object_linkage, struct debug_function *));
-static boolean debug_write_block
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- struct debug_block *));
-static boolean debug_write_linenos
- PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
- bfd_vma));
-static boolean debug_set_class_id
- PARAMS ((struct debug_handle *, const char *, struct debug_type *));
-static boolean debug_type_samep
- PARAMS ((struct debug_handle *, struct debug_type *, struct debug_type *));
-static boolean debug_class_type_samep
- PARAMS ((struct debug_handle *, struct debug_type *, struct debug_type *));
+ (void *, debug_type, struct debug_type_real_list *);
+static bfd_boolean debug_write_name
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_name *);
+static bfd_boolean debug_write_type
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_type *, struct debug_name *);
+static bfd_boolean debug_write_class_type
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_type *, const char *);
+static bfd_boolean debug_write_function
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ const char *, enum debug_object_linkage, struct debug_function *);
+static bfd_boolean debug_write_block
+ (struct debug_handle *, const struct debug_write_fns *, void *,
+ struct debug_block *);
+static bfd_boolean debug_write_linenos
+ (struct debug_handle *, const struct debug_write_fns *, void *, bfd_vma);
+static bfd_boolean debug_set_class_id
+ (struct debug_handle *, const char *, struct debug_type *);
+static bfd_boolean debug_type_samep
+ (struct debug_handle *, struct debug_type *, struct debug_type *);
+static bfd_boolean debug_class_type_samep
+ (struct debug_handle *, struct debug_type *, struct debug_type *);
/* Issue an error message. */
static void
-debug_error (message)
- const char *message;
+debug_error (const char *message)
{
fprintf (stderr, "%s\n", message);
}
@@ -602,12 +600,10 @@ debug_error (message)
/* Add an object to a namespace. */
static struct debug_name *
-debug_add_to_namespace (info, nsp, name, kind, linkage)
- struct debug_handle *info ATTRIBUTE_UNUSED;
- struct debug_namespace **nsp;
- const char *name;
- enum debug_object_kind kind;
- enum debug_object_linkage linkage;
+debug_add_to_namespace (struct debug_handle *info ATTRIBUTE_UNUSED,
+ struct debug_namespace **nsp, const char *name,
+ enum debug_object_kind kind,
+ enum debug_object_linkage linkage)
{
struct debug_name *n;
struct debug_namespace *ns;
@@ -639,11 +635,9 @@ debug_add_to_namespace (info, nsp, name, kind, linkage)
/* Add an object to the current namespace. */
static struct debug_name *
-debug_add_to_current_namespace (info, name, kind, linkage)
- struct debug_handle *info;
- const char *name;
- enum debug_object_kind kind;
- enum debug_object_linkage linkage;
+debug_add_to_current_namespace (struct debug_handle *info, const char *name,
+ enum debug_object_kind kind,
+ enum debug_object_linkage linkage)
{
struct debug_namespace **nsp;
@@ -664,23 +658,21 @@ debug_add_to_current_namespace (info, name, kind, linkage)
/* Return a handle for debugging information. */
-PTR
-debug_init ()
+void *
+debug_init (void)
{
struct debug_handle *ret;
ret = (struct debug_handle *) xmalloc (sizeof *ret);
memset (ret, 0, sizeof *ret);
- return (PTR) ret;
+ return (void *) ret;
}
/* Set the source filename. This implicitly starts a new compilation
unit. */
-boolean
-debug_set_filename (handle, name)
- PTR handle;
- const char *name;
+bfd_boolean
+debug_set_filename (void *handle, const char *name)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_file *nfile;
@@ -714,16 +706,14 @@ debug_set_filename (handle, name)
info->current_block = NULL;
info->current_lineno = NULL;
- return true;
+ return TRUE;
}
/* Change source files to the given file name. This is used for
include files in a single compilation unit. */
-boolean
-debug_start_source (handle, name)
- PTR handle;
- const char *name;
+bfd_boolean
+debug_start_source (void *handle, const char *name)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_file *f, **pf;
@@ -734,7 +724,7 @@ debug_start_source (handle, name)
if (info->current_unit == NULL)
{
debug_error (_("debug_start_source: no debug_set_filename call"));
- return false;
+ return FALSE;
}
for (f = info->current_unit->files; f != NULL; f = f->next)
@@ -744,7 +734,7 @@ debug_start_source (handle, name)
&& strcmp (f->filename, name) == 0)
{
info->current_file = f;
- return true;
+ return TRUE;
}
}
@@ -761,7 +751,7 @@ debug_start_source (handle, name)
info->current_file = f;
- return true;
+ return TRUE;
}
/* Record a function definition. This implicitly starts a function
@@ -772,13 +762,10 @@ debug_start_source (handle, name)
debug_record_parameter. FIXME: There is no way to specify nested
functions. */
-boolean
-debug_record_function (handle, name, return_type, global, addr)
- PTR handle;
- const char *name;
- debug_type return_type;
- boolean global;
- bfd_vma addr;
+bfd_boolean
+debug_record_function (void *handle, const char *name,
+ debug_type return_type, bfd_boolean global,
+ bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_function *f;
@@ -788,12 +775,12 @@ debug_record_function (handle, name, return_type, global, addr)
if (name == NULL)
name = "";
if (return_type == NULL)
- return false;
+ return FALSE;
if (info->current_unit == NULL)
{
debug_error (_("debug_record_function: no debug_set_filename call"));
- return false;
+ return FALSE;
}
f = (struct debug_function *) xmalloc (sizeof *f);
@@ -822,34 +809,30 @@ debug_record_function (handle, name, return_type, global, addr)
? DEBUG_LINKAGE_GLOBAL
: DEBUG_LINKAGE_STATIC));
if (n == NULL)
- return false;
+ return FALSE;
n->u.function = f;
- return true;
+ return TRUE;
}
/* Record a parameter for the current function. */
-boolean
-debug_record_parameter (handle, name, type, kind, val)
- PTR handle;
- const char *name;
- debug_type type;
- enum debug_parm_kind kind;
- bfd_vma val;
+bfd_boolean
+debug_record_parameter (void *handle, const char *name, debug_type type,
+ enum debug_parm_kind kind, bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_parameter *p, **pp;
if (name == NULL || type == NULL)
- return false;
+ return FALSE;
if (info->current_unit == NULL
|| info->current_function == NULL)
{
debug_error (_("debug_record_parameter: no current function"));
- return false;
+ return FALSE;
}
p = (struct debug_parameter *) xmalloc (sizeof *p);
@@ -866,15 +849,13 @@ debug_record_parameter (handle, name, type, kind, val)
;
*pp = p;
- return true;
+ return TRUE;
}
/* End a function. FIXME: This should handle function nesting. */
-boolean
-debug_end_function (handle, addr)
- PTR handle;
- bfd_vma addr;
+bfd_boolean
+debug_end_function (void *handle, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -883,13 +864,13 @@ debug_end_function (handle, addr)
|| info->current_function == NULL)
{
debug_error (_("debug_end_function: no current function"));
- return false;
+ return FALSE;
}
if (info->current_block->parent != NULL)
{
debug_error (_("debug_end_function: some blocks were not closed"));
- return false;
+ return FALSE;
}
info->current_block->end = addr;
@@ -897,7 +878,7 @@ debug_end_function (handle, addr)
info->current_function = NULL;
info->current_block = NULL;
- return true;
+ return TRUE;
}
/* Start a block in a function. All local information will be
@@ -905,10 +886,8 @@ debug_end_function (handle, addr)
debug_start_block and debug_end_block may be nested. The bfd_vma
argument is the address at which this block starts. */
-boolean
-debug_start_block (handle, addr)
- PTR handle;
- bfd_vma addr;
+bfd_boolean
+debug_start_block (void *handle, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_block *b, **pb;
@@ -919,7 +898,7 @@ debug_start_block (handle, addr)
|| info->current_block == NULL)
{
debug_error (_("debug_start_block: no current block"));
- return false;
+ return FALSE;
}
b = (struct debug_block *) xmalloc (sizeof *b);
@@ -938,17 +917,15 @@ debug_start_block (handle, addr)
info->current_block = b;
- return true;
+ return TRUE;
}
/* Finish a block in a function. This matches the call to
debug_start_block. The argument is the address at which this block
ends. */
-boolean
-debug_end_block (handle, addr)
- PTR handle;
- bfd_vma addr;
+bfd_boolean
+debug_end_block (void *handle, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_block *parent;
@@ -957,31 +934,28 @@ debug_end_block (handle, addr)
|| info->current_block == NULL)
{
debug_error (_("debug_end_block: no current block"));
- return false;
+ return FALSE;
}
parent = info->current_block->parent;
if (parent == NULL)
{
debug_error (_("debug_end_block: attempt to close top level block"));
- return false;
+ return FALSE;
}
info->current_block->end = addr;
info->current_block = parent;
- return true;
+ return TRUE;
}
/* Associate a line number in the current source file and function
with a given address. */
-boolean
-debug_record_line (handle, lineno, addr)
- PTR handle;
- unsigned long lineno;
- bfd_vma addr;
+bfd_boolean
+debug_record_line (void *handle, unsigned long lineno, bfd_vma addr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_lineno *l;
@@ -990,7 +964,7 @@ debug_record_line (handle, lineno, addr)
if (info->current_unit == NULL)
{
debug_error (_("debug_record_line: no current unit"));
- return false;
+ return FALSE;
}
l = info->current_lineno;
@@ -1002,7 +976,7 @@ debug_record_line (handle, lineno, addr)
{
l->linenos[i] = lineno;
l->addrs[i] = addr;
- return true;
+ return TRUE;
}
}
}
@@ -1031,102 +1005,91 @@ debug_record_line (handle, lineno, addr)
info->current_lineno = l;
- return true;
+ return TRUE;
}
/* Start a named common block. This is a block of variables that may
move in memory. */
-boolean
-debug_start_common_block (handle, name)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
+bfd_boolean
+debug_start_common_block (void *handle ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED)
{
/* FIXME */
debug_error (_("debug_start_common_block: not implemented"));
- return false;
+ return FALSE;
}
/* End a named common block. */
-boolean
-debug_end_common_block (handle, name)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
+bfd_boolean
+debug_end_common_block (void *handle ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED)
{
/* FIXME */
debug_error (_("debug_end_common_block: not implemented"));
- return false;
+ return FALSE;
}
/* Record a named integer constant. */
-boolean
-debug_record_int_const (handle, name, val)
- PTR handle;
- const char *name;
- bfd_vma val;
+bfd_boolean
+debug_record_int_const (void *handle, const char *name, bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_name *n;
if (name == NULL)
- return false;
+ return FALSE;
n = debug_add_to_current_namespace (info, name, DEBUG_OBJECT_INT_CONSTANT,
DEBUG_LINKAGE_NONE);
if (n == NULL)
- return false;
+ return FALSE;
n->u.int_constant = val;
- return true;
+ return TRUE;
}
/* Record a named floating point constant. */
-boolean
-debug_record_float_const (handle, name, val)
- PTR handle;
- const char *name;
- double val;
+bfd_boolean
+debug_record_float_const (void *handle, const char *name, double val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_name *n;
if (name == NULL)
- return false;
+ return FALSE;
n = debug_add_to_current_namespace (info, name, DEBUG_OBJECT_FLOAT_CONSTANT,
DEBUG_LINKAGE_NONE);
if (n == NULL)
- return false;
+ return FALSE;
n->u.float_constant = val;
- return true;
+ return TRUE;
}
/* Record a typed constant with an integral value. */
-boolean
-debug_record_typed_const (handle, name, type, val)
- PTR handle;
- const char *name;
- debug_type type;
- bfd_vma val;
+bfd_boolean
+debug_record_typed_const (void *handle, const char *name, debug_type type,
+ bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_name *n;
struct debug_typed_constant *tc;
if (name == NULL || type == NULL)
- return false;
+ return FALSE;
n = debug_add_to_current_namespace (info, name, DEBUG_OBJECT_TYPED_CONSTANT,
DEBUG_LINKAGE_NONE);
if (n == NULL)
- return false;
+ return FALSE;
tc = (struct debug_typed_constant *) xmalloc (sizeof *tc);
memset (tc, 0, sizeof *tc);
@@ -1136,32 +1099,27 @@ debug_record_typed_const (handle, name, type, val)
n->u.typed_constant = tc;
- return true;
+ return TRUE;
}
/* Record a label. */
-boolean
-debug_record_label (handle, name, type, addr)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
- debug_type type ATTRIBUTE_UNUSED;
- bfd_vma addr ATTRIBUTE_UNUSED;
+bfd_boolean
+debug_record_label (void *handle ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ debug_type type ATTRIBUTE_UNUSED,
+ bfd_vma addr ATTRIBUTE_UNUSED)
{
/* FIXME. */
debug_error (_("debug_record_label: not implemented"));
- return false;
+ return FALSE;
}
/* Record a variable. */
-boolean
-debug_record_variable (handle, name, type, kind, val)
- PTR handle;
- const char *name;
- debug_type type;
- enum debug_var_kind kind;
- bfd_vma val;
+bfd_boolean
+debug_record_variable (void *handle, const char *name, debug_type type,
+ enum debug_var_kind kind, bfd_vma val)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_namespace **nsp;
@@ -1170,13 +1128,13 @@ debug_record_variable (handle, name, type, kind, val)
struct debug_variable *v;
if (name == NULL || type == NULL)
- return false;
+ return FALSE;
if (info->current_unit == NULL
|| info->current_file == NULL)
{
debug_error (_("debug_record_variable: no current file"));
- return false;
+ return FALSE;
}
if (kind == DEBUG_GLOBAL || kind == DEBUG_STATIC)
@@ -1190,17 +1148,15 @@ debug_record_variable (handle, name, type, kind, val)
else
{
if (info->current_block == NULL)
- {
- debug_error (_("debug_record_variable: no current block"));
- return false;
- }
- nsp = &info->current_block->locals;
+ nsp = &info->current_file->globals;
+ else
+ nsp = &info->current_block->locals;
linkage = DEBUG_LINKAGE_AUTOMATIC;
}
n = debug_add_to_namespace (info, nsp, name, DEBUG_OBJECT_VARIABLE, linkage);
if (n == NULL)
- return false;
+ return FALSE;
v = (struct debug_variable *) xmalloc (sizeof *v);
memset (v, 0, sizeof *v);
@@ -1211,16 +1167,14 @@ debug_record_variable (handle, name, type, kind, val)
n->u.variable = v;
- return true;
+ return TRUE;
}
/* Make a type with a given kind and size. */
static struct debug_type *
-debug_make_type (info, kind, size)
- struct debug_handle *info ATTRIBUTE_UNUSED;
- enum debug_type_kind kind;
- unsigned int size;
+debug_make_type (struct debug_handle *info ATTRIBUTE_UNUSED,
+ enum debug_type_kind kind, unsigned int size)
{
struct debug_type *t;
@@ -1237,10 +1191,7 @@ debug_make_type (info, kind, size)
which is referenced before it is defined. */
debug_type
-debug_make_indirect_type (handle, slot, tag)
- PTR handle;
- debug_type *slot;
- const char *tag;
+debug_make_indirect_type (void *handle, debug_type *slot, const char *tag)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1264,8 +1215,7 @@ debug_make_indirect_type (handle, slot, tag)
/* Make a void type. There is only one of these. */
debug_type
-debug_make_void_type (handle)
- PTR handle;
+debug_make_void_type (void *handle)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1276,10 +1226,7 @@ debug_make_void_type (handle)
if the integer is unsigned. */
debug_type
-debug_make_int_type (handle, size, unsignedp)
- PTR handle;
- unsigned int size;
- boolean unsignedp;
+debug_make_int_type (void *handle, unsigned int size, bfd_boolean unsignedp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1298,9 +1245,7 @@ debug_make_int_type (handle, size, unsignedp)
the format. */
debug_type
-debug_make_float_type (handle, size)
- PTR handle;
- unsigned int size;
+debug_make_float_type (void *handle, unsigned int size)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1310,9 +1255,7 @@ debug_make_float_type (handle, size)
/* Make a boolean type of a given size. */
debug_type
-debug_make_bool_type (handle, size)
- PTR handle;
- unsigned int size;
+debug_make_bool_type (void *handle, unsigned int size)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1322,9 +1265,7 @@ debug_make_bool_type (handle, size)
/* Make a complex type of a given size. */
debug_type
-debug_make_complex_type (handle, size)
- PTR handle;
- unsigned int size;
+debug_make_complex_type (void *handle, unsigned int size)
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -1336,11 +1277,8 @@ debug_make_complex_type (handle, size)
The fourth argument is a NULL terminated array of fields. */
debug_type
-debug_make_struct_type (handle, structp, size, fields)
- PTR handle;
- boolean structp;
- bfd_vma size;
- debug_field *fields;
+debug_make_struct_type (void *handle, bfd_boolean structp, bfd_vma size,
+ debug_field *fields)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1370,16 +1308,10 @@ debug_make_struct_type (handle, structp, size, fields)
object has its own virtual function table. */
debug_type
-debug_make_object_type (handle, structp, size, fields, baseclasses,
- methods, vptrbase, ownvptr)
- PTR handle;
- boolean structp;
- bfd_vma size;
- debug_field *fields;
- debug_baseclass *baseclasses;
- debug_method *methods;
- debug_type vptrbase;
- boolean ownvptr;
+debug_make_object_type (void *handle, bfd_boolean structp, bfd_vma size,
+ debug_field *fields, debug_baseclass *baseclasses,
+ debug_method *methods, debug_type vptrbase,
+ bfd_boolean ownvptr)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1411,10 +1343,8 @@ debug_make_object_type (handle, structp, size, fields, baseclasses,
array of strings, and an array of corresponding values. */
debug_type
-debug_make_enum_type (handle, names, values)
- PTR handle;
- const char **names;
- bfd_signed_vma *values;
+debug_make_enum_type (void *handle, const char **names,
+ bfd_signed_vma *values)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1438,9 +1368,7 @@ debug_make_enum_type (handle, names, values)
/* Make a pointer to a given type. */
debug_type
-debug_make_pointer_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_pointer_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1466,11 +1394,8 @@ debug_make_pointer_type (handle, type)
to record the parameter types. */
debug_type
-debug_make_function_type (handle, type, arg_types, varargs)
- PTR handle;
- debug_type type;
- debug_type *arg_types;
- boolean varargs;
+debug_make_function_type (void *handle, debug_type type,
+ debug_type *arg_types, bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1498,9 +1423,7 @@ debug_make_function_type (handle, type, arg_types, varargs)
/* Make a reference to a given type. */
debug_type
-debug_make_reference_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_reference_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1520,11 +1443,8 @@ debug_make_reference_type (handle, type)
/* Make a range of a given type from a lower to an upper bound. */
debug_type
-debug_make_range_type (handle, type, lower, upper)
- PTR handle;
- debug_type type;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
+debug_make_range_type (void *handle, debug_type type, bfd_signed_vma lower,
+ bfd_signed_vma upper)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1556,14 +1476,9 @@ debug_make_range_type (handle, type, lower, upper)
actually a string, as in C. */
debug_type
-debug_make_array_type (handle, element_type, range_type, lower, upper,
- stringp)
- PTR handle;
- debug_type element_type;
- debug_type range_type;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
- boolean stringp;
+debug_make_array_type (void *handle, debug_type element_type,
+ debug_type range_type, bfd_signed_vma lower,
+ bfd_signed_vma upper, bfd_boolean stringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1595,10 +1510,7 @@ debug_make_array_type (handle, element_type, range_type, lower, upper,
CHILL. */
debug_type
-debug_make_set_type (handle, type, bitstringp)
- PTR handle;
- debug_type type;
- boolean bitstringp;
+debug_make_set_type (void *handle, debug_type type, bfd_boolean bitstringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1628,10 +1540,8 @@ debug_make_set_type (handle, type, bitstringp)
to. */
debug_type
-debug_make_offset_type (handle, base_type, target_type)
- PTR handle;
- debug_type base_type;
- debug_type target_type;
+debug_make_offset_type (void *handle, debug_type base_type,
+ debug_type target_type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1660,12 +1570,9 @@ debug_make_offset_type (handle, base_type, target_type)
argument is a NULL terminated array of argument types. */
debug_type
-debug_make_method_type (handle, return_type, domain_type, arg_types, varargs)
- PTR handle;
- debug_type return_type;
- debug_type domain_type;
- debug_type *arg_types;
- boolean varargs;
+debug_make_method_type (void *handle, debug_type return_type,
+ debug_type domain_type, debug_type *arg_types,
+ bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1694,9 +1601,7 @@ debug_make_method_type (handle, return_type, domain_type, arg_types, varargs)
/* Make a const qualified version of a given type. */
debug_type
-debug_make_const_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_const_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1716,9 +1621,7 @@ debug_make_const_type (handle, type)
/* Make a volatile qualified version of a given type. */
debug_type
-debug_make_volatile_type (handle, type)
- PTR handle;
- debug_type type;
+debug_make_volatile_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1739,10 +1642,8 @@ debug_make_volatile_type (handle, type)
been mentioned, but not defined. */
debug_type
-debug_make_undefined_tagged_type (handle, name, kind)
- PTR handle;
- const char *name;
- enum debug_type_kind kind;
+debug_make_undefined_tagged_type (void *handle, const char *name,
+ enum debug_type_kind kind)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1778,12 +1679,9 @@ debug_make_undefined_tagged_type (handle, name, kind)
argument is the visibility of the base class. */
debug_baseclass
-debug_make_baseclass (handle, type, bitpos, virtual, visibility)
- PTR handle ATTRIBUTE_UNUSED;
- debug_type type;
- bfd_vma bitpos;
- boolean virtual;
- enum debug_visibility visibility;
+debug_make_baseclass (void *handle ATTRIBUTE_UNUSED, debug_type type,
+ bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct debug_baseclass *b;
@@ -1805,13 +1703,9 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
of the field. */
debug_field
-debug_make_field (handle, name, type, bitpos, bitsize, visibility)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name;
- debug_type type;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+debug_make_field (void *handle ATTRIBUTE_UNUSED, const char *name,
+ debug_type type, bfd_vma bitpos, bfd_vma bitsize,
+ enum debug_visibility visibility)
{
struct debug_field *f;
@@ -1820,7 +1714,7 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
f->name = name;
f->type = type;
- f->static_member = false;
+ f->static_member = FALSE;
f->u.f.bitpos = bitpos;
f->u.f.bitsize = bitsize;
f->visibility = visibility;
@@ -1835,12 +1729,9 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
member. */
debug_field
-debug_make_static_member (handle, name, type, physname, visibility)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name;
- debug_type type;
- const char *physname;
- enum debug_visibility visibility;
+debug_make_static_member (void *handle ATTRIBUTE_UNUSED, const char *name,
+ debug_type type, const char *physname,
+ enum debug_visibility visibility)
{
struct debug_field *f;
@@ -1849,7 +1740,7 @@ debug_make_static_member (handle, name, type, physname, visibility)
f->name = name;
f->type = type;
- f->static_member = true;
+ f->static_member = TRUE;
f->u.s.physname = physname;
f->visibility = visibility;
@@ -1860,10 +1751,8 @@ debug_make_static_member (handle, name, type, physname, visibility)
argument is a NULL terminated array of method variants. */
debug_method
-debug_make_method (handle, name, variants)
- PTR handle ATTRIBUTE_UNUSED;
- const char *name;
- debug_method_variant *variants;
+debug_make_method (void *handle ATTRIBUTE_UNUSED, const char *name,
+ debug_method_variant *variants)
{
struct debug_method *m;
@@ -1886,16 +1775,11 @@ debug_make_method (handle, name, variants)
necessary? Could we just use debug_make_const_type? */
debug_method_variant
-debug_make_method_variant (handle, physname, type, visibility, constp,
- volatilep, voffset, context)
- PTR handle ATTRIBUTE_UNUSED;
- const char *physname;
- debug_type type;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
- bfd_vma voffset;
- debug_type context;
+debug_make_method_variant (void *handle ATTRIBUTE_UNUSED,
+ const char *physname, debug_type type,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, debug_type context)
{
struct debug_method_variant *m;
@@ -1918,14 +1802,10 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
since a static method can not also be virtual. */
debug_method_variant
-debug_make_static_method_variant (handle, physname, type, visibility,
- constp, volatilep)
- PTR handle ATTRIBUTE_UNUSED;
- const char *physname;
- debug_type type;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+debug_make_static_method_variant (void *handle ATTRIBUTE_UNUSED,
+ const char *physname, debug_type type,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct debug_method_variant *m;
@@ -1945,10 +1825,7 @@ debug_make_static_method_variant (handle, physname, type, visibility,
/* Name a type. */
debug_type
-debug_name_type (handle, name, type)
- PTR handle;
- const char *name;
- debug_type type;
+debug_name_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1994,10 +1871,7 @@ debug_name_type (handle, name, type)
/* Tag a type. */
debug_type
-debug_tag_type (handle, name, type)
- PTR handle;
- const char *name;
- debug_type type;
+debug_tag_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -2049,11 +1923,9 @@ debug_tag_type (handle, name, type)
/* Record the size of a given type. */
-boolean
-debug_record_type_size (handle, type, size)
- PTR handle ATTRIBUTE_UNUSED;
- debug_type type;
- unsigned int size;
+bfd_boolean
+debug_record_type_size (void *handle ATTRIBUTE_UNUSED, debug_type type,
+ unsigned int size)
{
if (type->size != 0 && type->size != size)
fprintf (stderr, _("Warning: changing type size from %d to %d\n"),
@@ -2061,15 +1933,13 @@ debug_record_type_size (handle, type, size)
type->size = size;
- return true;
+ return TRUE;
}
/* Find a named type. */
debug_type
-debug_find_named_type (handle, name)
- PTR handle;
- const char *name;
+debug_find_named_type (void *handle, const char *name)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_block *b;
@@ -2122,10 +1992,8 @@ debug_find_named_type (handle, name)
/* Find a tagged type. */
debug_type
-debug_find_tagged_type (handle, name, kind)
- PTR handle;
- const char *name;
- enum debug_type_kind kind;
+debug_find_tagged_type (void *handle, const char *name,
+ enum debug_type_kind kind)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_unit *u;
@@ -2163,10 +2031,8 @@ debug_find_tagged_type (handle, name, kind)
crashing if the type is defined circularly. */
static struct debug_type *
-debug_get_real_type (handle, type, list)
- PTR handle;
- debug_type type;
- struct debug_type_real_list *list;
+debug_get_real_type (void *handle, debug_type type,
+ struct debug_type_real_list *list)
{
struct debug_type_real_list *l;
struct debug_type_real_list rl;
@@ -2184,7 +2050,7 @@ debug_get_real_type (handle, type, list)
for (l = list; l != NULL; l = l->next)
{
- if (l->t == type)
+ if (l->t == type || l == l->next)
{
fprintf (stderr,
_("debug_get_real_type: circular debug information for %s\n"),
@@ -2214,9 +2080,7 @@ debug_get_real_type (handle, type, list)
/* Get the kind of a type. */
enum debug_type_kind
-debug_get_type_kind (handle, type)
- PTR handle;
- debug_type type;
+debug_get_type_kind (void *handle, debug_type type)
{
if (type == NULL)
return DEBUG_KIND_ILLEGAL;
@@ -2229,9 +2093,7 @@ debug_get_type_kind (handle, type)
/* Get the name of a type. */
const char *
-debug_get_type_name (handle, type)
- PTR handle;
- debug_type type;
+debug_get_type_name (void *handle, debug_type type)
{
if (type->kind == DEBUG_KIND_INDIRECT)
{
@@ -2248,9 +2110,7 @@ debug_get_type_name (handle, type)
/* Get the size of a type. */
bfd_vma
-debug_get_type_size (handle, type)
- PTR handle;
- debug_type type;
+debug_get_type_size (void *handle, debug_type type)
{
if (type == NULL)
return 0;
@@ -2279,15 +2139,15 @@ debug_get_type_size (handle, type)
/* Get the return type of a function or method type. */
debug_type
-debug_get_return_type (handle, type)
- PTR handle;
- debug_type type;
+debug_get_return_type (void *handle, debug_type type)
{
if (type == NULL)
return DEBUG_TYPE_NULL;
+
type = debug_get_real_type (handle, type, NULL);
if (type == NULL)
return DEBUG_TYPE_NULL;
+
switch (type->kind)
{
default:
@@ -2304,16 +2164,16 @@ debug_get_return_type (handle, type)
we don't currently store the parameter types of a function). */
const debug_type *
-debug_get_parameter_types (handle, type, pvarargs)
- PTR handle;
- debug_type type;
- boolean *pvarargs;
+debug_get_parameter_types (void *handle, debug_type type,
+ bfd_boolean *pvarargs)
{
if (type == NULL)
return NULL;
+
type = debug_get_real_type (handle, type, NULL);
if (type == NULL)
return NULL;
+
switch (type->kind)
{
default:
@@ -2331,15 +2191,15 @@ debug_get_parameter_types (handle, type, pvarargs)
/* Get the target type of a type. */
debug_type
-debug_get_target_type (handle, type)
- PTR handle;
- debug_type type;
+debug_get_target_type (void *handle, debug_type type)
{
if (type == NULL)
return NULL;
+
type = debug_get_real_type (handle, type, NULL);
if (type == NULL)
return NULL;
+
switch (type->kind)
{
default:
@@ -2360,15 +2220,15 @@ debug_get_target_type (handle, type)
class. */
const debug_field *
-debug_get_fields (handle, type)
- PTR handle;
- debug_type type;
+debug_get_fields (void *handle, debug_type type)
{
if (type == NULL)
return NULL;
+
type = debug_get_real_type (handle, type, NULL);
if (type == NULL)
return NULL;
+
switch (type->kind)
{
default:
@@ -2385,9 +2245,7 @@ debug_get_fields (handle, type)
/* Get the type of a field. */
debug_type
-debug_get_field_type (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_type (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL)
return NULL;
@@ -2397,9 +2255,7 @@ debug_get_field_type (handle, field)
/* Get the name of a field. */
const char *
-debug_get_field_name (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_name (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL)
return NULL;
@@ -2409,9 +2265,7 @@ debug_get_field_name (handle, field)
/* Get the bit position of a field. */
bfd_vma
-debug_get_field_bitpos (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_bitpos (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL || field->static_member)
return (bfd_vma) -1;
@@ -2421,9 +2275,7 @@ debug_get_field_bitpos (handle, field)
/* Get the bit size of a field. */
bfd_vma
-debug_get_field_bitsize (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_bitsize (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL || field->static_member)
return (bfd_vma) -1;
@@ -2433,9 +2285,7 @@ debug_get_field_bitsize (handle, field)
/* Get the visibility of a field. */
enum debug_visibility
-debug_get_field_visibility (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_visibility (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL)
return DEBUG_VISIBILITY_IGNORE;
@@ -2445,9 +2295,7 @@ debug_get_field_visibility (handle, field)
/* Get the physical name of a field. */
const char *
-debug_get_field_physname (handle, field)
- PTR handle ATTRIBUTE_UNUSED;
- debug_field field;
+debug_get_field_physname (void *handle ATTRIBUTE_UNUSED, debug_field field)
{
if (field == NULL || ! field->static_member)
return NULL;
@@ -2457,11 +2305,8 @@ debug_get_field_physname (handle, field)
/* Write out the debugging information. This is given a handle to
debugging information, and a set of function pointers to call. */
-boolean
-debug_write (handle, fns, fhandle)
- PTR handle;
- const struct debug_write_fns *fns;
- PTR fhandle;
+bfd_boolean
+debug_write (void *handle, const struct debug_write_fns *fns, void *fhandle)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_unit *u;
@@ -2484,70 +2329,61 @@ debug_write (handle, fns, fhandle)
for (u = info->units; u != NULL; u = u->next)
{
struct debug_file *f;
- boolean first_file;
+ bfd_boolean first_file;
info->current_write_lineno = u->linenos;
info->current_write_lineno_index = 0;
if (! (*fns->start_compilation_unit) (fhandle, u->files->filename))
- return false;
+ return FALSE;
- first_file = true;
+ first_file = TRUE;
for (f = u->files; f != NULL; f = f->next)
{
struct debug_name *n;
if (first_file)
- first_file = false;
- else
- {
- if (! (*fns->start_source) (fhandle, f->filename))
- return false;
- }
+ first_file = FALSE;
+ else if (! (*fns->start_source) (fhandle, f->filename))
+ return FALSE;
if (f->globals != NULL)
- {
- for (n = f->globals->list; n != NULL; n = n->next)
- {
- if (! debug_write_name (info, fns, fhandle, n))
- return false;
- }
- }
+ for (n = f->globals->list; n != NULL; n = n->next)
+ if (! debug_write_name (info, fns, fhandle, n))
+ return FALSE;
}
/* Output any line number information which hasn't already been
handled. */
if (! debug_write_linenos (info, fns, fhandle, (bfd_vma) -1))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Write out an element in a namespace. */
-static boolean
-debug_write_name (info, fns, fhandle, n)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_name *n;
+static bfd_boolean
+debug_write_name (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_name *n)
{
switch (n->kind)
{
case DEBUG_OBJECT_TYPE:
if (! debug_write_type (info, fns, fhandle, n->u.type, n)
|| ! (*fns->typdef) (fhandle, n->name))
- return false;
- return true;
+ return FALSE;
+ return TRUE;
case DEBUG_OBJECT_TAG:
if (! debug_write_type (info, fns, fhandle, n->u.tag, n))
- return false;
+ return FALSE;
return (*fns->tag) (fhandle, n->name);
case DEBUG_OBJECT_VARIABLE:
if (! debug_write_type (info, fns, fhandle, n->u.variable->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->variable) (fhandle, n->name, n->u.variable->kind,
n->u.variable->val);
case DEBUG_OBJECT_FUNCTION:
@@ -2560,12 +2396,12 @@ debug_write_name (info, fns, fhandle, n)
case DEBUG_OBJECT_TYPED_CONSTANT:
if (! debug_write_type (info, fns, fhandle, n->u.typed_constant->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->typed_constant) (fhandle, n->name,
n->u.typed_constant->val);
default:
abort ();
- return false;
+ return FALSE;
}
/*NOTREACHED*/
}
@@ -2576,13 +2412,10 @@ debug_write_name (info, fns, fhandle, n)
then the name argument is a tag from a DEBUG_KIND_TAGGED type which
points to this one. */
-static boolean
-debug_write_type (info, fns, fhandle, type, name)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_type *type;
- struct debug_name *name;
+static bfd_boolean
+debug_write_type (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_type *type, struct debug_name *name)
{
unsigned int i;
int is;
@@ -2604,7 +2437,7 @@ debug_write_type (info, fns, fhandle, type, name)
struct debug_type *real;
unsigned int id;
- real = debug_get_real_type ((PTR) info, type, NULL);
+ real = debug_get_real_type ((void *) info, type, NULL);
if (real == NULL)
return (*fns->empty_type) (fhandle);
id = 0;
@@ -2619,7 +2452,7 @@ debug_write_type (info, fns, fhandle, type, name)
if (! debug_set_class_id (info,
type->u.knamed->name->name,
real))
- return false;
+ return FALSE;
}
id = real->u.kclass->id;
}
@@ -2648,7 +2481,7 @@ debug_write_type (info, fns, fhandle, type, name)
{
case DEBUG_KIND_ILLEGAL:
debug_error (_("debug_write_type: illegal type encountered"));
- return false;
+ return FALSE;
case DEBUG_KIND_INDIRECT:
if (*type->u.kindirect->slot == DEBUG_TYPE_NULL)
return (*fns->empty_type) (fhandle);
@@ -2671,7 +2504,7 @@ debug_write_type (info, fns, fhandle, type, name)
if (type->u.kclass->id <= info->base_id)
{
if (! debug_set_class_id (info, tag, type))
- return false;
+ return FALSE;
}
if (info->mark == type->u.kclass->mark)
@@ -2692,7 +2525,7 @@ debug_write_type (info, fns, fhandle, type, name)
: 0),
type->kind == DEBUG_KIND_STRUCT,
type->size))
- return false;
+ return FALSE;
if (type->u.kclass != NULL
&& type->u.kclass->fields != NULL)
{
@@ -2705,7 +2538,7 @@ debug_write_type (info, fns, fhandle, type, name)
(struct debug_name *) NULL)
|| ! (*fns->struct_field) (fhandle, f->name, f->u.f.bitpos,
f->u.f.bitsize, f->visibility))
- return false;
+ return FALSE;
}
}
return (*fns->end_struct_type) (fhandle);
@@ -2721,13 +2554,13 @@ debug_write_type (info, fns, fhandle, type, name)
case DEBUG_KIND_POINTER:
if (! debug_write_type (info, fns, fhandle, type->u.kpointer,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->pointer_type) (fhandle);
case DEBUG_KIND_FUNCTION:
if (! debug_write_type (info, fns, fhandle,
type->u.kfunction->return_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (type->u.kfunction->arg_types == NULL)
is = -1;
else
@@ -2736,19 +2569,19 @@ debug_write_type (info, fns, fhandle, type, name)
if (! debug_write_type (info, fns, fhandle,
type->u.kfunction->arg_types[is],
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
return (*fns->function_type) (fhandle, is,
type->u.kfunction->varargs);
case DEBUG_KIND_REFERENCE:
if (! debug_write_type (info, fns, fhandle, type->u.kreference,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->reference_type) (fhandle);
case DEBUG_KIND_RANGE:
if (! debug_write_type (info, fns, fhandle, type->u.krange->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->range_type) (fhandle, type->u.krange->lower,
type->u.krange->upper);
case DEBUG_KIND_ARRAY:
@@ -2757,14 +2590,14 @@ debug_write_type (info, fns, fhandle, type, name)
|| ! debug_write_type (info, fns, fhandle,
type->u.karray->range_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->array_type) (fhandle, type->u.karray->lower,
type->u.karray->upper,
type->u.karray->stringp);
case DEBUG_KIND_SET:
if (! debug_write_type (info, fns, fhandle, type->u.kset->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->set_type) (fhandle, type->u.kset->bitstringp);
case DEBUG_KIND_OFFSET:
if (! debug_write_type (info, fns, fhandle, type->u.koffset->base_type,
@@ -2772,13 +2605,13 @@ debug_write_type (info, fns, fhandle, type, name)
|| ! debug_write_type (info, fns, fhandle,
type->u.koffset->target_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->offset_type) (fhandle);
case DEBUG_KIND_METHOD:
if (! debug_write_type (info, fns, fhandle,
type->u.kmethod->return_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (type->u.kmethod->arg_types == NULL)
is = -1;
else
@@ -2787,14 +2620,14 @@ debug_write_type (info, fns, fhandle, type, name)
if (! debug_write_type (info, fns, fhandle,
type->u.kmethod->arg_types[is],
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
if (type->u.kmethod->domain_type != NULL)
{
if (! debug_write_type (info, fns, fhandle,
type->u.kmethod->domain_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
return (*fns->method_type) (fhandle,
type->u.kmethod->domain_type != NULL,
@@ -2803,12 +2636,12 @@ debug_write_type (info, fns, fhandle, type, name)
case DEBUG_KIND_CONST:
if (! debug_write_type (info, fns, fhandle, type->u.kconst,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->const_type) (fhandle);
case DEBUG_KIND_VOLATILE:
if (! debug_write_type (info, fns, fhandle, type->u.kvolatile,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->volatile_type) (fhandle);
case DEBUG_KIND_NAMED:
return debug_write_type (info, fns, fhandle, type->u.knamed->type,
@@ -2818,19 +2651,16 @@ debug_write_type (info, fns, fhandle, type, name)
type->u.knamed->name);
default:
abort ();
- return false;
+ return FALSE;
}
}
/* Write out a class type. */
-static boolean
-debug_write_class_type (info, fns, fhandle, type, tag)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_type *type;
- const char *tag;
+static bfd_boolean
+debug_write_class_type (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_type *type, const char *tag)
{
unsigned int i;
unsigned int id;
@@ -2846,7 +2676,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
if (type->u.kclass->id <= info->base_id)
{
if (! debug_set_class_id (info, tag, type))
- return false;
+ return FALSE;
}
if (info->mark == type->u.kclass->mark)
@@ -2866,7 +2696,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
{
if (! debug_write_type (info, fns, fhandle, vptrbase,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
}
@@ -2875,7 +2705,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
type->size,
vptrbase != NULL,
vptrbase == type))
- return false;
+ return FALSE;
if (type->u.kclass != NULL)
{
@@ -2888,19 +2718,19 @@ debug_write_class_type (info, fns, fhandle, type, tag)
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (f->static_member)
{
if (! (*fns->class_static_member) (fhandle, f->name,
f->u.s.physname,
f->visibility))
- return false;
+ return FALSE;
}
else
{
if (! (*fns->struct_field) (fhandle, f->name, f->u.f.bitpos,
f->u.f.bitsize, f->visibility))
- return false;
+ return FALSE;
}
}
}
@@ -2914,10 +2744,10 @@ debug_write_class_type (info, fns, fhandle, type, tag)
b = type->u.kclass->baseclasses[i];
if (! debug_write_type (info, fns, fhandle, b->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (! (*fns->class_baseclass) (fhandle, b->bitpos, b->virtual,
b->visibility))
- return false;
+ return FALSE;
}
}
@@ -2930,7 +2760,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
m = type->u.kclass->methods[i];
if (! (*fns->class_start_method) (fhandle, m->name))
- return false;
+ return FALSE;
for (j = 0; m->variants[j] != NULL; j++)
{
struct debug_method_variant *v;
@@ -2940,11 +2770,11 @@ debug_write_class_type (info, fns, fhandle, type, tag)
{
if (! debug_write_type (info, fns, fhandle, v->context,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
if (! debug_write_type (info, fns, fhandle, v->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (v->voffset != VOFFSET_STATIC_METHOD)
{
if (! (*fns->class_method_variant) (fhandle, v->physname,
@@ -2953,7 +2783,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
v->volatilep,
v->voffset,
v->context != NULL))
- return false;
+ return FALSE;
}
else
{
@@ -2962,11 +2792,11 @@ debug_write_class_type (info, fns, fhandle, type, tag)
v->visibility,
v->constp,
v->volatilep))
- return false;
+ return FALSE;
}
}
if (! (*fns->class_end_method) (fhandle))
- return false;
+ return FALSE;
}
}
}
@@ -2976,41 +2806,38 @@ debug_write_class_type (info, fns, fhandle, type, tag)
/* Write out information for a function. */
-static boolean
-debug_write_function (info, fns, fhandle, name, linkage, function)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- const char *name;
- enum debug_object_linkage linkage;
- struct debug_function *function;
+static bfd_boolean
+debug_write_function (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ const char *name, enum debug_object_linkage linkage,
+ struct debug_function *function)
{
struct debug_parameter *p;
struct debug_block *b;
if (! debug_write_linenos (info, fns, fhandle, function->blocks->start))
- return false;
+ return FALSE;
if (! debug_write_type (info, fns, fhandle, function->return_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (! (*fns->start_function) (fhandle, name,
linkage == DEBUG_LINKAGE_GLOBAL))
- return false;
+ return FALSE;
for (p = function->parameters; p != NULL; p = p->next)
{
if (! debug_write_type (info, fns, fhandle, p->type,
(struct debug_name *) NULL)
|| ! (*fns->function_parameter) (fhandle, p->name, p->kind, p->val))
- return false;
+ return FALSE;
}
for (b = function->blocks; b != NULL; b = b->next)
{
if (! debug_write_block (info, fns, fhandle, b))
- return false;
+ return FALSE;
}
return (*fns->end_function) (fhandle);
@@ -3018,25 +2845,23 @@ debug_write_function (info, fns, fhandle, name, linkage, function)
/* Write out information for a block. */
-static boolean
-debug_write_block (info, fns, fhandle, block)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- struct debug_block *block;
+static bfd_boolean
+debug_write_block (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ struct debug_block *block)
{
struct debug_name *n;
struct debug_block *b;
if (! debug_write_linenos (info, fns, fhandle, block->start))
- return false;
+ return FALSE;
/* I can't see any point to writing out a block with no local
variables, so we don't bother, except for the top level block. */
if (block->locals != NULL || block->parent == NULL)
{
if (! (*fns->start_block) (fhandle, block->start))
- return false;
+ return FALSE;
}
if (block->locals != NULL)
@@ -3044,36 +2869,34 @@ debug_write_block (info, fns, fhandle, block)
for (n = block->locals->list; n != NULL; n = n->next)
{
if (! debug_write_name (info, fns, fhandle, n))
- return false;
+ return FALSE;
}
}
for (b = block->children; b != NULL; b = b->next)
{
if (! debug_write_block (info, fns, fhandle, b))
- return false;
+ return FALSE;
}
if (! debug_write_linenos (info, fns, fhandle, block->end))
- return false;
+ return FALSE;
if (block->locals != NULL || block->parent == NULL)
{
if (! (*fns->end_block) (fhandle, block->end))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Write out line number information up to ADDRESS. */
-static boolean
-debug_write_linenos (info, fns, fhandle, address)
- struct debug_handle *info;
- const struct debug_write_fns *fns;
- PTR fhandle;
- bfd_vma address;
+static bfd_boolean
+debug_write_linenos (struct debug_handle *info,
+ const struct debug_write_fns *fns, void *fhandle,
+ bfd_vma address)
{
while (info->current_write_lineno != NULL)
{
@@ -3088,12 +2911,12 @@ debug_write_linenos (info, fns, fhandle, address)
break;
if (l->addrs[info->current_write_lineno_index] >= address)
- return true;
+ return TRUE;
if (! (*fns->lineno) (fhandle, l->file->filename,
l->linenos[info->current_write_lineno_index],
l->addrs[info->current_write_lineno_index]))
- return false;
+ return FALSE;
++info->current_write_lineno_index;
}
@@ -3102,7 +2925,7 @@ debug_write_linenos (info, fns, fhandle, address)
info->current_write_lineno_index = 0;
}
- return true;
+ return TRUE;
}
/* Get the ID number for a class. If during the same call to
@@ -3110,11 +2933,9 @@ debug_write_linenos (info, fns, fhandle, address)
name, we use the same ID. This type of things happens because the
same struct will be defined by multiple compilation units. */
-static boolean
-debug_set_class_id (info, tag, type)
- struct debug_handle *info;
- const char *tag;
- struct debug_type *type;
+static bfd_boolean
+debug_set_class_id (struct debug_handle *info, const char *tag,
+ struct debug_type *type)
{
struct debug_class_type *c;
struct debug_class_id *l;
@@ -3127,7 +2948,7 @@ debug_set_class_id (info, tag, type)
c = type->u.kclass;
if (c->id > info->base_id)
- return true;
+ return TRUE;
for (l = info->id_list; l != NULL; l = l->next)
{
@@ -3150,7 +2971,7 @@ debug_set_class_id (info, tag, type)
if (debug_type_samep (info, l->type, type))
{
c->id = l->type->u.kclass->id;
- return true;
+ return TRUE;
}
}
@@ -3168,42 +2989,40 @@ debug_set_class_id (info, tag, type)
l->next = info->id_list;
info->id_list = l;
- return true;
+ return TRUE;
}
/* See if two types are the same. At this point, we don't care about
tags and the like. */
-static boolean
-debug_type_samep (info, t1, t2)
- struct debug_handle *info;
- struct debug_type *t1;
- struct debug_type *t2;
+static bfd_boolean
+debug_type_samep (struct debug_handle *info, struct debug_type *t1,
+ struct debug_type *t2)
{
struct debug_type_compare_list *l;
struct debug_type_compare_list top;
- boolean ret;
+ bfd_boolean ret;
if (t1 == NULL)
return t2 == NULL;
if (t2 == NULL)
- return false;
+ return FALSE;
while (t1->kind == DEBUG_KIND_INDIRECT)
{
t1 = *t1->u.kindirect->slot;
if (t1 == NULL)
- return false;
+ return FALSE;
}
while (t2->kind == DEBUG_KIND_INDIRECT)
{
t2 = *t2->u.kindirect->slot;
if (t2 == NULL)
- return false;
+ return FALSE;
}
if (t1 == t2)
- return true;
+ return TRUE;
/* As a special case, permit a typedef to match a tag, since C++
debugging output will sometimes add a typedef where C debugging
@@ -3217,7 +3036,7 @@ debug_type_samep (info, t1, t2)
if (t1->kind != t2->kind
|| t1->size != t2->size)
- return false;
+ return FALSE;
/* Get rid of the trivial cases first. */
switch (t1->kind)
@@ -3228,7 +3047,7 @@ debug_type_samep (info, t1, t2)
case DEBUG_KIND_FLOAT:
case DEBUG_KIND_COMPLEX:
case DEBUG_KIND_BOOL:
- return true;
+ return TRUE;
case DEBUG_KIND_INT:
return t1->u.kint == t2->u.kint;
}
@@ -3240,7 +3059,7 @@ debug_type_samep (info, t1, t2)
for (l = info->compare_list; l != NULL; l = l->next)
{
if (l->t1 == t1 && l->t2 == t2)
- return true;
+ return TRUE;
}
top.t1 = t1;
@@ -3252,7 +3071,7 @@ debug_type_samep (info, t1, t2)
{
default:
abort ();
- ret = false;
+ ret = FALSE;
break;
case DEBUG_KIND_STRUCT:
@@ -3262,10 +3081,10 @@ debug_type_samep (info, t1, t2)
if (t1->u.kclass == NULL)
ret = t2->u.kclass == NULL;
else if (t2->u.kclass == NULL)
- ret = false;
+ ret = FALSE;
else if (t1->u.kclass->id > info->base_id
&& t1->u.kclass->id == t2->u.kclass->id)
- ret = true;
+ ret = TRUE;
else
ret = debug_class_type_samep (info, t1, t2);
break;
@@ -3274,7 +3093,7 @@ debug_type_samep (info, t1, t2)
if (t1->u.kenum == NULL)
ret = t2->u.kenum == NULL;
else if (t2->u.kenum == NULL)
- ret = false;
+ ret = FALSE;
else
{
const char **pn1, **pn2;
@@ -3309,9 +3128,9 @@ debug_type_samep (info, t1, t2)
t2->u.kfunction->return_type)
|| ((t1->u.kfunction->arg_types == NULL)
!= (t2->u.kfunction->arg_types == NULL)))
- ret = false;
+ ret = FALSE;
else if (t1->u.kfunction->arg_types == NULL)
- ret = true;
+ ret = TRUE;
else
{
struct debug_type **a1, **a2;
@@ -3367,9 +3186,9 @@ debug_type_samep (info, t1, t2)
t2->u.kmethod->domain_type)
|| ((t1->u.kmethod->arg_types == NULL)
!= (t2->u.kmethod->arg_types == NULL)))
- ret = false;
+ ret = FALSE;
else if (t1->u.kmethod->arg_types == NULL)
- ret = true;
+ ret = TRUE;
else
{
struct debug_type **a1, **a2;
@@ -3411,11 +3230,9 @@ debug_type_samep (info, t1, t2)
/* See if two classes are the same. This is a subroutine of
debug_type_samep. */
-static boolean
-debug_class_type_samep (info, t1, t2)
- struct debug_handle *info;
- struct debug_type *t1;
- struct debug_type *t2;
+static bfd_boolean
+debug_class_type_samep (struct debug_handle *info, struct debug_type *t1,
+ struct debug_type *t2)
{
struct debug_class_type *c1, *c2;
@@ -3426,7 +3243,7 @@ debug_class_type_samep (info, t1, t2)
|| (c1->baseclasses == NULL) != (c2->baseclasses == NULL)
|| (c1->methods == NULL) != (c2->methods == NULL)
|| (c1->vptrbase == NULL) != (c2->vptrbase == NULL))
- return false;
+ return FALSE;
if (c1->fields != NULL)
{
@@ -3443,17 +3260,17 @@ debug_class_type_samep (info, t1, t2)
if (f1->name[0] != f2->name[0]
|| f1->visibility != f2->visibility
|| f1->static_member != f2->static_member)
- return false;
+ return FALSE;
if (f1->static_member)
{
if (strcmp (f1->u.s.physname, f2->u.s.physname) != 0)
- return false;
+ return FALSE;
}
else
{
if (f1->u.f.bitpos != f2->u.f.bitpos
|| f1->u.f.bitsize != f2->u.f.bitsize)
- return false;
+ return FALSE;
}
/* We do the checks which require function calls last. We
don't require that the types of fields have the same
@@ -3461,20 +3278,20 @@ debug_class_type_samep (info, t1, t2)
typedefs and we really don't care. */
if (strcmp (f1->name, f2->name) != 0
|| ! debug_type_samep (info,
- debug_get_real_type ((PTR) info,
+ debug_get_real_type ((void *) info,
f1->type, NULL),
- debug_get_real_type ((PTR) info,
+ debug_get_real_type ((void *) info,
f2->type, NULL)))
- return false;
+ return FALSE;
}
if (*pf1 != NULL || *pf2 != NULL)
- return false;
+ return FALSE;
}
if (c1->vptrbase != NULL)
{
if (! debug_type_samep (info, c1->vptrbase, c2->vptrbase))
- return false;
+ return FALSE;
}
if (c1->baseclasses != NULL)
@@ -3493,10 +3310,10 @@ debug_class_type_samep (info, t1, t2)
|| b1->virtual != b2->virtual
|| b1->visibility != b2->visibility
|| ! debug_type_samep (info, b1->type, b2->type))
- return false;
+ return FALSE;
}
if (*pb1 != NULL || *pb2 != NULL)
- return false;
+ return FALSE;
}
if (c1->methods != NULL)
@@ -3514,7 +3331,7 @@ debug_class_type_samep (info, t1, t2)
if (m1->name[0] != m2->name[0]
|| strcmp (m1->name, m2->name) != 0
|| (m1->variants == NULL) != (m2->variants == NULL))
- return false;
+ return FALSE;
if (m1->variants == NULL)
{
struct debug_method_variant **pv1, **pv2;
@@ -3535,21 +3352,21 @@ debug_class_type_samep (info, t1, t2)
|| (v1->context == NULL) != (v2->context == NULL)
|| strcmp (v1->physname, v2->physname) != 0
|| ! debug_type_samep (info, v1->type, v2->type))
- return false;
+ return FALSE;
if (v1->context != NULL)
{
if (! debug_type_samep (info, v1->context,
v2->context))
- return false;
+ return FALSE;
}
}
if (*pv1 != NULL || *pv2 != NULL)
- return false;
+ return FALSE;
}
}
if (*pm1 != NULL || *pm2 != NULL)
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
diff --git a/contrib/binutils/binutils/debug.h b/contrib/binutils/binutils/debug.h
index c439be3..3331e0b 100644
--- a/contrib/binutils/binutils/debug.h
+++ b/contrib/binutils/binutils/debug.h
@@ -1,5 +1,5 @@
/* debug.h -- Describe generic debugging information.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -25,7 +25,7 @@
/* This header file describes a generic debugging information format.
We may eventually have readers which convert different formats into
this generic format, and writers which write it out. The initial
- impetus for this was writing a convertor from stabs to HP IEEE-695
+ impetus for this was writing a converter from stabs to HP IEEE-695
debugging format. */
/* Different kinds of types. */
@@ -169,126 +169,126 @@ struct debug_write_fns
{
/* This is called at the start of each new compilation unit with the
name of the main file in the new unit. */
- boolean (*start_compilation_unit) PARAMS ((PTR, const char *));
+ bfd_boolean (*start_compilation_unit) (void *, const char *);
/* This is called at the start of each source file within a
compilation unit, before outputting any global information for
that file. The argument is the name of the file. */
- boolean (*start_source) PARAMS ((PTR, const char *));
+ bfd_boolean (*start_source) (void *, const char *);
/* Each writer must keep a stack of types. */
/* Push an empty type onto the type stack. This type can appear if
there is a reference to a type which is never defined. */
- boolean (*empty_type) PARAMS ((PTR));
+ bfd_boolean (*empty_type) (void *);
/* Push a void type onto the type stack. */
- boolean (*void_type) PARAMS ((PTR));
+ bfd_boolean (*void_type) (void *);
/* Push an integer type onto the type stack, given the size and
whether it is unsigned. */
- boolean (*int_type) PARAMS ((PTR, unsigned int, boolean));
+ bfd_boolean (*int_type) (void *, unsigned int, bfd_boolean);
/* Push a floating type onto the type stack, given the size. */
- boolean (*float_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*float_type) (void *, unsigned int);
/* Push a complex type onto the type stack, given the size. */
- boolean (*complex_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*complex_type) (void *, unsigned int);
- /* Push a boolean type onto the type stack, given the size. */
- boolean (*bool_type) PARAMS ((PTR, unsigned int));
+ /* Push a bfd_boolean type onto the type stack, given the size. */
+ bfd_boolean (*bool_type) (void *, unsigned int);
/* Push an enum type onto the type stack, given the tag, a NULL
terminated array of names and the associated values. If there is
no tag, the tag argument will be NULL. If this is an undefined
enum, the names and values arguments will be NULL. */
- boolean (*enum_type) PARAMS ((PTR, const char *, const char **,
- bfd_signed_vma *));
+ bfd_boolean (*enum_type)
+ (void *, const char *, const char **, bfd_signed_vma *);
/* Pop the top type on the type stack, and push a pointer to that
type onto the type stack. */
- boolean (*pointer_type) PARAMS ((PTR));
+ bfd_boolean (*pointer_type) (void *);
/* Push a function type onto the type stack. The second argument
indicates the number of argument types that have been pushed onto
the stack. If the number of argument types is passed as -1, then
the argument types of the function are unknown, and no types have
- been pushed onto the stack. The third argument is true if the
+ been pushed onto the stack. The third argument is TRUE if the
function takes a variable number of arguments. The return type
of the function is pushed onto the type stack below the argument
types, if any. */
- boolean (*function_type) PARAMS ((PTR, int, boolean));
+ bfd_boolean (*function_type) (void *, int, bfd_boolean);
/* Pop the top type on the type stack, and push a reference to that
type onto the type stack. */
- boolean (*reference_type) PARAMS ((PTR));
+ bfd_boolean (*reference_type) (void *);
/* Pop the top type on the type stack, and push a range of that type
with the given lower and upper bounds onto the type stack. */
- boolean (*range_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+ bfd_boolean (*range_type) (void *, bfd_signed_vma, bfd_signed_vma);
/* Push an array type onto the type stack. The top type on the type
stack is the range, and the next type on the type stack is the
element type. These should be popped before the array type is
pushed. The arguments are the lower bound, the upper bound, and
whether the array is a string. */
- boolean (*array_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma,
- boolean));
+ bfd_boolean (*array_type)
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
/* Pop the top type on the type stack, and push a set of that type
onto the type stack. The argument indicates whether this set is
a bitstring. */
- boolean (*set_type) PARAMS ((PTR, boolean));
+ bfd_boolean (*set_type) (void *, bfd_boolean);
/* Push an offset type onto the type stack. The top type on the
type stack is the target type, and the next type on the type
stack is the base type. These should be popped before the offset
type is pushed. */
- boolean (*offset_type) PARAMS ((PTR));
+ bfd_boolean (*offset_type) (void *);
/* Push a method type onto the type stack. If the second argument
- is true, the top type on the stack is the class to which the
+ is TRUE, the top type on the stack is the class to which the
method belongs; otherwise, the class must be determined by the
class to which the method is attached. The third argument is the
number of argument types; these are pushed onto the type stack in
reverse order (the first type popped is the last argument to the
method). A value of -1 for the third argument means that no
- argument information is available. The fourth argument is true
+ argument information is available. The fourth argument is TRUE
if the function takes a variable number of arguments. The next
type on the type stack below the domain and the argument types is
the return type of the method. All these types must be popped,
and then the method type must be pushed. */
- boolean (*method_type) PARAMS ((PTR, boolean, int, boolean));
+ bfd_boolean (*method_type) (void *, bfd_boolean, int, bfd_boolean);
/* Pop the top type off the type stack, and push a const qualified
version of that type onto the type stack. */
- boolean (*const_type) PARAMS ((PTR));
+ bfd_boolean (*const_type) (void *);
/* Pop the top type off the type stack, and push a volatile
qualified version of that type onto the type stack. */
- boolean (*volatile_type) PARAMS ((PTR));
+ bfd_boolean (*volatile_type) (void *);
/* Start building a struct. This is followed by calls to the
struct_field function, and finished by a call to the
end_struct_type function. The second argument is the tag; this
will be NULL if there isn't one. If the second argument is NULL,
the third argument is a constant identifying this struct for use
- with tag_type. The fourth argument is true for a struct, false
+ with tag_type. The fourth argument is TRUE for a struct, FALSE
for a union. The fifth argument is the size. If this is an
undefined struct or union, the size will be 0 and struct_field
will not be called before end_struct_type is called. */
- boolean (*start_struct_type) PARAMS ((PTR, const char *, unsigned int,
- boolean, unsigned int));
+ bfd_boolean (*start_struct_type)
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
/* Add a field to the struct type currently being built. The type
of the field should be popped off the type stack. The arguments
are the name, the bit position, the bit size (may be zero if the
field is not packed), and the visibility. */
- boolean (*struct_field) PARAMS ((PTR, const char *, bfd_vma, bfd_vma,
- enum debug_visibility));
+ bfd_boolean (*struct_field)
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
/* Finish building a struct, and push it onto the type stack. */
- boolean (*end_struct_type) PARAMS ((PTR));
+ bfd_boolean (*end_struct_type) (void *);
/* Start building a class. This is followed by calls to several
functions: struct_field, class_static_member, class_baseclass,
@@ -296,27 +296,27 @@ struct debug_write_fns
class_static_method_variant, and class_end_method. The class is
finished by a call to end_class_type. The first five arguments
are the same as for start_struct_type. The sixth argument is
- true if there is a virtual function table; if there is, the
- seventh argument is true if the virtual function table can be
- found in the type itself, and is false if the type of the object
+ TRUE if there is a virtual function table; if there is, the
+ seventh argument is TRUE if the virtual function table can be
+ found in the type itself, and is FALSE if the type of the object
holding the virtual function table should be popped from the type
stack. */
- boolean (*start_class_type) PARAMS ((PTR, const char *, unsigned int,
- boolean, unsigned int, boolean,
- boolean));
+ bfd_boolean (*start_class_type)
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean);
/* Add a static member to the class currently being built. The
arguments are the field name, the physical name, and the
visibility. The type must be popped off the type stack. */
- boolean (*class_static_member) PARAMS ((PTR, const char *, const char *,
- enum debug_visibility));
+ bfd_boolean (*class_static_member)
+ (void *, const char *, const char *, enum debug_visibility);
/* Add a baseclass to the class currently being built. The type of
the baseclass must be popped off the type stack. The arguments
are the bit position, whether the class is virtual, and the
visibility. */
- boolean (*class_baseclass) PARAMS ((PTR, bfd_vma, boolean,
- enum debug_visibility));
+ bfd_boolean (*class_baseclass)
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
/* Start adding a method to the class currently being built. This
is followed by calls to class_method_variant and
@@ -324,7 +324,7 @@ struct debug_write_fns
method which take different arguments. The method is finished
with a call to class_end_method. The argument is the method
name. */
- boolean (*class_start_method) PARAMS ((PTR, const char *));
+ bfd_boolean (*class_start_method) (void *, const char *);
/* Describe a variant to the class method currently being built.
The type of the variant must be popped off the type stack. The
@@ -333,28 +333,27 @@ struct debug_write_fns
const, whether the variant is volatile, the offset in the virtual
function table, and whether the context is on the type stack
(below the variant type). */
- boolean (*class_method_variant) PARAMS ((PTR, const char *,
- enum debug_visibility,
- boolean, boolean,
- bfd_vma, boolean));
+ bfd_boolean (*class_method_variant)
+ (void *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_vma, bfd_boolean);
/* Describe a static variant to the class method currently being
built. The arguments are the same as for class_method_variant,
except that the last two arguments are omitted. The type of the
variant must be popped off the type stack. */
- boolean (*class_static_method_variant) PARAMS ((PTR, const char *,
- enum debug_visibility,
- boolean, boolean));
+ bfd_boolean (*class_static_method_variant)
+ (void *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean);
/* Finish describing a class method. */
- boolean (*class_end_method) PARAMS ((PTR));
+ bfd_boolean (*class_end_method) (void *);
/* Finish describing a class, and push it onto the type stack. */
- boolean (*end_class_type) PARAMS ((PTR));
+ bfd_boolean (*end_class_type) (void *);
/* Push a type on the stack which was given a name by an earlier
call to typdef. */
- boolean (*typedef_type) PARAMS ((PTR, const char *));
+ bfd_boolean (*typedef_type) (void *, const char *);
/* Push a tagged type on the stack which was defined earlier. If
the second argument is not NULL, the type was defined by a call
@@ -365,58 +364,58 @@ struct debug_write_fns
for a struct (class) being defined, in between the call to
start_struct_type (start_class_type) and the call to
end_struct_type (end_class_type). */
- boolean (*tag_type) PARAMS ((PTR, const char *, unsigned int,
- enum debug_type_kind));
+ bfd_boolean (*tag_type)
+ (void *, const char *, unsigned int, enum debug_type_kind);
/* Pop the type stack, and typedef it to the given name. */
- boolean (*typdef) PARAMS ((PTR, const char *));
+ bfd_boolean (*typdef) (void *, const char *);
/* Pop the type stack, and declare it as a tagged struct or union or
enum or whatever. The tag passed down here is redundant, since
was also passed when enum_type, start_struct_type, or
start_class_type was called. */
- boolean (*tag) PARAMS ((PTR, const char *));
+ bfd_boolean (*tag) (void *, const char *);
/* This is called to record a named integer constant. */
- boolean (*int_constant) PARAMS ((PTR, const char *, bfd_vma));
+ bfd_boolean (*int_constant) (void *, const char *, bfd_vma);
/* This is called to record a named floating point constant. */
- boolean (*float_constant) PARAMS ((PTR, const char *, double));
+ bfd_boolean (*float_constant) (void *, const char *, double);
/* This is called to record a typed integer constant. The type is
popped off the type stack. */
- boolean (*typed_constant) PARAMS ((PTR, const char *, bfd_vma));
+ bfd_boolean (*typed_constant) (void *, const char *, bfd_vma);
/* This is called to record a variable. The type is popped off the
type stack. */
- boolean (*variable) PARAMS ((PTR, const char *, enum debug_var_kind,
- bfd_vma));
+ bfd_boolean (*variable)
+ (void *, const char *, enum debug_var_kind, bfd_vma);
/* Start writing out a function. The return type must be popped off
- the stack. The boolean is true if the function is global. This
+ the stack. The bfd_boolean is TRUE if the function is global. This
is followed by calls to function_parameter, followed by block
information. */
- boolean (*start_function) PARAMS ((PTR, const char *, boolean));
+ bfd_boolean (*start_function) (void *, const char *, bfd_boolean);
/* Record a function parameter for the current function. The type
must be popped off the stack. */
- boolean (*function_parameter) PARAMS ((PTR, const char *,
- enum debug_parm_kind, bfd_vma));
+ bfd_boolean (*function_parameter)
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
/* Start writing out a block. There is at least one top level block
per function. Blocks may be nested. The argument is the
starting address of the block. */
- boolean (*start_block) PARAMS ((PTR, bfd_vma));
+ bfd_boolean (*start_block) (void *, bfd_vma);
/* Finish writing out a block. The argument is the ending address
of the block. */
- boolean (*end_block) PARAMS ((PTR, bfd_vma));
+ bfd_boolean (*end_block) (void *, bfd_vma);
/* Finish writing out a function. */
- boolean (*end_function) PARAMS ((PTR));
+ bfd_boolean (*end_function) (void *);
/* Record line number information for the current compilation unit. */
- boolean (*lineno) PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ bfd_boolean (*lineno) (void *, const char *, unsigned long, bfd_vma);
};
/* Exported functions. */
@@ -429,87 +428,87 @@ struct debug_write_fns
/* Return a debugging handle. */
-extern PTR debug_init PARAMS ((void));
+extern void *debug_init (void);
/* Set the source filename. This implicitly starts a new compilation
unit. */
-extern boolean debug_set_filename PARAMS ((PTR, const char *));
+extern bfd_boolean debug_set_filename (void *, const char *);
/* Change source files to the given file name. This is used for
include files in a single compilation unit. */
-extern boolean debug_start_source PARAMS ((PTR, const char *));
+extern bfd_boolean debug_start_source (void *, const char *);
/* Record a function definition. This implicitly starts a function
block. The debug_type argument is the type of the return value.
- The boolean indicates whether the function is globally visible.
+ The bfd_boolean indicates whether the function is globally visible.
The bfd_vma is the address of the start of the function. Currently
the parameter types are specified by calls to
debug_record_parameter. */
-extern boolean debug_record_function
- PARAMS ((PTR, const char *, debug_type, boolean, bfd_vma));
+extern bfd_boolean debug_record_function
+ (void *, const char *, debug_type, bfd_boolean, bfd_vma);
/* Record a parameter for the current function. */
-extern boolean debug_record_parameter
- PARAMS ((PTR, const char *, debug_type, enum debug_parm_kind, bfd_vma));
+extern bfd_boolean debug_record_parameter
+ (void *, const char *, debug_type, enum debug_parm_kind, bfd_vma);
/* End a function definition. The argument is the address where the
function ends. */
-extern boolean debug_end_function PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_end_function (void *, bfd_vma);
/* Start a block in a function. All local information will be
recorded in this block, until the matching call to debug_end_block.
debug_start_block and debug_end_block may be nested. The argument
is the address at which this block starts. */
-extern boolean debug_start_block PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_start_block (void *, bfd_vma);
/* Finish a block in a function. This matches the call to
debug_start_block. The argument is the address at which this block
ends. */
-extern boolean debug_end_block PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_end_block (void *, bfd_vma);
/* Associate a line number in the current source file with a given
address. */
-extern boolean debug_record_line PARAMS ((PTR, unsigned long, bfd_vma));
+extern bfd_boolean debug_record_line (void *, unsigned long, bfd_vma);
/* Start a named common block. This is a block of variables that may
move in memory. */
-extern boolean debug_start_common_block PARAMS ((PTR, const char *));
+extern bfd_boolean debug_start_common_block (void *, const char *);
/* End a named common block. */
-extern boolean debug_end_common_block PARAMS ((PTR, const char *));
+extern bfd_boolean debug_end_common_block (void *, const char *);
/* Record a named integer constant. */
-extern boolean debug_record_int_const PARAMS ((PTR, const char *, bfd_vma));
+extern bfd_boolean debug_record_int_const (void *, const char *, bfd_vma);
/* Record a named floating point constant. */
-extern boolean debug_record_float_const PARAMS ((PTR, const char *, double));
+extern bfd_boolean debug_record_float_const (void *, const char *, double);
/* Record a typed constant with an integral value. */
-extern boolean debug_record_typed_const
- PARAMS ((PTR, const char *, debug_type, bfd_vma));
+extern bfd_boolean debug_record_typed_const
+ (void *, const char *, debug_type, bfd_vma);
/* Record a label. */
-extern boolean debug_record_label
- PARAMS ((PTR, const char *, debug_type, bfd_vma));
+extern bfd_boolean debug_record_label
+ (void *, const char *, debug_type, bfd_vma);
/* Record a variable. */
-extern boolean debug_record_variable
- PARAMS ((PTR, const char *, debug_type, enum debug_var_kind, bfd_vma));
+extern bfd_boolean debug_record_variable
+ (void *, const char *, debug_type, enum debug_var_kind, bfd_vma);
/* Make an indirect type. The first argument is a pointer to the
location where the real type will be placed. The second argument
@@ -519,107 +518,105 @@ extern boolean debug_record_variable
referenced before it is defined. */
extern debug_type debug_make_indirect_type
- PARAMS ((PTR, debug_type *, const char *));
+ (void *, debug_type *, const char *);
/* Make a void type. */
-extern debug_type debug_make_void_type PARAMS ((PTR));
+extern debug_type debug_make_void_type (void *);
-/* Make an integer type of a given size. The boolean argument is true
+/* Make an integer type of a given size. The bfd_boolean argument is TRUE
if the integer is unsigned. */
-extern debug_type debug_make_int_type PARAMS ((PTR, unsigned int, boolean));
+extern debug_type debug_make_int_type (void *, unsigned int, bfd_boolean);
/* Make a floating point type of a given size. FIXME: On some
platforms, like an Alpha, you probably need to be able to specify
the format. */
-extern debug_type debug_make_float_type PARAMS ((PTR, unsigned int));
+extern debug_type debug_make_float_type (void *, unsigned int);
/* Make a boolean type of a given size. */
-extern debug_type debug_make_bool_type PARAMS ((PTR, unsigned int));
+extern debug_type debug_make_bool_type (void *, unsigned int);
/* Make a complex type of a given size. */
-extern debug_type debug_make_complex_type PARAMS ((PTR, unsigned int));
+extern debug_type debug_make_complex_type (void *, unsigned int);
-/* Make a structure type. The second argument is true for a struct,
- false for a union. The third argument is the size of the struct.
+/* Make a structure type. The second argument is TRUE for a struct,
+ FALSE for a union. The third argument is the size of the struct.
The fourth argument is a NULL terminated array of fields. */
extern debug_type debug_make_struct_type
- PARAMS ((PTR, boolean, bfd_vma, debug_field *));
+ (void *, bfd_boolean, bfd_vma, debug_field *);
/* Make an object type. The first three arguments after the handle
are the same as for debug_make_struct_type. The next arguments are
a NULL terminated array of base classes, a NULL terminated array of
methods, the type of the object holding the virtual function table
- if it is not this object, and a boolean which is true if this
+ if it is not this object, and a bfd_boolean which is TRUE if this
object has its own virtual function table. */
extern debug_type debug_make_object_type
- PARAMS ((PTR, boolean, bfd_vma, debug_field *, debug_baseclass *,
- debug_method *, debug_type, boolean));
+ (void *, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
+ debug_method *, debug_type, bfd_boolean);
/* Make an enumeration type. The arguments are a null terminated
array of strings, and an array of corresponding values. */
extern debug_type debug_make_enum_type
- PARAMS ((PTR, const char **, bfd_signed_vma *));
+ (void *, const char **, bfd_signed_vma *);
/* Make a pointer to a given type. */
-extern debug_type debug_make_pointer_type
- PARAMS ((PTR, debug_type));
+extern debug_type debug_make_pointer_type (void *, debug_type);
/* Make a function type. The second argument is the return type. The
third argument is a NULL terminated array of argument types. The
- fourth argument is true if the function takes a variable number of
+ fourth argument is TRUE if the function takes a variable number of
arguments. If the third argument is NULL, then the argument types
are unknown. */
extern debug_type debug_make_function_type
- PARAMS ((PTR, debug_type, debug_type *, boolean));
+ (void *, debug_type, debug_type *, bfd_boolean);
/* Make a reference to a given type. */
-extern debug_type debug_make_reference_type PARAMS ((PTR, debug_type));
+extern debug_type debug_make_reference_type (void *, debug_type);
/* Make a range of a given type from a lower to an upper bound. */
extern debug_type debug_make_range_type
- PARAMS ((PTR, debug_type, bfd_signed_vma, bfd_signed_vma));
+ (void *, debug_type, bfd_signed_vma, bfd_signed_vma);
/* Make an array type. The second argument is the type of an element
of the array. The third argument is the type of a range of the
array. The fourth and fifth argument are the lower and upper
bounds, respectively (if the bounds are not known, lower should be
- 0 and upper should be -1). The sixth argument is true if this
+ 0 and upper should be -1). The sixth argument is TRUE if this
array is actually a string, as in C. */
extern debug_type debug_make_array_type
- PARAMS ((PTR, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
- boolean));
+ (void *, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
+ bfd_boolean);
/* Make a set of a given type. For example, a Pascal set type. The
- boolean argument is true if this set is actually a bitstring, as in
+ bfd_boolean argument is TRUE if this set is actually a bitstring, as in
CHILL. */
-extern debug_type debug_make_set_type PARAMS ((PTR, debug_type, boolean));
+extern debug_type debug_make_set_type (void *, debug_type, bfd_boolean);
/* Make a type for a pointer which is relative to an object. The
second argument is the type of the object to which the pointer is
relative. The third argument is the type that the pointer points
to. */
-extern debug_type debug_make_offset_type
- PARAMS ((PTR, debug_type, debug_type));
+extern debug_type debug_make_offset_type (void *, debug_type, debug_type);
/* Make a type for a method function. The second argument is the
return type. The third argument is the domain. The fourth
argument is a NULL terminated array of argument types. The fifth
- argument is true if the function takes a variable number of
+ argument is TRUE if the function takes a variable number of
arguments, in which case the array of argument types indicates the
types of the first arguments. The domain and the argument array
may be NULL, in which case this is a stub method and that
@@ -627,21 +624,21 @@ extern debug_type debug_make_offset_type
the argument types from the mangled name. */
extern debug_type debug_make_method_type
- PARAMS ((PTR, debug_type, debug_type, debug_type *, boolean));
+ (void *, debug_type, debug_type, debug_type *, bfd_boolean);
/* Make a const qualified version of a given type. */
-extern debug_type debug_make_const_type PARAMS ((PTR, debug_type));
+extern debug_type debug_make_const_type (void *, debug_type);
/* Make a volatile qualified version of a given type. */
-extern debug_type debug_make_volatile_type PARAMS ((PTR, debug_type));
+extern debug_type debug_make_volatile_type (void *, debug_type);
/* Make an undefined tagged type. For example, a struct which has
been mentioned, but not defined. */
extern debug_type debug_make_undefined_tagged_type
- PARAMS ((PTR, const char *, enum debug_type_kind));
+ (void *, const char *, enum debug_type_kind);
/* Make a base class for an object. The second argument is the base
class type. The third argument is the bit position of this base
@@ -650,7 +647,7 @@ extern debug_type debug_make_undefined_tagged_type
class. */
extern debug_baseclass debug_make_baseclass
- PARAMS ((PTR, debug_type, bfd_vma, boolean, enum debug_visibility));
+ (void *, debug_type, bfd_vma, bfd_boolean, enum debug_visibility);
/* Make a field for a struct. The second argument is the name. The
third argument is the type of the field. The fourth argument is
@@ -659,8 +656,7 @@ extern debug_baseclass debug_make_baseclass
of the field. */
extern debug_field debug_make_field
- PARAMS ((PTR, const char *, debug_type, bfd_vma, bfd_vma,
- enum debug_visibility));
+ (void *, const char *, debug_type, bfd_vma, bfd_vma, enum debug_visibility);
/* Make a static member of an object. The second argument is the
name. The third argument is the type of the member. The fourth
@@ -669,8 +665,7 @@ extern debug_field debug_make_field
member. */
extern debug_field debug_make_static_member
- PARAMS ((PTR, const char *, debug_type, const char *,
- enum debug_visibility));
+ (void *, const char *, debug_type, const char *, enum debug_visibility);
/* Make a method. The second argument is the name, and the third
argument is a NULL terminated array of method variants. Each
@@ -678,7 +673,7 @@ extern debug_field debug_make_static_member
argument types. */
extern debug_method debug_make_method
- PARAMS ((PTR, const char *, debug_method_variant *));
+ (void *, const char *, debug_method_variant *);
/* Make a method variant. The second argument is the physical name of
the function. The third argument is the type of the function,
@@ -690,109 +685,108 @@ extern debug_method debug_make_method
function context. */
extern debug_method_variant debug_make_method_variant
- PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,
- boolean, bfd_vma, debug_type));
+ (void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_vma, debug_type);
/* Make a static method argument. The arguments are the same as for
debug_make_method_variant, except that the last two are omitted
since a static method can not also be virtual. */
extern debug_method_variant debug_make_static_method_variant
- PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,
- boolean));
+ (void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
+ bfd_boolean);
/* Name a type. This returns a new type with an attached name. */
-extern debug_type debug_name_type PARAMS ((PTR, const char *, debug_type));
+extern debug_type debug_name_type (void *, const char *, debug_type);
/* Give a tag to a type, such as a struct or union. This returns a
new type with an attached tag. */
-extern debug_type debug_tag_type PARAMS ((PTR, const char *, debug_type));
+extern debug_type debug_tag_type (void *, const char *, debug_type);
/* Record the size of a given type. */
-extern boolean debug_record_type_size PARAMS ((PTR, debug_type, unsigned int));
+extern bfd_boolean debug_record_type_size (void *, debug_type, unsigned int);
/* Find a named type. */
-extern debug_type debug_find_named_type PARAMS ((PTR, const char *));
+extern debug_type debug_find_named_type (void *, const char *);
/* Find a tagged type. */
extern debug_type debug_find_tagged_type
- PARAMS ((PTR, const char *, enum debug_type_kind));
+ (void *, const char *, enum debug_type_kind);
/* Get the kind of a type. */
-extern enum debug_type_kind debug_get_type_kind PARAMS ((PTR, debug_type));
+extern enum debug_type_kind debug_get_type_kind (void *, debug_type);
/* Get the name of a type. */
-extern const char *debug_get_type_name PARAMS ((PTR, debug_type));
+extern const char *debug_get_type_name (void *, debug_type);
/* Get the size of a type. */
-extern bfd_vma debug_get_type_size PARAMS ((PTR, debug_type));
+extern bfd_vma debug_get_type_size (void *, debug_type);
/* Get the return type of a function or method type. */
-extern debug_type debug_get_return_type PARAMS ((PTR, debug_type));
+extern debug_type debug_get_return_type (void *, debug_type);
/* Get the NULL terminated array of parameter types for a function or
method type (actually, parameter types are not currently stored for
function types). This may be used to determine whether a method
type is a stub method or not. The last argument points to a
- boolean which is set to true if the function takes a variable
+ bfd_boolean which is set to TRUE if the function takes a variable
number of arguments. */
-extern const debug_type *debug_get_parameter_types PARAMS ((PTR,
- debug_type,
- boolean *));
+extern const debug_type *debug_get_parameter_types
+ (void *, debug_type, bfd_boolean *);
/* Get the target type of a pointer or reference or const or volatile
type. */
-extern debug_type debug_get_target_type PARAMS ((PTR, debug_type));
+extern debug_type debug_get_target_type (void *, debug_type);
/* Get the NULL terminated array of fields for a struct, union, or
class. */
-extern const debug_field *debug_get_fields PARAMS ((PTR, debug_type));
+extern const debug_field *debug_get_fields (void *, debug_type);
/* Get the type of a field. */
-extern debug_type debug_get_field_type PARAMS ((PTR, debug_field));
+extern debug_type debug_get_field_type (void *, debug_field);
/* Get the name of a field. */
-extern const char *debug_get_field_name PARAMS ((PTR, debug_field));
+extern const char *debug_get_field_name (void *, debug_field);
/* Get the bit position of a field within the containing structure.
If the field is a static member, this will return (bfd_vma) -1. */
-extern bfd_vma debug_get_field_bitpos PARAMS ((PTR, debug_field));
+extern bfd_vma debug_get_field_bitpos (void *, debug_field);
/* Get the bit size of a field. If the field is a static member, this
will return (bfd_vma) -1. */
-extern bfd_vma debug_get_field_bitsize PARAMS ((PTR, debug_field));
+extern bfd_vma debug_get_field_bitsize (void *, debug_field);
/* Get the visibility of a field. */
-extern enum debug_visibility debug_get_field_visibility
- PARAMS ((PTR, debug_field));
+extern enum debug_visibility debug_get_field_visibility (void *, debug_field);
/* Get the physical name of a field, if it is a static member. If the
field is not a static member, this will return NULL. */
-extern const char *debug_get_field_physname PARAMS ((PTR, debug_field));
+extern const char *debug_get_field_physname (void *, debug_field);
/* Write out the recorded debugging information. This takes a set of
function pointers which are called to do the actual writing. The
- first PTR is the debugging handle. The second PTR is a handle
+ first void * is the debugging handle. The second void * is a handle
which is passed to the functions. */
-extern boolean debug_write PARAMS ((PTR, const struct debug_write_fns *, PTR));
+extern bfd_boolean debug_write
+ (void *, const struct debug_write_fns *, void *);
#endif /* DEBUG_H */
diff --git a/contrib/binutils/binutils/deflex.l b/contrib/binutils/binutils/deflex.l
index 8ff72b8..bdf15d3 100644
--- a/contrib/binutils/binutils/deflex.l
+++ b/contrib/binutils/binutils/deflex.l
@@ -1,28 +1,27 @@
%{/* deflex.l - Lexer for .def files */
-/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright 1995, 1997, 1998, 1999, 2002, 2003, 2004
+ Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ This file is part of GNU Binutils.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* Contributed by Steve Chamberlain
- sac@cygnus.com
+/* Contributed by Steve Chamberlain: sac@cygnus.com */
-*/
#define DONTDECLARE_MALLOC
#include "libiberty.h"
#include "defparse.h"
@@ -46,6 +45,7 @@ int linenumber;
"BASE" { return BASE;}
"CONSTANT" { return CONSTANT; }
"NONAME" { return NONAME; }
+"PRIVATE" { return PRIVATE; }
"READ" { return READ;}
"WRITE" { return WRITE;}
"EXECUTE" { return EXECUTE;}
@@ -61,7 +61,7 @@ int linenumber;
[0-9][x0-9A-Fa-f]* { yylval.number = strtol (yytext,0,0);
return NUMBER; }
-[A-Za-z$:\-\_?][A-Za-z0-9/$:\-\_@?]* {
+(@)?[A-Za-z$:\-\_?][A-Za-z0-9/$:\-\_@?]* {
yylval.id = xstrdup (yytext);
return ID;
}
@@ -89,5 +89,5 @@ int linenumber;
%%
#ifndef yywrap
/* Needed for lex, though not flex. */
-int yywrap() { return 1; }
+int yywrap(void) { return 1; }
#endif
diff --git a/contrib/binutils/binutils/dep-in.sed b/contrib/binutils/binutils/dep-in.sed
index 0981dfc..aeb22a1 100644
--- a/contrib/binutils/binutils/dep-in.sed
+++ b/contrib/binutils/binutils/dep-in.sed
@@ -8,6 +8,7 @@ s!@BFDDIR@!$(BFDDIR)!g
s!@TOPDIR@/bfd!$(BFDDIR)!g
s!@SRCDIR@/!!g
s!@OBJDIR@/!!g
+s! \.\./intl/libintl\.h!!g
s/\\\n */ /g
diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c
index 9a1afbc..5f921ae 100644
--- a/contrib/binutils/binutils/dlltool.c
+++ b/contrib/binutils/binutils/dlltool.c
@@ -1,5 +1,5 @@
/* dlltool.c -- tool to generate stuff for PE style DLLs
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -20,8 +20,7 @@
02111-1307, USA. */
-/*
- This program allows you to build the files necessary to create
+/* This program allows you to build the files necessary to create
DLLs to run on a system which understands PE format image files.
(eg, Windows NT)
@@ -50,7 +49,7 @@
EXPORTS ( ( ( <name1> [ = <name2> ] )
| ( <name1> = <module-name> . <external-name>))
- [ @ <integer> ] [ NONAME ] [CONSTANT] [DATA] ) *
+ [ @ <integer> ] [ NONAME ] [CONSTANT] [DATA] [PRIVATE] ) *
Declares name1 as an exported symbol from the
DLL, with optional ordinal number <integer>.
Or declares name1 as an alias (forward) of the function <external-name>
@@ -61,7 +60,7 @@
Declares that <external-name> or the exported function whoes ordinal number
is <integer> is to be imported from the file <module-name>. If
<internal-name> is specified then this is the name that the imported
- function will be refered to in the body of the DLL.
+ function will be refereed to in the body of the DLL.
DESCRIPTION <string>
Puts <string> into output .exp file in the .rdata section
@@ -195,8 +194,7 @@
# Build the dll with file1.o, file2.o and the export table
- ld -o thedll.dll thedll.exp file1.o file2.o
- */
+ ld -o thedll.dll thedll.exp file1.o file2.o */
/* .idata section description
@@ -232,8 +230,7 @@
= Array of { short, asciz } entries, one for each imported function.
The `short' is the function's ordinal number.
- .idata$7 = dll name (eg: "kernel32.dll"). (.idata$6 for ppc)
-*/
+ .idata$7 = dll name (eg: "kernel32.dll"). (.idata$6 for ppc). */
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
@@ -270,8 +267,8 @@
#endif
/* Forward references. */
-static char *look_for_prog PARAMS ((const char *, const char *, int));
-static char *deduce_name PARAMS ((const char *));
+static char *look_for_prog (const char *, const char *, int);
+static char *deduce_name (const char *);
#ifdef DLLTOOL_MCORE_ELF
static void mcore_elf_cache_filename (char *);
@@ -283,10 +280,10 @@ static void mcore_elf_gen_out_file (void);
#else /* ! HAVE_SYS_WAIT_H */
#if ! defined (_WIN32) || defined (__CYGWIN32__)
#ifndef WIFEXITED
-#define WIFEXITED(w) (((w)&0377) == 0)
+#define WIFEXITED(w) (((w) & 0377) == 0)
#endif
#ifndef WIFSIGNALED
-#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
+#define WIFSIGNALED(w) (((w) & 0377) != 0177 && ((w) & ~0377) == 0)
#endif
#ifndef WTERMSIG
#define WTERMSIG(w) ((w) & 0177)
@@ -327,18 +324,18 @@ static void mcore_elf_gen_out_file (void);
typedef struct ifunct
{
- char *name; /* name of function being imported */
- int ord; /* two-byte ordinal value associated with function */
+ char * name; /* Name of function being imported. */
+ int ord; /* Two-byte ordinal value associated with function. */
struct ifunct *next;
} ifunctype;
typedef struct iheadt
{
- char *dllname; /* name of dll file imported from */
- long nfuncs; /* number of functions in list */
- struct ifunct *funchead; /* first function in list */
- struct ifunct *functail; /* last function in list */
- struct iheadt *next; /* next dll file in list */
+ char *dllname; /* Name of dll file imported from. */
+ long nfuncs; /* Number of functions in list. */
+ struct ifunct *funchead; /* First function in list. */
+ struct ifunct *functail; /* Last function in list. */
+ struct iheadt *next; /* Next dll file in list. */
} iheadtype;
/* Structure containing all import information as defined in .def file
@@ -349,6 +346,8 @@ static iheadtype *import_list = NULL;
static char *as_name = NULL;
static char * as_flags = "";
+static char *tmp_prefix;
+
static int no_idata4;
static int no_idata5;
static char *exp_name;
@@ -361,20 +360,20 @@ static int add_indirect = 0;
static int add_underscore = 0;
static int dontdeltemps = 0;
-/* True if we should export all symbols. Otherwise, we only export
+/* TRUE if we should export all symbols. Otherwise, we only export
symbols listed in .drectve sections or in the def file. */
-static boolean export_all_symbols;
+static bfd_boolean export_all_symbols;
-/* True if we should exclude the symbols in DEFAULT_EXCLUDES when
+/* TRUE if we should exclude the symbols in DEFAULT_EXCLUDES when
exporting all symbols. */
-static boolean do_default_excludes=true;
+static bfd_boolean do_default_excludes = TRUE;
/* Default symbols to exclude when exporting all the symbols. */
static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr";
-/* True if we should add __imp_<SYMBOL> to import libraries for backward
+/* TRUE if we should add __imp_<SYMBOL> to import libraries for backward
compatibility to old Cygwin releases. */
-static boolean create_compat_implib;
+static bfd_boolean create_compat_implib;
static char *def_file;
@@ -428,16 +427,23 @@ static char * mcore_elf_linker_flags = NULL;
#define DRECTVE_SECTION_NAME ".drectve"
#endif
-#define PATHMAX 250 /* What's the right name for this ? */
+#define PATHMAX 250 /* What's the right name for this ? */
+
+char *tmp_asm_buf;
+char *tmp_head_s_buf;
+char *tmp_head_o_buf;
+char *tmp_tail_s_buf;
+char *tmp_tail_o_buf;
+char *tmp_stub_buf;
-#define TMP_ASM "dc.s"
-#define TMP_HEAD_S "dh.s"
-#define TMP_HEAD_O "dh.o"
-#define TMP_TAIL_S "dt.s"
-#define TMP_TAIL_O "dt.o"
-#define TMP_STUB "ds"
+#define TMP_ASM dlltmp (&tmp_asm_buf, "%sc.s")
+#define TMP_HEAD_S dlltmp (&tmp_head_s_buf, "%sh.s")
+#define TMP_HEAD_O dlltmp (&tmp_head_o_buf, "%sh.o")
+#define TMP_TAIL_S dlltmp (&tmp_tail_s_buf, "%st.s")
+#define TMP_TAIL_O dlltmp (&tmp_tail_o_buf, "%st.o")
+#define TMP_STUB dlltmp (&tmp_stub_buf, "%ss")
-/* This bit of assemly does jmp * .... */
+/* This bit of assembly does jmp * .... */
static const unsigned char i386_jtab[] =
{
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
@@ -487,11 +493,11 @@ static const unsigned char mcore_le_jtab[] =
0x00, 0x00, 0x00, 0x00 /* <address> */
};
-/* This is the glue sequence for PowerPC PE. There is a */
-/* tocrel16-tocdefn reloc against the first instruction. */
-/* We also need a IMGLUE reloc against the glue function */
-/* to restore the toc saved by the third instruction in */
-/* the glue. */
+/* This is the glue sequence for PowerPC PE. There is a
+ tocrel16-tocdefn reloc against the first instruction.
+ We also need a IMGLUE reloc against the glue function
+ to restore the toc saved by the third instruction in
+ the glue. */
static const unsigned char ppc_jtab[] =
{
0x00, 0x00, 0x62, 0x81, /* lwz r11,0(r2) */
@@ -504,8 +510,8 @@ static const unsigned char ppc_jtab[] =
};
#ifdef DLLTOOL_PPC
-/* the glue instruction, picks up the toc from the stw in */
-/* the above code: "lwz r2,4(r1)" */
+/* The glue instruction, picks up the toc from the stw in
+ the above code: "lwz r2,4(r1)". */
static bfd_vma ppc_glue_insn = 0x80410004;
#endif
@@ -526,8 +532,8 @@ struct mac
const char *how_bfd_target;
enum bfd_architecture how_bfd_arch;
const unsigned char *how_jtab;
- int how_jtab_size; /* size of the jtab entry */
- int how_jtab_roff; /* offset into it for the ind 32 reloc into idata 5 */
+ int how_jtab_size; /* Size of the jtab entry. */
+ int how_jtab_roff; /* Offset into it for the ind 32 reloc into idata 5. */
};
static const struct mac
@@ -637,10 +643,11 @@ typedef struct export
const char *internal_name;
int ordinal;
int constant;
- int noname;
+ int noname; /* Don't put name in image file. */
+ int private; /* Don't put reference in import lib. */
int data;
int hint;
- int forward; /* number of forward label, 0 means no forward */
+ int forward; /* Number of forward label, 0 means no forward. */
struct export *next;
}
export_type;
@@ -655,52 +662,78 @@ struct string_list
static struct string_list *excludes;
-static const char *rvaafter PARAMS ((int));
-static const char *rvabefore PARAMS ((int));
-static const char *asm_prefix PARAMS ((int));
-static void process_def_file PARAMS ((const char *));
-static void new_directive PARAMS ((char *));
-static void append_import PARAMS ((const char *, const char *, int));
-static void run PARAMS ((const char *, char *));
-static void scan_drectve_symbols PARAMS ((bfd *));
-static void scan_filtered_symbols PARAMS ((bfd *, PTR, long, unsigned int));
-static void add_excludes PARAMS ((const char *));
-static boolean match_exclude PARAMS ((const char *));
-static void set_default_excludes PARAMS ((void));
-static long filter_symbols PARAMS ((bfd *, PTR, long, unsigned int));
-static void scan_all_symbols PARAMS ((bfd *));
-static void scan_open_obj_file PARAMS ((bfd *));
-static void scan_obj_file PARAMS ((const char *));
-static void dump_def_info PARAMS ((FILE *));
-static int sfunc PARAMS ((const void *, const void *));
-static void flush_page PARAMS ((FILE *, long *, int, int));
-static void gen_def_file PARAMS ((void));
-static void generate_idata_ofile PARAMS ((FILE *));
-static void assemble_file PARAMS ((const char *, const char *));
-static void gen_exp_file PARAMS ((void));
-static const char *xlate PARAMS ((const char *));
+static const char *rvaafter (int);
+static const char *rvabefore (int);
+static const char *asm_prefix (int);
+static void process_def_file (const char *);
+static void new_directive (char *);
+static void append_import (const char *, const char *, int);
+static void run (const char *, char *);
+static void scan_drectve_symbols (bfd *);
+static void scan_filtered_symbols (bfd *, void *, long, unsigned int);
+static void add_excludes (const char *);
+static bfd_boolean match_exclude (const char *);
+static void set_default_excludes (void);
+static long filter_symbols (bfd *, void *, long, unsigned int);
+static void scan_all_symbols (bfd *);
+static void scan_open_obj_file (bfd *);
+static void scan_obj_file (const char *);
+static void dump_def_info (FILE *);
+static int sfunc (const void *, const void *);
+static void flush_page (FILE *, long *, int, int);
+static void gen_def_file (void);
+static void generate_idata_ofile (FILE *);
+static void assemble_file (const char *, const char *);
+static void gen_exp_file (void);
+static const char *xlate (const char *);
#if 0
-static void dump_iat PARAMS ((FILE *, export_type *));
+static void dump_iat (FILE *, export_type *);
#endif
-static char *make_label PARAMS ((const char *, const char *));
-static bfd *make_one_lib_file PARAMS ((export_type *, int));
-static bfd *make_head PARAMS ((void));
-static bfd *make_tail PARAMS ((void));
-static void gen_lib_file PARAMS ((void));
-static int pfunc PARAMS ((const void *, const void *));
-static int nfunc PARAMS ((const void *, const void *));
-static void remove_null_names PARAMS ((export_type **));
-static void dtab PARAMS ((export_type **));
-static void process_duplicates PARAMS ((export_type **));
-static void fill_ordinals PARAMS ((export_type **));
-static int alphafunc PARAMS ((const void *, const void *));
-static void mangle_defs PARAMS ((void));
-static void usage PARAMS ((FILE *, int));
-static void inform PARAMS ((const char *, ...));
+static char *make_label (const char *, const char *);
+static char *make_imp_label (const char *, const char *);
+static bfd *make_one_lib_file (export_type *, int);
+static bfd *make_head (void);
+static bfd *make_tail (void);
+static void gen_lib_file (void);
+static int pfunc (const void *, const void *);
+static int nfunc (const void *, const void *);
+static void remove_null_names (export_type **);
+static void dtab (export_type **);
+static void process_duplicates (export_type **);
+static void fill_ordinals (export_type **);
+static int alphafunc (const void *, const void *);
+static void mangle_defs (void);
+static void usage (FILE *, int);
+static void inform (const char *, ...);
+
+static char *
+prefix_encode (char *start, unsigned code)
+{
+ static char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
+ static char buf[32];
+ char *p;
+ strcpy (buf, start);
+ p = strchr (buf, '\0');
+ do
+ *p++ = alpha[code % sizeof (alpha)];
+ while ((code /= sizeof (alpha)) != 0);
+ *p = '\0';
+ return buf;
+}
+static char *
+dlltmp (char **buf, const char *fmt)
+{
+ if (!*buf)
+ {
+ *buf = malloc (strlen (tmp_prefix) + 64);
+ sprintf (*buf, fmt, tmp_prefix);
+ }
+ return *buf;
+}
static void
-inform VPARAMS ((const char *message, ...))
+inform VPARAMS ((const char * message, ...))
{
VA_OPEN (args, message);
VA_FIXEDARG (args, const char *, message);
@@ -714,8 +747,7 @@ inform VPARAMS ((const char *message, ...))
}
static const char *
-rvaafter (machine)
- int machine;
+rvaafter (int machine)
{
switch (machine)
{
@@ -739,8 +771,7 @@ rvaafter (machine)
}
static const char *
-rvabefore (machine)
- int machine;
+rvabefore (int machine)
{
switch (machine)
{
@@ -764,8 +795,7 @@ rvabefore (machine)
}
static const char *
-asm_prefix (machine)
- int machine;
+asm_prefix (int machine)
{
switch (machine)
{
@@ -789,17 +819,17 @@ asm_prefix (machine)
return "";
}
-#define ASM_BYTE mtable[machine].how_byte
-#define ASM_SHORT mtable[machine].how_short
+#define ASM_BYTE mtable[machine].how_byte
+#define ASM_SHORT mtable[machine].how_short
#define ASM_LONG mtable[machine].how_long
#define ASM_TEXT mtable[machine].how_asciz
-#define ASM_C mtable[machine].how_comment
-#define ASM_JUMP mtable[machine].how_jump
+#define ASM_C mtable[machine].how_comment
+#define ASM_JUMP mtable[machine].how_jump
#define ASM_GLOBAL mtable[machine].how_global
#define ASM_SPACE mtable[machine].how_space
#define ASM_ALIGN_SHORT mtable[machine].how_align_short
-#define ASM_RVA_BEFORE rvabefore(machine)
-#define ASM_RVA_AFTER rvaafter(machine)
+#define ASM_RVA_BEFORE rvabefore(machine)
+#define ASM_RVA_AFTER rvaafter(machine)
#define ASM_PREFIX asm_prefix(machine)
#define ASM_ALIGN_LONG mtable[machine].how_align_long
#define HOW_BFD_READ_TARGET 0 /* always default*/
@@ -813,8 +843,7 @@ asm_prefix (machine)
static char **oav;
static void
-process_def_file (name)
- const char *name;
+process_def_file (const char *name)
{
FILE *f = fopen (name, FOPEN_RT);
@@ -834,25 +863,24 @@ process_def_file (name)
/**********************************************************************/
-/* Communications with the parser */
+/* Communications with the parser. */
-static const char *d_name; /* Arg to NAME or LIBRARY */
-static int d_nfuncs; /* Number of functions exported */
-static int d_named_nfuncs; /* Number of named functions exported */
-static int d_low_ord; /* Lowest ordinal index */
-static int d_high_ord; /* Highest ordinal index */
-static export_type *d_exports; /*list of exported functions */
-static export_type **d_exports_lexically; /* vector of exported functions in alpha order */
-static dlist_type *d_list; /* Descriptions */
-static dlist_type *a_list; /* Stuff to go in directives */
-static int d_nforwards = 0; /* Number of forwarded exports */
+static const char *d_name; /* Arg to NAME or LIBRARY. */
+static int d_nfuncs; /* Number of functions exported. */
+static int d_named_nfuncs; /* Number of named functions exported. */
+static int d_low_ord; /* Lowest ordinal index. */
+static int d_high_ord; /* Highest ordinal index. */
+static export_type *d_exports; /* List of exported functions. */
+static export_type **d_exports_lexically; /* Vector of exported functions in alpha order. */
+static dlist_type *d_list; /* Descriptions. */
+static dlist_type *a_list; /* Stuff to go in directives. */
+static int d_nforwards = 0; /* Number of forwarded exports. */
static int d_is_dll;
static int d_is_exe;
int
-yyerror (err)
- const char * err ATTRIBUTE_UNUSED;
+yyerror (const char * err ATTRIBUTE_UNUSED)
{
/* xgettext:c-format */
non_fatal (_("Syntax error in def file %s:%d"), def_file, linenumber);
@@ -861,13 +889,8 @@ yyerror (err)
}
void
-def_exports (name, internal_name, ordinal, noname, constant, data)
- const char *name;
- const char *internal_name;
- int ordinal;
- int noname;
- int constant;
- int data;
+def_exports (const char *name, const char *internal_name, int ordinal,
+ int noname, int constant, int data, int private)
{
struct export *p = (struct export *) xmalloc (sizeof (*p));
@@ -876,6 +899,7 @@ def_exports (name, internal_name, ordinal, noname, constant, data)
p->ordinal = ordinal;
p->constant = constant;
p->noname = noname;
+ p->private = private;
p->data = data;
p->next = d_exports;
d_exports = p;
@@ -889,9 +913,7 @@ def_exports (name, internal_name, ordinal, noname, constant, data)
}
void
-def_name (name, base)
- const char *name;
- int base;
+def_name (const char *name, int base)
{
/* xgettext:c-format */
inform (_("NAME: %s base: %x"), name, base);
@@ -900,17 +922,15 @@ def_name (name, base)
non_fatal (_("Can't have LIBRARY and NAME"));
d_name = name;
- /* if --dllname not provided, use the one in the DEF file.
- FIXME: Is this appropriate for executables? */
+ /* If --dllname not provided, use the one in the DEF file.
+ FIXME: Is this appropriate for executables? */
if (! dll_name)
dll_name = xstrdup (name);
d_is_exe = 1;
}
void
-def_library (name, base)
- const char *name;
- int base;
+def_library (const char *name, int base)
{
/* xgettext:c-format */
inform (_("LIBRARY: %s base: %x"), name, base);
@@ -919,15 +939,14 @@ def_library (name, base)
non_fatal (_("Can't have LIBRARY and NAME"));
d_name = name;
- /* if --dllname not provided, use the one in the DEF file. */
+ /* If --dllname not provided, use the one in the DEF file. */
if (! dll_name)
dll_name = xstrdup (name);
d_is_dll = 1;
}
void
-def_description (desc)
- const char *desc;
+def_description (const char *desc)
{
dlist_type *d = (dlist_type *) xmalloc (sizeof (dlist_type));
d->text = xstrdup (desc);
@@ -936,8 +955,7 @@ def_description (desc)
}
static void
-new_directive (dir)
- char *dir;
+new_directive (char *dir)
{
dlist_type *d = (dlist_type *) xmalloc (sizeof (dlist_type));
d->text = xstrdup (dir);
@@ -946,9 +964,7 @@ new_directive (dir)
}
void
-def_heapsize (reserve, commit)
- int reserve;
- int commit;
+def_heapsize (int reserve, int commit)
{
char b[200];
if (commit > 0)
@@ -959,9 +975,7 @@ def_heapsize (reserve, commit)
}
void
-def_stacksize (reserve, commit)
- int reserve;
- int commit;
+def_stacksize (int reserve, int commit)
{
char b[200];
if (commit > 0)
@@ -975,10 +989,7 @@ def_stacksize (reserve, commit)
import_list. It is used by def_import. */
static void
-append_import (symbol_name, dll_name, func_ordinal)
- const char *symbol_name;
- const char *dll_name;
- int func_ordinal;
+append_import (const char *symbol_name, const char *dll_name, int func_ordinal)
{
iheadtype **pq;
iheadtype *q;
@@ -1042,12 +1053,8 @@ append_import (symbol_name, dll_name, func_ordinal)
present (i.e., not NULL). */
void
-def_import (app_name, module, dllext, entry, ord_val)
- const char *app_name;
- const char *module;
- const char *dllext;
- const char *entry;
- int ord_val;
+def_import (const char *app_name, const char *module, const char *dllext,
+ const char *entry, int ord_val)
{
const char *application_name;
char *buf;
@@ -1073,17 +1080,13 @@ def_import (app_name, module, dllext, entry, ord_val)
}
void
-def_version (major, minor)
- int major;
- int minor;
+def_version (int major, int minor)
{
printf ("VERSION %d.%d\n", major, minor);
}
void
-def_section (name, attr)
- const char *name;
- int attr;
+def_section (const char *name, int attr)
{
char buf[200];
char atts[5];
@@ -1103,16 +1106,14 @@ def_section (name, attr)
}
void
-def_code (attr)
- int attr;
+def_code (int attr)
{
def_section ("CODE", attr);
}
void
-def_data (attr)
- int attr;
+def_data (int attr)
{
def_section ("DATA", attr);
}
@@ -1120,9 +1121,7 @@ def_data (attr)
/**********************************************************************/
static void
-run (what, args)
- const char *what;
- char *args;
+run (const char *what, char *args)
{
char *s;
int pid, wait_status;
@@ -1193,8 +1192,7 @@ run (what, args)
ABFD. Pass each one to def_exports. */
static void
-scan_drectve_symbols (abfd)
- bfd *abfd;
+scan_drectve_symbols (bfd *abfd)
{
asection * s;
int size;
@@ -1250,15 +1248,16 @@ scan_drectve_symbols (abfd)
/* FIXME: The 5th arg is for the `constant' field.
What should it be? Not that it matters since it's not
currently useful. */
- def_exports (c, 0, -1, 0, 0, ! (flags & BSF_FUNCTION));
+ def_exports (c, 0, -1, 0, 0, ! (flags & BSF_FUNCTION), 0);
if (add_stdcall_alias && strchr (c, '@'))
{
- char *exported_name = xstrdup (c);
+ int lead_at = (*c == '@') ;
+ char *exported_name = xstrdup (c + lead_at);
char *atsym = strchr (exported_name, '@');
*atsym = '\0';
/* Note: stdcall alias symbols can never be data. */
- def_exports (exported_name, xstrdup (c), -1, 0, 0, 0);
+ def_exports (exported_name, xstrdup (c), -1, 0, 0, 0, 0);
}
}
else
@@ -1271,11 +1270,8 @@ scan_drectve_symbols (abfd)
symbols to export. */
static void
-scan_filtered_symbols (abfd, minisyms, symcount, size)
- bfd *abfd;
- PTR minisyms;
- long symcount;
- unsigned int size;
+scan_filtered_symbols (bfd *abfd, void *minisyms, long symcount,
+ unsigned int size)
{
asymbol *store;
bfd_byte *from, *fromend;
@@ -1291,7 +1287,7 @@ scan_filtered_symbols (abfd, minisyms, symcount, size)
asymbol *sym;
const char *symbol_name;
- sym = bfd_minisymbol_to_symbol (abfd, false, from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, FALSE, from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1300,15 +1296,16 @@ scan_filtered_symbols (abfd, minisyms, symcount, size)
++symbol_name;
def_exports (xstrdup (symbol_name) , 0, -1, 0, 0,
- ! (sym->flags & BSF_FUNCTION));
+ ! (sym->flags & BSF_FUNCTION), 0);
if (add_stdcall_alias && strchr (symbol_name, '@'))
{
- char *exported_name = xstrdup (symbol_name);
+ int lead_at = (*symbol_name == '@');
+ char *exported_name = xstrdup (symbol_name + lead_at);
char *atsym = strchr (exported_name, '@');
*atsym = '\0';
/* Note: stdcall alias symbols can never be data. */
- def_exports (exported_name, xstrdup (symbol_name), -1, 0, 0, 0);
+ def_exports (exported_name, xstrdup (symbol_name), -1, 0, 0, 0, 0);
}
}
}
@@ -1316,8 +1313,7 @@ scan_filtered_symbols (abfd, minisyms, symcount, size)
/* Add a list of symbols to exclude. */
static void
-add_excludes (new_excludes)
- const char *new_excludes;
+add_excludes (const char *new_excludes)
{
char *local_copy;
char *exclude_string;
@@ -1332,8 +1328,11 @@ add_excludes (new_excludes)
new_exclude = ((struct string_list *)
xmalloc (sizeof (struct string_list)));
new_exclude->string = (char *) xmalloc (strlen (exclude_string) + 2);
- /* FIXME: Is it always right to add a leading underscore? */
- sprintf (new_exclude->string, "_%s", exclude_string);
+ /* Don't add a leading underscore for fastcall symbols. */
+ if (*exclude_string == '@')
+ sprintf (new_exclude->string, "%s", exclude_string);
+ else
+ sprintf (new_exclude->string, "_%s", exclude_string);
new_exclude->next = excludes;
excludes = new_exclude;
@@ -1346,16 +1345,15 @@ add_excludes (new_excludes)
/* See if STRING is on the list of symbols to exclude. */
-static boolean
-match_exclude (string)
- const char *string;
+static bfd_boolean
+match_exclude (const char *string)
{
struct string_list *excl_item;
for (excl_item = excludes; excl_item; excl_item = excl_item->next)
if (strcmp (string, excl_item->string) == 0)
- return true;
- return false;
+ return TRUE;
+ return FALSE;
}
/* Add the default list of symbols to exclude. */
@@ -1369,11 +1367,7 @@ set_default_excludes (void)
/* Choose which symbols to export. */
static long
-filter_symbols (abfd, minisyms, symcount, size)
- bfd *abfd;
- PTR minisyms;
- long symcount;
- unsigned int size;
+filter_symbols (bfd *abfd, void *minisyms, long symcount, unsigned int size)
{
bfd_byte *from, *fromend, *to;
asymbol *store;
@@ -1391,7 +1385,7 @@ filter_symbols (abfd, minisyms, symcount, size)
int keep = 0;
asymbol *sym;
- sym = bfd_minisymbol_to_symbol (abfd, false, (const PTR) from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, FALSE, (const void *) from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1417,11 +1411,10 @@ filter_symbols (abfd, minisyms, symcount, size)
export. */
static void
-scan_all_symbols (abfd)
- bfd *abfd;
+scan_all_symbols (bfd *abfd)
{
long symcount;
- PTR minisyms;
+ void *minisyms;
unsigned int size;
/* Ignore bfds with an import descriptor table. We assume that any
@@ -1437,7 +1430,7 @@ scan_all_symbols (abfd)
return;
}
- symcount = bfd_read_minisymbols (abfd, false, &minisyms, &size);
+ symcount = bfd_read_minisymbols (abfd, FALSE, &minisyms, &size);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
@@ -1460,23 +1453,21 @@ scan_all_symbols (abfd)
/* Look at the object file to decide which symbols to export. */
static void
-scan_open_obj_file (abfd)
- bfd *abfd;
+scan_open_obj_file (bfd *abfd)
{
if (export_all_symbols)
scan_all_symbols (abfd);
else
scan_drectve_symbols (abfd);
- /* FIXME: we ought to read in and block out the base relocations */
+ /* FIXME: we ought to read in and block out the base relocations. */
/* xgettext:c-format */
inform (_("Done reading %s"), bfd_get_filename (abfd));
}
static void
-scan_obj_file (filename)
- const char *filename;
+scan_obj_file (const char *filename)
{
bfd * f = bfd_openr (filename, 0);
@@ -1519,8 +1510,7 @@ scan_obj_file (filename)
/**********************************************************************/
static void
-dump_def_info (f)
- FILE *f;
+dump_def_info (FILE *f)
{
int i;
export_type *exp;
@@ -1530,38 +1520,33 @@ dump_def_info (f)
fprintf (f, "\n");
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
{
- fprintf (f, "%s %d = %s %s @ %d %s%s%s\n",
+ fprintf (f, "%s %d = %s %s @ %d %s%s%s%s\n",
ASM_C,
i,
exp->name,
exp->internal_name,
exp->ordinal,
exp->noname ? "NONAME " : "",
+ exp->private ? "PRIVATE " : "",
exp->constant ? "CONSTANT" : "",
exp->data ? "DATA" : "");
}
}
-/* Generate the .exp file */
+/* Generate the .exp file. */
static int
-sfunc (a, b)
- const void *a;
- const void *b;
+sfunc (const void *a, const void *b)
{
return *(const long *) a - *(const long *) b;
}
static void
-flush_page (f, need, page_addr, on_page)
- FILE *f;
- long *need;
- int page_addr;
- int on_page;
+flush_page (FILE *f, long *need, int page_addr, int on_page)
{
int i;
- /* Flush this page */
+ /* Flush this page. */
fprintf (f, "\t%s\t0x%08x\t%s Starting RVA for chunk\n",
ASM_LONG,
page_addr,
@@ -1587,7 +1572,7 @@ flush_page (f, need, page_addr, on_page)
}
static void
-gen_def_file ()
+gen_def_file (void)
{
int i;
export_type *exp;
@@ -1605,23 +1590,28 @@ gen_def_file ()
char *quote = strchr (exp->name, '.') ? "\"" : "";
char *res = cplus_demangle (exp->internal_name, DMGL_ANSI | DMGL_PARAMS);
- if (strcmp (exp->name, exp->internal_name) == 0)
+ if (res)
{
+ fprintf (output_def,";\t%s\n", res);
+ free (res);
+ }
- fprintf (output_def, "\t%s%s%s @ %d%s%s ; %s\n",
+ if (strcmp (exp->name, exp->internal_name) == 0)
+ {
+ fprintf (output_def, "\t%s%s%s @ %d%s%s%s\n",
quote,
exp->name,
quote,
exp->ordinal,
exp->noname ? " NONAME" : "",
- exp->data ? " DATA" : "",
- res ? res : "");
+ exp->private ? "PRIVATE " : "",
+ exp->data ? " DATA" : "");
}
else
{
- char *quote1 = strchr (exp->internal_name, '.') ? "\"" : "";
+ char * quote1 = strchr (exp->internal_name, '.') ? "\"" : "";
/* char *alias = */
- fprintf (output_def, "\t%s%s%s = %s%s%s @ %d%s%s ; %s\n",
+ fprintf (output_def, "\t%s%s%s = %s%s%s @ %d%s%s%s\n",
quote,
exp->name,
quote,
@@ -1630,11 +1620,9 @@ gen_def_file ()
quote1,
exp->ordinal,
exp->noname ? " NONAME" : "",
- exp->data ? " DATA" : "",
- res ? res : "");
+ exp->private ? "PRIVATE " : "",
+ exp->data ? " DATA" : "");
}
- if (res)
- free (res);
}
inform (_("Added exports to output file"));
@@ -1645,8 +1633,7 @@ gen_def_file ()
the file. */
static void
-generate_idata_ofile (filvar)
- FILE *filvar;
+generate_idata_ofile (FILE *filvar)
{
iheadtype *headptr;
ifunctype *funcptr;
@@ -1738,9 +1725,7 @@ generate_idata_ofile (filvar)
/* Assemble the specified file. */
static void
-assemble_file (source, dest)
- const char * source;
- const char * dest;
+assemble_file (const char * source, const char * dest)
{
char * cmd;
@@ -1753,7 +1738,7 @@ assemble_file (source, dest)
}
static void
-gen_exp_file ()
+gen_exp_file (void)
{
FILE *f;
int i;
@@ -1825,9 +1810,15 @@ gen_exp_file ()
}
if (exp->forward == 0)
- fprintf (f, "\t%s%s%s%s\t%s %d\n", ASM_RVA_BEFORE,
- ASM_PREFIX,
- exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
+ {
+ if (exp->internal_name[0] == '@')
+ fprintf (f, "\t%s%s%s\t%s %d\n", ASM_RVA_BEFORE,
+ exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
+ else
+ fprintf (f, "\t%s%s%s%s\t%s %d\n", ASM_RVA_BEFORE,
+ ASM_PREFIX,
+ exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
+ }
else
fprintf (f, "\t%sf%d%s\t%s %d\n", ASM_RVA_BEFORE,
exp->forward, ASM_RVA_AFTER, ASM_C, exp->ordinal);
@@ -1854,14 +1845,14 @@ gen_exp_file ()
fprintf(f,"%s Export Name Table\n", ASM_C);
for (i = 0; (exp = d_exports_lexically[i]); i++)
- if (!exp->noname || show_allnames)
- {
+ {
+ if (!exp->noname || show_allnames)
fprintf (f, "n%d: %s \"%s\"\n",
exp->ordinal, ASM_TEXT, xlate (exp->name));
- if (exp->forward != 0)
- fprintf (f, "f%d: %s \"%s\"\n",
- exp->forward, ASM_TEXT, exp->internal_name);
- }
+ if (exp->forward != 0)
+ fprintf (f, "f%d: %s \"%s\"\n",
+ exp->forward, ASM_TEXT, exp->internal_name);
+ }
if (a_list)
{
@@ -1927,7 +1918,7 @@ gen_exp_file ()
}
}
- /* Dump the reloc section if a base file is provided */
+ /* Dump the reloc section if a base file is provided. */
if (base_file)
{
int addr;
@@ -1956,7 +1947,7 @@ gen_exp_file ()
int dst = 0;
int last = -1;
qsort (copy, num_entries, sizeof (long), sfunc);
- /* Delete duplcates */
+ /* Delete duplicates */
for (src = 0; src < num_entries; src++)
{
if (last != copy[src])
@@ -1987,7 +1978,7 @@ gen_exp_file ()
fclose (f);
- /* assemble the file */
+ /* Assemble the file. */
assemble_file (TMP_ASM, exp_name);
if (dontdeltemps == 0)
@@ -1997,12 +1988,14 @@ gen_exp_file ()
}
static const char *
-xlate (name)
- const char *name;
+xlate (const char *name)
{
- if (add_underscore)
+ int lead_at = (*name == '@');
+
+ if (add_underscore && !lead_at)
{
char *copy = xmalloc (strlen (name) + 2);
+
copy[0] = '_';
strcpy (copy + 1, name);
name = copy;
@@ -2011,6 +2004,8 @@ xlate (name)
if (killat)
{
char *p;
+
+ name += lead_at;
p = strchr (name, '@');
if (p)
*p = 0;
@@ -2023,9 +2018,7 @@ xlate (name)
#if 0
static void
-dump_iat (f, exp)
- FILE *f;
- export_type *exp;
+dump_iat (FILE *f, export_type *exp)
{
if (exp->noname && !show_allnames )
{
@@ -2053,7 +2046,7 @@ typedef struct
asymbol *sym;
asymbol **sympp;
int size;
- unsigned char *data;
+ unsigned char *data;
} sinfo;
#ifndef DLLTOOL_PPC
@@ -2088,8 +2081,8 @@ static sinfo secdata[NSECS] =
#else
-/* Sections numbered to make the order the same as other PowerPC NT */
-/* compilers. This also keeps funny alignment thingies from happening. */
+/* Sections numbered to make the order the same as other PowerPC NT
+ compilers. This also keeps funny alignment thingies from happening. */
#define TEXT 0
#define PDATA 1
#define RDATA 2
@@ -2117,9 +2110,8 @@ static sinfo secdata[NSECS] =
#endif
-/*
-This is what we're trying to make. We generate the imp symbols with
-both single and double underscores, for compatibility.
+/* This is what we're trying to make. We generate the imp symbols with
+ both single and double underscores, for compatibility.
.text
.global _GetFileVersionInfoSizeW@8
@@ -2142,7 +2134,7 @@ ID2: .short 2
.asciz "GetFileVersionInfoSizeW"
-For the PowerPC, here's the variation on the above scheme:
+ For the PowerPC, here's the variation on the above scheme:
# Rather than a simple "jmp *", the code to get to the dll function
# looks like:
@@ -2153,26 +2145,46 @@ For the PowerPC, here's the variation on the above scheme:
stw r2,4(r1)
mtctr r12
lwz r2,4(r11)
- bctr
-*/
+ bctr */
static char *
-make_label (prefix, name)
- const char *prefix;
- const char *name;
+make_label (const char *prefix, const char *name)
{
int len = strlen (ASM_PREFIX) + strlen (prefix) + strlen (name);
char *copy = xmalloc (len +1 );
+
strcpy (copy, ASM_PREFIX);
strcat (copy, prefix);
strcat (copy, name);
return copy;
}
+static char *
+make_imp_label (const char *prefix, const char *name)
+{
+ int len;
+ char *copy;
+
+ if (name[0] == '@')
+ {
+ len = strlen (prefix) + strlen (name);
+ copy = xmalloc (len + 1);
+ strcpy (copy, prefix);
+ strcat (copy, name);
+ }
+ else
+ {
+ len = strlen (ASM_PREFIX) + strlen (prefix) + strlen (name);
+ copy = xmalloc (len + 1);
+ strcpy (copy, prefix);
+ strcat (copy, ASM_PREFIX);
+ strcat (copy, name);
+ }
+ return copy;
+}
+
static bfd *
-make_one_lib_file (exp, i)
- export_type *exp;
- int i;
+make_one_lib_file (export_type *exp, int i)
{
#if 0
{
@@ -2245,7 +2257,7 @@ make_one_lib_file (exp, i)
asymbol * ptrs[NSECS + 4 + EXTRA + 1];
flagword applicable;
- char * outname = xmalloc (10);
+ char * outname = xmalloc (strlen (TMP_STUB) + 10);
int oidx = 0;
@@ -2270,7 +2282,7 @@ make_one_lib_file (exp, i)
applicable = bfd_applicable_section_flags (abfd);
- /* First make symbols for the sections */
+ /* First make symbols for the sections. */
for (i = 0; i < NSECS; i++)
{
sinfo *si = secdata + i;
@@ -2299,12 +2311,12 @@ make_one_lib_file (exp, i)
if (! exp->data)
{
exp_label = bfd_make_empty_symbol (abfd);
- exp_label->name = make_label ("", exp->name);
+ exp_label->name = make_imp_label ("", exp->name);
/* On PowerPC, the function name points to a descriptor in
the rdata section, the first element of which is a
pointer to the code (..function_name), and the second
- points to the .toc */
+ points to the .toc. */
#ifdef DLLTOOL_PPC
if (machine == MPPC)
exp_label->section = secdata[RDATA].sec;
@@ -2328,14 +2340,14 @@ make_one_lib_file (exp, i)
if (create_compat_implib)
{
iname = bfd_make_empty_symbol (abfd);
- iname->name = make_label ("__imp_", exp->name);
+ iname->name = make_imp_label ("___imp", exp->name);
iname->section = secdata[IDATA5].sec;
iname->flags = BSF_GLOBAL;
iname->value = 0;
}
iname2 = bfd_make_empty_symbol (abfd);
- iname2->name = make_label ("_imp__", exp->name);
+ iname2->name = make_imp_label ("__imp_", exp->name);
iname2->section = secdata[IDATA5].sec;
iname2->flags = BSF_GLOBAL;
iname2->value = 0;
@@ -2347,7 +2359,6 @@ make_one_lib_file (exp, i)
iname_lab->flags = 0;
iname_lab->value = 0;
-
iname_pp = ptrs + oidx;
if (create_compat_implib)
ptrs[oidx++] = iname;
@@ -2357,7 +2368,7 @@ make_one_lib_file (exp, i)
ptrs[oidx++] = iname_lab;
#ifdef DLLTOOL_PPC
- /* The symbol refering to the code (.text) */
+ /* The symbol referring to the code (.text). */
{
asymbol *function_name;
@@ -2371,9 +2382,9 @@ make_one_lib_file (exp, i)
ptrs[oidx++] = function_name;
}
- /* The .toc symbol */
+ /* The .toc symbol. */
{
- asymbol *toc_symbol; /* The .toc symbol */
+ asymbol *toc_symbol;
toc_symbol = bfd_make_empty_symbol (abfd);
toc_symbol->name = make_label (".", "toc");
@@ -2432,7 +2443,7 @@ make_one_lib_file (exp, i)
case IDATA4:
case IDATA5:
/* An idata$4 or idata$5 is one word long, and has an
- rva to idata$6 */
+ rva to idata$6. */
si->data = xmalloc (4);
si->size = 4;
@@ -2477,7 +2488,7 @@ make_one_lib_file (exp, i)
break;
case IDATA7:
si->size = 4;
- si->data =xmalloc(4);
+ si->data =xmalloc (4);
memset (si->data, 0, si->size);
rel = xmalloc (sizeof (arelent));
rpp = xmalloc (sizeof (arelent *) * 2);
@@ -2493,16 +2504,16 @@ make_one_lib_file (exp, i)
#ifdef DLLTOOL_PPC
case PDATA:
{
- /* The .pdata section is 5 words long. */
- /* Think of it as: */
- /* struct */
- /* { */
- /* bfd_vma BeginAddress, [0x00] */
- /* EndAddress, [0x04] */
- /* ExceptionHandler, [0x08] */
- /* HandlerData, [0x0c] */
- /* PrologEndAddress; [0x10] */
- /* }; */
+ /* The .pdata section is 5 words long.
+ Think of it as:
+ struct
+ {
+ bfd_vma BeginAddress, [0x00]
+ EndAddress, [0x04]
+ ExceptionHandler, [0x08]
+ HandlerData, [0x0c]
+ PrologEndAddress; [0x10]
+ }; */
/* So this pdata section setups up this as a glue linkage to
a dll routine. There are a number of house keeping things
@@ -2517,15 +2528,14 @@ make_one_lib_file (exp, i)
So we need a total of four relocs for this section.
3. Lastly, the HandlerData field is set to 0x03, to indicate
- that this is a glue routine.
- */
+ that this is a glue routine. */
arelent *imglue, *ba_rel, *ea_rel, *pea_rel;
- /* alignment must be set to 2**2 or you get extra stuff */
+ /* Alignment must be set to 2**2 or you get extra stuff. */
bfd_set_section_alignment(abfd, sec, 2);
si->size = 4 * 5;
- si->data =xmalloc(4 * 5);
+ si->data = xmalloc (si->size);
memset (si->data, 0, si->size);
rpp = xmalloc (sizeof (arelent *) * 5);
rpp[0] = imglue = xmalloc (sizeof (arelent));
@@ -2534,7 +2544,7 @@ make_one_lib_file (exp, i)
rpp[3] = pea_rel = xmalloc (sizeof (arelent));
rpp[4] = 0;
- /* stick the toc reload instruction in the glue reloc */
+ /* Stick the toc reload instruction in the glue reloc. */
bfd_put_32(abfd, ppc_glue_insn, (char *) &imglue->address);
imglue->addend = 0;
@@ -2547,17 +2557,17 @@ make_one_lib_file (exp, i)
ba_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
ba_rel->sym_ptr_ptr = fn_pp;
- bfd_put_32(abfd, 0x18, si->data + 0x04);
+ bfd_put_32 (abfd, 0x18, si->data + 0x04);
ea_rel->address = 4;
ea_rel->addend = 0;
ea_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
ea_rel->sym_ptr_ptr = fn_pp;
- /* mark it as glue */
- bfd_put_32(abfd, 0x03, si->data + 0x0c);
+ /* Mark it as glue. */
+ bfd_put_32 (abfd, 0x03, si->data + 0x0c);
- /* mark the prolog end address */
- bfd_put_32(abfd, 0x0D, si->data + 0x10);
+ /* Mark the prolog end address. */
+ bfd_put_32 (abfd, 0x0D, si->data + 0x10);
pea_rel->address = 0x10;
pea_rel->addend = 0;
pea_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
@@ -2572,9 +2582,7 @@ make_one_lib_file (exp, i)
descriptor consisting of:
1. The address of the code.
2. The address of the appropriate .toc
- We use relocs to build this.
- */
-
+ We use relocs to build this. */
si->size = 8;
si->data = xmalloc (8);
memset (si->data, 0, si->size);
@@ -2605,7 +2613,7 @@ make_one_lib_file (exp, i)
{
bfd_vma vma = 0;
- /* Size up all the sections */
+ /* Size up all the sections. */
for (i = 0; i < NSECS; i++)
{
sinfo *si = secdata + i;
@@ -2616,7 +2624,7 @@ make_one_lib_file (exp, i)
/* vma += si->size;*/
}
}
- /* Write them out */
+ /* Write them out. */
for (i = 0; i < NSECS; i++)
{
sinfo *si = secdata + i;
@@ -2641,7 +2649,7 @@ make_one_lib_file (exp, i)
}
static bfd *
-make_head ()
+make_head (void)
{
FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
@@ -2700,7 +2708,7 @@ make_head ()
}
static bfd *
-make_tail ()
+make_tail (void)
{
FILE *f = fopen (TMP_TAIL_S, FOPEN_WT);
@@ -2728,8 +2736,7 @@ make_tail ()
would be to mark this section as a comdat type 2 section, so
only one would appear in the final .exe (if our linker supported
comdat, that is) or cause it to be inserted by something else (say
- crt0)
- */
+ crt0). */
fprintf (f, "\t.section .idata$3\n");
fprintf (f, "\t%s\t0\n", ASM_LONG);
@@ -2741,7 +2748,7 @@ make_tail ()
#ifdef DLLTOOL_PPC
/* Other PowerPC NT compilers use idata$6 for the dllname, so I
- do too. Original, huh? */
+ do too. Original, huh? */
fprintf (f, "\t.section .idata$6\n");
#else
fprintf (f, "\t.section .idata$7\n");
@@ -2755,11 +2762,11 @@ make_tail ()
assemble_file (TMP_TAIL_S, TMP_TAIL_O);
- return bfd_openr (TMP_TAIL_O, HOW_BFD_READ_TARGET);
+ return bfd_openr (TMP_TAIL_O, HOW_BFD_READ_TARGET);
}
static void
-gen_lib_file ()
+gen_lib_file (void)
{
int i;
export_type *exp;
@@ -2783,7 +2790,6 @@ gen_lib_file ()
outarch->has_armap = 1;
/* Work out a reasonable size of things to put onto one line. */
-
ar_head = make_head ();
ar_tail = make_tail();
@@ -2792,13 +2798,16 @@ gen_lib_file ()
for (i = 0; (exp = d_exports_lexically[i]); i++)
{
- bfd *n = make_one_lib_file (exp, i);
+ bfd *n;
+ /* Don't add PRIVATE entries to import lib. */
+ if (exp->private)
+ continue;
+ n = make_one_lib_file (exp, i);
n->next = head;
head = n;
}
- /* Now stick them all into the archive */
-
+ /* Now stick them all into the archive. */
ar_head->next = head;
ar_tail->next = ar_head;
head = ar_tail;
@@ -2816,8 +2825,7 @@ gen_lib_file ()
head = n;
}
- /* Delete all the temp files */
-
+ /* Delete all the temp files. */
if (dontdeltemps == 0)
{
unlink (TMP_HEAD_O);
@@ -2830,9 +2838,12 @@ gen_lib_file ()
{
char *name;
- name = (char *) alloca (sizeof TMP_STUB + 10);
- for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
+ name = (char *) alloca (strlen (TMP_STUB) + 10);
+ for (i = 0; (exp = d_exports_lexically[i]); i++)
{
+ /* Don't delete non-existent stubs for PRIVATE entries. */
+ if (exp->private)
+ continue;
sprintf (name, "%s%05d.o", TMP_STUB, i);
if (unlink (name) < 0)
/* xgettext:c-format */
@@ -2843,21 +2854,18 @@ gen_lib_file ()
inform (_("Created lib file"));
}
-/**********************************************************************/
-
/* Run through the information gathered from the .o files and the
- .def file and work out the best stuff */
+ .def file and work out the best stuff. */
+
static int
-pfunc (a, b)
- const void *a;
- const void *b;
+pfunc (const void *a, const void *b)
{
export_type *ap = *(export_type **) a;
export_type *bp = *(export_type **) b;
if (ap->ordinal == bp->ordinal)
return 0;
- /* unset ordinals go to the bottom */
+ /* Unset ordinals go to the bottom. */
if (ap->ordinal == -1)
return 1;
if (bp->ordinal == -1)
@@ -2866,9 +2874,7 @@ pfunc (a, b)
}
static int
-nfunc (a, b)
- const void *a;
- const void *b;
+nfunc (const void *a, const void *b)
{
export_type *ap = *(export_type **) a;
export_type *bp = *(export_type **) b;
@@ -2877,11 +2883,11 @@ nfunc (a, b)
}
static void
-remove_null_names (ptr)
- export_type **ptr;
+remove_null_names (export_type **ptr)
{
int src;
int dst;
+
for (dst = src = 0; src < d_nfuncs; src++)
{
if (ptr[src])
@@ -2894,12 +2900,7 @@ remove_null_names (ptr)
}
static void
-dtab (ptr)
- export_type ** ptr
-#ifndef SACDEBUG
-ATTRIBUTE_UNUSED
-#endif
- ;
+dtab (export_type **ptr ATTRIBUTE_UNUSED)
{
#ifdef SACDEBUG
int i;
@@ -2920,16 +2921,15 @@ ATTRIBUTE_UNUSED
}
static void
-process_duplicates (d_export_vec)
- export_type **d_export_vec;
+process_duplicates (export_type **d_export_vec)
{
int more = 1;
int i;
+
while (more)
{
-
more = 0;
- /* Remove duplicates */
+ /* Remove duplicates. */
qsort (d_export_vec, d_nfuncs, sizeof (export_type *), nfunc);
dtab (d_export_vec);
@@ -2938,7 +2938,6 @@ process_duplicates (d_export_vec)
if (strcmp (d_export_vec[i]->name,
d_export_vec[i + 1]->name) == 0)
{
-
export_type *a = d_export_vec[i];
export_type *b = d_export_vec[i + 1];
@@ -2954,7 +2953,7 @@ process_duplicates (d_export_vec)
fatal (_("Error, duplicate EXPORT with oridinals: %s"),
a->name);
- /* Merge attributes */
+ /* Merge attributes. */
b->ordinal = a->ordinal > 0 ? a->ordinal : b->ordinal;
b->constant |= a->constant;
b->noname |= a->noname;
@@ -2968,18 +2967,14 @@ process_duplicates (d_export_vec)
}
}
-
- /* Count the names */
+ /* Count the names. */
for (i = 0; i < d_nfuncs; i++)
- {
- if (!d_export_vec[i]->noname)
- d_named_nfuncs++;
- }
+ if (!d_export_vec[i]->noname)
+ d_named_nfuncs++;
}
static void
-fill_ordinals (d_export_vec)
- export_type **d_export_vec;
+fill_ordinals (export_type **d_export_vec)
{
int lowest = -1;
int i;
@@ -2988,22 +2983,20 @@ fill_ordinals (d_export_vec)
qsort (d_export_vec, d_nfuncs, sizeof (export_type *), pfunc);
- /* fill in the unset ordinals with ones from our range */
-
+ /* Fill in the unset ordinals with ones from our range. */
ptr = (char *) xmalloc (size);
memset (ptr, 0, size);
- /* Mark in our large vector all the numbers that are taken */
+ /* Mark in our large vector all the numbers that are taken. */
for (i = 0; i < d_nfuncs; i++)
{
if (d_export_vec[i]->ordinal != -1)
{
ptr[d_export_vec[i]->ordinal] = 1;
+
if (lowest == -1 || d_export_vec[i]->ordinal < lowest)
- {
- lowest = d_export_vec[i]->ordinal;
- }
+ lowest = d_export_vec[i]->ordinal;
}
}
@@ -3016,7 +3009,7 @@ fill_ordinals (d_export_vec)
{
if (d_export_vec[i]->ordinal == -1)
{
- register int j;
+ int j;
/* First try within or after any user supplied range. */
for (j = lowest; j < size; j++)
@@ -3041,8 +3034,7 @@ fill_ordinals (d_export_vec)
free (ptr);
- /* And resort */
-
+ /* And resort. */
qsort (d_export_vec, d_nfuncs, sizeof (export_type *), pfunc);
/* Work out the lowest and highest ordinal numbers. */
@@ -3056,9 +3048,7 @@ fill_ordinals (d_export_vec)
}
static int
-alphafunc (av,bv)
- const void *av;
- const void *bv;
+alphafunc (const void *av, const void *bv)
{
const export_type **a = (const export_type **) av;
const export_type **b = (const export_type **) bv;
@@ -3067,28 +3057,24 @@ alphafunc (av,bv)
}
static void
-mangle_defs ()
+mangle_defs (void)
{
- /* First work out the minimum ordinal chosen */
-
+ /* First work out the minimum ordinal chosen. */
export_type *exp;
int i;
int hint = 0;
- export_type **d_export_vec
- = (export_type **) xmalloc (sizeof (export_type *) * d_nfuncs);
+ export_type **d_export_vec = xmalloc (sizeof (export_type *) * d_nfuncs);
inform (_("Processing definitions"));
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
- {
- d_export_vec[i] = exp;
- }
+ d_export_vec[i] = exp;
process_duplicates (d_export_vec);
fill_ordinals (d_export_vec);
- /* Put back the list in the new order */
+ /* Put back the list in the new order. */
d_exports = 0;
for (i = d_nfuncs - 1; i >= 0; i--)
{
@@ -3096,35 +3082,27 @@ mangle_defs ()
d_exports = d_export_vec[i];
}
- /* Build list in alpha order */
+ /* Build list in alpha order. */
d_exports_lexically = (export_type **)
xmalloc (sizeof (export_type *) * (d_nfuncs + 1));
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
- {
- d_exports_lexically[i] = exp;
- }
+ d_exports_lexically[i] = exp;
+
d_exports_lexically[i] = 0;
qsort (d_exports_lexically, i, sizeof (export_type *), alphafunc);
- /* Fill exp entries with their hint values */
-
+ /* Fill exp entries with their hint values. */
for (i = 0; i < d_nfuncs; i++)
- {
- if (!d_exports_lexically[i]->noname || show_allnames)
- d_exports_lexically[i]->hint = hint++;
- }
+ if (!d_exports_lexically[i]->noname || show_allnames)
+ d_exports_lexically[i]->hint = hint++;
inform (_("Processed definitions"));
}
-/**********************************************************************/
-
static void
-usage (file, status)
- FILE *file;
- int status;
+usage (FILE *file, int status)
{
/* xgetext:c-format */
fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
@@ -3151,6 +3129,7 @@ usage (file, status)
fprintf (file, _(" -f --as-flags <flags> Pass <flags> to the assembler.\n"));
fprintf (file, _(" -C --compat-implib Create backward compatible import library.\n"));
fprintf (file, _(" -n --no-delete Keep temp files (repeat for extra preservation).\n"));
+ fprintf (file, _(" -t --temp-prefix <prefix> Use <prefix> to construct temp file names.\n"));
fprintf (file, _(" -v --verbose Be verbose.\n"));
fprintf (file, _(" -V --version Display the program version.\n"));
fprintf (file, _(" -h --help Display this information.\n"));
@@ -3180,7 +3159,7 @@ static const struct option long_options[] =
{"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMS},
{"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
{"output-lib", required_argument, NULL, 'l'},
- {"def", required_argument, NULL, 'd'}, /* for compatiblity with older versions */
+ {"def", required_argument, NULL, 'd'}, /* for compatibility with older versions */
{"input-def", required_argument, NULL, 'd'},
{"add-underscore", no_argument, NULL, 'U'},
{"kill-at", no_argument, NULL, 'k'},
@@ -3195,15 +3174,14 @@ static const struct option long_options[] =
{"as-flags", required_argument, NULL, 'f'},
{"mcore-elf", required_argument, NULL, 'M'},
{"compat-implib", no_argument, NULL, 'C'},
+ {"temp-prefix", required_argument, NULL, 't'},
{NULL,0,NULL,0}
};
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (ac, av)
- int ac;
- char **av;
+main (int ac, char **av)
{
int c;
int i;
@@ -3232,16 +3210,16 @@ main (ac, av)
switch (c)
{
case OPTION_EXPORT_ALL_SYMS:
- export_all_symbols = true;
+ export_all_symbols = TRUE;
break;
case OPTION_NO_EXPORT_ALL_SYMS:
- export_all_symbols = false;
+ export_all_symbols = FALSE;
break;
case OPTION_EXCLUDE_SYMS:
add_excludes (optarg);
break;
case OPTION_NO_DEFAULT_EXCLUDES:
- do_default_excludes = false;
+ do_default_excludes = FALSE;
break;
case 'x':
no_idata4 = 1;
@@ -3252,11 +3230,14 @@ main (ac, av)
case 'S':
as_name = optarg;
break;
+ case 't':
+ tmp_prefix = optarg;
+ break;
case 'f':
as_flags = optarg;
break;
- /* ignored for compatibility */
+ /* Ignored for compatibility. */
case 'u':
break;
case 'a':
@@ -3330,6 +3311,9 @@ main (ac, av)
}
}
+ if (!tmp_prefix)
+ tmp_prefix = prefix_encode ("d", getpid ());
+
for (i = 0; mtable[i].type; i++)
if (strcmp (mtable[i].type, mname) == 0)
break;
@@ -3355,7 +3339,7 @@ main (ac, av)
symbols in the .drectve section. The default excludes are meant
to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
if (! export_all_symbols)
- do_default_excludes = false;
+ do_default_excludes = FALSE;
if (do_default_excludes)
set_default_excludes ();
@@ -3408,10 +3392,7 @@ main (ac, av)
appropriate. */
static char *
-look_for_prog (prog_name, prefix, end_prefix)
- const char *prog_name;
- const char *prefix;
- int end_prefix;
+look_for_prog (const char *prog_name, const char *prefix, int end_prefix)
{
struct stat s;
char *cmd;
@@ -3477,8 +3458,7 @@ look_for_prog (prog_name, prefix, end_prefix)
Returns a dynamically allocated string. */
static char *
-deduce_name (prog_name)
- const char *prog_name;
+deduce_name (const char *prog_name)
{
char *cmd;
char *dash, *slash, *cp;
@@ -3566,21 +3546,21 @@ mcore_elf_gen_out_file (void)
ptr = & fnames;
ds = dyn_string_new (100);
- dyn_string_append (ds, "-r ");
+ dyn_string_append_cstr (ds, "-r ");
if (mcore_elf_linker_flags != NULL)
- dyn_string_append (ds, mcore_elf_linker_flags);
+ dyn_string_append_cstr (ds, mcore_elf_linker_flags);
while (ptr->next != NULL)
{
- dyn_string_append (ds, ptr->filename);
- dyn_string_append (ds, " ");
+ dyn_string_append_cstr (ds, ptr->filename);
+ dyn_string_append_cstr (ds, " ");
ptr = ptr->next;
}
- dyn_string_append (ds, "-o ");
- dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
+ dyn_string_append_cstr (ds, "-o ");
+ dyn_string_append_cstr (ds, MCORE_ELF_TMP_OBJ);
if (mcore_elf_linker == NULL)
mcore_elf_linker = deduce_name ("ld");
@@ -3590,32 +3570,31 @@ mcore_elf_gen_out_file (void)
dyn_string_delete (ds);
/* Step two. Create a .exp file and a .lib file from the temporary file.
- Do this by recursively invoking dlltool....*/
+ Do this by recursively invoking dlltool... */
ds = dyn_string_new (100);
- dyn_string_append (ds, "-S ");
- dyn_string_append (ds, as_name);
+ dyn_string_append_cstr (ds, "-S ");
+ dyn_string_append_cstr (ds, as_name);
- dyn_string_append (ds, " -e ");
- dyn_string_append (ds, MCORE_ELF_TMP_EXP);
- dyn_string_append (ds, " -l ");
- dyn_string_append (ds, MCORE_ELF_TMP_LIB);
- dyn_string_append (ds, " " );
- dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
+ dyn_string_append_cstr (ds, " -e ");
+ dyn_string_append_cstr (ds, MCORE_ELF_TMP_EXP);
+ dyn_string_append_cstr (ds, " -l ");
+ dyn_string_append_cstr (ds, MCORE_ELF_TMP_LIB);
+ dyn_string_append_cstr (ds, " " );
+ dyn_string_append_cstr (ds, MCORE_ELF_TMP_OBJ);
if (verbose)
- dyn_string_append (ds, " -v");
+ dyn_string_append_cstr (ds, " -v");
if (dontdeltemps)
{
- dyn_string_append (ds, " -n");
+ dyn_string_append_cstr (ds, " -n");
if (dontdeltemps > 1)
- dyn_string_append (ds, " -n");
+ dyn_string_append_cstr (ds, " -n");
}
/* XXX - FIME: ought to check/copy other command line options as well. */
-
run (program_name, ds->s);
dyn_string_delete (ds);
@@ -3623,17 +3602,17 @@ mcore_elf_gen_out_file (void)
/* Step four. Feed the .exp and object files to ld -shared to create the dll. */
ds = dyn_string_new (100);
- dyn_string_append (ds, "-shared ");
+ dyn_string_append_cstr (ds, "-shared ");
if (mcore_elf_linker_flags)
- dyn_string_append (ds, mcore_elf_linker_flags);
-
- dyn_string_append (ds, " ");
- dyn_string_append (ds, MCORE_ELF_TMP_EXP);
- dyn_string_append (ds, " ");
- dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
- dyn_string_append (ds, " -o ");
- dyn_string_append (ds, mcore_elf_out_file);
+ dyn_string_append_cstr (ds, mcore_elf_linker_flags);
+
+ dyn_string_append_cstr (ds, " ");
+ dyn_string_append_cstr (ds, MCORE_ELF_TMP_EXP);
+ dyn_string_append_cstr (ds, " ");
+ dyn_string_append_cstr (ds, MCORE_ELF_TMP_OBJ);
+ dyn_string_append_cstr (ds, " -o ");
+ dyn_string_append_cstr (ds, mcore_elf_out_file);
run (mcore_elf_linker, ds->s);
diff --git a/contrib/binutils/binutils/dlltool.h b/contrib/binutils/binutils/dlltool.h
index 29c825d..f488d96 100644
--- a/contrib/binutils/binutils/dlltool.h
+++ b/contrib/binutils/binutils/dlltool.h
@@ -1,5 +1,5 @@
/* dlltool.h -- header file for dlltool
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -21,22 +21,22 @@
#include "ansidecl.h"
#include <stdio.h>
-extern void def_code PARAMS ((int));
-extern void def_data PARAMS ((int));
-extern void def_description PARAMS ((const char *));
-extern void def_exports
- PARAMS ((const char *, const char *, int, int, int, int));
-extern void def_heapsize PARAMS ((int, int));
+extern void def_code (int);
+extern void def_data (int);
+extern void def_description (const char *);
+extern void def_exports (const char *, const char *, int, int, int, int, int);
+extern void def_heapsize (int, int);
extern void def_import
- PARAMS ((const char *, const char *, const char *, const char *, int));
-extern void def_library PARAMS ((const char *, int));
-extern void def_name PARAMS ((const char *, int));
-extern void def_section PARAMS ((const char *, int));
-extern void def_stacksize PARAMS ((int, int));
-extern void def_version PARAMS ((int, int));
-extern int yyparse PARAMS ((void));
-extern int yyerror PARAMS ((const char *));
+ (const char *, const char *, const char *, const char *, int);
+extern void def_library (const char *, int);
+extern void def_name (const char *, int);
+extern void def_section (const char *, int);
+extern void def_stacksize (int, int);
+extern void def_version (int, int);
+extern int yyparse (void);
+extern int yyerror (const char *);
+extern int yylex (void);
+
extern int yydebug;
-extern int yylex PARAMS ((void));
extern FILE *yyin;
extern int linenumber;
diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c
index 4ca5936..e4db7ba 100644
--- a/contrib/binutils/binutils/dllwrap.c
+++ b/contrib/binutils/binutils/dllwrap.c
@@ -1,5 +1,5 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -114,17 +114,17 @@ static int delete_base_file = 1;
static int delete_exp_file = 1;
static int delete_def_file = 1;
-static int run PARAMS ((const char *, char *));
-static char *mybasename PARAMS ((const char *));
-static int strhash PARAMS ((const char *));
-static void usage PARAMS ((FILE *, int));
-static void display PARAMS ((const char *, va_list));
-static void inform PARAMS ((const char *, ...));
-static void warn PARAMS ((const char *, ...));
-static char *look_for_prog PARAMS ((const char *, const char *, int));
-static char *deduce_name PARAMS ((const char *));
-static void delete_temp_files PARAMS ((void));
-static void cleanup_and_exit PARAMS ((int));
+static int run (const char *, char *);
+static char *mybasename (const char *);
+static int strhash (const char *);
+static void usage (FILE *, int);
+static void display (const char *, va_list);
+static void inform (const char *, ...);
+static void warn (const char *, ...);
+static char *look_for_prog (const char *, const char *, int);
+static char *deduce_name (const char *);
+static void delete_temp_files (void);
+static void cleanup_and_exit (int);
/**********************************************************************/
@@ -137,9 +137,7 @@ static void cleanup_and_exit PARAMS ((int));
(hopefully) soon be retired in favor of `ld --shared. */
static void
-display (message, args)
- const char * message;
- va_list args;
+display (const char * message, va_list args)
{
if (program_name != NULL)
fprintf (stderr, "%s: ", program_name);
@@ -180,10 +178,7 @@ warn VPARAMS ((const char *format, ...))
appropriate. */
static char *
-look_for_prog (prog_name, prefix, end_prefix)
- const char *prog_name;
- const char *prefix;
- int end_prefix;
+look_for_prog (const char *prog_name, const char *prefix, int end_prefix)
{
struct stat s;
char *cmd;
@@ -249,8 +244,7 @@ look_for_prog (prog_name, prefix, end_prefix)
Returns a dynamically allocated string. */
static char *
-deduce_name (prog_name)
- const char *prog_name;
+deduce_name (const char *prog_name)
{
char *cmd;
char *dash, *slash, *cp;
@@ -298,7 +292,7 @@ deduce_name (prog_name)
}
static void
-delete_temp_files ()
+delete_temp_files (void)
{
if (delete_base_file && base_file_name)
{
@@ -349,17 +343,14 @@ delete_temp_files ()
}
static void
-cleanup_and_exit (status)
- int status;
+cleanup_and_exit (int status)
{
delete_temp_files ();
exit (status);
}
static int
-run (what, args)
- const char *what;
- char *args;
+run (const char *what, char *args)
{
char *s;
int pid, wait_status, retcode;
@@ -445,8 +436,7 @@ run (what, args)
}
static char *
-mybasename (name)
- const char *name;
+mybasename (const char *name)
{
const char *base = name;
@@ -462,8 +452,7 @@ mybasename (name)
}
static int
-strhash (str)
- const char *str;
+strhash (const char *str)
{
const unsigned char *s;
unsigned long hash;
@@ -488,9 +477,7 @@ strhash (str)
/**********************************************************************/
static void
-usage (file, status)
- FILE *file;
- int status;
+usage (FILE *file, int status)
{
fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
fprintf (file, _(" Generic options:\n"));
@@ -552,7 +539,7 @@ usage (file, status)
/* DLLTOOL options. */
#define OPTION_NODELETE (OPTION_MNO_CYGWIN + 1)
#define OPTION_DLLNAME (OPTION_NODELETE + 1)
-#define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1)
+#define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1)
#define OPTION_NO_IDATA5 (OPTION_NO_IDATA4 + 1)
#define OPTION_OUTPUT_EXP (OPTION_NO_IDATA5 + 1)
#define OPTION_OUTPUT_DEF (OPTION_OUTPUT_EXP + 1)
@@ -611,12 +598,10 @@ static const struct option long_options[] =
{0, 0, 0, 0}
};
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int i;
diff --git a/contrib/binutils/binutils/doc/Makefile.am b/contrib/binutils/binutils/doc/Makefile.am
index 9db5819..851f205 100644
--- a/contrib/binutils/binutils/doc/Makefile.am
+++ b/contrib/binutils/binutils/doc/Makefile.am
@@ -45,98 +45,98 @@ binutils.info: $(binutils_TEXI) config.texi
# Man page generation from texinfo
addr2line.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Daddr2line < $< > addr2line.pod
+ -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f addr2line.pod
ar.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dar < $< > ar.pod
+ -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ar.pod
dlltool.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Ddlltool < $< > dlltool.pod
+ -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f dlltool.pod
nlmconv.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dnlmconv < $< > nlmconv.pod
+ -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nlmconv.pod
nm.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dnm < $< > nm.pod
+ -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nm.pod
objcopy.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dobjcopy < $< > objcopy.pod
+ -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objcopy.pod
objdump.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dobjdump < $< > objdump.pod
+ -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objdump.pod
ranlib.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dranlib < $< > ranlib.pod
+ -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ranlib.pod
readelf.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dreadelf < $< > readelf.pod
+ -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f readelf.pod
size.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dsize < $< > size.pod
+ -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f size.pod
strings.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dstrings < $< > strings.pod
+ -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strings.pod
strip.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dstrip < $< > strip.pod
+ -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strip.pod
windres.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dwindres < $< > windres.pod
+ -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f windres.pod
cxxfilt.man: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $< > $(DEMANGLER_NAME).pod
+ -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f $(DEMANGLER_NAME).pod
diff --git a/contrib/binutils/binutils/doc/Makefile.in b/contrib/binutils/binutils/doc/Makefile.in
index eeef90f..e05f5be 100644
--- a/contrib/binutils/binutils/doc/Makefile.in
+++ b/contrib/binutils/binutils/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -113,7 +113,6 @@ POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRIP = @STRIP@
-UNDERSCORE = @UNDERSCORE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
@@ -445,98 +444,98 @@ binutils.info: $(binutils_TEXI) config.texi
# Man page generation from texinfo
addr2line.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Daddr2line < $< > addr2line.pod
+ -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f addr2line.pod
ar.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dar < $< > ar.pod
+ -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ar.pod
dlltool.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Ddlltool < $< > dlltool.pod
+ -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f dlltool.pod
nlmconv.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dnlmconv < $< > nlmconv.pod
+ -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nlmconv.pod
nm.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dnm < $< > nm.pod
+ -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nm.pod
objcopy.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dobjcopy < $< > objcopy.pod
+ -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objcopy.pod
objdump.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dobjdump < $< > objdump.pod
+ -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objdump.pod
ranlib.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dranlib < $< > ranlib.pod
+ -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ranlib.pod
readelf.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dreadelf < $< > readelf.pod
+ -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f readelf.pod
size.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dsize < $< > size.pod
+ -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f size.pod
strings.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dstrings < $< > strings.pod
+ -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strings.pod
strip.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dstrip < $< > strip.pod
+ -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strip.pod
windres.1: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dwindres < $< > windres.pod
+ -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f windres.pod
cxxfilt.man: $(binutils_TEXI)
touch $@
- -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $< > $(DEMANGLER_NAME).pod
+ -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f $(DEMANGLER_NAME).pod
diff --git a/contrib/binutils/binutils/doc/addr2line.1 b/contrib/binutils/binutils/doc/addr2line.1
index f343f5d..5808d65 100644
--- a/contrib/binutils/binutils/doc/addr2line.1
+++ b/contrib/binutils/binutils/doc/addr2line.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "ADDR2LINE 1"
-.TH ADDR2LINE 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH ADDR2LINE 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
addr2line \- convert addresses into file names and line numbers.
.SH "SYNOPSIS"
@@ -221,11 +219,12 @@ Display only the base of each file name.
Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/ar.1 b/contrib/binutils/binutils/doc/ar.1
index b17417c..6708cf4 100644
--- a/contrib/binutils/binutils/doc/ar.1
+++ b/contrib/binutils/binutils/doc/ar.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "AR 1"
-.TH AR 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH AR 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
ar \- create, modify, and extract from archives
.SH "SYNOPSIS"
@@ -229,7 +227,7 @@ index is not updated, even if it already existed; you can use \fBar s\fR or
\&\fBranlib\fR explicitly to update the symbol table index.
.Sp
However, too many different systems assume quick append rebuilds the
-index, so \s-1GNU\s0 ar implements \f(CW\*(C`q\*(C'\fR as a synonym for \f(CW\*(C`r\*(C'\fR.
+index, so \s-1GNU\s0 \fBar\fR implements \fBq\fR as a synonym for \fBr\fR.
.IP "\fBr\fR" 4
.IX Item "r"
Insert the files \fImember\fR... into \fIarchive\fR (with
@@ -368,11 +366,12 @@ which is the default for \s-1AIX\s0 \fBar\fR.
\&\fInm\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/binutils.texi b/contrib/binutils/binutils/doc/binutils.texi
index 3006d9e..2e78720 100644
--- a/contrib/binutils/binutils/doc/binutils.texi
+++ b/contrib/binutils/binutils/doc/binutils.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*- Texinfo -*-
@setfilename binutils.info
-@c Copyright 2001, 2002 Free Software Foundation, Inc.
+@c Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
@include config.texi
@@ -29,14 +29,15 @@ END-INFO-DIR-ENTRY
@ifinfo
@c man begin COPYRIGHT
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled "GNU Free Documentation License".
+section entitled ``GNU Free Documentation License''.
@c man end
@ignore
@@ -53,7 +54,8 @@ notice identical to this one except for the removal of this paragraph
@c This file documents the GNU binary utilities "ar", "ld", "objcopy",
@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
@c
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
+@c 2002, 2003 Free Software Foundation, Inc.
@c
@c This text may be freely distributed under the terms of the GNU
@c Free Documentation License.
@@ -78,14 +80,15 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001,
+2002, 2003 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
- section entitled "GNU Free Documentation License".
+ section entitled ``GNU Free Documentation License''.
@end titlepage
@@ -93,7 +96,7 @@ Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001, 2002 Free
@top Introduction
@cindex version
-This brief manual contains preliminary documentation for the @sc{gnu} binary
+This brief manual contains documentation for the @sc{gnu} binary
utilities (collectively version @value{VERSION}):
@iftex
@@ -238,7 +241,7 @@ program.
@page
@node ar cmdline
-@section Controlling @command{ar} on the command line
+@section Controlling @command{ar} on the Command Line
@smallexample
@c man begin SYNOPSIS ar
@@ -314,7 +317,7 @@ index is not updated, even if it already existed; you can use @samp{ar s} or
@command{ranlib} explicitly to update the symbol table index.
However, too many different systems assume quick append rebuilds the
-index, so GNU ar implements @code{q} as a synonym for @code{r}.
+index, so @sc{gnu} @command{ar} implements @samp{q} as a synonym for @samp{r}.
@item r
@cindex replacement in archive
@@ -464,7 +467,7 @@ This modifier shows the version number of @command{ar}.
@command{ar} ignores an initial option spelt @samp{-X32_64}, for
compatibility with AIX. The behaviour produced by this option is the
-default for GNU @command{ar}. @command{ar} does not support any of the other
+default for @sc{gnu} @command{ar}. @command{ar} does not support any of the other
@samp{-X} options; in particular, it does not support @option{-X32}
which is the default for AIX @command{ar}.
@@ -477,7 +480,7 @@ nm(1), ranlib(1), and the Info entries for @file{binutils}.
@end ignore
@node ar scripts
-@section Controlling @command{ar} with a script
+@section Controlling @command{ar} with a Script
@smallexample
ar -M [ <@var{script} ]
@@ -716,7 +719,7 @@ object file formats permit more efficient access to small data objects,
such as a global int variable as opposed to a large global array.
@item I
-The symbol is an indirect reference to another symbol. This is a GNU
+The symbol is an indirect reference to another symbol. This is a @sc{gnu}
extension to the a.out object file format which is rarely used.
@item N
@@ -854,7 +857,7 @@ Equivalent to @samp{-f posix}.
@item -S
@itemx --print-size
-Print size of defined symbols for the @code{bsd} output format.
+Print size, not the value, of defined symbols for the @code{bsd} output format.
@item -s
@itemx --print-armap
@@ -871,7 +874,9 @@ last come first.
@item --size-sort
Sort symbols by size. The size is computed as the difference between
the value of the symbol and the value of the symbol with the next higher
-value. The size of the symbol is printed, rather than the value.
+value. If the @code{bsd} output format is used the size of the symbol
+is printed, rather than the value, and @samp{-S} must be used in order
+both size and value to be printed.
@item -t @var{radix}
@itemx --radix=@var{radix}
@@ -927,21 +932,26 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{-I} @var{bfdname}|@option{--input-target=}@var{bfdname}]
[@option{-O} @var{bfdname}|@option{--output-target=}@var{bfdname}]
[@option{-B} @var{bfdarch}|@option{--binary-architecture=}@var{bfdarch}]
- [@option{-S}|@option{--strip-all}] [@option{-g}|@option{--strip-debug}]
+ [@option{-S}|@option{--strip-all}]
+ [@option{-g}|@option{--strip-debug}]
[@option{-K} @var{symbolname}|@option{--keep-symbol=}@var{symbolname}]
[@option{-N} @var{symbolname}|@option{--strip-symbol=}@var{symbolname}]
[@option{-G} @var{symbolname}|@option{--keep-global-symbol=}@var{symbolname}]
[@option{-L} @var{symbolname}|@option{--localize-symbol=}@var{symbolname}]
[@option{-W} @var{symbolname}|@option{--weaken-symbol=}@var{symbolname}]
- [@option{-x}|@option{--discard-all}] [@option{-X}|@option{--discard-locals}]
+ [@option{-w}|@option{--wildcard}]
+ [@option{-x}|@option{--discard-all}]
+ [@option{-X}|@option{--discard-locals}]
[@option{-b} @var{byte}|@option{--byte=}@var{byte}]
[@option{-i} @var{interleave}|@option{--interleave=}@var{interleave}]
[@option{-j} @var{sectionname}|@option{--only-section=}@var{sectionname}]
[@option{-R} @var{sectionname}|@option{--remove-section=}@var{sectionname}]
[@option{-p}|@option{--preserve-dates}]
[@option{--debugging}]
- [@option{--gap-fill=}@var{val}] [@option{--pad-to=}@var{address}]
- [@option{--set-start=}@var{val}] [@option{--adjust-start=}@var{incr}]
+ [@option{--gap-fill=}@var{val}]
+ [@option{--pad-to=}@var{address}]
+ [@option{--set-start=}@var{val}]
+ [@option{--adjust-start=}@var{incr}]
[@option{--change-addresses=}@var{incr}]
[@option{--change-section-address} @var{section}@{=,+,-@}@var{val}]
[@option{--change-section-lma} @var{section}@{=,+,-@}@var{val}]
@@ -950,19 +960,29 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{--set-section-flags} @var{section}=@var{flags}]
[@option{--add-section} @var{sectionname}=@var{filename}]
[@option{--rename-section} @var{oldname}=@var{newname}[,@var{flags}]]
- [@option{--change-leading-char} ] [@option{--remove-leading-char}]
- [@option{--srec-len=}@var{ival} ] [@option{--srec-forceS3}]
- [@option{--redefine-sym} @var{old}=@var{new} ]
+ [@option{--change-leading-char}] [@option{--remove-leading-char}]
+ [@option{--srec-len=}@var{ival}] [@option{--srec-forceS3}]
+ [@option{--redefine-sym} @var{old}=@var{new}]
+ [@option{--redefine-syms=}@var{filename}]
[@option{--weaken}]
[@option{--keep-symbols=}@var{filename}]
[@option{--strip-symbols=}@var{filename}]
[@option{--keep-global-symbols=}@var{filename}]
[@option{--localize-symbols=}@var{filename}]
[@option{--weaken-symbols=}@var{filename}]
- [@option{--alt-machine-code=@var{index}}]
+ [@option{--alt-machine-code=}@var{index}]
+ [@option{--prefix-symbols=}@var{string}]
+ [@option{--prefix-sections=}@var{string}]
+ [@option{--prefix-alloc-sections=}@var{string}]
+ [@option{--add-gnu-debuglink=}@var{path-to-file}]
+ [@option{--only-keep-debug}]
+ [@option{--writable-text}]
+ [@option{--readonly-text}]
+ [@option{--pure}]
+ [@option{--impure}]
[@option{-v}|@option{--verbose}]
[@option{-V}|@option{--version}]
- [@option{--help}]
+ [@option{--help}] [@option{--info}]
@var{infile} [@var{outfile}]
@c man end
@end smallexample
@@ -998,10 +1018,10 @@ use @option{-S} to remove sections containing debugging information. In
some cases @option{-R} will be useful to remove sections which contain
information that is not needed by the binary file.
-Note - @command{objcopy} is not able to change the endianness of its input
-files. If the input format has an endianness, (some formats do not),
+Note---@command{objcopy} is not able to change the endianness of its input
+files. If the input format has an endianness (some formats do not),
@command{objcopy} can only copy the inputs into file formats that have the
-same endianness or which have no endianness (eg @samp{srec}).
+same endianness or which have no endianness (e.g., @samp{srec}).
@c man end
@@ -1060,7 +1080,7 @@ Do not copy relocation and symbol information from the source file.
@item -g
@itemx --strip-debug
-Do not copy debugging symbols from the source file.
+Do not copy debugging symbols or sections from the source file.
@item --strip-unneeded
Strip all symbols that are not needed for relocation processing.
@@ -1090,6 +1110,22 @@ visible externally. This option may be given more than once.
@itemx --weaken-symbol=@var{symbolname}
Make symbol @var{symbolname} weak. This option may be given more than once.
+@item -w
+@itemx --wildcard
+Permit regular expressions in @var{symbolname}s used in other command
+line options. The question mark (?), asterisk (*), backslash (\) and
+square brackets ([]) operators can be used anywhere in the symbol
+name. If the first character of the symbol name is the exclamation
+point (!) then the sense of the switch is reversed for that symbol.
+For example:
+
+@smallexample
+ -w -W !foo -W fo*
+@end smallexample
+
+would cause objcopy to weaken all symbols that start with ``fo''
+except for the symbol ``foo''.
+
@item -x
@itemx --discard-all
Do not copy non-global symbols from the source file.
@@ -1276,6 +1312,12 @@ Change the name of a symbol @var{old}, to @var{new}. This can be useful
when one is trying link two things together for which you have no
source, and there are name collisions.
+@item --redefine-syms=@var{filename}
+Apply @option{--redefine-sym} to each symbol pair "@var{old} @var{new}"
+listed in the file @var{filename}. @var{filename} is simply a flat file,
+with one symbol pair per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+
@item --weaken
Change all global symbols in the file to be weak. This can be useful
when building an object which will be linked against other objects using
@@ -1319,6 +1361,73 @@ a machine is assigned an official code and the tool-chain adopts the
new code, but other applications still depend on the original code
being used.
+@item --writable-text
+Mark the output text as writable. This option isn't meaningful for all
+object file formats.
+
+@item --readonly-text
+Make the output text write protected. This option isn't meaningful for all
+object file formats.
+
+@item --pure
+Mark the output file as demand paged. This option isn't meaningful for all
+object file formats.
+
+@item --impure
+Mark the output file as impure. This option isn't meaningful for all
+object file formats.
+
+@item --prefix-symbols=@var{string}
+Prefix all symbols in the output file with @var{string}.
+
+@item --prefix-sections=@var{string}
+Prefix all section names in the output file with @var{string}.
+
+@item --prefix-alloc-sections=@var{string}
+Prefix all the names of all allocated sections in the output file with
+@var{string}.
+
+@item --add-gnu-debuglink=@var{path-to-file}
+Creates a .gnu_debuglink section which contains a reference to @var{path-to-file}
+and adds it to the output file.
+
+@item --only-keep-debug
+Strip a file, removing any sections that would be stripped by
+@option{--strip-debug} and leaving the debugging sections.
+
+The intention is that this option will be used in conjunction with
+@option{--add-gnu-debuglink} to create a two part executable. One a
+stripped binary which will occupy less space in RAM and in a
+distribution and the second a debugging information file which is only
+needed if debugging abilities are required. The suggested procedure
+to create these files is as follows:
+
+@enumerate
+@item Link the executable as normal. Assuming that is is called
+@code{foo} then...
+@item Run @code{objcopy --only-keep-debug foo foo.dbg} to
+create a file containing the debugging info.
+@item Run @code{objcopy --strip-debug foo} to create a
+stripped executable.
+@item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
+to add a link to the debugging info into the stripped executable.
+@end enumerate
+
+Note - the choice of @code{.dbg} as an extension for the debug info
+file is arbitrary. Also the @code{--only-keep-debug} step is
+optional. You could instead do this:
+
+@enumerate
+@item Link the executable as normal.
+@item Copy @code{foo} to @code{foo.full}
+@item Run @code{objcopy --strip-debug foo}
+@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
+@end enumerate
+
+ie the file pointed to by the @option{--add-gnu-debuglink} can be the
+full executable. It does not have to be a file created by the
+@option{--only-keep-debug} switch.
+
@item -V
@itemx --version
Show the version number of @command{objcopy}.
@@ -1330,6 +1439,9 @@ archives, @samp{objcopy -V} lists all members of the archive.
@item --help
Show a summary of the options to @command{objcopy}.
+
+@item --info
+Display a list showing all architectures and object formats available.
@end table
@c man end
@@ -1360,6 +1472,7 @@ objdump [@option{-a}|@option{--archive-headers}]
[@option{-f}|@option{--file-headers}]
[@option{--file-start-context}]
[@option{-g}|@option{--debugging}]
+ [@option{-e}|@option{--debugging-tags}]
[@option{-h}|@option{--section-headers}|@option{--headers}]
[@option{-i}|@option{--info}]
[@option{-j} @var{section}|@option{--section=}@var{section}]
@@ -1405,7 +1518,7 @@ object files.
The long and short forms of options, shown here as alternatives, are
equivalent. At least one option from the list
-@option{-a,-d,-D,-f,-g,-G,-h,-H,-p,-r,-R,-S,-t,-T,-V,-x} must be given.
+@option{-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x} must be given.
@table @env
@item -a
@@ -1453,11 +1566,18 @@ mangling styles. The optional demangling style argument can be used to
choose an appropriate demangling style for your compiler. @xref{c++filt},
for more information on demangling.
-@item -G
-@item --debugging
+@item -g
+@itemx --debugging
Display debugging information. This attempts to parse debugging
information stored in the file and print it out using a C like syntax.
Only certain types of debugging information have been implemented.
+Some other types are supported by @command{readelf -w}.
+@xref{readelf}.
+
+@item -e
+@itemx --debugging-tags
+Like @option{-g}, but the information is generated in a format compatible
+with ctags tool.
@item -d
@itemx --disassemble
@@ -1476,11 +1596,6 @@ those expected to contain instructions.
When disassembling, print the complete address on each line. This is
the older disassembly format.
-@item --disassemble-zeroes
-Normally the disassembly output will skip blocks of zeroes. This
-option directs the disassembler to disassemble those blocks, just like
-any other data.
-
@item -EB
@itemx -EL
@itemx --endian=@{big|little@}
@@ -1491,7 +1606,7 @@ disassembly. This can be useful when disassembling a file format which
does not describe endianness information, such as S-records.
@item -f
-@itemx --file-header
+@itemx --file-headers
@cindex object file header
Display summary information from the overall header of
each of the @var{objfile} files.
@@ -1503,8 +1618,8 @@ Specify that when displaying interlisted source code/disassembly
context to the start of the file.
@item -h
-@itemx --section-header
-@itemx --header
+@itemx --section-headers
+@itemx --headers
@cindex section headers
Display summary information from the section headers of the
object file.
@@ -1518,7 +1633,8 @@ although @command{ld} relocates the sections correctly, using @samp{objdump
Instead, it shows the usual addresses, which are implicit for the
target.
-@item --help
+@item -H
+@itemx --help
Print a summary of the options to @command{objdump} and exit.
@item -i
@@ -1552,7 +1668,9 @@ architectures with the @option{-i} option.
@item -M @var{options}
@itemx --disassembler-options=@var{options}
Pass target specific information to the disassembler. Only supported on
-some targets.
+some targets. If it is necessary to specify more than one
+disassembler option then multiple @option{-M} options can be used or
+can be placed together into a comma separated list.
If the target is an ARM architecture then this switch can be used to
select which register name set is used during disassembler. Specifying
@@ -1566,7 +1684,7 @@ just use @samp{r} followed by the register number.
There are also two variants on the APCS register naming scheme enabled
by @option{-M reg-names-atpcs} and @option{-M reg-names-special-atpcs} which
use the ARM/Thumb Procedure Call Standard naming conventions. (Either
-with the normal register name or the special register names).
+with the normal register names or the special register names).
This option can also be used for ARM architectures to force the
disassembler to interpret all instructions as Thumb instructions by
@@ -1584,13 +1702,55 @@ intel syntax mode and AT&T syntax mode. @option{addr32},
address size and operand size. These four options will be overridden if
@option{x86-64}, @option{i386} or @option{i8086} appear later in the
option string. Lastly, @option{suffix}, when in AT&T mode,
-instructs the dissassembler to print a mnemonic suffix even when the
+instructs the disassembler to print a mnemonic suffix even when the
suffix could be inferred by the operands.
For PPC, @option{booke}, @option{booke32} and @option{booke64} select
disassembly of BookE instructions. @option{32} and @option{64} select
PowerPC and PowerPC64 disassembly, respectively.
+For MIPS, this option controls the printing of register names in
+disassembled instructions. Multiple selections from the
+following may be specified as a comma separated string, and invalid
+options are ignored:
+
+@table @code
+@item gpr-names=@var{ABI}
+Print GPR (general-purpose register) names as appropriate
+for the specified ABI. By default, GPR names are selected according to
+the ABI of the binary being disassembled.
+
+@item fpr-names=@var{ABI}
+Print FPR (floating-point register) names as
+appropriate for the specified ABI. By default, FPR numbers are printed
+rather than names.
+
+@item cp0-names=@var{ARCH}
+Print CP0 (system control coprocessor; coprocessor 0) register names
+as appropriate for the CPU or architecture specified by
+@var{ARCH}. By default, CP0 register names are selected according to
+the architecture and CPU of the binary being disassembled.
+
+@item hwr-names=@var{ARCH}
+Print HWR (hardware register, used by the @code{rdhwr} instruction) names
+as appropriate for the CPU or architecture specified by
+@var{ARCH}. By default, HWR names are selected according to
+the architecture and CPU of the binary being disassembled.
+
+@item reg-names=@var{ABI}
+Print GPR and FPR names as appropriate for the selected ABI.
+
+@item reg-names=@var{ARCH}
+Print CPU-specific register names (CP0 register and HWR names)
+as appropriate for the selected CPU or architecture.
+@end table
+
+For any of the options listed above, @var{ABI} or
+@var{ARCH} may be specified as @samp{numeric} to have numbers printed
+rather than names, for the selected types of registers.
+You can list the available values of @var{ABI} and @var{ARCH} using
+the @option{--help} option.
+
@item -p
@itemx --private-headers
Print information that is specific to the object file format. The exact
@@ -1615,7 +1775,8 @@ libraries.
@itemx --full-contents
@cindex sections, full contents
@cindex object file sections
-Display the full contents of any sections requested.
+Display the full contents of any sections requested. By default all
+non-empty sections are displayed.
@item -S
@itemx --source
@@ -1634,7 +1795,7 @@ When disassembling instructions, do not print the instruction bytes.
This is the default when @option{--prefix-addresses} is used.
@item -G
-@item --stabs
+@itemx --stabs
@cindex stab
@cindex .stab
@cindex debug symbols
@@ -1675,11 +1836,12 @@ meaningful for dynamic objects, such as certain types of shared
libraries. This is similar to the information provided by the @samp{nm}
program when given the @option{-D} (@option{--dynamic}) option.
-@item --version
+@item -V
+@itemx --version
Print the version number of @command{objdump} and exit.
@item -x
-@itemx --all-header
+@itemx --all-headers
@cindex all header information, object file
@cindex header information, all
Display all available header information, including the symbol table and
@@ -1691,6 +1853,12 @@ relocation entries. Using @option{-x} is equivalent to specifying all of
@cindex wide output, printing
Format some lines for output devices that have more than 80 columns.
Also do not truncate symbol names when they are displayed.
+
+@item -z
+@itemx --disassemble-zeroes
+Normally the disassembly output will skip blocks of zeroes. This
+option directs the disassembler to disassemble those blocks, just like
+any other data.
@end table
@c man end
@@ -1942,11 +2110,11 @@ octal, @samp{x} for hexadecimal, or @samp{d} for decimal.
@item -e @var{encoding}
@itemx --encoding=@var{encoding}
Select the character encoding of the strings that are to be found.
-Possible values for @var{encoding} are: @samp{s} = single-byte
-characters (ASCII, ISO 8859, etc., default), @samp{b} = 16-bit
-Bigendian, @samp{l} = 16-bit Littleendian, @samp{B} = 32-bit Bigendian,
-@samp{L} = 32-bit Littleendian. Useful for finding wide character
-strings.
+Possible values for @var{encoding} are: @samp{s} = single-7-bit-byte
+characters (ASCII, ISO 8859, etc., default), @samp{S} =
+single-8-bit-byte characters, @samp{b} = 16-bit bigendian, @samp{l} =
+16-bit littleendian, @samp{B} = 32-bit bigendian, @samp{L} = 32-bit
+littleendian. Useful for finding wide character strings.
@item --target=@var{bfdname}
@cindex object code format
@@ -1979,16 +2147,20 @@ and the Info entries for @file{binutils}.
@smallexample
@c man begin SYNOPSIS strip
-strip [@option{-F} @var{bfdname} |@option{--target=}@var{bfdname} ]
- [@option{-I} @var{bfdname} |@option{--input-target=}@var{bfdname} ]
- [@option{-O} @var{bfdname} |@option{--output-target=}@var{bfdname} ]
- [@option{-s}|@option{--strip-all}] [@option{-S}|@option{-g}|@option{-d}|@option{--strip-debug}]
- [@option{-K} @var{symbolname} |@option{--keep-symbol=}@var{symbolname} ]
- [@option{-N} @var{symbolname} |@option{--strip-symbol=}@var{symbolname} ]
- [@option{-x}|@option{--discard-all} ] [@option{-X} |@option{--discard-locals}]
- [@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname} ]
- [@option{-o} @var{file} ] [@option{-p}|@option{--preserve-dates}]
- [@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}] [@option{--help}]
+strip [@option{-F} @var{bfdname} |@option{--target=}@var{bfdname}]
+ [@option{-I} @var{bfdname} |@option{--input-target=}@var{bfdname}]
+ [@option{-O} @var{bfdname} |@option{--output-target=}@var{bfdname}]
+ [@option{-s}|@option{--strip-all}]
+ [@option{-S}|@option{-g}|@option{-d}|@option{--strip-debug}]
+ [@option{-K} @var{symbolname} |@option{--keep-symbol=}@var{symbolname}]
+ [@option{-N} @var{symbolname} |@option{--strip-symbol=}@var{symbolname}]
+ [@option{-w}|@option{--wildcard}]
+ [@option{-x}|@option{--discard-all}] [@option{-X} |@option{--discard-locals}]
+ [@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname}]
+ [@option{-o} @var{file}] [@option{-p}|@option{--preserve-dates}]
+ [@option{--only-keep-debug}]
+ [@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}]
+ [@option{--help}] [@option{--info}]
@var{objfile}@dots{}
@c man end
@end smallexample
@@ -2016,7 +2188,10 @@ code format @var{bfdname}, and rewrite it in the same format.
@item --help
Show a summary of the options to @command{strip} and exit.
-@item -I @var{bfdname}
+@item --info
+Display a list showing all architectures and object formats available.
+
+@item -I @var{bfdname}
@itemx --input-target=@var{bfdname}
Treat the original @var{objfile} as a file with the object
code format @var{bfdname}.
@@ -2066,6 +2241,22 @@ argument may be specified.
@itemx --preserve-dates
Preserve the access and modification dates of the file.
+@item -w
+@itemx --wildcard
+Permit regular expressions in @var{symbolname}s used in other command
+line options. The question mark (?), asterisk (*), backslash (\) and
+square brackets ([]) operators can be used anywhere in the symbol
+name. If the first character of the symbol name is the exclamation
+point (!) then the sense of the switch is reversed for that symbol.
+For example:
+
+@smallexample
+ -w -K !foo -K fo*
+@end smallexample
+
+would cause strip to only keep symbols that start with the letters
+``fo'', but to discard the symbol ``foo''.
+
@item -x
@itemx --discard-all
Remove non-global symbols.
@@ -2075,6 +2266,43 @@ Remove non-global symbols.
Remove compiler-generated local symbols.
(These usually start with @samp{L} or @samp{.}.)
+@item --only-keep-debug
+Strip a file, removing any sections that would be stripped by
+@option{--strip-debug} and leaving the debugging sections.
+
+The intention is that this option will be used in conjunction with
+@option{--add-gnu-debuglink} to create a two part executable. One a
+stripped binary which will occupy less space in RAM and in a
+distribution and the second a debugging information file which is only
+needed if debugging abilities are required. The suggested procedure
+to create these files is as follows:
+
+@enumerate
+@item Link the executable as normal. Assuming that is is called
+@code{foo} then...
+@item Run @code{objcopy --only-keep-debug foo foo.dbg} to
+create a file containing the debugging info.
+@item Run @code{objcopy --strip-debug foo} to create a
+stripped executable.
+@item Run @code{objcopy --add-gnu-debuglink=foo.dbg foo}
+to add a link to the debugging info into the stripped executable.
+@end enumerate
+
+Note - the choice of @code{.dbg} as an extension for the debug info
+file is arbitrary. Also the @code{--only-keep-debug} step is
+optional. You could instead do this:
+
+@enumerate
+@item Link the executable as normal.
+@item Copy @code{foo} to @code{foo.full}
+@item Run @code{strip --strip-debug foo}
+@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
+@end enumerate
+
+ie the file pointed to by the @option{--add-gnu-debuglink} can be the
+full executable. It does not have to be a file created by the
+@option{--only-keep-debug} switch.
+
@item -V
@itemx --version
Show the version number for @command{strip}.
@@ -2106,6 +2334,7 @@ the Info entries for @file{binutils}.
c++filt [@option{-_}|@option{--strip-underscores}]
[@option{-j}|@option{--java}]
[@option{-n}|@option{--no-strip-underscores}]
+ [@option{-p}|@option{--no-params}]
[@option{-s} @var{format}|@option{--format=}@var{format}]
[@option{--help}] [@option{--version}] [@var{symbol}@dots{}]
@c man end
@@ -2161,25 +2390,36 @@ syntax.
@itemx --no-strip-underscores
Do not remove the initial underscore.
+@item -p
+@itemx --no-params
+When demangling the name of a function, do not display the types of
+the function's parameters.
+
@item -s @var{format}
@itemx --format=@var{format}
-@sc{gnu} @command{nm} can decode three different methods of mangling, used by
-different C++ compilers. The argument to this option selects which
+@command{c++filt} can decode various methods of mangling, used by
+different compilers. The argument to this option selects which
method it uses:
@table @code
+@item auto
+Automatic selection based on executable (the default method)
@item gnu
-the one used by the @sc{gnu} compiler (the default method)
+the one used by the @sc{gnu} C++ compiler (g++)
@item lucid
-the one used by the Lucid compiler
+the one used by the Lucid compiler (lcc)
@item arm
the one specified by the C++ Annotated Reference Manual
@item hp
-the one used by the HP compiler
+the one used by the HP compiler (aCC)
@item edg
the one used by the EDG compiler
-@item gnu-new-abi
-the one used by the @sc{gnu} compiler with the new ABI.
+@item gnu-v3
+the one used by the @sc{gnu} C++ compiler (g++) with the V3 ABI.
+@item java
+the one used by the @sc{gnu} Java compiler (gcj)
+@item gnat
+the one used by the @sc{gnu} Ada compiler (GNAT).
@end table
@item --help
@@ -2497,9 +2737,11 @@ The name of the output file. If this option is not used, then
@command{windres} will use the first non-option argument, after any used
for the input file name, as the output file name. If there is no
non-option argument, then @command{windres} will write to standard output.
-@command{windres} can not write a COFF file to standard output.
+@command{windres} can not write a COFF file to standard output. Note,
+for compatability with @command{rc} the option @option{-fo} is also
+accepted, but its use is not recommended.
-@item -I @var{format}
+@item -J @var{format}
@itemx --input-format @var{format}
The input format to read. @var{format} may be @samp{res}, @samp{rc}, or
@samp{coff}. If no input format is specified, @command{windres} will
@@ -2527,21 +2769,36 @@ preprocessor first. This option may be used to specify the preprocessor
to use, including any leading arguments. The default preprocessor
argument is @code{gcc -E -xc-header -DRC_INVOKED}.
-@item --include-dir @var{directory}
+@item -I @var{directory}
+@itemx --include-dir @var{directory}
Specify an include directory to use when reading an @code{rc} file.
@command{windres} will pass this to the preprocessor as an @option{-I}
option. @command{windres} will also search this directory when looking for
-files named in the @code{rc} file.
+files named in the @code{rc} file. If the argument passed to this command
+matches any of the supported @var{formats} (as descrived in the @option{-J}
+option), it will issue a deprecation warning, and behave just like the
+@option{-J} option. New programs should not use this behaviour. If a
+directory happens to match a @var{format}, simple prefix it with @samp{./}
+to disable the backward compatibility.
@item -D @var{target}
@itemx --define @var{sym}[=@var{val}]
Specify a @option{-D} option to pass to the preprocessor when reading an
@code{rc} file.
+@item -U @var{target}
+@itemx --undefine @var{sym}
+Specify a @option{-U} option to pass to the preprocessor when reading an
+@code{rc} file.
+
+@item -r
+Ignored for compatibility with rc.
+
@item -v
Enable verbose mode. This tells you what the preprocessor is if you
didn't specify one.
+@item -l @var{val}
@item --language @var{val}
Specify the default language to use when reading an @code{rc} file.
@var{val} should be a hexadecimal language code. The low eight bits are
@@ -2558,9 +2815,11 @@ go the console).
Use popen, not a temporary file, to read the output of the preprocessor.
This is the default behaviour.
+@item -h
@item --help
Prints a usage summary.
+@item -V
@item --version
Prints the version number for @command{windres}.
@@ -2607,7 +2866,8 @@ dlltool [@option{-d}|@option{--input-def} @var{def-file-name}]
[@option{-a}|@option{--add-indirect}] [@option{-U}|@option{--add-underscore}] [@option{-k}|@option{--kill-at}]
[@option{-A}|@option{--add-stdcall-alias}]
[@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}] [@option{-i}|@option{--interwork}]
- [@option{-n}|@option{--nodelete}] [@option{-v}|@option{--verbose}]
+ [@option{-n}|@option{--nodelete}] [@option{-t}|@option{--temp-prefix} @var{prefix}]
+ [@option{-v}|@option{--verbose}]
[@option{-h}|@option{--help}] [@option{-V}|@option{--version}]
[object-file @dots{}]
@c man end
@@ -2817,7 +3077,13 @@ between ARM and Thumb code.
Makes @command{dlltool} preserve the temporary assembler files it used to
create the exports file. If this option is repeated then dlltool will
also preserve the temporary object files it uses to create the library
-file.
+file.
+
+@item -t @var{prefix}
+@itemx --temp-prefix @var{prefix}
+Makes @command{dlltool} use @var{prefix} when constructing the names of
+temporary assembler and object files. By default, the temp file prefix
+is generated from the pid.
@item -v
@itemx --verbose
@@ -2862,10 +3128,12 @@ readelf [@option{-a}|@option{--all}]
[@option{-u}|@option{--unwind}]
[@option{-d}|@option{--dynamic}]
[@option{-V}|@option{--version-info}]
+ [@option{-A}|@option{--arch-specific}]
[@option{-D}|@option{--use-dynamic}]
[@option{-x} <number>|@option{--hex-dump=}<number>]
- [@option{-w[liaprmfFso]}|@option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]]
- [@option{-histogram}]
+ [@option{-w[liaprmfFso]}|
+ @option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]]
+ [@option{-I}|@option{-histogram}]
[@option{-v}|@option{--version}]
[@option{-W}|@option{--wide}]
[@option{-H}|@option{--help}]
@@ -2878,9 +3146,13 @@ readelf [@option{-a}|@option{--all}]
@command{readelf} displays information about one or more ELF format object
files. The options control what particular information to display.
-@var{elffile}@dots{} are the object files to be examined. At the
-moment, @command{readelf} does not support examining archives, nor does it
-support examing 64 bit ELF files.
+@var{elffile}@dots{} are the object files to be examined. 32-bit and
+64-bit ELF files are supported, as are archives containing ELF files.
+
+This program performs a similar function to @command{objdump} but it
+goes into more detail and it exists independently of the @sc{bfd}
+library, so if there is a bug in @sc{bfd} then readelf will not be
+affected.
@c man end
@@ -2945,6 +3217,12 @@ Displays the contents of the file's relocation section, if it has one.
Displays the contents of the file's unwind section, if it has one. Only
the unwind sections for IA64 ELF files are currently supported.
+@item -u
+@itemx --unwind
+@cindex unwind information
+Displays the contents of the file's unwind section, if it has one. Only
+the unwind sections for IA64 ELF files are currently supported.
+
@item -d
@itemx --dynamic
@cindex ELF dynamic section information
@@ -2956,6 +3234,11 @@ Displays the contents of the file's dynamic section, if it has one.
Displays the contents of the version sections in the file, it they
exist.
+@item -A
+@itemx --arch-specific
+Displays architecture-specific information in the file, if there
+is any.
+
@item -D
@itemx --use-dynamic
When displaying symbols, this option makes @command{readelf} use the
@@ -2967,12 +3250,13 @@ symbols section.
Displays the contents of the indicated section as a hexadecimal dump.
@item -w[liaprmfFso]
-@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]
+@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]
Displays the contents of the debug sections in the file, if any are
present. If one of the optional letters or words follows the switch
then only data found in those specific sections will be dumped.
-@item --histogram
+@item -I
+@itemx --histogram
Display a histogram of bucket list lengths when displaying the contents
of the symbol tables.
@@ -3003,9 +3287,9 @@ objdump(1), and the Info entries for @file{binutils}.
@end ignore
@node Selecting The Target System
-@chapter Selecting the target system
+@chapter Selecting the Target System
-You can specify three aspects of the target system to the @sc{gnu}
+You can specify two aspects of the target system to the @sc{gnu}
binary file utilities, each in several ways:
@itemize @bullet
@@ -3014,9 +3298,6 @@ the target
@item
the architecture
-
-@item
-the linker emulation (which applies to the linker only)
@end itemize
In the following summaries, the lists of ways to specify values are in
@@ -3033,7 +3314,6 @@ with the same type as the target system).
@menu
* Target Selection::
* Architecture Selection::
-* Linker Emulation Selection::
@end menu
@node Target Selection
@@ -3123,47 +3403,8 @@ environment variable @code{GNUTARGET}
deduced from the input file
@end enumerate
-@subheading Linker Input Target
-
-Ways to specify:
-
-@enumerate
-@item
-command line option: @option{-b} or @option{--format}
-(@pxref{Options,,Options,ld.info,Using LD})
-
-@item
-script command @code{TARGET}
-(@pxref{Format Commands,,Format Commands,ld.info,Using LD})
-
-@item
-environment variable @code{GNUTARGET}
-(@pxref{Environment,,Environment,ld.info,Using LD})
-
-@item
-the default target of the selected linker emulation
-(@pxref{Linker Emulation Selection})
-@end enumerate
-
-@subheading Linker Output Target
-
-Ways to specify:
-
-@enumerate
-@item
-command line option: @option{-oformat}
-(@pxref{Options,,Options,ld.info,Using LD})
-
-@item
-script command @code{OUTPUT_FORMAT}
-(@pxref{Format Commands,,Format Commands,ld.info,Using LD})
-
-@item
-the linker input target (see ``Linker Input Target'' above)
-@end enumerate
-
@node Architecture Selection
-@section Architecture selection
+@section Architecture Selection
An @dfn{architecture} is a type of @sc{cpu} on which an object file is
to run. Its name may contain a colon, separating the name of the
@@ -3195,67 +3436,6 @@ Ways to specify:
deduced from the input file
@end enumerate
-@subheading Linker Input Architecture
-
-Ways to specify:
-
-@enumerate
-@item
-deduced from the input file
-@end enumerate
-
-@subheading Linker Output Architecture
-
-Ways to specify:
-
-@enumerate
-@item
-script command @code{OUTPUT_ARCH}
-(@pxref{Miscellaneous Commands,,Miscellaneous Commands,ld.info,Using LD})
-
-@item
-the default architecture from the linker output target
-(@pxref{Target Selection})
-@end enumerate
-
-@node Linker Emulation Selection
-@section Linker emulation selection
-
-A linker @dfn{emulation} is a ``personality'' of the linker, which gives
-the linker default values for the other aspects of the target system.
-In particular, it consists of
-
-@itemize @bullet
-@item
-the linker script
-
-@item
-the target
-
-@item
-several ``hook'' functions that are run at certain stages of the linking
-process to do special things that some targets require
-@end itemize
-
-The command to list valid linker emulation values is @samp{ld -V}.
-
-Sample values: @samp{hp300bsd}, @samp{mipslit}, @samp{sun4}.
-
-Ways to specify:
-
-@enumerate
-@item
-command line option: @option{-m}
-(@pxref{Options,,Options,ld.info,Using LD})
-
-@item
-environment variable @code{LDEMULATION}
-
-@item
-compiled-in @code{DEFAULT_EMULATION} from @file{Makefile},
-which comes from @code{EMUL} in @file{config/@var{target}.mt}
-@end enumerate
-
@node Reporting Bugs
@chapter Reporting Bugs
@cindex bugs
@@ -3279,7 +3459,7 @@ information that enables us to fix the bug.
@end menu
@node Bug Criteria
-@section Have you found a bug?
+@section Have You Found a Bug?
@cindex bug criteria
If you are not sure whether you have found a bug, here are some guidelines:
@@ -3302,7 +3482,7 @@ improvement are welcome in any case.
@end itemize
@node Bug Reporting
-@section How to report bugs
+@section How to Report Bugs
@cindex bug reports
@cindex bugs, reporting
@@ -3337,9 +3517,9 @@ it is new to us. Therefore, always write your bug reports on the assumption
that the bug has not been reported previously.
Sometimes people give a few sketchy facts and ask, ``Does this ring a
-bell?'' Those bug reports are useless, and we urge everyone to
-@emph{refuse to respond to them} except to chide the sender to report
-bugs properly.
+bell?'' This cannot help us fix a bug, so it is basically useless. We
+respond by asking for enough details to enable us to investigate.
+You might as well expedite matters by sending them to begin with.
To enable us to fix the bug, you should include all these things:
@@ -3464,369 +3644,7 @@ Such guesses are usually wrong. Even we cannot guess right about such
things without first using the debugger to find the facts.
@end itemize
-@node GNU Free Documentation License
-@chapter GNU Free Documentation License
-@cindex GNU Free Documentation License
-
- GNU Free Documentation License
-
- Version 1.1, March 2000
-
- Copyright (C) 2000 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-0. PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-
-1. APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The "Document", below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as "you".
-
-A "Modified Version" of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The "Invariant Sections" are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
-
-The "Cover Texts" are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
-
-A "Transparent" copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not "Transparent" is called "Opaque".
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
-
-The "Title Page" means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, "Title Page" means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-
-2. VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-
-3. COPYING IN QUANTITY
-
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-
-4. MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.
-D. Preserve all the copyright notices of the Document.
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.
-H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled "History" in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the "History" section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements". Such a section
- may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
- or to conflict in title with any Invariant Section.
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section entitled "Endorsements", provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-
-5. COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications". You must delete all sections
-entitled "Endorsements."
-
-
-6. COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-
-7. AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-
-
-8. TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-
-
-9. TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-
-10. FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License "or any later version" applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-
-ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-@smallexample
- Copyright (c) YEAR YOUR NAME.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with the Invariant Sections being LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-@end smallexample
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
+@include fdl.texi
@node Index
@unnumbered Index
diff --git a/contrib/binutils/binutils/doc/cxxfilt.man b/contrib/binutils/binutils/doc/cxxfilt.man
index 3e95060..8cc8eb2 100644
--- a/contrib/binutils/binutils/doc/cxxfilt.man
+++ b/contrib/binutils/binutils/doc/cxxfilt.man
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,15 +128,15 @@
.\" ========================================================================
.\"
.IX Title "C++FILT 1"
-.TH C++FILT 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH C++FILT 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
-cxxfilt \- Demangle \*(C+ and Java symbols.
+cxxfilt \- Demangle C++ and Java symbols.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
c++filt [\fB\-_\fR|\fB\-\-strip\-underscores\fR]
[\fB\-j\fR|\fB\-\-java\fR]
[\fB\-n\fR|\fB\-\-no\-strip\-underscores\fR]
+ [\fB\-p\fR|\fB\-\-no\-params\fR]
[\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR]
[\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...]
.SH "DESCRIPTION"
@@ -162,6 +161,7 @@ You can use \fBc++filt\fR to decipher individual symbols:
.Vb 1
\& c++filt <symbol>
.Ve
+.PP
If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol
names from the standard input and writes the demangled names to the
standard output. All results are printed on the standard output.
@@ -192,24 +192,36 @@ syntax.
.IX Item "--no-strip-underscores"
.PD
Do not remove the initial underscore.
+.IP "\fB\-p\fR" 4
+.IX Item "-p"
+.PD 0
+.IP "\fB\-\-no\-params\fR" 4
+.IX Item "--no-params"
+.PD
+When demangling the name of a function, do not display the types of
+the function's parameters.
.IP "\fB\-s\fR \fIformat\fR" 4
.IX Item "-s format"
.PD 0
.IP "\fB\-\-format=\fR\fIformat\fR" 4
.IX Item "--format=format"
.PD
-\&\s-1GNU\s0 \fBnm\fR can decode three different methods of mangling, used by
-different \*(C+ compilers. The argument to this option selects which
+\&\fBc++filt\fR can decode various methods of mangling, used by
+different compilers. The argument to this option selects which
method it uses:
.RS 4
+.ie n .IP """auto""" 4
+.el .IP "\f(CWauto\fR" 4
+.IX Item "auto"
+Automatic selection based on executable (the default method)
.ie n .IP """gnu""" 4
.el .IP "\f(CWgnu\fR" 4
.IX Item "gnu"
-the one used by the \s-1GNU\s0 compiler (the default method)
+the one used by the \s-1GNU\s0 \*(C+ compiler (g++)
.ie n .IP """lucid""" 4
.el .IP "\f(CWlucid\fR" 4
.IX Item "lucid"
-the one used by the Lucid compiler
+the one used by the Lucid compiler (lcc)
.ie n .IP """arm""" 4
.el .IP "\f(CWarm\fR" 4
.IX Item "arm"
@@ -217,15 +229,23 @@ the one specified by the \*(C+ Annotated Reference Manual
.ie n .IP """hp""" 4
.el .IP "\f(CWhp\fR" 4
.IX Item "hp"
-the one used by the \s-1HP\s0 compiler
+the one used by the \s-1HP\s0 compiler (aCC)
.ie n .IP """edg""" 4
.el .IP "\f(CWedg\fR" 4
.IX Item "edg"
the one used by the \s-1EDG\s0 compiler
-.ie n .IP """gnu\-new\-abi""" 4
-.el .IP "\f(CWgnu\-new\-abi\fR" 4
-.IX Item "gnu-new-abi"
-the one used by the \s-1GNU\s0 compiler with the new \s-1ABI\s0.
+.ie n .IP """gnu\-v3""" 4
+.el .IP "\f(CWgnu\-v3\fR" 4
+.IX Item "gnu-v3"
+the one used by the \s-1GNU\s0 \*(C+ compiler (g++) with the V3 \s-1ABI\s0.
+.ie n .IP """java""" 4
+.el .IP "\f(CWjava\fR" 4
+.IX Item "java"
+the one used by the \s-1GNU\s0 Java compiler (gcj)
+.ie n .IP """gnat""" 4
+.el .IP "\f(CWgnat\fR" 4
+.IX Item "gnat"
+the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0).
.RE
.RS 4
.RE
@@ -245,11 +265,12 @@ MS-DOS this program is named \fBcxxfilt\fR.
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/dlltool.1 b/contrib/binutils/binutils/doc/dlltool.1
index 47539b1..c1e4642 100644
--- a/contrib/binutils/binutils/doc/dlltool.1
+++ b/contrib/binutils/binutils/doc/dlltool.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "DLLTOOL 1"
-.TH DLLTOOL 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH DLLTOOL 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
dlltool \- Create files needed to build and use DLLs.
.SH "SYNOPSIS"
@@ -148,7 +146,8 @@ dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR]
[\fB\-a\fR|\fB\-\-add\-indirect\fR] [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-k\fR|\fB\-\-kill\-at\fR]
[\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR]
[\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] [\fB\-i\fR|\fB\-\-interwork\fR]
- [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-v\fR|\fB\-\-verbose\fR]
+ [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR]
+ [\fB\-v\fR|\fB\-\-verbose\fR]
[\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
[object\-file ...]
.SH "DESCRIPTION"
@@ -183,9 +182,11 @@ section of the object file. This can be done in C by using the
\& asm (".section .drectve");
\& asm (".ascii \e"-export:my_func\e"");
.Ve
+.PP
.Vb 1
\& int my_func (void) { ... }
.Ve
+.PP
The second file needed for \s-1DLL\s0 creation is an exports file. This file
is linked with the object files that make up the body of the \s-1DLL\s0 and it
handles the interface between the \s-1DLL\s0 and the outside world. This is a
@@ -399,7 +400,16 @@ between \s-1ARM\s0 and Thumb code.
Makes \fBdlltool\fR preserve the temporary assembler files it used to
create the exports file. If this option is repeated then dlltool will
also preserve the temporary object files it uses to create the library
-file.
+file.
+.IP "\fB\-t\fR \fIprefix\fR" 4
+.IX Item "-t prefix"
+.PD 0
+.IP "\fB\-\-temp\-prefix\fR \fIprefix\fR" 4
+.IX Item "--temp-prefix prefix"
+.PD
+Makes \fBdlltool\fR use \fIprefix\fR when constructing the names of
+temporary assembler and object files. By default, the temp file prefix
+is generated from the pid.
.IP "\fB\-v\fR" 4
.IX Item "-v"
.PD 0
@@ -426,11 +436,12 @@ Displays dlltool's version number and then exits.
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/fdl.texi b/contrib/binutils/binutils/doc/fdl.texi
new file mode 100644
index 0000000..f4726b9
--- /dev/null
+++ b/contrib/binutils/binutils/doc/fdl.texi
@@ -0,0 +1,368 @@
+@c -*-texinfo-*-
+@node GNU Free Documentation License
+
+@appendix GNU Free Documentation License
+@center Version 1.1, March 2000
+
+@display
+Copyright (C) 2000 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+@sp 1
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document ``free'' in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@sp 1
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The ``Document'', below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as ``you.''
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not ``Transparent'' is called ``Opaque.''
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+@sp 1
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+@sp 1
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+@sp 1
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.@*
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).@*
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.@*
+D. Preserve all the copyright notices of the Document.@*
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.@*
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.@*
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.@*
+H. Include an unaltered copy of this License.@*
+I. Preserve the section entitled ``History'', and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled ``History'' in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.@*
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the ``History'' section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.@*
+K. In any section entitled ``Acknowledgements'' or ``Dedications'',
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.@*
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.@*
+M. Delete any section entitled ``Endorsements.'' Such a section
+ may not be included in the Modified Version.@*
+N. Do not retitle any existing section as ``Endorsements''
+ or to conflict in title with any Invariant Section.@*
+@sp 1
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+@sp 1
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled ``History''
+in the various original documents, forming one section entitled
+``History''; likewise combine any sections entitled ``Acknowledgements'',
+and any sections entitled ``Dedications.'' You must delete all sections
+entitled ``Endorsements.''
+@sp 1
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+@sp 1
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an ``aggregate'', and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+@sp 1
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+@sp 1
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+@sp 1
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+@end enumerate
+
+@unnumberedsec ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+Copyright (C) @var{year} @var{your name}.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with the Invariant Sections being @var{list their titles}, with the
+Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License."
+@end group
+@end smallexample
+
+If you have no Invariant Sections, write ``with no Invariant Sections''
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write ``no Front-Cover Texts'' instead of
+``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/contrib/binutils/binutils/doc/nm.1 b/contrib/binutils/binutils/doc/nm.1
index 5702c4a..c472775 100644
--- a/contrib/binutils/binutils/doc/nm.1
+++ b/contrib/binutils/binutils/doc/nm.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "NM 1"
-.TH NM 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH NM 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
nm \- list symbols from object files
.SH "SYNOPSIS"
@@ -350,7 +348,7 @@ Equivalent to \fB\-f posix\fR.
.IP "\fB\-\-print\-size\fR" 4
.IX Item "--print-size"
.PD
-Print size of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output format.
+Print size, not the value, of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output format.
.IP "\fB\-s\fR" 4
.IX Item "-s"
.PD 0
@@ -372,7 +370,9 @@ last come first.
.IX Item "--size-sort"
Sort symbols by size. The size is computed as the difference between
the value of the symbol and the value of the symbol with the next higher
-value. The size of the symbol is printed, rather than the value.
+value. If the \f(CW\*(C`bsd\*(C'\fR output format is used the size of the symbol
+is printed, rather than the value, and \fB\-S\fR must be used in order
+both size and value to be printed.
.IP "\fB\-t\fR \fIradix\fR" 4
.IX Item "-t radix"
.PD 0
@@ -415,11 +415,12 @@ Show a summary of the options to \fBnm\fR and exit.
\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/objcopy.1 b/contrib/binutils/binutils/doc/objcopy.1
index a59a47a..43871d6 100644
--- a/contrib/binutils/binutils/doc/objcopy.1
+++ b/contrib/binutils/binutils/doc/objcopy.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "OBJCOPY 1"
-.TH OBJCOPY 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH OBJCOPY 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
objcopy \- copy and translate object files
.SH "SYNOPSIS"
@@ -139,21 +137,26 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
[\fB\-I\fR \fIbfdname\fR|\fB\-\-input\-target=\fR\fIbfdname\fR]
[\fB\-O\fR \fIbfdname\fR|\fB\-\-output\-target=\fR\fIbfdname\fR]
[\fB\-B\fR \fIbfdarch\fR|\fB\-\-binary\-architecture=\fR\fIbfdarch\fR]
- [\fB\-S\fR|\fB\-\-strip\-all\fR] [\fB\-g\fR|\fB\-\-strip\-debug\fR]
+ [\fB\-S\fR|\fB\-\-strip\-all\fR]
+ [\fB\-g\fR|\fB\-\-strip\-debug\fR]
[\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
[\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
[\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR]
[\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR]
[\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR]
- [\fB\-x\fR|\fB\-\-discard\-all\fR] [\fB\-X\fR|\fB\-\-discard\-locals\fR]
+ [\fB\-w\fR|\fB\-\-wildcard\fR]
+ [\fB\-x\fR|\fB\-\-discard\-all\fR]
+ [\fB\-X\fR|\fB\-\-discard\-locals\fR]
[\fB\-b\fR \fIbyte\fR|\fB\-\-byte=\fR\fIbyte\fR]
[\fB\-i\fR \fIinterleave\fR|\fB\-\-interleave=\fR\fIinterleave\fR]
[\fB\-j\fR \fIsectionname\fR|\fB\-\-only\-section=\fR\fIsectionname\fR]
[\fB\-R\fR \fIsectionname\fR|\fB\-\-remove\-section=\fR\fIsectionname\fR]
[\fB\-p\fR|\fB\-\-preserve\-dates\fR]
[\fB\-\-debugging\fR]
- [\fB\-\-gap\-fill=\fR\fIval\fR] [\fB\-\-pad\-to=\fR\fIaddress\fR]
- [\fB\-\-set\-start=\fR\fIval\fR] [\fB\-\-adjust\-start=\fR\fIincr\fR]
+ [\fB\-\-gap\-fill=\fR\fIval\fR]
+ [\fB\-\-pad\-to=\fR\fIaddress\fR]
+ [\fB\-\-set\-start=\fR\fIval\fR]
+ [\fB\-\-adjust\-start=\fR\fIincr\fR]
[\fB\-\-change\-addresses=\fR\fIincr\fR]
[\fB\-\-change\-section\-address\fR \fIsection\fR{=,+,\-}\fIval\fR]
[\fB\-\-change\-section\-lma\fR \fIsection\fR{=,+,\-}\fIval\fR]
@@ -162,9 +165,10 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
[\fB\-\-set\-section\-flags\fR \fIsection\fR=\fIflags\fR]
[\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR]
[\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]]
- [\fB\-\-change\-leading\-char\fR ] [\fB\-\-remove\-leading\-char\fR]
- [\fB\-\-srec\-len=\fR\fIival\fR ] [\fB\-\-srec\-forceS3\fR]
- [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR ]
+ [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR]
+ [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR]
+ [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR]
+ [\fB\-\-redefine\-syms=\fR\fIfilename\fR]
[\fB\-\-weaken\fR]
[\fB\-\-keep\-symbols=\fR\fIfilename\fR]
[\fB\-\-strip\-symbols=\fR\fIfilename\fR]
@@ -172,9 +176,18 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
[\fB\-\-localize\-symbols=\fR\fIfilename\fR]
[\fB\-\-weaken\-symbols=\fR\fIfilename\fR]
[\fB\-\-alt\-machine\-code=\fR\fIindex\fR]
+ [\fB\-\-prefix\-symbols=\fR\fIstring\fR]
+ [\fB\-\-prefix\-sections=\fR\fIstring\fR]
+ [\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR]
+ [\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR]
+ [\fB\-\-only\-keep\-debug\fR]
+ [\fB\-\-writable\-text\fR]
+ [\fB\-\-readonly\-text\fR]
+ [\fB\-\-pure\fR]
+ [\fB\-\-impure\fR]
[\fB\-v\fR|\fB\-\-verbose\fR]
[\fB\-V\fR|\fB\-\-version\fR]
- [\fB\-\-help\fR]
+ [\fB\-\-help\fR] [\fB\-\-info\fR]
\fIinfile\fR [\fIoutfile\fR]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
@@ -208,10 +221,10 @@ use \fB\-S\fR to remove sections containing debugging information. In
some cases \fB\-R\fR will be useful to remove sections which contain
information that is not needed by the binary file.
.PP
-Note \- \fBobjcopy\fR is not able to change the endianness of its input
-files. If the input format has an endianness, (some formats do not),
+Note\-\-\-\fBobjcopy\fR is not able to change the endianness of its input
+files. If the input format has an endianness (some formats do not),
\&\fBobjcopy\fR can only copy the inputs into file formats that have the
-same endianness or which have no endianness (eg \fBsrec\fR).
+same endianness or which have no endianness (e.g., \fBsrec\fR).
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fIinfile\fR" 4
@@ -293,7 +306,7 @@ Do not copy relocation and symbol information from the source file.
.IP "\fB\-\-strip\-debug\fR" 4
.IX Item "--strip-debug"
.PD
-Do not copy debugging symbols from the source file.
+Do not copy debugging symbols or sections from the source file.
.IP "\fB\-\-strip\-unneeded\fR" 4
.IX Item "--strip-unneeded"
Strip all symbols that are not needed for relocation processing.
@@ -337,6 +350,25 @@ visible externally. This option may be given more than once.
.IX Item "--weaken-symbol=symbolname"
.PD
Make symbol \fIsymbolname\fR weak. This option may be given more than once.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+.PD 0
+.IP "\fB\-\-wildcard\fR" 4
+.IX Item "--wildcard"
+.PD
+Permit regular expressions in \fIsymbolname\fRs used in other command
+line options. The question mark (?), asterisk (*), backslash (\e) and
+square brackets ([]) operators can be used anywhere in the symbol
+name. If the first character of the symbol name is the exclamation
+point (!) then the sense of the switch is reversed for that symbol.
+For example:
+.Sp
+.Vb 1
+\& -w -W !foo -W fo*
+.Ve
+.Sp
+would cause objcopy to weaken all symbols that start with ``fo''
+except for the symbol ``foo''.
.IP "\fB\-x\fR" 4
.IX Item "-x"
.PD 0
@@ -547,6 +579,12 @@ creating S3\-only record format.
Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful
when one is trying link two things together for which you have no
source, and there are name collisions.
+.IP "\fB\-\-redefine\-syms=\fR\fIfilename\fR" 4
+.IX Item "--redefine-syms=filename"
+Apply \fB\-\-redefine\-sym\fR to each symbol pair "\fIold\fR \fInew\fR"
+listed in the file \fIfilename\fR. \fIfilename\fR is simply a flat file,
+with one symbol pair per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
.IP "\fB\-\-weaken\fR" 4
.IX Item "--weaken"
Change all global symbols in the file to be weak. This can be useful
@@ -590,6 +628,89 @@ If the output architecture has alternate machine codes, use the
a machine is assigned an official code and the tool-chain adopts the
new code, but other applications still depend on the original code
being used.
+.IP "\fB\-\-writable\-text\fR" 4
+.IX Item "--writable-text"
+Mark the output text as writable. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-readonly\-text\fR" 4
+.IX Item "--readonly-text"
+Make the output text write protected. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-pure\fR" 4
+.IX Item "--pure"
+Mark the output file as demand paged. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-impure\fR" 4
+.IX Item "--impure"
+Mark the output file as impure. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-prefix\-symbols=\fR\fIstring\fR" 4
+.IX Item "--prefix-symbols=string"
+Prefix all symbols in the output file with \fIstring\fR.
+.IP "\fB\-\-prefix\-sections=\fR\fIstring\fR" 4
+.IX Item "--prefix-sections=string"
+Prefix all section names in the output file with \fIstring\fR.
+.IP "\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR" 4
+.IX Item "--prefix-alloc-sections=string"
+Prefix all the names of all allocated sections in the output file with
+\&\fIstring\fR.
+.IP "\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR" 4
+.IX Item "--add-gnu-debuglink=path-to-file"
+Creates a .gnu_debuglink section which contains a reference to \fIpath-to-file\fR
+and adds it to the output file.
+.IP "\fB\-\-only\-keep\-debug\fR" 4
+.IX Item "--only-keep-debug"
+Strip a file, removing any sections that would be stripped by
+\&\fB\-\-strip\-debug\fR and leaving the debugging sections.
+.Sp
+The intention is that this option will be used in conjunction with
+\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
+stripped binary which will occupy less space in \s-1RAM\s0 and in a
+distribution and the second a debugging information file which is only
+needed if debugging abilities are required. The suggested procedure
+to create these files is as follows:
+.RS 4
+.IP "1.<Link the executable as normal. Assuming that is is called>" 4
+.IX Item "1.<Link the executable as normal. Assuming that is is called>"
+\&\f(CW\*(C`foo\*(C'\fR then...
+.ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
+.IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
+create a file containing the debugging info.
+.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
+.IX Item "1.<Run objcopy --strip-debug foo to create a>"
+stripped executable.
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
+to add a link to the debugging info into the stripped executable.
+.RE
+.RS 4
+.Sp
+Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
+file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
+optional. You could instead do this:
+.IP "1.<Link the executable as normal.>" 4
+.IX Item "1.<Link the executable as normal.>"
+.PD 0
+.ie n .IP "1.<Copy ""foo""\fR to \f(CW""foo.full"">" 4
+.el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
+.IX Item "1.<Copy foo to foo.full>"
+.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR>" 4
+.IX Item "1.<Run objcopy --strip-debug foo>"
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
+.RE
+.RS 4
+.PD
+.Sp
+ie the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
+full executable. It does not have to be a file created by the
+\&\fB\-\-only\-keep\-debug\fR switch.
+.RE
.IP "\fB\-V\fR" 4
.IX Item "-V"
.PD 0
@@ -608,16 +729,20 @@ archives, \fBobjcopy \-V\fR lists all members of the archive.
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
Show a summary of the options to \fBobjcopy\fR.
+.IP "\fB\-\-info\fR" 4
+.IX Item "--info"
+Display a list showing all architectures and object formats available.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/objdump.1 b/contrib/binutils/binutils/doc/objdump.1
index 24d8951..1e9baf5 100644
--- a/contrib/binutils/binutils/doc/objdump.1
+++ b/contrib/binutils/binutils/doc/objdump.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "OBJDUMP 1"
-.TH OBJDUMP 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH OBJDUMP 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
objdump \- display information from object files.
.SH "SYNOPSIS"
@@ -145,6 +143,7 @@ objdump [\fB\-a\fR|\fB\-\-archive\-headers\fR]
[\fB\-f\fR|\fB\-\-file\-headers\fR]
[\fB\-\-file\-start\-context\fR]
[\fB\-g\fR|\fB\-\-debugging\fR]
+ [\fB\-e\fR|\fB\-\-debugging\-tags\fR]
[\fB\-h\fR|\fB\-\-section\-headers\fR|\fB\-\-headers\fR]
[\fB\-i\fR|\fB\-\-info\fR]
[\fB\-j\fR \fIsection\fR|\fB\-\-section=\fR\fIsection\fR]
@@ -184,7 +183,7 @@ object files.
.IX Header "OPTIONS"
The long and short forms of options, shown here as alternatives, are
equivalent. At least one option from the list
-\&\fB\-a,\-d,\-D,\-f,\-g,\-G,\-h,\-H,\-p,\-r,\-R,\-S,\-t,\-T,\-V,\-x\fR must be given.
+\&\fB\-a,\-d,\-D,\-e,\-f,\-g,\-G,\-h,\-H,\-p,\-r,\-R,\-s,\-S,\-t,\-T,\-V,\-x\fR must be given.
.IP "\fB\-a\fR" 4
.IX Item "-a"
.PD 0
@@ -217,6 +216,7 @@ For example,
.Vb 1
\& objdump -b oasys -m vax -h fu.o
.Ve
+.Sp
displays summary information from the section headers (\fB\-h\fR) of
\&\fIfu.o\fR, which is explicitly identified (\fB\-m\fR) as a \s-1VAX\s0 object
file in the format produced by Oasys compilers. You can list the
@@ -232,8 +232,8 @@ Besides removing any initial underscore prepended by the system, this
makes \*(C+ function names readable. Different compilers have different
mangling styles. The optional demangling style argument can be used to
choose an appropriate demangling style for your compiler.
-.IP "\fB\-G\fR" 4
-.IX Item "-G"
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
.PD 0
.IP "\fB\-\-debugging\fR" 4
.IX Item "--debugging"
@@ -241,6 +241,15 @@ choose an appropriate demangling style for your compiler.
Display debugging information. This attempts to parse debugging
information stored in the file and print it out using a C like syntax.
Only certain types of debugging information have been implemented.
+Some other types are supported by \fBreadelf \-w\fR.
+.IP "\fB\-e\fR" 4
+.IX Item "-e"
+.PD 0
+.IP "\fB\-\-debugging\-tags\fR" 4
+.IX Item "--debugging-tags"
+.PD
+Like \fB\-g\fR, but the information is generated in a format compatible
+with ctags tool.
.IP "\fB\-d\fR" 4
.IX Item "-d"
.PD 0
@@ -262,11 +271,6 @@ those expected to contain instructions.
.IX Item "--prefix-addresses"
When disassembling, print the complete address on each line. This is
the older disassembly format.
-.IP "\fB\-\-disassemble\-zeroes\fR" 4
-.IX Item "--disassemble-zeroes"
-Normally the disassembly output will skip blocks of zeroes. This
-option directs the disassembler to disassemble those blocks, just like
-any other data.
.IP "\fB\-EB\fR" 4
.IX Item "-EB"
.PD 0
@@ -281,8 +285,8 @@ does not describe endianness information, such as S\-records.
.IP "\fB\-f\fR" 4
.IX Item "-f"
.PD 0
-.IP "\fB\-\-file\-header\fR" 4
-.IX Item "--file-header"
+.IP "\fB\-\-file\-headers\fR" 4
+.IX Item "--file-headers"
.PD
Display summary information from the overall header of
each of the \fIobjfile\fR files.
@@ -294,10 +298,10 @@ context to the start of the file.
.IP "\fB\-h\fR" 4
.IX Item "-h"
.PD 0
-.IP "\fB\-\-section\-header\fR" 4
-.IX Item "--section-header"
-.IP "\fB\-\-header\fR" 4
-.IX Item "--header"
+.IP "\fB\-\-section\-headers\fR" 4
+.IX Item "--section-headers"
+.IP "\fB\-\-headers\fR" 4
+.IX Item "--headers"
.PD
Display summary information from the section headers of the
object file.
@@ -310,8 +314,12 @@ although \fBld\fR relocates the sections correctly, using \fBobjdump
\&\-h\fR to list the file section headers cannot show the correct addresses.
Instead, it shows the usual addresses, which are implicit for the
target.
+.IP "\fB\-H\fR" 4
+.IX Item "-H"
+.PD 0
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
+.PD
Print a summary of the options to \fBobjdump\fR and exit.
.IP "\fB\-i\fR" 4
.IX Item "-i"
@@ -354,7 +362,9 @@ architectures with the \fB\-i\fR option.
.IX Item "--disassembler-options=options"
.PD
Pass target specific information to the disassembler. Only supported on
-some targets.
+some targets. If it is necessary to specify more than one
+disassembler option then multiple \fB\-M\fR options can be used or
+can be placed together into a comma separated list.
.Sp
If the target is an \s-1ARM\s0 architecture then this switch can be used to
select which register name set is used during disassembler. Specifying
@@ -368,7 +378,7 @@ just use \fBr\fR followed by the register number.
There are also two variants on the \s-1APCS\s0 register naming scheme enabled
by \fB\-M reg-names-atpcs\fR and \fB\-M reg-names-special-atpcs\fR which
use the ARM/Thumb Procedure Call Standard naming conventions. (Either
-with the normal register name or the special register names).
+with the normal register names or the special register names).
.Sp
This option can also be used for \s-1ARM\s0 architectures to force the
disassembler to interpret all instructions as Thumb instructions by
@@ -386,12 +396,62 @@ intel syntax mode and \s-1AT&T\s0 syntax mode. \fBaddr32\fR,
address size and operand size. These four options will be overridden if
\&\fBx86\-64\fR, \fBi386\fR or \fBi8086\fR appear later in the
option string. Lastly, \fBsuffix\fR, when in \s-1AT&T\s0 mode,
-instructs the dissassembler to print a mnemonic suffix even when the
+instructs the disassembler to print a mnemonic suffix even when the
suffix could be inferred by the operands.
.Sp
For \s-1PPC\s0, \fBbooke\fR, \fBbooke32\fR and \fBbooke64\fR select
disassembly of BookE instructions. \fB32\fR and \fB64\fR select
PowerPC and PowerPC64 disassembly, respectively.
+.Sp
+For \s-1MIPS\s0, this option controls the printing of register names in
+disassembled instructions. Multiple selections from the
+following may be specified as a comma separated string, and invalid
+options are ignored:
+.RS 4
+.ie n .IP """gpr\-names=\f(CI\s-1ABI\s0\f(CW""" 4
+.el .IP "\f(CWgpr\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
+.IX Item "gpr-names=ABI"
+Print \s-1GPR\s0 (general\-purpose register) names as appropriate
+for the specified \s-1ABI\s0. By default, \s-1GPR\s0 names are selected according to
+the \s-1ABI\s0 of the binary being disassembled.
+.ie n .IP """fpr\-names=\f(CI\s-1ABI\s0\f(CW""" 4
+.el .IP "\f(CWfpr\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
+.IX Item "fpr-names=ABI"
+Print \s-1FPR\s0 (floating\-point register) names as
+appropriate for the specified \s-1ABI\s0. By default, \s-1FPR\s0 numbers are printed
+rather than names.
+.ie n .IP """cp0\-names=\f(CI\s-1ARCH\s0\f(CW""" 4
+.el .IP "\f(CWcp0\-names=\f(CI\s-1ARCH\s0\f(CW\fR" 4
+.IX Item "cp0-names=ARCH"
+Print \s-1CP0\s0 (system control coprocessor; coprocessor 0) register names
+as appropriate for the \s-1CPU\s0 or architecture specified by
+\&\fI\s-1ARCH\s0\fR. By default, \s-1CP0\s0 register names are selected according to
+the architecture and \s-1CPU\s0 of the binary being disassembled.
+.ie n .IP """hwr\-names=\f(CI\s-1ARCH\s0\f(CW""" 4
+.el .IP "\f(CWhwr\-names=\f(CI\s-1ARCH\s0\f(CW\fR" 4
+.IX Item "hwr-names=ARCH"
+Print \s-1HWR\s0 (hardware register, used by the \f(CW\*(C`rdhwr\*(C'\fR instruction) names
+as appropriate for the \s-1CPU\s0 or architecture specified by
+\&\fI\s-1ARCH\s0\fR. By default, \s-1HWR\s0 names are selected according to
+the architecture and \s-1CPU\s0 of the binary being disassembled.
+.ie n .IP """reg\-names=\f(CI\s-1ABI\s0\f(CW""" 4
+.el .IP "\f(CWreg\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
+.IX Item "reg-names=ABI"
+Print \s-1GPR\s0 and \s-1FPR\s0 names as appropriate for the selected \s-1ABI\s0.
+.ie n .IP """reg\-names=\f(CI\s-1ARCH\s0\f(CW""" 4
+.el .IP "\f(CWreg\-names=\f(CI\s-1ARCH\s0\f(CW\fR" 4
+.IX Item "reg-names=ARCH"
+Print CPU-specific register names (\s-1CP0\s0 register and \s-1HWR\s0 names)
+as appropriate for the selected \s-1CPU\s0 or architecture.
+.RE
+.RS 4
+.Sp
+For any of the options listed above, \fI\s-1ABI\s0\fR or
+\&\fI\s-1ARCH\s0\fR may be specified as \fBnumeric\fR to have numbers printed
+rather than names, for the selected types of registers.
+You can list the available values of \fI\s-1ABI\s0\fR and \fI\s-1ARCH\s0\fR using
+the \fB\-\-help\fR option.
+.RE
.IP "\fB\-p\fR" 4
.IX Item "-p"
.PD 0
@@ -425,7 +485,8 @@ libraries.
.IP "\fB\-\-full\-contents\fR" 4
.IX Item "--full-contents"
.PD
-Display the full contents of any sections requested.
+Display the full contents of any sections requested. By default all
+non-empty sections are displayed.
.IP "\fB\-S\fR" 4
.IX Item "-S"
.PD 0
@@ -482,14 +543,18 @@ Print the dynamic symbol table entries of the file. This is only
meaningful for dynamic objects, such as certain types of shared
libraries. This is similar to the information provided by the \fBnm\fR
program when given the \fB\-D\fR (\fB\-\-dynamic\fR) option.
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
.IP "\fB\-\-version\fR" 4
.IX Item "--version"
+.PD
Print the version number of \fBobjdump\fR and exit.
.IP "\fB\-x\fR" 4
.IX Item "-x"
.PD 0
-.IP "\fB\-\-all\-header\fR" 4
-.IX Item "--all-header"
+.IP "\fB\-\-all\-headers\fR" 4
+.IX Item "--all-headers"
.PD
Display all available header information, including the symbol table and
relocation entries. Using \fB\-x\fR is equivalent to specifying all of
@@ -502,16 +567,26 @@ relocation entries. Using \fB\-x\fR is equivalent to specifying all of
.PD
Format some lines for output devices that have more than 80 columns.
Also do not truncate symbol names when they are displayed.
+.IP "\fB\-z\fR" 4
+.IX Item "-z"
+.PD 0
+.IP "\fB\-\-disassemble\-zeroes\fR" 4
+.IX Item "--disassemble-zeroes"
+.PD
+Normally the disassembly output will skip blocks of zeroes. This
+option directs the disassembler to disassemble those blocks, just like
+any other data.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fInm\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/ranlib.1 b/contrib/binutils/binutils/doc/ranlib.1
index 5512755..0d8e4ac 100644
--- a/contrib/binutils/binutils/doc/ranlib.1
+++ b/contrib/binutils/binutils/doc/ranlib.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "RANLIB 1"
-.TH RANLIB 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH RANLIB 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
ranlib \- generate index to archive.
.SH "SYNOPSIS"
@@ -166,11 +164,12 @@ Show the version number of \fBranlib\fR.
\&\fIar\fR\|(1), \fInm\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/readelf.1 b/contrib/binutils/binutils/doc/readelf.1
index 81f655d..7b48563 100644
--- a/contrib/binutils/binutils/doc/readelf.1
+++ b/contrib/binutils/binutils/doc/readelf.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,10 +128,9 @@
.\" ========================================================================
.\"
.IX Title "READELF 1"
-.TH READELF 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH READELF 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
-readelf \- Displays information about \s-1ELF\s0 files.
+readelf \- Displays information about ELF files.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
readelf [\fB\-a\fR|\fB\-\-all\fR]
@@ -146,10 +144,12 @@ readelf [\fB\-a\fR|\fB\-\-all\fR]
[\fB\-u\fR|\fB\-\-unwind\fR]
[\fB\-d\fR|\fB\-\-dynamic\fR]
[\fB\-V\fR|\fB\-\-version\-info\fR]
+ [\fB\-A\fR|\fB\-\-arch\-specific\fR]
[\fB\-D\fR|\fB\-\-use\-dynamic\fR]
[\fB\-x\fR <number>|\fB\-\-hex\-dump=\fR<number>]
- [\fB\-w[liaprmfFso]\fR|\fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]]
- [\fB\-histogram\fR]
+ [\fB\-w[liaprmfFso]\fR|
+ \fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]]
+ [\fB\-I\fR|\fB\-histogram\fR]
[\fB\-v\fR|\fB\-\-version\fR]
[\fB\-W\fR|\fB\-\-wide\fR]
[\fB\-H\fR|\fB\-\-help\fR]
@@ -159,9 +159,13 @@ readelf [\fB\-a\fR|\fB\-\-all\fR]
\&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
files. The options control what particular information to display.
.PP
-\&\fIelffile\fR... are the object files to be examined. At the
-moment, \fBreadelf\fR does not support examining archives, nor does it
-support examing 64 bit \s-1ELF\s0 files.
+\&\fIelffile\fR... are the object files to be examined. 32\-bit and
+64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
+.PP
+This program performs a similar function to \fBobjdump\fR but it
+goes into more detail and it exists independently of the \s-1BFD\s0
+library, so if there is a bug in \s-1BFD\s0 then readelf will not be
+affected.
.SH "OPTIONS"
.IX Header "OPTIONS"
The long and short forms of options, shown here as alternatives, are
@@ -243,6 +247,14 @@ Displays the contents of the file's relocation section, if it has one.
.PD
Displays the contents of the file's unwind section, if it has one. Only
the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
+.IP "\fB\-u\fR" 4
+.IX Item "-u"
+.PD 0
+.IP "\fB\-\-unwind\fR" 4
+.IX Item "--unwind"
+.PD
+Displays the contents of the file's unwind section, if it has one. Only
+the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
.IP "\fB\-d\fR" 4
.IX Item "-d"
.PD 0
@@ -258,6 +270,14 @@ Displays the contents of the file's dynamic section, if it has one.
.PD
Displays the contents of the version sections in the file, it they
exist.
+.IP "\fB\-A\fR" 4
+.IX Item "-A"
+.PD 0
+.IP "\fB\-\-arch\-specific\fR" 4
+.IX Item "--arch-specific"
+.PD
+Displays architecture-specific information in the file, if there
+is any.
.IP "\fB\-D\fR" 4
.IX Item "-D"
.PD 0
@@ -277,14 +297,18 @@ Displays the contents of the indicated section as a hexadecimal dump.
.IP "\fB\-w[liaprmfFso]\fR" 4
.IX Item "-w[liaprmfFso]"
.PD 0
-.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]\fR" 4
-.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]"
+.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]\fR" 4
+.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]"
.PD
Displays the contents of the debug sections in the file, if any are
present. If one of the optional letters or words follows the switch
then only data found in those specific sections will be dumped.
+.IP "\fB\-I\fR" 4
+.IX Item "-I"
+.PD 0
.IP "\fB\-\-histogram\fR" 4
.IX Item "--histogram"
+.PD
Display a histogram of bucket list lengths when displaying the contents
of the symbol tables.
.IP "\fB\-v\fR" 4
@@ -317,11 +341,12 @@ Display the command line options understood by \fBreadelf\fR.
\&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/size.1 b/contrib/binutils/binutils/doc/size.1
index 09a8156..4bf0512 100644
--- a/contrib/binutils/binutils/doc/size.1
+++ b/contrib/binutils/binutils/doc/size.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "SIZE 1"
-.TH SIZE 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH SIZE 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
size \- list section sizes and total size.
.SH "SYNOPSIS"
@@ -176,6 +174,7 @@ Here is an example of the Berkeley (default) format of output from
\& 294880 81920 11592 388392 5ed28 ranlib
\& 294880 81920 11888 388688 5ee50 size
.Ve
+.Sp
This is the same data, but displayed closer to System V conventions:
.Sp
.Vb 7
@@ -187,6 +186,7 @@ This is the same data, but displayed closer to System V conventions:
\& .bss 11592 385024
\& Total 388392
.Ve
+.Sp
.Vb 6
\& size :
\& section size addr
@@ -239,11 +239,12 @@ Display the version number of \fBsize\fR.
\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/strings.1 b/contrib/binutils/binutils/doc/strings.1
index 74d9112..f3b9be0 100644
--- a/contrib/binutils/binutils/doc/strings.1
+++ b/contrib/binutils/binutils/doc/strings.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,8 +128,7 @@
.\" ========================================================================
.\"
.IX Title "STRINGS 1"
-.TH STRINGS 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH STRINGS 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
strings \- print the strings of printable characters in files.
.SH "SYNOPSIS"
@@ -206,11 +204,11 @@ octal, \fBx\fR for hexadecimal, or \fBd\fR for decimal.
.IX Item "--encoding=encoding"
.PD
Select the character encoding of the strings that are to be found.
-Possible values for \fIencoding\fR are: \fBs\fR = single-byte
-characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBb\fR = 16\-bit
-Bigendian, \fBl\fR = 16\-bit Littleendian, \fBB\fR = 32\-bit Bigendian,
-\&\fBL\fR = 32\-bit Littleendian. Useful for finding wide character
-strings.
+Possible values for \fIencoding\fR are: \fBs\fR = single\-7\-bit\-byte
+characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR =
+single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR =
+16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit
+littleendian. Useful for finding wide character strings.
.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
.IX Item "--target=bfdname"
Specify an object code format other than your system's default format.
@@ -227,11 +225,12 @@ Print the program version number on the standard output and exit.
and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/doc/strip.1 b/contrib/binutils/binutils/doc/strip.1
index f8cca3b..2073020 100644
--- a/contrib/binutils/binutils/doc/strip.1
+++ b/contrib/binutils/binutils/doc/strip.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,22 +128,25 @@
.\" ========================================================================
.\"
.IX Title "STRIP 1"
-.TH STRIP 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH STRIP 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
.SH "NAME"
strip \- Discard symbols from object files.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
-strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR ]
- [\fB\-I\fR \fIbfdname\fR |\fB\-\-input\-target=\fR\fIbfdname\fR ]
- [\fB\-O\fR \fIbfdname\fR |\fB\-\-output\-target=\fR\fIbfdname\fR ]
- [\fB\-s\fR|\fB\-\-strip\-all\fR] [\fB\-S\fR|\fB\-g\fR|\fB\-d\fR|\fB\-\-strip\-debug\fR]
- [\fB\-K\fR \fIsymbolname\fR |\fB\-\-keep\-symbol=\fR\fIsymbolname\fR ]
- [\fB\-N\fR \fIsymbolname\fR |\fB\-\-strip\-symbol=\fR\fIsymbolname\fR ]
- [\fB\-x\fR|\fB\-\-discard\-all\fR ] [\fB\-X\fR |\fB\-\-discard\-locals\fR]
- [\fB\-R\fR \fIsectionname\fR |\fB\-\-remove\-section=\fR\fIsectionname\fR ]
- [\fB\-o\fR \fIfile\fR ] [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
- [\fB\-v\fR |\fB\-\-verbose\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fB\-\-help\fR]
+strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR]
+ [\fB\-I\fR \fIbfdname\fR |\fB\-\-input\-target=\fR\fIbfdname\fR]
+ [\fB\-O\fR \fIbfdname\fR |\fB\-\-output\-target=\fR\fIbfdname\fR]
+ [\fB\-s\fR|\fB\-\-strip\-all\fR]
+ [\fB\-S\fR|\fB\-g\fR|\fB\-d\fR|\fB\-\-strip\-debug\fR]
+ [\fB\-K\fR \fIsymbolname\fR |\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-N\fR \fIsymbolname\fR |\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-w\fR|\fB\-\-wildcard\fR]
+ [\fB\-x\fR|\fB\-\-discard\-all\fR] [\fB\-X\fR |\fB\-\-discard\-locals\fR]
+ [\fB\-R\fR \fIsectionname\fR |\fB\-\-remove\-section=\fR\fIsectionname\fR]
+ [\fB\-o\fR \fIfile\fR] [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
+ [\fB\-\-only\-keep\-debug\fR]
+ [\fB\-v\fR |\fB\-\-verbose\fR] [\fB\-V\fR|\fB\-\-version\fR]
+ [\fB\-\-help\fR] [\fB\-\-info\fR]
\fIobjfile\fR...
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
@@ -167,8 +169,11 @@ code format \fIbfdname\fR, and rewrite it in the same format.
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
Show a summary of the options to \fBstrip\fR and exit.
-.IP "\fB\-I\fR \fIbfdname\fR\fB \fR" 4
-.IX Item "-I bfdname "
+.IP "\fB\-\-info\fR" 4
+.IX Item "--info"
+Display a list showing all architectures and object formats available.
+.IP "\fB\-I\fR \fIbfdname\fR" 4
+.IX Item "-I bfdname"
.PD 0
.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
.IX Item "--input-target=bfdname"
@@ -241,6 +246,25 @@ argument may be specified.
.IX Item "--preserve-dates"
.PD
Preserve the access and modification dates of the file.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+.PD 0
+.IP "\fB\-\-wildcard\fR" 4
+.IX Item "--wildcard"
+.PD
+Permit regular expressions in \fIsymbolname\fRs used in other command
+line options. The question mark (?), asterisk (*), backslash (\e) and
+square brackets ([]) operators can be used anywhere in the symbol
+name. If the first character of the symbol name is the exclamation
+point (!) then the sense of the switch is reversed for that symbol.
+For example:
+.Sp
+.Vb 1
+\& -w -K !foo -K fo*
+.Ve
+.Sp
+would cause strip to only keep symbols that start with the letters
+``fo'', but to discard the symbol ``foo''.
.IP "\fB\-x\fR" 4
.IX Item "-x"
.PD 0
@@ -256,6 +280,59 @@ Remove non-global symbols.
.PD
Remove compiler-generated local symbols.
(These usually start with \fBL\fR or \fB.\fR.)
+.IP "\fB\-\-only\-keep\-debug\fR" 4
+.IX Item "--only-keep-debug"
+Strip a file, removing any sections that would be stripped by
+\&\fB\-\-strip\-debug\fR and leaving the debugging sections.
+.Sp
+The intention is that this option will be used in conjunction with
+\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
+stripped binary which will occupy less space in \s-1RAM\s0 and in a
+distribution and the second a debugging information file which is only
+needed if debugging abilities are required. The suggested procedure
+to create these files is as follows:
+.RS 4
+.IP "1.<Link the executable as normal. Assuming that is is called>" 4
+.IX Item "1.<Link the executable as normal. Assuming that is is called>"
+\&\f(CW\*(C`foo\*(C'\fR then...
+.ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
+.IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
+create a file containing the debugging info.
+.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
+.IX Item "1.<Run objcopy --strip-debug foo to create a>"
+stripped executable.
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
+to add a link to the debugging info into the stripped executable.
+.RE
+.RS 4
+.Sp
+Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
+file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
+optional. You could instead do this:
+.IP "1.<Link the executable as normal.>" 4
+.IX Item "1.<Link the executable as normal.>"
+.PD 0
+.ie n .IP "1.<Copy ""foo""\fR to \f(CW""foo.full"">" 4
+.el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
+.IX Item "1.<Copy foo to foo.full>"
+.ie n .IP "1.<Run ""strip \-\-strip\-debug foo"">" 4
+.el .IP "1.<Run \f(CWstrip \-\-strip\-debug foo\fR>" 4
+.IX Item "1.<Run strip --strip-debug foo>"
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
+.RE
+.RS 4
+.PD
+.Sp
+ie the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
+full executable. It does not have to be a file created by the
+\&\fB\-\-only\-keep\-debug\fR switch.
+.RE
.IP "\fB\-V\fR" 4
.IX Item "-V"
.PD 0
@@ -276,11 +353,12 @@ archives, \fBstrip \-v\fR lists all members of the archive.
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
+section entitled ``\s-1GNU\s0 Free Documentation License''.
diff --git a/contrib/binutils/binutils/filemode.c b/contrib/binutils/binutils/filemode.c
index ca00694f..8b438a9 100644
--- a/contrib/binutils/binutils/filemode.c
+++ b/contrib/binutils/binutils/filemode.c
@@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes
- Copyright 1985, 1990, 1991, 1994, 1995, 1997
+ Copyright 1985, 1990, 1991, 1994, 1995, 1997, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,8 @@
#include "bfd.h"
#include "bucomm.h"
-static char ftypelet PARAMS ((unsigned long));
-static void setst PARAMS ((unsigned long, char *));
+static char ftypelet (unsigned long);
+static void setst (unsigned long, char *);
/* filemodestring - fill in string STR with an ls-style ASCII
representation of the st_mode field of file stats block STATP.
@@ -64,9 +64,7 @@ static void setst PARAMS ((unsigned long, char *));
/* This is not used; only mode_string is used. */
void
-filemodestring (statp, str)
- struct stat *statp;
- char *str;
+filemodestring (struct stat *statp, char *str)
{
mode_string ((unsigned long) statp->st_mode, str);
}
@@ -118,9 +116,7 @@ filemodestring (statp, str)
is given as an argument. */
void
-mode_string (mode, str)
- unsigned long mode;
- char *str;
+mode_string (unsigned long mode, char *str)
{
str[0] = ftypelet ((unsigned long) mode);
str[1] = (mode & S_IRUSR) != 0 ? 'r' : '-';
@@ -140,7 +136,7 @@ mode_string (mode, str)
'd' for directories
'b' for block special files
'c' for character special files
- 'm' for multiplexor files
+ 'm' for multiplexer files
'l' for symbolic links
's' for sockets
'p' for fifos
@@ -195,8 +191,7 @@ mode_string (mode, str)
#endif /* ! defined (S_ISLNK) */
static char
-ftypelet (bits)
- unsigned long bits;
+ftypelet (unsigned long bits)
{
if (S_ISDIR (bits))
return 'd';
@@ -230,9 +225,7 @@ ftypelet (bits)
according to the file mode BITS. */
static void
-setst (bits, chars)
- unsigned long bits ATTRIBUTE_UNUSED;
- char *chars ATTRIBUTE_UNUSED;
+setst (unsigned long bits ATTRIBUTE_UNUSED, char *chars ATTRIBUTE_UNUSED)
{
#ifdef S_ISUID
if (bits & S_ISUID)
diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c
index 4735fb3..1ced603 100644
--- a/contrib/binutils/binutils/ieee.c
+++ b/contrib/binutils/binutils/ieee.c
@@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -42,8 +42,8 @@ struct ieee_block
const char *filename;
/* The index of the function type, for a BB4 or BB6 block. */
unsigned int fnindx;
- /* True if this function is being skipped. */
- boolean skip;
+ /* TRUE if this function is being skipped. */
+ bfd_boolean skip;
};
/* This structure is the block stack. */
@@ -146,7 +146,7 @@ struct ieee_tag
struct ieee_info
{
/* The debugging handle. */
- PTR dhandle;
+ void *dhandle;
/* The BFD. */
bfd *abfd;
/* The start of the bytes to be parsed. */
@@ -156,7 +156,7 @@ struct ieee_info
/* The block stack. */
struct ieee_blockstack blockstack;
/* Whether we have seen a BB1 or BB2. */
- boolean saw_filename;
+ bfd_boolean saw_filename;
/* The variables. */
struct ieee_vars vars;
/* The global variables, after a global typedef block. */
@@ -249,56 +249,50 @@ enum builtin_types
/* Local functions. */
-static void ieee_error
- PARAMS ((struct ieee_info *, const bfd_byte *, const char *));
-static void ieee_eof PARAMS ((struct ieee_info *));
-static char *savestring PARAMS ((const char *, unsigned long));
-static boolean ieee_read_number
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
-static boolean ieee_read_optional_number
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *, boolean *));
-static boolean ieee_read_id
- PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *));
-static boolean ieee_read_optional_id
- PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *, boolean *));
-static boolean ieee_read_expression
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
+static void ieee_error (struct ieee_info *, const bfd_byte *, const char *);
+static void ieee_eof (struct ieee_info *);
+static char *savestring (const char *, unsigned long);
+static bfd_boolean ieee_read_number
+ (struct ieee_info *, const bfd_byte **, bfd_vma *);
+static bfd_boolean ieee_read_optional_number
+ (struct ieee_info *, const bfd_byte **, bfd_vma *, bfd_boolean *);
+static bfd_boolean ieee_read_id
+ (struct ieee_info *, const bfd_byte **, const char **, unsigned long *);
+static bfd_boolean ieee_read_optional_id
+ (struct ieee_info *, const bfd_byte **, const char **, unsigned long *,
+ bfd_boolean *);
+static bfd_boolean ieee_read_expression
+ (struct ieee_info *, const bfd_byte **, bfd_vma *);
static debug_type ieee_builtin_type
- PARAMS ((struct ieee_info *, const bfd_byte *, unsigned int));
-static boolean ieee_alloc_type
- PARAMS ((struct ieee_info *, unsigned int, boolean));
-static boolean ieee_read_type_index
- PARAMS ((struct ieee_info *, const bfd_byte **, debug_type *));
-static int ieee_regno_to_genreg PARAMS ((bfd *, int));
-static int ieee_genreg_to_regno PARAMS ((bfd *, int));
-static boolean parse_ieee_bb PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_be PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_nn PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_ty PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_atn PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean ieee_read_cxx_misc
- PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
-static boolean ieee_read_cxx_class
- PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
-static boolean ieee_read_cxx_defaults
- PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
-static boolean ieee_read_reference
- PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean ieee_require_asn
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
-static boolean ieee_require_atn65
- PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *));
+ (struct ieee_info *, const bfd_byte *, unsigned int);
+static bfd_boolean ieee_alloc_type
+ (struct ieee_info *, unsigned int, bfd_boolean);
+static bfd_boolean ieee_read_type_index
+ (struct ieee_info *, const bfd_byte **, debug_type *);
+static int ieee_regno_to_genreg (bfd *, int);
+static int ieee_genreg_to_regno (bfd *, int);
+static bfd_boolean parse_ieee_bb (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_be (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_nn (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_ty (struct ieee_info *, const bfd_byte **);
+static bfd_boolean parse_ieee_atn (struct ieee_info *, const bfd_byte **);
+static bfd_boolean ieee_read_cxx_misc
+ (struct ieee_info *, const bfd_byte **, unsigned long);
+static bfd_boolean ieee_read_cxx_class
+ (struct ieee_info *, const bfd_byte **, unsigned long);
+static bfd_boolean ieee_read_cxx_defaults
+ (struct ieee_info *, const bfd_byte **, unsigned long);
+static bfd_boolean ieee_read_reference
+ (struct ieee_info *, const bfd_byte **);
+static bfd_boolean ieee_require_asn
+ (struct ieee_info *, const bfd_byte **, bfd_vma *);
+static bfd_boolean ieee_require_atn65
+ (struct ieee_info *, const bfd_byte **, const char **, unsigned long *);
/* Report an error in the IEEE debugging information. */
static void
-ieee_error (info, p, s)
- struct ieee_info *info;
- const bfd_byte *p;
- const char *s;
+ieee_error (struct ieee_info *info, const bfd_byte *p, const char *s)
{
if (p != NULL)
fprintf (stderr, "%s: 0x%lx: %s (0x%x)\n", bfd_get_filename (info->abfd),
@@ -310,8 +304,7 @@ ieee_error (info, p, s)
/* Report an unexpected EOF in the IEEE debugging information. */
static void
-ieee_eof (info)
- struct ieee_info *info;
+ieee_eof (struct ieee_info *info)
{
ieee_error (info, (const bfd_byte *) NULL,
_("unexpected end of debugging information"));
@@ -320,9 +313,7 @@ ieee_eof (info)
/* Save a string in memory. */
static char *
-savestring (start, len)
- const char *start;
- unsigned long len;
+savestring (const char *start, unsigned long len)
{
char *ret;
@@ -334,24 +325,18 @@ savestring (start, len)
/* Read a number which must be present in an IEEE file. */
-static boolean
-ieee_read_number (info, pp, pv)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
+static bfd_boolean
+ieee_read_number (struct ieee_info *info, const bfd_byte **pp, bfd_vma *pv)
{
- return ieee_read_optional_number (info, pp, pv, (boolean *) NULL);
+ return ieee_read_optional_number (info, pp, pv, (bfd_boolean *) NULL);
}
/* Read a number in an IEEE file. If ppresent is not NULL, the number
need not be there. */
-static boolean
-ieee_read_optional_number (info, pp, pv, ppresent)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
- boolean *ppresent;
+static bfd_boolean
+ieee_read_optional_number (struct ieee_info *info, const bfd_byte **pp,
+ bfd_vma *pv, bfd_boolean *ppresent)
{
ieee_record_enum_type b;
@@ -359,11 +344,11 @@ ieee_read_optional_number (info, pp, pv, ppresent)
{
if (ppresent != NULL)
{
- *ppresent = false;
- return true;
+ *ppresent = FALSE;
+ return TRUE;
}
ieee_eof (info);
- return false;
+ return FALSE;
}
b = (ieee_record_enum_type) **pp;
@@ -373,8 +358,8 @@ ieee_read_optional_number (info, pp, pv, ppresent)
{
*pv = (bfd_vma) b;
if (ppresent != NULL)
- *ppresent = true;
- return true;
+ *ppresent = TRUE;
+ return TRUE;
}
if (b >= ieee_number_repeat_start_enum && b <= ieee_number_repeat_end_enum)
@@ -385,7 +370,7 @@ ieee_read_optional_number (info, pp, pv, ppresent)
if (*pp + i - 1 >= info->pend)
{
ieee_eof (info);
- return false;
+ return FALSE;
}
*pv = 0;
@@ -397,44 +382,38 @@ ieee_read_optional_number (info, pp, pv, ppresent)
}
if (ppresent != NULL)
- *ppresent = true;
+ *ppresent = TRUE;
- return true;
+ return TRUE;
}
if (ppresent != NULL)
{
--*pp;
- *ppresent = false;
- return true;
+ *ppresent = FALSE;
+ return TRUE;
}
ieee_error (info, *pp - 1, _("invalid number"));
- return false;
+ return FALSE;
}
/* Read a required string from an IEEE file. */
-static boolean
-ieee_read_id (info, pp, pname, pnamlen)
- struct ieee_info *info;
- const bfd_byte **pp;
- const char **pname;
- unsigned long *pnamlen;
+static bfd_boolean
+ieee_read_id (struct ieee_info *info, const bfd_byte **pp,
+ const char **pname, unsigned long *pnamlen)
{
- return ieee_read_optional_id (info, pp, pname, pnamlen, (boolean *) NULL);
+ return ieee_read_optional_id (info, pp, pname, pnamlen, (bfd_boolean *) NULL);
}
/* Read a string from an IEEE file. If ppresent is not NULL, the
string is optional. */
-static boolean
-ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
- struct ieee_info *info;
- const bfd_byte **pp;
- const char **pname;
- unsigned long *pnamlen;
- boolean *ppresent;
+static bfd_boolean
+ieee_read_optional_id (struct ieee_info *info, const bfd_byte **pp,
+ const char **pname, unsigned long *pnamlen,
+ bfd_boolean *ppresent)
{
bfd_byte b;
unsigned long len;
@@ -442,7 +421,7 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
if (*pp >= info->pend)
{
ieee_eof (info);
- return false;
+ return FALSE;
}
b = **pp;
@@ -465,17 +444,17 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
if (ppresent != NULL)
{
--*pp;
- *ppresent = false;
- return true;
+ *ppresent = FALSE;
+ return TRUE;
}
ieee_error (info, *pp - 1, _("invalid string length"));
- return false;
+ return FALSE;
}
if ((unsigned long) (info->pend - *pp) < len)
{
ieee_eof (info);
- return false;
+ return FALSE;
}
*pname = (const char *) *pp;
@@ -483,9 +462,9 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
*pp += len;
if (ppresent != NULL)
- *ppresent = true;
+ *ppresent = TRUE;
- return true;
+ return TRUE;
}
/* Read an expression from an IEEE file. Since this code is only used
@@ -494,11 +473,9 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
seen in debugging information. This can be easily extended if
necessary. */
-static boolean
-ieee_read_expression (info, pp, pv)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
+static bfd_boolean
+ieee_read_expression (struct ieee_info *info, const bfd_byte **pp,
+ bfd_vma *pv)
{
const bfd_byte *expr_start;
#define EXPR_STACK_SIZE (10)
@@ -513,20 +490,20 @@ ieee_read_expression (info, pp, pv)
{
const bfd_byte *start;
bfd_vma val;
- boolean present;
+ bfd_boolean present;
ieee_record_enum_type c;
start = *pp;
if (! ieee_read_optional_number (info, pp, &val, &present))
- return false;
+ return FALSE;
if (present)
{
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
ieee_error (info, start, _("expression stack overflow"));
- return false;
+ return FALSE;
}
*esp++ = val;
continue;
@@ -554,20 +531,20 @@ ieee_read_expression (info, pp, pv)
asection *s;
if (! ieee_read_number (info, pp, &indx))
- return false;
+ return FALSE;
for (s = info->abfd->sections; s != NULL; s = s->next)
if ((bfd_vma) s->target_index == indx)
break;
if (s == NULL)
{
ieee_error (info, start, _("unknown section"));
- return false;
+ return FALSE;
}
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
ieee_error (info, start, _("expression stack overflow"));
- return false;
+ return FALSE;
}
*esp++ = bfd_get_section_vma (info->abfd, s);
@@ -582,7 +559,7 @@ ieee_read_expression (info, pp, pv)
if (esp - expr_stack < 2)
{
ieee_error (info, start, _("expression stack underflow"));
- return false;
+ return FALSE;
}
v1 = *--esp;
@@ -596,23 +573,21 @@ ieee_read_expression (info, pp, pv)
if (esp - 1 != expr_stack)
{
ieee_error (info, expr_start, _("expression stack mismatch"));
- return false;
+ return FALSE;
}
*pv = *--esp;
- return true;
+ return TRUE;
}
/* Return an IEEE builtin type. */
static debug_type
-ieee_builtin_type (info, p, indx)
- struct ieee_info *info;
- const bfd_byte *p;
- unsigned int indx;
+ieee_builtin_type (struct ieee_info *info, const bfd_byte *p,
+ unsigned int indx)
{
- PTR dhandle;
+ void *dhandle;
debug_type type;
const char *name;
@@ -648,42 +623,42 @@ ieee_builtin_type (info, p, indx)
break;
case builtin_signed_char:
- type = debug_make_int_type (dhandle, 1, false);
+ type = debug_make_int_type (dhandle, 1, FALSE);
name = "signed char";
break;
case builtin_unsigned_char:
- type = debug_make_int_type (dhandle, 1, true);
+ type = debug_make_int_type (dhandle, 1, TRUE);
name = "unsigned char";
break;
case builtin_signed_short_int:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "signed short int";
break;
case builtin_unsigned_short_int:
- type = debug_make_int_type (dhandle, 2, true);
+ type = debug_make_int_type (dhandle, 2, TRUE);
name = "unsigned short int";
break;
case builtin_signed_long:
- type = debug_make_int_type (dhandle, 4, false);
+ type = debug_make_int_type (dhandle, 4, FALSE);
name = "signed long";
break;
case builtin_unsigned_long:
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned long";
break;
case builtin_signed_long_long:
- type = debug_make_int_type (dhandle, 8, false);
+ type = debug_make_int_type (dhandle, 8, FALSE);
name = "signed long long";
break;
case builtin_unsigned_long_long:
- type = debug_make_int_type (dhandle, 8, true);
+ type = debug_make_int_type (dhandle, 8, TRUE);
name = "unsigned long long";
break;
@@ -717,64 +692,64 @@ ieee_builtin_type (info, p, indx)
ieee_builtin_type (info, p,
((unsigned int)
builtin_int)),
- 0, -1, true);
+ 0, -1, TRUE);
name = "QUOTED STRING";
break;
case builtin_instruction_address:
/* FIXME: This should be a code address. */
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "instruction address";
break;
case builtin_int:
/* FIXME: The size for this type should depend upon the
processor. */
- type = debug_make_int_type (dhandle, 4, false);
+ type = debug_make_int_type (dhandle, 4, FALSE);
name = "int";
break;
case builtin_unsigned:
/* FIXME: The size for this type should depend upon the
processor. */
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned";
break;
case builtin_unsigned_int:
/* FIXME: The size for this type should depend upon the
processor. */
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned int";
break;
case builtin_char:
- type = debug_make_int_type (dhandle, 1, false);
+ type = debug_make_int_type (dhandle, 1, FALSE);
name = "char";
break;
case builtin_long:
- type = debug_make_int_type (dhandle, 4, false);
+ type = debug_make_int_type (dhandle, 4, FALSE);
name = "long";
break;
case builtin_short:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "short";
break;
case builtin_unsigned_short:
- type = debug_make_int_type (dhandle, 2, true);
+ type = debug_make_int_type (dhandle, 2, TRUE);
name = "unsigned short";
break;
case builtin_short_int:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "short int";
break;
case builtin_signed_short:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "signed short";
break;
@@ -793,15 +768,12 @@ ieee_builtin_type (info, p, indx)
return type;
}
-/* Allocate more space in the type table. If ref is true, this is a
+/* Allocate more space in the type table. If ref is TRUE, this is a
reference to the type; if it is not already defined, we should set
up an indirect type. */
-static boolean
-ieee_alloc_type (info, indx, ref)
- struct ieee_info *info;
- unsigned int indx;
- boolean ref;
+static bfd_boolean
+ieee_alloc_type (struct ieee_info *info, unsigned int indx, bfd_boolean ref)
{
unsigned int nalloc;
register struct ieee_type *t;
@@ -839,20 +811,18 @@ ieee_alloc_type (info, indx, ref)
t->type = debug_make_indirect_type (info->dhandle, t->pslot,
(const char *) NULL);
if (t->type == NULL)
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Read a type index and return the corresponding type. */
-static boolean
-ieee_read_type_index (info, pp, ptype)
- struct ieee_info *info;
- const bfd_byte **pp;
- debug_type *ptype;
+static bfd_boolean
+ieee_read_type_index (struct ieee_info *info, const bfd_byte **pp,
+ debug_type *ptype)
{
const bfd_byte *start;
bfd_vma indx;
@@ -860,34 +830,30 @@ ieee_read_type_index (info, pp, ptype)
start = *pp;
if (! ieee_read_number (info, pp, &indx))
- return false;
+ return FALSE;
if (indx < 256)
{
*ptype = ieee_builtin_type (info, start, indx);
if (*ptype == NULL)
- return false;
- return true;
+ return FALSE;
+ return TRUE;
}
indx -= 256;
- if (! ieee_alloc_type (info, indx, true))
- return false;
+ if (! ieee_alloc_type (info, indx, TRUE))
+ return FALSE;
*ptype = info->types.types[indx].type;
- return true;
+ return TRUE;
}
/* Parse IEEE debugging information for a file. This is passed the
bytes which compose the Debug Information Part of an IEEE file. */
-boolean
-parse_ieee (dhandle, abfd, bytes, len)
- PTR dhandle;
- bfd *abfd;
- const bfd_byte *bytes;
- bfd_size_type len;
+bfd_boolean
+parse_ieee (void *dhandle, bfd *abfd, const bfd_byte *bytes, bfd_size_type len)
{
struct ieee_info info;
unsigned int i;
@@ -898,7 +864,7 @@ parse_ieee (dhandle, abfd, bytes, len)
info.bytes = bytes;
info.pend = bytes + len;
info.blockstack.bsp = info.blockstack.stack;
- info.saw_filename = false;
+ info.saw_filename = FALSE;
info.vars.alloc = 0;
info.vars.vars = NULL;
info.global_vars = NULL;
@@ -926,38 +892,38 @@ parse_ieee (dhandle, abfd, bytes, len)
if (c <= ieee_number_repeat_end_enum)
{
ieee_error (&info, record_start, _("unexpected number"));
- return false;
+ return FALSE;
}
switch (c)
{
default:
ieee_error (&info, record_start, _("unexpected record type"));
- return false;
+ return FALSE;
case ieee_bb_record_enum:
if (! parse_ieee_bb (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_be_record_enum:
if (! parse_ieee_be (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_nn_record:
if (! parse_ieee_nn (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_ty_record_enum:
if (! parse_ieee_ty (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_atn_record_enum:
if (! parse_ieee_atn (&info, &p))
- return false;
+ return FALSE;
break;
}
}
@@ -966,18 +932,16 @@ parse_ieee (dhandle, abfd, bytes, len)
{
ieee_error (&info, (const bfd_byte *) NULL,
_("blocks left on stack at end"));
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Handle an IEEE BB record. */
-static boolean
-parse_ieee_bb (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+static bfd_boolean
+parse_ieee_bb (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *block_start;
bfd_byte b;
@@ -986,7 +950,7 @@ parse_ieee_bb (info, pp)
unsigned long namlen;
char *namcopy = NULL;
unsigned int fnindx;
- boolean skip;
+ bfd_boolean skip;
block_start = *pp;
@@ -995,10 +959,10 @@ parse_ieee_bb (info, pp)
if (! ieee_read_number (info, pp, &size)
|| ! ieee_read_id (info, pp, &name, &namlen))
- return false;
+ return FALSE;
fnindx = (unsigned int) -1;
- skip = false;
+ skip = FALSE;
switch (b)
{
@@ -1006,10 +970,10 @@ parse_ieee_bb (info, pp)
/* BB1: Type definitions local to a module. */
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_set_filename (info->dhandle, namcopy))
- return false;
- info->saw_filename = true;
+ return FALSE;
+ info->saw_filename = TRUE;
/* Discard any variables or types we may have seen before. */
if (info->vars.vars != NULL)
@@ -1038,8 +1002,8 @@ parse_ieee_bb (info, pp)
/* BB2: Global type definitions. The name is supposed to be
empty, but we don't check. */
if (! debug_set_filename (info->dhandle, "*global*"))
- return false;
- info->saw_filename = true;
+ return FALSE;
+ info->saw_filename = TRUE;
break;
case 3:
@@ -1057,7 +1021,7 @@ parse_ieee_bb (info, pp)
if (! ieee_read_number (info, pp, &stackspace)
|| ! ieee_read_number (info, pp, &typindx)
|| ! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
/* We have no way to record the stack space. FIXME. */
@@ -1065,13 +1029,13 @@ parse_ieee_bb (info, pp)
{
return_type = ieee_builtin_type (info, block_start, typindx);
if (return_type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
else
{
typindx -= 256;
- if (! ieee_alloc_type (info, typindx, true))
- return false;
+ if (! ieee_alloc_type (info, typindx, TRUE))
+ return FALSE;
fnindx = typindx;
return_type = info->types.types[typindx].type;
if (debug_get_type_kind (info->dhandle, return_type)
@@ -1082,10 +1046,10 @@ parse_ieee_bb (info, pp)
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_record_function (info->dhandle, namcopy, return_type,
- true, offset))
- return false;
+ TRUE, offset))
+ return FALSE;
}
break;
@@ -1098,19 +1062,19 @@ parse_ieee_bb (info, pp)
for (i = 0; i < 6; i++)
{
bfd_vma ignore;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_optional_number (info, pp, &ignore, &present))
- return false;
+ return FALSE;
if (! present)
break;
}
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_start_source (info->dhandle, namcopy))
- return false;
+ return FALSE;
}
break;
@@ -1122,14 +1086,14 @@ parse_ieee_bb (info, pp)
if (! ieee_read_number (info, pp, &stackspace)
|| ! ieee_read_number (info, pp, &typindx)
|| ! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
/* We have no way to record the stack space. FIXME. */
if (namlen == 0)
{
if (! debug_start_block (info->dhandle, offset))
- return false;
+ return FALSE;
/* Change b to indicate that this is a block
rather than a function. */
b = 0x86;
@@ -1142,7 +1106,7 @@ parse_ieee_bb (info, pp)
converting from IEEE to other debug formats work
better. */
if (strncmp (name, "__XRYCPP", namlen) == 0)
- skip = true;
+ skip = TRUE;
else
{
debug_type return_type;
@@ -1152,13 +1116,13 @@ parse_ieee_bb (info, pp)
return_type = ieee_builtin_type (info, block_start,
typindx);
if (return_type == NULL)
- return false;
+ return FALSE;
}
else
{
typindx -= 256;
- if (! ieee_alloc_type (info, typindx, true))
- return false;
+ if (! ieee_alloc_type (info, typindx, TRUE))
+ return FALSE;
fnindx = typindx;
return_type = info->types.types[typindx].type;
if (debug_get_type_kind (info->dhandle, return_type)
@@ -1169,10 +1133,10 @@ parse_ieee_bb (info, pp)
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_record_function (info->dhandle, namcopy,
- return_type, false, offset))
- return false;
+ return_type, FALSE, offset))
+ return FALSE;
}
}
}
@@ -1185,29 +1149,29 @@ parse_ieee_bb (info, pp)
const char *inam, *vstr;
unsigned long inamlen, vstrlen;
bfd_vma tool_type;
- boolean present;
+ bfd_boolean present;
unsigned int i;
if (! info->saw_filename)
{
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_set_filename (info->dhandle, namcopy))
- return false;
- info->saw_filename = true;
+ return FALSE;
+ info->saw_filename = TRUE;
}
if (! ieee_read_id (info, pp, &inam, &inamlen)
|| ! ieee_read_number (info, pp, &tool_type)
|| ! ieee_read_optional_id (info, pp, &vstr, &vstrlen, &present))
- return false;
+ return FALSE;
for (i = 0; i < 6; i++)
{
bfd_vma ignore;
if (! ieee_read_optional_number (info, pp, &ignore, &present))
- return false;
+ return FALSE;
if (! present)
break;
}
@@ -1219,19 +1183,19 @@ parse_ieee_bb (info, pp)
information. FIXME. */
{
bfd_vma sectype, secindx, offset, map;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_number (info, pp, &sectype)
|| ! ieee_read_number (info, pp, &secindx)
|| ! ieee_read_expression (info, pp, &offset)
|| ! ieee_read_optional_number (info, pp, &map, &present))
- return false;
+ return FALSE;
}
break;
default:
ieee_error (info, block_start, _("unknown BB type"));
- return false;
+ return FALSE;
}
@@ -1240,7 +1204,7 @@ parse_ieee_bb (info, pp)
if (info->blockstack.bsp >= info->blockstack.stack + BLOCKSTACK_SIZE)
{
ieee_error (info, (const bfd_byte *) NULL, _("stack overflow"));
- return false;
+ return FALSE;
}
info->blockstack.bsp->kind = b;
@@ -1250,29 +1214,27 @@ parse_ieee_bb (info, pp)
info->blockstack.bsp->skip = skip;
++info->blockstack.bsp;
- return true;
+ return TRUE;
}
/* Handle an IEEE BE record. */
-static boolean
-parse_ieee_be (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+static bfd_boolean
+parse_ieee_be (struct ieee_info *info, const bfd_byte **pp)
{
bfd_vma offset;
if (info->blockstack.bsp <= info->blockstack.stack)
{
ieee_error (info, *pp, _("stack underflow"));
- return false;
+ return FALSE;
}
--info->blockstack.bsp;
switch (info->blockstack.bsp->kind)
{
case 2:
- /* When we end the global typedefs block, we copy out the the
+ /* When we end the global typedefs block, we copy out the
contents of info->vars. This is because the variable indices
may be reused in the local blocks. However, we need to
preserve them so that we can locate a function returning a
@@ -1305,11 +1267,11 @@ parse_ieee_be (info, pp)
case 4:
case 6:
if (! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
if (! info->blockstack.bsp->skip)
{
if (! debug_end_function (info->dhandle, offset + 1))
- return false;
+ return FALSE;
}
break;
@@ -1317,9 +1279,9 @@ parse_ieee_be (info, pp)
/* This is BE6 when BB6 started a block rather than a local
function. */
if (! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
if (! debug_end_block (info->dhandle, offset + 1))
- return false;
+ return FALSE;
break;
case 5:
@@ -1336,7 +1298,7 @@ parse_ieee_be (info, pp)
if (bl->kind == 5)
{
if (! debug_start_source (info->dhandle, bl->filename))
- return false;
+ return FALSE;
break;
}
}
@@ -1346,7 +1308,7 @@ parse_ieee_be (info, pp)
case 11:
if (! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
/* We just ignore the module size. FIXME. */
break;
@@ -1355,15 +1317,13 @@ parse_ieee_be (info, pp)
break;
}
- return true;
+ return TRUE;
}
/* Parse an NN record. */
-static boolean
-parse_ieee_nn (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+static bfd_boolean
+parse_ieee_nn (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *nn_start;
bfd_vma varindx;
@@ -1374,12 +1334,12 @@ parse_ieee_nn (info, pp)
if (! ieee_read_number (info, pp, &varindx)
|| ! ieee_read_id (info, pp, &name, &namlen))
- return false;
+ return FALSE;
if (varindx < 32)
{
ieee_error (info, nn_start, _("illegal variable index"));
- return false;
+ return FALSE;
}
varindx -= 32;
@@ -1403,20 +1363,18 @@ parse_ieee_nn (info, pp)
info->vars.vars[varindx].name = name;
info->vars.vars[varindx].namlen = namlen;
- return true;
+ return TRUE;
}
/* Parse a TY record. */
-static boolean
-parse_ieee_ty (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+static bfd_boolean
+parse_ieee_ty (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *ty_start, *ty_var_start, *ty_code_start;
bfd_vma typeindx, varindx, tc;
- PTR dhandle;
- boolean tag, typdef;
+ void *dhandle;
+ bfd_boolean tag, typdef;
debug_type *arg_slots;
unsigned long type_bitsize;
debug_type type;
@@ -1424,59 +1382,59 @@ parse_ieee_ty (info, pp)
ty_start = *pp;
if (! ieee_read_number (info, pp, &typeindx))
- return false;
+ return FALSE;
if (typeindx < 256)
{
ieee_error (info, ty_start, _("illegal type index"));
- return false;
+ return FALSE;
}
typeindx -= 256;
- if (! ieee_alloc_type (info, typeindx, false))
- return false;
+ if (! ieee_alloc_type (info, typeindx, FALSE))
+ return FALSE;
if (**pp != 0xce)
{
ieee_error (info, *pp, _("unknown TY code"));
- return false;
+ return FALSE;
}
++*pp;
ty_var_start = *pp;
if (! ieee_read_number (info, pp, &varindx))
- return false;
+ return FALSE;
if (varindx < 32)
{
ieee_error (info, ty_var_start, _("illegal variable index"));
- return false;
+ return FALSE;
}
varindx -= 32;
if (varindx >= info->vars.alloc || info->vars.vars[varindx].name == NULL)
{
ieee_error (info, ty_var_start, _("undefined variable in TY"));
- return false;
+ return FALSE;
}
ty_code_start = *pp;
if (! ieee_read_number (info, pp, &tc))
- return false;
+ return FALSE;
dhandle = info->dhandle;
- tag = false;
- typdef = false;
+ tag = FALSE;
+ typdef = FALSE;
arg_slots = NULL;
type_bitsize = 0;
switch (tc)
{
default:
ieee_error (info, ty_code_start, _("unknown TY code"));
- return false;
+ return FALSE;
case '!':
/* Unknown type, with size. We treat it as int. FIXME. */
@@ -1484,8 +1442,8 @@ parse_ieee_ty (info, pp)
bfd_vma size;
if (! ieee_read_number (info, pp, &size))
- return false;
- type = debug_make_int_type (dhandle, size, false);
+ return FALSE;
+ type = debug_make_int_type (dhandle, size, FALSE);
}
break;
@@ -1499,14 +1457,14 @@ parse_ieee_ty (info, pp)
if (! ieee_read_type_index (info, pp, &ele_type)
|| ! ieee_read_number (info, pp, &lower)
|| ! ieee_read_number (info, pp, &upper))
- return false;
+ return FALSE;
type = debug_make_array_type (dhandle, ele_type,
ieee_builtin_type (info, ty_code_start,
((unsigned int)
builtin_int)),
(bfd_signed_vma) lower,
(bfd_signed_vma) upper,
- false);
+ FALSE);
}
break;
@@ -1521,7 +1479,7 @@ parse_ieee_ty (info, pp)
unsigned int i;
if (! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
/* FIXME: we ignore the enumeration size. */
alloc = 10;
@@ -1532,10 +1490,10 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
@@ -1548,7 +1506,7 @@ parse_ieee_ty (info, pp)
names[c] = savestring (name, namlen);
if (names[c] == NULL)
- return false;
+ return FALSE;
++c;
}
@@ -1559,7 +1517,7 @@ parse_ieee_ty (info, pp)
vals[i] = i;
type = debug_make_enum_type (dhandle, names, vals);
- tag = true;
+ tag = TRUE;
}
break;
@@ -1572,7 +1530,7 @@ parse_ieee_ty (info, pp)
unsigned int c;
if (! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
alloc = 10;
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
@@ -1581,18 +1539,18 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
debug_type ftype;
bfd_vma bitpos, bitsize;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
if (! ieee_read_type_index (info, pp, &ftype)
|| ! ieee_read_number (info, pp, &bitpos)
|| ! ieee_read_number (info, pp, &bitsize))
- return false;
+ return FALSE;
if (c + 1 >= alloc)
{
@@ -1605,14 +1563,14 @@ parse_ieee_ty (info, pp)
ftype, bitpos, bitsize,
DEBUG_VISIBILITY_PUBLIC);
if (fields[c] == NULL)
- return false;
+ return FALSE;
++c;
}
fields[c] = NULL;
- type = debug_make_struct_type (dhandle, true, size, fields);
- tag = true;
+ type = debug_make_struct_type (dhandle, TRUE, size, fields);
+ tag = TRUE;
}
break;
@@ -1632,15 +1590,15 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
bfd_vma val;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
if (! ieee_read_number (info, pp, &val))
- return false;
+ return FALSE;
/* If the length of the name is zero, then the value is
actually the size of the enum. We ignore this
@@ -1659,7 +1617,7 @@ parse_ieee_ty (info, pp)
names[c] = savestring (name, namlen);
if (names[c] == NULL)
- return false;
+ return FALSE;
vals[c] = (bfd_signed_vma) val;
++c;
}
@@ -1667,7 +1625,7 @@ parse_ieee_ty (info, pp)
names[c] = NULL;
type = debug_make_enum_type (dhandle, names, vals);
- tag = true;
+ tag = TRUE;
}
break;
@@ -1678,7 +1636,7 @@ parse_ieee_ty (info, pp)
debug_type t;
if (! ieee_read_type_index (info, pp, &t))
- return false;
+ return FALSE;
type = debug_make_pointer_type (dhandle, t);
}
break;
@@ -1692,7 +1650,7 @@ parse_ieee_ty (info, pp)
|| ! ieee_read_number (info, pp, &high)
|| ! ieee_read_number (info, pp, &signedp)
|| ! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
type = debug_make_range_type (dhandle,
debug_make_int_type (dhandle, size,
@@ -1711,7 +1669,7 @@ parse_ieee_ty (info, pp)
unsigned int c;
if (! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
alloc = 10;
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
@@ -1720,19 +1678,19 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
bfd_vma tindx;
bfd_vma offset;
debug_type ftype;
bfd_vma bitsize;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
if (! ieee_read_number (info, pp, &tindx)
|| ! ieee_read_number (info, pp, &offset))
- return false;
+ return FALSE;
if (tindx < 256)
{
@@ -1745,8 +1703,8 @@ parse_ieee_ty (info, pp)
struct ieee_type *t;
tindx -= 256;
- if (! ieee_alloc_type (info, tindx, true))
- return false;
+ if (! ieee_alloc_type (info, tindx, TRUE))
+ return FALSE;
t = info->types.types + tindx;
ftype = t->type;
bitsize = t->bitsize;
@@ -1765,22 +1723,22 @@ parse_ieee_ty (info, pp)
ftype, offset, bitsize,
DEBUG_VISIBILITY_PUBLIC);
if (fields[c] == NULL)
- return false;
+ return FALSE;
++c;
}
fields[c] = NULL;
type = debug_make_struct_type (dhandle, tc == 'S', size, fields);
- tag = true;
+ tag = TRUE;
}
break;
case 'T':
/* Typedef. */
if (! ieee_read_type_index (info, pp, &type))
- return false;
- typdef = true;
+ return FALSE;
+ typdef = TRUE;
break;
case 'X':
@@ -1790,7 +1748,7 @@ parse_ieee_ty (info, pp)
bfd_vma attr;
debug_type rtype;
bfd_vma nargs;
- boolean present;
+ bfd_boolean present;
struct ieee_var *pv;
/* FIXME: We ignore the attribute and the argument names. */
@@ -1798,14 +1756,14 @@ parse_ieee_ty (info, pp)
if (! ieee_read_number (info, pp, &attr)
|| ! ieee_read_type_index (info, pp, &rtype)
|| ! ieee_read_number (info, pp, &nargs))
- return false;
+ return FALSE;
do
{
const char *name;
unsigned long namlen;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
}
while (present);
@@ -1824,7 +1782,7 @@ parse_ieee_ty (info, pp)
}
type = debug_make_function_type (dhandle, rtype, (debug_type *) NULL,
- false);
+ FALSE);
}
break;
@@ -1841,13 +1799,13 @@ parse_ieee_ty (info, pp)
if (! ieee_read_type_index (info, pp, &etype)
|| ! ieee_read_number (info, pp, &high))
- return false;
+ return FALSE;
type = debug_make_array_type (dhandle, etype,
ieee_builtin_type (info, ty_code_start,
((unsigned int)
builtin_int)),
- 0, (bfd_signed_vma) high, false);
+ 0, (bfd_signed_vma) high, FALSE);
}
break;
@@ -1860,7 +1818,7 @@ parse_ieee_ty (info, pp)
/* FIXME: I don't know what the name means. */
if (! ieee_read_id (info, pp, &name, &namlen))
- return false;
+ return FALSE;
type = debug_make_complex_type (dhandle, tc == 'c' ? 4 : 8);
}
@@ -1869,35 +1827,35 @@ parse_ieee_ty (info, pp)
case 'f':
/* Pascal file name. FIXME. */
ieee_error (info, ty_code_start, _("Pascal file name not supported"));
- return false;
+ return FALSE;
case 'g':
/* Bitfield type. */
{
bfd_vma signedp, bitsize, dummy;
const bfd_byte *hold;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_number (info, pp, &signedp)
|| ! ieee_read_number (info, pp, &bitsize))
- return false;
+ return FALSE;
/* I think the documentation says that there is a type index,
but some actual files do not have one. */
hold = *pp;
if (! ieee_read_optional_number (info, pp, &dummy, &present))
- return false;
+ return FALSE;
if (! present)
{
/* FIXME: This is just a guess. */
type = debug_make_int_type (dhandle, 4,
- signedp ? false : true);
+ signedp ? FALSE : TRUE);
}
else
{
*pp = hold;
if (! ieee_read_type_index (info, pp, &type))
- return false;
+ return FALSE;
}
type_bitsize = bitsize;
}
@@ -1911,13 +1869,13 @@ parse_ieee_ty (info, pp)
if (! ieee_read_number (info, pp, &kind)
|| ! ieee_read_type_index (info, pp, &t))
- return false;
+ return FALSE;
switch (kind)
{
default:
ieee_error (info, ty_start, _("unsupported qualifier"));
- return false;
+ return FALSE;
case 1:
type = debug_make_const_type (dhandle, t);
@@ -1938,11 +1896,11 @@ parse_ieee_ty (info, pp)
if (! ieee_read_number (info, pp, &size)
|| ! ieee_read_type_index (info, pp, &etype))
- return false;
+ return FALSE;
/* FIXME: We ignore the size. */
- type = debug_make_set_type (dhandle, etype, false);
+ type = debug_make_set_type (dhandle, etype, FALSE);
}
break;
@@ -1953,8 +1911,8 @@ parse_ieee_ty (info, pp)
bfd_vma attr, frame_type, push_mask, nargs, level, father;
debug_type rtype;
debug_type *arg_types;
- boolean varargs;
- boolean present;
+ bfd_boolean varargs;
+ bfd_boolean present;
/* FIXME: We ignore some of this information. */
@@ -1965,11 +1923,11 @@ parse_ieee_ty (info, pp)
|| ! ieee_read_number (info, pp, &push_mask)
|| ! ieee_read_type_index (info, pp, &rtype)
|| ! ieee_read_number (info, pp, &nargs))
- return false;
+ return FALSE;
if (nargs == (bfd_vma) -1)
{
arg_types = NULL;
- varargs = false;
+ varargs = FALSE;
}
else
{
@@ -1979,11 +1937,11 @@ parse_ieee_ty (info, pp)
xmalloc ((nargs + 1) * sizeof *arg_types));
for (i = 0; i < nargs; i++)
if (! ieee_read_type_index (info, pp, arg_types + i))
- return false;
+ return FALSE;
/* If the last type is pointer to void, this is really a
varargs function. */
- varargs = false;
+ varargs = FALSE;
if (nargs > 0)
{
debug_type last;
@@ -1996,7 +1954,7 @@ parse_ieee_ty (info, pp)
== DEBUG_KIND_VOID))
{
--nargs;
- varargs = true;
+ varargs = TRUE;
}
}
@@ -2026,7 +1984,7 @@ parse_ieee_ty (info, pp)
}
if (! ieee_read_number (info, pp, &level)
|| ! ieee_read_optional_number (info, pp, &father, &present))
- return false;
+ return FALSE;
/* We can't distinguish between a global function and a static
function. */
@@ -2052,7 +2010,7 @@ parse_ieee_ty (info, pp)
/* Record the type in the table. */
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
info->vars.vars[varindx].type = type;
@@ -2088,7 +2046,7 @@ parse_ieee_ty (info, pp)
it->type = type;
}
if (type == NULL)
- return false;
+ return FALSE;
}
info->types.types[typeindx].type = type;
@@ -2102,39 +2060,37 @@ parse_ieee_ty (info, pp)
if (info->types.types[typeindx].pslot != NULL)
*info->types.types[typeindx].pslot = type;
- return true;
+ return TRUE;
}
/* Parse an ATN record. */
-static boolean
-parse_ieee_atn (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+static bfd_boolean
+parse_ieee_atn (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *atn_start, *atn_code_start;
bfd_vma varindx;
struct ieee_var *pvar;
debug_type type;
bfd_vma atn_code;
- PTR dhandle;
+ void *dhandle;
bfd_vma v, v2, v3, v4, v5;
const char *name;
unsigned long namlen;
char *namcopy;
- boolean present;
+ bfd_boolean present;
int blocktype;
atn_start = *pp;
if (! ieee_read_number (info, pp, &varindx)
|| ! ieee_read_type_index (info, pp, &type))
- return false;
+ return FALSE;
atn_code_start = *pp;
if (! ieee_read_number (info, pp, &atn_code))
- return false;
+ return FALSE;
if (varindx == 0)
{
@@ -2150,7 +2106,7 @@ parse_ieee_atn (info, pp)
return ieee_read_number (info, pp, &v);
ieee_error (info, atn_start, _("illegal variable index"));
- return false;
+ return FALSE;
}
else
{
@@ -2188,7 +2144,7 @@ parse_ieee_atn (info, pp)
else
{
ieee_error (info, atn_start, _("undefined variable in ATN"));
- return false;
+ return FALSE;
}
}
@@ -2231,12 +2187,12 @@ parse_ieee_atn (info, pp)
{
default:
ieee_error (info, atn_code_start, _("unknown ATN type"));
- return false;
+ return FALSE;
case 1:
/* Automatic variable. */
if (! ieee_read_number (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2247,7 +2203,7 @@ parse_ieee_atn (info, pp)
case 2:
/* Register variable. */
if (! ieee_read_number (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2259,7 +2215,7 @@ parse_ieee_atn (info, pp)
case 3:
/* Static variable. */
if (! ieee_require_asn (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2284,30 +2240,30 @@ parse_ieee_atn (info, pp)
/* External function. We don't currently record these. FIXME. */
if (pvar != NULL)
pvar->kind = IEEE_EXTERNAL;
- return true;
+ return TRUE;
case 5:
/* External variable. We don't currently record these. FIXME. */
if (pvar != NULL)
pvar->kind = IEEE_EXTERNAL;
- return true;
+ return TRUE;
case 7:
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_number (info, pp, &v2)
|| ! ieee_read_optional_number (info, pp, &v3, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v4, &present))
- return false;
+ return FALSE;
}
/* We just ignore the two optional fields in v3 and v4, since
they are not defined. */
if (! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
/* We have no way to record the column number. FIXME. */
@@ -2316,7 +2272,7 @@ parse_ieee_atn (info, pp)
case 8:
/* Global variable. */
if (! ieee_require_asn (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2327,10 +2283,10 @@ parse_ieee_atn (info, pp)
case 9:
/* Variable lifetime information. */
if (! ieee_read_number (info, pp, &v))
- return false;
+ return FALSE;
/* We have no way to record this information. FIXME. */
- return true;
+ return TRUE;
case 10:
/* Locked register. The spec says that there are two required
@@ -2338,7 +2294,7 @@ parse_ieee_atn (info, pp)
one. */
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_optional_number (info, pp, &v2, &present))
- return false;
+ return FALSE;
/* I think this means a variable that is both in a register and
a frame slot. We ignore the frame slot. FIXME. */
@@ -2354,8 +2310,8 @@ parse_ieee_atn (info, pp)
/* Reserved for FORTRAN common. */
ieee_error (info, atn_code_start, _("unsupported ATN11"));
- /* Return true to keep going. */
- return true;
+ /* Return TRUE to keep going. */
+ return TRUE;
case 12:
/* Based variable. */
@@ -2365,15 +2321,15 @@ parse_ieee_atn (info, pp)
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_number (info, pp, &v2)
|| ! ieee_read_optional_number (info, pp, &v3, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v4, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v5, &present))
- return false;
+ return FALSE;
}
}
@@ -2381,33 +2337,33 @@ parse_ieee_atn (info, pp)
ieee_error (info, atn_code_start, _("unsupported ATN12"));
- /* Return true to keep going. */
- return true;
+ /* Return TRUE to keep going. */
+ return TRUE;
case 16:
/* Constant. The description of this that I have is ambiguous,
so I'm not going to try to implement it. */
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_optional_number (info, pp, &v2, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v2, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
}
}
if ((ieee_record_enum_type) **pp == ieee_e2_first_byte_enum)
{
if (! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
case 19:
/* Static variable from assembler. */
@@ -2415,7 +2371,7 @@ parse_ieee_atn (info, pp)
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_optional_number (info, pp, &v2, &present)
|| ! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
/* We don't really handle this correctly. FIXME. */
return debug_record_variable (dhandle, namcopy,
@@ -2432,7 +2388,7 @@ parse_ieee_atn (info, pp)
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_number (info, pp, &v2)
|| ! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (atn_code == 62 && v == 80)
{
@@ -2440,7 +2396,7 @@ parse_ieee_atn (info, pp)
{
ieee_error (info, atn_code_start,
_("unexpected string in C++ misc"));
- return false;
+ return FALSE;
}
return ieee_read_cxx_misc (info, pp, v2);
}
@@ -2453,21 +2409,21 @@ parse_ieee_atn (info, pp)
{
default:
ieee_error (info, *pp, _("bad misc record"));
- return false;
+ return FALSE;
case ieee_at_record_enum:
if (! ieee_require_atn65 (info, pp, &name, &namlen))
- return false;
+ return FALSE;
break;
case ieee_e2_first_byte_enum:
if (! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
break;
}
}
- return true;
+ return TRUE;
}
/*NOTREACHED*/
@@ -2476,11 +2432,9 @@ parse_ieee_atn (info, pp)
/* Handle C++ debugging miscellaneous records. This is called for
procedure miscellaneous records of type 80. */
-static boolean
-ieee_read_cxx_misc (info, pp, count)
- struct ieee_info *info;
- const bfd_byte **pp;
- unsigned long count;
+static bfd_boolean
+ieee_read_cxx_misc (struct ieee_info *info, const bfd_byte **pp,
+ unsigned long count)
{
const bfd_byte *start;
bfd_vma category;
@@ -2489,18 +2443,18 @@ ieee_read_cxx_misc (info, pp, count)
/* Get the category of C++ misc record. */
if (! ieee_require_asn (info, pp, &category))
- return false;
+ return FALSE;
--count;
switch (category)
{
default:
ieee_error (info, start, _("unrecognized C++ misc record"));
- return false;
+ return FALSE;
case 'T':
if (! ieee_read_cxx_class (info, pp, count))
- return false;
+ return FALSE;
break;
case 'M':
@@ -2514,12 +2468,12 @@ ieee_read_cxx_misc (info, pp, count)
function. */
if (! ieee_require_asn (info, pp, &flags))
- return false;
+ return FALSE;
if (*pp < info->pend
&& (ieee_record_enum_type) **pp == ieee_at_record_enum)
{
if (! ieee_require_atn65 (info, pp, &name, &namlen))
- return false;
+ return FALSE;
}
/* This is emitted for method functions, but I don't think we
@@ -2531,7 +2485,7 @@ ieee_read_cxx_misc (info, pp, count)
case 'B':
if (! ieee_read_cxx_defaults (info, pp, count))
- return false;
+ return FALSE;
break;
case 'z':
@@ -2546,7 +2500,7 @@ ieee_read_cxx_misc (info, pp, count)
|| ! ieee_require_atn65 (info, pp, &mangled, &mangledlen)
|| ! ieee_require_atn65 (info, pp, &class, &classlen)
|| ! ieee_require_asn (info, pp, &control))
- return false;
+ return FALSE;
/* FIXME: We should now track down name and change its type. */
}
@@ -2554,28 +2508,26 @@ ieee_read_cxx_misc (info, pp, count)
case 'R':
if (! ieee_read_reference (info, pp))
- return false;
+ return FALSE;
break;
}
- return true;
+ return TRUE;
}
/* Read a C++ class definition. This is a pmisc type 80 record of
category 'T'. */
-static boolean
-ieee_read_cxx_class (info, pp, count)
- struct ieee_info *info;
- const bfd_byte **pp;
- unsigned long count;
+static bfd_boolean
+ieee_read_cxx_class (struct ieee_info *info, const bfd_byte **pp,
+ unsigned long count)
{
const bfd_byte *start;
bfd_vma class;
const char *tag;
unsigned long taglen;
struct ieee_tag *it;
- PTR dhandle;
+ void *dhandle;
debug_field *fields;
unsigned int field_count, field_alloc;
debug_baseclass *baseclasses;
@@ -2591,17 +2543,17 @@ ieee_read_cxx_class (info, pp, count)
} *methods;
unsigned int methods_count, methods_alloc;
debug_type vptrbase;
- boolean ownvptr;
+ bfd_boolean ownvptr;
debug_method *dmethods;
start = *pp;
if (! ieee_require_asn (info, pp, &class))
- return false;
+ return FALSE;
--count;
if (! ieee_require_atn65 (info, pp, &tag, &taglen))
- return false;
+ return FALSE;
--count;
/* Find the C struct with this name. */
@@ -2613,7 +2565,7 @@ ieee_read_cxx_class (info, pp, count)
if (it == NULL)
{
ieee_error (info, start, _("undefined C++ object"));
- return false;
+ return FALSE;
}
dhandle = info->dhandle;
@@ -2628,7 +2580,7 @@ ieee_read_cxx_class (info, pp, count)
methods_count = 0;
methods_alloc = 0;
vptrbase = DEBUG_TYPE_NULL;
- ownvptr = false;
+ ownvptr = FALSE;
structfields = debug_get_fields (dhandle, it->type);
@@ -2640,14 +2592,14 @@ ieee_read_cxx_class (info, pp, count)
spec_start = *pp;
if (! ieee_require_asn (info, pp, &id))
- return false;
+ return FALSE;
--count;
switch (id)
{
default:
ieee_error (info, spec_start, _("unrecognized C++ object spec"));
- return false;
+ return FALSE;
case 'b':
{
@@ -2657,7 +2609,7 @@ ieee_read_cxx_class (info, pp, count)
char *basecopy;
debug_type basetype;
bfd_vma bitpos;
- boolean virtualp;
+ bfd_boolean virtualp;
enum debug_visibility visibility;
debug_baseclass baseclass;
@@ -2667,7 +2619,7 @@ ieee_read_cxx_class (info, pp, count)
|| ! ieee_require_atn65 (info, pp, &basename, &baselen)
|| ! ieee_require_asn (info, pp, &cinline)
|| ! ieee_require_atn65 (info, pp, &fieldname, &fieldlen))
- return false;
+ return FALSE;
count -= 4;
/* We have no way of recording friend information, so we
@@ -2683,7 +2635,7 @@ ieee_read_cxx_class (info, pp, count)
if ((fieldlen == 0) == (cinline == 0))
{
ieee_error (info, start, _("unsupported C++ object type"));
- return false;
+ return FALSE;
}
basecopy = savestring (basename, baselen);
@@ -2693,7 +2645,7 @@ ieee_read_cxx_class (info, pp, count)
if (basetype == DEBUG_TYPE_NULL)
{
ieee_error (info, start, _("C++ base class not defined"));
- return false;
+ return FALSE;
}
if (fieldlen == 0)
@@ -2705,7 +2657,7 @@ ieee_read_cxx_class (info, pp, count)
if (structfields == NULL)
{
ieee_error (info, start, _("C++ object has no fields"));
- return false;
+ return FALSE;
}
for (pf = structfields; *pf != DEBUG_FIELD_NULL; pf++)
@@ -2714,7 +2666,7 @@ ieee_read_cxx_class (info, pp, count)
fname = debug_get_field_name (dhandle, *pf);
if (fname == NULL)
- return false;
+ return FALSE;
if (fname[0] == fieldname[0]
&& strncmp (fname, fieldname, fieldlen) == 0
&& strlen (fname) == fieldlen)
@@ -2724,16 +2676,16 @@ ieee_read_cxx_class (info, pp, count)
{
ieee_error (info, start,
_("C++ base class not found in container"));
- return false;
+ return FALSE;
}
bitpos = debug_get_field_bitpos (dhandle, *pf);
}
if ((flags & BASEFLAGS_VIRTUAL) != 0)
- virtualp = true;
+ virtualp = TRUE;
else
- virtualp = false;
+ virtualp = FALSE;
if ((flags & BASEFLAGS_PRIVATE) != 0)
visibility = DEBUG_VISIBILITY_PRIVATE;
else
@@ -2742,7 +2694,7 @@ ieee_read_cxx_class (info, pp, count)
baseclass = debug_make_baseclass (dhandle, basetype, bitpos,
virtualp, visibility);
if (baseclass == DEBUG_BASECLASS_NULL)
- return false;
+ return FALSE;
if (baseclasses_count + 1 >= baseclasses_alloc)
{
@@ -2765,7 +2717,7 @@ ieee_read_cxx_class (info, pp, count)
const char *fieldname, *mangledname;
unsigned long fieldlen, mangledlen;
char *fieldcopy;
- boolean staticp;
+ bfd_boolean staticp;
debug_type ftype;
const debug_field *pf = NULL;
enum debug_visibility visibility;
@@ -2776,12 +2728,12 @@ ieee_read_cxx_class (info, pp, count)
if (! ieee_require_asn (info, pp, &flags)
|| ! ieee_require_atn65 (info, pp, &fieldname, &fieldlen)
|| ! ieee_require_atn65 (info, pp, &mangledname, &mangledlen))
- return false;
+ return FALSE;
count -= 3;
fieldcopy = savestring (fieldname, fieldlen);
- staticp = (flags & CXXFLAGS_STATIC) != 0 ? true : false;
+ staticp = (flags & CXXFLAGS_STATIC) != 0 ? TRUE : FALSE;
if (staticp)
{
@@ -2810,7 +2762,7 @@ ieee_read_cxx_class (info, pp, count)
if (structfields == NULL)
{
ieee_error (info, start, _("C++ object has no fields"));
- return false;
+ return FALSE;
}
for (pf = structfields, findx = 0;
@@ -2821,7 +2773,7 @@ ieee_read_cxx_class (info, pp, count)
fname = debug_get_field_name (dhandle, *pf);
if (fname == NULL)
- return false;
+ return FALSE;
if (fname[0] == mangledname[0]
&& strncmp (fname, mangledname, mangledlen) == 0
&& strlen (fname) == mangledlen)
@@ -2831,7 +2783,7 @@ ieee_read_cxx_class (info, pp, count)
{
ieee_error (info, start,
_("C++ data member not found in container"));
- return false;
+ return FALSE;
}
ftype = debug_get_field_type (dhandle, *pf);
@@ -2858,7 +2810,7 @@ ieee_read_cxx_class (info, pp, count)
}
if (ftype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
it->fslots[findx] = ftype;
ftype = debug_make_indirect_type (dhandle,
it->fslots + findx,
@@ -2866,13 +2818,13 @@ ieee_read_cxx_class (info, pp, count)
}
}
if (ftype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
switch (flags & CXXFLAGS_VISIBILITY)
{
default:
ieee_error (info, start, _("unknown C++ visibility"));
- return false;
+ return FALSE;
case CXXFLAGS_VISIBILITY_PUBLIC:
visibility = DEBUG_VISIBILITY_PUBLIC;
@@ -2906,14 +2858,14 @@ ieee_read_cxx_class (info, pp, count)
if (bitpos == (bfd_vma) -1 || bitsize == (bfd_vma) -1)
{
ieee_error (info, start, _("bad C++ field bit pos or size"));
- return false;
+ return FALSE;
}
field = debug_make_field (dhandle, fieldcopy, ftype, bitpos,
bitsize, visibility);
}
if (field == DEBUG_FIELD_NULL)
- return false;
+ return FALSE;
if (field_count + 1 >= field_alloc)
{
@@ -2937,7 +2889,7 @@ ieee_read_cxx_class (info, pp, count)
struct ieee_var *pv, *pvend;
debug_type type;
enum debug_visibility visibility;
- boolean constp, volatilep;
+ bfd_boolean constp, volatilep;
char *mangledcopy;
debug_method_variant mv;
struct ieee_method *meth;
@@ -2946,18 +2898,18 @@ ieee_read_cxx_class (info, pp, count)
if (! ieee_require_asn (info, pp, &flags)
|| ! ieee_require_atn65 (info, pp, &name, &namlen)
|| ! ieee_require_atn65 (info, pp, &mangled, &mangledlen))
- return false;
+ return FALSE;
count -= 3;
if (id != 'v')
voffset = 0;
else
{
if (! ieee_require_asn (info, pp, &voffset))
- return false;
+ return FALSE;
--count;
}
if (! ieee_require_asn (info, pp, &control))
- return false;
+ return FALSE;
--count;
/* We just ignore the control information. */
@@ -2985,20 +2937,20 @@ ieee_read_cxx_class (info, pp, count)
ieee_builtin_type (info, start,
(unsigned int) builtin_void),
(debug_type *) NULL,
- false));
+ FALSE));
}
else
{
debug_type return_type;
const debug_type *arg_types;
- boolean varargs;
+ bfd_boolean varargs;
if (debug_get_type_kind (dhandle, pv->type)
!= DEBUG_KIND_FUNCTION)
{
ieee_error (info, start,
_("bad type for C++ method function"));
- return false;
+ return FALSE;
}
return_type = debug_get_return_type (dhandle, pv->type);
@@ -3008,7 +2960,7 @@ ieee_read_cxx_class (info, pp, count)
{
ieee_error (info, start,
_("no type information for C++ method function"));
- return false;
+ return FALSE;
}
type = debug_make_method_type (dhandle, return_type, it->type,
@@ -3016,13 +2968,13 @@ ieee_read_cxx_class (info, pp, count)
varargs);
}
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
switch (flags & CXXFLAGS_VISIBILITY)
{
default:
ieee_error (info, start, _("unknown C++ visibility"));
- return false;
+ return FALSE;
case CXXFLAGS_VISIBILITY_PUBLIC:
visibility = DEBUG_VISIBILITY_PUBLIC;
@@ -3037,8 +2989,8 @@ ieee_read_cxx_class (info, pp, count)
break;
}
- constp = (flags & CXXFLAGS_CONST) != 0 ? true : false;
- volatilep = (flags & CXXFLAGS_VOLATILE) != 0 ? true : false;
+ constp = (flags & CXXFLAGS_CONST) != 0 ? TRUE : FALSE;
+ volatilep = (flags & CXXFLAGS_VOLATILE) != 0 ? TRUE : FALSE;
mangledcopy = savestring (mangled, mangledlen);
@@ -3047,7 +2999,7 @@ ieee_read_cxx_class (info, pp, count)
if (id == 'v')
{
ieee_error (info, start, _("C++ static virtual method"));
- return false;
+ return FALSE;
}
mv = debug_make_static_method_variant (dhandle, mangledcopy,
type, visibility,
@@ -3070,7 +3022,7 @@ ieee_read_cxx_class (info, pp, count)
vcontext);
}
if (mv == DEBUG_METHOD_VARIANT_NULL)
- return false;
+ return FALSE;
for (meth = methods, im = 0; im < methods_count; meth++, im++)
if (meth->namlen == namlen
@@ -3116,7 +3068,7 @@ ieee_read_cxx_class (info, pp, count)
/* We have no way to store this information, so we just
ignore it. */
if (! ieee_require_asn (info, pp, &spec))
- return false;
+ return FALSE;
--count;
if ((spec & 4) != 0)
{
@@ -3126,7 +3078,7 @@ ieee_read_cxx_class (info, pp, count)
if (! ieee_require_atn65 (info, pp, &filename, &filenamlen)
|| ! ieee_require_asn (info, pp, &lineno))
- return false;
+ return FALSE;
count -= 2;
}
else if ((spec & 8) != 0)
@@ -3135,14 +3087,14 @@ ieee_read_cxx_class (info, pp, count)
unsigned long mangledlen;
if (! ieee_require_atn65 (info, pp, &mangled, &mangledlen))
- return false;
+ return FALSE;
--count;
}
else
{
ieee_error (info, start,
_("unrecognized C++ object overhead spec"));
- return false;
+ return FALSE;
}
}
break;
@@ -3159,7 +3111,7 @@ ieee_read_cxx_class (info, pp, count)
|| ! ieee_require_asn (info, pp, &vsize)
|| ! ieee_require_atn65 (info, pp, &basename, &baselen)
|| ! ieee_require_asn (info, pp, &control))
- return false;
+ return FALSE;
count -= 4;
/* We just ignore the control number. We don't care what
@@ -3169,7 +3121,7 @@ ieee_read_cxx_class (info, pp, count)
/* FIXME: We can't handle multiple virtual table pointers. */
if (baselen == 0)
- ownvptr = true;
+ ownvptr = TRUE;
else
{
char *basecopy;
@@ -3181,7 +3133,7 @@ ieee_read_cxx_class (info, pp, count)
if (vptrbase == DEBUG_TYPE_NULL)
{
ieee_error (info, start, _("undefined C++ vtable"));
- return false;
+ return FALSE;
}
}
}
@@ -3208,7 +3160,7 @@ ieee_read_cxx_class (info, pp, count)
dmethods[i] = debug_make_method (dhandle, namcopy,
methods[i].variants);
if (dmethods[i] == DEBUG_METHOD_NULL)
- return false;
+ return FALSE;
}
dmethods[i] = DEBUG_METHOD_NULL;
free (methods);
@@ -3224,18 +3176,16 @@ ieee_read_cxx_class (info, pp, count)
fields, baseclasses, dmethods,
vptrbase, ownvptr);
if (it->slot == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Read C++ default argument value and reference type information. */
-static boolean
-ieee_read_cxx_defaults (info, pp, count)
- struct ieee_info *info;
- const bfd_byte **pp;
- unsigned long count;
+static bfd_boolean
+ieee_read_cxx_defaults (struct ieee_info *info, const bfd_byte **pp,
+ unsigned long count)
{
const bfd_byte *start;
const char *fnname;
@@ -3252,12 +3202,12 @@ ieee_read_cxx_defaults (info, pp, count)
|| info->blockstack.bsp[-1].fnindx == (unsigned int) -1)
{
ieee_error (info, start, _("C++ default values not in a function"));
- return false;
+ return FALSE;
}
if (! ieee_require_atn65 (info, pp, &fnname, &fnlen)
|| ! ieee_require_asn (info, pp, &defcount))
- return false;
+ return FALSE;
count -= 2;
while (defcount-- > 0)
@@ -3267,7 +3217,7 @@ ieee_read_cxx_defaults (info, pp, count)
unsigned long strvallen;
if (! ieee_require_asn (info, pp, &type))
- return false;
+ return FALSE;
--count;
switch (type)
@@ -3279,20 +3229,20 @@ ieee_read_cxx_defaults (info, pp, count)
case 1:
case 2:
if (! ieee_require_asn (info, pp, &val))
- return false;
+ return FALSE;
--count;
break;
case 3:
case 7:
if (! ieee_require_atn65 (info, pp, &strval, &strvallen))
- return false;
+ return FALSE;
--count;
break;
default:
ieee_error (info, start, _("unrecognized C++ default type"));
- return false;
+ return FALSE;
}
/* We have no way to record the default argument values, so we
@@ -3303,7 +3253,7 @@ ieee_read_cxx_defaults (info, pp, count)
reference type. */
if (count > 0)
{
- PTR dhandle;
+ void *dhandle;
debug_type *arg_slots;
dhandle = info->dhandle;
@@ -3314,7 +3264,7 @@ ieee_read_cxx_defaults (info, pp, count)
debug_type target;
if (! ieee_require_asn (info, pp, &indx))
- return false;
+ return FALSE;
/* The index is 1 based. */
--indx;
if (arg_slots == NULL
@@ -3323,25 +3273,23 @@ ieee_read_cxx_defaults (info, pp, count)
!= DEBUG_KIND_POINTER))
{
ieee_error (info, start, _("reference parameter is not a pointer"));
- return false;
+ return FALSE;
}
target = debug_get_target_type (dhandle, arg_slots[indx]);
arg_slots[indx] = debug_make_reference_type (dhandle, target);
if (arg_slots[indx] == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Read a C++ reference definition. */
-static boolean
-ieee_read_reference (info, pp)
- struct ieee_info *info;
- const bfd_byte **pp;
+static bfd_boolean
+ieee_read_reference (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *start;
bfd_vma flags;
@@ -3353,18 +3301,18 @@ ieee_read_reference (info, pp)
start = *pp;
if (! ieee_require_asn (info, pp, &flags))
- return false;
+ return FALSE;
/* Giving the class name before the member name is in an addendum to
the spec. */
if (flags == 3)
{
if (! ieee_require_atn65 (info, pp, &class, &classlen))
- return false;
+ return FALSE;
}
if (! ieee_require_atn65 (info, pp, &name, &namlen))
- return false;
+ return FALSE;
pslot = NULL;
if (flags != 3)
@@ -3393,7 +3341,7 @@ ieee_read_reference (info, pp)
for (i = (int) vars->alloc - 1; i >= 0; i--)
{
- boolean found;
+ bfd_boolean found;
pv = vars->vars + i;
@@ -3402,33 +3350,33 @@ ieee_read_reference (info, pp)
|| strncmp (pv->name, name, namlen) != 0)
continue;
- found = false;
+ found = FALSE;
switch (flags)
{
default:
ieee_error (info, start,
_("unrecognized C++ reference type"));
- return false;
+ return FALSE;
case 0:
/* Global variable or function. */
if (pv->kind == IEEE_GLOBAL
|| pv->kind == IEEE_EXTERNAL
|| pv->kind == IEEE_FUNCTION)
- found = true;
+ found = TRUE;
break;
case 1:
/* Global static variable or function. */
if (pv->kind == IEEE_STATIC
|| pv->kind == IEEE_FUNCTION)
- found = true;
+ found = TRUE;
break;
case 2:
/* Local variable. */
if (pv->kind == IEEE_LOCAL)
- found = true;
+ found = TRUE;
break;
}
@@ -3463,7 +3411,7 @@ ieee_read_reference (info, pp)
{
ieee_error (info, start,
"C++ reference in class with no fields");
- return false;
+ return FALSE;
}
for (findx = 0; *pf != DEBUG_FIELD_NULL; pf++, findx++)
@@ -3472,7 +3420,7 @@ ieee_read_reference (info, pp)
fname = debug_get_field_name (info->dhandle, *pf);
if (fname == NULL)
- return false;
+ return FALSE;
if (strncmp (fname, name, namlen) == 0
&& strlen (fname) == namlen)
{
@@ -3490,7 +3438,7 @@ ieee_read_reference (info, pp)
if (pslot == NULL)
{
ieee_error (info, start, _("C++ reference not found"));
- return false;
+ return FALSE;
}
/* We allocated the type of the object as an indirect type pointing
@@ -3498,24 +3446,21 @@ ieee_read_reference (info, pp)
if (debug_get_type_kind (info->dhandle, *pslot) != DEBUG_KIND_POINTER)
{
ieee_error (info, start, _("C++ reference is not pointer"));
- return false;
+ return FALSE;
}
target = debug_get_target_type (info->dhandle, *pslot);
*pslot = debug_make_reference_type (info->dhandle, target);
if (*pslot == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Require an ASN record. */
-static boolean
-ieee_require_asn (info, pp, pv)
- struct ieee_info *info;
- const bfd_byte **pp;
- bfd_vma *pv;
+static bfd_boolean
+ieee_require_asn (struct ieee_info *info, const bfd_byte **pp, bfd_vma *pv)
{
const bfd_byte *start;
ieee_record_enum_type c;
@@ -3527,7 +3472,7 @@ ieee_require_asn (info, pp, pv)
if (c != ieee_e2_first_byte_enum)
{
ieee_error (info, start, _("missing required ASN"));
- return false;
+ return FALSE;
}
++*pp;
@@ -3535,25 +3480,22 @@ ieee_require_asn (info, pp, pv)
if (c != ieee_asn_record_enum)
{
ieee_error (info, start, _("missing required ASN"));
- return false;
+ return FALSE;
}
++*pp;
/* Just ignore the variable index. */
if (! ieee_read_number (info, pp, &varindx))
- return false;
+ return FALSE;
return ieee_read_expression (info, pp, pv);
}
/* Require an ATN65 record. */
-static boolean
-ieee_require_atn65 (info, pp, pname, pnamlen)
- struct ieee_info *info;
- const bfd_byte **pp;
- const char **pname;
- unsigned long *pnamlen;
+static bfd_boolean
+ieee_require_atn65 (struct ieee_info *info, const bfd_byte **pp,
+ const char **pname, unsigned long *pnamlen)
{
const bfd_byte *start;
ieee_record_enum_type c;
@@ -3565,7 +3507,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
if (c != ieee_at_record_enum)
{
ieee_error (info, start, _("missing required ATN65"));
- return false;
+ return FALSE;
}
++*pp;
@@ -3573,21 +3515,21 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
if (c != ieee_atn_record_enum)
{
ieee_error (info, start, _("missing required ATN65"));
- return false;
+ return FALSE;
}
++*pp;
if (! ieee_read_number (info, pp, &name_indx)
|| ! ieee_read_number (info, pp, &type_indx)
|| ! ieee_read_number (info, pp, &atn_code))
- return false;
+ return FALSE;
/* Just ignore name_indx. */
if (type_indx != 0 || atn_code != 65)
{
ieee_error (info, start, _("bad ATN65 record"));
- return false;
+ return FALSE;
}
return ieee_read_id (info, pp, pname, pnamlen);
@@ -3597,9 +3539,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
generic register number. */
static int
-ieee_regno_to_genreg (abfd, r)
- bfd *abfd;
- int r;
+ieee_regno_to_genreg (bfd *abfd, int r)
{
switch (bfd_get_arch (abfd))
{
@@ -3626,9 +3566,7 @@ ieee_regno_to_genreg (abfd, r)
/* Convert a generic register number to an IEEE specific one. */
static int
-ieee_genreg_to_regno (abfd, r)
- bfd *abfd;
- int r;
+ieee_genreg_to_regno (bfd *abfd, int r)
{
switch (bfd_get_arch (abfd))
{
@@ -3709,7 +3647,7 @@ struct ieee_type_class
class. */
const char *vclass;
/* Whether this class holds its own virtual table. */
- boolean ownvptr;
+ bfd_boolean ownvptr;
/* The largest virtual table offset seen so far. */
bfd_vma voffset;
/* The current method. */
@@ -3800,7 +3738,7 @@ struct ieee_defined_enum
/* Type index. */
unsigned int indx;
/* Whether this enum has been defined. */
- boolean defined;
+ bfd_boolean defined;
/* Tag. */
const char *tag;
/* Names. */
@@ -3852,7 +3790,7 @@ struct ieee_pending_parm
/* Type index. */
unsigned int type;
/* Whether the type is a reference. */
- boolean referencep;
+ bfd_boolean referencep;
/* Kind. */
enum debug_parm_kind kind;
/* Value. */
@@ -3867,7 +3805,7 @@ struct ieee_handle
bfd *abfd;
/* Whether we got an error in a subroutine called via traverse or
map_over_sections. */
- boolean error;
+ bfd_boolean error;
/* Current data buffer list. */
struct ieee_buflist *current;
/* Current data buffer. */
@@ -3945,112 +3883,109 @@ struct ieee_handle
bfd_vma highaddr;
};
-static boolean ieee_init_buffer
- PARAMS ((struct ieee_handle *, struct ieee_buflist *));
-static boolean ieee_change_buffer
- PARAMS ((struct ieee_handle *, struct ieee_buflist *));
-static boolean ieee_append_buffer
- PARAMS ((struct ieee_handle *, struct ieee_buflist *,
- struct ieee_buflist *));
-static boolean ieee_real_write_byte PARAMS ((struct ieee_handle *, int));
-static boolean ieee_write_2bytes PARAMS ((struct ieee_handle *, int));
-static boolean ieee_write_number PARAMS ((struct ieee_handle *, bfd_vma));
-static boolean ieee_write_id PARAMS ((struct ieee_handle *, const char *));
-static boolean ieee_write_asn
- PARAMS ((struct ieee_handle *, unsigned int, bfd_vma));
-static boolean ieee_write_atn65
- PARAMS ((struct ieee_handle *, unsigned int, const char *));
-static boolean ieee_push_type
- PARAMS ((struct ieee_handle *, unsigned int, unsigned int, boolean,
- boolean));
-static unsigned int ieee_pop_type PARAMS ((struct ieee_handle *));
-static void ieee_pop_unused_type PARAMS ((struct ieee_handle *));
-static unsigned int ieee_pop_type_used
- PARAMS ((struct ieee_handle *, boolean));
-static boolean ieee_add_range
- PARAMS ((struct ieee_handle *, boolean, bfd_vma, bfd_vma));
-static boolean ieee_start_range PARAMS ((struct ieee_handle *, bfd_vma));
-static boolean ieee_end_range PARAMS ((struct ieee_handle *, bfd_vma));
-static boolean ieee_define_type
- PARAMS ((struct ieee_handle *, unsigned int, boolean, boolean));
-static boolean ieee_define_named_type
- PARAMS ((struct ieee_handle *, const char *, unsigned int, unsigned int,
- boolean, boolean, struct ieee_buflist *));
+static bfd_boolean ieee_init_buffer
+ (struct ieee_handle *, struct ieee_buflist *);
+static bfd_boolean ieee_change_buffer
+ (struct ieee_handle *, struct ieee_buflist *);
+static bfd_boolean ieee_append_buffer
+ (struct ieee_handle *, struct ieee_buflist *, struct ieee_buflist *);
+static bfd_boolean ieee_real_write_byte (struct ieee_handle *, int);
+static bfd_boolean ieee_write_2bytes (struct ieee_handle *, int);
+static bfd_boolean ieee_write_number (struct ieee_handle *, bfd_vma);
+static bfd_boolean ieee_write_id (struct ieee_handle *, const char *);
+static bfd_boolean ieee_write_asn
+ (struct ieee_handle *, unsigned int, bfd_vma);
+static bfd_boolean ieee_write_atn65
+ (struct ieee_handle *, unsigned int, const char *);
+static bfd_boolean ieee_push_type
+ (struct ieee_handle *, unsigned int, unsigned int, bfd_boolean,
+ bfd_boolean);
+static unsigned int ieee_pop_type (struct ieee_handle *);
+static void ieee_pop_unused_type (struct ieee_handle *);
+static unsigned int ieee_pop_type_used (struct ieee_handle *, bfd_boolean);
+static bfd_boolean ieee_add_range
+ (struct ieee_handle *, bfd_boolean, bfd_vma, bfd_vma);
+static bfd_boolean ieee_start_range (struct ieee_handle *, bfd_vma);
+static bfd_boolean ieee_end_range (struct ieee_handle *, bfd_vma);
+static bfd_boolean ieee_define_type
+ (struct ieee_handle *, unsigned int, bfd_boolean, bfd_boolean);
+static bfd_boolean ieee_define_named_type
+ (struct ieee_handle *, const char *, unsigned int, unsigned int,
+ bfd_boolean, bfd_boolean, struct ieee_buflist *);
static struct ieee_modified_type *ieee_get_modified_info
- PARAMS ((struct ieee_handle *, unsigned int));
+ (struct ieee_handle *, unsigned int);
static struct bfd_hash_entry *ieee_name_type_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static boolean ieee_write_undefined_tag
- PARAMS ((struct ieee_name_type_hash_entry *, PTR));
-static boolean ieee_finish_compilation_unit PARAMS ((struct ieee_handle *));
-static void ieee_add_bb11_blocks PARAMS ((bfd *, asection *, PTR));
-static boolean ieee_add_bb11
- PARAMS ((struct ieee_handle *, asection *, bfd_vma, bfd_vma));
-static boolean ieee_output_pending_parms PARAMS ((struct ieee_handle *));
-static unsigned int ieee_vis_to_flags PARAMS ((enum debug_visibility));
-static boolean ieee_class_method_var
- PARAMS ((struct ieee_handle *, const char *, enum debug_visibility, boolean,
- boolean, boolean, bfd_vma, boolean));
-
-static boolean ieee_start_compilation_unit PARAMS ((PTR, const char *));
-static boolean ieee_start_source PARAMS ((PTR, const char *));
-static boolean ieee_empty_type PARAMS ((PTR));
-static boolean ieee_void_type PARAMS ((PTR));
-static boolean ieee_int_type PARAMS ((PTR, unsigned int, boolean));
-static boolean ieee_float_type PARAMS ((PTR, unsigned int));
-static boolean ieee_complex_type PARAMS ((PTR, unsigned int));
-static boolean ieee_bool_type PARAMS ((PTR, unsigned int));
-static boolean ieee_enum_type
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static boolean ieee_pointer_type PARAMS ((PTR));
-static boolean ieee_function_type PARAMS ((PTR, int, boolean));
-static boolean ieee_reference_type PARAMS ((PTR));
-static boolean ieee_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-static boolean ieee_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, boolean));
-static boolean ieee_set_type PARAMS ((PTR, boolean));
-static boolean ieee_offset_type PARAMS ((PTR));
-static boolean ieee_method_type PARAMS ((PTR, boolean, int, boolean));
-static boolean ieee_const_type PARAMS ((PTR));
-static boolean ieee_volatile_type PARAMS ((PTR));
-static boolean ieee_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int));
-static boolean ieee_struct_field
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static boolean ieee_end_struct_type PARAMS ((PTR));
-static boolean ieee_start_class_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int, boolean,
- boolean));
-static boolean ieee_class_static_member
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-static boolean ieee_class_baseclass
- PARAMS ((PTR, bfd_vma, boolean, enum debug_visibility));
-static boolean ieee_class_start_method PARAMS ((PTR, const char *));
-static boolean ieee_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean,
- bfd_vma, boolean));
-static boolean ieee_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean));
-static boolean ieee_class_end_method PARAMS ((PTR));
-static boolean ieee_end_class_type PARAMS ((PTR));
-static boolean ieee_typedef_type PARAMS ((PTR, const char *));
-static boolean ieee_tag_type
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static boolean ieee_typdef PARAMS ((PTR, const char *));
-static boolean ieee_tag PARAMS ((PTR, const char *));
-static boolean ieee_int_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean ieee_float_constant PARAMS ((PTR, const char *, double));
-static boolean ieee_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean ieee_variable
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static boolean ieee_start_function PARAMS ((PTR, const char *, boolean));
-static boolean ieee_function_parameter
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static boolean ieee_start_block PARAMS ((PTR, bfd_vma));
-static boolean ieee_end_block PARAMS ((PTR, bfd_vma));
-static boolean ieee_end_function PARAMS ((PTR));
-static boolean ieee_lineno
- PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
+static bfd_boolean ieee_write_undefined_tag
+ (struct ieee_name_type_hash_entry *, void *);
+static bfd_boolean ieee_finish_compilation_unit (struct ieee_handle *);
+static void ieee_add_bb11_blocks (bfd *, asection *, void *);
+static bfd_boolean ieee_add_bb11
+ (struct ieee_handle *, asection *, bfd_vma, bfd_vma);
+static bfd_boolean ieee_output_pending_parms (struct ieee_handle *);
+static unsigned int ieee_vis_to_flags (enum debug_visibility);
+static bfd_boolean ieee_class_method_var
+ (struct ieee_handle *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
+
+static bfd_boolean ieee_start_compilation_unit (void *, const char *);
+static bfd_boolean ieee_start_source (void *, const char *);
+static bfd_boolean ieee_empty_type (void *);
+static bfd_boolean ieee_void_type (void *);
+static bfd_boolean ieee_int_type (void *, unsigned int, bfd_boolean);
+static bfd_boolean ieee_float_type (void *, unsigned int);
+static bfd_boolean ieee_complex_type (void *, unsigned int);
+static bfd_boolean ieee_bool_type (void *, unsigned int);
+static bfd_boolean ieee_enum_type
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean ieee_pointer_type (void *);
+static bfd_boolean ieee_function_type (void *, int, bfd_boolean);
+static bfd_boolean ieee_reference_type (void *);
+static bfd_boolean ieee_range_type (void *, bfd_signed_vma, bfd_signed_vma);
+static bfd_boolean ieee_array_type
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
+static bfd_boolean ieee_set_type (void *, bfd_boolean);
+static bfd_boolean ieee_offset_type (void *);
+static bfd_boolean ieee_method_type (void *, bfd_boolean, int, bfd_boolean);
+static bfd_boolean ieee_const_type (void *);
+static bfd_boolean ieee_volatile_type (void *);
+static bfd_boolean ieee_start_struct_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
+static bfd_boolean ieee_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean ieee_end_struct_type (void *);
+static bfd_boolean ieee_start_class_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean,
+ bfd_boolean);
+static bfd_boolean ieee_class_static_member
+ (void *, const char *, const char *, enum debug_visibility);
+static bfd_boolean ieee_class_baseclass
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean ieee_class_start_method (void *, const char *);
+static bfd_boolean ieee_class_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
+static bfd_boolean ieee_class_static_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean ieee_class_end_method (void *);
+static bfd_boolean ieee_end_class_type (void *);
+static bfd_boolean ieee_typedef_type (void *, const char *);
+static bfd_boolean ieee_tag_type
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean ieee_typdef (void *, const char *);
+static bfd_boolean ieee_tag (void *, const char *);
+static bfd_boolean ieee_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean ieee_float_constant (void *, const char *, double);
+static bfd_boolean ieee_typed_constant (void *, const char *, bfd_vma);
+static bfd_boolean ieee_variable
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean ieee_start_function (void *, const char *, bfd_boolean);
+static bfd_boolean ieee_function_parameter
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean ieee_start_block (void *, bfd_vma);
+static bfd_boolean ieee_end_block (void *, bfd_vma);
+static bfd_boolean ieee_end_function (void *);
+static bfd_boolean ieee_lineno (void *, const char *, unsigned long, bfd_vma);
static const struct debug_write_fns ieee_fns =
{
@@ -4102,14 +4037,13 @@ static const struct debug_write_fns ieee_fns =
/* Initialize a buffer to be empty. */
-static boolean
-ieee_init_buffer (info, buflist)
- struct ieee_handle *info ATTRIBUTE_UNUSED;
- struct ieee_buflist *buflist;
+static bfd_boolean
+ieee_init_buffer (struct ieee_handle *info ATTRIBUTE_UNUSED,
+ struct ieee_buflist *buflist)
{
buflist->head = NULL;
buflist->tail = NULL;
- return true;
+ return TRUE;
}
/* See whether a buffer list has any data. */
@@ -4118,10 +4052,8 @@ ieee_init_buffer (info, buflist)
/* Change the current buffer to a specified buffer chain. */
-static boolean
-ieee_change_buffer (info, buflist)
- struct ieee_handle *info;
- struct ieee_buflist *buflist;
+static bfd_boolean
+ieee_change_buffer (struct ieee_handle *info, struct ieee_buflist *buflist)
{
if (buflist->head == NULL)
{
@@ -4137,16 +4069,15 @@ ieee_change_buffer (info, buflist)
info->current = buflist;
info->curbuf = buflist->tail;
- return true;
+ return TRUE;
}
/* Append a buffer chain. */
-static boolean
-ieee_append_buffer (info, mainbuf, newbuf)
- struct ieee_handle *info ATTRIBUTE_UNUSED;
- struct ieee_buflist *mainbuf;
- struct ieee_buflist *newbuf;
+static bfd_boolean
+ieee_append_buffer (struct ieee_handle *info ATTRIBUTE_UNUSED,
+ struct ieee_buflist *mainbuf,
+ struct ieee_buflist *newbuf)
{
if (newbuf->head != NULL)
{
@@ -4156,7 +4087,7 @@ ieee_append_buffer (info, mainbuf, newbuf)
mainbuf->tail->next = newbuf->head;
mainbuf->tail = newbuf->tail;
}
- return true;
+ return TRUE;
}
/* Write a byte into the buffer. We use a macro for speed and a
@@ -4164,13 +4095,11 @@ ieee_append_buffer (info, mainbuf, newbuf)
#define ieee_write_byte(info, b) \
((info)->curbuf->c < IEEE_BUFSIZE \
- ? ((info)->curbuf->buf[(info)->curbuf->c++] = (b), true) \
+ ? ((info)->curbuf->buf[(info)->curbuf->c++] = (b), TRUE) \
: ieee_real_write_byte ((info), (b)))
-static boolean
-ieee_real_write_byte (info, b)
- struct ieee_handle *info;
- int b;
+static bfd_boolean
+ieee_real_write_byte (struct ieee_handle *info, int b)
{
if (info->curbuf->c >= IEEE_BUFSIZE)
{
@@ -4190,15 +4119,13 @@ ieee_real_write_byte (info, b)
info->curbuf->buf[info->curbuf->c] = b;
++info->curbuf->c;
- return true;
+ return TRUE;
}
/* Write out two bytes. */
-static boolean
-ieee_write_2bytes (info, i)
- struct ieee_handle *info;
- int i;
+static bfd_boolean
+ieee_write_2bytes (struct ieee_handle *info, int i)
{
return (ieee_write_byte (info, i >> 8)
&& ieee_write_byte (info, i & 0xff));
@@ -4206,10 +4133,8 @@ ieee_write_2bytes (info, i)
/* Write out an integer. */
-static boolean
-ieee_write_number (info, v)
- struct ieee_handle *info;
- bfd_vma v;
+static bfd_boolean
+ieee_write_number (struct ieee_handle *info, bfd_vma v)
{
bfd_vma t;
bfd_byte ab[20];
@@ -4234,26 +4159,24 @@ ieee_write_number (info, v)
fprintf (stderr, _("IEEE numeric overflow: 0x"));
fprintf_vma (stderr, v);
fprintf (stderr, "\n");
- return false;
+ return FALSE;
}
if (! ieee_write_byte (info, (int) ieee_number_repeat_start_enum + c))
- return false;
+ return FALSE;
for (; c > 0; --c, ++p)
{
if (! ieee_write_byte (info, *p))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Write out a string. */
-static boolean
-ieee_write_id (info, s)
- struct ieee_handle *info;
- const char *s;
+static bfd_boolean
+ieee_write_id (struct ieee_handle *info, const char *s)
{
unsigned int len;
@@ -4261,40 +4184,37 @@ ieee_write_id (info, s)
if (len <= 0x7f)
{
if (! ieee_write_byte (info, len))
- return false;
+ return FALSE;
}
else if (len <= 0xff)
{
if (! ieee_write_byte (info, (int) ieee_extension_length_1_enum)
|| ! ieee_write_byte (info, len))
- return false;
+ return FALSE;
}
else if (len <= 0xffff)
{
if (! ieee_write_byte (info, (int) ieee_extension_length_2_enum)
|| ! ieee_write_2bytes (info, len))
- return false;
+ return FALSE;
}
else
{
fprintf (stderr, _("IEEE string length overflow: %u\n"), len);
- return false;
+ return FALSE;
}
for (; *s != '\0'; s++)
if (! ieee_write_byte (info, *s))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Write out an ASN record. */
-static boolean
-ieee_write_asn (info, indx, val)
- struct ieee_handle *info;
- unsigned int indx;
- bfd_vma val;
+static bfd_boolean
+ieee_write_asn (struct ieee_handle *info, unsigned int indx, bfd_vma val)
{
return (ieee_write_2bytes (info, (int) ieee_asn_record_enum)
&& ieee_write_number (info, indx)
@@ -4303,11 +4223,8 @@ ieee_write_asn (info, indx, val)
/* Write out an ATN65 record. */
-static boolean
-ieee_write_atn65 (info, indx, s)
- struct ieee_handle *info;
- unsigned int indx;
- const char *s;
+static bfd_boolean
+ieee_write_atn65 (struct ieee_handle *info, unsigned int indx, const char *s)
{
return (ieee_write_2bytes (info, (int) ieee_atn_record_enum)
&& ieee_write_number (info, indx)
@@ -4318,13 +4235,9 @@ ieee_write_atn65 (info, indx, s)
/* Push a type index onto the type stack. */
-static boolean
-ieee_push_type (info, indx, size, unsignedp, localp)
- struct ieee_handle *info;
- unsigned int indx;
- unsigned int size;
- boolean unsignedp;
- boolean localp;
+static bfd_boolean
+ieee_push_type (struct ieee_handle *info, unsigned int indx,
+ unsigned int size, bfd_boolean unsignedp, bfd_boolean localp)
{
struct ieee_type_stack *ts;
@@ -4339,33 +4252,29 @@ ieee_push_type (info, indx, size, unsignedp, localp)
ts->next = info->type_stack;
info->type_stack = ts;
- return true;
+ return TRUE;
}
/* Pop a type index off the type stack. */
static unsigned int
-ieee_pop_type (info)
- struct ieee_handle *info;
+ieee_pop_type (struct ieee_handle *info)
{
- return ieee_pop_type_used (info, true);
+ return ieee_pop_type_used (info, TRUE);
}
/* Pop an unused type index off the type stack. */
static void
-ieee_pop_unused_type (info)
- struct ieee_handle *info;
+ieee_pop_unused_type (struct ieee_handle *info)
{
- (void) ieee_pop_type_used (info, false);
+ (void) ieee_pop_type_used (info, FALSE);
}
/* Pop a used or unused type index off the type stack. */
static unsigned int
-ieee_pop_type_used (info, used)
- struct ieee_handle *info;
- boolean used;
+ieee_pop_type_used (struct ieee_handle *info, bfd_boolean used)
{
struct ieee_type_stack *ts;
unsigned int ret;
@@ -4389,7 +4298,7 @@ ieee_pop_type_used (info, used)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
buflist = &info->types;
}
@@ -4403,13 +4312,13 @@ ieee_pop_type_used (info, used)
|| ! ieee_write_byte (info, 2)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
buflist = &info->global_types;
}
if (! ieee_append_buffer (info, buflist, &ts->type.fndef))
- return false;
+ return FALSE;
}
ret = ts->type.indx;
@@ -4420,17 +4329,14 @@ ieee_pop_type_used (info, used)
/* Add a range of bytes included in the current compilation unit. */
-static boolean
-ieee_add_range (info, global, low, high)
- struct ieee_handle *info;
- boolean global;
- bfd_vma low;
- bfd_vma high;
+static bfd_boolean
+ieee_add_range (struct ieee_handle *info, bfd_boolean global, bfd_vma low,
+ bfd_vma high)
{
struct ieee_range **plist, *r, **pr;
if (low == (bfd_vma) -1 || high == (bfd_vma) -1 || low == high)
- return true;
+ return TRUE;
if (global)
plist = &info->global_ranges;
@@ -4457,7 +4363,7 @@ ieee_add_range (info, global, low, high)
free (*pr);
*pr = n;
}
- return true;
+ return TRUE;
}
}
@@ -4474,15 +4380,13 @@ ieee_add_range (info, global, low, high)
r->next = *pr;
*pr = r;
- return true;
+ return TRUE;
}
/* Start a new range for which we only have the low address. */
-static boolean
-ieee_start_range (info, low)
- struct ieee_handle *info;
- bfd_vma low;
+static bfd_boolean
+ieee_start_range (struct ieee_handle *info, bfd_vma low)
{
struct ieee_range *r;
@@ -4491,15 +4395,13 @@ ieee_start_range (info, low)
r->low = low;
r->next = info->pending_ranges;
info->pending_ranges = r;
- return true;
+ return TRUE;
}
/* Finish a range started by ieee_start_range. */
-static boolean
-ieee_end_range (info, high)
- struct ieee_handle *info;
- bfd_vma high;
+static bfd_boolean
+ieee_end_range (struct ieee_handle *info, bfd_vma high)
{
struct ieee_range *r;
bfd_vma low;
@@ -4509,17 +4411,14 @@ ieee_end_range (info, high)
low = r->low;
info->pending_ranges = r->next;
free (r);
- return ieee_add_range (info, false, low, high);
+ return ieee_add_range (info, FALSE, low, high);
}
/* Start defining a type. */
-static boolean
-ieee_define_type (info, size, unsignedp, localp)
- struct ieee_handle *info;
- unsigned int size;
- boolean unsignedp;
- boolean localp;
+static bfd_boolean
+ieee_define_type (struct ieee_handle *info, unsigned int size,
+ bfd_boolean unsignedp, bfd_boolean localp)
{
return ieee_define_named_type (info, (const char *) NULL,
(unsigned int) -1, size, unsignedp,
@@ -4528,15 +4427,11 @@ ieee_define_type (info, size, unsignedp, localp)
/* Start defining a named type. */
-static boolean
-ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
- struct ieee_handle *info;
- const char *name;
- unsigned int indx;
- unsigned int size;
- boolean unsignedp;
- boolean localp;
- struct ieee_buflist *buflist;
+static bfd_boolean
+ieee_define_named_type (struct ieee_handle *info, const char *name,
+ unsigned int indx, unsigned int size,
+ bfd_boolean unsignedp, bfd_boolean localp,
+ struct ieee_buflist *buflist)
{
unsigned int type_indx;
unsigned int name_indx;
@@ -4561,14 +4456,14 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
if (buflist != NULL)
{
if (! ieee_change_buffer (info, buflist))
- return false;
+ return FALSE;
}
else if (localp)
{
if (! ieee_buffer_emptyp (&info->types))
{
if (! ieee_change_buffer (info, &info->types))
- return false;
+ return FALSE;
}
else
{
@@ -4577,7 +4472,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
}
else
@@ -4585,7 +4480,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
if (! ieee_buffer_emptyp (&info->global_types))
{
if (! ieee_change_buffer (info, &info->global_types))
- return false;
+ return FALSE;
}
else
{
@@ -4594,7 +4489,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
|| ! ieee_write_byte (info, 2)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
}
@@ -4602,7 +4497,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
write out the start of a TY record. The caller will then finish
the TY record. */
if (! ieee_push_type (info, type_indx, size, unsignedp, localp))
- return false;
+ return FALSE;
return (ieee_write_byte (info, (int) ieee_nn_record)
&& ieee_write_number (info, name_indx)
@@ -4616,9 +4511,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
/* Get an entry to the list of modified versions of a type. */
static struct ieee_modified_type *
-ieee_get_modified_info (info, indx)
- struct ieee_handle *info;
- unsigned int indx;
+ieee_get_modified_info (struct ieee_handle *info, unsigned int indx)
{
if (indx >= info->modified_alloc)
{
@@ -4645,10 +4538,8 @@ ieee_get_modified_info (info, indx)
/* Initialize an entry in the hash table. */
static struct bfd_hash_entry *
-ieee_name_type_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+ieee_name_type_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table, const char *string)
{
struct ieee_name_type_hash_entry *ret =
(struct ieee_name_type_hash_entry *) entry;
@@ -4684,15 +4575,13 @@ ieee_name_type_newfunc (entry, table, string)
#define ieee_name_type_hash_traverse(table, func, info) \
(bfd_hash_traverse \
(&(table)->root, \
- (boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_hash_entry *, void *)) (func), \
(info)))
/* The general routine to write out IEEE debugging information. */
-boolean
-write_ieee_debugging_info (abfd, dhandle)
- bfd *abfd;
- PTR dhandle;
+bfd_boolean
+write_ieee_debugging_info (bfd *abfd, void *dhandle)
{
struct ieee_handle info;
asection *s;
@@ -4706,7 +4595,7 @@ write_ieee_debugging_info (abfd, dhandle)
if (! bfd_hash_table_init (&info.typedefs.root, ieee_name_type_newfunc)
|| ! bfd_hash_table_init (&info.tags.root, ieee_name_type_newfunc))
- return false;
+ return FALSE;
if (! ieee_init_buffer (&info, &info.global_types)
|| ! ieee_init_buffer (&info, &info.data)
@@ -4716,24 +4605,24 @@ write_ieee_debugging_info (abfd, dhandle)
|| ! ieee_init_buffer (&info, &info.linenos)
|| ! ieee_init_buffer (&info, &info.fntype)
|| ! ieee_init_buffer (&info, &info.fnargs))
- return false;
+ return FALSE;
- if (! debug_write (dhandle, &ieee_fns, (PTR) &info))
- return false;
+ if (! debug_write (dhandle, &ieee_fns, (void *) &info))
+ return FALSE;
if (info.filename != NULL)
{
if (! ieee_finish_compilation_unit (&info))
- return false;
+ return FALSE;
}
/* Put any undefined tags in the global typedef information. */
- info.error = false;
+ info.error = FALSE;
ieee_name_type_hash_traverse (&info.tags,
ieee_write_undefined_tag,
- (PTR) &info);
+ (void *) &info);
if (info.error)
- return false;
+ return FALSE;
/* Prepend the global typedef information to the other data. */
if (! ieee_buffer_emptyp (&info.global_types))
@@ -4751,29 +4640,29 @@ write_ieee_debugging_info (abfd, dhandle)
|| ! ieee_write_number (&info, 'P')
|| ! ieee_write_number (&info, (int) builtin_void + 32)
|| ! ieee_write_byte (&info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (! ieee_append_buffer (&info, &info.global_types, &info.data))
- return false;
+ return FALSE;
info.data = info.global_types;
}
/* Make sure that we have declare BB11 blocks for each range in the
file. They are added to info->vars. */
- info.error = false;
+ info.error = FALSE;
if (! ieee_init_buffer (&info, &info.vars))
- return false;
- bfd_map_over_sections (abfd, ieee_add_bb11_blocks, (PTR) &info);
+ return FALSE;
+ bfd_map_over_sections (abfd, ieee_add_bb11_blocks, (void *) &info);
if (info.error)
- return false;
+ return FALSE;
if (! ieee_buffer_emptyp (&info.vars))
{
if (! ieee_change_buffer (&info, &info.vars)
|| ! ieee_write_byte (&info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (! ieee_append_buffer (&info, &info.data, &info.vars))
- return false;
+ return FALSE;
}
/* Now all the data is in info.data. Write it out to the BFD. We
@@ -4783,7 +4672,7 @@ write_ieee_debugging_info (abfd, dhandle)
if (ieee_buffer_emptyp (&info.data))
{
/* There is no debugging information. */
- return true;
+ return TRUE;
}
err = NULL;
s = bfd_make_section (abfd, ".debug");
@@ -4824,22 +4713,20 @@ write_ieee_debugging_info (abfd, dhandle)
{
fprintf (stderr, "%s: %s: %s\n", bfd_get_filename (abfd), err,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
bfd_hash_table_free (&info.typedefs.root);
bfd_hash_table_free (&info.tags.root);
- return true;
+ return TRUE;
}
/* Write out information for an undefined tag. This is called via
ieee_name_type_hash_traverse. */
-static boolean
-ieee_write_undefined_tag (h, p)
- struct ieee_name_type_hash_entry *h;
- PTR p;
+static bfd_boolean
+ieee_write_undefined_tag (struct ieee_name_type_hash_entry *h, void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_name_type *nt;
@@ -4860,16 +4747,16 @@ ieee_write_undefined_tag (h, p)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
}
else
{
if (! ieee_change_buffer (info, &info->global_types))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
}
@@ -4883,16 +4770,16 @@ ieee_write_undefined_tag (h, p)
|| ! ieee_write_byte (info, 0xce)
|| ! ieee_write_number (info, name_indx))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
switch (nt->kind)
{
default:
abort ();
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
case DEBUG_KIND_STRUCT:
case DEBUG_KIND_CLASS:
code = 'S';
@@ -4908,20 +4795,18 @@ ieee_write_undefined_tag (h, p)
if (! ieee_write_number (info, code)
|| ! ieee_write_number (info, 0))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Start writing out information for a compilation unit. */
-static boolean
-ieee_start_compilation_unit (p, filename)
- PTR p;
- const char *filename;
+static bfd_boolean
+ieee_start_compilation_unit (void *p, const char *filename)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *modname;
@@ -4934,7 +4819,7 @@ ieee_start_compilation_unit (p, filename)
if (info->filename != NULL)
{
if (! ieee_finish_compilation_unit (info))
- return false;
+ return FALSE;
}
info->filename = filename;
@@ -4965,7 +4850,7 @@ ieee_start_compilation_unit (p, filename)
|| ! ieee_init_buffer (info, &info->vars)
|| ! ieee_init_buffer (info, &info->cxx)
|| ! ieee_init_buffer (info, &info->linenos))
- return false;
+ return FALSE;
info->ranges = NULL;
/* Always include a BB1 and a BB3 block. That is what the output of
@@ -4975,7 +4860,7 @@ ieee_start_compilation_unit (p, filename)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
nindx = info->name_indx;
++info->name_indx;
@@ -4984,16 +4869,15 @@ ieee_start_compilation_unit (p, filename)
|| ! ieee_write_byte (info, 3)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Finish up a compilation unit. */
-static boolean
-ieee_finish_compilation_unit (info)
- struct ieee_handle *info;
+static bfd_boolean
+ieee_finish_compilation_unit (struct ieee_handle *info)
{
struct ieee_range *r;
@@ -5001,7 +4885,7 @@ ieee_finish_compilation_unit (info)
{
if (! ieee_change_buffer (info, &info->types)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
}
if (! ieee_buffer_emptyp (&info->cxx))
@@ -5010,7 +4894,7 @@ ieee_finish_compilation_unit (info)
variable information. */
assert (! ieee_buffer_emptyp (&info->vars));
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
/* We put the pmisc records in a dummy procedure, just as the
MRI compiler does. */
@@ -5025,45 +4909,45 @@ ieee_finish_compilation_unit (info)
|| ! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, info->highaddr - 1))
- return false;
+ return FALSE;
}
if (! ieee_buffer_emptyp (&info->vars))
{
if (! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
}
if (info->pending_lineno_filename != NULL)
{
/* Force out the pending line number. */
- if (! ieee_lineno ((PTR) info, (const char *) NULL, 0, (bfd_vma) -1))
- return false;
+ if (! ieee_lineno ((void *) info, (const char *) NULL, 0, (bfd_vma) -1))
+ return FALSE;
}
if (! ieee_buffer_emptyp (&info->linenos))
{
if (! ieee_change_buffer (info, &info->linenos)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (strcmp (info->filename, info->lineno_filename) != 0)
{
/* We were not in the main file. We just closed the
included line number block, and now we must close the
main line number block. */
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
}
}
if (! ieee_append_buffer (info, &info->data, &info->types)
|| ! ieee_append_buffer (info, &info->data, &info->vars)
|| ! ieee_append_buffer (info, &info->data, &info->linenos))
- return false;
+ return FALSE;
/* Build BB10/BB11 blocks based on the ranges we recorded. */
if (! ieee_change_buffer (info, &info->data))
- return false;
+ return FALSE;
if (! ieee_write_byte (info, (int) ieee_bb_record_enum)
|| ! ieee_write_byte (info, 10)
@@ -5072,7 +4956,7 @@ ieee_finish_compilation_unit (info)
|| ! ieee_write_id (info, "")
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, "GNU objcopy"))
- return false;
+ return FALSE;
for (r = info->ranges; r != NULL; r = r->next)
{
@@ -5125,27 +5009,24 @@ ieee_finish_compilation_unit (info)
|| ! ieee_write_number (info, low)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, high - low))
- return false;
+ return FALSE;
/* Add this range to the list of global ranges. */
- if (! ieee_add_range (info, true, low, high))
- return false;
+ if (! ieee_add_range (info, TRUE, low, high))
+ return FALSE;
}
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Add BB11 blocks describing each range that we have not already
described. */
static void
-ieee_add_bb11_blocks (abfd, sec, data)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- PTR data;
+ieee_add_bb11_blocks (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *data)
{
struct ieee_handle *info = (struct ieee_handle *) data;
bfd_vma low, high;
@@ -5165,7 +5046,7 @@ ieee_add_bb11_blocks (abfd, sec, data)
if (r == NULL || r->low >= high)
{
if (! ieee_add_bb11 (info, sec, low, high))
- info->error = true;
+ info->error = TRUE;
return;
}
@@ -5174,7 +5055,7 @@ ieee_add_bb11_blocks (abfd, sec, data)
{
if (! ieee_add_bb11 (info, sec, low, r->low))
{
- info->error = true;
+ info->error = TRUE;
return;
}
}
@@ -5186,19 +5067,16 @@ ieee_add_bb11_blocks (abfd, sec, data)
/* Add a single BB11 block for a range. We add it to info->vars. */
-static boolean
-ieee_add_bb11 (info, sec, low, high)
- struct ieee_handle *info;
- asection *sec;
- bfd_vma low;
- bfd_vma high;
+static bfd_boolean
+ieee_add_bb11 (struct ieee_handle *info, asection *sec, bfd_vma low,
+ bfd_vma high)
{
int kind;
if (! ieee_buffer_emptyp (&info->vars))
{
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
}
else
{
@@ -5239,7 +5117,7 @@ ieee_add_bb11 (info, sec, low, high)
|| ! ieee_write_id (info, "")
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, "GNU objcopy"))
- return false;
+ return FALSE;
free (c);
}
@@ -5260,9 +5138,9 @@ ieee_add_bb11 (info, sec, low, high)
|| ! ieee_write_number (info, low)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, high - low))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Start recording information from a particular source file. This is
@@ -5271,43 +5149,37 @@ ieee_add_bb11 (info, sec, low, high)
down the file name anyhow. IEEE debugging information doesn't seem
to store this information anywhere. */
-static boolean
-ieee_start_source (p, filename)
- PTR p ATTRIBUTE_UNUSED;
- const char *filename ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_start_source (void *p ATTRIBUTE_UNUSED,
+ const char *filename ATTRIBUTE_UNUSED)
{
- return true;
+ return TRUE;
}
/* Make an empty type. */
-static boolean
-ieee_empty_type (p)
- PTR p;
+static bfd_boolean
+ieee_empty_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_push_type (info, (int) builtin_unknown, 0, false, false);
+ return ieee_push_type (info, (int) builtin_unknown, 0, FALSE, FALSE);
}
/* Make a void type. */
-static boolean
-ieee_void_type (p)
- PTR p;
+static bfd_boolean
+ieee_void_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_push_type (info, (int) builtin_void, 0, false, false);
+ return ieee_push_type (info, (int) builtin_void, 0, FALSE, FALSE);
}
/* Make an integer type. */
-static boolean
-ieee_int_type (p, size, unsignedp)
- PTR p;
- unsigned int size;
- boolean unsignedp;
+static bfd_boolean
+ieee_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int indx;
@@ -5328,21 +5200,19 @@ ieee_int_type (p, size, unsignedp)
break;
default:
fprintf (stderr, _("IEEE unsupported integer type size %u\n"), size);
- return false;
+ return FALSE;
}
if (unsignedp)
++indx;
- return ieee_push_type (info, indx, size, unsignedp, false);
+ return ieee_push_type (info, indx, size, unsignedp, FALSE);
}
/* Make a floating point type. */
-static boolean
-ieee_float_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+ieee_float_type (void *p, unsigned int size)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int indx;
@@ -5364,18 +5234,16 @@ ieee_float_type (p, size)
break;
default:
fprintf (stderr, _("IEEE unsupported float type size %u\n"), size);
- return false;
+ return FALSE;
}
- return ieee_push_type (info, indx, size, false, false);
+ return ieee_push_type (info, indx, size, FALSE, FALSE);
}
/* Make a complex type. */
-static boolean
-ieee_complex_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+ieee_complex_type (void *p, unsigned int size)
{
struct ieee_handle *info = (struct ieee_handle *) p;
char code;
@@ -5385,7 +5253,7 @@ ieee_complex_type (p, size)
case 4:
if (info->complex_float_index != 0)
return ieee_push_type (info, info->complex_float_index, size * 2,
- false, false);
+ FALSE, FALSE);
code = 'c';
break;
case 12:
@@ -5395,55 +5263,50 @@ ieee_complex_type (p, size)
case 8:
if (info->complex_double_index != 0)
return ieee_push_type (info, info->complex_double_index, size * 2,
- false, false);
+ FALSE, FALSE);
code = 'd';
break;
default:
fprintf (stderr, _("IEEE unsupported complex type size %u\n"), size);
- return false;
+ return FALSE;
}
/* FIXME: I don't know what the string is for. */
- if (! ieee_define_type (info, size * 2, false, false)
+ if (! ieee_define_type (info, size * 2, FALSE, FALSE)
|| ! ieee_write_number (info, code)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
if (size == 4)
info->complex_float_index = info->type_stack->type.indx;
else
info->complex_double_index = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a boolean type. IEEE doesn't support these, so we just make
an integer type instead. */
-static boolean
-ieee_bool_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+ieee_bool_type (void *p, unsigned int size)
{
- return ieee_int_type (p, size, true);
+ return ieee_int_type (p, size, TRUE);
}
/* Make an enumeration. */
-static boolean
-ieee_enum_type (p, tag, names, vals)
- PTR p;
- const char *tag;
- const char **names;
- bfd_signed_vma *vals;
+static bfd_boolean
+ieee_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *vals)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_defined_enum *e;
- boolean localp, simple;
+ bfd_boolean localp, simple;
unsigned int indx;
int i = 0;
- localp = false;
+ localp = FALSE;
indx = (unsigned int) -1;
for (e = info->enums; e != NULL; e = e->next)
{
@@ -5485,14 +5348,14 @@ ieee_enum_type (p, tag, names, vals)
&& e->names[i] == NULL))
{
/* We've seen this enum before. */
- return ieee_push_type (info, e->indx, 0, true, false);
+ return ieee_push_type (info, e->indx, 0, TRUE, FALSE);
}
if (tag != NULL)
{
/* We've already seen an enum of the same name, so we must make
sure to output this one locally. */
- localp = true;
+ localp = TRUE;
break;
}
}
@@ -5501,40 +5364,40 @@ ieee_enum_type (p, tag, names, vals)
and always increment by 1, we can use type E. Otherwise we must
use type N. */
- simple = true;
+ simple = TRUE;
if (names != NULL)
{
for (i = 0; names[i] != NULL; i++)
{
if (vals[i] != i)
{
- simple = false;
+ simple = FALSE;
break;
}
}
}
- if (! ieee_define_named_type (info, tag, indx, 0, true, localp,
+ if (! ieee_define_named_type (info, tag, indx, 0, TRUE, localp,
(struct ieee_buflist *) NULL)
|| ! ieee_write_number (info, simple ? 'E' : 'N'))
- return false;
+ return FALSE;
if (simple)
{
/* FIXME: This is supposed to be the enumeration size, but we
don't store that. */
if (! ieee_write_number (info, 4))
- return false;
+ return FALSE;
}
if (names != NULL)
{
for (i = 0; names[i] != NULL; i++)
{
if (! ieee_write_id (info, names[i]))
- return false;
+ return FALSE;
if (! simple)
{
if (! ieee_write_number (info, vals[i]))
- return false;
+ return FALSE;
}
}
}
@@ -5554,20 +5417,19 @@ ieee_enum_type (p, tag, names, vals)
e->names = names;
e->vals = vals;
- e->defined = true;
+ e->defined = TRUE;
}
- return true;
+ return TRUE;
}
/* Make a pointer type. */
-static boolean
-ieee_pointer_type (p)
- PTR p;
+static bfd_boolean
+ieee_pointer_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
+ bfd_boolean localp;
unsigned int indx;
struct ieee_modified_type *m = NULL;
@@ -5577,28 +5439,28 @@ ieee_pointer_type (p)
/* A pointer to a simple builtin type can be obtained by adding 32.
FIXME: Will this be a short pointer, and will that matter? */
if (indx < 32)
- return ieee_push_type (info, indx + 32, 0, true, false);
+ return ieee_push_type (info, indx + 32, 0, TRUE, FALSE);
if (! localp)
{
m = ieee_get_modified_info (p, indx);
if (m == NULL)
- return false;
+ return FALSE;
/* FIXME: The size should depend upon the architecture. */
if (m->pointer > 0)
- return ieee_push_type (info, m->pointer, 4, true, false);
+ return ieee_push_type (info, m->pointer, 4, TRUE, FALSE);
}
- if (! ieee_define_type (info, 4, true, localp)
+ if (! ieee_define_type (info, 4, TRUE, localp)
|| ! ieee_write_number (info, 'P')
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
if (! localp)
m->pointer = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a function type. This will be called for a method, but we
@@ -5606,21 +5468,18 @@ ieee_pointer_type (p)
handle this by defining the type in a private buffer, and only
adding that buffer to the typedef block if we are going to use it. */
-static boolean
-ieee_function_type (p, argcount, varargs)
- PTR p;
- int argcount;
- boolean varargs;
+static bfd_boolean
+ieee_function_type (void *p, int argcount, bfd_boolean varargs)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
+ bfd_boolean localp;
unsigned int *args = NULL;
int i;
unsigned int retindx;
struct ieee_buflist fndef;
struct ieee_modified_type *m;
- localp = false;
+ localp = FALSE;
if (argcount > 0)
{
@@ -5628,15 +5487,15 @@ ieee_function_type (p, argcount, varargs)
for (i = argcount - 1; i >= 0; i--)
{
if (info->type_stack->type.localp)
- localp = true;
+ localp = TRUE;
args[i] = ieee_pop_type (info);
}
}
else if (argcount < 0)
- varargs = false;
+ varargs = FALSE;
if (info->type_stack->type.localp)
- localp = true;
+ localp = TRUE;
retindx = ieee_pop_type (info);
m = NULL;
@@ -5644,17 +5503,17 @@ ieee_function_type (p, argcount, varargs)
{
m = ieee_get_modified_info (p, retindx);
if (m == NULL)
- return false;
+ return FALSE;
if (m->function > 0)
- return ieee_push_type (info, m->function, 0, true, false);
+ return ieee_push_type (info, m->function, 0, TRUE, FALSE);
}
/* An attribute of 0x41 means that the frame and push mask are
unknown. */
if (! ieee_init_buffer (info, &fndef)
|| ! ieee_define_named_type (info, (const char *) NULL,
- (unsigned int) -1, 0, true, localp,
+ (unsigned int) -1, 0, TRUE, localp,
&fndef)
|| ! ieee_write_number (info, 'x')
|| ! ieee_write_number (info, 0x41)
@@ -5662,12 +5521,12 @@ ieee_function_type (p, argcount, varargs)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, retindx)
|| ! ieee_write_number (info, (bfd_vma) argcount + (varargs ? 1 : 0)))
- return false;
+ return FALSE;
if (argcount > 0)
{
for (i = 0; i < argcount; i++)
if (! ieee_write_number (info, args[i]))
- return false;
+ return FALSE;
free (args);
}
if (varargs)
@@ -5675,11 +5534,11 @@ ieee_function_type (p, argcount, varargs)
/* A varargs function is represented by writing out the last
argument as type void *, although this makes little sense. */
if (! ieee_write_number (info, (bfd_vma) builtin_void + 32))
- return false;
+ return FALSE;
}
if (! ieee_write_number (info, 0))
- return false;
+ return FALSE;
/* We wrote the information into fndef, in case we don't need it.
It will be appended to info->types by ieee_pop_type. */
@@ -5688,14 +5547,13 @@ ieee_function_type (p, argcount, varargs)
if (m != NULL)
m->function = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a reference type. */
-static boolean
-ieee_reference_type (p)
- PTR p;
+static bfd_boolean
+ieee_reference_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5703,22 +5561,19 @@ ieee_reference_type (p)
pmisc record to indicate that it is really a reference. */
if (! ieee_pointer_type (p))
- return false;
- info->type_stack->type.referencep = true;
- return true;
+ return FALSE;
+ info->type_stack->type.referencep = TRUE;
+ return TRUE;
}
/* Make a range type. */
-static boolean
-ieee_range_type (p, low, high)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
+static bfd_boolean
+ieee_range_type (void *p, bfd_signed_vma low, bfd_signed_vma high)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp, localp;
+ bfd_boolean unsignedp, localp;
size = info->type_stack->type.size;
unsignedp = info->type_stack->type.unsignedp;
@@ -5734,16 +5589,13 @@ ieee_range_type (p, low, high)
/* Make an array type. */
-static boolean
-ieee_array_type (p, low, high, stringp)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
- boolean stringp ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_array_type (void *p, bfd_signed_vma low, bfd_signed_vma high,
+ bfd_boolean stringp ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
- boolean localp;
+ bfd_boolean localp;
unsigned int size;
struct ieee_modified_type *m = NULL;
struct ieee_modified_array_type *a;
@@ -5763,27 +5615,27 @@ ieee_array_type (p, low, high, stringp)
{
m = ieee_get_modified_info (info, eleindx);
if (m == NULL)
- return false;
+ return FALSE;
for (a = m->arrays; a != NULL; a = a->next)
{
if (a->low == low && a->high == high)
- return ieee_push_type (info, a->indx, size, false, false);
+ return ieee_push_type (info, a->indx, size, FALSE, FALSE);
}
}
- if (! ieee_define_type (info, size, false, localp)
+ if (! ieee_define_type (info, size, FALSE, localp)
|| ! ieee_write_number (info, low == 0 ? 'Z' : 'C')
|| ! ieee_write_number (info, eleindx))
- return false;
+ return FALSE;
if (low != 0)
{
if (! ieee_write_number (info, low))
- return false;
+ return FALSE;
}
if (! ieee_write_number (info, high + 1))
- return false;
+ return FALSE;
if (! localp)
{
@@ -5798,18 +5650,16 @@ ieee_array_type (p, low, high, stringp)
m->arrays = a;
}
- return true;
+ return TRUE;
}
/* Make a set type. */
-static boolean
-ieee_set_type (p, bitstringp)
- PTR p;
- boolean bitstringp ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_set_type (void *p, bfd_boolean bitstringp ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
+ bfd_boolean localp;
unsigned int eleindx;
localp = info->type_stack->type.localp;
@@ -5817,7 +5667,7 @@ ieee_set_type (p, bitstringp)
/* FIXME: We don't know the size, so we just use 4. */
- return (ieee_define_type (info, 0, true, localp)
+ return (ieee_define_type (info, 0, TRUE, localp)
&& ieee_write_number (info, 's')
&& ieee_write_number (info, 4)
&& ieee_write_number (info, eleindx));
@@ -5825,9 +5675,8 @@ ieee_set_type (p, bitstringp)
/* Make an offset type. */
-static boolean
-ieee_offset_type (p)
- PTR p;
+static bfd_boolean
+ieee_offset_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int targetindx, baseindx;
@@ -5842,17 +5691,14 @@ ieee_offset_type (p)
member. Unfortunately, it does not describe the target type,
which seems pretty important. I'm going to punt this for now. */
- return ieee_int_type (p, 4, true);
+ return ieee_int_type (p, 4, TRUE);
}
/* Make a method type. */
-static boolean
-ieee_method_type (p, domain, argcount, varargs)
- PTR p;
- boolean domain;
- int argcount;
- boolean varargs;
+static bfd_boolean
+ieee_method_type (void *p, bfd_boolean domain, int argcount,
+ bfd_boolean varargs)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5868,13 +5714,12 @@ ieee_method_type (p, domain, argcount, varargs)
/* Make a const qualified type. */
-static boolean
-ieee_const_type (p)
- PTR p;
+static bfd_boolean
+ieee_const_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp, localp;
+ bfd_boolean unsignedp, localp;
unsigned int indx;
struct ieee_modified_type *m = NULL;
@@ -5887,34 +5732,33 @@ ieee_const_type (p)
{
m = ieee_get_modified_info (info, indx);
if (m == NULL)
- return false;
+ return FALSE;
if (m->const_qualified > 0)
return ieee_push_type (info, m->const_qualified, size, unsignedp,
- false);
+ FALSE);
}
if (! ieee_define_type (info, size, unsignedp, localp)
|| ! ieee_write_number (info, 'n')
|| ! ieee_write_number (info, 1)
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
if (! localp)
m->const_qualified = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a volatile qualified type. */
-static boolean
-ieee_volatile_type (p)
- PTR p;
+static bfd_boolean
+ieee_volatile_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp, localp;
+ bfd_boolean unsignedp, localp;
unsigned int indx;
struct ieee_modified_type *m = NULL;
@@ -5927,30 +5771,29 @@ ieee_volatile_type (p)
{
m = ieee_get_modified_info (info, indx);
if (m == NULL)
- return false;
+ return FALSE;
if (m->volatile_qualified > 0)
return ieee_push_type (info, m->volatile_qualified, size, unsignedp,
- false);
+ FALSE);
}
if (! ieee_define_type (info, size, unsignedp, localp)
|| ! ieee_write_number (info, 'n')
|| ! ieee_write_number (info, 2)
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
if (! localp)
m->volatile_qualified = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Convert an enum debug_visibility into a CXXFLAGS value. */
static unsigned int
-ieee_vis_to_flags (visibility)
- enum debug_visibility visibility;
+ieee_vis_to_flags (enum debug_visibility visibility)
{
switch (visibility)
{
@@ -5970,25 +5813,21 @@ ieee_vis_to_flags (visibility)
the stack, to avoid confusing type definitions required by the
fields with the struct type itself. */
-static boolean
-ieee_start_struct_type (p, tag, id, structp, size)
- PTR p;
- const char *tag;
- unsigned int id;
- boolean structp;
- unsigned int size;
+static bfd_boolean
+ieee_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp, ignorep;
- boolean copy;
+ bfd_boolean localp, ignorep;
+ bfd_boolean copy;
char ab[20];
const char *look;
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt, *ntlook;
struct ieee_buflist strdef;
- localp = false;
- ignorep = false;
+ localp = FALSE;
+ ignorep = FALSE;
/* We need to create a tag for internal use even if we don't want
one for external use. This will let us refer to an anonymous
@@ -5996,20 +5835,20 @@ ieee_start_struct_type (p, tag, id, structp, size)
if (tag != NULL)
{
look = tag;
- copy = false;
+ copy = FALSE;
}
else
{
sprintf (ab, "__anon%u", id);
look = ab;
- copy = true;
+ copy = TRUE;
}
/* If we already have references to the tag, we must use the
existing type index. */
- h = ieee_name_type_hash_lookup (&info->tags, look, true, copy);
+ h = ieee_name_type_hash_lookup (&info->tags, look, TRUE, copy);
if (h == NULL)
- return false;
+ return FALSE;
nt = NULL;
for (ntlook = h->types; ntlook != NULL; ntlook = ntlook->next)
@@ -6021,7 +5860,7 @@ ieee_start_struct_type (p, tag, id, structp, size)
/* We are creating a duplicate definition of a globally
defined tag. Force it to be local to avoid
confusion. */
- localp = true;
+ localp = TRUE;
}
}
@@ -6032,7 +5871,7 @@ ieee_start_struct_type (p, tag, id, structp, size)
{
/* We've already seen a global definition of the type.
Ignore this new definition. */
- ignorep = true;
+ ignorep = TRUE;
}
}
else
@@ -6050,11 +5889,11 @@ ieee_start_struct_type (p, tag, id, structp, size)
nt->kind = DEBUG_KIND_ILLEGAL;
if (! ieee_init_buffer (info, &strdef)
- || ! ieee_define_named_type (info, tag, nt->type.indx, size, true,
+ || ! ieee_define_named_type (info, tag, nt->type.indx, size, TRUE,
localp, &strdef)
|| ! ieee_write_number (info, structp ? 'S' : 'U')
|| ! ieee_write_number (info, size))
- return false;
+ return FALSE;
if (! ignorep)
{
@@ -6072,24 +5911,20 @@ ieee_start_struct_type (p, tag, id, structp, size)
info->type_stack->type.strdef = strdef;
info->type_stack->type.ignorep = ignorep;
- return true;
+ return TRUE;
}
/* Add a field to a struct. */
-static boolean
-ieee_struct_field (p, name, bitpos, bitsize, visibility)
- PTR p;
- const char *name;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+static bfd_boolean
+ieee_struct_field (void *p, const char *name, bfd_vma bitpos, bfd_vma bitsize,
+ enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp;
- boolean referencep;
- boolean localp;
+ bfd_boolean unsignedp;
+ bfd_boolean referencep;
+ bfd_boolean localp;
unsigned int indx;
bfd_vma offset;
@@ -6102,7 +5937,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
if (info->type_stack->next->type.ignorep)
{
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
size = info->type_stack->type.size;
@@ -6112,7 +5947,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
indx = ieee_pop_type (info);
if (localp)
- info->type_stack->type.localp = true;
+ info->type_stack->type.localp = TRUE;
if (info->type_stack->type.classdef != NULL)
{
@@ -6130,7 +5965,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
|| ! ieee_write_asn (info, nindx, flags)
|| ! ieee_write_atn65 (info, nindx, name)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 4;
if (referencep)
@@ -6160,7 +5995,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
|| ! ieee_write_asn (info, nindx, 3)
|| ! ieee_write_atn65 (info, nindx, info->type_stack->type.name)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
}
}
@@ -6176,7 +6011,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
|| ! ieee_write_number (info, unsignedp ? 0 : 1)
|| ! ieee_write_number (info, bitsize)
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
indx = ieee_pop_type (info);
offset = bitpos;
}
@@ -6191,9 +6026,8 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
/* Finish up a struct type. */
-static boolean
-ieee_end_struct_type (p)
- PTR p;
+static bfd_boolean
+ieee_end_struct_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_buflist *pb;
@@ -6202,13 +6036,13 @@ ieee_end_struct_type (p)
&& ! ieee_buffer_emptyp (&info->type_stack->type.strdef));
/* If we were ignoring this struct definition because it was a
- duplicate defintion, just through away whatever bytes we have
+ duplicate definition, just through away whatever bytes we have
accumulated. Leave the type on the stack. */
if (info->type_stack->type.ignorep)
- return true;
+ return TRUE;
/* If this is not a duplicate definition of this tag, then localp
- will be false, and we can put it in the global type block.
+ will be FALSE, and we can put it in the global type block.
FIXME: We should avoid outputting duplicate definitions which are
the same. */
if (! info->type_stack->type.localp)
@@ -6221,7 +6055,7 @@ ieee_end_struct_type (p)
|| ! ieee_write_byte (info, 2)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
pb = &info->global_types;
}
@@ -6235,7 +6069,7 @@ ieee_end_struct_type (p)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
pb = &info->types;
}
@@ -6243,24 +6077,19 @@ ieee_end_struct_type (p)
/* Append the struct definition to the types. */
if (! ieee_append_buffer (info, pb, &info->type_stack->type.strdef)
|| ! ieee_init_buffer (info, &info->type_stack->type.strdef))
- return false;
+ return FALSE;
/* Leave the struct on the type stack. */
- return true;
+ return TRUE;
}
/* Start a class type. */
-static boolean
-ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
- PTR p;
- const char *tag;
- unsigned int id;
- boolean structp;
- unsigned int size;
- boolean vptr;
- boolean ownvptr;
+static bfd_boolean
+ieee_start_class_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size,
+ bfd_boolean vptr, bfd_boolean ownvptr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *vclass;
@@ -6296,7 +6125,7 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
}
if (! ieee_start_struct_type (p, tag, id, structp, size))
- return false;
+ return FALSE;
indx = info->name_indx;
++info->name_indx;
@@ -6309,7 +6138,7 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
|| ! ieee_write_asn (info, indx, 'T')
|| ! ieee_write_asn (info, indx, structp ? 'o' : 'u')
|| ! ieee_write_atn65 (info, indx, tag))
- return false;
+ return FALSE;
classdef = (struct ieee_type_class *) xmalloc (sizeof *classdef);
memset (classdef, 0, sizeof *classdef);
@@ -6322,17 +6151,14 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
info->type_stack->type.classdef = classdef;
- return true;
+ return TRUE;
}
/* Add a static member to a class. */
-static boolean
-ieee_class_static_member (p, name, physname, visibility)
- PTR p;
- const char *name;
- const char *physname;
- enum debug_visibility visibility;
+static bfd_boolean
+ieee_class_static_member (void *p, const char *name, const char *physname,
+ enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int flags;
@@ -6356,24 +6182,21 @@ ieee_class_static_member (p, name, physname, visibility)
|| ! ieee_write_asn (info, nindx, flags)
|| ! ieee_write_atn65 (info, nindx, name)
|| ! ieee_write_atn65 (info, nindx, physname))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 4;
- return true;
+ return TRUE;
}
/* Add a base class to a class. */
-static boolean
-ieee_class_baseclass (p, bitpos, virtual, visibility)
- PTR p;
- bfd_vma bitpos;
- boolean virtual;
- enum debug_visibility visibility;
+static bfd_boolean
+ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *bname;
- boolean localp;
+ bfd_boolean localp;
unsigned int bindx;
char *fname;
unsigned int flags;
@@ -6403,7 +6226,7 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
else
{
if (localp)
- info->type_stack->type.localp = true;
+ info->type_stack->type.localp = TRUE;
fname = (char *) xmalloc (strlen (bname) + sizeof "_b$");
sprintf (fname, "_b$%s", bname);
@@ -6412,7 +6235,7 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
|| ! ieee_write_id (info, fname)
|| ! ieee_write_number (info, bindx)
|| ! ieee_write_number (info, bitpos / 8))
- return false;
+ return FALSE;
flags = 0;
}
@@ -6427,20 +6250,18 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
|| ! ieee_write_atn65 (info, nindx, bname)
|| ! ieee_write_asn (info, nindx, 0)
|| ! ieee_write_atn65 (info, nindx, fname))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 5;
free (fname);
- return true;
+ return TRUE;
}
/* Start building a method for a class. */
-static boolean
-ieee_class_start_method (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+ieee_class_start_method (void *p, const char *name)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6450,26 +6271,21 @@ ieee_class_start_method (p, name)
info->type_stack->type.classdef->method = name;
- return true;
+ return TRUE;
}
/* Define a new method variant, either static or not. */
-static boolean
-ieee_class_method_var (info, physname, visibility, staticp, constp,
- volatilep, voffset, context)
- struct ieee_handle *info;
- const char *physname;
- enum debug_visibility visibility;
- boolean staticp;
- boolean constp;
- boolean volatilep;
- bfd_vma voffset;
- boolean context;
+static bfd_boolean
+ieee_class_method_var (struct ieee_handle *info, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean staticp, bfd_boolean constp,
+ bfd_boolean volatilep, bfd_vma voffset,
+ bfd_boolean context)
{
unsigned int flags;
unsigned int nindx;
- boolean virtual;
+ bfd_boolean virtual;
/* We don't need the type of the method. An IEEE consumer which
wants the type must track down the function by the physical name
@@ -6508,65 +6324,56 @@ ieee_class_method_var (info, physname, visibility, staticp, constp,
|| ! ieee_write_atn65 (info, nindx,
info->type_stack->type.classdef->method)
|| ! ieee_write_atn65 (info, nindx, physname))
- return false;
+ return FALSE;
if (virtual)
{
if (voffset > info->type_stack->type.classdef->voffset)
info->type_stack->type.classdef->voffset = voffset;
if (! ieee_write_asn (info, nindx, voffset))
- return false;
+ return FALSE;
++info->type_stack->type.classdef->pmisccount;
}
if (! ieee_write_asn (info, nindx, 0))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 5;
- return true;
+ return TRUE;
}
/* Define a new method variant. */
-static boolean
-ieee_class_method_variant (p, physname, visibility, constp, volatilep,
- voffset, context)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
- bfd_vma voffset;
- boolean context;
+static bfd_boolean
+ieee_class_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, bfd_boolean context)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_class_method_var (info, physname, visibility, false, constp,
+ return ieee_class_method_var (info, physname, visibility, FALSE, constp,
volatilep, voffset, context);
}
/* Define a new static method variant. */
-static boolean
-ieee_class_static_method_variant (p, physname, visibility, constp, volatilep)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+static bfd_boolean
+ieee_class_static_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_class_method_var (info, physname, visibility, true, constp,
- volatilep, 0, false);
+ return ieee_class_method_var (info, physname, visibility, TRUE, constp,
+ volatilep, 0, FALSE);
}
/* Finish up a method. */
-static boolean
-ieee_class_end_method (p)
- PTR p;
+static bfd_boolean
+ieee_class_end_method (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6576,14 +6383,13 @@ ieee_class_end_method (p)
info->type_stack->type.classdef->method = NULL;
- return true;
+ return TRUE;
}
/* Finish up a class. */
-static boolean
-ieee_end_class_type (p)
- PTR p;
+static bfd_boolean
+ieee_end_class_type (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int nindx;
@@ -6595,7 +6401,7 @@ ieee_end_class_type (p)
duplicate definition, just through away whatever bytes we have
accumulated. Leave the type on the stack. */
if (info->type_stack->type.ignorep)
- return true;
+ return TRUE;
nindx = info->type_stack->type.classdef->indx;
@@ -6609,20 +6415,20 @@ ieee_end_class_type (p)
|| ! ieee_write_atn65 (info, nindx, "")
|| ! ieee_write_asn (info, nindx,
info->type_stack->type.classdef->voffset))
- return false;
+ return FALSE;
if (info->type_stack->type.classdef->ownvptr)
{
if (! ieee_write_atn65 (info, nindx, ""))
- return false;
+ return FALSE;
}
else
{
if (! ieee_write_atn65 (info, nindx,
info->type_stack->type.classdef->vclass))
- return false;
+ return FALSE;
}
if (! ieee_write_asn (info, nindx, 0))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 5;
}
@@ -6641,16 +6447,16 @@ ieee_end_class_type (p)
|| ! ieee_write_number (info, 80)
|| ! ieee_write_number (info,
info->type_stack->type.classdef->pmisccount))
- return false;
+ return FALSE;
if (! ieee_append_buffer (info, &info->cxx,
&info->type_stack->type.classdef->pmiscbuf))
- return false;
+ return FALSE;
if (! ieee_buffer_emptyp (&info->type_stack->type.classdef->refs))
{
if (! ieee_append_buffer (info, &info->cxx,
&info->type_stack->type.classdef->refs))
- return false;
+ return FALSE;
}
return ieee_end_struct_type (p);
@@ -6658,16 +6464,14 @@ ieee_end_class_type (p)
/* Push a previously seen typedef onto the type stack. */
-static boolean
-ieee_typedef_type (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+ieee_typedef_type (void *p, const char *name)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt;
- h = ieee_name_type_hash_lookup (&info->typedefs, name, false, false);
+ h = ieee_name_type_hash_lookup (&info->typedefs, name, FALSE, FALSE);
/* h should never be NULL, since that would imply that the generic
debugging code has asked for a typedef which it has not yet
@@ -6680,26 +6484,23 @@ ieee_typedef_type (p, name)
nt = h->types;
if (! ieee_push_type (info, nt->type.indx, nt->type.size,
nt->type.unsignedp, nt->type.localp))
- return false;
+ return FALSE;
/* Copy over any other type information we may have. */
info->type_stack->type = nt->type;
- return true;
+ return TRUE;
}
/* Push a tagged type onto the type stack. */
-static boolean
-ieee_tag_type (p, name, id, kind)
- PTR p;
- const char *name;
- unsigned int id;
- enum debug_type_kind kind;
+static bfd_boolean
+ieee_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
- boolean copy;
+ bfd_boolean localp;
+ bfd_boolean copy;
char ab[20];
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt;
@@ -6712,7 +6513,7 @@ ieee_tag_type (p, name, id, kind)
abort ();
for (e = info->enums; e != NULL; e = e->next)
if (e->tag != NULL && strcmp (e->tag, name) == 0)
- return ieee_push_type (info, e->indx, 0, true, false);
+ return ieee_push_type (info, e->indx, 0, TRUE, FALSE);
e = (struct ieee_defined_enum *) xmalloc (sizeof *e);
memset (e, 0, sizeof *e);
@@ -6720,27 +6521,27 @@ ieee_tag_type (p, name, id, kind)
e->indx = info->type_indx;
++info->type_indx;
e->tag = name;
- e->defined = false;
+ e->defined = FALSE;
e->next = info->enums;
info->enums = e;
- return ieee_push_type (info, e->indx, 0, true, false);
+ return ieee_push_type (info, e->indx, 0, TRUE, FALSE);
}
- localp = false;
+ localp = FALSE;
- copy = false;
+ copy = FALSE;
if (name == NULL)
{
sprintf (ab, "__anon%u", id);
name = ab;
- copy = true;
+ copy = TRUE;
}
- h = ieee_name_type_hash_lookup (&info->tags, name, true, copy);
+ h = ieee_name_type_hash_lookup (&info->tags, name, TRUE, copy);
if (h == NULL)
- return false;
+ return FALSE;
for (nt = h->types; nt != NULL; nt = nt->next)
{
@@ -6748,17 +6549,17 @@ ieee_tag_type (p, name, id, kind)
{
if (! ieee_push_type (info, nt->type.indx, nt->type.size,
nt->type.unsignedp, nt->type.localp))
- return false;
+ return FALSE;
/* Copy over any other type information we may have. */
info->type_stack->type = nt->type;
- return true;
+ return TRUE;
}
if (! nt->type.localp)
{
/* This is a duplicate of a global type, so it must be
local. */
- localp = true;
+ localp = TRUE;
}
}
@@ -6775,26 +6576,24 @@ ieee_tag_type (p, name, id, kind)
nt->next = h->types;
h->types = nt;
- if (! ieee_push_type (info, nt->type.indx, 0, false, localp))
- return false;
+ if (! ieee_push_type (info, nt->type.indx, 0, FALSE, localp))
+ return FALSE;
info->type_stack->type.name = h->root.string;
- return true;
+ return TRUE;
}
/* Output a typedef. */
-static boolean
-ieee_typdef (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+ieee_typdef (void *p, const char *name)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_write_type type;
unsigned int indx;
- boolean found;
- boolean localp;
+ bfd_boolean found;
+ bfd_boolean localp;
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt;
@@ -6806,7 +6605,7 @@ ieee_typdef (p, name)
type index to correspond to the name being used. We recognize
names used in stabs debugging output even if they don't exactly
correspond to the names used for the IEEE builtin types. */
- found = false;
+ found = FALSE;
if (indx <= (unsigned int) builtin_bcd_float)
{
switch ((enum builtin_types) indx)
@@ -6816,7 +6615,7 @@ ieee_typdef (p, name)
case builtin_void:
if (strcmp (name, "void") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_signed_char:
@@ -6824,18 +6623,18 @@ ieee_typdef (p, name)
if (strcmp (name, "signed char") == 0)
{
indx = (unsigned int) builtin_signed_char;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "char") == 0)
{
indx = (unsigned int) builtin_char;
- found = true;
+ found = TRUE;
}
break;
case builtin_unsigned_char:
if (strcmp (name, "unsigned char") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_signed_short_int:
@@ -6845,22 +6644,22 @@ ieee_typdef (p, name)
if (strcmp (name, "signed short int") == 0)
{
indx = (unsigned int) builtin_signed_short_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "short") == 0)
{
indx = (unsigned int) builtin_short;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "short int") == 0)
{
indx = (unsigned int) builtin_short_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "signed short") == 0)
{
indx = (unsigned int) builtin_signed_short;
- found = true;
+ found = TRUE;
}
break;
@@ -6870,12 +6669,12 @@ ieee_typdef (p, name)
|| strcmp (name, "short unsigned int") == 0)
{
indx = builtin_unsigned_short_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "unsigned short") == 0)
{
indx = builtin_unsigned_short;
- found = true;
+ found = TRUE;
}
break;
@@ -6885,18 +6684,18 @@ ieee_typdef (p, name)
if (strcmp (name, "signed long") == 0)
{
indx = builtin_signed_long;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "int") == 0)
{
indx = builtin_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "long") == 0
|| strcmp (name, "long int") == 0)
{
indx = builtin_long;
- found = true;
+ found = TRUE;
}
break;
@@ -6907,50 +6706,50 @@ ieee_typdef (p, name)
|| strcmp (name, "long unsigned int") == 0)
{
indx = builtin_unsigned_long;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "unsigned") == 0)
{
indx = builtin_unsigned;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "unsigned int") == 0)
{
indx = builtin_unsigned_int;
- found = true;
+ found = TRUE;
}
break;
case builtin_signed_long_long:
if (strcmp (name, "signed long long") == 0
|| strcmp (name, "long long int") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_unsigned_long_long:
if (strcmp (name, "unsigned long long") == 0
|| strcmp (name, "long long unsigned int") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_float:
if (strcmp (name, "float") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_double:
if (strcmp (name, "double") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_long_double:
if (strcmp (name, "long double") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_long_long_double:
if (strcmp (name, "long long double") == 0)
- found = true;
+ found = TRUE;
break;
}
@@ -6958,9 +6757,9 @@ ieee_typdef (p, name)
type.indx = indx;
}
- h = ieee_name_type_hash_lookup (&info->typedefs, name, true, false);
+ h = ieee_name_type_hash_lookup (&info->typedefs, name, TRUE, FALSE);
if (h == NULL)
- return false;
+ return FALSE;
/* See if we have already defined this type with this name. */
localp = type.localp;
@@ -6973,13 +6772,13 @@ ieee_typdef (p, name)
if (! nt->type.localp)
{
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
}
else
{
/* This is a duplicate definition, so make this one local. */
- localp = true;
+ localp = TRUE;
}
}
@@ -7001,7 +6800,7 @@ ieee_typdef (p, name)
/* This is one of the builtin typedefs, so we don't need to
actually define it. */
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
indx = ieee_pop_type (info);
@@ -7011,85 +6810,75 @@ ieee_typdef (p, name)
(struct ieee_buflist *) NULL)
|| ! ieee_write_number (info, 'T')
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
/* Remove the type we just added to the type stack. This should not
be ieee_pop_unused_type, since the type is used, we just don't
need it now. */
(void) ieee_pop_type (info);
- return true;
+ return TRUE;
}
/* Output a tag for a type. We don't have to do anything here. */
-static boolean
-ieee_tag (p, name)
- PTR p;
- const char *name ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_tag (void *p, const char *name ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
/* This should not be ieee_pop_unused_type, since we want the type
to be defined. */
(void) ieee_pop_type (info);
- return true;
+ return TRUE;
}
/* Output an integer constant. */
-static boolean
-ieee_int_constant (p, name, val)
- PTR p ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
- bfd_vma val ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_int_constant (void *p ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED,
+ bfd_vma val ATTRIBUTE_UNUSED)
{
/* FIXME. */
- return true;
+ return TRUE;
}
/* Output a floating point constant. */
-static boolean
-ieee_float_constant (p, name, val)
- PTR p ATTRIBUTE_UNUSED;
- const char *name ATTRIBUTE_UNUSED;
- double val ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_float_constant (void *p ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ double val ATTRIBUTE_UNUSED)
{
/* FIXME. */
- return true;
+ return TRUE;
}
/* Output a typed constant. */
-static boolean
-ieee_typed_constant (p, name, val)
- PTR p;
- const char *name ATTRIBUTE_UNUSED;
- bfd_vma val ATTRIBUTE_UNUSED;
+static bfd_boolean
+ieee_typed_constant (void *p, const char *name ATTRIBUTE_UNUSED,
+ bfd_vma val ATTRIBUTE_UNUSED)
{
struct ieee_handle *info = (struct ieee_handle *) p;
/* FIXME. */
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
/* Output a variable. */
-static boolean
-ieee_variable (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_var_kind kind;
- bfd_vma val;
+static bfd_boolean
+ieee_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int name_indx;
unsigned int size;
- boolean referencep;
+ bfd_boolean referencep;
unsigned int type_indx;
- boolean asn;
+ bfd_boolean asn;
int refflag;
size = info->type_stack->type.size;
@@ -7098,7 +6887,7 @@ ieee_variable (p, name, kind, val)
assert (! ieee_buffer_emptyp (&info->vars));
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
name_indx = info->name_indx;
++info->name_indx;
@@ -7110,54 +6899,54 @@ ieee_variable (p, name, kind, val)
|| ! ieee_write_2bytes (info, (int) ieee_atn_record_enum)
|| ! ieee_write_number (info, name_indx)
|| ! ieee_write_number (info, type_indx))
- return false;
+ return FALSE;
switch (kind)
{
default:
abort ();
- return false;
+ return FALSE;
case DEBUG_GLOBAL:
if (! ieee_write_number (info, 8)
- || ! ieee_add_range (info, false, val, val + size))
- return false;
+ || ! ieee_add_range (info, FALSE, val, val + size))
+ return FALSE;
refflag = 0;
- asn = true;
+ asn = TRUE;
break;
case DEBUG_STATIC:
if (! ieee_write_number (info, 3)
- || ! ieee_add_range (info, false, val, val + size))
- return false;
+ || ! ieee_add_range (info, FALSE, val, val + size))
+ return FALSE;
refflag = 1;
- asn = true;
+ asn = TRUE;
break;
case DEBUG_LOCAL_STATIC:
if (! ieee_write_number (info, 3)
- || ! ieee_add_range (info, false, val, val + size))
- return false;
+ || ! ieee_add_range (info, FALSE, val, val + size))
+ return FALSE;
refflag = 2;
- asn = true;
+ asn = TRUE;
break;
case DEBUG_LOCAL:
if (! ieee_write_number (info, 1)
|| ! ieee_write_number (info, val))
- return false;
+ return FALSE;
refflag = 2;
- asn = false;
+ asn = FALSE;
break;
case DEBUG_REGISTER:
if (! ieee_write_number (info, 2)
|| ! ieee_write_number (info,
ieee_genreg_to_regno (info->abfd, val)))
- return false;
+ return FALSE;
refflag = 2;
- asn = false;
+ asn = FALSE;
break;
}
if (asn)
{
if (! ieee_write_asn (info, name_indx, val))
- return false;
+ return FALSE;
}
/* If this is really a reference type, then we just output it with
@@ -7177,7 +6966,7 @@ ieee_variable (p, name, kind, val)
if (refflag != 2)
{
if (! ieee_change_buffer (info, &info->cxx))
- return false;
+ return FALSE;
}
if (! ieee_write_byte (info, (int) ieee_nn_record)
@@ -7192,22 +6981,19 @@ ieee_variable (p, name, kind, val)
|| ! ieee_write_asn (info, nindx, 'R')
|| ! ieee_write_asn (info, nindx, refflag)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Start outputting information for a function. */
-static boolean
-ieee_start_function (p, name, global)
- PTR p;
- const char *name;
- boolean global;
+static bfd_boolean
+ieee_start_function (void *p, const char *name, bfd_boolean global)
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean referencep;
+ bfd_boolean referencep;
unsigned int retindx, typeindx;
referencep = info->type_stack->type.referencep;
@@ -7227,19 +7013,19 @@ ieee_start_function (p, name, global)
info->fnname = name;
/* An attribute of 0x40 means that the push mask is unknown. */
- if (! ieee_define_named_type (info, name, (unsigned int) -1, 0, false, true,
+ if (! ieee_define_named_type (info, name, (unsigned int) -1, 0, FALSE, TRUE,
&info->fntype)
|| ! ieee_write_number (info, 'x')
|| ! ieee_write_number (info, 0x40)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, retindx))
- return false;
+ return FALSE;
typeindx = ieee_pop_type (info);
if (! ieee_init_buffer (info, &info->fnargs))
- return false;
+ return FALSE;
info->fnargcount = 0;
/* If the function return value is actually a reference type, we
@@ -7263,12 +7049,12 @@ ieee_start_function (p, name, global)
|| ! ieee_write_asn (info, nindx, 'R')
|| ! ieee_write_asn (info, nindx, global ? 0 : 1)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
}
assert (! ieee_buffer_emptyp (&info->vars));
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
/* The address is written out as the first block. */
@@ -7285,12 +7071,9 @@ ieee_start_function (p, name, global)
/* Add a function parameter. This will normally be called before the
first block, so we postpone them until we see the block. */
-static boolean
-ieee_function_parameter (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_parm_kind kind;
- bfd_vma val;
+static bfd_boolean
+ieee_function_parameter (void *p, const char *name, enum debug_parm_kind kind,
+ bfd_vma val)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_pending_parm *m, **pm;
@@ -7314,17 +7097,16 @@ ieee_function_parameter (p, name, kind, val)
/* Add the type to the fnargs list. */
if (! ieee_change_buffer (info, &info->fnargs)
|| ! ieee_write_number (info, m->type))
- return false;
+ return FALSE;
++info->fnargcount;
- return true;
+ return TRUE;
}
/* Output pending function parameters. */
-static boolean
-ieee_output_pending_parms (info)
- struct ieee_handle *info;
+static bfd_boolean
+ieee_output_pending_parms (struct ieee_handle *info)
{
struct ieee_pending_parm *m;
unsigned int refcount;
@@ -7338,7 +7120,7 @@ ieee_output_pending_parms (info)
{
default:
abort ();
- return false;
+ return FALSE;
case DEBUG_PARM_STACK:
case DEBUG_PARM_REFERENCE:
vkind = DEBUG_LOCAL;
@@ -7349,13 +7131,13 @@ ieee_output_pending_parms (info)
break;
}
- if (! ieee_push_type (info, m->type, 0, false, false))
- return false;
+ if (! ieee_push_type (info, m->type, 0, FALSE, FALSE))
+ return FALSE;
info->type_stack->type.referencep = m->referencep;
if (m->referencep)
++refcount;
- if (! ieee_variable ((PTR) info, m->name, vkind, m->val))
- return false;
+ if (! ieee_variable ((void *) info, m->name, vkind, m->val))
+ return FALSE;
}
/* If there are any reference parameters, we need to output a
@@ -7381,7 +7163,7 @@ ieee_output_pending_parms (info)
|| ! ieee_write_asn (info, nindx, 'B')
|| ! ieee_write_atn65 (info, nindx, info->fnname)
|| ! ieee_write_asn (info, nindx, 0))
- return false;
+ return FALSE;
for (m = info->pending_parms, varindx = 1;
m != NULL;
m = m->next, varindx++)
@@ -7389,7 +7171,7 @@ ieee_output_pending_parms (info)
if (m->referencep)
{
if (! ieee_write_asn (info, nindx, varindx))
- return false;
+ return FALSE;
}
}
}
@@ -7406,27 +7188,25 @@ ieee_output_pending_parms (info)
info->pending_parms = NULL;
- return true;
+ return TRUE;
}
/* Start a block. If this is the first block, we output the address
to finish the BB4 or BB6, and then output the function parameters. */
-static boolean
-ieee_start_block (p, addr)
- PTR p;
- bfd_vma addr;
+static bfd_boolean
+ieee_start_block (void *p, bfd_vma addr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
if (info->block_depth == 1)
{
if (! ieee_write_number (info, addr)
|| ! ieee_output_pending_parms (info))
- return false;
+ return FALSE;
}
else
{
@@ -7437,23 +7217,21 @@ ieee_start_block (p, addr)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, addr))
- return false;
+ return FALSE;
}
if (! ieee_start_range (info, addr))
- return false;
+ return FALSE;
++info->block_depth;
- return true;
+ return TRUE;
}
/* End a block. */
-static boolean
-ieee_end_block (p, addr)
- PTR p;
- bfd_vma addr;
+static bfd_boolean
+ieee_end_block (void *p, bfd_vma addr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7463,24 +7241,23 @@ ieee_end_block (p, addr)
if (! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, addr - 1))
- return false;
+ return FALSE;
if (! ieee_end_range (info, addr))
- return false;
+ return FALSE;
--info->block_depth;
if (addr > info->highaddr)
info->highaddr = addr;
- return true;
+ return TRUE;
}
/* End a function. */
-static boolean
-ieee_end_function (p)
- PTR p;
+static bfd_boolean
+ieee_end_function (void *p)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7498,7 +7275,7 @@ ieee_end_function (p)
|| ! ieee_write_number (info, info->fnargcount)
|| ! ieee_change_buffer (info, &info->fnargs)
|| ! ieee_write_number (info, 0))
- return false;
+ return FALSE;
/* Make sure the typdef block has been started. */
if (ieee_buffer_emptyp (&info->types))
@@ -7508,30 +7285,26 @@ ieee_end_function (p)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
if (! ieee_append_buffer (info, &info->types, &info->fntype)
|| ! ieee_append_buffer (info, &info->types, &info->fnargs))
- return false;
+ return FALSE;
info->fnname = NULL;
if (! ieee_init_buffer (info, &info->fntype)
|| ! ieee_init_buffer (info, &info->fnargs))
- return false;
+ return FALSE;
info->fnargcount = 0;
- return true;
+ return TRUE;
}
/* Record line number information. */
-static boolean
-ieee_lineno (p, filename, lineno, addr)
- PTR p;
- const char *filename;
- unsigned long lineno;
- bfd_vma addr;
+static bfd_boolean
+ieee_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7548,7 +7321,7 @@ ieee_lineno (p, filename, lineno, addr)
if (! ieee_buffer_emptyp (&info->linenos))
{
if (! ieee_change_buffer (info, &info->linenos))
- return false;
+ return FALSE;
}
else
{
@@ -7562,7 +7335,7 @@ ieee_lineno (p, filename, lineno, addr)
|| ! ieee_write_byte (info, (int) ieee_nn_record)
|| ! ieee_write_number (info, info->lineno_name_indx)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
info->lineno_filename = info->filename;
}
@@ -7573,7 +7346,7 @@ ieee_lineno (p, filename, lineno, addr)
/* We were not in the main file. Close the block for the
included file. */
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (strcmp (info->filename, info->pending_lineno_filename) == 0)
{
/* We need a new NN record, and we aren't about to
@@ -7583,7 +7356,7 @@ ieee_lineno (p, filename, lineno, addr)
if (! ieee_write_byte (info, (int) ieee_nn_record)
|| ! ieee_write_number (info, info->lineno_name_indx)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
}
if (strcmp (info->filename, info->pending_lineno_filename) != 0)
@@ -7599,7 +7372,7 @@ ieee_lineno (p, filename, lineno, addr)
|| ! ieee_write_byte (info, (int) ieee_nn_record)
|| ! ieee_write_number (info, info->lineno_name_indx)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
info->lineno_filename = info->pending_lineno_filename;
}
@@ -7612,12 +7385,12 @@ ieee_lineno (p, filename, lineno, addr)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_asn (info, info->lineno_name_indx,
info->pending_lineno_addr))
- return false;
+ return FALSE;
}
info->pending_lineno_filename = filename;
info->pending_lineno = lineno;
info->pending_lineno_addr = addr;
- return true;
+ return TRUE;
}
diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c
index 241a2c6..9623398 100644
--- a/contrib/binutils/binutils/objcopy.c
+++ b/contrib/binutils/binutils/objcopy.c
@@ -1,6 +1,6 @@
/* objcopy.c -- copy object file from input to output, optionally massaging it.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -27,6 +27,8 @@
#include "libiberty.h"
#include "budbg.h"
#include "filenames.h"
+#include "fnmatch.h"
+#include "elf-bfd.h"
#include <sys/stat.h>
/* A list of symbols to explicitly strip out, or to keep. A linked
@@ -58,56 +60,29 @@ typedef struct section_rename
section_rename;
/* List of sections to be renamed. */
-static section_rename * section_rename_list;
-
-static void copy_usage PARAMS ((FILE *, int));
-static void strip_usage PARAMS ((FILE *, int));
-static flagword parse_flags PARAMS ((const char *));
-static struct section_list *find_section_list PARAMS ((const char *, boolean));
-static void setup_section PARAMS ((bfd *, asection *, PTR));
-static void copy_section PARAMS ((bfd *, asection *, PTR));
-static void get_sections PARAMS ((bfd *, asection *, PTR));
-static int compare_section_lma PARAMS ((const PTR, const PTR));
-static void add_specific_symbol PARAMS ((const char *, struct symlist **));
-static void add_specific_symbols PARAMS ((const char *, struct symlist **));
-static boolean is_specified_symbol PARAMS ((const char *, struct symlist *));
-static boolean is_strip_section PARAMS ((bfd *, asection *));
-static unsigned int filter_symbols
- PARAMS ((bfd *, bfd *, asymbol **, asymbol **, long));
-static void mark_symbols_used_in_relocations PARAMS ((bfd *, asection *, PTR));
-static void filter_bytes PARAMS ((char *, bfd_size_type *));
-static boolean write_debugging_info PARAMS ((bfd *, PTR, long *, asymbol ***));
-static void copy_object PARAMS ((bfd *, bfd *));
-static void copy_archive PARAMS ((bfd *, bfd *, const char *));
-static void copy_file
- PARAMS ((const char *, const char *, const char *, const char *));
-static int strip_main PARAMS ((int, char **));
-static int copy_main PARAMS ((int, char **));
-static const char *lookup_sym_redefinition PARAMS((const char *));
-static void redefine_list_append PARAMS ((const char *, const char *));
-static const char * find_section_rename PARAMS ((bfd *, sec_ptr, flagword *));
-static void add_section_rename PARAMS ((const char *, const char *, flagword));
+static section_rename *section_rename_list;
#define RETURN_NONFATAL(s) {bfd_nonfatal (s); status = 1; return;}
-static asymbol **isympp = NULL; /* Input symbols */
-static asymbol **osympp = NULL; /* Output symbols that survive stripping */
+static asymbol **isympp = NULL; /* Input symbols. */
+static asymbol **osympp = NULL; /* Output symbols that survive stripping. */
/* If `copy_byte' >= 0, copy only that byte of every `interleave' bytes. */
static int copy_byte = -1;
static int interleave = 4;
-static boolean verbose; /* Print file and target names. */
-static boolean preserve_dates; /* Preserve input file timestamp. */
+static bfd_boolean verbose; /* Print file and target names. */
+static bfd_boolean preserve_dates; /* Preserve input file timestamp. */
static int status = 0; /* Exit status. */
enum strip_action
{
STRIP_UNDEF,
- STRIP_NONE, /* don't strip */
- STRIP_DEBUG, /* strip all debugger symbols */
- STRIP_UNNEEDED, /* strip unnecessary symbols */
- STRIP_ALL /* strip all symbols */
+ STRIP_NONE, /* Don't strip. */
+ STRIP_DEBUG, /* Strip all debugger symbols. */
+ STRIP_UNNEEDED, /* Strip unnecessary symbols. */
+ STRIP_NONDEBUG, /* Strip everything but debug info. */
+ STRIP_ALL /* Strip all symbols. */
};
/* Which symbols to remove. */
@@ -116,8 +91,8 @@ static enum strip_action strip_symbols;
enum locals_action
{
LOCALS_UNDEF,
- LOCALS_START_L, /* discard locals starting with L */
- LOCALS_ALL /* discard all locals */
+ LOCALS_START_L, /* Discard locals starting with L. */
+ LOCALS_ALL /* Discard all locals. */
};
/* Which local symbols to remove. Overrides STRIP_ALL. */
@@ -134,46 +109,50 @@ enum change_action
/* Structure used to hold lists of sections and actions to take. */
struct section_list
{
- struct section_list * next; /* Next section to change. */
- const char * name; /* Section name. */
- boolean used; /* Whether this entry was used. */
- boolean remove; /* Whether to remove this section. */
- boolean copy; /* Whether to copy this section. */
- enum change_action change_vma;/* Whether to change or set VMA. */
- bfd_vma vma_val; /* Amount to change by or set to. */
- enum change_action change_lma;/* Whether to change or set LMA. */
- bfd_vma lma_val; /* Amount to change by or set to. */
- boolean set_flags; /* Whether to set the section flags. */
- flagword flags; /* What to set the section flags to. */
+ struct section_list * next; /* Next section to change. */
+ const char * name; /* Section name. */
+ bfd_boolean used; /* Whether this entry was used. */
+ bfd_boolean remove; /* Whether to remove this section. */
+ bfd_boolean copy; /* Whether to copy this section. */
+ enum change_action change_vma;/* Whether to change or set VMA. */
+ bfd_vma vma_val; /* Amount to change by or set to. */
+ enum change_action change_lma;/* Whether to change or set LMA. */
+ bfd_vma lma_val; /* Amount to change by or set to. */
+ bfd_boolean set_flags; /* Whether to set the section flags. */
+ flagword flags; /* What to set the section flags to. */
};
static struct section_list *change_sections;
-/* True if some sections are to be removed. */
-static boolean sections_removed;
+/* TRUE if some sections are to be removed. */
+static bfd_boolean sections_removed;
-/* True if only some sections are to be copied. */
-static boolean sections_copied;
+/* TRUE if only some sections are to be copied. */
+static bfd_boolean sections_copied;
/* Changes to the start address. */
static bfd_vma change_start = 0;
-static boolean set_start_set = false;
+static bfd_boolean set_start_set = FALSE;
static bfd_vma set_start;
/* Changes to section addresses. */
static bfd_vma change_section_address = 0;
/* Filling gaps between sections. */
-static boolean gap_fill_set = false;
+static bfd_boolean gap_fill_set = FALSE;
static bfd_byte gap_fill = 0;
/* Pad to a given address. */
-static boolean pad_to_set = false;
+static bfd_boolean pad_to_set = FALSE;
static bfd_vma pad_to;
/* Use alternate machine code? */
static int use_alt_mach_code = 0;
+/* Output BFD flags user wants to set or clear */
+static flagword bfd_flags_to_set;
+static flagword bfd_flags_to_clear;
+
/* List of sections to add. */
struct section_add
{
@@ -194,14 +173,21 @@ struct section_add
/* List of sections to add to the output BFD. */
static struct section_add *add_sections;
+/* If non-NULL the argument to --add-gnu-debuglink.
+ This should be the filename to store in the .gnu_debuglink section. */
+static const char * gnu_debuglink_filename = NULL;
+
/* Whether to convert debugging information. */
-static boolean convert_debugging = false;
+static bfd_boolean convert_debugging = FALSE;
/* Whether to change the leading character in symbol names. */
-static boolean change_leading_char = false;
+static bfd_boolean change_leading_char = FALSE;
/* Whether to remove the leading character from global symbol names. */
-static boolean remove_leading_char = false;
+static bfd_boolean remove_leading_char = FALSE;
+
+/* Whether to permit wildcard in symbol comparison. */
+static bfd_boolean wildcard = FALSE;
/* List of symbols to strip, keep, localize, keep-global, weaken,
or redefine. */
@@ -212,38 +198,56 @@ static struct symlist *keepglobal_specific_list = NULL;
static struct symlist *weaken_specific_list = NULL;
static struct redefine_node *redefine_sym_list = NULL;
-/* If this is true, we weaken global symbols (set BSF_WEAK). */
-static boolean weaken = false;
+/* If this is TRUE, we weaken global symbols (set BSF_WEAK). */
+static bfd_boolean weaken = FALSE;
-/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
+/* Prefix symbols/sections. */
+static char *prefix_symbols_string = 0;
+static char *prefix_sections_string = 0;
+static char *prefix_alloc_sections_string = 0;
-#define OPTION_ADD_SECTION 150
-#define OPTION_CHANGE_ADDRESSES (OPTION_ADD_SECTION + 1)
-#define OPTION_CHANGE_LEADING_CHAR (OPTION_CHANGE_ADDRESSES + 1)
-#define OPTION_CHANGE_START (OPTION_CHANGE_LEADING_CHAR + 1)
-#define OPTION_CHANGE_SECTION_ADDRESS (OPTION_CHANGE_START + 1)
-#define OPTION_CHANGE_SECTION_LMA (OPTION_CHANGE_SECTION_ADDRESS + 1)
-#define OPTION_CHANGE_SECTION_VMA (OPTION_CHANGE_SECTION_LMA + 1)
-#define OPTION_CHANGE_WARNINGS (OPTION_CHANGE_SECTION_VMA + 1)
-#define OPTION_DEBUGGING (OPTION_CHANGE_WARNINGS + 1)
-#define OPTION_GAP_FILL (OPTION_DEBUGGING + 1)
-#define OPTION_NO_CHANGE_WARNINGS (OPTION_GAP_FILL + 1)
-#define OPTION_PAD_TO (OPTION_NO_CHANGE_WARNINGS + 1)
-#define OPTION_REMOVE_LEADING_CHAR (OPTION_PAD_TO + 1)
-#define OPTION_SET_SECTION_FLAGS (OPTION_REMOVE_LEADING_CHAR + 1)
-#define OPTION_SET_START (OPTION_SET_SECTION_FLAGS + 1)
-#define OPTION_STRIP_UNNEEDED (OPTION_SET_START + 1)
-#define OPTION_WEAKEN (OPTION_STRIP_UNNEEDED + 1)
-#define OPTION_REDEFINE_SYM (OPTION_WEAKEN + 1)
-#define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1)
-#define OPTION_SREC_FORCES3 (OPTION_SREC_LEN + 1)
-#define OPTION_STRIP_SYMBOLS (OPTION_SREC_FORCES3 + 1)
-#define OPTION_KEEP_SYMBOLS (OPTION_STRIP_SYMBOLS + 1)
-#define OPTION_LOCALIZE_SYMBOLS (OPTION_KEEP_SYMBOLS + 1)
-#define OPTION_KEEPGLOBAL_SYMBOLS (OPTION_LOCALIZE_SYMBOLS + 1)
-#define OPTION_WEAKEN_SYMBOLS (OPTION_KEEPGLOBAL_SYMBOLS + 1)
-#define OPTION_RENAME_SECTION (OPTION_WEAKEN_SYMBOLS + 1)
-#define OPTION_ALT_MACH_CODE (OPTION_RENAME_SECTION + 1)
+/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
+enum command_line_switch
+ {
+ OPTION_ADD_SECTION=150,
+ OPTION_CHANGE_ADDRESSES,
+ OPTION_CHANGE_LEADING_CHAR,
+ OPTION_CHANGE_START,
+ OPTION_CHANGE_SECTION_ADDRESS,
+ OPTION_CHANGE_SECTION_LMA,
+ OPTION_CHANGE_SECTION_VMA,
+ OPTION_CHANGE_WARNINGS,
+ OPTION_DEBUGGING,
+ OPTION_GAP_FILL,
+ OPTION_NO_CHANGE_WARNINGS,
+ OPTION_PAD_TO,
+ OPTION_REMOVE_LEADING_CHAR,
+ OPTION_SET_SECTION_FLAGS,
+ OPTION_SET_START,
+ OPTION_STRIP_UNNEEDED,
+ OPTION_WEAKEN,
+ OPTION_REDEFINE_SYM,
+ OPTION_REDEFINE_SYMS,
+ OPTION_SREC_LEN,
+ OPTION_SREC_FORCES3,
+ OPTION_STRIP_SYMBOLS,
+ OPTION_KEEP_SYMBOLS,
+ OPTION_LOCALIZE_SYMBOLS,
+ OPTION_KEEPGLOBAL_SYMBOLS,
+ OPTION_WEAKEN_SYMBOLS,
+ OPTION_RENAME_SECTION,
+ OPTION_ALT_MACH_CODE,
+ OPTION_PREFIX_SYMBOLS,
+ OPTION_PREFIX_SECTIONS,
+ OPTION_PREFIX_ALLOC_SECTIONS,
+ OPTION_FORMATS_INFO,
+ OPTION_ADD_GNU_DEBUGLINK,
+ OPTION_ONLY_KEEP_DEBUG,
+ OPTION_READONLY_TEXT,
+ OPTION_WRITABLE_TEXT,
+ OPTION_PURE,
+ OPTION_IMPURE
+ };
/* Options to handle if running as "strip". */
@@ -253,9 +257,11 @@ static struct option strip_options[] =
{"discard-locals", no_argument, 0, 'X'},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"help", no_argument, 0, 'h'},
+ {"info", no_argument, 0, OPTION_FORMATS_INFO},
{"input-format", required_argument, 0, 'I'}, /* Obsolete */
{"input-target", required_argument, 0, 'I'},
{"keep-symbol", required_argument, 0, 'K'},
+ {"only-keep-debug", no_argument, 0, OPTION_ONLY_KEEP_DEBUG},
{"output-format", required_argument, 0, 'O'}, /* Obsolete */
{"output-target", required_argument, 0, 'O'},
{"output-file", required_argument, 0, 'o'},
@@ -268,6 +274,7 @@ static struct option strip_options[] =
{"target", required_argument, 0, 'F'},
{"verbose", no_argument, 0, 'v'},
{"version", no_argument, 0, 'V'},
+ {"wildcard", no_argument, 0, 'w'},
{0, no_argument, 0, 0}
};
@@ -275,11 +282,13 @@ static struct option strip_options[] =
static struct option copy_options[] =
{
+ {"add-gnu-debuglink", required_argument, 0, OPTION_ADD_GNU_DEBUGLINK},
{"add-section", required_argument, 0, OPTION_ADD_SECTION},
{"adjust-start", required_argument, 0, OPTION_CHANGE_START},
{"adjust-vma", required_argument, 0, OPTION_CHANGE_ADDRESSES},
{"adjust-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
{"adjust-warnings", no_argument, 0, OPTION_CHANGE_WARNINGS},
+ {"alt-machine-code", required_argument, 0, OPTION_ALT_MACH_CODE},
{"binary-architecture", required_argument, 0, 'B'},
{"byte", required_argument, 0, 'b'},
{"change-addresses", required_argument, 0, OPTION_CHANGE_ADDRESSES},
@@ -292,45 +301,55 @@ static struct option copy_options[] =
{"debugging", no_argument, 0, OPTION_DEBUGGING},
{"discard-all", no_argument, 0, 'x'},
{"discard-locals", no_argument, 0, 'X'},
- {"only-section", required_argument, 0, 'j'},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"gap-fill", required_argument, 0, OPTION_GAP_FILL},
{"help", no_argument, 0, 'h'},
+ {"impure", no_argument, 0, OPTION_IMPURE},
+ {"info", no_argument, 0, OPTION_FORMATS_INFO},
{"input-format", required_argument, 0, 'I'}, /* Obsolete */
{"input-target", required_argument, 0, 'I'},
{"interleave", required_argument, 0, 'i'},
+ {"keep-global-symbol", required_argument, 0, 'G'},
+ {"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS},
{"keep-symbol", required_argument, 0, 'K'},
+ {"keep-symbols", required_argument, 0, OPTION_KEEP_SYMBOLS},
+ {"localize-symbol", required_argument, 0, 'L'},
+ {"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS},
{"no-adjust-warnings", no_argument, 0, OPTION_NO_CHANGE_WARNINGS},
{"no-change-warnings", no_argument, 0, OPTION_NO_CHANGE_WARNINGS},
+ {"only-keep-debug", no_argument, 0, OPTION_ONLY_KEEP_DEBUG},
+ {"only-section", required_argument, 0, 'j'},
{"output-format", required_argument, 0, 'O'}, /* Obsolete */
{"output-target", required_argument, 0, 'O'},
{"pad-to", required_argument, 0, OPTION_PAD_TO},
+ {"prefix-symbols", required_argument, 0, OPTION_PREFIX_SYMBOLS},
+ {"prefix-sections", required_argument, 0, OPTION_PREFIX_SECTIONS},
+ {"prefix-alloc-sections", required_argument, 0, OPTION_PREFIX_ALLOC_SECTIONS},
{"preserve-dates", no_argument, 0, 'p'},
- {"localize-symbol", required_argument, 0, 'L'},
- {"keep-global-symbol", required_argument, 0, 'G'},
+ {"pure", no_argument, 0, OPTION_PURE},
+ {"readonly-text", no_argument, 0, OPTION_READONLY_TEXT},
+ {"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM},
+ {"redefine-syms", required_argument, 0, OPTION_REDEFINE_SYMS},
{"remove-leading-char", no_argument, 0, OPTION_REMOVE_LEADING_CHAR},
{"remove-section", required_argument, 0, 'R'},
{"rename-section", required_argument, 0, OPTION_RENAME_SECTION},
{"set-section-flags", required_argument, 0, OPTION_SET_SECTION_FLAGS},
{"set-start", required_argument, 0, OPTION_SET_START},
+ {"srec-len", required_argument, 0, OPTION_SREC_LEN},
+ {"srec-forceS3", no_argument, 0, OPTION_SREC_FORCES3},
{"strip-all", no_argument, 0, 'S'},
{"strip-debug", no_argument, 0, 'g'},
{"strip-unneeded", no_argument, 0, OPTION_STRIP_UNNEEDED},
{"strip-symbol", required_argument, 0, 'N'},
+ {"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS},
{"target", required_argument, 0, 'F'},
{"verbose", no_argument, 0, 'v'},
{"version", no_argument, 0, 'V'},
{"weaken", no_argument, 0, OPTION_WEAKEN},
{"weaken-symbol", required_argument, 0, 'W'},
- {"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM},
- {"srec-len", required_argument, 0, OPTION_SREC_LEN},
- {"srec-forceS3", no_argument, 0, OPTION_SREC_FORCES3},
- {"keep-symbols", required_argument, 0, OPTION_KEEP_SYMBOLS},
- {"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS},
- {"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS},
- {"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS},
{"weaken-symbols", required_argument, 0, OPTION_WEAKEN_SYMBOLS},
- {"alt-machine-code", required_argument, 0, OPTION_ALT_MACH_CODE},
+ {"wildcard", no_argument, 0, 'w'},
+ {"writable-text", no_argument, 0, OPTION_WRITABLE_TEXT},
{0, no_argument, 0, 0}
};
@@ -349,16 +368,24 @@ extern unsigned int Chunk;
/* Restrict the generation of Srecords to type S3 only.
This variable is declare in bfd/srec.c and can be toggled
on by the --srec-forceS3 command line switch. */
-extern boolean S3Forced;
-
-/* Defined in bfd/binary.c. Used to set architecture of input binary files. */
-extern enum bfd_architecture bfd_external_binary_architecture;
-
+extern bfd_boolean S3Forced;
+
+/* Defined in bfd/binary.c. Used to set architecture and machine of input
+ binary files. */
+extern enum bfd_architecture bfd_external_binary_architecture;
+extern unsigned long bfd_external_machine;
+
+/* Forward declarations. */
+static void setup_section (bfd *, asection *, void *);
+static void copy_section (bfd *, asection *, void *);
+static void get_sections (bfd *, asection *, void *);
+static int compare_section_lma (const void *, const void *);
+static void mark_symbols_used_in_relocations (bfd *, asection *, void *);
+static bfd_boolean write_debugging_info (bfd *, void *, long *, asymbol ***);
+static const char *lookup_sym_redefinition (const char *);
static void
-copy_usage (stream, exit_status)
- FILE *stream;
- int exit_status;
+copy_usage (FILE *stream, int exit_status)
{
fprintf (stream, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
fprintf (stream, _(" Copies a binary file, possibly transforming it in the process\n"));
@@ -371,16 +398,19 @@ copy_usage (stream, exit_status)
--debugging Convert debugging information, if possible\n\
-p --preserve-dates Copy modified/access timestamps to the output\n\
-j --only-section <name> Only copy section <name> into the output\n\
+ --add-gnu-debuglink=<file> Add section .gnu_debuglink linking to <file>\n\
-R --remove-section <name> Remove section <name> from the output\n\
-S --strip-all Remove all symbol and relocation information\n\
- -g --strip-debug Remove all debugging symbols\n\
+ -g --strip-debug Remove all debugging symbols & sections\n\
--strip-unneeded Remove all symbols not needed by relocations\n\
-N --strip-symbol <name> Do not copy symbol <name>\n\
+ --only-keep-debug Strip everything but the debug information\n\
-K --keep-symbol <name> Only copy symbol <name>\n\
-L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
-G --keep-global-symbol <name> Localize all symbols except <name>\n\
-W --weaken-symbol <name> Force symbol <name> to be marked as a weak\n\
--weaken Force all global symbols to be marked as weak\n\
+ -w --wildcard Permit wildcard in symbol comparasion\n\
-x --discard-all Remove all non-global symbols\n\
-X --discard-locals Remove any compiler-generated symbols\n\
-i --interleave <number> Only copy one out of every <number> bytes\n\
@@ -407,6 +437,8 @@ copy_usage (stream, exit_status)
--change-leading-char Force output format's leading character style\n\
--remove-leading-char Remove leading character from global symbols\n\
--redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n\
+ --redefine-syms <file> --redefine-sym for all symbol pairs \n\
+ listed in <file>\n\
--srec-len <number> Restrict the length of generated Srecords\n\
--srec-forceS3 Restrict the type of generated Srecords to S3\n\
--strip-symbols <file> -N for all symbols listed in <file>\n\
@@ -415,9 +447,19 @@ copy_usage (stream, exit_status)
--keep-global-symbols <file> -G for all symbols listed in <file>\n\
--weaken-symbols <file> -W for all symbols listed in <file>\n\
--alt-machine-code <index> Use alternate machine code for output\n\
+ --writable-text Mark the output text as writable\n\
+ --readonly-text Make the output text write protected\n\
+ --pure Mark the output file as demand paged\n\
+ --impure Mark the output file as impure\n\
+ --prefix-symbols <prefix> Add <prefix> to start of every symbol name\n\
+ --prefix-sections <prefix> Add <prefix> to start of every section name\n\
+ --prefix-alloc-sections <prefix>\n\
+ Add <prefix> to start of every allocatable\n\
+ section name\n\
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
+ --info List object formats & architectures supported\n\
"));
list_supported_targets (program_name, stream);
if (exit_status == 0)
@@ -426,9 +468,7 @@ copy_usage (stream, exit_status)
}
static void
-strip_usage (stream, exit_status)
- FILE *stream;
- int exit_status;
+strip_usage (FILE *stream, int exit_status)
{
fprintf (stream, _("Usage: %s <option(s)> in-file(s)\n"), program_name);
fprintf (stream, _(" Removes symbols and sections from files\n"));
@@ -440,15 +480,18 @@ strip_usage (stream, exit_status)
-p --preserve-dates Copy modified/access timestamps to the output\n\
-R --remove-section=<name> Remove section <name> from the output\n\
-s --strip-all Remove all symbol and relocation information\n\
- -g -S -d --strip-debug Remove all debugging symbols\n\
+ -g -S -d --strip-debug Remove all debugging symbols & sections\n\
--strip-unneeded Remove all symbols not needed by relocations\n\
+ --only-keep-debug Strip everything but the debug information\n\
-N --strip-symbol=<name> Do not copy symbol <name>\n\
-K --keep-symbol=<name> Only copy symbol <name>\n\
+ -w --wildcard Permit wildcard in symbol comparasion\n\
-x --discard-all Remove all non-global symbols\n\
-X --discard-locals Remove any compiler-generated symbols\n\
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
+ --info List object formats & architectures supported\n\
-o <file> Place stripped output into <file>\n\
"));
@@ -462,8 +505,7 @@ strip_usage (stream, exit_status)
string can't be parsed. */
static flagword
-parse_flags (s)
- const char *s;
+parse_flags (const char *s)
{
flagword ret;
const char *snext;
@@ -518,11 +560,9 @@ parse_flags (s)
/* Find and optionally add an entry in the change_sections list. */
static struct section_list *
-find_section_list (name, add)
- const char *name;
- boolean add;
+find_section_list (const char *name, bfd_boolean add)
{
- register struct section_list *p;
+ struct section_list *p;
for (p = change_sections; p != NULL; p = p->next)
if (strcmp (p->name, name) == 0)
@@ -531,16 +571,16 @@ find_section_list (name, add)
if (! add)
return NULL;
- p = (struct section_list *) xmalloc (sizeof (struct section_list));
+ p = xmalloc (sizeof (struct section_list));
p->name = name;
- p->used = false;
- p->remove = false;
- p->copy = false;
+ p->used = FALSE;
+ p->remove = FALSE;
+ p->copy = FALSE;
p->change_vma = CHANGE_IGNORE;
p->change_lma = CHANGE_IGNORE;
p->vma_val = 0;
p->lma_val = 0;
- p->set_flags = false;
+ p->set_flags = FALSE;
p->flags = 0;
p->next = change_sections;
@@ -552,13 +592,11 @@ find_section_list (name, add)
/* Add a symbol to strip_specific_list. */
static void
-add_specific_symbol (name, list)
- const char *name;
- struct symlist **list;
+add_specific_symbol (const char *name, struct symlist **list)
{
struct symlist *tmp_list;
- tmp_list = (struct symlist *) xmalloc (sizeof (struct symlist));
+ tmp_list = xmalloc (sizeof (struct symlist));
tmp_list->name = name;
tmp_list->next = *list;
*list = tmp_list;
@@ -570,32 +608,29 @@ add_specific_symbol (name, list)
#define IS_LINE_TERMINATOR(c) ((c) == '\n' || (c) == '\r' || (c) == '\0')
static void
-add_specific_symbols (filename, list)
- const char *filename;
- struct symlist **list;
+add_specific_symbols (const char *filename, struct symlist **list)
{
- struct stat st;
+ off_t size;
FILE * f;
char * line;
char * buffer;
unsigned int line_count;
- if (stat (filename, & st) < 0)
- fatal (_("cannot stat: %s: %s"), filename, strerror (errno));
- if (st.st_size == 0)
+ size = get_file_size (filename);
+ if (size == 0)
return;
- buffer = (char *) xmalloc (st.st_size + 2);
+ buffer = xmalloc (size + 2);
f = fopen (filename, FOPEN_RT);
if (f == NULL)
- fatal (_("cannot open: %s: %s"), filename, strerror (errno));
+ fatal (_("cannot open '%s': %s"), filename, strerror (errno));
- if (fread (buffer, 1, st.st_size, f) == 0 || ferror (f))
+ if (fread (buffer, 1, size, f) == 0 || ferror (f))
fatal (_("%s: fread failed"), filename);
fclose (f);
- buffer [st.st_size] = '\n';
- buffer [st.st_size + 1] = '\0';
+ buffer [size] = '\n';
+ buffer [size + 1] = '\0';
line_count = 1;
@@ -604,7 +639,7 @@ add_specific_symbols (filename, list)
char * eol;
char * name;
char * name_end;
- int finished = false;
+ int finished = FALSE;
for (eol = line;; eol ++)
{
@@ -615,7 +650,7 @@ add_specific_symbols (filename, list)
/* Cope with \n\r. */
if (eol[1] == '\r')
++ eol;
- finished = true;
+ finished = TRUE;
break;
case '\r':
@@ -623,11 +658,11 @@ add_specific_symbols (filename, list)
/* Cope with \r\n. */
if (eol[1] == '\n')
++ eol;
- finished = true;
+ finished = TRUE;
break;
case 0:
- finished = true;
+ finished = TRUE;
break;
case '#':
@@ -683,46 +718,66 @@ add_specific_symbols (filename, list)
/* See whether a symbol should be stripped or kept based on
strip_specific_list and keep_symbols. */
-static boolean
-is_specified_symbol (name, list)
- const char *name;
- struct symlist *list;
+static bfd_boolean
+is_specified_symbol (const char *name, struct symlist *list)
{
struct symlist *tmp_list;
- for (tmp_list = list; tmp_list; tmp_list = tmp_list->next)
- if (strcmp (name, tmp_list->name) == 0)
- return true;
+ if (wildcard)
+ {
+ for (tmp_list = list; tmp_list; tmp_list = tmp_list->next)
+ if (*(tmp_list->name) != '!')
+ {
+ if (!fnmatch (tmp_list->name, name, 0))
+ return TRUE;
+ }
+ else
+ {
+ if (fnmatch (tmp_list->name + 1, name, 0))
+ return TRUE;
+ }
+ }
+ else
+ {
+ for (tmp_list = list; tmp_list; tmp_list = tmp_list->next)
+ if (strcmp (name, tmp_list->name) == 0)
+ return TRUE;
+ }
- return false;
+ return FALSE;
}
/* See if a section is being removed. */
-static boolean
-is_strip_section (abfd, sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
+static bfd_boolean
+is_strip_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
{
- struct section_list *p;
+ if (sections_removed || sections_copied)
+ {
+ struct section_list *p;
+
+ p = find_section_list (bfd_get_section_name (abfd, sec), FALSE);
- if ((bfd_get_section_flags (abfd, sec) & SEC_DEBUGGING) != 0
- && (strip_symbols == STRIP_DEBUG
+ if (sections_removed && p != NULL && p->remove)
+ return TRUE;
+ if (sections_copied && (p == NULL || ! p->copy))
+ return TRUE;
+ }
+
+ if ((bfd_get_section_flags (abfd, sec) & SEC_DEBUGGING) != 0)
+ {
+ if (strip_symbols == STRIP_DEBUG
|| strip_symbols == STRIP_UNNEEDED
|| strip_symbols == STRIP_ALL
|| discard_locals == LOCALS_ALL
- || convert_debugging))
- return true;
-
- if (! sections_removed && ! sections_copied)
- return false;
-
- p = find_section_list (bfd_get_section_name (abfd, sec), false);
- if (sections_removed && p != NULL && p->remove)
- return true;
- if (sections_copied && (p == NULL || ! p->copy))
- return true;
- return false;
+ || convert_debugging)
+ return TRUE;
+
+ if (strip_symbols == STRIP_NONDEBUG)
+ return FALSE;
+ }
+
+ return FALSE;
}
/* Choose which symbol entries to copy; put the result in OSYMS.
@@ -730,13 +785,10 @@ is_strip_section (abfd, sec)
Return the number of symbols to print. */
static unsigned int
-filter_symbols (abfd, obfd, osyms, isyms, symcount)
- bfd *abfd;
- bfd *obfd;
- asymbol **osyms, **isyms;
- long symcount;
+filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
+ asymbol **isyms, long symcount)
{
- register asymbol **from = isyms, **to = osyms;
+ asymbol **from = isyms, **to = osyms;
long src_count = 0, dst_count = 0;
int relocatable = (abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
== HAS_RELOC;
@@ -745,51 +797,74 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
{
asymbol *sym = from[src_count];
flagword flags = sym->flags;
- const char *name = bfd_asymbol_name (sym);
+ char *name = (char *) bfd_asymbol_name (sym);
int keep;
- boolean undefined;
+ bfd_boolean undefined;
+ bfd_boolean rem_leading_char;
+ bfd_boolean add_leading_char;
+
+ undefined = bfd_is_und_section (bfd_get_section (sym));
if (redefine_sym_list)
{
- const char *old_name, *new_name;
+ char *old_name, *new_name;
- old_name = bfd_asymbol_name (sym);
- new_name = lookup_sym_redefinition (old_name);
- name = bfd_asymbol_name (sym) = new_name;
+ old_name = (char *) bfd_asymbol_name (sym);
+ new_name = (char *) lookup_sym_redefinition (old_name);
+ bfd_asymbol_name (sym) = new_name;
+ name = new_name;
}
- if (change_leading_char
- && (bfd_get_symbol_leading_char (abfd)
- != bfd_get_symbol_leading_char (obfd))
- && (bfd_get_symbol_leading_char (abfd) == '\0'
- || (name[0] == bfd_get_symbol_leading_char (abfd))))
- {
- if (bfd_get_symbol_leading_char (obfd) == '\0')
- name = bfd_asymbol_name (sym) = name + 1;
- else
- {
- char *n;
-
- n = xmalloc (strlen (name) + 2);
- n[0] = bfd_get_symbol_leading_char (obfd);
- if (bfd_get_symbol_leading_char (abfd) == '\0')
- strcpy (n + 1, name);
- else
- strcpy (n + 1, name + 1);
- name = bfd_asymbol_name (sym) = n;
- }
+ /* Check if we will remove the current leading character. */
+ rem_leading_char =
+ (name[0] == bfd_get_symbol_leading_char (abfd))
+ && (change_leading_char
+ || (remove_leading_char
+ && ((flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+ || undefined
+ || bfd_is_com_section (bfd_get_section (sym)))));
+
+ /* Check if we will add a new leading character. */
+ add_leading_char =
+ change_leading_char
+ && (bfd_get_symbol_leading_char (obfd) != '\0')
+ && (bfd_get_symbol_leading_char (abfd) == '\0'
+ || (name[0] == bfd_get_symbol_leading_char (abfd)));
+
+ /* Short circuit for change_leading_char if we can do it in-place. */
+ if (rem_leading_char && add_leading_char && !prefix_symbols_string)
+ {
+ name[0] = bfd_get_symbol_leading_char (obfd);
+ bfd_asymbol_name (sym) = name;
+ rem_leading_char = FALSE;
+ add_leading_char = FALSE;
+ }
+
+ /* Remove leading char. */
+ if (rem_leading_char)
+ bfd_asymbol_name (sym) = ++name;
+
+ /* Add new leading char and/or prefix. */
+ if (add_leading_char || prefix_symbols_string)
+ {
+ char *n, *ptr;
+
+ ptr = n = xmalloc (1 + strlen (prefix_symbols_string)
+ + strlen (name) + 1);
+ if (add_leading_char)
+ *ptr++ = bfd_get_symbol_leading_char (obfd);
+
+ if (prefix_symbols_string)
+ {
+ strcpy (ptr, prefix_symbols_string);
+ ptr += strlen (prefix_symbols_string);
+ }
+
+ strcpy (ptr, name);
+ bfd_asymbol_name (sym) = n;
+ name = n;
}
- undefined = bfd_is_und_section (bfd_get_section (sym));
-
- if (remove_leading_char
- && ((flags & BSF_GLOBAL) != 0
- || (flags & BSF_WEAK) != 0
- || undefined
- || bfd_is_com_section (bfd_get_section (sym)))
- && name[0] == bfd_get_symbol_leading_char (abfd))
- name = bfd_asymbol_name (sym) = name + 1;
-
if (strip_symbols == STRIP_ALL)
keep = 0;
else if ((flags & BSF_KEEP) != 0 /* Used in relocation. */
@@ -802,7 +877,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
keep = 1;
else if (bfd_decode_symclass (sym) == 'I')
/* Global symbols in $idata sections need to be retained
- even if relocatable is false. External users of the
+ even if relocatable is FALSE. External users of the
library containing the $idata section may reference these
symbols. */
keep = 1;
@@ -859,8 +934,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
/* Find the redefined name of symbol SOURCE. */
static const char *
-lookup_sym_redefinition (source)
- const char *source;
+lookup_sym_redefinition (const char *source)
{
struct redefine_node *list;
@@ -874,9 +948,7 @@ lookup_sym_redefinition (source)
/* Add a node to a symbol redefine list. */
static void
-redefine_list_append (source, target)
- const char *source;
- const char *target;
+redefine_list_append (const char *cause, const char *source, const char *target)
{
struct redefine_node **p;
struct redefine_node *list;
@@ -886,16 +958,14 @@ redefine_list_append (source, target)
{
if (strcmp (source, list->source) == 0)
fatal (_("%s: Multiple redefinition of symbol \"%s\""),
- "--redefine-sym",
- source);
+ cause, source);
if (strcmp (target, list->target) == 0)
fatal (_("%s: Symbol \"%s\" is target of more than one redefinition"),
- "--redefine-sym",
- target);
+ cause, target);
}
- new_node = (struct redefine_node *) xmalloc (sizeof (struct redefine_node));
+ new_node = xmalloc (sizeof (struct redefine_node));
new_node->source = strdup (source);
new_node->target = strdup (target);
@@ -904,50 +974,144 @@ redefine_list_append (source, target)
*p = new_node;
}
-/* Keep only every `copy_byte'th byte in MEMHUNK, which is *SIZE bytes long.
- Adjust *SIZE. */
+/* Handle the --redefine-syms option. Read lines containing "old new"
+ from the file, and add them to the symbol redefine list. */
static void
-filter_bytes (memhunk, size)
- char *memhunk;
- bfd_size_type *size;
+add_redefine_syms_file (const char *filename)
{
- char *from = memhunk + copy_byte, *to = memhunk, *end = memhunk + *size;
+ FILE *file;
+ char *buf;
+ size_t bufsize;
+ size_t len;
+ size_t outsym_off;
+ int c, lineno;
+
+ file = fopen (filename, "r");
+ if (file == NULL)
+ fatal (_("couldn't open symbol redefinition file %s (error: %s)"),
+ filename, strerror (errno));
+
+ bufsize = 100;
+ buf = xmalloc (bufsize);
+
+ lineno = 1;
+ c = getc (file);
+ len = 0;
+ outsym_off = 0;
+ while (c != EOF)
+ {
+ /* Collect the input symbol name. */
+ while (! IS_WHITESPACE (c) && ! IS_LINE_TERMINATOR (c) && c != EOF)
+ {
+ if (c == '#')
+ goto comment;
+ buf[len++] = c;
+ if (len >= bufsize)
+ {
+ bufsize *= 2;
+ buf = xrealloc (buf, bufsize);
+ }
+ c = getc (file);
+ }
+ buf[len++] = '\0';
+ if (c == EOF)
+ break;
+
+ /* Eat white space between the symbol names. */
+ while (IS_WHITESPACE (c))
+ c = getc (file);
+ if (c == '#' || IS_LINE_TERMINATOR (c))
+ goto comment;
+ if (c == EOF)
+ break;
+
+ /* Collect the output symbol name. */
+ outsym_off = len;
+ while (! IS_WHITESPACE (c) && ! IS_LINE_TERMINATOR (c) && c != EOF)
+ {
+ if (c == '#')
+ goto comment;
+ buf[len++] = c;
+ if (len >= bufsize)
+ {
+ bufsize *= 2;
+ buf = xrealloc (buf, bufsize);
+ }
+ c = getc (file);
+ }
+ buf[len++] = '\0';
+ if (c == EOF)
+ break;
+
+ /* Eat white space at end of line. */
+ while (! IS_LINE_TERMINATOR(c) && c != EOF && IS_WHITESPACE (c))
+ c = getc (file);
+ if (c == '#')
+ goto comment;
+ /* Handle \r\n. */
+ if ((c == '\r' && (c = getc (file)) == '\n')
+ || c == '\n' || c == EOF)
+ {
+ end_of_line:
+ /* Append the redefinition to the list. */
+ if (buf[0] != '\0')
+ redefine_list_append (filename, &buf[0], &buf[outsym_off]);
+
+ lineno++;
+ len = 0;
+ outsym_off = 0;
+ if (c == EOF)
+ break;
+ c = getc (file);
+ continue;
+ }
+ else
+ fatal (_("%s: garbage at end of line %d"), filename, lineno);
+ comment:
+ if (len != 0 && (outsym_off == 0 || outsym_off == len))
+ fatal (_("%s: missing new symbol name at line %d"), filename, lineno);
+ buf[len++] = '\0';
+
+ /* Eat the rest of the line and finish it. */
+ while (c != '\n' && c != EOF)
+ c = getc (file);
+ goto end_of_line;
+ }
- for (; from < end; from += interleave)
- *to++ = *from;
+ if (len != 0)
+ fatal (_("%s: premature end of file at line %d"), filename, lineno);
- if (*size % interleave > (bfd_size_type) copy_byte)
- *size = (*size / interleave) + 1;
- else
- *size /= interleave;
+ free (buf);
}
-/* Copy object file IBFD onto OBFD. */
+/* Copy object file IBFD onto OBFD.
+ Returns TRUE upon success, FALSE otherwise. */
-static void
-copy_object (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+static bfd_boolean
+copy_object (bfd *ibfd, bfd *obfd)
{
bfd_vma start;
long symcount;
asection **osections = NULL;
+ asection *gnu_debuglink_section = NULL;
bfd_size_type *gaps = NULL;
bfd_size_type max_gap = 0;
long symsize;
- PTR dhandle;
+ void *dhandle;
+ enum bfd_architecture iarch;
+ unsigned int imach;
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
&& ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
- {
- fatal (_("Unable to change endianness of input file(s)"));
- return;
- }
+ fatal (_("Unable to change endianness of input file(s)"));
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ {
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
+ }
if (verbose)
printf (_("copy from %s(%s) to %s(%s)\n"),
@@ -964,22 +1128,45 @@ copy_object (ibfd, obfd)
need to be set for a core file. */
if (bfd_get_format (obfd) != bfd_core)
{
+ flagword flags;
+
+ flags = bfd_get_file_flags (ibfd);
+ flags |= bfd_flags_to_set;
+ flags &= ~bfd_flags_to_clear;
+ flags &= bfd_applicable_file_flags (obfd);
+
if (!bfd_set_start_address (obfd, start)
- || !bfd_set_file_flags (obfd,
- (bfd_get_file_flags (ibfd)
- & bfd_applicable_file_flags (obfd))))
- RETURN_NONFATAL (bfd_get_filename (ibfd));
+ || !bfd_set_file_flags (obfd, flags))
+ {
+ bfd_nonfatal (bfd_get_filename (ibfd));
+ return FALSE;
+ }
}
/* Copy architecture of input file to output file. */
- if (!bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
- bfd_get_mach (ibfd)))
- non_fatal (_("Warning: Output file cannot represent architecture %s"),
- bfd_printable_arch_mach (bfd_get_arch (ibfd),
- bfd_get_mach (ibfd)));
+ iarch = bfd_get_arch (ibfd);
+ imach = bfd_get_mach (ibfd);
+ if (!bfd_set_arch_mach (obfd, iarch, imach)
+ && (ibfd->target_defaulted
+ || bfd_get_arch (ibfd) != bfd_get_arch (obfd)))
+ {
+ if (bfd_get_arch (ibfd) == bfd_arch_unknown)
+ fatal (_("Unable to recognise the format of the input file %s"),
+ bfd_get_filename (ibfd));
+ else
+ {
+ non_fatal (_("Warning: Output file cannot represent architecture %s"),
+ bfd_printable_arch_mach (bfd_get_arch (ibfd),
+ bfd_get_mach (ibfd)));
+ return FALSE;
+ }
+ }
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- RETURN_NONFATAL (bfd_get_filename (ibfd));
+ {
+ bfd_nonfatal (bfd_get_filename (ibfd));
+ return FALSE;
+ }
if (isympp)
free (isympp);
@@ -989,7 +1176,7 @@ copy_object (ibfd, obfd)
/* BFD mandates that all output sections be created and sizes set before
any output is done. Thus, we traverse all sections multiple times. */
- bfd_map_over_sections (ibfd, setup_section, (void *) obfd);
+ bfd_map_over_sections (ibfd, setup_section, obfd);
if (add_sections != NULL)
{
@@ -998,53 +1185,81 @@ copy_object (ibfd, obfd)
for (padd = add_sections; padd != NULL; padd = padd->next)
{
+ flagword flags;
+
padd->section = bfd_make_section (obfd, padd->name);
if (padd->section == NULL)
{
non_fatal (_("can't create section `%s': %s"),
padd->name, bfd_errmsg (bfd_get_error ()));
- status = 1;
- return;
+ return FALSE;
}
- else
+
+ if (! bfd_set_section_size (obfd, padd->section, padd->size))
{
- flagword flags;
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
+ }
- if (! bfd_set_section_size (obfd, padd->section, padd->size))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ pset = find_section_list (padd->name, FALSE);
+ if (pset != NULL)
+ pset->used = TRUE;
- pset = find_section_list (padd->name, false);
- if (pset != NULL)
- pset->used = true;
+ if (pset != NULL && pset->set_flags)
+ flags = pset->flags | SEC_HAS_CONTENTS;
+ else
+ flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DATA;
- if (pset != NULL && pset->set_flags)
- flags = pset->flags | SEC_HAS_CONTENTS;
- else
- flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DATA;
+ if (! bfd_set_section_flags (obfd, padd->section, flags))
+ {
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
+ }
- if (! bfd_set_section_flags (obfd, padd->section, flags))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ if (pset != NULL)
+ {
+ if (pset->change_vma != CHANGE_IGNORE)
+ if (! bfd_set_section_vma (obfd, padd->section,
+ pset->vma_val))
+ {
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
+ }
- if (pset != NULL)
+ if (pset->change_lma != CHANGE_IGNORE)
{
- if (pset->change_vma != CHANGE_IGNORE)
- if (! bfd_set_section_vma (obfd, padd->section, pset->vma_val))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ padd->section->lma = pset->lma_val;
- if (pset->change_lma != CHANGE_IGNORE)
+ if (! bfd_set_section_alignment
+ (obfd, padd->section,
+ bfd_section_alignment (obfd, padd->section)))
{
- padd->section->lma = pset->lma_val;
-
- if (! bfd_set_section_alignment
- (obfd, padd->section,
- bfd_section_alignment (obfd, padd->section)))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
}
}
}
}
}
+ if (gnu_debuglink_filename != NULL)
+ {
+ gnu_debuglink_section = bfd_create_gnu_debuglink_section
+ (obfd, gnu_debuglink_filename);
+
+ if (gnu_debuglink_section == NULL)
+ {
+ bfd_nonfatal (gnu_debuglink_filename);
+ return FALSE;
+ }
+ }
+
+ if (bfd_count_sections (obfd) == 0)
+ {
+ non_fatal (_("there are no sections to be copied!"));
+ return FALSE;
+ }
+
if (gap_fill_set || pad_to_set)
{
asection **set;
@@ -1057,13 +1272,13 @@ copy_object (ibfd, obfd)
We write out the gap contents below. */
c = bfd_count_sections (obfd);
- osections = (asection **) xmalloc (c * sizeof (asection *));
+ osections = xmalloc (c * sizeof (asection *));
set = osections;
- bfd_map_over_sections (obfd, get_sections, (void *) &set);
+ bfd_map_over_sections (obfd, get_sections, &set);
qsort (osections, c, sizeof (asection *), compare_section_lma);
- gaps = (bfd_size_type *) xmalloc (c * sizeof (bfd_size_type));
+ gaps = xmalloc (c * sizeof (bfd_size_type));
memset (gaps, 0, c * sizeof (bfd_size_type));
if (gap_fill_set)
@@ -1132,12 +1347,18 @@ copy_object (ibfd, obfd)
dhandle = NULL;
symsize = bfd_get_symtab_upper_bound (ibfd);
if (symsize < 0)
- RETURN_NONFATAL (bfd_get_filename (ibfd));
+ {
+ bfd_nonfatal (bfd_get_filename (ibfd));
+ return FALSE;
+ }
- osympp = isympp = (asymbol **) xmalloc (symsize);
+ osympp = isympp = xmalloc (symsize);
symcount = bfd_canonicalize_symtab (ibfd, isympp);
if (symcount < 0)
- RETURN_NONFATAL (bfd_get_filename (ibfd));
+ {
+ bfd_nonfatal (bfd_get_filename (ibfd));
+ return FALSE;
+ }
if (convert_debugging)
dhandle = read_debugging_info (ibfd, isympp, symcount);
@@ -1145,12 +1366,14 @@ copy_object (ibfd, obfd)
if (strip_symbols == STRIP_DEBUG
|| strip_symbols == STRIP_ALL
|| strip_symbols == STRIP_UNNEEDED
+ || strip_symbols == STRIP_NONDEBUG
|| discard_locals != LOCALS_UNDEF
|| strip_specific_list != NULL
|| keep_specific_list != NULL
|| localize_specific_list != NULL
|| keepglobal_specific_list != NULL
|| weaken_specific_list != NULL
+ || prefix_symbols_string
|| sections_removed
|| sections_copied
|| convert_debugging
@@ -1170,8 +1393,8 @@ copy_object (ibfd, obfd)
if (strip_symbols != STRIP_ALL)
bfd_map_over_sections (ibfd,
mark_symbols_used_in_relocations,
- (PTR)isympp);
- osympp = (asymbol **) xmalloc ((symcount + 1) * sizeof (asymbol *));
+ isympp);
+ osympp = xmalloc ((symcount + 1) * sizeof (asymbol *));
symcount = filter_symbols (ibfd, obfd, osympp, isympp, symcount);
}
@@ -1180,14 +1403,14 @@ copy_object (ibfd, obfd)
if (! write_debugging_info (obfd, dhandle, &symcount, &osympp))
{
status = 1;
- return;
+ return FALSE;
}
}
bfd_set_symtab (obfd, osympp, symcount);
/* This has to happen after the symbol table has been set. */
- bfd_map_over_sections (ibfd, copy_section, (void *) obfd);
+ bfd_map_over_sections (ibfd, copy_section, obfd);
if (add_sections != NULL)
{
@@ -1195,11 +1418,22 @@ copy_object (ibfd, obfd)
for (padd = add_sections; padd != NULL; padd = padd->next)
{
- if (! bfd_set_section_contents (obfd, padd->section,
- (PTR) padd->contents,
- (file_ptr) 0,
- (bfd_size_type) padd->size))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ if (! bfd_set_section_contents (obfd, padd->section, padd->contents,
+ 0, padd->size))
+ {
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
+ }
+ }
+ }
+
+ if (gnu_debuglink_filename != NULL)
+ {
+ if (! bfd_fill_in_gnu_debuglink_section
+ (obfd, gnu_debuglink_section, gnu_debuglink_filename))
+ {
+ bfd_nonfatal (gnu_debuglink_filename);
+ return FALSE;
}
}
@@ -1211,8 +1445,8 @@ copy_object (ibfd, obfd)
/* Fill in the gaps. */
if (max_gap > 8192)
max_gap = 8192;
- buf = (bfd_byte *) xmalloc (max_gap);
- memset (buf, gap_fill, (size_t) max_gap);
+ buf = xmalloc (max_gap);
+ memset (buf, gap_fill, max_gap);
c = bfd_count_sections (obfd);
for (i = 0; i < c; i++)
@@ -1236,7 +1470,10 @@ copy_object (ibfd, obfd)
if (! bfd_set_section_contents (obfd, osections[i], buf,
off, now))
- RETURN_NONFATAL (bfd_get_filename (obfd));
+ {
+ bfd_nonfatal (bfd_get_filename (obfd));
+ return FALSE;
+ }
left -= now;
off += now;
@@ -1249,23 +1486,27 @@ copy_object (ibfd, obfd)
from the input BFD to the output BFD. This is done last to
permit the routine to look at the filtered symbol table, which is
important for the ECOFF code at least. */
- if (! bfd_copy_private_bfd_data (ibfd, obfd))
+ if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour
+ && strip_symbols == STRIP_NONDEBUG)
+ /* Do not copy the private data when creating an ELF format
+ debug info file. We do not want the program headers. */
+ ;
+ else if (! bfd_copy_private_bfd_data (ibfd, obfd))
{
non_fatal (_("%s: error copying private BFD data: %s"),
bfd_get_filename (obfd),
bfd_errmsg (bfd_get_error ()));
- status = 1;
- return;
+ return FALSE;
}
/* Switch to the alternate machine code. We have to do this at the
very end, because we only initialize the header when we create
the first section. */
- if (use_alt_mach_code != 0)
- {
- if (!bfd_alt_mach_code (obfd, use_alt_mach_code))
- non_fatal (_("unknown alternate machine code, ignored"));
- }
+ if (use_alt_mach_code != 0
+ && ! bfd_alt_mach_code (obfd, use_alt_mach_code))
+ non_fatal (_("unknown alternate machine code, ignored"));
+
+ return TRUE;
}
#undef MKDIR
@@ -1279,10 +1520,7 @@ copy_object (ibfd, obfd)
contents to temp file, and keep the temp file handle. */
static void
-copy_archive (ibfd, obfd, output_target)
- bfd *ibfd;
- bfd *obfd;
- const char *output_target;
+copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
{
struct name_list
{
@@ -1296,10 +1534,9 @@ copy_archive (ibfd, obfd, output_target)
/* Make a temp directory to hold the contents. */
if (MKDIR (dir, 0700) != 0)
- {
- fatal (_("cannot mkdir %s for archive copying (error: %s)"),
- dir, strerror (errno));
- }
+ fatal (_("cannot mkdir %s for archive copying (error: %s)"),
+ dir, strerror (errno));
+
obfd->has_armap = ibfd->has_armap;
list = NULL;
@@ -1309,13 +1546,14 @@ copy_archive (ibfd, obfd, output_target)
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
RETURN_NONFATAL (bfd_get_filename (obfd));
- while (!status && this_element != (bfd *) NULL)
+ while (!status && this_element != NULL)
{
char *output_name;
bfd *output_bfd;
bfd *last_element;
struct stat buf;
int stat_status = 0;
+ bfd_boolean delete = TRUE;
/* Create an output file for this member. */
output_name = concat (dir, "/",
@@ -1326,11 +1564,10 @@ copy_archive (ibfd, obfd, output_target)
{
output_name = make_tempname (output_name);
if (MKDIR (output_name, 0700) != 0)
- {
- fatal (_("cannot mkdir %s for archive copying (error: %s)"),
- output_name, strerror (errno));
- }
- l = (struct name_list *) xmalloc (sizeof (struct name_list));
+ fatal (_("cannot mkdir %s for archive copying (error: %s)"),
+ output_name, strerror (errno));
+
+ l = xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
l->obfd = NULL;
@@ -1349,16 +1586,16 @@ copy_archive (ibfd, obfd, output_target)
bfd_get_filename (this_element));
}
- l = (struct name_list *) xmalloc (sizeof (struct name_list));
+ l = xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
list = l;
- if (output_bfd == (bfd *) NULL)
+ if (output_bfd == NULL)
RETURN_NONFATAL (output_name);
- if (bfd_check_format (this_element, bfd_object) == true)
- copy_object (this_element, output_bfd);
+ if (bfd_check_format (this_element, bfd_object))
+ delete = ! copy_object (this_element, output_bfd);
if (!bfd_close (output_bfd))
{
@@ -1367,24 +1604,32 @@ copy_archive (ibfd, obfd, output_target)
status = 1;
}
- if (preserve_dates && stat_status == 0)
- set_times (output_name, &buf);
+ if (delete)
+ {
+ unlink (output_name);
+ status = 1;
+ }
+ else
+ {
+ if (preserve_dates && stat_status == 0)
+ set_times (output_name, &buf);
- /* Open the newly output file and attach to our list. */
- output_bfd = bfd_openr (output_name, output_target);
+ /* Open the newly output file and attach to our list. */
+ output_bfd = bfd_openr (output_name, output_target);
- l->obfd = output_bfd;
+ l->obfd = output_bfd;
- *ptr = output_bfd;
- ptr = &output_bfd->next;
+ *ptr = output_bfd;
+ ptr = &output_bfd->next;
- last_element = this_element;
+ last_element = this_element;
- this_element = bfd_openr_next_archived_file (ibfd, last_element);
+ this_element = bfd_openr_next_archived_file (ibfd, last_element);
- bfd_close (last_element);
+ bfd_close (last_element);
+ }
}
- *ptr = (bfd *) NULL;
+ *ptr = NULL;
if (!bfd_close (obfd))
RETURN_NONFATAL (bfd_get_filename (obfd));
@@ -1409,14 +1654,18 @@ copy_archive (ibfd, obfd, output_target)
/* The top-level control. */
static void
-copy_file (input_filename, output_filename, input_target, output_target)
- const char *input_filename;
- const char *output_filename;
- const char *input_target;
- const char *output_target;
+copy_file (const char *input_filename, const char *output_filename,
+ const char *input_target, const char *output_target)
{
bfd *ibfd;
- char **matching;
+ char **obj_matching;
+ char **core_matching;
+
+ if (get_file_size (input_filename) < 1)
+ {
+ status = 1;
+ return;
+ }
/* To allow us to do "strip *" without dying on the first
non-object file, failures are nonfatal. */
@@ -1439,10 +1688,11 @@ copy_file (input_filename, output_filename, input_target, output_target)
copy_archive (ibfd, obfd, output_target);
}
- else if (bfd_check_format_matches (ibfd, bfd_object, &matching)
- || bfd_check_format_matches (ibfd, bfd_core, &matching))
+ else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
{
bfd *obfd;
+ bfd_boolean delete;
+ do_copy:
/* bfd_get_target does not return the correct value until
bfd_check_format succeeds. */
@@ -1453,22 +1703,49 @@ copy_file (input_filename, output_filename, input_target, output_target)
if (obfd == NULL)
RETURN_NONFATAL (output_filename);
- copy_object (ibfd, obfd);
+ delete = ! copy_object (ibfd, obfd);
if (!bfd_close (obfd))
RETURN_NONFATAL (output_filename);
if (!bfd_close (ibfd))
RETURN_NONFATAL (input_filename);
+
+ if (delete)
+ {
+ unlink (output_filename);
+ status = 1;
+ }
}
else
{
+ bfd_error_type obj_error = bfd_get_error ();
+ bfd_error_type core_error;
+
+ if (bfd_check_format_matches (ibfd, bfd_core, &core_matching))
+ {
+ /* This probably can't happen.. */
+ if (obj_error == bfd_error_file_ambiguously_recognized)
+ free (obj_matching);
+ goto do_copy;
+ }
+
+ core_error = bfd_get_error ();
+ /* Report the object error in preference to the core error. */
+ if (obj_error != core_error)
+ bfd_set_error (obj_error);
+
bfd_nonfatal (input_filename);
- if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ if (obj_error == bfd_error_file_ambiguously_recognized)
{
- list_matching_formats (matching);
- free (matching);
+ list_matching_formats (obj_matching);
+ free (obj_matching);
+ }
+ if (core_error == bfd_error_file_ambiguously_recognized)
+ {
+ list_matching_formats (core_matching);
+ free (core_matching);
}
status = 1;
@@ -1478,10 +1755,8 @@ copy_file (input_filename, output_filename, input_target, output_target)
/* Add a name to the section renaming list. */
static void
-add_section_rename (old_name, new_name, flags)
- const char * old_name;
- const char * new_name;
- flagword flags;
+add_section_rename (const char * old_name, const char * new_name,
+ flagword flags)
{
section_rename * rename;
@@ -1497,7 +1772,7 @@ add_section_rename (old_name, new_name, flags)
fatal (_("Multiple renames of section %s"), old_name);
}
- rename = (section_rename *) xmalloc (sizeof (* rename));
+ rename = xmalloc (sizeof (* rename));
rename->old_name = old_name;
rename->new_name = new_name;
@@ -1512,10 +1787,8 @@ add_section_rename (old_name, new_name, flags)
Also set RETURNED_FLAGS to the flags to be used for this section. */
static const char *
-find_section_rename (ibfd, isection, returned_flags)
- bfd * ibfd ATTRIBUTE_UNUSED;
- sec_ptr isection;
- flagword * returned_flags;
+find_section_rename (bfd * ibfd ATTRIBUTE_UNUSED, sec_ptr isection,
+ flagword * returned_flags)
{
const char * old_name = bfd_section_name (ibfd, isection);
section_rename * rename;
@@ -1539,12 +1812,9 @@ find_section_rename (ibfd, isection, returned_flags)
name and attributes as ISECTION in IBFD. */
static void
-setup_section (ibfd, isection, obfdarg)
- bfd *ibfd;
- sec_ptr isection;
- PTR obfdarg;
+setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
{
- bfd *obfd = (bfd *) obfdarg;
+ bfd *obfd = obfdarg;
struct section_list *p;
sec_ptr osection;
bfd_size_type size;
@@ -1553,27 +1823,35 @@ setup_section (ibfd, isection, obfdarg)
flagword flags;
const char *err;
const char * name;
+ char *prefix = NULL;
- if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0
- && (strip_symbols == STRIP_DEBUG
- || strip_symbols == STRIP_UNNEEDED
- || strip_symbols == STRIP_ALL
- || discard_locals == LOCALS_ALL
- || convert_debugging))
+ if (is_strip_section (ibfd, isection))
return;
- p = find_section_list (bfd_section_name (ibfd, isection), false);
+ p = find_section_list (bfd_section_name (ibfd, isection), FALSE);
if (p != NULL)
- p->used = true;
-
- if (sections_removed && p != NULL && p->remove)
- return;
- if (sections_copied && (p == NULL || ! p->copy))
- return;
+ p->used = TRUE;
/* Get the, possibly new, name of the output section. */
name = find_section_rename (ibfd, isection, & flags);
+ /* Prefix sections. */
+ if ((prefix_alloc_sections_string)
+ && (bfd_get_section_flags (ibfd, isection) & SEC_ALLOC))
+ prefix = prefix_alloc_sections_string;
+ else if (prefix_sections_string)
+ prefix = prefix_sections_string;
+
+ if (prefix)
+ {
+ char *n;
+
+ n = xmalloc (strlen (prefix) + strlen (name) + 1);
+ strcpy (n, prefix);
+ strcat (n, name);
+ name = n;
+ }
+
osection = bfd_make_section_anyway (obfd, name);
if (osection == NULL)
@@ -1622,10 +1900,9 @@ setup_section (ibfd, isection, obfdarg)
/* FIXME: This is probably not enough. If we change the LMA we
may have to recompute the header for the file as well. */
- if (bfd_set_section_alignment (obfd,
- osection,
- bfd_section_alignment (ibfd, isection))
- == false)
+ if (!bfd_set_section_alignment (obfd,
+ osection,
+ bfd_section_alignment (ibfd, isection)))
{
err = _("alignment");
goto loser;
@@ -1633,6 +1910,13 @@ setup_section (ibfd, isection, obfdarg)
if (p != NULL && p->set_flags)
flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC));
+ else if (strip_symbols == STRIP_NONDEBUG && (flags & SEC_ALLOC) != 0)
+ {
+ flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD);
+ if (obfd->xvec->flavour == bfd_target_elf_flavour)
+ elf_section_type (osection) = SHT_NOBITS;
+ }
+
if (!bfd_set_section_flags (obfd, osection, flags))
{
err = _("flags");
@@ -1650,7 +1934,12 @@ setup_section (ibfd, isection, obfdarg)
/* Allow the BFD backend to copy any private data it understands
from the input section to the output section. */
- if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
+ if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour
+ && strip_symbols == STRIP_NONDEBUG)
+ /* Do not copy the private data when creating an ELF format
+ debug info file. We do not want the program headers. */
+ ;
+ else if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
{
err = _("private data");
goto loser;
@@ -1672,12 +1961,9 @@ loser:
If stripping then don't copy any relocation info. */
static void
-copy_section (ibfd, isection, obfdarg)
- bfd *ibfd;
- sec_ptr isection;
- PTR obfdarg;
+copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
{
- bfd *obfd = (bfd *) obfdarg;
+ bfd *obfd = obfdarg;
struct section_list *p;
arelent **relpp;
long relcount;
@@ -1691,45 +1977,43 @@ copy_section (ibfd, isection, obfdarg)
if (status != 0)
return;
- flags = bfd_get_section_flags (ibfd, isection);
- if ((flags & SEC_DEBUGGING) != 0
- && (strip_symbols == STRIP_DEBUG
- || strip_symbols == STRIP_UNNEEDED
- || strip_symbols == STRIP_ALL
- || discard_locals == LOCALS_ALL
- || convert_debugging))
+ if (is_strip_section (ibfd, isection))
return;
+ flags = bfd_get_section_flags (ibfd, isection);
if ((flags & SEC_GROUP) != 0)
return;
- p = find_section_list (bfd_section_name (ibfd, isection), false);
-
- if (sections_removed && p != NULL && p->remove)
- return;
- if (sections_copied && (p == NULL || ! p->copy))
- return;
-
osection = isection->output_section;
size = bfd_get_section_size_before_reloc (isection);
if (size == 0 || osection == 0)
return;
+ p = find_section_list (bfd_get_section_name (ibfd, isection), FALSE);
+
/* Core files do not need to be relocated. */
if (bfd_get_format (obfd) == bfd_core)
relsize = 0;
else
- relsize = bfd_get_reloc_upper_bound (ibfd, isection);
+ {
+ relsize = bfd_get_reloc_upper_bound (ibfd, isection);
- if (relsize < 0)
- RETURN_NONFATAL (bfd_get_filename (ibfd));
+ if (relsize < 0)
+ {
+ /* Do not complain if the target does not support relocations. */
+ if (relsize == -1 && bfd_get_error () == bfd_error_invalid_operation)
+ relsize = 0;
+ else
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
+ }
+ }
if (relsize == 0)
- bfd_set_reloc (obfd, osection, (arelent **) NULL, 0);
+ bfd_set_reloc (obfd, osection, NULL, 0);
else
{
- relpp = (arelent **) xmalloc (relsize);
+ relpp = xmalloc (relsize);
relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, isympp);
if (relcount < 0)
RETURN_NONFATAL (bfd_get_filename (ibfd));
@@ -1742,45 +2026,54 @@ copy_section (ibfd, isection, obfdarg)
long temp_relcount = 0;
long i;
- temp_relpp = (arelent **) xmalloc (relsize);
+ temp_relpp = xmalloc (relsize);
for (i = 0; i < relcount; i++)
- if (is_specified_symbol
- (bfd_asymbol_name (*relpp [i]->sym_ptr_ptr),
- keep_specific_list))
+ if (is_specified_symbol (bfd_asymbol_name (*relpp[i]->sym_ptr_ptr),
+ keep_specific_list))
temp_relpp [temp_relcount++] = relpp [i];
relcount = temp_relcount;
free (relpp);
relpp = temp_relpp;
}
- bfd_set_reloc (obfd, osection,
- (relcount == 0 ? (arelent **) NULL : relpp), relcount);
+ bfd_set_reloc (obfd, osection, relcount == 0 ? NULL : relpp, relcount);
+ if (relcount == 0)
+ free (relpp);
}
isection->_cooked_size = isection->_raw_size;
- isection->reloc_done = true;
+ isection->reloc_done = TRUE;
if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS
&& bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS)
{
- PTR memhunk = (PTR) xmalloc ((unsigned) size);
+ void *memhunk = xmalloc (size);
- if (!bfd_get_section_contents (ibfd, isection, memhunk, (file_ptr) 0,
- size))
+ if (!bfd_get_section_contents (ibfd, isection, memhunk, 0, size))
RETURN_NONFATAL (bfd_get_filename (ibfd));
if (copy_byte >= 0)
- filter_bytes (memhunk, &size);
+ {
+ /* Keep only every `copy_byte'th byte in MEMHUNK. */
+ char *from = (char *) memhunk + copy_byte;
+ char *to = memhunk;
+ char *end = (char *) memhunk + size;
+
+ for (; from < end; from += interleave)
+ *to++ = *from;
- if (!bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0,
- size))
+ size = (size + interleave - 1 - copy_byte) / interleave;
+ osection->lma /= interleave;
+ }
+
+ if (!bfd_set_section_contents (obfd, osection, memhunk, 0, size))
RETURN_NONFATAL (bfd_get_filename (obfd));
free (memhunk);
}
else if (p != NULL && p->set_flags && (p->flags & SEC_HAS_CONTENTS) != 0)
{
- PTR memhunk = (PTR) xmalloc ((unsigned) size);
+ void *memhunk = xmalloc (size);
/* We don't permit the user to turn off the SEC_HAS_CONTENTS
flag--they can just remove the section entirely and add it
@@ -1789,8 +2082,7 @@ copy_section (ibfd, isection, obfdarg)
contents should be zeroed out. */
memset (memhunk, 0, size);
- if (! bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0,
- size))
+ if (! bfd_set_section_contents (obfd, osection, memhunk, 0, size))
RETURN_NONFATAL (bfd_get_filename (obfd));
free (memhunk);
}
@@ -1800,12 +2092,9 @@ copy_section (ibfd, isection, obfdarg)
used. */
static void
-get_sections (obfd, osection, secppparg)
- bfd *obfd ATTRIBUTE_UNUSED;
- asection *osection;
- PTR secppparg;
+get_sections (bfd *obfd ATTRIBUTE_UNUSED, asection *osection, void *secppparg)
{
- asection ***secppp = (asection ***) secppparg;
+ asection ***secppp = secppparg;
**secppp = osection;
++(*secppp);
@@ -1816,12 +2105,10 @@ get_sections (obfd, osection, secppparg)
sections to the front, where they are easier to ignore. */
static int
-compare_section_lma (arg1, arg2)
- const PTR arg1;
- const PTR arg2;
+compare_section_lma (const void *arg1, const void *arg2)
{
- const asection **sec1 = (const asection **) arg1;
- const asection **sec2 = (const asection **) arg2;
+ const asection *const *sec1 = arg1;
+ const asection *const *sec2 = arg2;
flagword flags1, flags2;
/* Sort non loadable sections to the front. */
@@ -1862,12 +2149,9 @@ compare_section_lma (arg1, arg2)
Ignore relocations which will not appear in the output file. */
static void
-mark_symbols_used_in_relocations (ibfd, isection, symbolsarg)
- bfd *ibfd;
- sec_ptr isection;
- PTR symbolsarg;
+mark_symbols_used_in_relocations (bfd *ibfd, sec_ptr isection, void *symbolsarg)
{
- asymbol **symbols = (asymbol **) symbolsarg;
+ asymbol **symbols = symbolsarg;
long relsize;
arelent **relpp;
long relcount, i;
@@ -1878,12 +2162,17 @@ mark_symbols_used_in_relocations (ibfd, isection, symbolsarg)
relsize = bfd_get_reloc_upper_bound (ibfd, isection);
if (relsize < 0)
- bfd_fatal (bfd_get_filename (ibfd));
+ {
+ /* Do not complain if the target does not support relocations. */
+ if (relsize == -1 && bfd_get_error () == bfd_error_invalid_operation)
+ return;
+ bfd_fatal (bfd_get_filename (ibfd));
+ }
if (relsize == 0)
return;
- relpp = (arelent **) xmalloc (relsize);
+ relpp = xmalloc (relsize);
relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, symbols);
if (relcount < 0)
bfd_fatal (bfd_get_filename (ibfd));
@@ -1904,12 +2193,10 @@ mark_symbols_used_in_relocations (ibfd, isection, symbolsarg)
/* Write out debugging information. */
-static boolean
-write_debugging_info (obfd, dhandle, symcountp, symppp)
- bfd *obfd;
- PTR dhandle;
- long *symcountp ATTRIBUTE_UNUSED;
- asymbol ***symppp ATTRIBUTE_UNUSED;
+static bfd_boolean
+write_debugging_info (bfd *obfd, void *dhandle,
+ long *symcountp ATTRIBUTE_UNUSED,
+ asymbol ***symppp ATTRIBUTE_UNUSED)
{
if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour)
return write_ieee_debugging_info (obfd, dhandle);
@@ -1924,7 +2211,7 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
if (! write_stabs_in_sections_debugging_info (obfd, dhandle, &syms,
&symsize, &strings,
&stringsize))
- return false;
+ return FALSE;
stabsec = bfd_make_section (obfd, ".stab");
stabstrsec = bfd_make_section (obfd, ".stabstr");
@@ -1946,44 +2233,44 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
non_fatal (_("%s: can't create debugging section: %s"),
bfd_get_filename (obfd),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
/* We can get away with setting the section contents now because
the next thing the caller is going to do is copy over the
real sections. We may someday have to split the contents
setting out of this function. */
- if (! bfd_set_section_contents (obfd, stabsec, syms, (file_ptr) 0,
- symsize)
- || ! bfd_set_section_contents (obfd, stabstrsec, strings,
- (file_ptr) 0, stringsize))
+ if (! bfd_set_section_contents (obfd, stabsec, syms, 0, symsize)
+ || ! bfd_set_section_contents (obfd, stabstrsec, strings, 0,
+ stringsize))
{
non_fatal (_("%s: can't set debugging section contents: %s"),
bfd_get_filename (obfd),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
non_fatal (_("%s: don't know how to write debugging information for %s"),
bfd_get_filename (obfd), bfd_get_target (obfd));
- return false;
+ return FALSE;
}
static int
-strip_main (argc, argv)
- int argc;
- char *argv[];
+strip_main (int argc, char *argv[])
{
- char *input_target = NULL, *output_target = NULL;
- boolean show_version = false;
- int c, i;
+ char *input_target = NULL;
+ char *output_target = NULL;
+ bfd_boolean show_version = FALSE;
+ bfd_boolean formats_info = FALSE;
+ int c;
+ int i;
struct section_list *p;
char *output_file = NULL;
- while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXHhVv",
+ while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXHhVvw",
strip_options, (int *) 0)) != EOF)
{
switch (c)
@@ -1998,9 +2285,9 @@ strip_main (argc, argv)
input_target = output_target = optarg;
break;
case 'R':
- p = find_section_list (optarg, true);
- p->remove = true;
- sections_removed = true;
+ p = find_section_list (optarg, TRUE);
+ p->remove = TRUE;
+ sections_removed = TRUE;
break;
case 's':
strip_symbols = STRIP_ALL;
@@ -2023,7 +2310,7 @@ strip_main (argc, argv)
output_file = optarg;
break;
case 'p':
- preserve_dates = true;
+ preserve_dates = TRUE;
break;
case 'x':
discard_locals = LOCALS_ALL;
@@ -2032,14 +2319,23 @@ strip_main (argc, argv)
discard_locals = LOCALS_START_L;
break;
case 'v':
- verbose = true;
+ verbose = TRUE;
break;
case 'V':
- show_version = true;
+ show_version = TRUE;
+ break;
+ case OPTION_FORMATS_INFO:
+ formats_info = TRUE;
+ break;
+ case OPTION_ONLY_KEEP_DEBUG:
+ strip_symbols = STRIP_NONDEBUG;
break;
case 0:
/* We've been given a long option. */
break;
+ case 'w':
+ wildcard = TRUE;
+ break;
case 'H':
case 'h':
strip_usage (stdout, 0);
@@ -2048,6 +2344,12 @@ strip_main (argc, argv)
}
}
+ if (formats_info)
+ {
+ display_info ();
+ return 0;
+ }
+
if (show_version)
print_version ("strip");
@@ -2057,7 +2359,7 @@ strip_main (argc, argv)
&& strip_specific_list == NULL)
strip_symbols = STRIP_ALL;
- if (output_target == (char *) NULL)
+ if (output_target == NULL)
output_target = input_target;
i = optind;
@@ -2071,14 +2373,13 @@ strip_main (argc, argv)
struct stat statbuf;
char *tmpname;
+ if (get_file_size (argv[i]) < 1)
+ continue;
+
if (preserve_dates)
- {
- if (stat (argv[i], &statbuf) < 0)
- {
- non_fatal (_("%s: cannot stat: %s"), argv[i], strerror (errno));
- continue;
- }
- }
+ /* No need to check the return value of stat().
+ It has already been checked in get_file_size(). */
+ stat (argv[i], &statbuf);
if (output_file != NULL)
tmpname = output_file;
@@ -2105,20 +2406,21 @@ strip_main (argc, argv)
}
static int
-copy_main (argc, argv)
- int argc;
- char *argv[];
+copy_main (int argc, char *argv[])
{
char * binary_architecture = NULL;
- char *input_filename = NULL, *output_filename = NULL;
- char *input_target = NULL, *output_target = NULL;
- boolean show_version = false;
- boolean change_warn = true;
+ char *input_filename = NULL;
+ char *output_filename = NULL;
+ char *input_target = NULL;
+ char *output_target = NULL;
+ bfd_boolean show_version = FALSE;
+ bfd_boolean change_warn = TRUE;
+ bfd_boolean formats_info = FALSE;
int c;
struct section_list *p;
struct stat statbuf;
- while ((c = getopt_long (argc, argv, "b:B:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXHhVvW:",
+ while ((c = getopt_long (argc, argv, "b:B:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXHhVvW:w",
copy_options, (int *) 0)) != EOF)
{
switch (c)
@@ -2154,19 +2456,19 @@ copy_main (argc, argv)
break;
case 'j':
- p = find_section_list (optarg, true);
+ p = find_section_list (optarg, TRUE);
if (p->remove)
fatal (_("%s both copied and removed"), optarg);
- p->copy = true;
- sections_copied = true;
+ p->copy = TRUE;
+ sections_copied = TRUE;
break;
case 'R':
- p = find_section_list (optarg, true);
+ p = find_section_list (optarg, TRUE);
if (p->copy)
fatal (_("%s both copied and removed"), optarg);
- p->remove = true;
- sections_removed = true;
+ p->remove = TRUE;
+ sections_removed = TRUE;
break;
case 'S':
@@ -2181,6 +2483,14 @@ copy_main (argc, argv)
strip_symbols = STRIP_UNNEEDED;
break;
+ case OPTION_ONLY_KEEP_DEBUG:
+ strip_symbols = STRIP_NONDEBUG;
+ break;
+
+ case OPTION_ADD_GNU_DEBUGLINK:
+ gnu_debuglink_filename = optarg;
+ break;
+
case 'K':
add_specific_symbol (optarg, &keep_specific_list);
break;
@@ -2202,7 +2512,11 @@ copy_main (argc, argv)
break;
case 'p':
- preserve_dates = true;
+ preserve_dates = TRUE;
+ break;
+
+ case 'w':
+ wildcard = TRUE;
break;
case 'x':
@@ -2214,21 +2528,25 @@ copy_main (argc, argv)
break;
case 'v':
- verbose = true;
+ verbose = TRUE;
break;
case 'V':
- show_version = true;
+ show_version = TRUE;
+ break;
+
+ case OPTION_FORMATS_INFO:
+ formats_info = TRUE;
break;
case OPTION_WEAKEN:
- weaken = true;
+ weaken = TRUE;
break;
case OPTION_ADD_SECTION:
{
const char *s;
- struct stat st;
+ off_t size;
struct section_add *pa;
int len;
char *name;
@@ -2239,26 +2557,27 @@ copy_main (argc, argv)
if (s == NULL)
fatal (_("bad format for %s"), "--add-section");
- if (stat (s + 1, & st) < 0)
- fatal (_("cannot stat: %s: %s"), s + 1, strerror (errno));
+ size = get_file_size (s + 1);
+ if (size < 1)
+ break;
- pa = (struct section_add *) xmalloc (sizeof (struct section_add));
+ pa = xmalloc (sizeof (struct section_add));
len = s - optarg;
- name = (char *) xmalloc (len + 1);
+ name = xmalloc (len + 1);
strncpy (name, optarg, len);
name[len] = '\0';
pa->name = name;
pa->filename = s + 1;
+ pa->size = size;
+ pa->contents = xmalloc (size);
- pa->size = st.st_size;
-
- pa->contents = (bfd_byte *) xmalloc (pa->size);
f = fopen (pa->filename, FOPEN_RB);
if (f == NULL)
- fatal (_("cannot open: %s: %s"), pa->filename, strerror (errno));
+ fatal (_("cannot open: %s: %s"),
+ pa->filename, strerror (errno));
if (fread (pa->contents, 1, pa->size, f) == 0
|| ferror (f))
@@ -2312,11 +2631,11 @@ copy_main (argc, argv)
}
len = s - optarg;
- name = (char *) xmalloc (len + 1);
+ name = xmalloc (len + 1);
strncpy (name, optarg, len);
name[len] = '\0';
- p = find_section_list (name, true);
+ p = find_section_list (name, TRUE);
val = parse_vma (s + 1, option);
@@ -2353,15 +2672,15 @@ copy_main (argc, argv)
break;
case OPTION_CHANGE_WARNINGS:
- change_warn = true;
+ change_warn = TRUE;
break;
case OPTION_CHANGE_LEADING_CHAR:
- change_leading_char = true;
+ change_leading_char = TRUE;
break;
case OPTION_DEBUGGING:
- convert_debugging = true;
+ convert_debugging = TRUE;
break;
case OPTION_GAP_FILL:
@@ -2379,21 +2698,21 @@ copy_main (argc, argv)
non_fatal (_("Warning: truncating gap-fill from 0x%s to 0x%x"),
buff, gap_fill);
}
- gap_fill_set = true;
+ gap_fill_set = TRUE;
}
break;
case OPTION_NO_CHANGE_WARNINGS:
- change_warn = false;
+ change_warn = FALSE;
break;
case OPTION_PAD_TO:
pad_to = parse_vma (optarg, "--pad-to");
- pad_to_set = true;
+ pad_to_set = TRUE;
break;
case OPTION_REMOVE_LEADING_CHAR:
- remove_leading_char = true;
+ remove_leading_char = TRUE;
break;
case OPTION_REDEFINE_SYM:
@@ -2410,22 +2729,26 @@ copy_main (argc, argv)
fatal (_("bad format for %s"), "--redefine-sym");
len = s - optarg;
- source = (char *) xmalloc (len + 1);
+ source = xmalloc (len + 1);
strncpy (source, optarg, len);
source[len] = '\0';
nextarg = s + 1;
len = strlen (nextarg);
- target = (char *) xmalloc (len + 1);
+ target = xmalloc (len + 1);
strcpy (target, nextarg);
- redefine_list_append (source, target);
+ redefine_list_append ("--redefine-sym", source, target);
free (source);
free (target);
}
break;
+ case OPTION_REDEFINE_SYMS:
+ add_redefine_syms_file (optarg);
+ break;
+
case OPTION_SET_SECTION_FLAGS:
{
const char *s;
@@ -2437,13 +2760,13 @@ copy_main (argc, argv)
fatal (_("bad format for %s"), "--set-section-flags");
len = s - optarg;
- name = (char *) xmalloc (len + 1);
+ name = xmalloc (len + 1);
strncpy (name, optarg, len);
name[len] = '\0';
- p = find_section_list (name, true);
+ p = find_section_list (name, TRUE);
- p->set_flags = true;
+ p->set_flags = TRUE;
p->flags = parse_flags (s + 1);
}
break;
@@ -2464,7 +2787,7 @@ copy_main (argc, argv)
if (len == 0)
fatal (_("bad format for %s"), "--rename-section");
- old_name = (char *) xmalloc (len + 1);
+ old_name = xmalloc (len + 1);
strncpy (old_name, optarg, len);
old_name[len] = 0;
@@ -2484,7 +2807,7 @@ copy_main (argc, argv)
if (len == 0)
fatal (_("bad format for %s"), "--rename-section");
- new_name = (char *) xmalloc (len + 1);
+ new_name = xmalloc (len + 1);
strncpy (new_name, eq, len);
new_name[len] = 0;
@@ -2494,7 +2817,7 @@ copy_main (argc, argv)
case OPTION_SET_START:
set_start = parse_vma (optarg, "--set-start");
- set_start_set = true;
+ set_start_set = TRUE;
break;
case OPTION_SREC_LEN:
@@ -2502,7 +2825,7 @@ copy_main (argc, argv)
break;
case OPTION_SREC_FORCES3:
- S3Forced = true;
+ S3Forced = TRUE;
break;
case OPTION_STRIP_SYMBOLS:
@@ -2531,8 +2854,41 @@ copy_main (argc, argv)
fatal (_("alternate machine code index must be positive"));
break;
+ case OPTION_PREFIX_SYMBOLS:
+ prefix_symbols_string = optarg;
+ break;
+
+ case OPTION_PREFIX_SECTIONS:
+ prefix_sections_string = optarg;
+ break;
+
+ case OPTION_PREFIX_ALLOC_SECTIONS:
+ prefix_alloc_sections_string = optarg;
+ break;
+
+ case OPTION_READONLY_TEXT:
+ bfd_flags_to_set |= WP_TEXT;
+ bfd_flags_to_clear &= ~WP_TEXT;
+ break;
+
+ case OPTION_WRITABLE_TEXT:
+ bfd_flags_to_clear |= WP_TEXT;
+ bfd_flags_to_set &= ~WP_TEXT;
+ break;
+
+ case OPTION_PURE:
+ bfd_flags_to_set |= D_PAGED;
+ bfd_flags_to_clear &= ~D_PAGED;
+ break;
+
+ case OPTION_IMPURE:
+ bfd_flags_to_clear |= D_PAGED;
+ bfd_flags_to_set &= ~D_PAGED;
+ break;
+
case 0:
- break; /* we've been given a long option */
+ /* We've been given a long option. */
+ break;
case 'H':
case 'h':
@@ -2543,6 +2899,12 @@ copy_main (argc, argv)
}
}
+ if (formats_info)
+ {
+ display_info ();
+ return 0;
+ }
+
if (show_version)
print_version ("objcopy");
@@ -2560,10 +2922,10 @@ copy_main (argc, argv)
if (strip_symbols == STRIP_UNDEF && discard_locals == LOCALS_UNDEF)
strip_symbols = STRIP_NONE;
- if (output_target == (char *) NULL)
+ if (output_target == NULL)
output_target = input_target;
- if (binary_architecture != (char *) NULL)
+ if (binary_architecture != NULL)
{
if (input_target && strcmp (input_target, "binary") == 0)
{
@@ -2572,7 +2934,10 @@ copy_main (argc, argv)
temp_arch_info = bfd_scan_arch (binary_architecture);
if (temp_arch_info != NULL)
- bfd_external_binary_architecture = temp_arch_info->arch;
+ {
+ bfd_external_binary_architecture = temp_arch_info->arch;
+ bfd_external_machine = temp_arch_info->mach;
+ }
else
fatal (_("architecture %s unknown"), binary_architecture);
}
@@ -2585,12 +2950,12 @@ copy_main (argc, argv)
if (preserve_dates)
if (stat (input_filename, & statbuf) < 0)
- fatal (_("Cannot stat: %s: %s"), input_filename, strerror (errno));
-
- /* If there is no destination file then create a temp and rename
- the result into the input. */
+ fatal (_("warning: could not locate '%s'. System error message: %s"),
+ input_filename, strerror (errno));
- if (output_filename == (char *) NULL)
+ /* If there is no destination file, or the source and destination files
+ are the same, then create a temp and rename the result into the input. */
+ if (output_filename == NULL || strcmp (input_filename, output_filename) == 0)
{
char *tmpname = make_tempname (input_filename);
@@ -2652,12 +3017,8 @@ copy_main (argc, argv)
return 0;
}
-int main PARAMS ((int, char **));
-
int
-main (argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c
index d09b6e5..f67aacb 100644
--- a/contrib/binutils/binutils/objdump.c
+++ b/contrib/binutils/binutils/objdump.c
@@ -1,25 +1,55 @@
/* objdump.c -- dump information about an object file.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
-This file is part of GNU Binutils.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Objdump overview.
+
+ Objdump displays information about one or more object files, either on
+ their own, or inside libraries. It is commonly used as a disassembler,
+ but it can also display information about file headers, symbol tables,
+ relocations, debugging directives and more.
+
+ The flow of execution is as follows:
+
+ 1. Command line arguments are checked for control switches and the
+ information to be displayed is selected.
+
+ 2. Any remaining arguments are assumed to be object files, and they are
+ processed in order by display_bfd(). If the file is an archive each
+ of its elements is processed in turn.
+
+ 3. The file's target architecture and binary file format are determined
+ by bfd_check_format(). If they are recognised, then dump_bfd() is
+ called.
+
+ 4. dump_bfd() in turn calls separate functions to display the requested
+ item(s) of information(s). For example disassemble_data() is called if
+ a disassembly has been requested.
+
+ When disassembling the code loops through blocks of instructions bounded
+ by symbols, calling disassemble_bytes() on each block. The actual
+ disassembling is done by the libopcodes library, via a function pointer
+ supplied by the disassembler() function. */
#include "bfd.h"
+#include "bfdver.h"
#include "progress.h"
#include "bucomm.h"
#include "budemang.h"
@@ -36,19 +66,21 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "aout/aout64.h"
#ifdef NEED_DECLARATION_FPRINTF
-/* This is needed by INIT_DISASSEMBLE_INFO. */
-extern int fprintf PARAMS ((FILE *, const char *, ...));
+/* This is needed by init_disassemble_info(). */
+extern int fprintf (FILE *, const char *, ...);
#endif
/* Exit status. */
static int exit_status = 0;
-static char *default_target = NULL; /* default at runtime */
+static char *default_target = NULL; /* Default at runtime. */
-static int show_version = 0; /* show the version number */
+/* The following variables are set based on arguments passed on the
+ command line. */
+static int show_version = 0; /* Show the version number. */
static int dump_section_contents; /* -s */
static int dump_section_headers; /* -h */
-static boolean dump_file_header; /* -f */
+static bfd_boolean dump_file_header; /* -f */
static int dump_symtab; /* -t */
static int dump_dynamic_symtab; /* -T */
static int dump_reloc_info; /* -r */
@@ -57,34 +89,51 @@ static int dump_ar_hdrs; /* -a */
static int dump_private_headers; /* -p */
static int prefix_addresses; /* --prefix-addresses */
static int with_line_numbers; /* -l */
-static boolean with_source_code; /* -S */
+static bfd_boolean with_source_code; /* -S */
static int show_raw_insn; /* --show-raw-insn */
static int dump_stab_section_info; /* --stabs */
static int do_demangle; /* -C, --demangle */
-static boolean disassemble; /* -d */
-static boolean disassemble_all; /* -D */
+static bfd_boolean disassemble; /* -d */
+static bfd_boolean disassemble_all; /* -D */
static int disassemble_zeroes; /* --disassemble-zeroes */
-static boolean formats_info; /* -i */
-static char *only; /* -j secname */
+static bfd_boolean formats_info; /* -i */
static int wide_output; /* -w */
static bfd_vma start_address = (bfd_vma) -1; /* --start-address */
static bfd_vma stop_address = (bfd_vma) -1; /* --stop-address */
static int dump_debugging; /* --debugging */
+static int dump_debugging_tags; /* --debugging-tags */
static bfd_vma adjust_section_vma = 0; /* --adjust-vma */
static int file_start_context = 0; /* --file-start-context */
-/* Extra info to pass to the disassembler address printing function. */
-struct objdump_disasm_info {
- bfd *abfd;
- asection *sec;
- boolean require_sec;
+/* Pointer to an array of section names provided by
+ one or more "-j secname" command line options. */
+static char **only;
+/* The total number of slots in the only[] array. */
+static size_t only_size = 0;
+/* The number of occupied slots in the only[] array. */
+static size_t only_used = 0;
+
+/* Variables for handling include file path table. */
+static const char **include_paths;
+static int include_path_count;
+
+/* Extra info to pass to the section disassembler and address printing
+ function. */
+struct objdump_disasm_info
+{
+ bfd * abfd;
+ asection * sec;
+ bfd_boolean require_sec;
+ arelent ** dynrelbuf;
+ long dynrelcount;
+ disassembler_ftype disassemble_fn;
};
/* Architecture to disassemble for, or default if NULL. */
-static char *machine = (char *) NULL;
+static char *machine = NULL;
/* Target specific options to the disassembler. */
-static char *disassembler_options = (char *) NULL;
+static char *disassembler_options = NULL;
/* Endianness to disassemble for, or default if BFD_ENDIAN_UNKNOWN. */
static enum bfd_endian endian = BFD_ENDIAN_UNKNOWN;
@@ -107,60 +156,14 @@ static asymbol **dynsyms;
/* Number of symbols in `dynsyms'. */
static long dynsymcount = 0;
-/* Static declarations. */
-
-static void usage PARAMS ((FILE *, int));
-static void nonfatal PARAMS ((const char *));
-static void display_file PARAMS ((char *filename, char *target));
-static void dump_section_header PARAMS ((bfd *, asection *, PTR));
-static void dump_headers PARAMS ((bfd *));
-static void dump_data PARAMS ((bfd *abfd));
-static void dump_relocs PARAMS ((bfd *abfd));
-static void dump_dynamic_relocs PARAMS ((bfd * abfd));
-static void dump_reloc_set PARAMS ((bfd *, asection *, arelent **, long));
-static void dump_symbols PARAMS ((bfd *abfd, boolean dynamic));
-static void dump_bfd_header PARAMS ((bfd *));
-static void dump_bfd_private_header PARAMS ((bfd *));
-static void dump_bfd PARAMS ((bfd *));
-static void display_bfd PARAMS ((bfd *abfd));
-static void display_target_list PARAMS ((void));
-static void display_info_table PARAMS ((int, int));
-static void display_target_tables PARAMS ((void));
-static void display_info PARAMS ((void));
-static void objdump_print_value
- PARAMS ((bfd_vma, struct disassemble_info *, boolean));
-static void objdump_print_symname
- PARAMS ((bfd *, struct disassemble_info *, asymbol *));
-static asymbol *find_symbol_for_address
- PARAMS ((bfd *, asection *, bfd_vma, boolean, long *));
-static void objdump_print_addr_with_sym
- PARAMS ((bfd *, asection *, asymbol *, bfd_vma,
- struct disassemble_info *, boolean));
-static void objdump_print_addr
- PARAMS ((bfd_vma, struct disassemble_info *, boolean));
-static void objdump_print_address
- PARAMS ((bfd_vma, struct disassemble_info *));
-static int objdump_symbol_at_address
- PARAMS ((bfd_vma, struct disassemble_info *));
-static void show_line PARAMS ((bfd *, asection *, bfd_vma));
-static void disassemble_bytes
- PARAMS ((struct disassemble_info *, disassembler_ftype, boolean,
- bfd_byte *, bfd_vma, bfd_vma, arelent ***, arelent **));
-static void disassemble_data PARAMS ((bfd *));
-static const char *endian_string PARAMS ((enum bfd_endian));
-static asymbol ** slurp_symtab PARAMS ((bfd *));
-static asymbol ** slurp_dynamic_symtab PARAMS ((bfd *));
-static long remove_useless_symbols PARAMS ((asymbol **, long));
-static int compare_symbols PARAMS ((const PTR, const PTR));
-static int compare_relocs PARAMS ((const PTR, const PTR));
-static void dump_stabs PARAMS ((bfd *));
-static boolean read_section_stabs PARAMS ((bfd *, const char *, const char *));
-static void print_section_stabs PARAMS ((bfd *, const char *, const char *));
+static bfd_byte *stabs;
+static bfd_size_type stab_size;
+
+static char *strtab;
+static bfd_size_type stabstr_size;
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s <option(s)> <file(s)>\n"), program_name);
fprintf (stream, _(" Display information from object <file(s)>.\n"));
@@ -176,6 +179,7 @@ usage (stream, status)
-S, --source Intermix source code with disassembly\n\
-s, --full-contents Display the full contents of all sections requested\n\
-g, --debugging Display debug information in object file\n\
+ -e, --debugging-tags Display debug information using ctags style\n\
-G, --stabs Display (in raw form) any STABS info in the file\n\
-t, --syms Display the contents of the symbol table(s)\n\
-T, --dynamic-syms Display the contents of the dynamic symbol table\n\
@@ -196,14 +200,16 @@ usage (stream, status)
-EB --endian=big Assume big endian format when disassembling\n\
-EL --endian=little Assume little endian format when disassembling\n\
--file-start-context Include context from start of file (with -S)\n\
+ -I, --include=DIR Add DIR to search list for source files\n\
-l, --line-numbers Include line numbers and filenames in output\n\
-C, --demangle[=STYLE] Decode mangled/processed symbol names\n\
- The STYLE, if specified, can be `auto', 'gnu',\n\
- 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-abi'\n\
+ The STYLE, if specified, can be `auto', `gnu',\n\
+ `lucid', `arm', `hp', `edg', `gnu-v3', `java'\n\
+ or `gnat'\n\
-w, --wide Format output for more than 80 columns\n\
-z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
- --start-address=ADDR Only process data whoes address is >= ADDR\n\
- --stop-address=ADDR Only process data whoes address is <= ADDR\n\
+ --start-address=ADDR Only process data whose address is >= ADDR\n\
+ --stop-address=ADDR Only process data whose address is <= ADDR\n\
--prefix-addresses Print complete address alongside disassembly\n\
--[no-]show-raw-insn Display hex alongside symbolic disassembly\n\
--adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\
@@ -219,11 +225,13 @@ usage (stream, status)
}
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
-
-#define OPTION_ENDIAN (150)
-#define OPTION_START_ADDRESS (OPTION_ENDIAN + 1)
-#define OPTION_STOP_ADDRESS (OPTION_START_ADDRESS + 1)
-#define OPTION_ADJUST_VMA (OPTION_STOP_ADDRESS + 1)
+enum option_values
+ {
+ OPTION_ENDIAN=150,
+ OPTION_START_ADDRESS,
+ OPTION_STOP_ADDRESS,
+ OPTION_ADJUST_VMA
+ };
static struct option long_options[]=
{
@@ -233,6 +241,7 @@ static struct option long_options[]=
{"architecture", required_argument, NULL, 'm'},
{"archive-headers", no_argument, NULL, 'a'},
{"debugging", no_argument, NULL, 'g'},
+ {"debugging-tags", no_argument, NULL, 'e'},
{"demangle", optional_argument, NULL, 'C'},
{"disassemble", no_argument, NULL, 'd'},
{"disassemble-all", no_argument, NULL, 'D'},
@@ -255,6 +264,7 @@ static struct option long_options[]=
{"section-headers", no_argument, NULL, 'h'},
{"show-raw-insn", no_argument, &show_raw_insn, 1},
{"source", no_argument, NULL, 'S'},
+ {"include", required_argument, NULL, 'I'},
{"stabs", no_argument, NULL, 'G'},
{"start-address", required_argument, NULL, OPTION_START_ADDRESS},
{"stop-address", required_argument, NULL, OPTION_STOP_ADDRESS},
@@ -266,18 +276,15 @@ static struct option long_options[]=
};
static void
-nonfatal (msg)
- const char *msg;
+nonfatal (const char *msg)
{
bfd_nonfatal (msg);
exit_status = 1;
}
static void
-dump_section_header (abfd, section, ignored)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section;
- PTR ignored ATTRIBUTE_UNUSED;
+dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
+ void *ignored ATTRIBUTE_UNUSED)
{
char *comma = "";
unsigned int opb = bfd_octets_per_byte (abfd);
@@ -352,8 +359,7 @@ dump_section_header (abfd, section, ignored)
}
static void
-dump_headers (abfd)
- bfd *abfd;
+dump_headers (bfd *abfd)
{
printf (_("Sections:\n"));
@@ -369,21 +375,21 @@ dump_headers (abfd)
if (wide_output)
printf (_(" Flags"));
+ if (abfd->flags & HAS_LOAD_PAGE)
+ printf (_(" Pg"));
printf ("\n");
- bfd_map_over_sections (abfd, dump_section_header, (PTR) NULL);
+ bfd_map_over_sections (abfd, dump_section_header, NULL);
}
static asymbol **
-slurp_symtab (abfd)
- bfd *abfd;
+slurp_symtab (bfd *abfd)
{
- asymbol **sy = (asymbol **) NULL;
+ asymbol **sy = NULL;
long storage;
if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
{
- non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
symcount = 0;
return NULL;
}
@@ -392,23 +398,20 @@ slurp_symtab (abfd)
if (storage < 0)
bfd_fatal (bfd_get_filename (abfd));
if (storage)
- sy = (asymbol **) xmalloc (storage);
+ sy = xmalloc (storage);
symcount = bfd_canonicalize_symtab (abfd, sy);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
- if (symcount == 0)
- non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
return sy;
}
/* Read in the dynamic symbols. */
static asymbol **
-slurp_dynamic_symtab (abfd)
- bfd *abfd;
+slurp_dynamic_symtab (bfd *abfd)
{
- asymbol **sy = (asymbol **) NULL;
+ asymbol **sy = NULL;
long storage;
storage = bfd_get_dynamic_symtab_upper_bound (abfd);
@@ -424,13 +427,11 @@ slurp_dynamic_symtab (abfd)
bfd_fatal (bfd_get_filename (abfd));
}
if (storage)
- sy = (asymbol **) xmalloc (storage);
+ sy = xmalloc (storage);
dynsymcount = bfd_canonicalize_dynamic_symtab (abfd, sy);
if (dynsymcount < 0)
bfd_fatal (bfd_get_filename (abfd));
- if (dynsymcount == 0)
- non_fatal (_("%s: No dynamic symbols"), bfd_get_filename (abfd));
return sy;
}
@@ -439,11 +440,9 @@ slurp_dynamic_symtab (abfd)
Return the number of useful symbols. */
static long
-remove_useless_symbols (symbols, count)
- asymbol **symbols;
- long count;
+remove_useless_symbols (asymbol **symbols, long count)
{
- register asymbol **in_ptr = symbols, **out_ptr = symbols;
+ asymbol **in_ptr = symbols, **out_ptr = symbols;
while (--count >= 0)
{
@@ -465,16 +464,18 @@ remove_useless_symbols (symbols, count)
/* Sort symbols into value order. */
static int
-compare_symbols (ap, bp)
- const PTR ap;
- const PTR bp;
+compare_symbols (const void *ap, const void *bp)
{
- const asymbol *a = *(const asymbol **)ap;
- const asymbol *b = *(const asymbol **)bp;
- const char *an, *bn;
- size_t anl, bnl;
- boolean af, bf;
- flagword aflags, bflags;
+ const asymbol *a = * (const asymbol **) ap;
+ const asymbol *b = * (const asymbol **) bp;
+ const char *an;
+ const char *bn;
+ size_t anl;
+ size_t bnl;
+ bfd_boolean af;
+ bfd_boolean bf;
+ flagword aflags;
+ flagword bflags;
if (bfd_asymbol_value (a) > bfd_asymbol_value (b))
return 1;
@@ -493,7 +494,6 @@ compare_symbols (ap, bp)
/* The symbols gnu_compiled and gcc2_compiled convey no real
information, so put them after other symbols with the same value. */
-
af = (strstr (an, "gnu_compiled") != NULL
|| strstr (an, "gcc2_compiled") != NULL);
bf = (strstr (bn, "gnu_compiled") != NULL
@@ -573,12 +573,10 @@ compare_symbols (ap, bp)
/* Sort relocs into address order. */
static int
-compare_relocs (ap, bp)
- const PTR ap;
- const PTR bp;
+compare_relocs (const void *ap, const void *bp)
{
- const arelent *a = *(const arelent **)ap;
- const arelent *b = *(const arelent **)bp;
+ const arelent *a = * (const arelent **) ap;
+ const arelent *b = * (const arelent **) bp;
if (a->address > b->address)
return 1;
@@ -595,19 +593,18 @@ compare_relocs (ap, bp)
return 0;
}
-/* Print VMA to STREAM. If SKIP_ZEROES is true, omit leading zeroes. */
+/* Print an address (VMA) to the output stream in INFO.
+ If SKIP_ZEROES is TRUE, omit leading zeroes. */
static void
-objdump_print_value (vma, info, skip_zeroes)
- bfd_vma vma;
- struct disassemble_info *info;
- boolean skip_zeroes;
+objdump_print_value (bfd_vma vma, struct disassemble_info *info,
+ bfd_boolean skip_zeroes)
{
char buf[30];
char *p;
- struct objdump_disasm_info *aux
- = (struct objdump_disasm_info *) info->application_data;
+ struct objdump_disasm_info *aux;
+ aux = (struct objdump_disasm_info *) info->application_data;
bfd_sprintf_vma (aux->abfd, buf, vma);
if (! skip_zeroes)
p = buf;
@@ -624,10 +621,8 @@ objdump_print_value (vma, info, skip_zeroes)
/* Print the name of a symbol. */
static void
-objdump_print_symname (abfd, info, sym)
- bfd *abfd;
- struct disassemble_info *info;
- asymbol *sym;
+objdump_print_symname (bfd *abfd, struct disassemble_info *info,
+ asymbol *sym)
{
char *alloc;
const char *name;
@@ -650,18 +645,16 @@ objdump_print_symname (abfd, info, sym)
free (alloc);
}
-/* Locate a symbol given a bfd, a section, and a VMA. If REQUIRE_SEC
- is true, then always require the symbol to be in the section. This
- returns NULL if there is no suitable symbol. If PLACE is not NULL,
- then *PLACE is set to the index of the symbol in sorted_syms. */
+/* Locate a symbol given a bfd and a section (from INFO->application_data),
+ and a VMA. If INFO->application_data->require_sec is TRUE, then always
+ require the symbol to be in the section. Returns NULL if there is no
+ suitable symbol. If PLACE is not NULL, then *PLACE is set to the index
+ of the symbol in sorted_syms. */
static asymbol *
-find_symbol_for_address (abfd, sec, vma, require_sec, place)
- bfd *abfd;
- asection *sec;
- bfd_vma vma;
- boolean require_sec;
- long *place;
+find_symbol_for_address (bfd_vma vma,
+ struct disassemble_info *info,
+ long *place)
{
/* @@ Would it speed things up to cache the last two symbols returned,
and maybe their address ranges? For many processors, only one memory
@@ -672,11 +665,19 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
long min = 0;
long max = sorted_symcount;
long thisplace;
- unsigned int opb = bfd_octets_per_byte (abfd);
+ struct objdump_disasm_info *aux;
+ bfd *abfd;
+ asection *sec;
+ unsigned int opb;
if (sorted_symcount < 1)
return NULL;
+ aux = (struct objdump_disasm_info *) info->application_data;
+ abfd = aux->abfd;
+ sec = aux->sec;
+ opb = bfd_octets_per_byte (abfd);
+
/* Perform a binary search looking for the closest symbol to the
required value. We are searching the range (min, max]. */
while (min + 1 < max)
@@ -706,7 +707,7 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
== bfd_asymbol_value (sorted_syms[thisplace - 1])))
--thisplace;
- /* If the file is relocateable, and the symbol could be from this
+ /* If the file is relocatable, and the symbol could be from this
section, prefer a symbol from this section over symbols from
others, even if the other symbol's value might be closer.
@@ -714,9 +715,8 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
sections have overlapping memory ranges, but in that case there's
no way to tell what's desired without looking at the relocation
table. */
-
if (sorted_syms[thisplace]->section != sec
- && (require_sec
+ && (aux->require_sec
|| ((abfd->flags & HAS_RELOC) != 0
&& vma >= bfd_get_section_vma (abfd, sec)
&& vma < (bfd_get_section_vma (abfd, sec)
@@ -730,7 +730,9 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
!= bfd_asymbol_value (sorted_syms[thisplace]))
break;
}
+
--i;
+
for (; i >= 0; i--)
{
if (sorted_syms[i]->section == sec
@@ -759,15 +761,22 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
}
if (sorted_syms[thisplace]->section != sec
- && (require_sec
+ && (aux->require_sec
|| ((abfd->flags & HAS_RELOC) != 0
&& vma >= bfd_get_section_vma (abfd, sec)
&& vma < (bfd_get_section_vma (abfd, sec)
+ bfd_section_size (abfd, sec)))))
- {
- /* There is no suitable symbol. */
- return NULL;
- }
+ /* There is no suitable symbol. */
+ return NULL;
+ }
+
+ /* Give the target a chance to reject the symbol. */
+ while (! info->symbol_is_valid (sorted_syms [thisplace], info))
+ {
+ ++ thisplace;
+ if (thisplace >= sorted_symcount
+ || bfd_asymbol_value (sorted_syms [thisplace]) > vma)
+ return NULL;
}
if (place != NULL)
@@ -776,16 +785,12 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
return sorted_syms[thisplace];
}
-/* Print an address to INFO symbolically. */
+/* Print an address and the offset to the nearest symbol. */
static void
-objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
- bfd *abfd;
- asection *sec;
- asymbol *sym;
- bfd_vma vma;
- struct disassemble_info *info;
- boolean skip_zeroes;
+objdump_print_addr_with_sym (bfd *abfd, asection *sec, asymbol *sym,
+ bfd_vma vma, struct disassemble_info *info,
+ bfd_boolean skip_zeroes)
{
objdump_print_value (vma, info, skip_zeroes);
@@ -799,12 +804,12 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
if (vma < secaddr)
{
(*info->fprintf_func) (info->stream, "-0x");
- objdump_print_value (secaddr - vma, info, true);
+ objdump_print_value (secaddr - vma, info, TRUE);
}
else if (vma > secaddr)
{
(*info->fprintf_func) (info->stream, "+0x");
- objdump_print_value (vma - secaddr, info, true);
+ objdump_print_value (vma - secaddr, info, TRUE);
}
(*info->fprintf_func) (info->stream, ">");
}
@@ -815,25 +820,24 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
if (bfd_asymbol_value (sym) > vma)
{
(*info->fprintf_func) (info->stream, "-0x");
- objdump_print_value (bfd_asymbol_value (sym) - vma, info, true);
+ objdump_print_value (bfd_asymbol_value (sym) - vma, info, TRUE);
}
else if (vma > bfd_asymbol_value (sym))
{
(*info->fprintf_func) (info->stream, "+0x");
- objdump_print_value (vma - bfd_asymbol_value (sym), info, true);
+ objdump_print_value (vma - bfd_asymbol_value (sym), info, TRUE);
}
(*info->fprintf_func) (info->stream, ">");
}
}
-/* Print VMA to INFO, symbolically if possible. If SKIP_ZEROES is
- true, don't output leading zeroes. */
+/* Print an address (VMA), symbolically if possible.
+ If SKIP_ZEROES is TRUE, don't output leading zeroes. */
static void
-objdump_print_addr (vma, info, skip_zeroes)
- bfd_vma vma;
- struct disassemble_info *info;
- boolean skip_zeroes;
+objdump_print_addr (bfd_vma vma,
+ struct disassemble_info *info,
+ bfd_boolean skip_zeroes)
{
struct objdump_disasm_info *aux;
asymbol *sym;
@@ -846,8 +850,7 @@ objdump_print_addr (vma, info, skip_zeroes)
}
aux = (struct objdump_disasm_info *) info->application_data;
- sym = find_symbol_for_address (aux->abfd, aux->sec, vma, aux->require_sec,
- (long *) NULL);
+ sym = find_symbol_for_address (vma, info, NULL);
objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info,
skip_zeroes);
}
@@ -856,9 +859,7 @@ objdump_print_addr (vma, info, skip_zeroes)
routine. */
static void
-objdump_print_address (vma, info)
- bfd_vma vma;
- struct disassemble_info *info;
+objdump_print_address (bfd_vma vma, struct disassemble_info *info)
{
objdump_print_addr (vma, info, ! prefix_addresses);
}
@@ -866,20 +867,11 @@ objdump_print_address (vma, info)
/* Determine of the given address has a symbol associated with it. */
static int
-objdump_symbol_at_address (vma, info)
- bfd_vma vma;
- struct disassemble_info * info;
+objdump_symbol_at_address (bfd_vma vma, struct disassemble_info * info)
{
- struct objdump_disasm_info * aux;
asymbol * sym;
- /* No symbols - do not bother checking. */
- if (sorted_symcount < 1)
- return 0;
-
- aux = (struct objdump_disasm_info *) info->application_data;
- sym = find_symbol_for_address (aux->abfd, aux->sec, vma, aux->require_sec,
- (long *) NULL);
+ sym = find_symbol_for_address (vma, info, NULL);
return (sym != NULL && (bfd_asymbol_value (sym) == vma));
}
@@ -891,13 +883,14 @@ static char *prev_functionname;
static unsigned int prev_line;
/* We keep a list of all files that we have seen when doing a
- dissassembly with source, so that we know how much of the file to
+ disassembly with source, so that we know how much of the file to
display. This can be important for inlined functions. */
struct print_file_list
{
struct print_file_list *next;
- char *filename;
+ const char *filename;
+ const char *modname;
unsigned int line;
FILE *f;
};
@@ -909,17 +902,95 @@ static struct print_file_list *print_files;
#define SHOW_PRECEDING_CONTEXT_LINES (5)
+/* Tries to open MODNAME, and if successful adds a node to print_files
+ linked list and returns that node. Returns NULL on failure. */
+
+static struct print_file_list *
+try_print_file_open (const char *origname, const char *modname)
+{
+ struct print_file_list *p;
+ FILE *f;
+
+ f = fopen (modname, "r");
+ if (f == NULL)
+ return NULL;
+
+ if (print_files != NULL && print_files->f != NULL)
+ {
+ fclose (print_files->f);
+ print_files->f = NULL;
+ }
+
+ p = xmalloc (sizeof (struct print_file_list));
+ p->filename = origname;
+ p->modname = modname;
+ p->line = 0;
+ p->f = f;
+ p->next = print_files;
+ print_files = p;
+ return p;
+}
+
+/* If the the source file, as described in the symtab, is not found
+ try to locate it in one of the paths specified with -I
+ If found, add location to print_files linked list. */
+
+static struct print_file_list *
+update_source_path (const char *filename)
+{
+ struct print_file_list *p;
+ const char *fname;
+ int i;
+
+ if (filename == NULL)
+ return NULL;
+
+ p = try_print_file_open (filename, filename);
+ if (p != NULL)
+ return p;
+
+ if (include_path_count == 0)
+ return NULL;
+
+ /* Get the name of the file. */
+ fname = strrchr (filename, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ {
+ /* We could have a mixed forward/back slash case. */
+ char *backslash = strrchr (filename, '\\');
+ if (fname == NULL || (backslash != NULL && backslash > fname))
+ fname = backslash;
+ if (fname == NULL && filename[0] != '\0' && filename[1] == ':')
+ fname = filename + 1;
+ }
+#endif
+ if (fname == NULL)
+ fname = filename;
+ else
+ ++fname;
+
+ /* If file exists under a new path, we need to add it to the list
+ so that show_line knows about it. */
+ for (i = 0; i < include_path_count; i++)
+ {
+ char *modname = concat (include_paths[i], "/", fname, (const char *) 0);
+
+ p = try_print_file_open (filename, modname);
+ if (p)
+ return p;
+
+ free (modname);
+ }
+
+ return NULL;
+}
+
/* Skip ahead to a given line in a file, optionally printing each
line. */
static void
-skip_to_line PARAMS ((struct print_file_list *, unsigned int, boolean));
-
-static void
-skip_to_line (p, line, show)
- struct print_file_list *p;
- unsigned int line;
- boolean show;
+skip_to_line (struct print_file_list *p, unsigned int line,
+ bfd_boolean show)
{
while (p->line < line)
{
@@ -940,14 +1011,11 @@ skip_to_line (p, line, show)
}
}
-/* Show the line number, or the source line, in a dissassembly
+/* Show the line number, or the source line, in a disassembly
listing. */
static void
-show_line (abfd, section, addr_offset)
- bfd *abfd;
- asection *section;
- bfd_vma addr_offset;
+show_line (bfd *abfd, asection *section, bfd_vma addr_offset)
{
const char *filename;
const char *functionname;
@@ -1014,11 +1082,11 @@ show_line (abfd, section, addr_offset)
if (p->f == NULL)
{
- p->f = fopen (p->filename, "r");
+ p->f = fopen (p->modname, "r");
p->line = 0;
}
if (p->f != NULL)
- skip_to_line (p, l, false);
+ skip_to_line (p, l, FALSE);
if (print_files->f != NULL)
{
@@ -1029,7 +1097,7 @@ show_line (abfd, section, addr_offset)
if (p->f != NULL)
{
- skip_to_line (p, line, true);
+ skip_to_line (p, line, TRUE);
*pp = p->next;
p->next = print_files;
print_files = p;
@@ -1037,37 +1105,21 @@ show_line (abfd, section, addr_offset)
}
else
{
- FILE *f;
+ p = update_source_path (filename);
- f = fopen (filename, "r");
- if (f != NULL)
+ if (p != NULL)
{
int l;
- p = ((struct print_file_list *)
- xmalloc (sizeof (struct print_file_list)));
- p->filename = xmalloc (strlen (filename) + 1);
- strcpy (p->filename, filename);
- p->line = 0;
- p->f = f;
-
- if (print_files != NULL && print_files->f != NULL)
- {
- fclose (print_files->f);
- print_files->f = NULL;
- }
- p->next = print_files;
- print_files = p;
-
if (file_start_context)
l = 0;
else
l = line - SHOW_PRECEDING_CONTEXT_LINES;
if (l < 0)
l = 0;
- skip_to_line (p, l, false);
+ skip_to_line (p, l, FALSE);
if (p->f != NULL)
- skip_to_line (p, line, true);
+ skip_to_line (p, line, TRUE);
}
}
}
@@ -1094,17 +1146,16 @@ typedef struct
char *current;
} SFILE;
-/* sprintf to a "stream" */
+/* sprintf to a "stream". */
static int
-objdump_sprintf VPARAMS ((SFILE *f, const char *format, ...))
+objdump_sprintf (SFILE *f, const char *format, ...)
{
char *buf;
size_t n;
+ va_list args;
- VA_OPEN (args, format);
- VA_FIXEDARG (args, SFILE *, f);
- VA_FIXEDARG (args, const char *, format);
+ va_start (args, format);
vasprintf (&buf, format, args);
@@ -1132,10 +1183,28 @@ objdump_sprintf VPARAMS ((SFILE *f, const char *format, ...))
free (buf);
- VA_CLOSE (args);
+ va_end (args);
return n;
}
+/* Returns TRUE if the specified section should be dumped. */
+
+static bfd_boolean
+process_section_p (asection * section)
+{
+ size_t i;
+
+ if (only == NULL)
+ return TRUE;
+
+ for (i = 0; i < only_used; i++)
+ if (strcmp (only [i], section->name) == 0)
+ return TRUE;
+
+ return FALSE;
+}
+
+
/* The number of zeroes we want to see before we start skipping them.
The number is arbitrarily chosen. */
@@ -1157,22 +1226,20 @@ objdump_sprintf VPARAMS ((SFILE *f, const char *format, ...))
/* Disassemble some data in memory between given values. */
static void
-disassemble_bytes (info, disassemble_fn, insns, data,
- start_offset, stop_offset, relppp,
- relppend)
- struct disassemble_info *info;
- disassembler_ftype disassemble_fn;
- boolean insns;
- bfd_byte *data;
- bfd_vma start_offset;
- bfd_vma stop_offset;
- arelent ***relppp;
- arelent **relppend;
+disassemble_bytes (struct disassemble_info * info,
+ disassembler_ftype disassemble_fn,
+ bfd_boolean insns,
+ bfd_byte * data,
+ bfd_vma start_offset,
+ bfd_vma stop_offset,
+ bfd_vma rel_offset,
+ arelent *** relppp,
+ arelent ** relppend)
{
struct objdump_disasm_info *aux;
asection *section;
int octets_per_line;
- boolean done_dot;
+ bfd_boolean done_dot;
int skip_addr_chars;
bfd_vma addr_offset;
int opb = info->octets_per_byte;
@@ -1210,16 +1277,16 @@ disassemble_bytes (info, disassemble_fn, insns, data,
info->insn_info_valid = 0;
- done_dot = false;
+ done_dot = FALSE;
addr_offset = start_offset;
while (addr_offset < stop_offset)
{
bfd_vma z;
int octets = 0;
- boolean need_nl = false;
+ bfd_boolean need_nl = FALSE;
/* If we see more than SKIP_ZEROES octets of zeroes, we just
- print `...'. */
+ print `...'. */
for (z = addr_offset * opb; z < stop_offset * opb; z++)
if (data[z] != 0)
break;
@@ -1233,9 +1300,9 @@ disassemble_bytes (info, disassemble_fn, insns, data,
printf ("\t...\n");
/* If there are more nonzero octets to follow, we only skip
- zeroes in multiples of 4, to try to avoid running over
- the start of an instruction which happens to start with
- zero. */
+ zeroes in multiples of 4, to try to avoid running over
+ the start of an instruction which happens to start with
+ zero. */
if (z != stop_offset * opb)
z = addr_offset * opb + ((z - addr_offset * opb) &~ 3);
@@ -1248,7 +1315,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
int bpc = 0;
int pb = 0;
- done_dot = false;
+ done_dot = FALSE;
if (with_line_numbers || with_source_code)
/* The line number tables will refer to unadjusted
@@ -1269,9 +1336,9 @@ disassemble_bytes (info, disassemble_fn, insns, data,
}
else
{
- aux->require_sec = true;
+ aux->require_sec = TRUE;
objdump_print_address (section->vma + addr_offset, info);
- aux->require_sec = false;
+ aux->require_sec = FALSE;
putchar (' ');
}
@@ -1287,10 +1354,11 @@ disassemble_bytes (info, disassemble_fn, insns, data,
#ifdef DISASSEMBLER_NEEDS_RELOCS
/* FIXME: This is wrong. It tests the number of octets
- in the last instruction, not the current one. */
+ in the last instruction, not the current one. */
if (*relppp < relppend
- && (**relppp)->address >= addr_offset
- && (**relppp)->address <= addr_offset + octets / opb)
+ && (**relppp)->address >= rel_offset + addr_offset
+ && ((**relppp)->address
+ < rel_offset + addr_offset + octets / opb))
info->flags = INSN_HAS_RELOC;
else
#endif
@@ -1334,7 +1402,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
bfd_vma j;
/* If ! prefix_addresses and ! wide_output, we print
- octets_per_line octets per line. */
+ octets_per_line octets per line. */
pb = octets;
if (pb > octets_per_line && ! prefix_addresses && ! wide_output)
pb = octets_per_line;
@@ -1430,23 +1498,13 @@ disassemble_bytes (info, disassemble_fn, insns, data,
if (!wide_output)
putchar ('\n');
else
- need_nl = true;
+ need_nl = TRUE;
}
- if ((section->flags & SEC_RELOC) != 0
-#ifndef DISASSEMBLER_NEEDS_RELOCS
- && dump_reloc_info
-#endif
- )
+ while ((*relppp) < relppend
+ && (**relppp)->address < rel_offset + addr_offset + octets / opb)
{
- while ((*relppp) < relppend
- && ((**relppp)->address >= (bfd_vma) addr_offset
- && (**relppp)->address < (bfd_vma) addr_offset + octets / opb))
-#ifdef DISASSEMBLER_NEEDS_RELOCS
- if (! dump_reloc_info)
- ++(*relppp);
- else
-#endif
+ if (dump_reloc_info || dump_dynamic_reloc_info)
{
arelent *q;
@@ -1457,7 +1515,8 @@ disassemble_bytes (info, disassemble_fn, insns, data,
else
printf ("\t\t\t");
- objdump_print_value (section->vma + q->address, info, true);
+ objdump_print_value (section->vma - rel_offset + q->address,
+ info, TRUE);
printf (": %s\t", q->howto->name);
@@ -1485,13 +1544,13 @@ disassemble_bytes (info, disassemble_fn, insns, data,
if (q->addend)
{
printf ("+0x");
- objdump_print_value (q->addend, info, true);
+ objdump_print_value (q->addend, info, TRUE);
}
printf ("\n");
- need_nl = false;
- ++(*relppp);
+ need_nl = FALSE;
}
+ ++(*relppp);
}
if (need_nl)
@@ -1501,18 +1560,235 @@ disassemble_bytes (info, disassemble_fn, insns, data,
}
}
+static void
+disassemble_section (bfd *abfd, asection *section, void *info)
+{
+ struct disassemble_info * pinfo = (struct disassemble_info *) info;
+ struct objdump_disasm_info * paux;
+ unsigned int opb = pinfo->octets_per_byte;
+ bfd_byte * data = NULL;
+ bfd_size_type datasize = 0;
+ arelent ** rel_pp = NULL;
+ arelent ** rel_ppstart = NULL;
+ arelent ** rel_ppend;
+ unsigned long stop_offset;
+ asymbol * sym = NULL;
+ long place = 0;
+ long rel_count;
+ bfd_vma rel_offset;
+ unsigned long addr_offset;
+
+ /* Sections that do not contain machine
+ code are not normally disassembled. */
+ if (! disassemble_all
+ && only == NULL
+ && (section->flags & SEC_CODE) == 0)
+ return;
+
+ if (! process_section_p (section))
+ return;
+
+ datasize = bfd_get_section_size_before_reloc (section);
+ if (datasize == 0)
+ return;
+
+ /* Decide which set of relocs to use. Load them if necessary. */
+ paux = (struct objdump_disasm_info *) pinfo->application_data;
+ if (paux->dynrelbuf)
+ {
+ rel_pp = paux->dynrelbuf;
+ rel_count = paux->dynrelcount;
+ /* Dynamic reloc addresses are absolute, non-dynamic are section
+ relative. REL_OFFSET specifies the reloc address corresponding
+ to the start of this section. */
+ rel_offset = section->vma;
+ }
+ else
+ {
+ rel_count = 0;
+ rel_pp = NULL;
+ rel_offset = 0;
+
+ if ((section->flags & SEC_RELOC) != 0
+#ifndef DISASSEMBLER_NEEDS_RELOCS
+ && dump_reloc_info
+#endif
+ )
+ {
+ long relsize;
+
+ relsize = bfd_get_reloc_upper_bound (abfd, section);
+ if (relsize < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ if (relsize > 0)
+ {
+ rel_ppstart = rel_pp = xmalloc (relsize);
+ rel_count = bfd_canonicalize_reloc (abfd, section, rel_pp, syms);
+ if (rel_count < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ /* Sort the relocs by address. */
+ qsort (rel_pp, rel_count, sizeof (arelent *), compare_relocs);
+ }
+ }
+
+ }
+ rel_ppend = rel_pp + rel_count;
+
+ data = xmalloc (datasize);
+
+ bfd_get_section_contents (abfd, section, data, 0, datasize);
+
+ paux->sec = section;
+ pinfo->buffer = data;
+ pinfo->buffer_vma = section->vma;
+ pinfo->buffer_length = datasize;
+ pinfo->section = section;
+
+ if (start_address == (bfd_vma) -1
+ || start_address < pinfo->buffer_vma)
+ addr_offset = 0;
+ else
+ addr_offset = start_address - pinfo->buffer_vma;
+
+ if (stop_address == (bfd_vma) -1)
+ stop_offset = datasize / opb;
+ else
+ {
+ if (stop_address < pinfo->buffer_vma)
+ stop_offset = 0;
+ else
+ stop_offset = stop_address - pinfo->buffer_vma;
+ if (stop_offset > pinfo->buffer_length / opb)
+ stop_offset = pinfo->buffer_length / opb;
+ }
+
+ /* Skip over the relocs belonging to addresses below the
+ start address. */
+ while (rel_pp < rel_ppend
+ && (*rel_pp)->address < rel_offset + addr_offset)
+ ++rel_pp;
+
+ printf (_("Disassembly of section %s:\n"), section->name);
+
+ /* Find the nearest symbol forwards from our current position. */
+ paux->require_sec = TRUE;
+ sym = find_symbol_for_address (section->vma + addr_offset, info, &place);
+ paux->require_sec = FALSE;
+
+ /* Disassemble a block of instructions up to the address associated with
+ the symbol we have just found. Then print the symbol and find the
+ next symbol on. Repeat until we have disassembled the entire section
+ or we have reached the end of the address range we are interested in. */
+ while (addr_offset < stop_offset)
+ {
+ bfd_vma addr;
+ asymbol *nextsym;
+ unsigned long nextstop_offset;
+ bfd_boolean insns;
+
+ addr = section->vma + addr_offset;
+
+ if (sym != NULL && bfd_asymbol_value (sym) <= addr)
+ {
+ int x;
+
+ for (x = place;
+ (x < sorted_symcount
+ && (bfd_asymbol_value (sorted_syms[x]) <= addr));
+ ++x)
+ continue;
+
+ pinfo->symbols = sorted_syms + place;
+ pinfo->num_symbols = x - place;
+ }
+ else
+ {
+ pinfo->symbols = NULL;
+ pinfo->num_symbols = 0;
+ }
+
+ if (! prefix_addresses)
+ {
+ pinfo->fprintf_func (pinfo->stream, "\n");
+ objdump_print_addr_with_sym (abfd, section, sym, addr,
+ pinfo, FALSE);
+ pinfo->fprintf_func (pinfo->stream, ":\n");
+ }
+
+ if (sym != NULL && bfd_asymbol_value (sym) > addr)
+ nextsym = sym;
+ else if (sym == NULL)
+ nextsym = NULL;
+ else
+ {
+#define is_valid_next_sym(SYM) \
+ ((SYM)->section == section \
+ && (bfd_asymbol_value (SYM) > bfd_asymbol_value (sym)) \
+ && pinfo->symbol_is_valid (SYM, pinfo))
+
+ /* Search forward for the next appropriate symbol in
+ SECTION. Note that all the symbols are sorted
+ together into one big array, and that some sections
+ may have overlapping addresses. */
+ while (place < sorted_symcount
+ && ! is_valid_next_sym (sorted_syms [place]))
+ ++place;
+
+ if (place >= sorted_symcount)
+ nextsym = NULL;
+ else
+ nextsym = sorted_syms[place];
+ }
+
+ if (sym != NULL && bfd_asymbol_value (sym) > addr)
+ nextstop_offset = bfd_asymbol_value (sym) - section->vma;
+ else if (nextsym == NULL)
+ nextstop_offset = stop_offset;
+ else
+ nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
+
+ if (nextstop_offset > stop_offset)
+ nextstop_offset = stop_offset;
+
+ /* If a symbol is explicitly marked as being an object
+ rather than a function, just dump the bytes without
+ disassembling them. */
+ if (disassemble_all
+ || sym == NULL
+ || bfd_asymbol_value (sym) > addr
+ || ((sym->flags & BSF_OBJECT) == 0
+ && (strstr (bfd_asymbol_name (sym), "gnu_compiled")
+ == NULL)
+ && (strstr (bfd_asymbol_name (sym), "gcc2_compiled")
+ == NULL))
+ || (sym->flags & BSF_FUNCTION) != 0)
+ insns = TRUE;
+ else
+ insns = FALSE;
+
+ disassemble_bytes (pinfo, paux->disassemble_fn, insns, data,
+ addr_offset, nextstop_offset,
+ rel_offset, &rel_pp, rel_ppend);
+
+ addr_offset = nextstop_offset;
+ sym = nextsym;
+ }
+
+ free (data);
+
+ if (rel_ppstart != NULL)
+ free (rel_ppstart);
+}
+
/* Disassemble the contents of an object file. */
static void
-disassemble_data (abfd)
- bfd *abfd;
+disassemble_data (bfd *abfd)
{
- unsigned long addr_offset;
- disassembler_ftype disassemble_fn;
struct disassemble_info disasm_info;
struct objdump_disasm_info aux;
- asection *section;
- unsigned int opb;
print_files = NULL;
prev_functionname = NULL;
@@ -1520,28 +1796,32 @@ disassemble_data (abfd)
/* We make a copy of syms to sort. We don't want to sort syms
because that will screw up the relocs. */
- sorted_syms = (asymbol **) xmalloc (symcount * sizeof (asymbol *));
+ sorted_syms = xmalloc (symcount * sizeof (asymbol *));
memcpy (sorted_syms, syms, symcount * sizeof (asymbol *));
sorted_symcount = remove_useless_symbols (sorted_syms, symcount);
- /* Sort the symbols into section and symbol order */
+ /* Sort the symbols into section and symbol order. */
qsort (sorted_syms, sorted_symcount, sizeof (asymbol *), compare_symbols);
- INIT_DISASSEMBLE_INFO(disasm_info, stdout, fprintf);
- disasm_info.application_data = (PTR) &aux;
+ init_disassemble_info (&disasm_info, stdout, (fprintf_ftype) fprintf);
+
+ disasm_info.application_data = (void *) &aux;
aux.abfd = abfd;
- aux.require_sec = false;
+ aux.require_sec = FALSE;
+ aux.dynrelbuf = NULL;
+ aux.dynrelcount = 0;
+
disasm_info.print_address_func = objdump_print_address;
disasm_info.symbol_at_address_func = objdump_symbol_at_address;
- if (machine != (char *) NULL)
+ if (machine != NULL)
{
const bfd_arch_info_type *info = bfd_scan_arch (machine);
+
if (info == NULL)
- {
- fatal (_("Can't use supplied machine %s"), machine);
- }
+ fatal (_("Can't use supplied machine %s"), machine);
+
abfd->arch_info = info;
}
@@ -1549,14 +1829,15 @@ disassemble_data (abfd)
{
struct bfd_target *xvec;
- xvec = (struct bfd_target *) xmalloc (sizeof (struct bfd_target));
+ xvec = xmalloc (sizeof (struct bfd_target));
memcpy (xvec, abfd->xvec, sizeof (struct bfd_target));
xvec->byteorder = endian;
abfd->xvec = xvec;
}
- disassemble_fn = disassembler (abfd);
- if (!disassemble_fn)
+ /* Use libopcodes to locate a suitable disassembler. */
+ aux.disassemble_fn = disassembler (abfd);
+ if (!aux.disassemble_fn)
{
non_fatal (_("Can't disassemble for architecture %s\n"),
bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
@@ -1564,13 +1845,11 @@ disassemble_data (abfd)
return;
}
- opb = bfd_octets_per_byte (abfd);
-
disasm_info.flavour = bfd_get_flavour (abfd);
disasm_info.arch = bfd_get_arch (abfd);
disasm_info.mach = bfd_get_mach (abfd);
disasm_info.disassembler_options = disassembler_options;
- disasm_info.octets_per_byte = opb;
+ disasm_info.octets_per_byte = bfd_octets_per_byte (abfd);
if (bfd_big_endian (abfd))
disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG;
@@ -1581,283 +1860,73 @@ disassemble_data (abfd)
instead. */
disasm_info.endian = BFD_ENDIAN_UNKNOWN;
- for (section = abfd->sections;
- section != (asection *) NULL;
- section = section->next)
+ /* Allow the target to customize the info structure. */
+ disassemble_init_for_target (& disasm_info);
+
+ /* Pre-load the dynamic relocs if we are going
+ to be dumping them along with the disassembly. */
+ if (dump_dynamic_reloc_info)
{
- bfd_byte *data = NULL;
- bfd_size_type datasize = 0;
- arelent **relbuf = NULL;
- arelent **relpp = NULL;
- arelent **relppend = NULL;
- unsigned long stop_offset;
- asymbol *sym = NULL;
- long place = 0;
-
- if ((section->flags & SEC_LOAD) == 0
- || (! disassemble_all
- && only == NULL
- && (section->flags & SEC_CODE) == 0))
- continue;
- if (only != (char *) NULL && strcmp (only, section->name) != 0)
- continue;
+ long relsize = bfd_get_dynamic_reloc_upper_bound (abfd);
+
+ if (relsize < 0)
+ bfd_fatal (bfd_get_filename (abfd));
- if ((section->flags & SEC_RELOC) != 0
-#ifndef DISASSEMBLER_NEEDS_RELOCS
- && dump_reloc_info
-#endif
- )
+ if (relsize > 0)
{
- long relsize;
-
- relsize = bfd_get_reloc_upper_bound (abfd, section);
- if (relsize < 0)
+ aux.dynrelbuf = xmalloc (relsize);
+ aux.dynrelcount = bfd_canonicalize_dynamic_reloc (abfd,
+ aux.dynrelbuf,
+ dynsyms);
+ if (aux.dynrelcount < 0)
bfd_fatal (bfd_get_filename (abfd));
- if (relsize > 0)
- {
- long relcount;
-
- relbuf = (arelent **) xmalloc (relsize);
- relcount = bfd_canonicalize_reloc (abfd, section, relbuf, syms);
- if (relcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
-
- /* Sort the relocs by address. */
- qsort (relbuf, relcount, sizeof (arelent *), compare_relocs);
-
- relpp = relbuf;
- relppend = relpp + relcount;
-
- /* Skip over the relocs belonging to addresses below the
- start address. */
- if (start_address != (bfd_vma) -1)
- {
- while (relpp < relppend
- && (*relpp)->address < start_address)
- ++relpp;
- }
- }
- }
-
- printf (_("Disassembly of section %s:\n"), section->name);
-
- datasize = bfd_get_section_size_before_reloc (section);
- if (datasize == 0)
- continue;
-
- data = (bfd_byte *) xmalloc ((size_t) datasize);
-
- bfd_get_section_contents (abfd, section, data, 0, datasize);
-
- aux.sec = section;
- disasm_info.buffer = data;
- disasm_info.buffer_vma = section->vma;
- disasm_info.buffer_length = datasize;
- disasm_info.section = section;
- if (start_address == (bfd_vma) -1
- || start_address < disasm_info.buffer_vma)
- addr_offset = 0;
- else
- addr_offset = start_address - disasm_info.buffer_vma;
- if (stop_address == (bfd_vma) -1)
- stop_offset = datasize / opb;
- else
- {
- if (stop_address < disasm_info.buffer_vma)
- stop_offset = 0;
- else
- stop_offset = stop_address - disasm_info.buffer_vma;
- if (stop_offset > disasm_info.buffer_length / opb)
- stop_offset = disasm_info.buffer_length / opb;
+ /* Sort the relocs by address. */
+ qsort (aux.dynrelbuf, aux.dynrelcount, sizeof (arelent *),
+ compare_relocs);
}
+ }
- sym = find_symbol_for_address (abfd, section, section->vma + addr_offset,
- true, &place);
-
- while (addr_offset < stop_offset)
- {
- asymbol *nextsym;
- unsigned long nextstop_offset;
- boolean insns;
-
- if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + addr_offset)
- {
- int x;
-
- for (x = place;
- (x < sorted_symcount
- && bfd_asymbol_value (sorted_syms[x]) <= section->vma + addr_offset);
- ++x)
- continue;
- disasm_info.symbols = & sorted_syms[place];
- disasm_info.num_symbols = x - place;
- }
- else
- disasm_info.symbols = NULL;
-
- if (! prefix_addresses)
- {
- printf ("\n");
- objdump_print_addr_with_sym (abfd, section, sym,
- section->vma + addr_offset,
- &disasm_info,
- false);
- printf (":\n");
- }
-
- if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset)
- nextsym = sym;
- else if (sym == NULL)
- nextsym = NULL;
- else
- {
- /* Search forward for the next appropriate symbol in
- SECTION. Note that all the symbols are sorted
- together into one big array, and that some sections
- may have overlapping addresses. */
- while (place < sorted_symcount
- && (sorted_syms[place]->section != section
- || (bfd_asymbol_value (sorted_syms[place])
- <= bfd_asymbol_value (sym))))
- ++place;
- if (place >= sorted_symcount)
- nextsym = NULL;
- else
- nextsym = sorted_syms[place];
- }
-
- if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset)
- {
- nextstop_offset = bfd_asymbol_value (sym) - section->vma;
- if (nextstop_offset > stop_offset)
- nextstop_offset = stop_offset;
- }
- else if (nextsym == NULL)
- nextstop_offset = stop_offset;
- else
- {
- nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
- if (nextstop_offset > stop_offset)
- nextstop_offset = stop_offset;
- }
-
- /* If a symbol is explicitly marked as being an object
- rather than a function, just dump the bytes without
- disassembling them. */
- if (disassemble_all
- || sym == NULL
- || bfd_asymbol_value (sym) > section->vma + addr_offset
- || ((sym->flags & BSF_OBJECT) == 0
- && (strstr (bfd_asymbol_name (sym), "gnu_compiled")
- == NULL)
- && (strstr (bfd_asymbol_name (sym), "gcc2_compiled")
- == NULL))
- || (sym->flags & BSF_FUNCTION) != 0)
- insns = true;
- else
- insns = false;
-
- disassemble_bytes (&disasm_info, disassemble_fn, insns, data,
- addr_offset, nextstop_offset, &relpp, relppend);
-
- addr_offset = nextstop_offset;
- sym = nextsym;
- }
+ bfd_map_over_sections (abfd, disassemble_section, & disasm_info);
- free (data);
- if (relbuf != NULL)
- free (relbuf);
- }
+ if (aux.dynrelbuf != NULL)
+ free (aux.dynrelbuf);
free (sorted_syms);
}
+/* Read ABFD's stabs section STABSECT_NAME, and return a pointer to
+ it. Return NULL on failure. */
-/* Define a table of stab values and print-strings. We wish the initializer
- could be a direct-mapped table, but instead we build one the first
- time we need it. */
-
-static void dump_section_stabs PARAMS ((bfd *abfd, char *stabsect_name,
- char *strsect_name));
-
-/* Dump the stabs sections from an object file that has a section that
- uses Sun stabs encoding. */
-
-static void
-dump_stabs (abfd)
- bfd *abfd;
+static char *
+read_section_stabs (bfd *abfd, const char *sect_name, bfd_size_type *size_ptr)
{
- dump_section_stabs (abfd, ".stab", ".stabstr");
- dump_section_stabs (abfd, ".stab.excl", ".stab.exclstr");
- dump_section_stabs (abfd, ".stab.index", ".stab.indexstr");
- dump_section_stabs (abfd, "$GDB_SYMBOLS$", "$GDB_STRINGS$");
-}
-
-static bfd_byte *stabs;
-static bfd_size_type stab_size;
+ asection *stabsect;
+ bfd_size_type size;
+ char *contents;
-static char *strtab;
-static bfd_size_type stabstr_size;
-
-/* Read ABFD's stabs section STABSECT_NAME into `stabs'
- and string table section STRSECT_NAME into `strtab'.
- If the section exists and was read, allocate the space and return true.
- Otherwise return false. */
-
-static boolean
-read_section_stabs (abfd, stabsect_name, strsect_name)
- bfd *abfd;
- const char *stabsect_name;
- const char *strsect_name;
-{
- asection *stabsect, *stabstrsect;
-
- stabsect = bfd_get_section_by_name (abfd, stabsect_name);
- if (0 == stabsect)
+ stabsect = bfd_get_section_by_name (abfd, sect_name);
+ if (stabsect == NULL)
{
- printf (_("No %s section present\n\n"), stabsect_name);
- return false;
+ printf (_("No %s section present\n\n"), sect_name);
+ return FALSE;
}
- stabstrsect = bfd_get_section_by_name (abfd, strsect_name);
- if (0 == stabstrsect)
- {
- non_fatal (_("%s has no %s section"),
- bfd_get_filename (abfd), strsect_name);
- exit_status = 1;
- return false;
- }
+ size = bfd_section_size (abfd, stabsect);
+ contents = xmalloc (size);
- stab_size = bfd_section_size (abfd, stabsect);
- stabstr_size = bfd_section_size (abfd, stabstrsect);
-
- stabs = (bfd_byte *) xmalloc (stab_size);
- strtab = (char *) xmalloc (stabstr_size);
-
- if (! bfd_get_section_contents (abfd, stabsect, (PTR) stabs, 0, stab_size))
+ if (! bfd_get_section_contents (abfd, stabsect, contents, 0, size))
{
non_fatal (_("Reading %s section of %s failed: %s"),
- stabsect_name, bfd_get_filename (abfd),
+ sect_name, bfd_get_filename (abfd),
bfd_errmsg (bfd_get_error ()));
- free (stabs);
- free (strtab);
+ free (contents);
exit_status = 1;
- return false;
+ return NULL;
}
- if (! bfd_get_section_contents (abfd, stabstrsect, (PTR) strtab, 0,
- stabstr_size))
- {
- non_fatal (_("Reading %s section of %s failed: %s\n"),
- strsect_name, bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
- free (stabs);
- free (strtab);
- exit_status = 1;
- return false;
- }
+ *size_ptr = size;
- return true;
+ return contents;
}
/* Stabs entries use a 12 byte format:
@@ -1868,24 +1937,24 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
4 byte stab value
FIXME: This will have to change for a 64 bit object format. */
-#define STRDXOFF (0)
-#define TYPEOFF (4)
-#define OTHEROFF (5)
-#define DESCOFF (6)
-#define VALOFF (8)
+#define STRDXOFF (0)
+#define TYPEOFF (4)
+#define OTHEROFF (5)
+#define DESCOFF (6)
+#define VALOFF (8)
#define STABSIZE (12)
/* Print ABFD's stabs section STABSECT_NAME (in `stabs'),
using string table section STRSECT_NAME (in `strtab'). */
static void
-print_section_stabs (abfd, stabsect_name, strsect_name)
- bfd *abfd;
- const char *stabsect_name;
- const char *strsect_name ATTRIBUTE_UNUSED;
+print_section_stabs (bfd *abfd,
+ const char *stabsect_name,
+ unsigned *string_offset_ptr)
{
int i;
- unsigned file_string_table_offset = 0, next_file_string_table_offset = 0;
+ unsigned file_string_table_offset = 0;
+ unsigned next_file_string_table_offset = *string_offset_ptr;
bfd_byte *stabp, *stabs_end;
stabp = stabs;
@@ -1898,7 +1967,6 @@ print_section_stabs (abfd, stabsect_name, strsect_name)
We start the index at -1 because there is a dummy symbol on
the front of stabs-in-{coff,elf} sections that supplies sizes. */
-
for (i = -1; stabp < stabs_end; stabp += STABSIZE, i++)
{
const char *name;
@@ -1930,7 +1998,6 @@ print_section_stabs (abfd, stabsect_name, strsect_name)
/* Symbols with type == 0 (N_UNDF) specify the length of the
string table associated with this file. We use that info
to know how to relocate the *next* file's string table indices. */
-
if (type == N_UNDF)
{
file_string_table_offset = next_file_string_table_offset;
@@ -1940,7 +2007,6 @@ print_section_stabs (abfd, stabsect_name, strsect_name)
{
/* Using the (possibly updated) string table offset, print the
string (if any) associated with this symbol. */
-
if ((strx + file_string_table_offset) < stabstr_size)
printf (" %s", &strtab[strx + file_string_table_offset]);
else
@@ -1948,46 +2014,75 @@ print_section_stabs (abfd, stabsect_name, strsect_name)
}
}
printf ("\n\n");
+ *string_offset_ptr = next_file_string_table_offset;
+}
+
+typedef struct
+{
+ const char * section_name;
+ const char * string_section_name;
+ unsigned string_offset;
}
+stab_section_names;
static void
-dump_section_stabs (abfd, stabsect_name, strsect_name)
- bfd *abfd;
- char *stabsect_name;
- char *strsect_name;
+find_stabs_section (bfd *abfd, asection *section, void *names)
{
- asection *s;
+ int len;
+ stab_section_names * sought = (stab_section_names *) names;
/* Check for section names for which stabsect_name is a prefix, to
- handle .stab0, etc. */
- for (s = abfd->sections;
- s != NULL;
- s = s->next)
+ handle .stab.N, etc. */
+ len = strlen (sought->section_name);
+
+ /* If the prefix matches, and the files section name ends with a
+ nul or a digit, then we match. I.e., we want either an exact
+ match or a section followed by a number. */
+ if (strncmp (sought->section_name, section->name, len) == 0
+ && (section->name[len] == 0
+ || (section->name[len] == '.' && ISDIGIT (section->name[len + 1]))))
{
- int len;
-
- len = strlen (stabsect_name);
-
- /* If the prefix matches, and the files section name ends with a
- nul or a digit, then we match. I.e., we want either an exact
- match or a section followed by a number. */
- if (strncmp (stabsect_name, s->name, len) == 0
- && (s->name[len] == '\000'
- || ISDIGIT (s->name[len])))
+ if (strtab == NULL)
+ strtab = read_section_stabs (abfd, sought->string_section_name,
+ &stabstr_size);
+
+ if (strtab)
{
- if (read_section_stabs (abfd, s->name, strsect_name))
- {
- print_section_stabs (abfd, s->name, strsect_name);
- free (stabs);
- free (strtab);
- }
+ stabs = read_section_stabs (abfd, section->name, &stab_size);
+ if (stabs)
+ print_section_stabs (abfd, section->name, &sought->string_offset);
}
}
}
+
+static void
+dump_stabs_section (bfd *abfd, char *stabsect_name, char *strsect_name)
+{
+ stab_section_names s;
+
+ s.section_name = stabsect_name;
+ s.string_section_name = strsect_name;
+ s.string_offset = 0;
+
+ bfd_map_over_sections (abfd, find_stabs_section, & s);
+
+ free (strtab);
+ strtab = NULL;
+}
+
+/* Dump the any sections containing stabs debugging information. */
+
+static void
+dump_stabs (bfd *abfd)
+{
+ dump_stabs_section (abfd, ".stab", ".stabstr");
+ dump_stabs_section (abfd, ".stab.excl", ".stab.exclstr");
+ dump_stabs_section (abfd, ".stab.index", ".stab.indexstr");
+ dump_stabs_section (abfd, "$GDB_SYMBOLS$", "$GDB_STRINGS$");
+}
static void
-dump_bfd_header (abfd)
- bfd *abfd;
+dump_bfd_header (bfd *abfd)
{
char *comma = "";
@@ -2007,275 +2102,153 @@ dump_bfd_header (abfd)
PF (WP_TEXT, "WP_TEXT");
PF (D_PAGED, "D_PAGED");
PF (BFD_IS_RELAXABLE, "BFD_IS_RELAXABLE");
+ PF (HAS_LOAD_PAGE, "HAS_LOAD_PAGE");
printf (_("\nstart address 0x"));
bfd_printf_vma (abfd, abfd->start_address);
printf ("\n");
}
+
static void
-dump_bfd_private_header (abfd)
-bfd *abfd;
+dump_bfd_private_header (bfd *abfd)
{
bfd_print_private_bfd_data (abfd, stdout);
}
-/* Dump selected contents of ABFD */
+
+/* Display a section in hexadecimal format with associated characters.
+ Each line prefixed by the zero padded address. */
static void
-dump_bfd (abfd)
- bfd *abfd;
+dump_section (bfd *abfd, asection *section, void *dummy ATTRIBUTE_UNUSED)
{
- /* If we are adjusting section VMA's, change them all now. Changing
- the BFD information is a hack. However, we must do it, or
- bfd_find_nearest_line will not do the right thing. */
- if (adjust_section_vma != 0)
- {
- asection *s;
+ bfd_byte *data = 0;
+ bfd_size_type datasize;
+ bfd_size_type addr_offset;
+ bfd_size_type start_offset;
+ bfd_size_type stop_offset;
+ unsigned int opb = bfd_octets_per_byte (abfd);
+ /* Bytes per line. */
+ const int onaline = 16;
+ char buf[64];
+ int count;
+ int width;
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- s->vma += adjust_section_vma;
- s->lma += adjust_section_vma;
- }
- }
+ if ((section->flags & SEC_HAS_CONTENTS) == 0)
+ return;
- printf (_("\n%s: file format %s\n"), bfd_get_filename (abfd),
- abfd->xvec->name);
- if (dump_ar_hdrs)
- print_arelt_descr (stdout, abfd, true);
- if (dump_file_header)
- dump_bfd_header (abfd);
- if (dump_private_headers)
- dump_bfd_private_header (abfd);
- putchar ('\n');
- if (dump_section_headers)
- dump_headers (abfd);
- if (dump_symtab || dump_reloc_info || disassemble || dump_debugging)
- {
- syms = slurp_symtab (abfd);
- }
- if (dump_dynamic_symtab || dump_dynamic_reloc_info)
- {
- dynsyms = slurp_dynamic_symtab (abfd);
- }
- if (dump_symtab)
- dump_symbols (abfd, false);
- if (dump_dynamic_symtab)
- dump_symbols (abfd, true);
- if (dump_stab_section_info)
- dump_stabs (abfd);
- if (dump_reloc_info && ! disassemble)
- dump_relocs (abfd);
- if (dump_dynamic_reloc_info)
- dump_dynamic_relocs (abfd);
- if (dump_section_contents)
- dump_data (abfd);
- if (disassemble)
- disassemble_data (abfd);
- if (dump_debugging)
- {
- PTR dhandle;
+ if (! process_section_p (section))
+ return;
+
+ if ((datasize = bfd_section_size (abfd, section)) == 0)
+ return;
- dhandle = read_debugging_info (abfd, syms, symcount);
- if (dhandle != NULL)
- {
- if (! print_debugging_info (stdout, dhandle))
- {
- non_fatal (_("%s: printing debugging information failed"),
- bfd_get_filename (abfd));
- exit_status = 1;
- }
- }
- }
- if (syms)
- {
- free (syms);
- syms = NULL;
- }
- if (dynsyms)
- {
- free (dynsyms);
- dynsyms = NULL;
- }
-}
+ printf (_("Contents of section %s:\n"), section->name);
-static void
-display_bfd (abfd)
- bfd *abfd;
-{
- char **matching;
+ data = xmalloc (datasize);
- if (bfd_check_format_matches (abfd, bfd_object, &matching))
- {
- dump_bfd (abfd);
- return;
- }
+ bfd_get_section_contents (abfd, section, data, 0, datasize);
- if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
- {
- nonfatal (bfd_get_filename (abfd));
- list_matching_formats (matching);
- free (matching);
- return;
- }
+ /* Compute the address range to display. */
+ if (start_address == (bfd_vma) -1
+ || start_address < section->vma)
+ start_offset = 0;
+ else
+ start_offset = start_address - section->vma;
- if (bfd_get_error () != bfd_error_file_not_recognized)
+ if (stop_address == (bfd_vma) -1)
+ stop_offset = datasize / opb;
+ else
{
- nonfatal (bfd_get_filename (abfd));
- return;
- }
+ if (stop_address < section->vma)
+ stop_offset = 0;
+ else
+ stop_offset = stop_address - section->vma;
- if (bfd_check_format_matches (abfd, bfd_core, &matching))
- {
- dump_bfd (abfd);
- return;
+ if (stop_offset > datasize / opb)
+ stop_offset = datasize / opb;
}
- nonfatal (bfd_get_filename (abfd));
+ width = 4;
- if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
- {
- list_matching_formats (matching);
- free (matching);
- }
-}
+ bfd_sprintf_vma (abfd, buf, start_offset + section->vma);
+ if (strlen (buf) >= sizeof (buf))
+ abort ();
-static void
-display_file (filename, target)
- char *filename;
- char *target;
-{
- bfd *file, *arfile = (bfd *) NULL;
+ count = 0;
+ while (buf[count] == '0' && buf[count+1] != '\0')
+ count++;
+ count = strlen (buf) - count;
+ if (count > width)
+ width = count;
- file = bfd_openr (filename, target);
- if (file == NULL)
- {
- nonfatal (filename);
- return;
- }
+ bfd_sprintf_vma (abfd, buf, stop_offset + section->vma - 1);
+ if (strlen (buf) >= sizeof (buf))
+ abort ();
- if (bfd_check_format (file, bfd_archive) == true)
- {
- bfd *last_arfile = NULL;
+ count = 0;
+ while (buf[count] == '0' && buf[count+1] != '\0')
+ count++;
+ count = strlen (buf) - count;
+ if (count > width)
+ width = count;
- printf (_("In archive %s:\n"), bfd_get_filename (file));
- for (;;)
- {
- bfd_set_error (bfd_error_no_error);
+ for (addr_offset = start_offset;
+ addr_offset < stop_offset; addr_offset += onaline / opb)
+ {
+ bfd_size_type j;
- arfile = bfd_openr_next_archived_file (file, arfile);
- if (arfile == NULL)
- {
- if (bfd_get_error () != bfd_error_no_more_archived_files)
- nonfatal (bfd_get_filename (file));
- break;
- }
+ bfd_sprintf_vma (abfd, buf, (addr_offset + section->vma));
+ count = strlen (buf);
+ if ((size_t) count >= sizeof (buf))
+ abort ();
- display_bfd (arfile);
+ putchar (' ');
+ while (count < width)
+ {
+ putchar ('0');
+ count++;
+ }
+ fputs (buf + count - width, stdout);
+ putchar (' ');
- if (last_arfile != NULL)
- bfd_close (last_arfile);
- last_arfile = arfile;
+ for (j = addr_offset * opb;
+ j < addr_offset * opb + onaline; j++)
+ {
+ if (j < stop_offset * opb)
+ printf ("%02x", (unsigned) (data[j]));
+ else
+ printf (" ");
+ if ((j & 3) == 3)
+ printf (" ");
}
- if (last_arfile != NULL)
- bfd_close (last_arfile);
+ printf (" ");
+ for (j = addr_offset * opb;
+ j < addr_offset * opb + onaline; j++)
+ {
+ if (j >= stop_offset * opb)
+ printf (" ");
+ else
+ printf ("%c", ISPRINT (data[j]) ? data[j] : '.');
+ }
+ putchar ('\n');
}
- else
- display_bfd (file);
-
- bfd_close (file);
+ free (data);
}
-
-/* Actually display the various requested regions */
+
+/* Actually display the various requested regions. */
static void
-dump_data (abfd)
- bfd *abfd;
+dump_data (bfd *abfd)
{
- asection *section;
- bfd_byte *data = 0;
- bfd_size_type datasize = 0;
- bfd_size_type addr_offset;
- bfd_size_type start_offset, stop_offset;
- unsigned int opb = bfd_octets_per_byte (abfd);
-
- for (section = abfd->sections; section != NULL; section =
- section->next)
- {
- int onaline = 16;
-
- if (only == (char *) NULL ||
- strcmp (only, section->name) == 0)
- {
- if (section->flags & SEC_HAS_CONTENTS)
- {
- printf (_("Contents of section %s:\n"), section->name);
-
- if (bfd_section_size (abfd, section) == 0)
- continue;
- data = (bfd_byte *) xmalloc ((size_t) bfd_section_size (abfd, section));
- datasize = bfd_section_size (abfd, section);
-
-
- bfd_get_section_contents (abfd, section, (PTR) data, 0, bfd_section_size (abfd, section));
-
- if (start_address == (bfd_vma) -1
- || start_address < section->vma)
- start_offset = 0;
- else
- start_offset = start_address - section->vma;
- if (stop_address == (bfd_vma) -1)
- stop_offset = bfd_section_size (abfd, section) / opb;
- else
- {
- if (stop_address < section->vma)
- stop_offset = 0;
- else
- stop_offset = stop_address - section->vma;
- if (stop_offset > bfd_section_size (abfd, section) / opb)
- stop_offset = bfd_section_size (abfd, section) / opb;
- }
- for (addr_offset = start_offset;
- addr_offset < stop_offset; addr_offset += onaline / opb)
- {
- bfd_size_type j;
-
- printf (" %04lx ", (unsigned long int)
- (addr_offset + section->vma));
- for (j = addr_offset * opb;
- j < addr_offset * opb + onaline; j++)
- {
- if (j < stop_offset * opb)
- printf ("%02x", (unsigned) (data[j]));
- else
- printf (" ");
- if ((j & 3) == 3)
- printf (" ");
- }
-
- printf (" ");
- for (j = addr_offset * opb;
- j < addr_offset * opb + onaline; j++)
- {
- if (j >= stop_offset * opb)
- printf (" ");
- else
- printf ("%c", ISPRINT (data[j]) ? data[j] : '.');
- }
- putchar ('\n');
- }
- free (data);
- }
- }
- }
+ bfd_map_over_sections (abfd, dump_section, NULL);
}
-/* Should perhaps share code and display with nm? */
+/* Should perhaps share code and display with nm? */
+
static void
-dump_symbols (abfd, dynamic)
- bfd *abfd ATTRIBUTE_UNUSED;
- boolean dynamic;
+dump_symbols (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean dynamic)
{
asymbol **current;
long max;
@@ -2285,160 +2258,60 @@ dump_symbols (abfd, dynamic)
{
current = dynsyms;
max = dynsymcount;
- if (max == 0)
- return;
printf ("DYNAMIC SYMBOL TABLE:\n");
}
else
{
current = syms;
max = symcount;
- if (max == 0)
- return;
printf ("SYMBOL TABLE:\n");
}
+ if (max == 0)
+ printf (_("no symbols\n"));
+
for (count = 0; count < max; count++)
{
- if (*current)
+ bfd *cur_bfd;
+
+ if (*current == NULL)
+ printf (_("no information for the %ld'th symbol"), count);
+
+ else if ((cur_bfd = bfd_asymbol_bfd (*current)) == NULL)
+ printf (_("could not determine the type of the %ld'th symbol"),
+ count);
+
+ else
{
- bfd *cur_bfd = bfd_asymbol_bfd (*current);
+ const char *name = (*current)->name;
- if (cur_bfd != NULL)
+ if (do_demangle && name != NULL && *name != '\0')
{
- const char *name;
char *alloc;
- name = (*current)->name;
- alloc = NULL;
- if (do_demangle && name != NULL && *name != '\0')
- {
- /* If we want to demangle the name, we demangle it
- here, and temporarily clobber it while calling
- bfd_print_symbol. FIXME: This is a gross hack. */
-
- alloc = demangle (cur_bfd, name);
- (*current)->name = alloc;
- }
-
+ /* If we want to demangle the name, we demangle it
+ here, and temporarily clobber it while calling
+ bfd_print_symbol. FIXME: This is a gross hack. */
+ alloc = demangle (cur_bfd, name);
+ (*current)->name = alloc;
bfd_print_symbol (cur_bfd, stdout, *current,
bfd_print_symbol_all);
-
(*current)->name = name;
- if (alloc != NULL)
- free (alloc);
-
- printf ("\n");
- }
- }
- current++;
- }
- printf ("\n");
- printf ("\n");
-}
-
-static void
-dump_relocs (abfd)
- bfd *abfd;
-{
- arelent **relpp;
- long relcount;
- asection *a;
-
- for (a = abfd->sections; a != (asection *) NULL; a = a->next)
- {
- long relsize;
-
- if (bfd_is_abs_section (a))
- continue;
- if (bfd_is_und_section (a))
- continue;
- if (bfd_is_com_section (a))
- continue;
-
- if (only)
- {
- if (strcmp (only, a->name))
- continue;
- }
- else if ((a->flags & SEC_RELOC) == 0)
- continue;
-
- relsize = bfd_get_reloc_upper_bound (abfd, a);
- if (relsize < 0)
- bfd_fatal (bfd_get_filename (abfd));
-
- printf ("RELOCATION RECORDS FOR [%s]:", a->name);
-
- if (relsize == 0)
- {
- printf (" (none)\n\n");
- }
- else
- {
- relpp = (arelent **) xmalloc (relsize);
- relcount = bfd_canonicalize_reloc (abfd, a, relpp, syms);
- if (relcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
- else if (relcount == 0)
- {
- printf (" (none)\n\n");
+ free (alloc);
}
else
- {
- printf ("\n");
- dump_reloc_set (abfd, a, relpp, relcount);
- printf ("\n\n");
- }
- free (relpp);
+ bfd_print_symbol (cur_bfd, stdout, *current,
+ bfd_print_symbol_all);
}
- }
-}
-
-static void
-dump_dynamic_relocs (abfd)
- bfd *abfd;
-{
- long relsize;
- arelent **relpp;
- long relcount;
-
- relsize = bfd_get_dynamic_reloc_upper_bound (abfd);
- if (relsize < 0)
- bfd_fatal (bfd_get_filename (abfd));
- printf ("DYNAMIC RELOCATION RECORDS");
-
- if (relsize == 0)
- {
- printf (" (none)\n\n");
- }
- else
- {
- relpp = (arelent **) xmalloc (relsize);
- relcount = bfd_canonicalize_dynamic_reloc (abfd, relpp, dynsyms);
- if (relcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
- else if (relcount == 0)
- {
- printf (" (none)\n\n");
- }
- else
- {
- printf ("\n");
- dump_reloc_set (abfd, (asection *) NULL, relpp, relcount);
- printf ("\n\n");
- }
- free (relpp);
+ printf ("\n");
+ current++;
}
+ printf ("\n\n");
}
-
+
static void
-dump_reloc_set (abfd, sec, relpp, relcount)
- bfd *abfd;
- asection *sec;
- arelent **relpp;
- long relcount;
+dump_reloc_set (bfd *abfd, asection *sec, arelent **relpp, long relcount)
{
arelent **p;
char *last_filename, *last_functionname;
@@ -2447,9 +2320,11 @@ dump_reloc_set (abfd, sec, relpp, relcount)
/* Get column headers lined up reasonably. */
{
static int width;
+
if (width == 0)
{
char buf[30];
+
bfd_sprintf_vma (abfd, buf, (bfd_vma) -1);
width = strlen (buf) - 7;
}
@@ -2460,7 +2335,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
last_functionname = NULL;
last_line = 0;
- for (p = relpp; relcount && *p != (arelent *) NULL; p++, relcount--)
+ for (p = relpp; relcount && *p != NULL; p++, relcount--)
{
arelent *q = *p;
const char *filename, *functionname;
@@ -2489,6 +2364,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
free (last_functionname);
last_functionname = xstrdup (functionname);
}
+
if (line > 0
&& (line != last_line
|| (filename != NULL
@@ -2516,6 +2392,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
sym_name = NULL;
section_name = NULL;
}
+
if (sym_name)
{
bfd_printf_vma (abfd, q->address);
@@ -2523,221 +2400,317 @@ dump_reloc_set (abfd, sec, relpp, relcount)
printf (" %-16s ", q->howto->name);
else
printf (" %-16d ", q->howto->type);
- objdump_print_symname (abfd, (struct disassemble_info *) NULL,
- *q->sym_ptr_ptr);
+ objdump_print_symname (abfd, NULL, *q->sym_ptr_ptr);
}
else
{
- if (section_name == (const char *) NULL)
+ if (section_name == NULL)
section_name = "*unknown*";
bfd_printf_vma (abfd, q->address);
printf (" %-16s [%s]",
q->howto->name,
section_name);
}
+
if (q->addend)
{
printf ("+0x");
bfd_printf_vma (abfd, q->addend);
}
+
printf ("\n");
}
}
-
-/* The length of the longest architecture name + 1. */
-#define LONGEST_ARCH sizeof("powerpc:common")
-static const char *
-endian_string (endian)
- enum bfd_endian endian;
+static void
+dump_relocs_in_section (bfd *abfd,
+ asection *section,
+ void *dummy ATTRIBUTE_UNUSED)
{
- if (endian == BFD_ENDIAN_BIG)
- return "big endian";
- else if (endian == BFD_ENDIAN_LITTLE)
- return "little endian";
+ arelent **relpp;
+ long relcount;
+ long relsize;
+
+ if ( bfd_is_abs_section (section)
+ || bfd_is_und_section (section)
+ || bfd_is_com_section (section)
+ || (! process_section_p (section))
+ || ((section->flags & SEC_RELOC) == 0))
+ return;
+
+ relsize = bfd_get_reloc_upper_bound (abfd, section);
+ if (relsize < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ printf ("RELOCATION RECORDS FOR [%s]:", section->name);
+
+ if (relsize == 0)
+ {
+ printf (" (none)\n\n");
+ return;
+ }
+
+ relpp = xmalloc (relsize);
+ relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms);
+
+ if (relcount < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+ else if (relcount == 0)
+ printf (" (none)\n\n");
else
- return "endianness unknown";
+ {
+ printf ("\n");
+ dump_reloc_set (abfd, section, relpp, relcount);
+ printf ("\n\n");
+ }
+ free (relpp);
}
-/* List the targets that BFD is configured to support, each followed
- by its endianness and the architectures it supports. */
+static void
+dump_relocs (bfd *abfd)
+{
+ bfd_map_over_sections (abfd, dump_relocs_in_section, NULL);
+}
static void
-display_target_list ()
+dump_dynamic_relocs (bfd *abfd)
{
- extern const bfd_target *const *bfd_target_vector;
- char *dummy_name;
- int t;
+ long relsize;
+ arelent **relpp;
+ long relcount;
- dummy_name = make_temp_file (NULL);
- for (t = 0; bfd_target_vector[t]; t++)
- {
- const bfd_target *p = bfd_target_vector[t];
- bfd *abfd = bfd_openw (dummy_name, p->name);
- int a;
+ relsize = bfd_get_dynamic_reloc_upper_bound (abfd);
+ if (relsize < 0)
+ bfd_fatal (bfd_get_filename (abfd));
- printf ("%s\n (header %s, data %s)\n", p->name,
- endian_string (p->header_byteorder),
- endian_string (p->byteorder));
+ printf ("DYNAMIC RELOCATION RECORDS");
- if (abfd == NULL)
- {
- nonfatal (dummy_name);
- continue;
- }
+ if (relsize == 0)
+ printf (" (none)\n\n");
+ else
+ {
+ relpp = xmalloc (relsize);
+ relcount = bfd_canonicalize_dynamic_reloc (abfd, relpp, dynsyms);
- if (! bfd_set_format (abfd, bfd_object))
+ if (relcount < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+ else if (relcount == 0)
+ printf (" (none)\n\n");
+ else
{
- if (bfd_get_error () != bfd_error_invalid_operation)
- nonfatal (p->name);
- bfd_close_all_done (abfd);
- continue;
+ printf ("\n");
+ dump_reloc_set (abfd, NULL, relpp, relcount);
+ printf ("\n\n");
}
-
- for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++)
- if (bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0))
- printf (" %s\n",
- bfd_printable_arch_mach ((enum bfd_architecture) a, 0));
- bfd_close_all_done (abfd);
+ free (relpp);
}
- unlink (dummy_name);
- free (dummy_name);
}
-/* Print a table showing which architectures are supported for entries
- FIRST through LAST-1 of bfd_target_vector (targets across,
- architectures down). */
+/* Creates a table of paths, to search for source files. */
static void
-display_info_table (first, last)
- int first;
- int last;
+add_include_path (const char *path)
{
- extern const bfd_target *const *bfd_target_vector;
- int t, a;
- char *dummy_name;
-
- /* Print heading of target names. */
- printf ("\n%*s", (int) LONGEST_ARCH, " ");
- for (t = first; t < last && bfd_target_vector[t]; t++)
- printf ("%s ", bfd_target_vector[t]->name);
- putchar ('\n');
-
- dummy_name = make_temp_file (NULL);
- for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++)
- if (strcmp (bfd_printable_arch_mach (a, 0), "UNKNOWN!") != 0)
- {
- printf ("%*s ", (int) LONGEST_ARCH - 1,
- bfd_printable_arch_mach (a, 0));
- for (t = first; t < last && bfd_target_vector[t]; t++)
- {
- const bfd_target *p = bfd_target_vector[t];
- boolean ok = true;
- bfd *abfd = bfd_openw (dummy_name, p->name);
-
- if (abfd == NULL)
- {
- nonfatal (p->name);
- ok = false;
- }
-
- if (ok)
- {
- if (! bfd_set_format (abfd, bfd_object))
- {
- if (bfd_get_error () != bfd_error_invalid_operation)
- nonfatal (p->name);
- ok = false;
- }
- }
-
- if (ok)
- {
- if (! bfd_set_arch_mach (abfd, a, 0))
- ok = false;
- }
-
- if (ok)
- printf ("%s ", p->name);
- else
- {
- int l = strlen (p->name);
- while (l--)
- putchar ('-');
- putchar (' ');
- }
- if (abfd != NULL)
- bfd_close_all_done (abfd);
- }
- putchar ('\n');
- }
- unlink (dummy_name);
- free (dummy_name);
+ if (path[0] == 0)
+ return;
+ include_path_count++;
+ include_paths = xrealloc (include_paths,
+ include_path_count * sizeof (*include_paths));
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ if (path[1] == ':' && path[2] == 0)
+ path = concat (path, ".", (const char *) 0);
+#endif
+ include_paths[include_path_count - 1] = path;
}
-/* Print tables of all the target-architecture combinations that
- BFD has been configured to support. */
+static void
+adjust_addresses (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section,
+ void *dummy ATTRIBUTE_UNUSED)
+{
+ section->vma += adjust_section_vma;
+ section->lma += adjust_section_vma;
+}
+
+/* Dump selected contents of ABFD. */
static void
-display_target_tables ()
+dump_bfd (bfd *abfd)
{
- int t, columns;
- extern const bfd_target *const *bfd_target_vector;
- char *colum;
-
- columns = 0;
- colum = getenv ("COLUMNS");
- if (colum != NULL)
- columns = atoi (colum);
- if (columns == 0)
- columns = 80;
-
- t = 0;
- while (bfd_target_vector[t] != NULL)
+ /* If we are adjusting section VMA's, change them all now. Changing
+ the BFD information is a hack. However, we must do it, or
+ bfd_find_nearest_line will not do the right thing. */
+ if (adjust_section_vma != 0)
+ bfd_map_over_sections (abfd, adjust_addresses, NULL);
+
+ if (! dump_debugging_tags)
+ printf (_("\n%s: file format %s\n"), bfd_get_filename (abfd),
+ abfd->xvec->name);
+ if (dump_ar_hdrs)
+ print_arelt_descr (stdout, abfd, TRUE);
+ if (dump_file_header)
+ dump_bfd_header (abfd);
+ if (dump_private_headers)
+ dump_bfd_private_header (abfd);
+ if (! dump_debugging_tags)
+ putchar ('\n');
+ if (dump_section_headers)
+ dump_headers (abfd);
+
+ if (dump_symtab || dump_reloc_info || disassemble || dump_debugging)
+ syms = slurp_symtab (abfd);
+ if (dump_dynamic_symtab || dump_dynamic_reloc_info)
+ dynsyms = slurp_dynamic_symtab (abfd);
+
+ if (dump_symtab)
+ dump_symbols (abfd, FALSE);
+ if (dump_dynamic_symtab)
+ dump_symbols (abfd, TRUE);
+ if (dump_stab_section_info)
+ dump_stabs (abfd);
+ if (dump_reloc_info && ! disassemble)
+ dump_relocs (abfd);
+ if (dump_dynamic_reloc_info && ! disassemble)
+ dump_dynamic_relocs (abfd);
+ if (dump_section_contents)
+ dump_data (abfd);
+ if (disassemble)
+ disassemble_data (abfd);
+
+ if (dump_debugging)
{
- int oldt = t, wid;
+ void *dhandle;
- wid = LONGEST_ARCH + strlen (bfd_target_vector[t]->name) + 1;
- ++t;
- while (wid < columns && bfd_target_vector[t] != NULL)
+ dhandle = read_debugging_info (abfd, syms, symcount);
+ if (dhandle != NULL)
{
- int newwid;
-
- newwid = wid + strlen (bfd_target_vector[t]->name) + 1;
- if (newwid >= columns)
- break;
- wid = newwid;
- ++t;
+ if (! print_debugging_info (stdout, dhandle, abfd, syms, demangle,
+ dump_debugging_tags ? TRUE : FALSE))
+ {
+ non_fatal (_("%s: printing debugging information failed"),
+ bfd_get_filename (abfd));
+ exit_status = 1;
+ }
}
- display_info_table (oldt, t);
+ }
+
+ if (syms)
+ {
+ free (syms);
+ syms = NULL;
+ }
+
+ if (dynsyms)
+ {
+ free (dynsyms);
+ dynsyms = NULL;
}
}
static void
-display_info ()
+display_bfd (bfd *abfd)
{
- printf (_("BFD header file version %s\n"), BFD_VERSION_STRING);
- display_target_list ();
- display_target_tables ();
+ char **matching;
+
+ if (bfd_check_format_matches (abfd, bfd_object, &matching))
+ {
+ dump_bfd (abfd);
+ return;
+ }
+
+ if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ {
+ nonfatal (bfd_get_filename (abfd));
+ list_matching_formats (matching);
+ free (matching);
+ return;
+ }
+
+ if (bfd_get_error () != bfd_error_file_not_recognized)
+ {
+ nonfatal (bfd_get_filename (abfd));
+ return;
+ }
+
+ if (bfd_check_format_matches (abfd, bfd_core, &matching))
+ {
+ dump_bfd (abfd);
+ return;
+ }
+
+ nonfatal (bfd_get_filename (abfd));
+
+ if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ {
+ list_matching_formats (matching);
+ free (matching);
+ }
}
-int main PARAMS ((int, char **));
+static void
+display_file (char *filename, char *target)
+{
+ bfd *file;
+ bfd *arfile = NULL;
+
+ if (get_file_size (filename) < 1)
+ return;
+
+ file = bfd_openr (filename, target);
+ if (file == NULL)
+ {
+ nonfatal (filename);
+ return;
+ }
+
+ /* If the file is an archive, process all of its elements. */
+ if (bfd_check_format (file, bfd_archive))
+ {
+ bfd *last_arfile = NULL;
+
+ printf (_("In archive %s:\n"), bfd_get_filename (file));
+ for (;;)
+ {
+ bfd_set_error (bfd_error_no_error);
+
+ arfile = bfd_openr_next_archived_file (file, arfile);
+ if (arfile == NULL)
+ {
+ if (bfd_get_error () != bfd_error_no_more_archived_files)
+ nonfatal (bfd_get_filename (file));
+ break;
+ }
+
+ display_bfd (arfile);
+ if (last_arfile != NULL)
+ bfd_close (last_arfile);
+ last_arfile = arfile;
+ }
+
+ if (last_arfile != NULL)
+ bfd_close (last_arfile);
+ }
+ else
+ display_bfd (file);
+
+ bfd_close (file);
+}
+
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
char *target = default_target;
- boolean seenflag = false;
+ bfd_boolean seenflag = FALSE;
-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+#if defined (HAVE_SETLOCALE)
+#if defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
-#if defined (HAVE_SETLOCALE)
setlocale (LC_CTYPE, "");
#endif
+
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -2749,7 +2722,7 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSj:wE:zgG",
+ while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSI:j:wE:zgeG",
long_options, (int *) 0))
!= EOF)
{
@@ -2761,19 +2734,29 @@ main (argc, argv)
machine = optarg;
break;
case 'M':
- disassembler_options = optarg;
+ if (disassembler_options)
+ /* Ignore potential memory leak for now. */
+ disassembler_options = concat (disassembler_options, ",",
+ optarg, NULL);
+ else
+ disassembler_options = optarg;
break;
case 'j':
- only = optarg;
+ if (only_used == only_size)
+ {
+ only_size += 8;
+ only = xrealloc (only, only_size * sizeof (char *));
+ }
+ only [only_used++] = optarg;
break;
case 'l':
- with_line_numbers = true;
+ with_line_numbers = TRUE;
break;
case 'b':
target = optarg;
break;
case 'C':
- do_demangle = true;
+ do_demangle = TRUE;
if (optarg != NULL)
{
enum demangling_styles style;
@@ -2787,7 +2770,7 @@ main (argc, argv)
}
break;
case 'w':
- wide_output = true;
+ wide_output = TRUE;
break;
case OPTION_ADJUST_VMA:
adjust_section_vma = parse_vma (optarg, "--adjust-vma");
@@ -2822,86 +2805,95 @@ main (argc, argv)
break;
case 'f':
- dump_file_header = true;
- seenflag = true;
+ dump_file_header = TRUE;
+ seenflag = TRUE;
break;
case 'i':
- formats_info = true;
- seenflag = true;
+ formats_info = TRUE;
+ seenflag = TRUE;
+ break;
+ case 'I':
+ add_include_path (optarg);
break;
case 'p':
- dump_private_headers = true;
- seenflag = true;
+ dump_private_headers = TRUE;
+ seenflag = TRUE;
break;
case 'x':
- dump_private_headers = true;
- dump_symtab = true;
- dump_reloc_info = true;
- dump_file_header = true;
- dump_ar_hdrs = true;
- dump_section_headers = true;
- seenflag = true;
+ dump_private_headers = TRUE;
+ dump_symtab = TRUE;
+ dump_reloc_info = TRUE;
+ dump_file_header = TRUE;
+ dump_ar_hdrs = TRUE;
+ dump_section_headers = TRUE;
+ seenflag = TRUE;
break;
case 't':
- dump_symtab = true;
- seenflag = true;
+ dump_symtab = TRUE;
+ seenflag = TRUE;
break;
case 'T':
- dump_dynamic_symtab = true;
- seenflag = true;
+ dump_dynamic_symtab = TRUE;
+ seenflag = TRUE;
break;
case 'd':
- disassemble = true;
- seenflag = true;
+ disassemble = TRUE;
+ seenflag = TRUE;
break;
case 'z':
- disassemble_zeroes = true;
+ disassemble_zeroes = TRUE;
break;
case 'D':
- disassemble = true;
- disassemble_all = true;
- seenflag = true;
+ disassemble = TRUE;
+ disassemble_all = TRUE;
+ seenflag = TRUE;
break;
case 'S':
- disassemble = true;
- with_source_code = true;
- seenflag = true;
+ disassemble = TRUE;
+ with_source_code = TRUE;
+ seenflag = TRUE;
break;
case 'g':
dump_debugging = 1;
- seenflag = true;
+ seenflag = TRUE;
+ break;
+ case 'e':
+ dump_debugging = 1;
+ dump_debugging_tags = 1;
+ do_demangle = TRUE;
+ seenflag = TRUE;
break;
case 'G':
- dump_stab_section_info = true;
- seenflag = true;
+ dump_stab_section_info = TRUE;
+ seenflag = TRUE;
break;
case 's':
- dump_section_contents = true;
- seenflag = true;
+ dump_section_contents = TRUE;
+ seenflag = TRUE;
break;
case 'r':
- dump_reloc_info = true;
- seenflag = true;
+ dump_reloc_info = TRUE;
+ seenflag = TRUE;
break;
case 'R':
- dump_dynamic_reloc_info = true;
- seenflag = true;
+ dump_dynamic_reloc_info = TRUE;
+ seenflag = TRUE;
break;
case 'a':
- dump_ar_hdrs = true;
- seenflag = true;
+ dump_ar_hdrs = TRUE;
+ seenflag = TRUE;
break;
case 'h':
- dump_section_headers = true;
- seenflag = true;
+ dump_section_headers = TRUE;
+ seenflag = TRUE;
break;
case 'H':
usage (stdout, 0);
- seenflag = true;
+ seenflag = TRUE;
case 'v':
case 'V':
- show_version = true;
- seenflag = true;
+ show_version = TRUE;
+ seenflag = TRUE;
break;
default:
@@ -2912,11 +2904,11 @@ main (argc, argv)
if (show_version)
print_version ("objdump");
- if (seenflag == false)
+ if (!seenflag)
usage (stderr, 2);
if (formats_info)
- display_info ();
+ exit_status = display_info ();
else
{
if (optind == argc)
diff --git a/contrib/binutils/binutils/po/Make-in b/contrib/binutils/binutils/po/Make-in
index 0552db1..6176dbf 100644
--- a/contrib/binutils/binutils/po/Make-in
+++ b/contrib/binutils/binutils/po/Make-in
@@ -24,6 +24,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+DESTDIR =
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -111,9 +113,9 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -123,7 +125,7 @@ install-data-yes: all
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -153,12 +155,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -171,12 +173,12 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
diff --git a/contrib/binutils/binutils/po/POTFILES.in b/contrib/binutils/binutils/po/POTFILES.in
index 1a3e585..9e9e6a5 100644
--- a/contrib/binutils/binutils/po/POTFILES.in
+++ b/contrib/binutils/binutils/po/POTFILES.in
@@ -12,6 +12,7 @@ budemang.h
coffdump.c
coffgrok.c
coffgrok.h
+cxxfilt.c
debug.c
debug.c
debug.h
diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot
index 6097147..73c60b3 100644
--- a/contrib/binutils/binutils/po/binutils.pot
+++ b/contrib/binutils/binutils/po/binutils.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-10-30 10:07-0500\n"
+"POT-Creation-Date: 2003-07-11 13:56+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -43,19 +43,19 @@ msgid ""
"\n"
msgstr ""
-#: addr2line.c:89 ar.c:297 coffdump.c:479 nlmconv.c:1119 objcopy.c:424
-#: objcopy.c:457 readelf.c:2313 size.c:104 srconv.c:1962 strings.c:666
-#: sysdump.c:774 windres.c:733
+#: addr2line.c:89 ar.c:297 coffdump.c:479 nlmconv.c:1121 objcopy.c:484
+#: objcopy.c:518 readelf.c:2649 size.c:104 srconv.c:1962 strings.c:673
+#: sysdump.c:774 windres.c:702
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: addr2line.c:248
+#: addr2line.c:245
#, c-format
msgid "%s: can not get addresses from archive"
msgstr ""
-#: addr2line.c:320 nm.c:395 objdump.c:2783
+#: addr2line.c:317 nm.c:433 objdump.c:2693
#, c-format
msgid "unknown demangling style `%s'"
msgstr ""
@@ -214,7 +214,7 @@ msgstr ""
msgid "internal error -- this option not implemented"
msgstr ""
-#: ar.c:837 ar.c:888 ar.c:1333 objcopy.c:1348
+#: ar.c:837 ar.c:888 ar.c:1333 objcopy.c:1579
#, c-format
msgid "internal stat error on %s"
msgstr ""
@@ -323,40 +323,45 @@ msgid " No emulation specific options\n"
msgstr ""
#. Macros for common output.
-#: binemul.h:42
+#: binemul.h:52
#, c-format
msgid " emulation options: \n"
msgstr ""
-#: bucomm.c:106
+#: bucomm.c:113
#, c-format
msgid "can't set BFD default target to `%s': %s"
msgstr ""
-#: bucomm.c:118
+#: bucomm.c:125
#, c-format
msgid "%s: Matching formats:"
msgstr ""
-#: bucomm.c:135
+#: bucomm.c:142
msgid "Supported targets:"
msgstr ""
-#: bucomm.c:137
+#: bucomm.c:144
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: bucomm.c:155
+#: bucomm.c:162
msgid "Supported architectures:"
msgstr ""
-#: bucomm.c:157
+#: bucomm.c:164
#, c-format
msgid "%s: supported architectures:"
msgstr ""
-#: bucomm.c:264
+#: bucomm.c:360
+#, c-format
+msgid "BFD header file version %s\n"
+msgstr ""
+
+#: bucomm.c:467
#, c-format
msgid "%s: bad number: %s"
msgstr ""
@@ -387,95 +392,91 @@ msgstr ""
msgid "no input file specified"
msgstr ""
-#: debug.c:653
+#: debug.c:654
msgid "debug_add_to_current_namespace: no current file"
msgstr ""
-#: debug.c:736
+#: debug.c:737
msgid "debug_start_source: no debug_set_filename call"
msgstr ""
-#: debug.c:795
+#: debug.c:796
msgid "debug_record_function: no debug_set_filename call"
msgstr ""
-#: debug.c:851
+#: debug.c:852
msgid "debug_record_parameter: no current function"
msgstr ""
-#: debug.c:885
+#: debug.c:886
msgid "debug_end_function: no current function"
msgstr ""
-#: debug.c:891
+#: debug.c:892
msgid "debug_end_function: some blocks were not closed"
msgstr ""
-#: debug.c:921
+#: debug.c:922
msgid "debug_start_block: no current block"
msgstr ""
-#: debug.c:959
+#: debug.c:960
msgid "debug_end_block: no current block"
msgstr ""
-#: debug.c:966
+#: debug.c:967
msgid "debug_end_block: attempt to close top level block"
msgstr ""
-#: debug.c:992
+#: debug.c:993
msgid "debug_record_line: no current unit"
msgstr ""
#. FIXME
-#: debug.c:1046
+#: debug.c:1047
msgid "debug_start_common_block: not implemented"
msgstr ""
#. FIXME
-#: debug.c:1058
+#: debug.c:1059
msgid "debug_end_common_block: not implemented"
msgstr ""
#. FIXME.
-#: debug.c:1152
+#: debug.c:1153
msgid "debug_record_label: not implemented"
msgstr ""
-#: debug.c:1178
+#: debug.c:1179
msgid "debug_record_variable: no current file"
msgstr ""
-#: debug.c:1194
-msgid "debug_record_variable: no current block"
-msgstr ""
-
-#: debug.c:1763
+#: debug.c:1762
msgid "debug_make_undefined_type: unsupported kind"
msgstr ""
-#: debug.c:1964
+#: debug.c:1963
msgid "debug_name_type: no current file"
msgstr ""
-#: debug.c:2012
+#: debug.c:2011
msgid "debug_tag_type: no current file"
msgstr ""
-#: debug.c:2020
+#: debug.c:2019
msgid "debug_tag_type: extra tag attempted"
msgstr ""
-#: debug.c:2059
+#: debug.c:2058
#, c-format
msgid "Warning: changing type size from %d to %d\n"
msgstr ""
-#: debug.c:2083
+#: debug.c:2082
msgid "debug_find_named_type: no current compilation unit"
msgstr ""
-#: debug.c:2190
+#: debug.c:2189
#, c-format
msgid "debug_get_real_type: circular debug information for %s\n"
msgstr ""
@@ -484,325 +485,325 @@ msgstr ""
msgid "debug_write_type: illegal type encountered"
msgstr ""
-#: dlltool.c:735 dlltool.c:760 dlltool.c:786
+#: dlltool.c:812 dlltool.c:837 dlltool.c:863
#, c-format
msgid "Internal error: Unknown machine type: %d"
msgstr ""
-#: dlltool.c:823
+#: dlltool.c:900
#, c-format
msgid "Can't open def file: %s"
msgstr ""
-#: dlltool.c:828
+#: dlltool.c:905
#, c-format
msgid "Processing def file: %s"
msgstr ""
-#: dlltool.c:832
+#: dlltool.c:909
msgid "Processed def file"
msgstr ""
-#: dlltool.c:858
+#: dlltool.c:935
#, c-format
msgid "Syntax error in def file %s:%d"
msgstr ""
-#: dlltool.c:897
+#: dlltool.c:974
#, c-format
msgid "NAME: %s base: %x"
msgstr ""
-#: dlltool.c:900 dlltool.c:919
+#: dlltool.c:977 dlltool.c:996
msgid "Can't have LIBRARY and NAME"
msgstr ""
-#: dlltool.c:916
+#: dlltool.c:993
#, c-format
msgid "LIBRARY: %s base: %x"
msgstr ""
-#: dlltool.c:1174 resrc.c:271
+#: dlltool.c:1251 resrc.c:271
#, c-format
msgid "wait: %s"
msgstr ""
-#: dlltool.c:1179 dllwrap.c:430 resrc.c:276
+#: dlltool.c:1256 dllwrap.c:430 resrc.c:276
#, c-format
msgid "subprocess got fatal signal %d"
msgstr ""
-#: dlltool.c:1185 dllwrap.c:437 resrc.c:283
+#: dlltool.c:1262 dllwrap.c:437 resrc.c:283
#, c-format
msgid "%s exited with status %d"
msgstr ""
-#: dlltool.c:1217
+#: dlltool.c:1294
#, c-format
msgid "Sucking in info from %s section in %s"
msgstr ""
-#: dlltool.c:1341
+#: dlltool.c:1423
#, c-format
msgid "Excluding symbol: %s"
msgstr ""
-#: dlltool.c:1436 dlltool.c:1447 nm.c:959 nm.c:970 objdump.c:386 objdump.c:401
+#: dlltool.c:1518 dlltool.c:1529 nm.c:1004 nm.c:1015
#, c-format
msgid "%s: no symbols"
msgstr ""
-#. FIXME: we ought to read in and block out the base relocations
-#: dlltool.c:1474
+#. FIXME: we ought to read in and block out the base relocations.
+#: dlltool.c:1556
#, c-format
msgid "Done reading %s"
msgstr ""
-#: dlltool.c:1485
+#: dlltool.c:1567
#, c-format
msgid "Unable to open object file: %s"
msgstr ""
-#: dlltool.c:1488
+#: dlltool.c:1570
#, c-format
msgid "Scanning object file %s"
msgstr ""
-#: dlltool.c:1503
+#: dlltool.c:1585
#, c-format
msgid "Cannot produce mcore-elf dll from archive file: %s"
msgstr ""
-#: dlltool.c:1595
+#: dlltool.c:1677
msgid "Adding exports to output file"
msgstr ""
-#: dlltool.c:1640
+#: dlltool.c:1724
msgid "Added exports to output file"
msgstr ""
-#: dlltool.c:1764
+#: dlltool.c:1848
#, c-format
msgid "Generating export file: %s"
msgstr ""
-#: dlltool.c:1769
+#: dlltool.c:1853
#, c-format
msgid "Unable to open temporary assembler file: %s"
msgstr ""
-#: dlltool.c:1772
+#: dlltool.c:1856
#, c-format
msgid "Opened temporary file: %s"
msgstr ""
-#: dlltool.c:1996
+#: dlltool.c:2086
msgid "Generated exports file"
msgstr ""
-#: dlltool.c:2258
+#: dlltool.c:2378
#, c-format
msgid "bfd_open failed open stub file: %s"
msgstr ""
-#: dlltool.c:2261
+#: dlltool.c:2381
#, c-format
msgid "Creating stub file: %s"
msgstr ""
-#: dlltool.c:2650
+#: dlltool.c:2766
#, c-format
msgid "failed to open temporary head file: %s"
msgstr ""
-#: dlltool.c:2709
+#: dlltool.c:2825
#, c-format
msgid "failed to open temporary tail file: %s"
msgstr ""
-#: dlltool.c:2777
+#: dlltool.c:2892
#, c-format
msgid "Can't open .lib file: %s"
msgstr ""
-#: dlltool.c:2780
+#: dlltool.c:2895
#, c-format
msgid "Creating library file: %s"
msgstr ""
-#: dlltool.c:2839
+#: dlltool.c:2951
#, c-format
msgid "cannot delete %s: %s"
msgstr ""
-#: dlltool.c:2843
+#: dlltool.c:2955
msgid "Created lib file"
msgstr ""
-#: dlltool.c:2948
+#: dlltool.c:3062
#, c-format
msgid "Warning, ignoring duplicate EXPORT %s %d,%d"
msgstr ""
-#: dlltool.c:2954
+#: dlltool.c:3068
#, c-format
msgid "Error, duplicate EXPORT with oridinals: %s"
msgstr ""
-#: dlltool.c:3081
+#: dlltool.c:3191
msgid "Processing definitions"
msgstr ""
-#: dlltool.c:3119
+#: dlltool.c:3223
msgid "Processed definitions"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3130 dllwrap.c:495
+#: dlltool.c:3234 dllwrap.c:495
#, c-format
msgid "Usage %s <option(s)> <object-file(s)>\n"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3132
+#: dlltool.c:3236
#, c-format
msgid ""
" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"
msgstr ""
-#: dlltool.c:3133
+#: dlltool.c:3237
msgid ""
" possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, "
"ppc, thumb\n"
msgstr ""
-#: dlltool.c:3134
+#: dlltool.c:3238
msgid " -e --output-exp <outname> Generate an export file.\n"
msgstr ""
-#: dlltool.c:3135
+#: dlltool.c:3239
msgid " -l --output-lib <outname> Generate an interface library.\n"
msgstr ""
-#: dlltool.c:3136
+#: dlltool.c:3240
msgid " -a --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dlltool.c:3137
+#: dlltool.c:3241
msgid ""
" -D --dllname <name> Name of input dll to put into interface lib.\n"
msgstr ""
-#: dlltool.c:3138
+#: dlltool.c:3242
msgid " -d --input-def <deffile> Name of .def file to be read in.\n"
msgstr ""
-#: dlltool.c:3139
+#: dlltool.c:3243
msgid " -z --output-def <deffile> Name of .def file to be created.\n"
msgstr ""
-#: dlltool.c:3140
+#: dlltool.c:3244
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dlltool.c:3141
+#: dlltool.c:3245
msgid " --no-export-all-symbols Only export listed symbols\n"
msgstr ""
-#: dlltool.c:3142
+#: dlltool.c:3246
msgid " --exclude-symbols <list> Don't export <list>\n"
msgstr ""
-#: dlltool.c:3143
+#: dlltool.c:3247
msgid " --no-default-excludes Clear default exclude symbols\n"
msgstr ""
-#: dlltool.c:3144
+#: dlltool.c:3248
msgid " -b --base-file <basefile> Read linker generated base file.\n"
msgstr ""
-#: dlltool.c:3145
+#: dlltool.c:3249
msgid " -x --no-idata4 Don't generate idata$4 section.\n"
msgstr ""
-#: dlltool.c:3146
+#: dlltool.c:3250
msgid " -c --no-idata5 Don't generate idata$5 section.\n"
msgstr ""
-#: dlltool.c:3147
+#: dlltool.c:3251
msgid ""
" -U --add-underscore Add underscores to symbols in interface "
"library.\n"
msgstr ""
-#: dlltool.c:3148
+#: dlltool.c:3252
msgid " -k --kill-at Kill @<n> from exported names.\n"
msgstr ""
-#: dlltool.c:3149
+#: dlltool.c:3253
msgid " -A --add-stdcall-alias Add aliases without @<n>.\n"
msgstr ""
-#: dlltool.c:3150
+#: dlltool.c:3254
msgid " -S --as <name> Use <name> for assembler.\n"
msgstr ""
-#: dlltool.c:3151
+#: dlltool.c:3255
msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n"
msgstr ""
-#: dlltool.c:3152
+#: dlltool.c:3256
msgid ""
" -C --compat-implib Create backward compatible import library.\n"
msgstr ""
-#: dlltool.c:3153
+#: dlltool.c:3257
msgid ""
" -n --no-delete Keep temp files (repeat for extra "
"preservation).\n"
msgstr ""
-#: dlltool.c:3154
+#: dlltool.c:3258
msgid " -v --verbose Be verbose.\n"
msgstr ""
-#: dlltool.c:3155
+#: dlltool.c:3259
msgid " -V --version Display the program version.\n"
msgstr ""
-#: dlltool.c:3156
+#: dlltool.c:3260
msgid " -h --help Display this information.\n"
msgstr ""
-#: dlltool.c:3158
+#: dlltool.c:3262
msgid ""
" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"
msgstr ""
-#: dlltool.c:3159
+#: dlltool.c:3263
msgid " -L --linker <name> Use <name> as the linker.\n"
msgstr ""
-#: dlltool.c:3160
+#: dlltool.c:3264
msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n"
msgstr ""
-#: dlltool.c:3310
+#: dlltool.c:3418
#, c-format
msgid "Unable to open base-file: %s"
msgstr ""
-#: dlltool.c:3339
+#: dlltool.c:3450
#, c-format
msgid "Machine '%s' not supported"
msgstr ""
-#: dlltool.c:3442 dllwrap.c:214
+#: dlltool.c:3553 dllwrap.c:214
#, c-format
msgid "Tried file: %s"
msgstr ""
-#: dlltool.c:3449 dllwrap.c:221
+#: dlltool.c:3560 dllwrap.c:221
#, c-format
msgid "Using file: %s"
msgstr ""
@@ -1008,375 +1009,375 @@ msgstr ""
msgid "DRIVER options : %s\n"
msgstr ""
-#: emul_aix.c:52
+#: emul_aix.c:58
#, c-format
msgid " [-g] - 32 bit small archive\n"
msgstr ""
-#: emul_aix.c:53
+#: emul_aix.c:59
msgid " [-X32] - ignores 64 bit objects\n"
msgstr ""
-#: emul_aix.c:54
+#: emul_aix.c:60
msgid " [-X64] - ignores 32 bit objects\n"
msgstr ""
-#: emul_aix.c:55
+#: emul_aix.c:61
msgid " [-X32_64] - accepts 32 and 64 bit objects\n"
msgstr ""
-#: ieee.c:317
+#: ieee.c:326
msgid "unexpected end of debugging information"
msgstr ""
-#: ieee.c:412
+#: ieee.c:421
msgid "invalid number"
msgstr ""
-#: ieee.c:471
+#: ieee.c:480
msgid "invalid string length"
msgstr ""
-#: ieee.c:528 ieee.c:569
+#: ieee.c:537 ieee.c:578
msgid "expression stack overflow"
msgstr ""
-#: ieee.c:548
+#: ieee.c:557
msgid "unsupported IEEE expression operator"
msgstr ""
-#: ieee.c:563
+#: ieee.c:572
msgid "unknown section"
msgstr ""
-#: ieee.c:584
+#: ieee.c:593
msgid "expression stack underflow"
msgstr ""
-#: ieee.c:598
+#: ieee.c:607
msgid "expression stack mismatch"
msgstr ""
-#: ieee.c:637
+#: ieee.c:646
msgid "unknown builtin type"
msgstr ""
-#: ieee.c:782
+#: ieee.c:791
msgid "BCD float type not supported"
msgstr ""
-#: ieee.c:928
+#: ieee.c:937
msgid "unexpected number"
msgstr ""
-#: ieee.c:935
+#: ieee.c:944
msgid "unexpected record type"
msgstr ""
-#: ieee.c:968
+#: ieee.c:977
msgid "blocks left on stack at end"
msgstr ""
-#: ieee.c:1233
+#: ieee.c:1242
msgid "unknown BB type"
msgstr ""
-#: ieee.c:1242
+#: ieee.c:1251
msgid "stack overflow"
msgstr ""
-#: ieee.c:1267
+#: ieee.c:1276
msgid "stack underflow"
msgstr ""
-#: ieee.c:1381 ieee.c:1453 ieee.c:2152
+#: ieee.c:1390 ieee.c:1462 ieee.c:2161
msgid "illegal variable index"
msgstr ""
-#: ieee.c:1431
+#: ieee.c:1440
msgid "illegal type index"
msgstr ""
-#: ieee.c:1441 ieee.c:1478
+#: ieee.c:1450 ieee.c:1487
msgid "unknown TY code"
msgstr ""
-#: ieee.c:1460
+#: ieee.c:1469
msgid "undefined variable in TY"
msgstr ""
#. Pascal file name. FIXME.
-#: ieee.c:1871
+#: ieee.c:1880
msgid "Pascal file name not supported"
msgstr ""
-#: ieee.c:1919
+#: ieee.c:1928
msgid "unsupported qualifier"
msgstr ""
-#: ieee.c:2190
+#: ieee.c:2199
msgid "undefined variable in ATN"
msgstr ""
-#: ieee.c:2233
+#: ieee.c:2242
msgid "unknown ATN type"
msgstr ""
#. Reserved for FORTRAN common.
-#: ieee.c:2355
+#: ieee.c:2364
msgid "unsupported ATN11"
msgstr ""
#. We have no way to record this information. FIXME.
-#: ieee.c:2382
+#: ieee.c:2391
msgid "unsupported ATN12"
msgstr ""
-#: ieee.c:2442
+#: ieee.c:2451
msgid "unexpected string in C++ misc"
msgstr ""
-#: ieee.c:2455
+#: ieee.c:2464
msgid "bad misc record"
msgstr ""
-#: ieee.c:2498
+#: ieee.c:2507
msgid "unrecognized C++ misc record"
msgstr ""
-#: ieee.c:2615
+#: ieee.c:2624
msgid "undefined C++ object"
msgstr ""
-#: ieee.c:2649
+#: ieee.c:2658
msgid "unrecognized C++ object spec"
msgstr ""
-#: ieee.c:2685
+#: ieee.c:2694
msgid "unsupported C++ object type"
msgstr ""
-#: ieee.c:2695
+#: ieee.c:2704
msgid "C++ base class not defined"
msgstr ""
-#: ieee.c:2707 ieee.c:2812
+#: ieee.c:2716 ieee.c:2821
msgid "C++ object has no fields"
msgstr ""
-#: ieee.c:2726
+#: ieee.c:2735
msgid "C++ base class not found in container"
msgstr ""
-#: ieee.c:2833
+#: ieee.c:2842
msgid "C++ data member not found in container"
msgstr ""
-#: ieee.c:2874 ieee.c:3024
+#: ieee.c:2883 ieee.c:3033
msgid "unknown C++ visibility"
msgstr ""
-#: ieee.c:2908
+#: ieee.c:2917
msgid "bad C++ field bit pos or size"
msgstr ""
-#: ieee.c:3000
+#: ieee.c:3009
msgid "bad type for C++ method function"
msgstr ""
-#: ieee.c:3010
+#: ieee.c:3019
msgid "no type information for C++ method function"
msgstr ""
-#: ieee.c:3049
+#: ieee.c:3058
msgid "C++ static virtual method"
msgstr ""
-#: ieee.c:3144
+#: ieee.c:3153
msgid "unrecognized C++ object overhead spec"
msgstr ""
-#: ieee.c:3183
+#: ieee.c:3192
msgid "undefined C++ vtable"
msgstr ""
-#: ieee.c:3254
+#: ieee.c:3263
msgid "C++ default values not in a function"
msgstr ""
-#: ieee.c:3294
+#: ieee.c:3303
msgid "unrecognized C++ default type"
msgstr ""
-#: ieee.c:3325
+#: ieee.c:3334
msgid "reference parameter is not a pointer"
msgstr ""
-#: ieee.c:3410
+#: ieee.c:3419
msgid "unrecognized C++ reference type"
msgstr ""
-#: ieee.c:3492
+#: ieee.c:3501
msgid "C++ reference not found"
msgstr ""
-#: ieee.c:3500
+#: ieee.c:3509
msgid "C++ reference is not pointer"
msgstr ""
-#: ieee.c:3529 ieee.c:3537
+#: ieee.c:3538 ieee.c:3546
msgid "missing required ASN"
msgstr ""
-#: ieee.c:3567 ieee.c:3575
+#: ieee.c:3576 ieee.c:3584
msgid "missing required ATN65"
msgstr ""
-#: ieee.c:3589
+#: ieee.c:3598
msgid "bad ATN65 record"
msgstr ""
-#: ieee.c:4234
+#: ieee.c:4286
msgid "IEEE numeric overflow: 0x"
msgstr ""
-#: ieee.c:4280
+#: ieee.c:4332
#, c-format
msgid "IEEE string length overflow: %u\n"
msgstr ""
-#: ieee.c:5330
+#: ieee.c:5382
#, c-format
msgid "IEEE unsupported integer type size %u\n"
msgstr ""
-#: ieee.c:5366
+#: ieee.c:5418
#, c-format
msgid "IEEE unsupported float type size %u\n"
msgstr ""
-#: ieee.c:5402
+#: ieee.c:5454
#, c-format
msgid "IEEE unsupported complex type size %u\n"
msgstr ""
-#: nlmconv.c:281 srconv.c:2043
+#: nlmconv.c:282 srconv.c:2043
msgid "input and output files must be different"
msgstr ""
-#: nlmconv.c:328
+#: nlmconv.c:329
msgid "input file named both on command line and with INPUT"
msgstr ""
-#: nlmconv.c:337
+#: nlmconv.c:338
msgid "no input file"
msgstr ""
-#: nlmconv.c:367
+#: nlmconv.c:368
msgid "no name for output file"
msgstr ""
-#: nlmconv.c:380
+#: nlmconv.c:382
msgid "warning: input and output formats are not compatible"
msgstr ""
-#: nlmconv.c:409
+#: nlmconv.c:411
msgid "make .bss section"
msgstr ""
-#: nlmconv.c:418
+#: nlmconv.c:420
msgid "make .nlmsections section"
msgstr ""
-#: nlmconv.c:420
+#: nlmconv.c:422
msgid "set .nlmsections flags"
msgstr ""
-#: nlmconv.c:448
+#: nlmconv.c:450
msgid "set .bss vma"
msgstr ""
-#: nlmconv.c:455
+#: nlmconv.c:457
msgid "set .data size"
msgstr ""
-#: nlmconv.c:635
+#: nlmconv.c:637
#, c-format
msgid "warning: symbol %s imported but not in import list"
msgstr ""
-#: nlmconv.c:655
+#: nlmconv.c:657
msgid "set start address"
msgstr ""
-#: nlmconv.c:704
+#: nlmconv.c:706
#, c-format
msgid "warning: START procedure %s not defined"
msgstr ""
-#: nlmconv.c:706
+#: nlmconv.c:708
#, c-format
msgid "warning: EXIT procedure %s not defined"
msgstr ""
-#: nlmconv.c:708
+#: nlmconv.c:710
#, c-format
msgid "warning: CHECK procedure %s not defined"
msgstr ""
-#: nlmconv.c:729 nlmconv.c:918
+#: nlmconv.c:731 nlmconv.c:920
msgid "custom section"
msgstr ""
-#: nlmconv.c:750 nlmconv.c:947
+#: nlmconv.c:752 nlmconv.c:949
msgid "help section"
msgstr ""
-#: nlmconv.c:772 nlmconv.c:965
+#: nlmconv.c:774 nlmconv.c:967
msgid "message section"
msgstr ""
-#: nlmconv.c:788 nlmconv.c:998
+#: nlmconv.c:790 nlmconv.c:1000
msgid "module section"
msgstr ""
-#: nlmconv.c:808 nlmconv.c:1014
+#: nlmconv.c:810 nlmconv.c:1016
msgid "rpc section"
msgstr ""
#. There is no place to record this information.
-#: nlmconv.c:844
+#: nlmconv.c:846
#, c-format
msgid "%s: warning: shared libraries can not have uninitialized data"
msgstr ""
-#: nlmconv.c:865 nlmconv.c:1033
+#: nlmconv.c:867 nlmconv.c:1035
msgid "shared section"
msgstr ""
-#: nlmconv.c:873
+#: nlmconv.c:875
msgid "warning: No version number given"
msgstr ""
-#: nlmconv.c:913 nlmconv.c:942 nlmconv.c:960 nlmconv.c:1009 nlmconv.c:1028
+#: nlmconv.c:915 nlmconv.c:944 nlmconv.c:962 nlmconv.c:1011 nlmconv.c:1030
#, c-format
msgid "%s: read: %s"
msgstr ""
-#: nlmconv.c:935
+#: nlmconv.c:937
msgid "warning: MAP and FULLMAP are not supported; try ld -M"
msgstr ""
-#: nlmconv.c:1107
+#: nlmconv.c:1109
#, c-format
msgid "Usage: %s [option(s)] [in-file [out-file]]\n"
msgstr ""
-#: nlmconv.c:1108
+#: nlmconv.c:1110
msgid " Convert an object file into a NetWare Loadable Module\n"
msgstr ""
-#: nlmconv.c:1109
+#: nlmconv.c:1111
msgid ""
" The options are:\n"
" -I --input-target=<bfdname> Set the input binary file format\n"
@@ -1388,73 +1389,73 @@ msgid ""
" -v --version Display the program's version\n"
msgstr ""
-#: nlmconv.c:1151
+#: nlmconv.c:1153
#, c-format
msgid "support not compiled in for %s"
msgstr ""
-#: nlmconv.c:1191
+#: nlmconv.c:1193
msgid "make section"
msgstr ""
-#: nlmconv.c:1205
+#: nlmconv.c:1207
msgid "set section size"
msgstr ""
-#: nlmconv.c:1211
+#: nlmconv.c:1213
msgid "set section alignment"
msgstr ""
-#: nlmconv.c:1215
+#: nlmconv.c:1217
msgid "set section flags"
msgstr ""
-#: nlmconv.c:1226
+#: nlmconv.c:1228
msgid "set .nlmsections size"
msgstr ""
-#: nlmconv.c:1314 nlmconv.c:1322 nlmconv.c:1331 nlmconv.c:1336
+#: nlmconv.c:1316 nlmconv.c:1324 nlmconv.c:1333 nlmconv.c:1338
msgid "set .nlmsection contents"
msgstr ""
-#: nlmconv.c:1837
+#: nlmconv.c:1839
msgid "stub section sizes"
msgstr ""
-#: nlmconv.c:1886
+#: nlmconv.c:1888
msgid "writing stub"
msgstr ""
-#: nlmconv.c:1975
+#: nlmconv.c:1977
#, c-format
msgid "unresolved PC relative reloc against %s"
msgstr ""
-#: nlmconv.c:2039
+#: nlmconv.c:2041
#, c-format
msgid "overflow when adjusting relocation against %s"
msgstr ""
-#: nlmconv.c:2156
+#: nlmconv.c:2158
#, c-format
msgid "%s: execution of %s failed: "
msgstr ""
-#: nlmconv.c:2171
+#: nlmconv.c:2173
#, c-format
msgid "Execution of %s failed"
msgstr ""
-#: nm.c:246 size.c:85 strings.c:650
+#: nm.c:283 size.c:85 strings.c:657
#, c-format
msgid "Usage: %s [option(s)] [file(s)]\n"
msgstr ""
-#: nm.c:247
+#: nm.c:284
msgid " List symbols in [file(s)] (a.out by default).\n"
msgstr ""
-#: nm.c:248
+#: nm.c:285
msgid ""
" The options are:\n"
" -a, --debug-syms Display debugger-only symbols\n"
@@ -1464,8 +1465,9 @@ msgid ""
"names\n"
" The STYLE, if specified, can be `auto' (the "
"default),\n"
-" `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-"
-"abi'\n"
+" `gnu', `lucid', `arm', `hp', `edg', `gnu-v3', "
+"`java'\n"
+" or `gnat'\n"
" --no-demangle Do not demangle low-level symbol names\n"
" -D, --dynamic Display dynamic symbols instead of normal symbols\n"
" --defined-only Display only defined symbols\n"
@@ -1493,46 +1495,54 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:281 objdump.c:217
+#: nm.c:319 objdump.c:250
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
-#: nm.c:314
+#: nm.c:352
#, c-format
msgid "%s: invalid radix"
msgstr ""
-#: nm.c:339
+#: nm.c:377
#, c-format
msgid "%s: invalid output format"
msgstr ""
-#: nm.c:456
+#: nm.c:494
msgid "Only -X 32_64 is supported"
msgstr ""
-#: nm.c:498
+#: nm.c:514
+msgid "Using the --size-sort and --undefined-only options together"
+msgstr ""
+
+#: nm.c:515
+msgid "will produce no output, since undefined symbols have no size."
+msgstr ""
+
+#: nm.c:543
#, c-format
msgid "data size %ld"
msgstr ""
-#: nm.c:523 readelf.c:5391 readelf.c:5427
+#: nm.c:568 readelf.c:5809 readelf.c:5845
#, c-format
msgid "<processor specific>: %d"
msgstr ""
-#: nm.c:525 readelf.c:5393 readelf.c:5439
+#: nm.c:570 readelf.c:5811 readelf.c:5857
#, c-format
msgid "<OS specific>: %d"
msgstr ""
-#: nm.c:527 readelf.c:5395 readelf.c:5442
+#: nm.c:572 readelf.c:5813 readelf.c:5860
#, c-format
msgid "<unknown>: %d"
msgstr ""
-#: nm.c:1339
+#: nm.c:1376
#, c-format
msgid ""
"\n"
@@ -1541,7 +1551,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1341
+#: nm.c:1378
#, c-format
msgid ""
"\n"
@@ -1550,21 +1560,21 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1343 nm.c:1401
+#: nm.c:1380 nm.c:1438
msgid ""
"Name Value Class Type Size Line "
"Section\n"
"\n"
msgstr ""
-#: nm.c:1346 nm.c:1404
+#: nm.c:1383 nm.c:1441
msgid ""
"Name Value Class Type "
"Size Line Section\n"
"\n"
msgstr ""
-#: nm.c:1397
+#: nm.c:1434
#, c-format
msgid ""
"\n"
@@ -1573,7 +1583,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1399
+#: nm.c:1436
#, c-format
msgid ""
"\n"
@@ -1582,26 +1592,26 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1614
+#: nm.c:1658
msgid ""
"\n"
"Archive index:\n"
msgstr ""
-#: objcopy.c:363 srconv.c:1952
+#: objcopy.c:414 srconv.c:1952
#, c-format
msgid "Usage: %s [option(s)] in-file [out-file]\n"
msgstr ""
-#: objcopy.c:364
+#: objcopy.c:415
msgid " Copies a binary file, possibly transforming it in the process\n"
msgstr ""
-#: objcopy.c:365 objcopy.c:435
+#: objcopy.c:416 objcopy.c:495
msgid " The options are:\n"
msgstr ""
-#: objcopy.c:366
+#: objcopy.c:417
msgid ""
" -I --input-target <bfdname> Assume input file is in format <bfdname>\n"
" -O --output-target <bfdname> Create an output file in format "
@@ -1615,10 +1625,12 @@ msgid ""
" -p --preserve-dates Copy modified/access timestamps to the "
"output\n"
" -j --only-section <name> Only copy section <name> into the output\n"
+" --add-gnu-debuglink=<file> Add section .gnu_debuglink linking to "
+"<file>\n"
" -R --remove-section <name> Remove section <name> from the output\n"
" -S --strip-all Remove all symbol and relocation "
"information\n"
-" -g --strip-debug Remove all debugging symbols\n"
+" -g --strip-debug Remove all debugging symbols & sections\n"
" --strip-unneeded Remove all symbols not needed by "
"relocations\n"
" -N --strip-symbol <name> Do not copy symbol <name>\n"
@@ -1667,6 +1679,8 @@ msgid ""
" --remove-leading-char Remove leading character from global "
"symbols\n"
" --redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n"
+" --redefine-syms <file> --redefine-sym for all symbol pairs \n"
+" listed in <file>\n"
" --srec-len <number> Restrict the length of generated "
"Srecords\n"
" --srec-forceS3 Restrict the type of generated Srecords "
@@ -1677,21 +1691,31 @@ msgid ""
" --keep-global-symbols <file> -G for all symbols listed in <file>\n"
" --weaken-symbols <file> -W for all symbols listed in <file>\n"
" --alt-machine-code <index> Use alternate machine code for output\n"
+" --prefix-symbols <prefix> Add <prefix> to start of every symbol "
+"name\n"
+" --prefix-sections <prefix> Add <prefix> to start of every section "
+"name\n"
+" --prefix-alloc-sections <prefix>\n"
+" Add <prefix> to start of every "
+"allocatable\n"
+" section name\n"
" -v --verbose List all object files modified\n"
" -V --version Display this program's version number\n"
" -h --help Display this output\n"
+" --info List object formats & architectures "
+"supported\n"
msgstr ""
-#: objcopy.c:433
+#: objcopy.c:493
#, c-format
msgid "Usage: %s <option(s)> in-file(s)\n"
msgstr ""
-#: objcopy.c:434
+#: objcopy.c:494
msgid " Removes symbols and sections from files\n"
msgstr ""
-#: objcopy.c:436
+#: objcopy.c:496
msgid ""
" -I --input-target=<bfdname> Assume input file is in format <bfdname>\n"
" -O --output-target=<bfdname> Create an output file in format "
@@ -1703,7 +1727,7 @@ msgid ""
" -R --remove-section=<name> Remove section <name> from the output\n"
" -s --strip-all Remove all symbol and relocation "
"information\n"
-" -g -S -d --strip-debug Remove all debugging symbols\n"
+" -g -S -d --strip-debug Remove all debugging symbols & sections\n"
" --strip-unneeded Remove all symbols not needed by "
"relocations\n"
" -N --strip-symbol=<name> Do not copy symbol <name>\n"
@@ -1713,217 +1737,239 @@ msgid ""
" -v --verbose List all object files modified\n"
" -V --version Display this program's version number\n"
" -h --help Display this output\n"
+" --info List object formats & architectures "
+"supported\n"
" -o <file> Place stripped output into <file>\n"
msgstr ""
-#: objcopy.c:506
+#: objcopy.c:567
#, c-format
msgid "unrecognized section flag `%s'"
msgstr ""
-#: objcopy.c:507
+#: objcopy.c:568
#, c-format
msgid "supported flags: %s"
msgstr ""
-#: objcopy.c:584 objcopy.c:2243
+#: objcopy.c:645 objcopy.c:2526
#, c-format
msgid "cannot stat: %s: %s"
msgstr ""
-#: objcopy.c:591 objcopy.c:2261
+#: objcopy.c:652 objcopy.c:2544
#, c-format
msgid "cannot open: %s: %s"
msgstr ""
-#: objcopy.c:594 objcopy.c:2265
+#: objcopy.c:655 objcopy.c:2548
#, c-format
msgid "%s: fread failed"
msgstr ""
-#: objcopy.c:667
+#: objcopy.c:728
#, c-format
msgid "Ignoring rubbish found on line %d of %s"
msgstr ""
-#: objcopy.c:888
+#: objcopy.c:979
#, c-format
msgid "%s: Multiple redefinition of symbol \"%s\""
msgstr ""
-#: objcopy.c:893
+#: objcopy.c:983
#, c-format
msgid "%s: Symbol \"%s\" is target of more than one redefinition"
msgstr ""
-#: objcopy.c:945
+#: objcopy.c:1010
+#, c-format
+msgid "couldn't open symbol redefinition file %s (error: %s)"
+msgstr ""
+
+#: objcopy.c:1088
+#, c-format
+msgid "%s: garbage at end of line %d"
+msgstr ""
+
+#: objcopy.c:1091
+#, c-format
+msgid "%s: missing new symbol name at line %d"
+msgstr ""
+
+#: objcopy.c:1101
+#, c-format
+msgid "%s: premature end of file at line %d"
+msgstr ""
+
+#: objcopy.c:1147
msgid "Unable to change endianness of input file(s)"
msgstr ""
-#: objcopy.c:953
+#: objcopy.c:1155
#, c-format
msgid "copy from %s(%s) to %s(%s)\n"
msgstr ""
-#: objcopy.c:977
+#: objcopy.c:1182
#, c-format
msgid "Warning: Output file cannot represent architecture %s"
msgstr ""
-#: objcopy.c:1004
+#: objcopy.c:1211
#, c-format
msgid "can't create section `%s': %s"
msgstr ""
-#: objcopy.c:1090
+#: objcopy.c:1304
#, c-format
msgid "Can't fill gap after %s: %s"
msgstr ""
-#: objcopy.c:1115
+#: objcopy.c:1329
#, c-format
msgid "Can't add padding to %s: %s"
msgstr ""
-#: objcopy.c:1254
+#: objcopy.c:1485
#, c-format
msgid "%s: error copying private BFD data: %s"
msgstr ""
-#: objcopy.c:1267
+#: objcopy.c:1498
msgid "unknown alternate machine code, ignored"
msgstr ""
-#: objcopy.c:1300 objcopy.c:1330
+#: objcopy.c:1531 objcopy.c:1561
#, c-format
msgid "cannot mkdir %s for archive copying (error: %s)"
msgstr ""
-#: objcopy.c:1497
+#: objcopy.c:1749
#, c-format
msgid "Multiple renames of section %s"
msgstr ""
-#: objcopy.c:1581
+#: objcopy.c:1840
msgid "making"
msgstr ""
-#: objcopy.c:1590
+#: objcopy.c:1849
msgid "size"
msgstr ""
-#: objcopy.c:1604
+#: objcopy.c:1863
msgid "vma"
msgstr ""
-#: objcopy.c:1630
+#: objcopy.c:1888
msgid "alignment"
msgstr ""
-#: objcopy.c:1638
+#: objcopy.c:1896
msgid "flags"
msgstr ""
-#: objcopy.c:1655
+#: objcopy.c:1918
msgid "private data"
msgstr ""
-#: objcopy.c:1663
+#: objcopy.c:1926
#, c-format
msgid "%s: section `%s': error in %s: %s"
msgstr ""
-#: objcopy.c:1946
+#: objcopy.c:2199
#, c-format
msgid "%s: can't create debugging section: %s"
msgstr ""
-#: objcopy.c:1961
+#: objcopy.c:2214
#, c-format
msgid "%s: can't set debugging section contents: %s"
msgstr ""
-#: objcopy.c:1970
+#: objcopy.c:2223
#, c-format
msgid "%s: don't know how to write debugging information for %s"
msgstr ""
-#: objcopy.c:2078
+#: objcopy.c:2346
#, c-format
msgid "%s: cannot stat: %s"
msgstr ""
-#: objcopy.c:2129
+#: objcopy.c:2400
msgid "byte number must be non-negative"
msgstr ""
-#: objcopy.c:2139
+#: objcopy.c:2410
msgid "interleave must be positive"
msgstr ""
-#: objcopy.c:2159 objcopy.c:2167
+#: objcopy.c:2430 objcopy.c:2438
#, c-format
msgid "%s both copied and removed"
msgstr ""
-#: objcopy.c:2240 objcopy.c:2310 objcopy.c:2410 objcopy.c:2437 objcopy.c:2461
-#: objcopy.c:2465 objcopy.c:2485
+#: objcopy.c:2523 objcopy.c:2593 objcopy.c:2693 objcopy.c:2724 objcopy.c:2748
+#: objcopy.c:2752 objcopy.c:2772
#, c-format
msgid "bad format for %s"
msgstr ""
-#: objcopy.c:2379
+#: objcopy.c:2662
#, c-format
msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
msgstr ""
-#: objcopy.c:2531
+#: objcopy.c:2818
msgid "alternate machine code index must be positive"
msgstr ""
-#: objcopy.c:2550
+#: objcopy.c:2856
msgid "byte number must be less than interleave"
msgstr ""
-#: objcopy.c:2577
+#: objcopy.c:2883
#, c-format
msgid "architecture %s unknown"
msgstr ""
-#: objcopy.c:2581
+#: objcopy.c:2887
msgid ""
"Warning: input target 'binary' required for binary architecture parameter."
msgstr ""
-#: objcopy.c:2582
+#: objcopy.c:2888
#, c-format
msgid " Argument %s ignored"
msgstr ""
-#: objcopy.c:2588
+#: objcopy.c:2894
#, c-format
msgid "Cannot stat: %s: %s"
msgstr ""
-#: objcopy.c:2628 objcopy.c:2642
+#: objcopy.c:2934 objcopy.c:2948
#, c-format
msgid "%s %s%c0x%s never used"
msgstr ""
-#: objdump.c:165
+#: objdump.c:197
#, c-format
msgid "Usage: %s <option(s)> <file(s)>\n"
msgstr ""
-#: objdump.c:166
+#: objdump.c:198
msgid " Display information from object <file(s)>.\n"
msgstr ""
-#: objdump.c:167
+#: objdump.c:199
msgid " At least one of the following switches must be given:\n"
msgstr ""
-#: objdump.c:168
+#: objdump.c:200
msgid ""
" -a, --archive-headers Display archive header information\n"
" -f, --file-headers Display the contents of the overall file header\n"
@@ -1949,13 +1995,13 @@ msgid ""
" -H, --help Display this information\n"
msgstr ""
-#: objdump.c:190
+#: objdump.c:222
msgid ""
"\n"
" The following switches are optional:\n"
msgstr ""
-#: objdump.c:191
+#: objdump.c:223
msgid ""
" -b, --target=BFDNAME Specify the target object format as "
"BFDNAME\n"
@@ -1972,14 +2018,15 @@ msgid ""
"output\n"
" -C, --demangle[=STYLE] Decode mangled/processed symbol names\n"
" The STYLE, if specified, can be `auto', "
-"'gnu',\n"
-" 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-"
-"abi'\n"
+"`gnu',\n"
+" `lucid', `arm', `hp', `edg', `gnu-v3', "
+"`java'\n"
+" or `gnat'\n"
" -w, --wide Format output for more than 80 columns\n"
" -z, --disassemble-zeroes Do not skip blocks of zeroes when "
"disassembling\n"
-" --start-address=ADDR Only process data whoes address is >= ADDR\n"
-" --stop-address=ADDR Only process data whoes address is <= ADDR\n"
+" --start-address=ADDR Only process data whose address is >= ADDR\n"
+" --stop-address=ADDR Only process data whose address is <= ADDR\n"
" --prefix-addresses Print complete address alongside "
"disassembly\n"
" --[no-]show-raw-insn Display hex alongside symbolic disassembly\n"
@@ -1988,324 +2035,322 @@ msgid ""
"\n"
msgstr ""
-#: objdump.c:358
+#: objdump.c:391
msgid "Sections:\n"
msgstr ""
-#: objdump.c:361 objdump.c:365
+#: objdump.c:394 objdump.c:398
msgid "Idx Name Size VMA LMA File off Algn"
msgstr ""
-#: objdump.c:367
+#: objdump.c:400
msgid ""
"Idx Name Size VMA LMA File off "
"Algn"
msgstr ""
-#: objdump.c:371
+#: objdump.c:404
msgid " Flags"
msgstr ""
-#: objdump.c:419
-#, c-format
-msgid "%s: not a dynamic object"
+#: objdump.c:406
+msgid " Pg"
msgstr ""
-#: objdump.c:433
+#: objdump.c:451
#, c-format
-msgid "%s: No dynamic symbols"
+msgid "%s: not a dynamic object"
msgstr ""
-#: objdump.c:1114
+#: objdump.c:1144
msgid "Out of virtual memory"
msgstr ""
-#: objdump.c:1543
+#: objdump.c:1574
#, c-format
msgid "Can't use supplied machine %s"
msgstr ""
-#: objdump.c:1561
+#: objdump.c:1592
#, c-format
msgid "Can't disassemble for architecture %s\n"
msgstr ""
-#: objdump.c:1643
+#: objdump.c:1682
#, c-format
msgid "Disassembly of section %s:\n"
msgstr ""
-#: objdump.c:1818
+#: objdump.c:1847
#, c-format
msgid ""
"No %s section present\n"
"\n"
msgstr ""
-#: objdump.c:1825
+#: objdump.c:1854
#, c-format
msgid "%s has no %s section"
msgstr ""
-#: objdump.c:1839
+#: objdump.c:1868
#, c-format
msgid "Reading %s section of %s failed: %s"
msgstr ""
-#: objdump.c:1851
+#: objdump.c:1880
#, c-format
msgid "Reading %s section of %s failed: %s\n"
msgstr ""
-#: objdump.c:1894
+#: objdump.c:1923
#, c-format
msgid ""
"Contents of %s section:\n"
"\n"
msgstr ""
-#: objdump.c:1994
+#: objdump.c:2021
#, c-format
msgid "architecture: %s, "
msgstr ""
-#: objdump.c:1997
+#: objdump.c:2024
#, c-format
msgid "flags 0x%08x:\n"
msgstr ""
-#: objdump.c:2010
+#: objdump.c:2038
msgid ""
"\n"
"start address 0x"
msgstr ""
-#: objdump.c:2042
+#: objdump.c:2071
#, c-format
msgid ""
"\n"
"%s: file format %s\n"
msgstr ""
-#: objdump.c:2084
+#: objdump.c:2111
#, c-format
msgid "%s: printing debugging information failed"
msgstr ""
-#: objdump.c:2161
+#: objdump.c:2190
#, c-format
msgid "In archive %s:\n"
msgstr ""
-#: objdump.c:2213
+#: objdump.c:2249
#, c-format
msgid "Contents of section %s:\n"
msgstr ""
-#: objdump.c:2719
-#, c-format
-msgid "BFD header file version %s\n"
+#: objdump.c:2369
+msgid "no symbols\n"
msgstr ""
-#: objdump.c:2808
+#: objdump.c:2718
msgid "unrecognized -E option"
msgstr ""
-#: objdump.c:2819
+#: objdump.c:2729
#, c-format
msgid "unrecognized --endian type `%s'"
msgstr ""
-#: rdcoff.c:204
+#: rdcoff.c:206
#, c-format
msgid "parse_coff_type: Bad type code 0x%x"
msgstr ""
-#: rdcoff.c:422 rdcoff.c:530 rdcoff.c:729
+#: rdcoff.c:424 rdcoff.c:532 rdcoff.c:731
#, c-format
msgid "bfd_coff_get_syment failed: %s"
msgstr ""
-#: rdcoff.c:438 rdcoff.c:749
+#: rdcoff.c:440 rdcoff.c:751
#, c-format
msgid "bfd_coff_get_auxent failed: %s"
msgstr ""
-#: rdcoff.c:816
+#: rdcoff.c:818
#, c-format
msgid "%ld: .bf without preceding function"
msgstr ""
-#: rdcoff.c:866
+#: rdcoff.c:868
#, c-format
msgid "%ld: unexpected .ef\n"
msgstr ""
-#: rddbg.c:87
+#: rddbg.c:91
#, c-format
msgid "%s: no recognized debugging information"
msgstr ""
-#: rddbg.c:410
+#: rddbg.c:415
msgid "Last stabs entries before error:\n"
msgstr ""
-#: readelf.c:328
+#: readelf.c:455
#, c-format
msgid "%s: Error: "
msgstr ""
-#: readelf.c:339
+#: readelf.c:466
#, c-format
msgid "%s: Warning: "
msgstr ""
-#: readelf.c:361
+#: readelf.c:488
#, c-format
-msgid "Unable to seek to %x for %s\n"
+msgid "Unable to seek to 0x%x for %s\n"
msgstr ""
-#: readelf.c:372
+#: readelf.c:499
#, c-format
-msgid "Out of memory allocating %d bytes for %s\n"
+msgid "Out of memory allocating 0x%x bytes for %s\n"
msgstr ""
-#: readelf.c:380
+#: readelf.c:507
#, c-format
-msgid "Unable to read in %d bytes of %s\n"
+msgid "Unable to read in 0x%x bytes of %s\n"
msgstr ""
-#: readelf.c:433 readelf.c:591
+#: readelf.c:560 readelf.c:614 readelf.c:798 readelf.c:833
#, c-format
msgid "Unhandled data length: %d\n"
msgstr ""
-#: readelf.c:675
+#: readelf.c:924
msgid "Don't know about relocations on this machine architecture\n"
msgstr ""
-#: readelf.c:697 readelf.c:726 readelf.c:772 readelf.c:799
+#: readelf.c:946 readelf.c:975 readelf.c:1021 readelf.c:1049
msgid "relocs"
msgstr ""
-#: readelf.c:708 readelf.c:737 readelf.c:782 readelf.c:809
+#: readelf.c:957 readelf.c:986 readelf.c:1031 readelf.c:1059
msgid "out of memory parsing relocs"
msgstr ""
-#: readelf.c:861
+#: readelf.c:1112
msgid ""
" Offset Info Type Sym. Value Symbol's Name + Addend\n"
msgstr ""
-#: readelf.c:863
+#: readelf.c:1114
msgid " Offset Info Type Sym.Value Sym. Name + Addend\n"
msgstr ""
-#: readelf.c:868
+#: readelf.c:1119
msgid " Offset Info Type Sym. Value Symbol's Name\n"
msgstr ""
-#: readelf.c:870
+#: readelf.c:1121
msgid " Offset Info Type Sym.Value Sym. Name\n"
msgstr ""
-#: readelf.c:878
+#: readelf.c:1129
msgid ""
-" Offset Info Type Symbol's Value "
+" Offset Info Type Symbol's Value "
"Symbol's Name + Addend\n"
msgstr ""
-#: readelf.c:880
+#: readelf.c:1131
msgid ""
" Offset Info Type Sym. Value Sym. Name + "
"Addend\n"
msgstr ""
-#: readelf.c:885
+#: readelf.c:1136
msgid ""
-" Offset Info Type Symbol's Value "
+" Offset Info Type Symbol's Value "
"Symbol's Name\n"
msgstr ""
-#: readelf.c:887
+#: readelf.c:1138
msgid ""
" Offset Info Type Sym. Value Sym. Name\n"
msgstr ""
-#: readelf.c:1134 readelf.c:1136 readelf.c:1184 readelf.c:1186 readelf.c:1195
-#: readelf.c:1197
+#: readelf.c:1414 readelf.c:1416 readelf.c:1492 readelf.c:1494 readelf.c:1503
+#: readelf.c:1505
#, c-format
msgid "unrecognized: %-7lx"
msgstr ""
-#: readelf.c:1158
+#: readelf.c:1466
#, c-format
msgid "<string table index %3ld>"
msgstr ""
-#: readelf.c:1423
+#: readelf.c:1743
#, c-format
msgid "Processor Specific: %lx"
msgstr ""
-#: readelf.c:1442
+#: readelf.c:1762
#, c-format
msgid "Operating System specific: %lx"
msgstr ""
-#: readelf.c:1445 readelf.c:2086
+#: readelf.c:1765 readelf.c:2417
#, c-format
msgid "<unknown>: %lx"
msgstr ""
-#: readelf.c:1459
+#: readelf.c:1779
msgid "NONE (None)"
msgstr ""
-#: readelf.c:1460
+#: readelf.c:1780
msgid "REL (Relocatable file)"
msgstr ""
-#: readelf.c:1461
+#: readelf.c:1781
msgid "EXEC (Executable file)"
msgstr ""
-#: readelf.c:1462
+#: readelf.c:1782
msgid "DYN (Shared object file)"
msgstr ""
-#: readelf.c:1463
+#: readelf.c:1783
msgid "CORE (Core file)"
msgstr ""
-#: readelf.c:1467
+#: readelf.c:1787
#, c-format
msgid "Processor Specific: (%x)"
msgstr ""
-#: readelf.c:1469
+#: readelf.c:1789
#, c-format
msgid "OS Specific: (%x)"
msgstr ""
-#: readelf.c:1471 readelf.c:1573 readelf.c:2238
+#: readelf.c:1791 readelf.c:1898 readelf.c:2574
#, c-format
msgid "<unknown>: %x"
msgstr ""
-#: readelf.c:1484
+#: readelf.c:1804
msgid "None"
msgstr ""
-#: readelf.c:2280
+#: readelf.c:2616
msgid "Usage: readelf <option(s)> elf-file(s)\n"
msgstr ""
-#: readelf.c:2281
+#: readelf.c:2617
msgid " Display information about the contents of ELF format files\n"
msgstr ""
-#: readelf.c:2282
+#: readelf.c:2618
msgid ""
" Options are:\n"
" -a --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"
@@ -2333,13 +2378,13 @@ msgid ""
" Display the contents of DWARF2 debug sections\n"
msgstr ""
-#: readelf.c:2304
+#: readelf.c:2640
msgid ""
" -i --instruction-dump=<number>\n"
" Disassemble the contents of section <number>\n"
msgstr ""
-#: readelf.c:2308
+#: readelf.c:2644
msgid ""
" -I --histogram Display histogram of bucket list lengths\n"
" -W --wide Allow output width to exceed 80 characters\n"
@@ -2347,312 +2392,321 @@ msgid ""
" -v --version Display the version number of readelf\n"
msgstr ""
-#: readelf.c:2330
+#: readelf.c:2666 readelf.c:10765
msgid "Out of memory allocating dump request table."
msgstr ""
-#: readelf.c:2494 readelf.c:2570
+#: readelf.c:2830 readelf.c:2906
#, c-format
msgid "Unrecognized debug option '%s'\n"
msgstr ""
-#: readelf.c:2604
+#: readelf.c:2940
#, c-format
msgid "Invalid option '-%c'\n"
msgstr ""
-#: readelf.c:2617
+#: readelf.c:2953
msgid "Nothing to do.\n"
msgstr ""
-#: readelf.c:2630 readelf.c:2647 readelf.c:4952
+#: readelf.c:2966 readelf.c:2983 readelf.c:5366
msgid "none"
msgstr ""
-#: readelf.c:2634 readelf.c:2651 readelf.c:2679
+#: readelf.c:2970 readelf.c:2987 readelf.c:3018
#, c-format
msgid "<unknown: %x>"
msgstr ""
-#: readelf.c:2648
+#: readelf.c:2984
msgid "2's complement, little endian"
msgstr ""
-#: readelf.c:2649
+#: readelf.c:2985
msgid "2's complement, big endian"
msgstr ""
-#: readelf.c:2676
+#: readelf.c:3015
msgid "Standalone App"
msgstr ""
-#: readelf.c:2694
+#: readelf.c:3034
msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
msgstr ""
-#: readelf.c:2702
+#: readelf.c:3042
msgid "ELF Header:\n"
msgstr ""
-#: readelf.c:2703
+#: readelf.c:3043
msgid " Magic: "
msgstr ""
-#: readelf.c:2707
+#: readelf.c:3047
#, c-format
msgid " Class: %s\n"
msgstr ""
-#: readelf.c:2709
+#: readelf.c:3049
#, c-format
msgid " Data: %s\n"
msgstr ""
-#: readelf.c:2711
+#: readelf.c:3051
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: readelf.c:2718
+#: readelf.c:3058
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: readelf.c:2720
+#: readelf.c:3060
#, c-format
msgid " ABI Version: %d\n"
msgstr ""
-#: readelf.c:2722
+#: readelf.c:3062
#, c-format
msgid " Type: %s\n"
msgstr ""
-#: readelf.c:2724
+#: readelf.c:3064
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: readelf.c:2726
+#: readelf.c:3066
#, c-format
msgid " Version: 0x%lx\n"
msgstr ""
-#: readelf.c:2729
+#: readelf.c:3069
msgid " Entry point address: "
msgstr ""
-#: readelf.c:2731
+#: readelf.c:3071
msgid ""
"\n"
" Start of program headers: "
msgstr ""
-#: readelf.c:2733
+#: readelf.c:3073
msgid ""
" (bytes into file)\n"
" Start of section headers: "
msgstr ""
-#: readelf.c:2735
+#: readelf.c:3075
msgid " (bytes into file)\n"
msgstr ""
-#: readelf.c:2737
+#: readelf.c:3077
#, c-format
msgid " Flags: 0x%lx%s\n"
msgstr ""
-#: readelf.c:2740
+#: readelf.c:3080
#, c-format
msgid " Size of this header: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2742
+#: readelf.c:3082
#, c-format
msgid " Size of program headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2744
+#: readelf.c:3084
#, c-format
msgid " Number of program headers: %ld\n"
msgstr ""
-#: readelf.c:2746
+#: readelf.c:3086
#, c-format
msgid " Size of section headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2748
+#: readelf.c:3088
#, c-format
msgid " Number of section headers: %ld"
msgstr ""
-#: readelf.c:2753
+#: readelf.c:3093
#, c-format
msgid " Section header string table index: %ld"
msgstr ""
-#: readelf.c:2787 readelf.c:2823
+#: readelf.c:3127 readelf.c:3163
msgid "program headers"
msgstr ""
-#: readelf.c:2857
+#: readelf.c:3203 readelf.c:3480 readelf.c:3526 readelf.c:3589 readelf.c:3656
+#: readelf.c:4715 readelf.c:4758 readelf.c:4948 readelf.c:5917 readelf.c:5931
+#: readelf.c:10411
+msgid "Out of memory\n"
+msgstr ""
+
+#: readelf.c:3231
msgid ""
"\n"
"There are no program headers in this file.\n"
msgstr ""
-#: readelf.c:2863
+#: readelf.c:3237
#, c-format
msgid ""
"\n"
"Elf file type is %s\n"
msgstr ""
-#: readelf.c:2864
+#: readelf.c:3238
msgid "Entry point "
msgstr ""
-#: readelf.c:2866
+#: readelf.c:3240
#, c-format
msgid ""
"\n"
"There are %d program headers, starting at offset "
msgstr ""
-#: readelf.c:2877 readelf.c:3104 readelf.c:3150 readelf.c:3213 readelf.c:3280
-#: readelf.c:4314 readelf.c:4357 readelf.c:4546 readelf.c:5499 readelf.c:5513
-#: readelf.c:9747 readelf.c:9787
-msgid "Out of memory\n"
-msgstr ""
-
-#: readelf.c:2895 readelf.c:2897
+#: readelf.c:3252 readelf.c:3254
msgid ""
"\n"
"Program Headers:\n"
msgstr ""
-#: readelf.c:2901
+#: readelf.c:3258
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:2904
+#: readelf.c:3261
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:2908
+#: readelf.c:3265
msgid " Type Offset VirtAddr PhysAddr\n"
msgstr ""
-#: readelf.c:2910
+#: readelf.c:3267
msgid " FileSiz MemSiz Flags Align\n"
msgstr ""
-#: readelf.c:3010
+#: readelf.c:3360
msgid "more than one dynamic segment\n"
msgstr ""
-#: readelf.c:3018
+#: readelf.c:3368
msgid "Unable to find program interpreter name\n"
msgstr ""
-#: readelf.c:3025
+#: readelf.c:3375
#, c-format
msgid ""
"\n"
" [Requesting program interpreter: %s]"
msgstr ""
-#: readelf.c:3043
+#: readelf.c:3387
msgid ""
"\n"
" Section to Segment mapping:\n"
msgstr ""
-#: readelf.c:3044
+#: readelf.c:3388
msgid " Segment Sections...\n"
msgstr ""
-#: readelf.c:3095 readelf.c:3141
+#: readelf.c:3437
+msgid "Cannot interpret virtual addresses without program headers.\n"
+msgstr ""
+
+#: readelf.c:3453
+#, c-format
+msgid "Virtual address 0x%lx not located in any PT_LOAD segment.\n"
+msgstr ""
+
+#: readelf.c:3471 readelf.c:3517
msgid "section headers"
msgstr ""
-#: readelf.c:3189 readelf.c:3256
+#: readelf.c:3565 readelf.c:3632
msgid "symbols"
msgstr ""
-#: readelf.c:3200 readelf.c:3267
+#: readelf.c:3576 readelf.c:3643
msgid "symtab shndx"
msgstr ""
-#: readelf.c:3369
+#: readelf.c:3745
msgid ""
"\n"
"There are no sections in this file.\n"
msgstr ""
-#: readelf.c:3375
+#: readelf.c:3751
#, c-format
msgid "There are %d section headers, starting at offset 0x%lx:\n"
msgstr ""
-#: readelf.c:3392 readelf.c:3706 readelf.c:4053 readelf.c:5650
+#: readelf.c:3768 readelf.c:4098 readelf.c:4433 readelf.c:6070
msgid "string table"
msgstr ""
-#: readelf.c:3413
+#: readelf.c:3793
msgid "File contains multiple dynamic symbol tables\n"
msgstr ""
-#: readelf.c:3425
+#: readelf.c:3805
msgid "File contains multiple dynamic string tables\n"
msgstr ""
-#: readelf.c:3431
+#: readelf.c:3811
msgid "dynamic strings"
msgstr ""
-#: readelf.c:3437
+#: readelf.c:3817
msgid "File contains multiple symtab shndx tables\n"
msgstr ""
-#: readelf.c:3475
+#: readelf.c:3855
msgid ""
"\n"
"Section Headers:\n"
msgstr ""
-#: readelf.c:3477
+#: readelf.c:3857
msgid ""
"\n"
"Section Header:\n"
msgstr ""
-#: readelf.c:3481
+#: readelf.c:3861
msgid ""
" [Nr] Name Type Addr Off Size ES Flg Lk "
"Inf Al\n"
msgstr ""
-#: readelf.c:3484
+#: readelf.c:3864
msgid ""
" [Nr] Name Type Address Off Size ES "
"Flg Lk Inf Al\n"
msgstr ""
-#: readelf.c:3487
+#: readelf.c:3867
msgid " [Nr] Name Type Address Offset\n"
msgstr ""
-#: readelf.c:3488
+#: readelf.c:3868
msgid " Size EntSize Flags Link Info Align\n"
msgstr ""
-#: readelf.c:3583
+#: readelf.c:3963
msgid ""
"Key to Flags:\n"
" W (write), A (alloc), X (execute), M (merge), S (strings)\n"
@@ -2660,500 +2714,500 @@ msgid ""
" O (extra OS processing required) o (OS specific), p (processor specific)\n"
msgstr ""
-#: readelf.c:3644
+#: readelf.c:4031
#, c-format
msgid ""
"\n"
-"Relocation section at offset 0x%lx contains %ld bytes:\n"
+"'%s' relocation section at offset 0x%lx contains %ld bytes:\n"
msgstr ""
-#: readelf.c:3651
+#: readelf.c:4043
msgid ""
"\n"
"There are no dynamic relocations in this file.\n"
msgstr ""
-#: readelf.c:3678
+#: readelf.c:4070
msgid ""
"\n"
"Relocation section "
msgstr ""
-#: readelf.c:3683 readelf.c:4116 readelf.c:4130
+#: readelf.c:4075 readelf.c:4496 readelf.c:4510
#, c-format
msgid "'%s'"
msgstr ""
-#: readelf.c:3685 readelf.c:4132
+#: readelf.c:4077 readelf.c:4512
#, c-format
msgid " at offset 0x%lx contains %lu entries:\n"
msgstr ""
-#: readelf.c:3723
+#: readelf.c:4115
msgid ""
"\n"
"There are no relocations in this file.\n"
msgstr ""
-#: readelf.c:3919
+#: readelf.c:4299
msgid "unwind table"
msgstr ""
-#: readelf.c:3970 readelf.c:3982 readelf.c:7977 readelf.c:7989
+#: readelf.c:4350 readelf.c:4362 readelf.c:8499 readelf.c:8511
#, c-format
msgid "Skipping unexpected symbol type %u\n"
msgstr ""
-#: readelf.c:3990
+#: readelf.c:4370
#, c-format
msgid "Skipping unexpected relocation type %s\n"
msgstr ""
-#: readelf.c:4035 readelf.c:4060
+#: readelf.c:4415 readelf.c:4440
msgid ""
"\n"
"There are no unwind sections in this file.\n"
msgstr ""
-#: readelf.c:4111
+#: readelf.c:4491
msgid ""
"\n"
"Could not find unwind info section for "
msgstr ""
-#: readelf.c:4123
+#: readelf.c:4503
msgid "unwind info"
msgstr ""
-#: readelf.c:4125
+#: readelf.c:4505
msgid ""
"\n"
"Unwind section "
msgstr ""
-#: readelf.c:4298 readelf.c:4341
+#: readelf.c:4699 readelf.c:4742
msgid "dynamic segment"
msgstr ""
-#: readelf.c:4419
+#: readelf.c:4820
msgid ""
"\n"
"There is no dynamic segment in this file.\n"
msgstr ""
-#: readelf.c:4453
+#: readelf.c:4854
msgid "Unable to seek to end of file!"
msgstr ""
-#: readelf.c:4464
+#: readelf.c:4865
msgid "Unable to determine the number of symbols to load\n"
msgstr ""
-#: readelf.c:4494
+#: readelf.c:4895
msgid "Unable to seek to end of file\n"
msgstr ""
-#: readelf.c:4500
+#: readelf.c:4901
msgid "Unable to determine the length of the dynamic string table\n"
msgstr ""
-#: readelf.c:4505
+#: readelf.c:4906
msgid "dynamic string table"
msgstr ""
-#: readelf.c:4539
+#: readelf.c:4941
msgid "symbol information"
msgstr ""
-#: readelf.c:4563
+#: readelf.c:4965
#, c-format
msgid ""
"\n"
-"Dynamic segment at offset 0x%x contains %ld entries:\n"
+"Dynamic segment at offset 0x%lx contains %ld entries:\n"
msgstr ""
-#: readelf.c:4566
+#: readelf.c:4968
msgid " Tag Type Name/Value\n"
msgstr ""
-#: readelf.c:4602
+#: readelf.c:5004
msgid "Auxiliary library"
msgstr ""
-#: readelf.c:4606
+#: readelf.c:5008
msgid "Filter library"
msgstr ""
-#: readelf.c:4610
+#: readelf.c:5012
msgid "Configuration file"
msgstr ""
-#: readelf.c:4614
+#: readelf.c:5016
msgid "Dependency audit library"
msgstr ""
-#: readelf.c:4618
+#: readelf.c:5020
msgid "Audit library"
msgstr ""
-#: readelf.c:4636 readelf.c:4662 readelf.c:4688
+#: readelf.c:5038 readelf.c:5066 readelf.c:5094
msgid "Flags:"
msgstr ""
-#: readelf.c:4638 readelf.c:4664 readelf.c:4690
+#: readelf.c:5041 readelf.c:5069 readelf.c:5096
msgid " None\n"
msgstr ""
-#: readelf.c:4809
+#: readelf.c:5217
#, c-format
msgid "Shared library: [%s]"
msgstr ""
-#: readelf.c:4812
+#: readelf.c:5220
msgid " program interpreter"
msgstr ""
-#: readelf.c:4816
+#: readelf.c:5224
#, c-format
msgid "Library soname: [%s]"
msgstr ""
-#: readelf.c:4820
+#: readelf.c:5228
#, c-format
msgid "Library rpath: [%s]"
msgstr ""
-#: readelf.c:4824
+#: readelf.c:5232
#, c-format
msgid "Library runpath: [%s]"
msgstr ""
-#: readelf.c:4887
+#: readelf.c:5296
#, c-format
msgid "Not needed object: [%s]\n"
msgstr ""
-#: readelf.c:4998
+#: readelf.c:5412
#, c-format
msgid ""
"\n"
"Version definition section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:5001
+#: readelf.c:5415
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:5003 readelf.c:5198
+#: readelf.c:5417 readelf.c:5612
#, c-format
msgid " Offset: %#08lx Link: %lx (%s)\n"
msgstr ""
-#: readelf.c:5010
+#: readelf.c:5424
msgid "version definition section"
msgstr ""
-#: readelf.c:5036
+#: readelf.c:5450
#, c-format
msgid " %#06x: Rev: %d Flags: %s"
msgstr ""
-#: readelf.c:5039
+#: readelf.c:5453
#, c-format
msgid " Index: %d Cnt: %d "
msgstr ""
-#: readelf.c:5050
+#: readelf.c:5464
#, c-format
msgid "Name: %s\n"
msgstr ""
-#: readelf.c:5052
+#: readelf.c:5466
#, c-format
msgid "Name index: %ld\n"
msgstr ""
-#: readelf.c:5067
+#: readelf.c:5481
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
-#: readelf.c:5070
+#: readelf.c:5484
#, c-format
msgid " %#06x: Parent %d, name index: %ld\n"
msgstr ""
-#: readelf.c:5089
+#: readelf.c:5503
#, c-format
msgid ""
"\n"
"Version needs section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:5092
+#: readelf.c:5506
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:5094
+#: readelf.c:5508
#, c-format
msgid " Offset: %#08lx Link to section: %ld (%s)\n"
msgstr ""
-#: readelf.c:5100
+#: readelf.c:5514
msgid "version need section"
msgstr ""
-#: readelf.c:5122
+#: readelf.c:5536
#, c-format
msgid " %#06x: Version: %d"
msgstr ""
-#: readelf.c:5125
+#: readelf.c:5539
#, c-format
msgid " File: %s"
msgstr ""
-#: readelf.c:5127
+#: readelf.c:5541
#, c-format
msgid " File: %lx"
msgstr ""
-#: readelf.c:5129
+#: readelf.c:5543
#, c-format
msgid " Cnt: %d\n"
msgstr ""
-#: readelf.c:5147
+#: readelf.c:5561
#, c-format
msgid " %#06x: Name: %s"
msgstr ""
-#: readelf.c:5150
+#: readelf.c:5564
#, c-format
msgid " %#06x: Name index: %lx"
msgstr ""
-#: readelf.c:5153
+#: readelf.c:5567
#, c-format
msgid " Flags: %s Version: %d\n"
msgstr ""
-#: readelf.c:5189
+#: readelf.c:5603
msgid "version string table"
msgstr ""
-#: readelf.c:5193
+#: readelf.c:5607
#, c-format
msgid ""
"\n"
"Version symbols section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:5196
+#: readelf.c:5610
msgid " Addr: "
msgstr ""
-#: readelf.c:5206
+#: readelf.c:5622
msgid "version symbol data"
msgstr ""
-#: readelf.c:5233
+#: readelf.c:5649
msgid " 0 (*local*) "
msgstr ""
-#: readelf.c:5237
+#: readelf.c:5653
msgid " 1 (*global*) "
msgstr ""
-#: readelf.c:5272 readelf.c:5707
+#: readelf.c:5689 readelf.c:6129
msgid "version need"
msgstr ""
-#: readelf.c:5282
+#: readelf.c:5699
msgid "version need aux (2)"
msgstr ""
-#: readelf.c:5323 readelf.c:5769
+#: readelf.c:5741 readelf.c:6192
msgid "version def"
msgstr ""
-#: readelf.c:5342 readelf.c:5784
+#: readelf.c:5760 readelf.c:6207
msgid "version def aux"
msgstr ""
-#: readelf.c:5373
+#: readelf.c:5791
msgid ""
"\n"
"No version information found in this file.\n"
msgstr ""
-#: readelf.c:5505
+#: readelf.c:5923
msgid "Unable to read in dynamic data\n"
msgstr ""
-#: readelf.c:5547
+#: readelf.c:5967
msgid "Unable to seek to start of dynamic information"
msgstr ""
-#: readelf.c:5553
+#: readelf.c:5973
msgid "Failed to read in number of buckets\n"
msgstr ""
-#: readelf.c:5559
+#: readelf.c:5979
msgid "Failed to read in number of chains\n"
msgstr ""
-#: readelf.c:5579
+#: readelf.c:5999
msgid ""
"\n"
"Symbol table for image:\n"
msgstr ""
-#: readelf.c:5581
+#: readelf.c:6001
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:5583
+#: readelf.c:6003
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:5628
+#: readelf.c:6048
#, c-format
msgid ""
"\n"
"Symbol table '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:5632
+#: readelf.c:6052
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:5634
+#: readelf.c:6054
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:5680
+#: readelf.c:6101
msgid "version data"
msgstr ""
-#: readelf.c:5720
+#: readelf.c:6142
msgid "version need aux (3)"
msgstr ""
-#: readelf.c:5745
+#: readelf.c:6167
msgid "bad dynamic symbol"
msgstr ""
-#: readelf.c:5807
+#: readelf.c:6230
msgid ""
"\n"
"Dynamic symbol information is not available for displaying symbols.\n"
msgstr ""
-#: readelf.c:5819
+#: readelf.c:6242
#, c-format
msgid ""
"\n"
"Histogram for bucket list length (total of %d buckets):\n"
msgstr ""
-#: readelf.c:5821
+#: readelf.c:6244
#, c-format
msgid " Length Number %% of total Coverage\n"
msgstr ""
-#: readelf.c:5826 readelf.c:5845 readelf.c:9234 readelf.c:9426
+#: readelf.c:6249 readelf.c:6268 readelf.c:9898 readelf.c:10090
msgid "Out of memory"
msgstr ""
-#: readelf.c:5894
+#: readelf.c:6317
#, c-format
msgid ""
"\n"
"Dynamic info segment at offset 0x%lx contains %d entries:\n"
msgstr ""
-#: readelf.c:5897
+#: readelf.c:6320
msgid " Num: Name BoundTo Flags\n"
msgstr ""
-#: readelf.c:5949
+#: readelf.c:6373
#, c-format
msgid ""
"\n"
"Assembly dump of section %s\n"
msgstr ""
-#: readelf.c:5972
+#: readelf.c:6396
#, c-format
msgid ""
"\n"
"Section '%s' has no data to dump.\n"
msgstr ""
-#: readelf.c:5977
+#: readelf.c:6401
#, c-format
msgid ""
"\n"
"Hex dump of section '%s':\n"
msgstr ""
-#: readelf.c:5982
+#: readelf.c:6406
msgid "section data"
msgstr ""
-#: readelf.c:6131
+#: readelf.c:6555
msgid "badly formed extended line op encountered!\n"
msgstr ""
-#: readelf.c:6138
+#: readelf.c:6562
#, c-format
msgid " Extended opcode %d: "
msgstr ""
-#: readelf.c:6143
+#: readelf.c:6567
msgid ""
"End of Sequence\n"
"\n"
msgstr ""
-#: readelf.c:6149
+#: readelf.c:6573
#, c-format
msgid "set Address to 0x%lx\n"
msgstr ""
-#: readelf.c:6154
+#: readelf.c:6578
msgid " define new File Table entry\n"
msgstr ""
-#: readelf.c:6155 readelf.c:6284
+#: readelf.c:6579 readelf.c:6726
msgid " Entry\tDir\tTime\tSize\tName\n"
msgstr ""
-#: readelf.c:6157
+#: readelf.c:6581
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:6160 readelf.c:6162 readelf.c:6164 readelf.c:6296 readelf.c:6298
-#: readelf.c:6300
+#: readelf.c:6584 readelf.c:6586 readelf.c:6588 readelf.c:6738 readelf.c:6740
+#: readelf.c:6742
#, c-format
msgid "%lu\t"
msgstr ""
-#: readelf.c:6165
+#: readelf.c:6589
#, c-format
msgid ""
"%s\n"
"\n"
msgstr ""
-#: readelf.c:6169
+#: readelf.c:6593
#, c-format
msgid "UNKNOWN: length %d\n"
msgstr ""
-#: readelf.c:6195
+#: readelf.c:6621
#, c-format
msgid ""
"\n"
@@ -3161,690 +3215,674 @@ msgid ""
"\n"
msgstr ""
-#: readelf.c:6207
-msgid "64-bit DWARF line info is not supported yet.\n"
-msgstr ""
-
-#: readelf.c:6214
+#: readelf.c:6649
msgid "The line info appears to be corrupt - the section is too small\n"
msgstr ""
-#: readelf.c:6222
-msgid "Only DWARF version 2 line info is currently supported.\n"
+#: readelf.c:6658
+msgid "Only DWARF version 2 and 3 line info is currently supported.\n"
msgstr ""
-#: readelf.c:6237
+#: readelf.c:6679
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:6238
+#: readelf.c:6680
#, c-format
msgid " DWARF Version: %d\n"
msgstr ""
-#: readelf.c:6239
+#: readelf.c:6681
#, c-format
msgid " Prologue Length: %d\n"
msgstr ""
-#: readelf.c:6240
+#: readelf.c:6682
#, c-format
msgid " Minimum Instruction Length: %d\n"
msgstr ""
-#: readelf.c:6241
+#: readelf.c:6683
#, c-format
msgid " Initial value of 'is_stmt': %d\n"
msgstr ""
-#: readelf.c:6242
+#: readelf.c:6684
#, c-format
msgid " Line Base: %d\n"
msgstr ""
-#: readelf.c:6243
+#: readelf.c:6685
#, c-format
msgid " Line Range: %d\n"
msgstr ""
-#: readelf.c:6244
+#: readelf.c:6686
#, c-format
msgid " Opcode Base: %d\n"
msgstr ""
-#: readelf.c:6253
+#: readelf.c:6695
msgid ""
"\n"
" Opcodes:\n"
msgstr ""
-#: readelf.c:6256
+#: readelf.c:6698
#, c-format
msgid " Opcode %d has %d args\n"
msgstr ""
-#: readelf.c:6262
+#: readelf.c:6704
msgid ""
"\n"
" The Directory Table is empty.\n"
msgstr ""
-#: readelf.c:6265
+#: readelf.c:6707
msgid ""
"\n"
" The Directory Table:\n"
msgstr ""
-#: readelf.c:6269
+#: readelf.c:6711
#, c-format
msgid " %s\n"
msgstr ""
-#: readelf.c:6280
+#: readelf.c:6722
msgid ""
"\n"
" The File Name Table is empty.\n"
msgstr ""
-#: readelf.c:6283
+#: readelf.c:6725
msgid ""
"\n"
" The File Name Table:\n"
msgstr ""
-#: readelf.c:6291
+#: readelf.c:6733
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:6302
+#: readelf.c:6744
#, c-format
msgid "%s\n"
msgstr ""
#. Now display the statements.
-#: readelf.c:6310
+#: readelf.c:6752
msgid ""
"\n"
" Line Number Statements:\n"
msgstr ""
-#: readelf.c:6326
+#: readelf.c:6768
#, c-format
msgid " Special opcode %d: advance Address by %d to 0x%lx"
msgstr ""
-#: readelf.c:6330
+#: readelf.c:6772
#, c-format
msgid " and Line by %d to %d\n"
msgstr ""
-#: readelf.c:6341
+#: readelf.c:6783
msgid " Copy\n"
msgstr ""
-#: readelf.c:6348
+#: readelf.c:6790
#, c-format
msgid " Advance PC by %d to %lx\n"
msgstr ""
-#: readelf.c:6356
+#: readelf.c:6798
#, c-format
msgid " Advance Line by %d to %d\n"
msgstr ""
-#: readelf.c:6363
+#: readelf.c:6805
#, c-format
msgid " Set File Name to entry %d in the File Name Table\n"
msgstr ""
-#: readelf.c:6371
+#: readelf.c:6813
#, c-format
msgid " Set column to %d\n"
msgstr ""
-#: readelf.c:6378
+#: readelf.c:6820
#, c-format
msgid " Set is_stmt to %d\n"
msgstr ""
-#: readelf.c:6383
+#: readelf.c:6825
msgid " Set basic block\n"
msgstr ""
-#: readelf.c:6391
+#: readelf.c:6833
#, c-format
msgid " Advance PC by constant %d to 0x%lx\n"
msgstr ""
-#: readelf.c:6399
+#: readelf.c:6841
#, c-format
msgid " Advance PC by fixed size amount %d to 0x%lx\n"
msgstr ""
-#: readelf.c:6404
+#: readelf.c:6846
msgid " Set prologue_end to true\n"
msgstr ""
-#: readelf.c:6408
+#: readelf.c:6850
msgid " Set epilogue_begin to true\n"
msgstr ""
-#: readelf.c:6414
+#: readelf.c:6856
#, c-format
msgid " Set ISA to %d\n"
msgstr ""
-#: readelf.c:6418
+#: readelf.c:6860
#, c-format
msgid " Unknown opcode %d with operands: "
msgstr ""
-#: readelf.c:6450 readelf.c:6912 readelf.c:6984
+#: readelf.c:6891 readelf.c:7371 readelf.c:7443
#, c-format
msgid ""
"Contents of the %s section:\n"
"\n"
msgstr ""
-#: readelf.c:6469
-msgid "64-bit DWARF pubnames are not supported yet.\n"
+#: readelf.c:6931
+msgid "Only DWARF 2 and 3 pubnames are currently supported\n"
msgstr ""
-#: readelf.c:6479
-msgid "Only DWARF 2 pubnames are currently supported\n"
-msgstr ""
-
-#: readelf.c:6486
+#: readelf.c:6938
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:6488
+#: readelf.c:6940
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:6490
+#: readelf.c:6942
#, c-format
msgid " Offset into .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:6492
+#: readelf.c:6944
#, c-format
msgid " Size of area in .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:6495
+#: readelf.c:6947
msgid ""
"\n"
" Offset\tName\n"
msgstr ""
-#: readelf.c:6586
+#: readelf.c:7042
#, c-format
msgid "Unknown TAG value: %lx"
msgstr ""
-#: readelf.c:6697
+#: readelf.c:7156
#, c-format
msgid "Unknown AT value: %lx"
msgstr ""
-#: readelf.c:6734
+#: readelf.c:7193
#, c-format
msgid "Unknown FORM value: %lx"
msgstr ""
-#: readelf.c:6933
+#: readelf.c:7392
#, c-format
msgid " DW_MACINFO_start_file - lineno: %d filenum: %d\n"
msgstr ""
-#: readelf.c:6938
+#: readelf.c:7397
msgid " DW_MACINFO_end_file\n"
msgstr ""
-#: readelf.c:6946
+#: readelf.c:7405
#, c-format
msgid " DW_MACINFO_define - lineno : %d macro : %s\n"
msgstr ""
-#: readelf.c:6954
+#: readelf.c:7413
#, c-format
msgid " DW_MACINFO_undef - lineno : %d macro : %s\n"
msgstr ""
-#: readelf.c:6965
+#: readelf.c:7424
#, c-format
msgid " DW_MACINFO_vendor_ext - constant : %d string : %s\n"
msgstr ""
-#: readelf.c:6993
+#: readelf.c:7452
msgid " Number TAG\n"
msgstr ""
-#: readelf.c:6999
+#: readelf.c:7458
#, c-format
msgid " %ld %s [%s]\n"
msgstr ""
-#: readelf.c:7002
+#: readelf.c:7461
msgid "has children"
msgstr ""
-#: readelf.c:7002
+#: readelf.c:7461
msgid "no children"
msgstr ""
-#: readelf.c:7006
+#: readelf.c:7465
#, c-format
msgid " %-18s %s\n"
msgstr ""
-#: readelf.c:7027
+#: readelf.c:7486
#, c-format
msgid " %lu byte block: "
msgstr ""
-#: readelf.c:7350
+#: readelf.c:7814
msgid "(User defined location op)"
msgstr ""
-#: readelf.c:7352
+#: readelf.c:7816
msgid "(Unknown location op)"
msgstr ""
-#: readelf.c:7390
+#: readelf.c:7855
msgid "debug_loc section data"
msgstr ""
-#: readelf.c:7421
+#: readelf.c:7887
msgid ""
"\n"
"The .debug_loc section is empty.\n"
msgstr ""
-#: readelf.c:7424
+#: readelf.c:7891
msgid ""
"Contents of the .debug_loc section:\n"
"\n"
msgstr ""
-#: readelf.c:7425
+#: readelf.c:7892
msgid ""
"\n"
" Offset Begin End Expression\n"
msgstr ""
-#: readelf.c:7497
+#: readelf.c:7968
msgid "debug_str section data"
msgstr ""
-#: readelf.c:7516
+#: readelf.c:7987
msgid "<no .debug_str section>"
msgstr ""
-#: readelf.c:7519
+#: readelf.c:7990
msgid "<offset is too big>"
msgstr ""
-#: readelf.c:7539
+#: readelf.c:8009
msgid ""
"\n"
"The .debug_str section is empty.\n"
msgstr ""
-#: readelf.c:7543
+#: readelf.c:8013
msgid ""
"Contents of the .debug_str section:\n"
"\n"
msgstr ""
-#: readelf.c:7714
+#: readelf.c:8088
+msgid "Internal error: DWARF version is not 2 or 3.\n"
+msgstr ""
+
+#: readelf.c:8203
#, c-format
-msgid " (indirect string, offset: 0x%lx): "
+msgid " (indirect string, offset: 0x%lx): %s"
msgstr ""
-#: readelf.c:7723
+#: readelf.c:8212
#, c-format
msgid "Unrecognized form: %d\n"
msgstr ""
-#: readelf.c:7736
+#: readelf.c:8226
msgid "(not inlined)"
msgstr ""
-#: readelf.c:7737
+#: readelf.c:8229
msgid "(inlined)"
msgstr ""
-#: readelf.c:7738
+#: readelf.c:8232
msgid "(declared as inline but ignored)"
msgstr ""
-#: readelf.c:7739
+#: readelf.c:8235
msgid "(declared as inline and inlined)"
msgstr ""
-#: readelf.c:7740
+#: readelf.c:8238
#, c-format
msgid " (Unknown inline attribute value: %lx)"
msgstr ""
-#: readelf.c:7911 readelf.c:8117
+#: readelf.c:8419 readelf.c:8646
#, c-format
msgid ""
"The section %s contains:\n"
"\n"
msgstr ""
-#: readelf.c:7935
-msgid "64-bit DWARF debug info is not supported yet.\n"
-msgstr ""
-
-#: readelf.c:8007
+#: readelf.c:8535
#, c-format
msgid " Compilation Unit @ %lx:\n"
msgstr ""
-#: readelf.c:8008
+#: readelf.c:8536
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:8009
+#: readelf.c:8537
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:8010
+#: readelf.c:8538
#, c-format
msgid " Abbrev Offset: %ld\n"
msgstr ""
-#: readelf.c:8011
+#: readelf.c:8539
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:8015
-msgid "Only version 2 DWARF debug information is currently supported.\n"
+#: readelf.c:8543
+msgid "Only version 2 and 3 DWARF debug information is currently supported.\n"
msgstr ""
-#: readelf.c:8036
+#: readelf.c:8563
msgid "Unable to locate .debug_abbrev section!\n"
msgstr ""
-#: readelf.c:8042
+#: readelf.c:8569
msgid "debug_abbrev section data"
msgstr ""
-#: readelf.c:8079
+#: readelf.c:8606
#, c-format
msgid "Unable to locate entry %lu in the abbreviation table\n"
msgstr ""
-#: readelf.c:8084
+#: readelf.c:8611
#, c-format
msgid " <%d><%lx>: Abbrev Number: %lu (%s)\n"
msgstr ""
-#: readelf.c:8138
-msgid "64-bit DWARF aranges are not supported yet.\n"
-msgstr ""
-
-#: readelf.c:8144
-msgid "Only DWARF 2 aranges are currently supported.\n"
+#: readelf.c:8691
+msgid "Only DWARF 2 and 3 aranges are currently supported.\n"
msgstr ""
-#: readelf.c:8148
+#: readelf.c:8695
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:8149
+#: readelf.c:8696
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:8150
+#: readelf.c:8697
#, c-format
msgid " Offset into .debug_info: %lx\n"
msgstr ""
-#: readelf.c:8151
+#: readelf.c:8698
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:8152
+#: readelf.c:8699
#, c-format
msgid " Segment Size: %d\n"
msgstr ""
-#: readelf.c:8154
+#: readelf.c:8701
msgid ""
"\n"
" Address Length\n"
msgstr ""
-#: readelf.c:8336
+#: readelf.c:8903
#, c-format
msgid "The section %s contains:\n"
msgstr ""
-#: readelf.c:8359
-msgid "64-bit DWARF format frames are not supported yet.\n"
-msgstr ""
-
-#: readelf.c:8908
+#: readelf.c:9538
#, c-format
msgid "Displaying the debug contents of section %s is not yet supported.\n"
msgstr ""
-#: readelf.c:8974
+#: readelf.c:9634
#, c-format
msgid ""
"\n"
"Section '%s' has no debugging data.\n"
msgstr ""
-#: readelf.c:8979 readelf.c:9041
+#: readelf.c:9639 readelf.c:9701
msgid "debug section data"
msgstr ""
-#: readelf.c:8995
+#: readelf.c:9655
#, c-format
msgid "Unrecognized debug section: %s\n"
msgstr ""
-#: readelf.c:9069
+#: readelf.c:9729
msgid "Some sections were not dumped because they do not exist!\n"
msgstr ""
-#: readelf.c:9142 readelf.c:9506
+#: readelf.c:9806 readelf.c:10170
msgid "liblist"
msgstr ""
-#: readelf.c:9227
+#: readelf.c:9891
msgid "options"
msgstr ""
-#: readelf.c:9258
+#: readelf.c:9922
#, c-format
msgid ""
"\n"
"Section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:9419
+#: readelf.c:10083
msgid "conflict list found without a dynamic symbol table"
msgstr ""
-#: readelf.c:9437 readelf.c:9453
+#: readelf.c:10101 readelf.c:10117
msgid "conflict"
msgstr ""
-#: readelf.c:9463
+#: readelf.c:10127
#, c-format
msgid ""
"\n"
"Section '.conflict' contains %ld entries:\n"
msgstr ""
-#: readelf.c:9465
+#: readelf.c:10129
msgid " Num: Index Value Name"
msgstr ""
-#: readelf.c:9514
+#: readelf.c:10178
msgid "liblist string table"
msgstr ""
-#: readelf.c:9523
+#: readelf.c:10187
#, c-format
msgid ""
"\n"
"Library list section '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:9572
+#: readelf.c:10236
msgid "NT_PRSTATUS (prstatus structure)"
msgstr ""
-#: readelf.c:9573
+#: readelf.c:10237
msgid "NT_FPREGSET (floating point registers)"
msgstr ""
-#: readelf.c:9574
+#: readelf.c:10238
msgid "NT_PRPSINFO (prpsinfo structure)"
msgstr ""
-#: readelf.c:9575
+#: readelf.c:10239
msgid "NT_TASKSTRUCT (task structure)"
msgstr ""
-#: readelf.c:9576
+#: readelf.c:10240
msgid "NT_PRXFPREG (user_xfpregs structure)"
msgstr ""
-#: readelf.c:9577
+#: readelf.c:10241
msgid "NT_PSTATUS (pstatus structure)"
msgstr ""
-#: readelf.c:9578
+#: readelf.c:10242
msgid "NT_FPREGS (floating point registers)"
msgstr ""
-#: readelf.c:9579
+#: readelf.c:10243
msgid "NT_PSINFO (psinfo structure)"
msgstr ""
-#: readelf.c:9580
+#: readelf.c:10244
msgid "NT_LWPSTATUS (lwpstatus_t structure)"
msgstr ""
-#: readelf.c:9581
+#: readelf.c:10245
msgid "NT_LWPSINFO (lwpsinfo_t structure)"
msgstr ""
-#: readelf.c:9582
+#: readelf.c:10246
msgid "NT_WIN32PSTATUS (win32_pstatus structure)"
msgstr ""
-#: readelf.c:9584 readelf.c:9608
+#: readelf.c:10248 readelf.c:10272
#, c-format
msgid "Unknown note type: (0x%08x)"
msgstr ""
#. NetBSD core "procinfo" structure.
-#: readelf.c:9598
+#: readelf.c:10262
msgid "NetBSD procinfo structure"
msgstr ""
-#: readelf.c:9625 readelf.c:9639
+#: readelf.c:10289 readelf.c:10303
msgid "PT_GETREGS (reg structure)"
msgstr ""
-#: readelf.c:9627 readelf.c:9641
+#: readelf.c:10291 readelf.c:10305
msgid "PT_GETFPREGS (fpreg structure)"
msgstr ""
-#: readelf.c:9647
+#: readelf.c:10311
#, c-format
msgid "PT_FIRSTMACH+%d"
msgstr ""
-#: readelf.c:9701
+#: readelf.c:10365
msgid "notes"
msgstr ""
-#: readelf.c:9707
+#: readelf.c:10371
#, c-format
msgid ""
"\n"
"Notes at offset 0x%08lx with length 0x%08lx:\n"
msgstr ""
-#: readelf.c:9709
+#: readelf.c:10373
msgid " Owner\t\tData size\tDescription\n"
msgstr ""
-#: readelf.c:9728
+#: readelf.c:10392
#, c-format
msgid "corrupt note found at offset %x into core notes\n"
msgstr ""
-#: readelf.c:9730
+#: readelf.c:10394
#, c-format
msgid " type: %x, namesize: %08lx, descsize: %08lx\n"
msgstr ""
-#: readelf.c:9832
+#: readelf.c:10476
msgid "No note segments present in the core file.\n"
msgstr ""
-#: readelf.c:9910
+#: readelf.c:10560
msgid ""
"This instance of readelf has been built without support for a\n"
"64 bit data type and so it cannot read 64 bit ELF files.\n"
msgstr ""
-#: readelf.c:9956
+#: readelf.c:10606
#, c-format
msgid "Cannot stat input file %s.\n"
msgstr ""
-#: readelf.c:9963
+#: readelf.c:10613
#, c-format
msgid "Input file %s not found.\n"
msgstr ""
-#: readelf.c:9969
+#: readelf.c:10619
#, c-format
msgid "%s: Failed to read file header\n"
msgstr ""
-#: readelf.c:9983
+#: readelf.c:10633
#, c-format
msgid ""
"\n"
"File: %s\n"
msgstr ""
-#: rename.c:131
+#: rename.c:132
#, c-format
msgid "%s: cannot set time: %s"
msgstr ""
#. We have to clean up here.
-#: rename.c:170 rename.c:203
+#: rename.c:171 rename.c:204
#, c-format
msgid "%s: rename: %s"
msgstr ""
-#: rename.c:211
+#: rename.c:212
#, c-format
msgid "%s: simple_copy: %s"
msgstr ""
@@ -4182,7 +4220,7 @@ msgstr ""
msgid "%s: read of %lu returned %lu"
msgstr ""
-#: resrc.c:650 resrc.c:904 resrc.c:1177 resrc.c:1331
+#: resrc.c:650 resrc.c:905 resrc.c:1178 resrc.c:1332
#, c-format
msgid "stat failed on bitmap file `%s': %s"
msgstr ""
@@ -4192,25 +4230,25 @@ msgstr ""
msgid "cursor file `%s' does not contain cursor data"
msgstr ""
-#: resrc.c:735 resrc.c:1048
+#: resrc.c:735 resrc.c:1049
#, c-format
msgid "%s: fseek to %lu failed: %s"
msgstr ""
-#: resrc.c:872
+#: resrc.c:873
msgid "help ID requires DIALOGEX"
msgstr ""
-#: resrc.c:874
+#: resrc.c:875
msgid "control data requires DIALOGEX"
msgstr ""
-#: resrc.c:1017
+#: resrc.c:1018
#, c-format
msgid "icon file `%s' does not contain icon data"
msgstr ""
-#: resrc.c:1536
+#: resrc.c:1537
#, c-format
msgid "can't open `%s' for output: %s"
msgstr ""
@@ -4228,7 +4266,7 @@ msgstr ""
msgid ""
" The options are:\n"
" -A|-B --format={sysv|berkeley} Select output style (default is %s)\n"
-" -o|-d|-h --radix={8|10|16} Display numbers in octal, decimal or "
+" -o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or "
"hex\n"
" -t --totals Display the total sizes (Berkeley "
"only)\n"
@@ -4267,88 +4305,88 @@ msgstr ""
msgid "unable to open output file %s"
msgstr ""
-#: stabs.c:343 stabs.c:1759
+#: stabs.c:346 stabs.c:1755
msgid "numeric overflow"
msgstr ""
-#: stabs.c:354
+#: stabs.c:357
#, c-format
msgid "Bad stab: %s\n"
msgstr ""
-#: stabs.c:364
+#: stabs.c:367
#, c-format
msgid "Warning: %s: %s\n"
msgstr ""
-#: stabs.c:485
+#: stabs.c:488
msgid "N_LBRAC not within function\n"
msgstr ""
-#: stabs.c:524
+#: stabs.c:527
msgid "Too many N_RBRACs\n"
msgstr ""
-#: stabs.c:769
+#: stabs.c:773
msgid "unknown C++ encoded name"
msgstr ""
#. Complain and keep going, so compilers can invent new
#. cross-reference types.
-#: stabs.c:1296
+#: stabs.c:1293
msgid "unrecognized cross reference type"
msgstr ""
#. Does this actually ever happen? Is that why we are worrying
#. about dealing with it rather than just calling error_type?
-#: stabs.c:1851
+#: stabs.c:1847
msgid "missing index type"
msgstr ""
-#: stabs.c:2178
+#: stabs.c:2174
msgid "unknown virtual character for baseclass"
msgstr ""
-#: stabs.c:2196
+#: stabs.c:2192
msgid "unknown visibility character for baseclass"
msgstr ""
-#: stabs.c:2388
+#: stabs.c:2384
msgid "unnamed $vb type"
msgstr ""
-#: stabs.c:2394
+#: stabs.c:2390
msgid "unrecognized C++ abbreviation"
msgstr ""
-#: stabs.c:2474
+#: stabs.c:2470
msgid "unknown visibility character for field"
msgstr ""
-#: stabs.c:2730
+#: stabs.c:2726
msgid "const/volatile indicator missing"
msgstr ""
-#: stabs.c:2970
+#: stabs.c:2967
#, c-format
msgid "No mangling for \"%s\"\n"
msgstr ""
-#: stabs.c:3283
+#: stabs.c:3281
msgid "Undefined N_EXCL"
msgstr ""
-#: stabs.c:3371
+#: stabs.c:3369
#, c-format
msgid "Type file number %d out of range\n"
msgstr ""
-#: stabs.c:3376
+#: stabs.c:3374
#, c-format
msgid "Type index number %d out of range\n"
msgstr ""
-#: stabs.c:3463
+#: stabs.c:3461
#, c-format
msgid "Unrecognized XCOFF type %d\n"
msgstr ""
@@ -4358,25 +4396,25 @@ msgstr ""
msgid "bad mangled name `%s'\n"
msgstr ""
-#: stabs.c:3858
+#: stabs.c:3859
msgid "no argument types in mangled string\n"
msgstr ""
-#: strings.c:200
+#: strings.c:208
#, c-format
msgid "invalid number %s"
msgstr ""
-#: strings.c:640
+#: strings.c:647
#, c-format
msgid "invalid integer argument %s"
msgstr ""
-#: strings.c:651
+#: strings.c:658
msgid " Display printable strings in [file(s)] (stdin by default)\n"
msgstr ""
-#: strings.c:652
+#: strings.c:659
msgid ""
" The options are:\n"
" -a - --all Scan the entire file, not just the data section\n"
@@ -4388,8 +4426,9 @@ msgid ""
"or 16\n"
" -o An alias for --radix=o\n"
" -T --target=<BFDNAME> Specify the binary file format\n"
-" -e --encoding={s,b,l,B,L} Select character size and endianness:\n"
-" s = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit\n"
+" -e --encoding={s,S,b,l,B,L} Select character size and endianness:\n"
+" s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-"
+"bit\n"
" -h --help Display this information\n"
" -v --version Print the program's version number\n"
msgstr ""
@@ -4410,110 +4449,126 @@ msgstr ""
msgid "cannot open input file %s"
msgstr ""
-#: version.c:35
+#: version.c:36
msgid "Copyright 2002 Free Software Foundation, Inc.\n"
msgstr ""
-#: version.c:36
+#: version.c:37
msgid ""
"This program is free software; you may redistribute it under the terms of\n"
"the GNU General Public License. This program has absolutely no warranty.\n"
msgstr ""
-#: windres.c:239
+#: windres.c:205
#, c-format
msgid "can't open %s `%s': %s"
msgstr ""
-#: windres.c:418
+#: windres.c:384
msgid ": expected to be a directory\n"
msgstr ""
-#: windres.c:430
+#: windres.c:396
msgid ": expected to be a leaf\n"
msgstr ""
-#: windres.c:439
+#: windres.c:405
#, c-format
msgid "%s: warning: "
msgstr ""
-#: windres.c:441
+#: windres.c:407
msgid ": duplicate value\n"
msgstr ""
-#: windres.c:602
+#: windres.c:569
#, c-format
msgid "unknown format type `%s'"
msgstr ""
-#: windres.c:603
+#: windres.c:570
#, c-format
msgid "%s: supported formats:"
msgstr ""
#. Otherwise, we give up.
-#: windres.c:688
+#: windres.c:655
#, c-format
msgid "can not determine type of file `%s'; use the -I option"
msgstr ""
-#: windres.c:702
+#: windres.c:669
#, c-format
msgid "Usage: %s [option(s)] [input-file] [output-file]\n"
msgstr ""
-#: windres.c:704
+#: windres.c:671
msgid ""
" The options are:\n"
" -i --input=<file> Name input file\n"
" -o --output=<file> Name output file\n"
-" -I --input-format=<format> Specify input format\n"
+" -J --input-format=<format> Specify input format\n"
" -O --output-format=<format> Specify output format\n"
" -F --target=<target> Specify COFF target\n"
" --preprocessor=<program> Program to use to preprocess rc file\n"
-" --include-dir=<dir> Include directory when preprocessing rc file\n"
+" -I --include-dir=<dir> Include directory when preprocessing rc file\n"
" -D --define <sym>[=<val>] Define SYM when preprocessing rc file\n"
+" -U --undefine <sym> Undefine SYM when preprocessing rc file\n"
" -v --verbose Verbose - tells you what it's doing\n"
-" --language=<val> Set language when reading rc file\n"
+" -l --language=<val> Set language when reading rc file\n"
" --use-temp-file Use a temporary file instead of popen to "
"read\n"
" the preprocessor output\n"
" --no-use-temp-file Use popen (default)\n"
msgstr ""
-#: windres.c:719
+#: windres.c:687
msgid " --yydebug Turn on parser debugging\n"
msgstr ""
-#: windres.c:722
+#: windres.c:690
msgid ""
+" -r Ignored for compatibility with rc\n"
" -h --help Print this help message\n"
" -V --version Print version information\n"
msgstr ""
-#: windres.c:725
+#: windres.c:694
msgid ""
"FORMAT is one of rc, res, or coff, and is deduced from the file name\n"
"extension if not specified. A single file name is an input file.\n"
"No input-file is stdin, default rc. No output-file is stdout, default rc.\n"
msgstr ""
-#: windres.c:988
+#: windres.c:833
+msgid "invalid option -f\n"
+msgstr ""
+
+#: windres.c:838
+msgid "No filename following the -fo option.\n"
+msgstr ""
+
+#: windres.c:896
+msgid ""
+"Option -I is deprecated for setting the input format, please use -J "
+"instead.\n"
+msgstr ""
+
+#: windres.c:1014
msgid "no resources"
msgstr ""
-#: wrstabs.c:366 wrstabs.c:2026
+#: wrstabs.c:395 wrstabs.c:2055
#, c-format
msgid "string_hash_lookup failed: %s"
msgstr ""
-#: wrstabs.c:666
+#: wrstabs.c:695
#, c-format
msgid "stab_int_type: bad size %u"
msgstr ""
-#: wrstabs.c:1466
+#: wrstabs.c:1495
#, c-format
msgid "%s: warning: unknown size for field `%s' in struct"
msgstr ""
diff --git a/contrib/binutils/binutils/prdbg.c b/contrib/binutils/binutils/prdbg.c
index 8bb0053..5b6b047 100644
--- a/contrib/binutils/binutils/prdbg.c
+++ b/contrib/binutils/binutils/prdbg.c
@@ -1,6 +1,7 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
+ Tags style generation written by Salvador E. Tropea <set@computer.org>.
This file is part of GNU Binutils.
@@ -43,6 +44,15 @@ struct pr_handle
struct pr_stack *stack;
/* Parameter number we are about to output. */
int parameter;
+ /* The following are used only by the tags code (tg_). */
+ /* Name of the file we are using. */
+ char *filename;
+ /* The BFD. */
+ bfd *abfd;
+ /* The symbols table for this BFD. */
+ asymbol **syms;
+ /* Pointer to a function to demangle symbols. */
+ char *(*demangler) (bfd *, const char *);
};
/* The type stack. */
@@ -57,78 +67,131 @@ struct pr_stack
enum debug_visibility visibility;
/* Name of the current method we are handling. */
const char *method;
+ /* The following are used only by the tags code (tg_). */
+ /* Type for the container (struct, union, class, union class). */
+ const char *flavor;
+ /* A comma separated list of parent classes. */
+ char *parents;
+ /* How many parents contains parents. */
+ int num_parents;
};
-static void indent PARAMS ((struct pr_handle *));
-static boolean push_type PARAMS ((struct pr_handle *, const char *));
-static boolean prepend_type PARAMS ((struct pr_handle *, const char *));
-static boolean append_type PARAMS ((struct pr_handle *, const char *));
-static boolean substitute_type PARAMS ((struct pr_handle *, const char *));
-static boolean indent_type PARAMS ((struct pr_handle *));
-static char *pop_type PARAMS ((struct pr_handle *));
-static void print_vma PARAMS ((bfd_vma, char *, boolean, boolean));
-static boolean pr_fix_visibility
- PARAMS ((struct pr_handle *, enum debug_visibility));
-
-static boolean pr_start_compilation_unit PARAMS ((PTR, const char *));
-static boolean pr_start_source PARAMS ((PTR, const char *));
-static boolean pr_empty_type PARAMS ((PTR));
-static boolean pr_void_type PARAMS ((PTR));
-static boolean pr_int_type PARAMS ((PTR, unsigned int, boolean));
-static boolean pr_float_type PARAMS ((PTR, unsigned int));
-static boolean pr_complex_type PARAMS ((PTR, unsigned int));
-static boolean pr_bool_type PARAMS ((PTR, unsigned int));
-static boolean pr_enum_type
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static boolean pr_pointer_type PARAMS ((PTR));
-static boolean pr_function_type PARAMS ((PTR, int, boolean));
-static boolean pr_reference_type PARAMS ((PTR));
-static boolean pr_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-static boolean pr_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, boolean));
-static boolean pr_set_type PARAMS ((PTR, boolean));
-static boolean pr_offset_type PARAMS ((PTR));
-static boolean pr_method_type PARAMS ((PTR, boolean, int, boolean));
-static boolean pr_const_type PARAMS ((PTR));
-static boolean pr_volatile_type PARAMS ((PTR));
-static boolean pr_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int));
-static boolean pr_struct_field
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static boolean pr_end_struct_type PARAMS ((PTR));
-static boolean pr_start_class_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int, boolean,
- boolean));
-static boolean pr_class_static_member
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-static boolean pr_class_baseclass
- PARAMS ((PTR, bfd_vma, boolean, enum debug_visibility));
-static boolean pr_class_start_method PARAMS ((PTR, const char *));
-static boolean pr_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean,
- bfd_vma, boolean));
-static boolean pr_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean));
-static boolean pr_class_end_method PARAMS ((PTR));
-static boolean pr_end_class_type PARAMS ((PTR));
-static boolean pr_typedef_type PARAMS ((PTR, const char *));
-static boolean pr_tag_type
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static boolean pr_typdef PARAMS ((PTR, const char *));
-static boolean pr_tag PARAMS ((PTR, const char *));
-static boolean pr_int_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean pr_float_constant PARAMS ((PTR, const char *, double));
-static boolean pr_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean pr_variable
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static boolean pr_start_function PARAMS ((PTR, const char *, boolean));
-static boolean pr_function_parameter
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static boolean pr_start_block PARAMS ((PTR, bfd_vma));
-static boolean pr_end_block PARAMS ((PTR, bfd_vma));
-static boolean pr_end_function PARAMS ((PTR));
-static boolean pr_lineno PARAMS ((PTR, const char *, unsigned long, bfd_vma));
-
+static void indent (struct pr_handle *);
+static bfd_boolean push_type (struct pr_handle *, const char *);
+static bfd_boolean prepend_type (struct pr_handle *, const char *);
+static bfd_boolean append_type (struct pr_handle *, const char *);
+static bfd_boolean substitute_type (struct pr_handle *, const char *);
+static bfd_boolean indent_type (struct pr_handle *);
+static char *pop_type (struct pr_handle *);
+static void print_vma (bfd_vma, char *, bfd_boolean, bfd_boolean);
+static bfd_boolean pr_fix_visibility
+ (struct pr_handle *, enum debug_visibility);
+static bfd_boolean pr_start_compilation_unit (void *, const char *);
+static bfd_boolean pr_start_source (void *, const char *);
+static bfd_boolean pr_empty_type (void *);
+static bfd_boolean pr_void_type (void *);
+static bfd_boolean pr_int_type (void *, unsigned int, bfd_boolean);
+static bfd_boolean pr_float_type (void *, unsigned int);
+static bfd_boolean pr_complex_type (void *, unsigned int);
+static bfd_boolean pr_bool_type (void *, unsigned int);
+static bfd_boolean pr_enum_type
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean pr_pointer_type (void *);
+static bfd_boolean pr_function_type (void *, int, bfd_boolean);
+static bfd_boolean pr_reference_type (void *);
+static bfd_boolean pr_range_type (void *, bfd_signed_vma, bfd_signed_vma);
+static bfd_boolean pr_array_type
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
+static bfd_boolean pr_set_type (void *, bfd_boolean);
+static bfd_boolean pr_offset_type (void *);
+static bfd_boolean pr_method_type (void *, bfd_boolean, int, bfd_boolean);
+static bfd_boolean pr_const_type (void *);
+static bfd_boolean pr_volatile_type (void *);
+static bfd_boolean pr_start_struct_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
+static bfd_boolean pr_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean pr_end_struct_type (void *);
+static bfd_boolean pr_start_class_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean);
+static bfd_boolean pr_class_static_member
+ (void *, const char *, const char *, enum debug_visibility);
+static bfd_boolean pr_class_baseclass
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean pr_class_start_method (void *, const char *);
+static bfd_boolean pr_class_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
+static bfd_boolean pr_class_static_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean pr_class_end_method (void *);
+static bfd_boolean pr_end_class_type (void *);
+static bfd_boolean pr_typedef_type (void *, const char *);
+static bfd_boolean pr_tag_type
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean pr_typdef (void *, const char *);
+static bfd_boolean pr_tag (void *, const char *);
+static bfd_boolean pr_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean pr_float_constant (void *, const char *, double);
+static bfd_boolean pr_typed_constant (void *, const char *, bfd_vma);
+static bfd_boolean pr_variable
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean pr_start_function (void *, const char *, bfd_boolean);
+static bfd_boolean pr_function_parameter
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean pr_start_block (void *, bfd_vma);
+static bfd_boolean pr_end_block (void *, bfd_vma);
+static bfd_boolean pr_end_function (void *);
+static bfd_boolean pr_lineno (void *, const char *, unsigned long, bfd_vma);
+static bfd_boolean append_parent (struct pr_handle *, const char *);
+/* Only used by tg_ code. */
+static bfd_boolean tg_fix_visibility
+ (struct pr_handle *, enum debug_visibility);
+static void find_address_in_section (bfd *, asection *, void *);
+static void translate_addresses (bfd *, char *, FILE *, asymbol **);
+static const char *visibility_name (enum debug_visibility);
+/* Tags style replacements. */
+static bfd_boolean tg_start_compilation_unit (void *, const char *);
+static bfd_boolean tg_start_source (void *, const char *);
+static bfd_boolean tg_enum_type
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean tg_start_struct_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
+static bfd_boolean pr_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean tg_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean tg_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean tg_end_struct_type (void *);
+static bfd_boolean tg_start_class_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean, bfd_boolean);
+static bfd_boolean tg_class_static_member
+ (void *, const char *, const char *, enum debug_visibility);
+static bfd_boolean tg_class_baseclass
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean tg_class_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
+static bfd_boolean tg_class_static_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean tg_end_class_type (void *);
+static bfd_boolean tg_tag_type
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean tg_typdef (void *, const char *);
+static bfd_boolean tg_tag (void *, const char *);
+static bfd_boolean tg_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean tg_float_constant (void *, const char *, double);
+static bfd_boolean tg_typed_constant (void *, const char *, bfd_vma);
+static bfd_boolean tg_variable
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean tg_start_function (void *, const char *, bfd_boolean);
+static bfd_boolean tg_function_parameter
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean tg_start_block (void *, bfd_vma);
+static bfd_boolean tg_end_block (void *, bfd_vma);
+static bfd_boolean tg_lineno (void *, const char *, unsigned long, bfd_vma);
+
static const struct debug_write_fns pr_fns =
{
pr_start_compilation_unit,
@@ -177,12 +240,59 @@ static const struct debug_write_fns pr_fns =
pr_lineno
};
+static const struct debug_write_fns tg_fns =
+{
+ tg_start_compilation_unit,
+ tg_start_source,
+ pr_empty_type, /* Same, push_type. */
+ pr_void_type, /* Same, push_type. */
+ pr_int_type, /* Same, push_type. */
+ pr_float_type, /* Same, push_type. */
+ pr_complex_type, /* Same, push_type. */
+ pr_bool_type, /* Same, push_type. */
+ tg_enum_type,
+ pr_pointer_type, /* Same, changes to pointer. */
+ pr_function_type, /* Same, push_type. */
+ pr_reference_type, /* Same, changes to reference. */
+ pr_range_type, /* FIXME: What's that?. */
+ pr_array_type, /* Same, push_type. */
+ pr_set_type, /* FIXME: What's that?. */
+ pr_offset_type, /* FIXME: What's that?. */
+ pr_method_type, /* Same. */
+ pr_const_type, /* Same, changes to const. */
+ pr_volatile_type, /* Same, changes to volatile. */
+ tg_start_struct_type,
+ tg_struct_field,
+ tg_end_struct_type,
+ tg_start_class_type,
+ tg_class_static_member,
+ tg_class_baseclass,
+ pr_class_start_method, /* Same, remembers that's a method. */
+ tg_class_method_variant,
+ tg_class_static_method_variant,
+ pr_class_end_method, /* Same, forgets that's a method. */
+ tg_end_class_type,
+ pr_typedef_type, /* Same, just push type. */
+ tg_tag_type,
+ tg_typdef,
+ tg_tag,
+ tg_int_constant, /* Untested. */
+ tg_float_constant, /* Untested. */
+ tg_typed_constant, /* Untested. */
+ tg_variable,
+ tg_start_function,
+ tg_function_parameter,
+ tg_start_block,
+ tg_end_block,
+ pr_end_function, /* Same, does nothing. */
+ tg_lineno
+};
+
/* Print out the generic debugging information recorded in dhandle. */
-boolean
-print_debugging_info (f, dhandle)
- FILE *f;
- PTR dhandle;
+bfd_boolean
+print_debugging_info (FILE *f, void *dhandle, bfd *abfd, asymbol **syms,
+ void *demangler, bfd_boolean as_tags)
{
struct pr_handle info;
@@ -190,15 +300,27 @@ print_debugging_info (f, dhandle)
info.indent = 0;
info.stack = NULL;
info.parameter = 0;
+ info.filename = NULL;
+ info.abfd = abfd;
+ info.syms = syms;
+ info.demangler = demangler;
- return debug_write (dhandle, &pr_fns, (PTR) &info);
+ if (as_tags)
+ {
+ fputs ("!_TAG_FILE_FORMAT\t2\t/extended format/\n", f);
+ fputs ("!_TAG_FILE_SORTED\t0\t/0=unsorted, 1=sorted/\n", f);
+ fputs ("!_TAG_PROGRAM_AUTHOR\tIan Lance Taylor, Salvador E. Tropea and others\t//\n", f);
+ fputs ("!_TAG_PROGRAM_NAME\tobjdump\t/From GNU binutils/\n", f);
+ }
+
+ return as_tags ? debug_write (dhandle, &tg_fns, (void *) & info)
+ : debug_write (dhandle, &pr_fns, (void *) & info);
}
/* Indent to the current indentation level. */
static void
-indent (info)
- struct pr_handle *info;
+indent (struct pr_handle *info)
{
unsigned int i;
@@ -208,15 +330,13 @@ indent (info)
/* Push a type on the type stack. */
-static boolean
-push_type (info, type)
- struct pr_handle *info;
- const char *type;
+static bfd_boolean
+push_type (struct pr_handle *info, const char *type)
{
struct pr_stack *n;
if (type == NULL)
- return false;
+ return FALSE;
n = (struct pr_stack *) xmalloc (sizeof *n);
memset (n, 0, sizeof *n);
@@ -227,15 +347,13 @@ push_type (info, type)
n->next = info->stack;
info->stack = n;
- return true;
+ return TRUE;
}
/* Prepend a string onto the type on the top of the type stack. */
-static boolean
-prepend_type (info, s)
- struct pr_handle *info;
- const char *s;
+static bfd_boolean
+prepend_type (struct pr_handle *info, const char *s)
{
char *n;
@@ -246,20 +364,18 @@ prepend_type (info, s)
free (info->stack->type);
info->stack->type = n;
- return true;
+ return TRUE;
}
/* Append a string to the type on the top of the type stack. */
-static boolean
-append_type (info, s)
- struct pr_handle *info;
- const char *s;
+static bfd_boolean
+append_type (struct pr_handle *info, const char *s)
{
unsigned int len;
if (s == NULL)
- return false;
+ return FALSE;
assert (info->stack != NULL);
@@ -268,17 +384,35 @@ append_type (info, s)
len + strlen (s) + 1);
strcpy (info->stack->type + len, s);
- return true;
+ return TRUE;
+}
+
+/* Append a string to the parents on the top of the type stack. */
+
+static bfd_boolean
+append_parent (struct pr_handle *info, const char *s)
+{
+ unsigned int len;
+
+ if (s == NULL)
+ return FALSE;
+
+ assert (info->stack != NULL);
+
+ len = info->stack->parents ? strlen (info->stack->parents) : 0;
+ info->stack->parents = (char *) xrealloc (info->stack->parents,
+ len + strlen (s) + 1);
+ strcpy (info->stack->parents + len, s);
+
+ return TRUE;
}
/* We use an underscore to indicate where the name should go in a type
string. This function substitutes a string for the underscore. If
there is no underscore, the name follows the type. */
-static boolean
-substitute_type (info, s)
- struct pr_handle *info;
- const char *s;
+static bfd_boolean
+substitute_type (struct pr_handle *info, const char *s)
{
char *u;
@@ -298,7 +432,7 @@ substitute_type (info, s)
free (info->stack->type);
info->stack->type = n;
- return true;
+ return TRUE;
}
if (strchr (s, '|') != NULL
@@ -307,11 +441,11 @@ substitute_type (info, s)
{
if (! prepend_type (info, "(")
|| ! append_type (info, ")"))
- return false;
+ return FALSE;
}
if (*s == '\0')
- return true;
+ return TRUE;
return (append_type (info, " ")
&& append_type (info, s));
@@ -319,26 +453,24 @@ substitute_type (info, s)
/* Indent the type at the top of the stack by appending spaces. */
-static boolean
-indent_type (info)
- struct pr_handle *info;
+static bfd_boolean
+indent_type (struct pr_handle *info)
{
unsigned int i;
for (i = 0; i < info->indent; i++)
{
if (! append_type (info, " "))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Pop a type from the type stack. */
static char *
-pop_type (info)
- struct pr_handle *info;
+pop_type (struct pr_handle *info)
{
struct pr_stack *o;
char *ret;
@@ -356,11 +488,7 @@ pop_type (info)
/* Print a VMA value into a string. */
static void
-print_vma (vma, buf, unsignedp, hexp)
- bfd_vma vma;
- char *buf;
- boolean unsignedp;
- boolean hexp;
+print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp)
{
if (sizeof (vma) <= sizeof (unsigned long))
{
@@ -381,10 +509,8 @@ print_vma (vma, buf, unsignedp, hexp)
/* Start a new compilation unit. */
-static boolean
-pr_start_compilation_unit (p, filename)
- PTR p;
- const char *filename;
+static bfd_boolean
+pr_start_compilation_unit (void *p, const char *filename)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -392,15 +518,13 @@ pr_start_compilation_unit (p, filename)
fprintf (info->f, "%s:\n", filename);
- return true;
+ return TRUE;
}
/* Start a source file within a compilation unit. */
-static boolean
-pr_start_source (p, filename)
- PTR p;
- const char *filename;
+static bfd_boolean
+pr_start_source (void *p, const char *filename)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -408,14 +532,13 @@ pr_start_source (p, filename)
fprintf (info->f, " %s:\n", filename);
- return true;
+ return TRUE;
}
/* Push an empty type onto the type stack. */
-static boolean
-pr_empty_type (p)
- PTR p;
+static bfd_boolean
+pr_empty_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -424,9 +547,8 @@ pr_empty_type (p)
/* Push a void type onto the type stack. */
-static boolean
-pr_void_type (p)
- PTR p;
+static bfd_boolean
+pr_void_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -435,11 +557,8 @@ pr_void_type (p)
/* Push an integer type onto the type stack. */
-static boolean
-pr_int_type (p, size, unsignedp)
- PTR p;
- unsigned int size;
- boolean unsignedp;
+static bfd_boolean
+pr_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -450,10 +569,8 @@ pr_int_type (p, size, unsignedp)
/* Push a floating type onto the type stack. */
-static boolean
-pr_float_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+pr_float_type (void *p, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -469,25 +586,21 @@ pr_float_type (p, size)
/* Push a complex type onto the type stack. */
-static boolean
-pr_complex_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+pr_complex_type (void *p, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
if (! pr_float_type (p, size))
- return false;
+ return FALSE;
return prepend_type (info, "complex ");
}
-/* Push a boolean type onto the type stack. */
+/* Push a bfd_boolean type onto the type stack. */
-static boolean
-pr_bool_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+pr_bool_type (void *p, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -499,32 +612,29 @@ pr_bool_type (p, size)
/* Push an enum type onto the type stack. */
-static boolean
-pr_enum_type (p, tag, names, values)
- PTR p;
- const char *tag;
- const char **names;
- bfd_signed_vma *values;
+static bfd_boolean
+pr_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *values)
{
struct pr_handle *info = (struct pr_handle *) p;
unsigned int i;
bfd_signed_vma val;
if (! push_type (info, "enum "))
- return false;
+ return FALSE;
if (tag != NULL)
{
if (! append_type (info, tag)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
}
if (! append_type (info, "{ "))
- return false;
+ return FALSE;
if (names == NULL)
{
if (! append_type (info, "/* undefined */"))
- return false;
+ return FALSE;
}
else
{
@@ -534,20 +644,20 @@ pr_enum_type (p, tag, names, values)
if (i > 0)
{
if (! append_type (info, ", "))
- return false;
+ return FALSE;
}
if (! append_type (info, names[i]))
- return false;
+ return FALSE;
if (values[i] != val)
{
char ab[20];
- print_vma (values[i], ab, false, false);
+ print_vma (values[i], ab, FALSE, FALSE);
if (! append_type (info, " = ")
|| ! append_type (info, ab))
- return false;
+ return FALSE;
val = values[i];
}
@@ -560,9 +670,8 @@ pr_enum_type (p, tag, names, values)
/* Turn the top type on the stack into a pointer. */
-static boolean
-pr_pointer_type (p)
- PTR p;
+static bfd_boolean
+pr_pointer_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
char *s;
@@ -577,11 +686,8 @@ pr_pointer_type (p)
/* Turn the top type on the stack into a function returning that type. */
-static boolean
-pr_function_type (p, argcount, varargs)
- PTR p;
- int argcount;
- boolean varargs;
+static bfd_boolean
+pr_function_type (void *p, int argcount, bfd_boolean varargs)
{
struct pr_handle *info = (struct pr_handle *) p;
char **arg_types;
@@ -605,10 +711,10 @@ pr_function_type (p, argcount, varargs)
for (i = argcount - 1; i >= 0; i--)
{
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
arg_types[i] = pop_type (info);
if (arg_types[i] == NULL)
- return false;
+ return FALSE;
len += strlen (arg_types[i]) + 2;
}
if (varargs)
@@ -645,18 +751,17 @@ pr_function_type (p, argcount, varargs)
strcat (s, ")");
if (! substitute_type (info, s))
- return false;
+ return FALSE;
free (s);
- return true;
+ return TRUE;
}
/* Turn the top type on the stack into a reference to that type. */
-static boolean
-pr_reference_type (p)
- PTR p;
+static bfd_boolean
+pr_reference_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -667,11 +772,8 @@ pr_reference_type (p)
/* Make a range type. */
-static boolean
-pr_range_type (p, lower, upper)
- PTR p;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
+static bfd_boolean
+pr_range_type (void *p, bfd_signed_vma lower, bfd_signed_vma upper)
{
struct pr_handle *info = (struct pr_handle *) p;
char abl[20], abu[20];
@@ -679,10 +781,10 @@ pr_range_type (p, lower, upper)
assert (info->stack != NULL);
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
- print_vma (lower, abl, false, false);
- print_vma (upper, abu, false, false);
+ print_vma (lower, abl, FALSE, FALSE);
+ print_vma (upper, abu, FALSE, FALSE);
return (prepend_type (info, "range (")
&& append_type (info, "):")
@@ -693,12 +795,9 @@ pr_range_type (p, lower, upper)
/* Make an array type. */
-static boolean
-pr_array_type (p, lower, upper, stringp)
- PTR p;
- bfd_signed_vma lower;
- bfd_signed_vma upper;
- boolean stringp;
+static bfd_boolean
+pr_array_type (void *p, bfd_signed_vma lower, bfd_signed_vma upper,
+ bfd_boolean stringp)
{
struct pr_handle *info = (struct pr_handle *) p;
char *range_type;
@@ -706,7 +805,7 @@ pr_array_type (p, lower, upper, stringp)
range_type = pop_type (info);
if (range_type == NULL)
- return false;
+ return FALSE;
if (lower == 0)
{
@@ -714,76 +813,73 @@ pr_array_type (p, lower, upper, stringp)
sprintf (ab, "|[]");
else
{
- print_vma (upper + 1, abu, false, false);
+ print_vma (upper + 1, abu, FALSE, FALSE);
sprintf (ab, "|[%s]", abu);
}
}
else
{
- print_vma (lower, abl, false, false);
- print_vma (upper, abu, false, false);
+ print_vma (lower, abl, FALSE, FALSE);
+ print_vma (upper, abu, FALSE, FALSE);
sprintf (ab, "|[%s:%s]", abl, abu);
}
if (! substitute_type (info, ab))
- return false;
+ return FALSE;
if (strcmp (range_type, "int") != 0)
{
if (! append_type (info, ":")
|| ! append_type (info, range_type))
- return false;
+ return FALSE;
}
if (stringp)
{
if (! append_type (info, " /* string */"))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Make a set type. */
-static boolean
-pr_set_type (p, bitstringp)
- PTR p;
- boolean bitstringp;
+static bfd_boolean
+pr_set_type (void *p, bfd_boolean bitstringp)
{
struct pr_handle *info = (struct pr_handle *) p;
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
if (! prepend_type (info, "set { ")
|| ! append_type (info, " }"))
- return false;
+ return FALSE;
if (bitstringp)
{
if (! append_type (info, "/* bitstring */"))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Make an offset type. */
-static boolean
-pr_offset_type (p)
- PTR p;
+static bfd_boolean
+pr_offset_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
return (substitute_type (info, "")
&& prepend_type (info, " ")
@@ -793,12 +889,8 @@ pr_offset_type (p)
/* Make a method type. */
-static boolean
-pr_method_type (p, domain, argcount, varargs)
- PTR p;
- boolean domain;
- int argcount;
- boolean varargs;
+static bfd_boolean
+pr_method_type (void *p, bfd_boolean domain, int argcount, bfd_boolean varargs)
{
struct pr_handle *info = (struct pr_handle *) p;
unsigned int len;
@@ -813,10 +905,10 @@ pr_method_type (p, domain, argcount, varargs)
else
{
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
domain_type = pop_type (info);
if (domain_type == NULL)
- return false;
+ return FALSE;
if (strncmp (domain_type, "class ", sizeof "class " - 1) == 0
&& strchr (domain_type + sizeof "class " - 1, ' ') == NULL)
domain_type += sizeof "class " - 1;
@@ -841,10 +933,10 @@ pr_method_type (p, domain, argcount, varargs)
for (i = argcount - 1; i >= 0; i--)
{
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
arg_types[i] = pop_type (info);
if (arg_types[i] == NULL)
- return false;
+ return FALSE;
len += strlen (arg_types[i]) + 2;
}
if (varargs)
@@ -885,18 +977,17 @@ pr_method_type (p, domain, argcount, varargs)
strcat (s, ")");
if (! substitute_type (info, s))
- return false;
+ return FALSE;
free (s);
- return true;
+ return TRUE;
}
/* Make a const qualified type. */
-static boolean
-pr_const_type (p)
- PTR p;
+static bfd_boolean
+pr_const_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -905,9 +996,8 @@ pr_const_type (p)
/* Make a volatile qualified type. */
-static boolean
-pr_volatile_type (p)
- PTR p;
+static bfd_boolean
+pr_volatile_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -916,24 +1006,20 @@ pr_volatile_type (p)
/* Start accumulating a struct type. */
-static boolean
-pr_start_struct_type (p, tag, id, structp, size)
- PTR p;
- const char *tag;
- unsigned int id;
- boolean structp;
- unsigned int size;
+static bfd_boolean
+pr_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size)
{
struct pr_handle *info = (struct pr_handle *) p;
info->indent += 2;
if (! push_type (info, structp ? "struct " : "union "))
- return false;
+ return FALSE;
if (tag != NULL)
{
if (! append_type (info, tag))
- return false;
+ return FALSE;
}
else
{
@@ -941,35 +1027,35 @@ pr_start_struct_type (p, tag, id, structp, size)
sprintf (idbuf, "%%anon%u", id);
if (! append_type (info, idbuf))
- return false;
+ return FALSE;
}
if (! append_type (info, " {"))
- return false;
+ return FALSE;
if (size != 0 || tag != NULL)
{
char ab[30];
if (! append_type (info, " /*"))
- return false;
+ return FALSE;
if (size != 0)
{
sprintf (ab, " size %u", size);
if (! append_type (info, ab))
- return false;
+ return FALSE;
}
if (tag != NULL)
{
sprintf (ab, " id %u", id);
if (! append_type (info, ab))
- return false;
+ return FALSE;
}
if (! append_type (info, " */"))
- return false;
+ return FALSE;
}
if (! append_type (info, "\n"))
- return false;
+ return FALSE;
info->stack->visibility = DEBUG_VISIBILITY_PUBLIC;
@@ -978,10 +1064,8 @@ pr_start_struct_type (p, tag, id, structp, size)
/* Output the visibility of a field in a struct. */
-static boolean
-pr_fix_visibility (info, visibility)
- struct pr_handle *info;
- enum debug_visibility visibility;
+static bfd_boolean
+pr_fix_visibility (struct pr_handle *info, enum debug_visibility visibility)
{
const char *s = NULL;
char *t;
@@ -990,9 +1074,7 @@ pr_fix_visibility (info, visibility)
assert (info->stack != NULL);
if (info->stack->visibility == visibility)
- return true;
-
- assert (info->stack->visibility != DEBUG_VISIBILITY_IGNORE);
+ return TRUE;
switch (visibility)
{
@@ -1010,7 +1092,7 @@ pr_fix_visibility (info, visibility)
break;
default:
abort ();
- return false;
+ return FALSE;
}
/* Trim off a trailing space in the struct string, to make the
@@ -1024,64 +1106,59 @@ pr_fix_visibility (info, visibility)
if (! append_type (info, s)
|| ! append_type (info, ":\n")
|| ! indent_type (info))
- return false;
+ return FALSE;
info->stack->visibility = visibility;
- return true;
+ return TRUE;
}
/* Add a field to a struct type. */
-static boolean
-pr_struct_field (p, name, bitpos, bitsize, visibility)
- PTR p;
- const char *name;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+static bfd_boolean
+pr_struct_field (void *p, const char *name, bfd_vma bitpos, bfd_vma bitsize,
+ enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
char *t;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
if (! append_type (info, "; /* "))
- return false;
+ return FALSE;
if (bitsize != 0)
{
- print_vma (bitsize, ab, true, false);
+ print_vma (bitsize, ab, TRUE, FALSE);
if (! append_type (info, "bitsize ")
|| ! append_type (info, ab)
|| ! append_type (info, ", "))
- return false;
+ return FALSE;
}
- print_vma (bitpos, ab, true, false);
+ print_vma (bitpos, ab, TRUE, FALSE);
if (! append_type (info, "bitpos ")
|| ! append_type (info, ab)
|| ! append_type (info, " */\n")
|| ! indent_type (info))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
return append_type (info, t);
}
/* Finish a struct type. */
-static boolean
-pr_end_struct_type (p)
- PTR p;
+static bfd_boolean
+pr_end_struct_type (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
char *s;
@@ -1098,20 +1175,15 @@ pr_end_struct_type (p)
*s++ = '}';
*s = '\0';
- return true;
+ return TRUE;
}
/* Start a class type. */
-static boolean
-pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
- PTR p;
- const char *tag;
- unsigned int id;
- boolean structp;
- unsigned int size;
- boolean vptr;
- boolean ownvptr;
+static bfd_boolean
+pr_start_class_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size,
+ bfd_boolean vptr, bfd_boolean ownvptr)
{
struct pr_handle *info = (struct pr_handle *) p;
char *tv = NULL;
@@ -1122,15 +1194,15 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
{
tv = pop_type (info);
if (tv == NULL)
- return false;
+ return FALSE;
}
if (! push_type (info, structp ? "class " : "union class "))
- return false;
+ return FALSE;
if (tag != NULL)
{
if (! append_type (info, tag))
- return false;
+ return FALSE;
}
else
{
@@ -1138,15 +1210,15 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
sprintf (idbuf, "%%anon%u", id);
if (! append_type (info, idbuf))
- return false;
+ return FALSE;
}
if (! append_type (info, " {"))
- return false;
+ return FALSE;
if (size != 0 || vptr || ownvptr || tag != NULL)
{
if (! append_type (info, " /*"))
- return false;
+ return FALSE;
if (size != 0)
{
@@ -1155,23 +1227,23 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
sprintf (ab, "%u", size);
if (! append_type (info, " size ")
|| ! append_type (info, ab))
- return false;
+ return FALSE;
}
if (vptr)
{
if (! append_type (info, " vtable "))
- return false;
+ return FALSE;
if (ownvptr)
{
if (! append_type (info, "self "))
- return false;
+ return FALSE;
}
else
{
if (! append_type (info, tv)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
}
}
@@ -1181,11 +1253,11 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
sprintf (ab, " id %u", id);
if (! append_type (info, ab))
- return false;
+ return FALSE;
}
if (! append_type (info, " */"))
- return false;
+ return FALSE;
}
info->stack->visibility = DEBUG_VISIBILITY_PRIVATE;
@@ -1196,44 +1268,38 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
/* Add a static member to a class. */
-static boolean
-pr_class_static_member (p, name, physname, visibility)
- PTR p;
- const char *name;
- const char *physname;
- enum debug_visibility visibility;
+static bfd_boolean
+pr_class_static_member (void *p, const char *name, const char *physname,
+ enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
if (! prepend_type (info, "static ")
|| ! append_type (info, "; /* ")
|| ! append_type (info, physname)
|| ! append_type (info, " */\n")
|| ! indent_type (info))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
return append_type (info, t);
}
/* Add a base class to a class. */
-static boolean
-pr_class_baseclass (p, bitpos, virtual, visibility)
- PTR p;
- bfd_vma bitpos;
- boolean virtual;
- enum debug_visibility visibility;
+static bfd_boolean
+pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1244,11 +1310,11 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
assert (info->stack != NULL && info->stack->next != NULL);
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (strncmp (t, "class ", sizeof "class " - 1) == 0)
t += sizeof "class " - 1;
@@ -1256,12 +1322,12 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
/* Push it back on to take advantage of the prepend_type and
append_type routines. */
if (! push_type (info, t))
- return false;
+ return FALSE;
if (virtual)
{
if (! prepend_type (info, "virtual "))
- return false;
+ return FALSE;
}
switch (visibility)
@@ -1281,15 +1347,15 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
}
if (! prepend_type (info, prefix))
- return false;
+ return FALSE;
if (bitpos != 0)
{
- print_vma (bitpos, ab, true, false);
+ print_vma (bitpos, ab, TRUE, FALSE);
if (! append_type (info, " /* bitpos ")
|| ! append_type (info, ab)
|| ! append_type (info, " */"))
- return false;
+ return FALSE;
}
/* Now the top of the stack is something like "public A / * bitpos
@@ -1306,11 +1372,11 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
if (*l == ':')
break;
if (! prepend_type (info, l == s ? " : " : ", "))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
n = (char *) xmalloc (strlen (info->stack->type) + strlen (t) + 1);
memcpy (n, info->stack->type, s - info->stack->type);
@@ -1322,35 +1388,28 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
free (t);
- return true;
+ return TRUE;
}
/* Start adding a method to a class. */
-static boolean
-pr_class_start_method (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+pr_class_start_method (void *p, const char *name)
{
struct pr_handle *info = (struct pr_handle *) p;
assert (info->stack != NULL);
info->stack->method = name;
- return true;
+ return TRUE;
}
/* Add a variant to a method. */
-static boolean
-pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
- context)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
- bfd_vma voffset;
- boolean context;
+static bfd_boolean
+pr_class_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, bfd_boolean context)
{
struct pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -1363,12 +1422,12 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
if (volatilep)
{
if (! append_type (info, " volatile"))
- return false;
+ return FALSE;
}
if (constp)
{
if (! append_type (info, " const"))
- return false;
+ return FALSE;
}
/* Stick the name of the method into its type. */
@@ -1376,12 +1435,12 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
(context
? info->stack->next->next->method
: info->stack->next->method)))
- return false;
+ return FALSE;
/* Get the type. */
method_type = pop_type (info);
if (method_type == NULL)
- return false;
+ return FALSE;
/* Pull off the context type if there is one. */
if (! context)
@@ -1390,19 +1449,19 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
{
context_type = pop_type (info);
if (context_type == NULL)
- return false;
+ return FALSE;
}
/* Now the top of the stack is the class. */
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
if (! append_type (info, method_type)
|| ! append_type (info, " /* ")
|| ! append_type (info, physname)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
if (context || voffset != 0)
{
char ab[20];
@@ -1412,12 +1471,12 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
if (! append_type (info, "context ")
|| ! append_type (info, context_type)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
}
- print_vma (voffset, ab, true, false);
+ print_vma (voffset, ab, TRUE, FALSE);
if (! append_type (info, "voffset ")
|| ! append_type (info, ab))
- return false;
+ return FALSE;
}
return (append_type (info, " */;\n")
@@ -1426,13 +1485,10 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
/* Add a static variant to a method. */
-static boolean
-pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+static bfd_boolean
+pr_class_static_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -1445,31 +1501,31 @@ pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
if (volatilep)
{
if (! append_type (info, " volatile"))
- return false;
+ return FALSE;
}
if (constp)
{
if (! append_type (info, " const"))
- return false;
+ return FALSE;
}
/* Mark it as static. */
if (! prepend_type (info, "static "))
- return false;
+ return FALSE;
/* Stick the name of the method into its type. */
if (! substitute_type (info, info->stack->next->method))
- return false;
+ return FALSE;
/* Get the type. */
method_type = pop_type (info);
if (method_type == NULL)
- return false;
+ return FALSE;
/* Now the top of the stack is the class. */
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
return (append_type (info, method_type)
&& append_type (info, " /* ")
@@ -1480,31 +1536,27 @@ pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
/* Finish up a method. */
-static boolean
-pr_class_end_method (p)
- PTR p;
+static bfd_boolean
+pr_class_end_method (void *p)
{
struct pr_handle *info = (struct pr_handle *) p;
info->stack->method = NULL;
- return true;
+ return TRUE;
}
/* Finish up a class. */
-static boolean
-pr_end_class_type (p)
- PTR p;
+static bfd_boolean
+pr_end_class_type (void *p)
{
return pr_end_struct_type (p);
}
/* Push a type on the stack using a typedef name. */
-static boolean
-pr_typedef_type (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+pr_typedef_type (void *p, const char *name)
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1513,12 +1565,9 @@ pr_typedef_type (p, name)
/* Push a type on the stack using a tag name. */
-static boolean
-pr_tag_type (p, name, id, kind)
- PTR p;
- const char *name;
- unsigned int id;
- enum debug_type_kind kind;
+static bfd_boolean
+pr_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
{
struct pr_handle *info = (struct pr_handle *) p;
const char *t, *tag;
@@ -1543,11 +1592,11 @@ pr_tag_type (p, name, id, kind)
break;
default:
abort ();
- return false;
+ return FALSE;
}
if (! push_type (info, t))
- return false;
+ return FALSE;
if (name != NULL)
tag = name;
else
@@ -1557,104 +1606,91 @@ pr_tag_type (p, name, id, kind)
}
if (! append_type (info, tag))
- return false;
+ return FALSE;
if (name != NULL && kind != DEBUG_KIND_ENUM)
{
sprintf (idbuf, " /* id %u */", id);
if (! append_type (info, idbuf))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Output a typedef. */
-static boolean
-pr_typdef (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+pr_typdef (void *p, const char *name)
{
struct pr_handle *info = (struct pr_handle *) p;
char *s;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
s = pop_type (info);
if (s == NULL)
- return false;
+ return FALSE;
indent (info);
fprintf (info->f, "typedef %s;\n", s);
free (s);
- return true;
+ return TRUE;
}
/* Output a tag. The tag should already be in the string on the
stack, so all we have to do here is print it out. */
-static boolean
-pr_tag (p, name)
- PTR p;
- const char *name ATTRIBUTE_UNUSED;
+static bfd_boolean
+pr_tag (void *p, const char *name ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
fprintf (info->f, "%s;\n", t);
free (t);
- return true;
+ return TRUE;
}
/* Output an integer constant. */
-static boolean
-pr_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+static bfd_boolean
+pr_int_constant (void *p, const char *name, bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
indent (info);
- print_vma (val, ab, false, false);
+ print_vma (val, ab, FALSE, FALSE);
fprintf (info->f, "const int %s = %s;\n", name, ab);
- return true;
+ return TRUE;
}
/* Output a floating point constant. */
-static boolean
-pr_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+static bfd_boolean
+pr_float_constant (void *p, const char *name, double val)
{
struct pr_handle *info = (struct pr_handle *) p;
indent (info);
fprintf (info->f, "const double %s = %g;\n", name, val);
- return true;
+ return TRUE;
}
/* Output a typed constant. */
-static boolean
-pr_typed_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+static bfd_boolean
+pr_typed_constant (void *p, const char *name, bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1662,36 +1698,33 @@ pr_typed_constant (p, name, val)
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
- print_vma (val, ab, false, false);
+ print_vma (val, ab, FALSE, FALSE);
fprintf (info->f, "const %s %s = %s;\n", t, name, ab);
free (t);
- return true;
+ return TRUE;
}
/* Output a variable. */
-static boolean
-pr_variable (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_var_kind kind;
- bfd_vma val;
+static bfd_boolean
+pr_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
char ab[20];
if (! substitute_type (info, name))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
switch (kind)
@@ -1706,31 +1739,28 @@ pr_variable (p, name, kind, val)
default:
break;
}
- print_vma (val, ab, true, true);
+ print_vma (val, ab, TRUE, TRUE);
fprintf (info->f, "%s /* %s */;\n", t, ab);
free (t);
- return true;
+ return TRUE;
}
/* Start outputting a function. */
-static boolean
-pr_start_function (p, name, global)
- PTR p;
- const char *name;
- boolean global;
+static bfd_boolean
+pr_start_function (void *p, const char *name, bfd_boolean global)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
if (! global)
@@ -1739,17 +1769,14 @@ pr_start_function (p, name, global)
info->parameter = 1;
- return true;
+ return TRUE;
}
/* Output a function parameter. */
-static boolean
-pr_function_parameter (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_parm_kind kind;
- bfd_vma val;
+static bfd_boolean
+pr_function_parameter (void *p, const char *name,
+ enum debug_parm_kind kind, bfd_vma val)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1759,15 +1786,15 @@ pr_function_parameter (p, name, kind, val)
|| kind == DEBUG_PARM_REF_REG)
{
if (! pr_reference_type (p))
- return false;
+ return FALSE;
}
if (! substitute_type (info, name))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (info->parameter != 1)
fprintf (info->f, ", ");
@@ -1775,22 +1802,20 @@ pr_function_parameter (p, name, kind, val)
if (kind == DEBUG_PARM_REG || kind == DEBUG_PARM_REF_REG)
fprintf (info->f, "register ");
- print_vma (val, ab, true, true);
+ print_vma (val, ab, TRUE, TRUE);
fprintf (info->f, "%s /* %s */", t, ab);
free (t);
++info->parameter;
- return true;
+ return TRUE;
}
/* Start writing out a block. */
-static boolean
-pr_start_block (p, addr)
- PTR p;
- bfd_vma addr;
+static bfd_boolean
+pr_start_block (void *p, bfd_vma addr)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -1802,39 +1827,33 @@ pr_start_block (p, addr)
}
indent (info);
- print_vma (addr, ab, true, true);
+ print_vma (addr, ab, TRUE, TRUE);
fprintf (info->f, "{ /* %s */\n", ab);
info->indent += 2;
- return true;
+ return TRUE;
}
/* Write out line number information. */
-static boolean
-pr_lineno (p, filename, lineno, addr)
- PTR p;
- const char *filename;
- unsigned long lineno;
- bfd_vma addr;
+static bfd_boolean
+pr_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
indent (info);
- print_vma (addr, ab, true, true);
+ print_vma (addr, ab, TRUE, TRUE);
fprintf (info->f, "/* file %s line %lu addr %s */\n", filename, lineno, ab);
- return true;
+ return TRUE;
}
/* Finish writing out a block. */
-static boolean
-pr_end_block (p, addr)
- PTR p;
- bfd_vma addr;
+static bfd_boolean
+pr_end_block (void *p, bfd_vma addr)
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[20];
@@ -1842,17 +1861,934 @@ pr_end_block (p, addr)
info->indent -= 2;
indent (info);
- print_vma (addr, ab, true, true);
+ print_vma (addr, ab, TRUE, TRUE);
fprintf (info->f, "} /* %s */\n", ab);
- return true;
+ return TRUE;
}
/* Finish writing out a function. */
-static boolean
-pr_end_function (p)
- PTR p ATTRIBUTE_UNUSED;
+static bfd_boolean
+pr_end_function (void *p ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+/* Tags style generation functions start here. */
+
+/* Variables for address to line translation. */
+static bfd_vma pc;
+static const char *filename;
+static const char *functionname;
+static unsigned int line;
+static bfd_boolean found;
+
+/* Look for an address in a section. This is called via
+ bfd_map_over_sections. */
+
+static void
+find_address_in_section (bfd *abfd, asection *section, void *data)
+{
+ bfd_vma vma;
+ bfd_size_type size;
+ asymbol **syms = (asymbol **) data;
+
+ if (found)
+ return;
+
+ if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
+ return;
+
+ vma = bfd_get_section_vma (abfd, section);
+ if (pc < vma)
+ return;
+
+ size = bfd_get_section_size_before_reloc (section);
+ if (pc >= vma + size)
+ return;
+
+ found = bfd_find_nearest_line (abfd, section, syms, pc - vma,
+ &filename, &functionname, &line);
+}
+
+static void
+translate_addresses (bfd *abfd, char *addr_hex, FILE *f, asymbol **syms)
+{
+ pc = bfd_scan_vma (addr_hex, NULL, 16);
+ found = FALSE;
+ bfd_map_over_sections (abfd, find_address_in_section, syms);
+
+ if (! found)
+ fprintf (f, "??");
+ else
+ fprintf (f, "%u", line);
+}
+
+/* Start a new compilation unit. */
+
+static bfd_boolean
+tg_start_compilation_unit (void * p, const char *filename ATTRIBUTE_UNUSED)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+
+ fprintf (stderr, "New compilation unit: %s\n", filename);
+
+ free (info->filename);
+ /* Should it be relative? best way to do it here?. */
+ info->filename = strdup (filename);
+
+ return TRUE;
+}
+
+/* Start a source file within a compilation unit. */
+
+static bfd_boolean
+tg_start_source (void *p, const char *filename)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+
+ free (info->filename);
+ /* Should it be relative? best way to do it here?. */
+ info->filename = strdup (filename);
+
+ return TRUE;
+}
+
+/* Push an enum type onto the type stack. */
+
+static bfd_boolean
+tg_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *values)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ unsigned int i;
+ const char *name;
+ char ab[20];
+
+ if (! pr_enum_type (p, tag, names, values))
+ return FALSE;
+
+ name = tag ? tag : "unknown";
+ /* Generate an entry for the enum. */
+ if (tag)
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:e\ttype:%s\n", tag,
+ info->filename, info->stack->type);
+
+ /* Generate entries for the values. */
+ if (names != NULL)
+ {
+ for (i = 0; names[i] != NULL; i++)
+ {
+ print_vma (values[i], ab, FALSE, FALSE);
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:g\tenum:%s\tvalue:%s\n",
+ names[i], info->filename, name, ab);
+ }
+ }
+
+ return TRUE;
+}
+
+/* Start accumulating a struct type. */
+
+static bfd_boolean
+tg_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp,
+ unsigned int size ATTRIBUTE_UNUSED)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ const char *name;
+ char idbuf[20];
+
+ if (tag != NULL)
+ name = tag;
+ else
+ {
+ name = idbuf;
+ sprintf (idbuf, "%%anon%u", id);
+ }
+
+ if (! push_type (info, name))
+ return FALSE;
+
+ info->stack->flavor = structp ? "struct" : "union";
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:%c\n", name, info->filename,
+ info->stack->flavor[0]);
+
+ info->stack->visibility = DEBUG_VISIBILITY_PUBLIC;
+
+ return indent_type (info);
+}
+
+/* Output the visibility of a field in a struct. */
+
+static bfd_boolean
+tg_fix_visibility (struct pr_handle *info, enum debug_visibility visibility)
+{
+ assert (info->stack != NULL);
+
+ if (info->stack->visibility == visibility)
+ return TRUE;
+
+ assert (info->stack->visibility != DEBUG_VISIBILITY_IGNORE);
+
+ info->stack->visibility = visibility;
+
+ return TRUE;
+}
+
+/* Add a field to a struct type. */
+
+static bfd_boolean
+tg_struct_field (void *p, const char *name, bfd_vma bitpos ATTRIBUTE_UNUSED,
+ bfd_vma bitsize ATTRIBUTE_UNUSED,
+ enum debug_visibility visibility)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ if (! tg_fix_visibility (info, visibility))
+ return FALSE;
+
+ /* It happens, a bug? */
+ if (! name[0])
+ return TRUE;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:m\ttype:%s\t%s:%s\taccess:%s\n",
+ name, info->filename, t, info->stack->flavor, info->stack->type,
+ visibility_name (visibility));
+
+ return TRUE;
+}
+
+/* Finish a struct type. */
+
+static bfd_boolean
+tg_end_struct_type (void *p ATTRIBUTE_UNUSED)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ assert (info->stack != NULL);
+
+ return TRUE;
+}
+
+/* Start a class type. */
+
+static bfd_boolean
+tg_start_class_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size,
+ bfd_boolean vptr, bfd_boolean ownvptr)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *tv = NULL;
+ const char *name;
+
+ info->indent += 2;
+
+ if (vptr && ! ownvptr)
+ {
+ tv = pop_type (info);
+ if (tv == NULL)
+ return FALSE;
+ }
+
+ if (tag != NULL)
+ name = tag;
+ else
+ {
+ char idbuf[20];
+
+ sprintf (idbuf, "%%anon%u", id);
+ name = idbuf;
+ }
+
+ if (! push_type (info, name))
+ return FALSE;
+
+ info->stack->flavor = structp ? "class" : "union class";
+ info->stack->parents = NULL;
+ info->stack->num_parents = 0;
+
+ if (size != 0 || vptr || ownvptr || tag != NULL)
+ {
+ if (vptr)
+ {
+ if (! append_type (info, " vtable "))
+ return FALSE;
+ if (ownvptr)
+ {
+ if (! append_type (info, "self "))
+ return FALSE;
+ }
+ else
+ {
+ if (! append_type (info, tv)
+ || ! append_type (info, " "))
+ return FALSE;
+ }
+ }
+ }
+
+ info->stack->visibility = DEBUG_VISIBILITY_PRIVATE;
+
+ return TRUE;
+}
+
+/* Add a static member to a class. */
+
+static bfd_boolean
+tg_class_static_member (void *p, const char *name,
+ const char *physname ATTRIBUTE_UNUSED,
+ enum debug_visibility visibility)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+ int len_var, len_class;
+ char *full_name;
+
+ len_var = strlen (name);
+ len_class = strlen (info->stack->next->type);
+ full_name = (char *) xmalloc (len_var + len_class + 3);
+ if (! full_name)
+ return FALSE;
+ memcpy (full_name, info->stack->next->type, len_class);
+ memcpy (full_name + len_class, "::", 2);
+ memcpy (full_name + len_class + 2, name, len_var + 1);
+
+ if (! substitute_type (info, full_name))
+ return FALSE;
+
+ if (! prepend_type (info, "static "))
+ return FALSE;
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ if (! tg_fix_visibility (info, visibility))
+ return FALSE;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:x\ttype:%s\tclass:%s\taccess:%s\n",
+ name, info->filename, t, info->stack->type,
+ visibility_name (visibility));
+ free (t);
+ free (full_name);
+
+ return TRUE;
+}
+
+/* Add a base class to a class. */
+
+static bfd_boolean
+tg_class_baseclass (void *p, bfd_vma bitpos ATTRIBUTE_UNUSED,
+ bfd_boolean virtual, enum debug_visibility visibility)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+ const char *prefix;
+
+ assert (info->stack != NULL && info->stack->next != NULL);
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ if (strncmp (t, "class ", sizeof "class " - 1) == 0)
+ t += sizeof "class " - 1;
+
+ /* Push it back on to take advantage of the prepend_type and
+ append_type routines. */
+ if (! push_type (info, t))
+ return FALSE;
+
+ if (virtual)
+ {
+ if (! prepend_type (info, "virtual "))
+ return FALSE;
+ }
+
+ switch (visibility)
+ {
+ case DEBUG_VISIBILITY_PUBLIC:
+ prefix = "public ";
+ break;
+ case DEBUG_VISIBILITY_PROTECTED:
+ prefix = "protected ";
+ break;
+ case DEBUG_VISIBILITY_PRIVATE:
+ prefix = "private ";
+ break;
+ default:
+ prefix = "/* unknown visibility */ ";
+ break;
+ }
+
+ if (! prepend_type (info, prefix))
+ return FALSE;
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ if (info->stack->num_parents && ! append_parent (info, ", "))
+ return FALSE;
+
+ if (! append_parent (info, t))
+ return FALSE;
+ info->stack->num_parents++;
+
+ free (t);
+
+ return TRUE;
+}
+
+/* Add a variant to a method. */
+
+static bfd_boolean
+tg_class_method_variant (void *p, const char *physname ATTRIBUTE_UNUSED,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset ATTRIBUTE_UNUSED,
+ bfd_boolean context)
{
- return true;
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *method_type;
+ char *context_type;
+ char *method_name;
+
+ assert (info->stack != NULL);
+ assert (info->stack->next != NULL);
+
+ /* Put the const and volatile qualifiers on the type. */
+ if (volatilep)
+ {
+ if (! append_type (info, " volatile"))
+ return FALSE;
+ }
+ if (constp)
+ {
+ if (! append_type (info, " const"))
+ return FALSE;
+ }
+
+ method_name = strdup (context ? info->stack->next->next->method
+ : info->stack->next->method);
+
+ /* Stick the name of the method into its type. */
+ if (! substitute_type (info, method_name))
+ return FALSE;
+
+ /* Get the type. */
+ method_type = pop_type (info);
+ if (method_type == NULL)
+ return FALSE;
+
+ /* Pull off the context type if there is one. */
+ if (! context)
+ context_type = NULL;
+ else
+ {
+ context_type = pop_type (info);
+ if (context_type == NULL)
+ return FALSE;
+ }
+
+ /* Now the top of the stack is the class. */
+ if (! tg_fix_visibility (info, visibility))
+ return FALSE;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:p\ttype:%s\tclass:%s\n",
+ method_name, info->filename, method_type, info->stack->type);
+ free (method_type);
+ free (method_name);
+ free (context_type);
+
+ return TRUE;
+}
+
+/* Add a static variant to a method. */
+
+static bfd_boolean
+tg_class_static_method_variant (void *p,
+ const char *physname ATTRIBUTE_UNUSED,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *method_type;
+ char *method_name;
+
+ assert (info->stack != NULL);
+ assert (info->stack->next != NULL);
+ assert (info->stack->next->method != NULL);
+
+ /* Put the const and volatile qualifiers on the type. */
+ if (volatilep)
+ {
+ if (! append_type (info, " volatile"))
+ return FALSE;
+ }
+ if (constp)
+ {
+ if (! append_type (info, " const"))
+ return FALSE;
+ }
+
+ /* Mark it as static. */
+ if (! prepend_type (info, "static "))
+ return FALSE;
+
+ method_name = strdup (info->stack->next->method);
+ /* Stick the name of the method into its type. */
+ if (! substitute_type (info, info->stack->next->method))
+ return FALSE;
+
+ /* Get the type. */
+ method_type = pop_type (info);
+ if (method_type == NULL)
+ return FALSE;
+
+ /* Now the top of the stack is the class. */
+ if (! tg_fix_visibility (info, visibility))
+ return FALSE;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:p\ttype:%s\tclass:%s\taccess:%s\n",
+ method_name, info->filename, method_type, info->stack->type,
+ visibility_name (visibility));
+ free (method_type);
+ free (method_name);
+
+ return TRUE;
+}
+
+/* Finish up a class. */
+
+static bfd_boolean
+tg_end_class_type (void *p)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:c\ttype:%s", info->stack->type,
+ info->filename, info->stack->flavor);
+ if (info->stack->num_parents)
+ {
+ fprintf (info->f, "\tinherits:%s", info->stack->parents);
+ free (info->stack->parents);
+ }
+ fputc ('\n', info->f);
+
+ return tg_end_struct_type (p);
+}
+
+/* Push a type on the stack using a tag name. */
+
+static bfd_boolean
+tg_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ const char *t, *tag;
+ char idbuf[20];
+
+ switch (kind)
+ {
+ case DEBUG_KIND_STRUCT:
+ t = "struct ";
+ break;
+ case DEBUG_KIND_UNION:
+ t = "union ";
+ break;
+ case DEBUG_KIND_ENUM:
+ t = "enum ";
+ break;
+ case DEBUG_KIND_CLASS:
+ t = "class ";
+ break;
+ case DEBUG_KIND_UNION_CLASS:
+ t = "union class ";
+ break;
+ default:
+ abort ();
+ return FALSE;
+ }
+
+ if (! push_type (info, t))
+ return FALSE;
+ if (name != NULL)
+ tag = name;
+ else
+ {
+ sprintf (idbuf, "%%anon%u", id);
+ tag = idbuf;
+ }
+
+ if (! append_type (info, tag))
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Output a typedef. */
+
+static bfd_boolean
+tg_typdef (void *p, const char *name)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *s;
+
+ s = pop_type (info);
+ if (s == NULL)
+ return FALSE;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:t\ttype:%s\n", name,
+ info->filename, s);
+
+ free (s);
+
+ return TRUE;
+}
+
+/* Output a tag. The tag should already be in the string on the
+ stack, so all we have to do here is print it out. */
+
+static bfd_boolean
+tg_tag (void *p ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+ free (t);
+
+ return TRUE;
+}
+
+/* Output an integer constant. */
+
+static bfd_boolean
+tg_int_constant (void *p, const char *name, bfd_vma val)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char ab[20];
+
+ indent (info);
+ print_vma (val, ab, FALSE, FALSE);
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:const int\tvalue:%s\n",
+ name, info->filename, ab);
+ return TRUE;
+}
+
+/* Output a floating point constant. */
+
+static bfd_boolean
+tg_float_constant (void *p, const char *name, double val)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+
+ indent (info);
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:const double\tvalue:%g\n",
+ name, info->filename, val);
+ return TRUE;
+}
+
+/* Output a typed constant. */
+
+static bfd_boolean
+tg_typed_constant (void *p, const char *name, bfd_vma val)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+ char ab[20];
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ indent (info);
+ print_vma (val, ab, FALSE, FALSE);
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:const %s\tvalue:%s\n",
+ name, info->filename, t, ab);
+
+ free (t);
+
+ return TRUE;
+}
+
+/* Output a variable. */
+
+static bfd_boolean
+tg_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val ATTRIBUTE_UNUSED)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+ const char *dname, *from_class;
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ dname = name;
+ if (info->demangler)
+ {
+ dname = info->demangler (info->abfd, name);
+ if (strcmp (name, dname) == 0)
+ {
+ free ((char *) dname);
+ dname = name;
+ }
+ }
+
+ if (dname != name)
+ {
+ char *sep;
+ sep = strstr (dname, "::");
+ if (sep)
+ {
+ *sep = 0;
+ name = sep + 2;
+ from_class = dname;
+ }
+ else
+ {
+ /* Obscure types as vts and type_info nodes. */
+ name = dname;
+ from_class = NULL;
+ }
+ }
+ else
+ from_class = NULL;
+
+ fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:%s", name, info->filename, t);
+
+ switch (kind)
+ {
+ case DEBUG_STATIC:
+ case DEBUG_LOCAL_STATIC:
+ fprintf (info->f, "\tfile:");
+ break;
+ case DEBUG_REGISTER:
+ fprintf (info->f, "\tregister:");
+ break;
+ default:
+ break;
+ }
+
+ if (from_class)
+ {
+ fprintf (info->f, "\tclass:%s",from_class);
+ free ((char *) dname);
+ }
+
+ fprintf (info->f, "\n");
+
+ free (t);
+
+ return TRUE;
+}
+
+/* Start outputting a function. */
+
+static bfd_boolean
+tg_start_function (void *p, const char *name, bfd_boolean global)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ const char *dname;
+
+ if (! global)
+ info->stack->flavor = "static";
+ else
+ info->stack->flavor = NULL;
+
+ dname = name;
+ if (info->demangler)
+ {
+ dname = info->demangler (info->abfd, name);
+ if (strcmp (name, dname) == 0)
+ {
+ free ((char *) dname);
+ dname = name;
+ }
+ }
+
+ if (! substitute_type (info, dname))
+ return FALSE;
+
+ if (dname != name)
+ {
+ char *sep;
+ sep = strstr (dname, "::");
+ if (sep)
+ {
+ info->stack->method = dname;
+ *sep = 0;
+ name = sep + 2;
+ }
+ else
+ {
+ info->stack->method = "";
+ name = dname;
+ }
+ sep = strchr (name, '(');
+ if (sep)
+ *sep = 0;
+ /* Obscure functions as type_info function. */
+ }
+ else
+ info->stack->method = NULL;
+
+ info->stack->parents = strdup (name);
+
+ if (! info->stack->method && ! append_type (info, "("))
+ return FALSE;
+
+ info->parameter = 1;
+
+ return TRUE;
+}
+
+/* Output a function parameter. */
+
+static bfd_boolean
+tg_function_parameter (void *p, const char *name, enum debug_parm_kind kind,
+ bfd_vma val ATTRIBUTE_UNUSED)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char *t;
+
+ if (kind == DEBUG_PARM_REFERENCE
+ || kind == DEBUG_PARM_REF_REG)
+ {
+ if (! pr_reference_type (p))
+ return FALSE;
+ }
+
+ if (! substitute_type (info, name))
+ return FALSE;
+
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+
+ if (! info->stack->method)
+ {
+ if (info->parameter != 1 && ! append_type (info, ", "))
+ return FALSE;
+
+ if (kind == DEBUG_PARM_REG || kind == DEBUG_PARM_REF_REG)
+ if (! append_type (info, "register "))
+ return FALSE;
+
+ if (! append_type (info, t))
+ return FALSE;
+ }
+
+ free (t);
+
+ ++info->parameter;
+
+ return TRUE;
+}
+
+/* Start writing out a block. */
+
+static bfd_boolean
+tg_start_block (void *p, bfd_vma addr)
+{
+ struct pr_handle *info = (struct pr_handle *) p;
+ char ab[20], kind, *partof;
+ char *t;
+ bfd_boolean local;
+
+ if (info->parameter > 0)
+ {
+ info->parameter = 0;
+
+ /* Delayed name. */
+ fprintf (info->f, "%s\t%s\t", info->stack->parents, info->filename);
+ free (info->stack->parents);
+
+ print_vma (addr, ab, TRUE, TRUE);
+ translate_addresses (info->abfd, ab, info->f, info->syms);
+ local = info->stack->flavor != NULL;
+ if (info->stack->method && *info->stack->method)
+ {
+ kind = 'm';
+ partof = (char *) info->stack->method;
+ }
+ else
+ {
+ kind = 'f';
+ partof = NULL;
+ if (! info->stack->method && ! append_type (info, ")"))
+ return FALSE;
+ }
+ t = pop_type (info);
+ if (t == NULL)
+ return FALSE;
+ fprintf (info->f, ";\"\tkind:%c\ttype:%s", kind, t);
+ if (local)
+ fputs ("\tfile:", info->f);
+ if (partof)
+ {
+ fprintf (info->f, "\tclass:%s", partof);
+ free (partof);
+ }
+ fputc ('\n', info->f);
+ }
+
+ return TRUE;
+}
+
+/* Write out line number information. */
+
+static bfd_boolean
+tg_lineno (void *p ATTRIBUTE_UNUSED, const char *filename ATTRIBUTE_UNUSED,
+ unsigned long lineno ATTRIBUTE_UNUSED,
+ bfd_vma addr ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+/* Finish writing out a block. */
+
+static bfd_boolean
+tg_end_block (void *p ATTRIBUTE_UNUSED, bfd_vma addr ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+/* Convert the visibility value into a human readable name. */
+
+static const char *
+visibility_name (enum debug_visibility visibility)
+{
+ const char *s;
+
+ switch (visibility)
+ {
+ case DEBUG_VISIBILITY_PUBLIC:
+ s = "public";
+ break;
+ case DEBUG_VISIBILITY_PRIVATE:
+ s = "private";
+ break;
+ case DEBUG_VISIBILITY_PROTECTED:
+ s = "protected";
+ break;
+ case DEBUG_VISIBILITY_IGNORE:
+ s = "/* ignore */";
+ break;
+ default:
+ abort ();
+ return FALSE;
+ }
+ return s;
}
diff --git a/contrib/binutils/binutils/rclex.c b/contrib/binutils/binutils/rclex.c
index bc9e68c..e5070e3 100644
--- a/contrib/binutils/binutils/rclex.c
+++ b/contrib/binutils/binutils/rclex.c
@@ -1,7 +1,7 @@
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.8.1 2002/08/05 20:43:45 drow Exp $
+ * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.12.1 2004/04/09 19:32:15 drow Exp $
*/
#define FLEX_SCANNER
@@ -64,6 +64,7 @@
#define YY_PROTO(proto) ()
#endif
+
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -383,58 +384,58 @@ static yyconst int yy_meta[36] =
static yyconst short int yy_base[476] =
{ 0,
- 0, 0, 515, 516, 34, 516, 509, 0, 492, 25,
- 26, 45, 25, 28, 24, 486, 497, 49, 0, 40,
- 43, 486, 51, 66, 67, 482, 35, 516, 516, 81,
- 503, 84, 0, 486, 516, 0, 494, 477, 492, 475,
- 74, 474, 477, 475, 46, 489, 69, 484, 471, 481,
- 55, 477, 481, 466, 67, 469, 83, 83, 467, 477,
- 464, 478, 464, 459, 475, 470, 74, 453, 81, 457,
- 86, 76, 468, 467, 465, 452, 452, 458, 95, 461,
- 453, 447, 446, 106, 466, 456, 0, 451, 444, 449,
- 448, 443, 452, 435, 436, 449, 433, 448, 430, 426,
-
- 429, 430, 433, 441, 424, 0, 423, 436, 435, 420,
- 415, 417, 427, 419, 420, 424, 412, 428, 423, 410,
- 424, 405, 406, 407, 419, 409, 0, 402, 409, 416,
- 414, 410, 408, 415, 393, 399, 412, 406, 392, 401,
- 397, 391, 387, 388, 386, 392, 394, 103, 383, 387,
- 399, 388, 389, 396, 385, 377, 379, 376, 373, 376,
- 370, 374, 387, 368, 363, 98, 381, 0, 379, 367,
- 363, 0, 0, 362, 363, 360, 358, 375, 361, 356,
- 105, 373, 372, 351, 355, 355, 349, 0, 366, 352,
- 347, 346, 352, 346, 343, 356, 346, 354, 356, 352,
-
- 347, 344, 349, 0, 335, 344, 350, 0, 0, 334,
- 115, 334, 345, 119, 0, 345, 331, 0, 328, 326,
- 336, 325, 336, 328, 327, 320, 317, 313, 330, 0,
- 330, 331, 0, 0, 327, 322, 329, 314, 314, 0,
- 114, 305, 307, 318, 322, 318, 0, 321, 318, 107,
- 318, 318, 0, 306, 316, 0, 316, 308, 0, 294,
- 0, 298, 307, 294, 291, 304, 304, 0, 132, 137,
- 293, 287, 290, 300, 288, 290, 0, 293, 295, 295,
- 276, 292, 295, 0, 293, 278, 276, 0, 277, 0,
- 270, 283, 267, 285, 270, 281, 0, 280, 279, 271,
-
- 265, 277, 261, 257, 259, 257, 0, 274, 256, 0,
- 255, 254, 258, 248, 269, 268, 265, 258, 270, 143,
- 269, 149, 0, 259, 241, 0, 240, 0, 259, 238,
- 258, 239, 0, 250, 237, 250, 236, 231, 247, 246,
- 0, 249, 247, 247, 234, 227, 240, 225, 0, 222,
- 0, 223, 222, 239, 224, 237, 218, 227, 0, 216,
- 215, 222, 217, 235, 213, 0, 0, 209, 0, 226,
- 0, 209, 203, 0, 216, 0, 0, 0, 212, 206,
- 211, 0, 220, 0, 0, 215, 204, 199, 200, 199,
- 213, 199, 199, 197, 206, 208, 207, 199, 188, 194,
-
- 192, 188, 188, 190, 196, 0, 198, 182, 184, 182,
- 0, 0, 184, 181, 188, 176, 0, 177, 171, 172,
- 170, 183, 186, 181, 171, 0, 183, 171, 164, 0,
- 167, 175, 0, 164, 160, 155, 157, 156, 159, 0,
- 155, 0, 0, 160, 165, 156, 0, 0, 0, 0,
- 0, 141, 150, 141, 139, 0, 0, 128, 122, 126,
- 0, 0, 109, 91, 79, 0, 0, 0, 516, 156,
- 161, 65, 166, 171, 176
+ 0, 0, 517, 518, 34, 518, 511, 0, 494, 25,
+ 26, 45, 25, 28, 24, 488, 499, 49, 0, 40,
+ 43, 488, 51, 66, 67, 484, 35, 518, 518, 81,
+ 505, 84, 0, 488, 518, 0, 496, 479, 494, 477,
+ 75, 476, 479, 477, 46, 491, 70, 486, 473, 483,
+ 55, 479, 483, 468, 69, 471, 86, 84, 469, 479,
+ 466, 480, 466, 461, 477, 472, 75, 455, 81, 459,
+ 87, 77, 470, 469, 467, 454, 454, 460, 96, 463,
+ 455, 449, 448, 110, 468, 458, 0, 453, 446, 451,
+ 450, 445, 454, 437, 438, 451, 435, 450, 432, 428,
+
+ 431, 432, 435, 443, 426, 0, 425, 438, 437, 422,
+ 417, 419, 429, 421, 422, 426, 414, 430, 425, 412,
+ 426, 407, 408, 409, 421, 411, 0, 404, 411, 418,
+ 416, 412, 410, 417, 395, 401, 414, 408, 394, 403,
+ 399, 393, 389, 390, 388, 394, 396, 105, 385, 389,
+ 401, 390, 391, 398, 387, 379, 381, 378, 375, 378,
+ 372, 376, 389, 370, 365, 105, 383, 0, 381, 369,
+ 365, 0, 0, 364, 365, 362, 360, 377, 363, 358,
+ 105, 375, 374, 353, 357, 357, 351, 0, 368, 354,
+ 349, 348, 354, 348, 345, 358, 348, 356, 358, 354,
+
+ 349, 346, 351, 0, 337, 346, 352, 0, 0, 336,
+ 122, 336, 347, 107, 0, 347, 333, 0, 330, 328,
+ 338, 327, 338, 330, 329, 322, 319, 315, 332, 0,
+ 332, 333, 0, 0, 329, 324, 331, 316, 316, 0,
+ 116, 307, 309, 320, 324, 320, 0, 323, 320, 110,
+ 320, 320, 0, 308, 318, 0, 318, 310, 0, 296,
+ 0, 300, 309, 296, 293, 306, 306, 0, 135, 139,
+ 295, 289, 292, 302, 290, 292, 0, 295, 297, 297,
+ 278, 294, 297, 0, 295, 280, 278, 0, 279, 0,
+ 272, 285, 269, 287, 272, 283, 0, 282, 281, 273,
+
+ 267, 279, 263, 259, 261, 259, 0, 276, 258, 0,
+ 257, 256, 260, 250, 271, 270, 267, 260, 272, 145,
+ 271, 151, 0, 261, 243, 0, 242, 0, 261, 240,
+ 260, 241, 0, 252, 239, 252, 238, 233, 249, 248,
+ 0, 251, 249, 249, 236, 229, 242, 227, 0, 224,
+ 0, 225, 224, 241, 226, 239, 220, 229, 0, 218,
+ 217, 224, 219, 237, 215, 0, 0, 211, 0, 228,
+ 0, 211, 205, 0, 218, 0, 0, 0, 214, 208,
+ 213, 0, 222, 0, 0, 217, 206, 201, 202, 201,
+ 215, 201, 201, 199, 208, 210, 209, 201, 190, 196,
+
+ 194, 190, 190, 192, 198, 0, 200, 184, 186, 184,
+ 0, 0, 186, 183, 190, 178, 0, 179, 173, 174,
+ 172, 185, 188, 183, 173, 0, 185, 173, 166, 0,
+ 169, 177, 0, 166, 162, 157, 159, 158, 161, 0,
+ 157, 0, 0, 162, 167, 158, 0, 0, 0, 0,
+ 0, 143, 152, 143, 141, 0, 0, 130, 124, 124,
+ 0, 0, 107, 85, 80, 0, 0, 0, 518, 158,
+ 163, 65, 168, 173, 178
} ;
static yyconst short int yy_def[476] =
@@ -493,7 +494,7 @@ static yyconst short int yy_def[476] =
469, 469, 469, 469, 469
} ;
-static yyconst short int yy_nxt[552] =
+static yyconst short int yy_nxt[554] =
{ 0,
4, 5, 6, 5, 7, 8, 4, 9, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
@@ -503,62 +504,62 @@ static yyconst short int yy_nxt[552] =
53, 39, 83, 40, 44, 95, 67, 64, 54, 96,
59, 45, 60, 65, 103, 46, 68, 66, 47, 34,
61, 62, 48, 49, 70, 73, 71, 74, 76, 72,
- 77, 104, 30, 78, 30, 84, 90, 108, 85, 91,
- 98, 99, 111, 75, 79, 113, 123, 109, 126, 129,
-
- 124, 131, 132, 114, 139, 468, 112, 84, 127, 130,
- 85, 205, 225, 467, 206, 241, 269, 269, 242, 270,
- 140, 226, 243, 295, 227, 228, 141, 229, 207, 273,
- 304, 466, 274, 269, 269, 305, 319, 465, 321, 296,
- 321, 322, 36, 321, 321, 464, 321, 322, 36, 321,
- 321, 463, 321, 322, 36, 321, 31, 31, 462, 31,
- 31, 33, 33, 461, 33, 33, 36, 460, 459, 36,
- 36, 320, 320, 458, 320, 320, 321, 321, 457, 456,
- 321, 455, 454, 453, 452, 451, 450, 449, 448, 447,
- 446, 445, 444, 443, 442, 441, 440, 439, 438, 437,
-
- 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
- 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
- 416, 415, 414, 413, 412, 411, 410, 409, 408, 407,
- 406, 405, 404, 403, 402, 401, 400, 399, 398, 364,
- 397, 396, 395, 394, 393, 392, 391, 390, 389, 388,
- 387, 386, 385, 384, 383, 382, 381, 380, 379, 378,
- 377, 376, 375, 374, 373, 372, 371, 370, 369, 368,
- 367, 366, 365, 364, 364, 363, 362, 361, 360, 359,
- 358, 357, 356, 355, 354, 353, 352, 351, 350, 349,
- 348, 347, 346, 345, 344, 343, 342, 341, 340, 339,
-
- 338, 337, 336, 335, 334, 333, 332, 331, 330, 329,
- 328, 327, 326, 325, 324, 323, 318, 317, 316, 315,
- 314, 313, 312, 311, 310, 309, 308, 307, 306, 303,
- 302, 301, 300, 299, 298, 297, 294, 293, 292, 291,
- 290, 289, 288, 287, 286, 285, 284, 283, 282, 281,
- 280, 279, 278, 277, 276, 275, 272, 271, 268, 267,
- 266, 265, 264, 263, 262, 261, 260, 259, 258, 257,
- 256, 255, 254, 253, 252, 251, 250, 249, 248, 247,
- 246, 245, 244, 240, 239, 238, 237, 236, 235, 234,
- 233, 232, 231, 230, 224, 223, 222, 221, 220, 219,
-
- 218, 217, 216, 215, 214, 213, 212, 211, 210, 209,
- 208, 204, 203, 202, 201, 200, 199, 198, 197, 196,
- 195, 194, 193, 192, 191, 190, 189, 188, 187, 186,
- 185, 184, 183, 182, 181, 180, 179, 178, 177, 176,
- 175, 174, 173, 172, 171, 170, 169, 168, 167, 166,
- 165, 164, 163, 162, 161, 160, 159, 158, 157, 156,
- 155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
- 32, 145, 144, 143, 142, 138, 137, 136, 135, 134,
- 133, 128, 125, 122, 121, 120, 119, 118, 117, 116,
- 115, 110, 107, 106, 105, 102, 101, 100, 97, 94,
-
- 93, 92, 89, 88, 87, 86, 35, 32, 80, 69,
- 58, 57, 35, 32, 469, 3, 469, 469, 469, 469,
+ 77, 104, 30, 78, 30, 84, 84, 90, 85, 108,
+ 91, 98, 99, 75, 79, 111, 113, 123, 126, 109,
+
+ 129, 124, 131, 132, 114, 139, 468, 467, 127, 112,
+ 130, 84, 84, 205, 85, 241, 206, 273, 242, 225,
+ 274, 140, 243, 269, 269, 295, 270, 141, 226, 466,
+ 207, 227, 228, 304, 229, 465, 269, 269, 305, 319,
+ 321, 296, 321, 322, 36, 321, 321, 464, 321, 322,
+ 36, 321, 321, 463, 321, 322, 36, 321, 31, 31,
+ 462, 31, 31, 33, 33, 461, 33, 33, 36, 460,
+ 459, 36, 36, 320, 320, 458, 320, 320, 321, 321,
+ 457, 456, 321, 455, 454, 453, 452, 451, 450, 449,
+ 448, 447, 446, 445, 444, 443, 442, 441, 440, 439,
+
+ 438, 437, 436, 435, 434, 433, 432, 431, 430, 429,
+ 428, 427, 426, 425, 424, 423, 422, 421, 420, 419,
+ 418, 417, 416, 415, 414, 413, 412, 411, 410, 409,
+ 408, 407, 406, 405, 404, 403, 402, 401, 400, 399,
+ 398, 364, 397, 396, 395, 394, 393, 392, 391, 390,
+ 389, 388, 387, 386, 385, 384, 383, 382, 381, 380,
+ 379, 378, 377, 376, 375, 374, 373, 372, 371, 370,
+ 369, 368, 367, 366, 365, 364, 364, 363, 362, 361,
+ 360, 359, 358, 357, 356, 355, 354, 353, 352, 351,
+ 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
+
+ 340, 339, 338, 337, 336, 335, 334, 333, 332, 331,
+ 330, 329, 328, 327, 326, 325, 324, 323, 318, 317,
+ 316, 315, 314, 313, 312, 311, 310, 309, 308, 307,
+ 306, 303, 302, 301, 300, 299, 298, 297, 294, 293,
+ 292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
+ 282, 281, 280, 279, 278, 277, 276, 275, 272, 271,
+ 268, 267, 266, 265, 264, 263, 262, 261, 260, 259,
+ 258, 257, 256, 255, 254, 253, 252, 251, 250, 249,
+ 248, 247, 246, 245, 244, 240, 239, 238, 237, 236,
+ 235, 234, 233, 232, 231, 230, 224, 223, 222, 221,
+
+ 220, 219, 218, 217, 216, 215, 214, 213, 212, 211,
+ 210, 209, 208, 204, 203, 202, 201, 200, 199, 198,
+ 197, 196, 195, 194, 193, 192, 191, 190, 189, 188,
+ 187, 186, 185, 184, 183, 182, 181, 180, 179, 178,
+ 177, 176, 175, 174, 173, 172, 171, 170, 169, 168,
+ 167, 166, 165, 164, 163, 162, 161, 160, 159, 158,
+ 157, 156, 155, 154, 153, 152, 151, 150, 149, 148,
+ 147, 146, 32, 145, 144, 143, 142, 138, 137, 136,
+ 135, 134, 133, 128, 125, 122, 121, 120, 119, 118,
+ 117, 116, 115, 110, 107, 106, 105, 102, 101, 100,
+
+ 97, 94, 93, 92, 89, 88, 87, 86, 35, 32,
+ 80, 69, 58, 57, 35, 32, 469, 3, 469, 469,
469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469
+ 469, 469, 469
} ;
-static yyconst short int yy_chk[552] =
+static yyconst short int yy_chk[554] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -568,59 +569,59 @@ static yyconst short int yy_chk[552] =
14, 10, 27, 10, 12, 45, 21, 20, 14, 45,
18, 12, 18, 20, 51, 12, 21, 20, 12, 472,
18, 18, 12, 12, 23, 24, 23, 24, 25, 23,
- 25, 51, 30, 25, 30, 32, 41, 55, 32, 41,
- 47, 47, 57, 24, 25, 58, 67, 55, 69, 71,
-
- 67, 72, 72, 58, 79, 465, 57, 84, 69, 71,
- 84, 148, 166, 464, 148, 181, 211, 211, 181, 211,
- 79, 166, 181, 241, 166, 166, 79, 166, 148, 214,
- 250, 463, 214, 269, 269, 250, 269, 460, 270, 241,
- 270, 270, 270, 270, 320, 459, 320, 320, 320, 320,
- 322, 458, 322, 322, 322, 322, 470, 470, 455, 470,
- 470, 471, 471, 454, 471, 471, 473, 453, 452, 473,
- 473, 474, 474, 446, 474, 474, 475, 475, 445, 444,
- 475, 441, 439, 438, 437, 436, 435, 434, 432, 431,
- 429, 428, 427, 425, 424, 423, 422, 421, 420, 419,
-
- 418, 416, 415, 414, 413, 410, 409, 408, 407, 405,
- 404, 403, 402, 401, 400, 399, 398, 397, 396, 395,
- 394, 393, 392, 391, 390, 389, 388, 387, 386, 383,
- 381, 380, 379, 375, 373, 372, 370, 368, 365, 364,
- 363, 362, 361, 360, 358, 357, 356, 355, 354, 353,
- 352, 350, 348, 347, 346, 345, 344, 343, 342, 340,
- 339, 338, 337, 336, 335, 334, 332, 331, 330, 329,
- 327, 325, 324, 321, 319, 318, 317, 316, 315, 314,
- 313, 312, 311, 309, 308, 306, 305, 304, 303, 302,
- 301, 300, 299, 298, 296, 295, 294, 293, 292, 291,
-
- 289, 287, 286, 285, 283, 282, 281, 280, 279, 278,
- 276, 275, 274, 273, 272, 271, 267, 266, 265, 264,
- 263, 262, 260, 258, 257, 255, 254, 252, 251, 249,
- 248, 246, 245, 244, 243, 242, 239, 238, 237, 236,
- 235, 232, 231, 229, 228, 227, 226, 225, 224, 223,
- 222, 221, 220, 219, 217, 216, 213, 212, 210, 207,
- 206, 205, 203, 202, 201, 200, 199, 198, 197, 196,
- 195, 194, 193, 192, 191, 190, 189, 187, 186, 185,
- 184, 183, 182, 180, 179, 178, 177, 176, 175, 174,
- 171, 170, 169, 167, 165, 164, 163, 162, 161, 160,
-
- 159, 158, 157, 156, 155, 154, 153, 152, 151, 150,
- 149, 147, 146, 145, 144, 143, 142, 141, 140, 139,
- 138, 137, 136, 135, 134, 133, 132, 131, 130, 129,
- 128, 126, 125, 124, 123, 122, 121, 120, 119, 118,
- 117, 116, 115, 114, 113, 112, 111, 110, 109, 108,
- 107, 105, 104, 103, 102, 101, 100, 99, 98, 97,
- 96, 95, 94, 93, 92, 91, 90, 89, 88, 86,
- 85, 83, 82, 81, 80, 78, 77, 76, 75, 74,
- 73, 70, 68, 66, 65, 64, 63, 62, 61, 60,
- 59, 56, 54, 53, 52, 50, 49, 48, 46, 44,
-
- 43, 42, 40, 39, 38, 37, 34, 31, 26, 22,
- 17, 16, 9, 7, 3, 469, 469, 469, 469, 469,
+ 25, 51, 30, 25, 30, 32, 32, 41, 32, 55,
+ 41, 47, 47, 24, 25, 57, 58, 67, 69, 55,
+
+ 71, 67, 72, 72, 58, 79, 465, 464, 69, 57,
+ 71, 84, 84, 148, 84, 181, 148, 214, 181, 166,
+ 214, 79, 181, 211, 211, 241, 211, 79, 166, 463,
+ 148, 166, 166, 250, 166, 460, 269, 269, 250, 269,
+ 270, 241, 270, 270, 270, 270, 320, 459, 320, 320,
+ 320, 320, 322, 458, 322, 322, 322, 322, 470, 470,
+ 455, 470, 470, 471, 471, 454, 471, 471, 473, 453,
+ 452, 473, 473, 474, 474, 446, 474, 474, 475, 475,
+ 445, 444, 475, 441, 439, 438, 437, 436, 435, 434,
+ 432, 431, 429, 428, 427, 425, 424, 423, 422, 421,
+
+ 420, 419, 418, 416, 415, 414, 413, 410, 409, 408,
+ 407, 405, 404, 403, 402, 401, 400, 399, 398, 397,
+ 396, 395, 394, 393, 392, 391, 390, 389, 388, 387,
+ 386, 383, 381, 380, 379, 375, 373, 372, 370, 368,
+ 365, 364, 363, 362, 361, 360, 358, 357, 356, 355,
+ 354, 353, 352, 350, 348, 347, 346, 345, 344, 343,
+ 342, 340, 339, 338, 337, 336, 335, 334, 332, 331,
+ 330, 329, 327, 325, 324, 321, 319, 318, 317, 316,
+ 315, 314, 313, 312, 311, 309, 308, 306, 305, 304,
+ 303, 302, 301, 300, 299, 298, 296, 295, 294, 293,
+
+ 292, 291, 289, 287, 286, 285, 283, 282, 281, 280,
+ 279, 278, 276, 275, 274, 273, 272, 271, 267, 266,
+ 265, 264, 263, 262, 260, 258, 257, 255, 254, 252,
+ 251, 249, 248, 246, 245, 244, 243, 242, 239, 238,
+ 237, 236, 235, 232, 231, 229, 228, 227, 226, 225,
+ 224, 223, 222, 221, 220, 219, 217, 216, 213, 212,
+ 210, 207, 206, 205, 203, 202, 201, 200, 199, 198,
+ 197, 196, 195, 194, 193, 192, 191, 190, 189, 187,
+ 186, 185, 184, 183, 182, 180, 179, 178, 177, 176,
+ 175, 174, 171, 170, 169, 167, 165, 164, 163, 162,
+
+ 161, 160, 159, 158, 157, 156, 155, 154, 153, 152,
+ 151, 150, 149, 147, 146, 145, 144, 143, 142, 141,
+ 140, 139, 138, 137, 136, 135, 134, 133, 132, 131,
+ 130, 129, 128, 126, 125, 124, 123, 122, 121, 120,
+ 119, 118, 117, 116, 115, 114, 113, 112, 111, 110,
+ 109, 108, 107, 105, 104, 103, 102, 101, 100, 99,
+ 98, 97, 96, 95, 94, 93, 92, 91, 90, 89,
+ 88, 86, 85, 83, 82, 81, 80, 78, 77, 76,
+ 75, 74, 73, 70, 68, 66, 65, 64, 63, 62,
+ 61, 60, 59, 56, 54, 53, 52, 50, 49, 48,
+
+ 46, 44, 43, 42, 40, 39, 38, 37, 34, 31,
+ 26, 22, 17, 16, 9, 7, 3, 469, 469, 469,
469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469
+ 469, 469, 469
} ;
static yy_state_type yy_last_accepting_state;
@@ -637,7 +638,7 @@ char *yytext;
#line 1 "rclex.l"
#define INITIAL 0
#line 2 "rclex.l"
-/* Copyright 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -704,11 +705,11 @@ static struct alloc_string *strings;
/* Local functions. */
-static void cpp_line PARAMS ((const char *));
-static char *handle_quotes PARAMS ((const char *, unsigned long *));
-static char *get_string PARAMS ((int));
+static void cpp_line (const char *);
+static char *handle_quotes (const char *, unsigned long *);
+static char *get_string (int);
-#line 712 "lex.yy.c"
+#line 713 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -873,7 +874,7 @@ YY_DECL
#line 75 "rclex.l"
-#line 877 "lex.yy.c"
+#line 878 "lex.yy.c"
if ( yy_init )
{
@@ -930,7 +931,7 @@ yy_match:
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 516 );
+ while ( yy_base[yy_current_state] != 518 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1452,7 +1453,7 @@ YY_RULE_SETUP
#line 236 "rclex.l"
ECHO;
YY_BREAK
-#line 1456 "lex.yy.c"
+#line 1457 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2346,7 +2347,7 @@ int main()
#ifndef yywrap
/* This is needed for some versions of lex. */
-int yywrap ()
+int yywrap (void)
{
return 1;
}
@@ -2355,8 +2356,7 @@ int yywrap ()
/* Handle a C preprocessor line. */
static void
-cpp_line (s)
- const char *s;
+cpp_line (const char *s)
{
int line;
char *send, *fn;
@@ -2411,9 +2411,7 @@ cpp_line (s)
merged separated by whitespace are merged, as in C. */
static char *
-handle_quotes (input, len)
- const char *input;
- unsigned long *len;
+handle_quotes (const char *input, unsigned long *len)
{
char *ret, *s;
const char *t;
@@ -2535,7 +2533,11 @@ handle_quotes (input, len)
++t;
assert (ISSPACE (*t));
while (ISSPACE (*t))
- ++t;
+ {
+ if ((*t) == '\n')
+ ++rc_lineno;
+ ++t;
+ }
if (*t == '\0')
break;
assert (*t == '"');
@@ -2553,8 +2555,7 @@ handle_quotes (input, len)
/* Allocate a string of a given length. */
static char *
-get_string (len)
- int len;
+get_string (int len)
{
struct alloc_string *as;
@@ -2571,7 +2572,7 @@ get_string (len)
when it no longer needs them. */
void
-rcparse_discard_strings ()
+rcparse_discard_strings (void)
{
struct alloc_string *as;
@@ -2592,7 +2593,7 @@ rcparse_discard_strings ()
/* Enter rcdata mode. */
void
-rcparse_rcdata ()
+rcparse_rcdata (void)
{
rcdata_mode = 1;
}
@@ -2600,7 +2601,7 @@ rcparse_rcdata ()
/* Go back to normal mode from rcdata mode. */
void
-rcparse_normal ()
+rcparse_normal (void)
{
rcdata_mode = 0;
}
diff --git a/contrib/binutils/binutils/rclex.l b/contrib/binutils/binutils/rclex.l
index 600e38e..2735cc1 100644
--- a/contrib/binutils/binutils/rclex.l
+++ b/contrib/binutils/binutils/rclex.l
@@ -1,5 +1,5 @@
%{ /* rclex.l -- lexer for Windows rc files parser */
-/* Copyright 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -66,9 +66,9 @@ static struct alloc_string *strings;
/* Local functions. */
-static void cpp_line PARAMS ((const char *));
-static char *handle_quotes PARAMS ((const char *, unsigned long *));
-static char *get_string PARAMS ((int));
+static void cpp_line (const char *);
+static char *handle_quotes (const char *, unsigned long *);
+static char *get_string (int);
%}
@@ -196,7 +196,7 @@ static char *get_string PARAMS ((int));
MAYBE_RETURN (NUMBER);
}
-("\""[^\"\n]*"\""[ \t]*)+ {
+("\""[^\"\n]*"\""[ \t\n]*)+ {
char *s;
unsigned long length;
@@ -236,7 +236,7 @@ static char *get_string PARAMS ((int));
%%
#ifndef yywrap
/* This is needed for some versions of lex. */
-int yywrap ()
+int yywrap (void)
{
return 1;
}
@@ -245,8 +245,7 @@ int yywrap ()
/* Handle a C preprocessor line. */
static void
-cpp_line (s)
- const char *s;
+cpp_line (const char *s)
{
int line;
char *send, *fn;
@@ -301,9 +300,7 @@ cpp_line (s)
merged separated by whitespace are merged, as in C. */
static char *
-handle_quotes (input, len)
- const char *input;
- unsigned long *len;
+handle_quotes (const char *input, unsigned long *len)
{
char *ret, *s;
const char *t;
@@ -425,7 +422,11 @@ handle_quotes (input, len)
++t;
assert (ISSPACE (*t));
while (ISSPACE (*t))
- ++t;
+ {
+ if ((*t) == '\n')
+ ++rc_lineno;
+ ++t;
+ }
if (*t == '\0')
break;
assert (*t == '"');
@@ -443,8 +444,7 @@ handle_quotes (input, len)
/* Allocate a string of a given length. */
static char *
-get_string (len)
- int len;
+get_string (int len)
{
struct alloc_string *as;
@@ -461,7 +461,7 @@ get_string (len)
when it no longer needs them. */
void
-rcparse_discard_strings ()
+rcparse_discard_strings (void)
{
struct alloc_string *as;
@@ -482,7 +482,7 @@ rcparse_discard_strings ()
/* Enter rcdata mode. */
void
-rcparse_rcdata ()
+rcparse_rcdata (void)
{
rcdata_mode = 1;
}
@@ -490,7 +490,7 @@ rcparse_rcdata ()
/* Go back to normal mode from rcdata mode. */
void
-rcparse_normal ()
+rcparse_normal (void)
{
rcdata_mode = 0;
}
diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c
index 2091964..84788e0 100644
--- a/contrib/binutils/binutils/rdcoff.c
+++ b/contrib/binutils/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -82,30 +82,28 @@ struct coff_types
debug_type basic[T_MAX + 1];
};
-static debug_type *coff_get_slot PARAMS ((struct coff_types *, int));
+static debug_type *coff_get_slot (struct coff_types *, int);
static debug_type parse_coff_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
- union internal_auxent *, boolean, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *, long, int,
+ union internal_auxent *, bfd_boolean, void *);
static debug_type parse_coff_base_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
- union internal_auxent *, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *, long, int,
+ union internal_auxent *, void *);
static debug_type parse_coff_struct_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, int,
- union internal_auxent *, PTR));
+ (bfd *, struct coff_symbols *, struct coff_types *, int,
+ union internal_auxent *, void *);
static debug_type parse_coff_enum_type
- PARAMS ((bfd *, struct coff_symbols *, struct coff_types *,
- union internal_auxent *, PTR));
-static boolean parse_coff_symbol
- PARAMS ((bfd *, struct coff_types *, asymbol *, long,
- struct internal_syment *, PTR, debug_type, boolean));
-static boolean external_coff_symbol_p PARAMS ((int sym_class));
+ (bfd *, struct coff_symbols *, struct coff_types *,
+ union internal_auxent *, void *);
+static bfd_boolean parse_coff_symbol
+ (bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
+ void *, debug_type, bfd_boolean);
+static bfd_boolean external_coff_symbol_p (int sym_class);
/* Return the slot for a type. */
static debug_type *
-coff_get_slot (types, indx)
- struct coff_types *types;
- int indx;
+coff_get_slot (struct coff_types *types, int indx)
{
struct coff_slots **pps;
@@ -134,16 +132,10 @@ coff_get_slot (types, indx)
/* Parse a COFF type code in NTYPE. */
static debug_type
-parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
- dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types;
- long coff_symno;
- int ntype;
- union internal_auxent *pauxent;
- boolean useaux;
- PTR dhandle;
+parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types, long coff_symno, int ntype,
+ union internal_auxent *pauxent, bfd_boolean useaux,
+ void *dhandle)
{
debug_type type;
@@ -164,7 +156,7 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
pauxent, useaux, dhandle);
type = debug_make_function_type (dhandle, type, (debug_type *) NULL,
- false);
+ FALSE);
}
else if (ISARY (ntype))
{
@@ -190,14 +182,14 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
}
type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
- pauxent, false, dhandle);
+ pauxent, FALSE, dhandle);
type = debug_make_array_type (dhandle, type,
parse_coff_base_type (abfd, symbols,
types,
coff_symno,
T_INT,
NULL, dhandle),
- 0, n - 1, false);
+ 0, n - 1, FALSE);
}
else
{
@@ -237,18 +229,12 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
/* Parse a basic COFF type in NTYPE. */
static debug_type
-parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
- dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types;
- long coff_symno;
- int ntype;
- union internal_auxent *pauxent;
- PTR dhandle;
+parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types, long coff_symno, int ntype,
+ union internal_auxent *pauxent, void *dhandle)
{
debug_type ret;
- boolean set_basic;
+ bfd_boolean set_basic;
const char *name;
debug_type *slot;
@@ -257,7 +243,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
&& types->basic[ntype] != DEBUG_TYPE_NULL)
return types->basic[ntype];
- set_basic = true;
+ set_basic = TRUE;
name = NULL;
switch (ntype)
@@ -273,23 +259,23 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
break;
case T_CHAR:
- ret = debug_make_int_type (dhandle, 1, false);
+ ret = debug_make_int_type (dhandle, 1, FALSE);
name = "char";
break;
case T_SHORT:
- ret = debug_make_int_type (dhandle, 2, false);
+ ret = debug_make_int_type (dhandle, 2, FALSE);
name = "short";
break;
case T_INT:
/* FIXME: Perhaps the size should depend upon the architecture. */
- ret = debug_make_int_type (dhandle, 4, false);
+ ret = debug_make_int_type (dhandle, 4, FALSE);
name = "int";
break;
case T_LONG:
- ret = debug_make_int_type (dhandle, 4, false);
+ ret = debug_make_int_type (dhandle, 4, FALSE);
name = "long";
break;
@@ -309,28 +295,28 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
break;
case T_UCHAR:
- ret = debug_make_int_type (dhandle, 1, true);
+ ret = debug_make_int_type (dhandle, 1, TRUE);
name = "unsigned char";
break;
case T_USHORT:
- ret = debug_make_int_type (dhandle, 2, true);
+ ret = debug_make_int_type (dhandle, 2, TRUE);
name = "unsigned short";
break;
case T_UINT:
- ret = debug_make_int_type (dhandle, 4, true);
+ ret = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned int";
break;
case T_ULONG:
- ret = debug_make_int_type (dhandle, 4, true);
+ ret = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned long";
break;
case T_STRUCT:
if (pauxent == NULL)
- ret = debug_make_struct_type (dhandle, true, 0,
+ ret = debug_make_struct_type (dhandle, TRUE, 0,
(debug_field *) NULL);
else
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
@@ -339,12 +325,12 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
slot = coff_get_slot (types, coff_symno);
*slot = ret;
- set_basic = false;
+ set_basic = FALSE;
break;
case T_UNION:
if (pauxent == NULL)
- ret = debug_make_struct_type (dhandle, false, 0, (debug_field *) NULL);
+ ret = debug_make_struct_type (dhandle, FALSE, 0, (debug_field *) NULL);
else
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
dhandle);
@@ -352,7 +338,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
slot = coff_get_slot (types, coff_symno);
*slot = ret;
- set_basic = false;
+ set_basic = FALSE;
break;
case T_ENUM:
@@ -365,7 +351,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
slot = coff_get_slot (types, coff_symno);
*slot = ret;
- set_basic = false;
+ set_basic = FALSE;
break;
}
@@ -383,19 +369,15 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
/* Parse a struct type. */
static debug_type
-parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types;
- int ntype;
- union internal_auxent *pauxent;
- PTR dhandle;
+parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types, int ntype,
+ union internal_auxent *pauxent, void *dhandle)
{
long symend;
int alloc;
debug_field *fields;
int count;
- boolean done;
+ bfd_boolean done;
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
@@ -403,7 +385,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
count = 0;
- done = false;
+ done = FALSE;
while (! done
&& symbols->coff_symno < symend
&& symbols->symno < symbols->symcount)
@@ -456,7 +438,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
break;
case C_EOS:
- done = true;
+ done = TRUE;
break;
}
@@ -466,7 +448,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
debug_field f;
ftype = parse_coff_type (abfd, symbols, types, this_coff_symno,
- syment.n_type, psubaux, true, dhandle);
+ syment.n_type, psubaux, TRUE, dhandle);
f = debug_make_field (dhandle, bfd_asymbol_name (sym), ftype,
bitpos, bitsize, DEBUG_VISIBILITY_PUBLIC);
if (f == DEBUG_FIELD_NULL)
@@ -494,19 +476,16 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
/* Parse an enum type. */
static debug_type
-parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
- bfd *abfd;
- struct coff_symbols *symbols;
- struct coff_types *types ATTRIBUTE_UNUSED;
- union internal_auxent *pauxent;
- PTR dhandle;
+parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
+ struct coff_types *types ATTRIBUTE_UNUSED,
+ union internal_auxent *pauxent, void *dhandle)
{
long symend;
int alloc;
const char **names;
bfd_signed_vma *vals;
int count;
- boolean done;
+ bfd_boolean done;
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
@@ -515,7 +494,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
vals = (bfd_signed_vma *) xmalloc (alloc * sizeof *vals);
count = 0;
- done = false;
+ done = FALSE;
while (! done
&& symbols->coff_symno < symend
&& symbols->symno < symbols->symcount)
@@ -553,7 +532,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
break;
case C_EOS:
- done = true;
+ done = TRUE;
break;
}
}
@@ -565,17 +544,11 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
/* Handle a single COFF symbol. */
-static boolean
-parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
- within_function)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct coff_types *types;
- asymbol *sym;
- long coff_symno;
- struct internal_syment *psyment;
- PTR dhandle;
- debug_type type;
- boolean within_function;
+static bfd_boolean
+parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
+ asymbol *sym, long coff_symno,
+ struct internal_syment *psyment, void *dhandle,
+ debug_type type, bfd_boolean within_function)
{
switch (psyment->n_sclass)
{
@@ -585,14 +558,14 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
case C_AUTO:
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_LOCAL, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_WEAKEXT:
case C_EXT:
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_GLOBAL, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_STAT:
@@ -601,14 +574,14 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
? DEBUG_LOCAL_STATIC
: DEBUG_STATIC),
bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_REG:
/* FIXME: We may need to convert the register number. */
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_REGISTER, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_LABEL:
@@ -617,20 +590,20 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
case C_ARG:
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
DEBUG_PARM_STACK, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_REGPARM:
/* FIXME: We may need to convert the register number. */
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
DEBUG_PARM_REG, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_TPDEF:
type = debug_name_type (dhandle, bfd_asymbol_name (sym), type);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
break;
case C_STRTAG:
@@ -641,7 +614,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
type = debug_tag_type (dhandle, bfd_asymbol_name (sym), type);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
/* Store the named type into the slot, so that references get
the name. */
@@ -654,35 +627,30 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
break;
}
- return true;
+ return TRUE;
}
/* Determine if a symbol has external visibility. */
-static boolean
-external_coff_symbol_p (sym_class)
- int sym_class;
+static bfd_boolean
+external_coff_symbol_p (int sym_class)
{
switch (sym_class)
{
case C_EXT:
case C_WEAKEXT:
- return true;
+ return TRUE;
default:
break;
}
- return false;
+ return FALSE;
}
/* This is the main routine. It looks through all the symbols and
handles them. */
-boolean
-parse_coff (abfd, syms, symcount, dhandle)
- bfd *abfd;
- asymbol **syms;
- long symcount;
- PTR dhandle;
+bfd_boolean
+parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
{
struct coff_symbols symbols;
struct coff_types types;
@@ -693,7 +661,7 @@ parse_coff (abfd, syms, symcount, dhandle)
int fntype;
bfd_vma fnend;
alent *linenos;
- boolean within_function;
+ bfd_boolean within_function;
long this_coff_symno;
symbols.syms = syms;
@@ -711,7 +679,7 @@ parse_coff (abfd, syms, symcount, dhandle)
fntype = 0;
fnend = 0;
linenos = NULL;
- within_function = false;
+ within_function = FALSE;
while (symbols.symno < symcount)
{
@@ -728,7 +696,7 @@ parse_coff (abfd, syms, symcount, dhandle)
{
non_fatal (_("bfd_coff_get_syment failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
name = bfd_asymbol_name (sym);
@@ -748,7 +716,7 @@ parse_coff (abfd, syms, symcount, dhandle)
{
non_fatal (_("bfd_coff_get_auxent failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
paux = &auxent;
}
@@ -758,7 +726,7 @@ parse_coff (abfd, syms, symcount, dhandle)
/* The last C_FILE symbol points to the first external
symbol. */
if (! debug_set_filename (dhandle, "*globals*"))
- return false;
+ return FALSE;
}
switch (syment.n_sclass)
@@ -776,7 +744,7 @@ parse_coff (abfd, syms, symcount, dhandle)
case C_FILE:
next_c_file = syment.n_value;
if (! debug_set_filename (dhandle, name))
- return false;
+ return FALSE;
break;
case C_STAT:
@@ -800,12 +768,12 @@ parse_coff (abfd, syms, symcount, dhandle)
break;
}
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
- syment.n_type, paux, true, dhandle);
+ syment.n_type, paux, TRUE, dhandle);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
dhandle, type, within_function))
- return false;
+ return FALSE;
break;
case C_FCN:
@@ -815,18 +783,18 @@ parse_coff (abfd, syms, symcount, dhandle)
{
non_fatal (_("%ld: .bf without preceding function"),
this_coff_symno);
- return false;
+ return FALSE;
}
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
- DECREF (fntype), paux, false, dhandle);
+ DECREF (fntype), paux, FALSE, dhandle);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_function (dhandle, fnname, type,
external_coff_symbol_p (fnclass),
bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
if (linenos != NULL)
{
@@ -847,7 +815,7 @@ parse_coff (abfd, syms, symcount, dhandle)
if (! debug_record_line (dhandle,
linenos->line_number + base,
linenos->u.offset + addr))
- return false;
+ return FALSE;
++linenos;
}
}
@@ -857,23 +825,23 @@ parse_coff (abfd, syms, symcount, dhandle)
fnclass = 0;
fntype = 0;
- within_function = true;
+ within_function = TRUE;
}
else if (strcmp (name, ".ef") == 0)
{
if (! within_function)
{
non_fatal (_("%ld: unexpected .ef\n"), this_coff_symno);
- return false;
+ return FALSE;
}
if (bfd_asymbol_value (sym) > fnend)
fnend = bfd_asymbol_value (sym);
if (! debug_end_function (dhandle, fnend))
- return false;
+ return FALSE;
fnend = 0;
- within_function = false;
+ within_function = FALSE;
}
break;
@@ -881,26 +849,26 @@ parse_coff (abfd, syms, symcount, dhandle)
if (strcmp (name, ".bb") == 0)
{
if (! debug_start_block (dhandle, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
}
else if (strcmp (name, ".eb") == 0)
{
if (! debug_end_block (dhandle, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
}
break;
default:
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
- syment.n_type, paux, true, dhandle);
+ syment.n_type, paux, TRUE, dhandle);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
dhandle, type, within_function))
- return false;
+ return FALSE;
break;
}
}
- return true;
+ return TRUE;
}
diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c
index 3430c02..75ddab5 100644
--- a/contrib/binutils/binutils/rddbg.c
+++ b/contrib/binutils/binutils/rddbg.c
@@ -1,5 +1,6 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -29,26 +30,23 @@
#include "debug.h"
#include "budbg.h"
-static boolean read_section_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, boolean *));
-static boolean read_symbol_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, boolean *));
-static boolean read_ieee_debugging_info PARAMS ((bfd *, PTR, boolean *));
-static void save_stab PARAMS ((int, int, bfd_vma, const char *));
-static void stab_context PARAMS ((void));
-static void free_saved_stabs PARAMS ((void));
+static bfd_boolean read_section_stabs_debugging_info
+ (bfd *, asymbol **, long, void *, bfd_boolean *);
+static bfd_boolean read_symbol_stabs_debugging_info
+ (bfd *, asymbol **, long, void *, bfd_boolean *);
+static bfd_boolean read_ieee_debugging_info (bfd *, void *, bfd_boolean *);
+static void save_stab (int, int, bfd_vma, const char *);
+static void stab_context (void);
+static void free_saved_stabs (void);
/* Read debugging information from a BFD. Returns a generic debugging
pointer. */
-PTR
-read_debugging_info (abfd, syms, symcount)
- bfd *abfd;
- asymbol **syms;
- long symcount;
+void *
+read_debugging_info (bfd *abfd, asymbol **syms, long symcount)
{
- PTR dhandle;
- boolean found;
+ void *dhandle;
+ bfd_boolean found;
dhandle = debug_init ();
if (dhandle == NULL)
@@ -79,7 +77,7 @@ read_debugging_info (abfd, syms, symcount)
{
if (! parse_coff (abfd, syms, symcount, dhandle))
return NULL;
- found = true;
+ found = TRUE;
}
if (! found)
@@ -94,23 +92,20 @@ read_debugging_info (abfd, syms, symcount)
/* Read stabs in sections debugging information from a BFD. */
-static boolean
-read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
- bfd *abfd;
- asymbol **syms;
- long symcount;
- PTR dhandle;
- boolean *pfound;
+static bfd_boolean
+read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
+ void *dhandle, bfd_boolean *pfound)
{
static struct
{
const char *secname;
const char *strsecname;
- } names[] = { { ".stab", ".stabstr" } };
+ } names[] = { { ".stab", ".stabstr" },
+ { "LC_SYMTAB.stabs", "LC_SYMTAB.stabstr" } };
unsigned int i;
- PTR shandle;
+ void *shandle;
- *pfound = false;
+ *pfound = FALSE;
shandle = NULL;
for (i = 0; i < sizeof names / sizeof names[0]; i++)
@@ -133,7 +128,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
fprintf (stderr, "%s: %s: %s\n",
bfd_get_filename (abfd), names[i].secname,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
strsize = bfd_section_size (abfd, strsec);
@@ -143,17 +138,17 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
fprintf (stderr, "%s: %s: %s\n",
bfd_get_filename (abfd), names[i].strsecname,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
if (shandle == NULL)
{
- shandle = start_stab (dhandle, abfd, true, syms, symcount);
+ shandle = start_stab (dhandle, abfd, TRUE, syms, symcount);
if (shandle == NULL)
- return false;
+ return FALSE;
}
- *pfound = true;
+ *pfound = TRUE;
stroff = 0;
next_stroff = 0;
@@ -176,7 +171,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (type == 0)
{
/* Special type 0 stabs indicate the offset to the
- next string table. */
+ next string table. */
stroff = next_stroff;
next_stroff += value;
}
@@ -188,9 +183,9 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (stroff + strx > strsize)
{
- fprintf (stderr, "%s: %s: stab entry %d is corrupt, strx = 0x%x, type = %d\n",
+ fprintf (stderr, "%s: %s: stab entry %ld is corrupt, strx = 0x%x, type = %d\n",
bfd_get_filename (abfd), names[i].secname,
- (stab - stabs) / 12, strx, type);
+ (long) (stab - stabs) / 12, strx, type);
continue;
}
@@ -211,8 +206,8 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
(const char *) NULL);
/* We have to restore the backslash, because, if
- the linker is hashing stabs strings, we may
- see the same string more than once. */
+ the linker is hashing stabs strings, we may
+ see the same string more than once. */
*p = '\\';
if (f != NULL)
@@ -226,12 +221,12 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
{
stab_context ();
free_saved_stabs ();
- return false;
+ return FALSE;
}
/* Don't free f, since I think the stabs code
- expects strings to hang around. This should be
- straightened out. FIXME. */
+ expects strings to hang around. This should be
+ straightened out. FIXME. */
}
}
@@ -239,31 +234,27 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
free (stabs);
/* Don't free strings, since I think the stabs code expects
- the strings to hang around. This should be straightened
- out. FIXME. */
+ the strings to hang around. This should be straightened
+ out. FIXME. */
}
}
if (shandle != NULL)
{
if (! finish_stab (dhandle, shandle))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Read stabs in the symbol table. */
-static boolean
-read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
- bfd *abfd;
- asymbol **syms;
- long symcount;
- PTR dhandle;
- boolean *pfound;
+static bfd_boolean
+read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
+ void *dhandle, bfd_boolean *pfound)
{
- PTR shandle;
+ void *shandle;
asymbol **ps, **symend;
shandle = NULL;
@@ -281,12 +272,12 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle == NULL)
{
- shandle = start_stab (dhandle, abfd, false, syms, symcount);
+ shandle = start_stab (dhandle, abfd, FALSE, syms, symcount);
if (shandle == NULL)
- return false;
+ return FALSE;
}
- *pfound = true;
+ *pfound = TRUE;
s = i.name;
f = NULL;
@@ -313,7 +304,7 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
{
stab_context ();
free_saved_stabs ();
- return false;
+ return FALSE;
}
/* Don't free f, since I think the stabs code expects
@@ -327,19 +318,16 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle != NULL)
{
if (! finish_stab (dhandle, shandle))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Read IEEE debugging information. */
-static boolean
-read_ieee_debugging_info (abfd, dhandle, pfound)
- bfd *abfd;
- PTR dhandle;
- boolean *pfound;
+static bfd_boolean
+read_ieee_debugging_info (bfd *abfd, void *dhandle, bfd_boolean *pfound)
{
asection *dsec;
bfd_size_type size;
@@ -350,21 +338,21 @@ read_ieee_debugging_info (abfd, dhandle, pfound)
dsec = bfd_get_section_by_name (abfd, ".debug");
if (dsec == NULL)
- return true;
+ return TRUE;
size = bfd_section_size (abfd, dsec);
contents = (bfd_byte *) xmalloc (size);
if (! bfd_get_section_contents (abfd, dsec, contents, 0, size))
- return false;
+ return FALSE;
if (! parse_ieee (dhandle, abfd, contents, size))
- return false;
+ return FALSE;
free (contents);
- *pfound = true;
+ *pfound = TRUE;
- return true;
+ return TRUE;
}
/* Record stabs strings, so that we can give some context for errors. */
@@ -385,11 +373,7 @@ static int saved_stabs_index;
/* Save a stabs string. */
static void
-save_stab (type, desc, value, string)
- int type;
- int desc;
- bfd_vma value;
- const char *string;
+save_stab (int type, int desc, bfd_vma value, const char *string)
{
if (saved_stabs[saved_stabs_index].string != NULL)
free (saved_stabs[saved_stabs_index].string);
@@ -403,7 +387,7 @@ save_stab (type, desc, value, string)
/* Provide context for an error. */
static void
-stab_context ()
+stab_context (void)
{
int i;
@@ -441,7 +425,7 @@ stab_context ()
/* Free the saved stab strings. */
static void
-free_saved_stabs ()
+free_saved_stabs (void)
{
int i;
diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c
index d397032..e95a501 100644
--- a/contrib/binutils/binutils/readelf.c
+++ b/contrib/binutils/binutils/readelf.c
@@ -1,5 +1,5 @@
/* readelf.c -- display contents of an ELF format file
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
Modifications by Nick Clifton <nickc@redhat.com>
@@ -21,7 +21,25 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* The difference between readelf and objdump:
+ Both programs are capabale of displaying the contents of ELF format files,
+ so why does the binutils project have two file dumpers ?
+
+ The reason is that objdump sees an ELF file through a BFD filter of the
+ world; if BFD has a bug where, say, it disagrees about a machine constant
+ in e_flags, then the odds are good that it will remain internally
+ consistent. The linker sees it the BFD way, objdump sees it the BFD way,
+ GAS sees it the BFD way. There was need for a tool to go find out what
+ the file actually says.
+
+ This is why the readelf program does not link against the BFD library - it
+ exists as an independent program to help verify the correct working of BFD.
+
+ There is also the case that readelf can provide more information about an
+ ELF file than is provided by objdump. In particular it can display DWARF
+ debugging information which (at the moment) objdump cannot. */
+
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -31,7 +49,7 @@
#if __GNUC__ >= 2
/* Define BFD64 here, even if our default architecture is 32 bit ELF
as this will allow us to read in and parse 64bit and 32bit ELF files.
- Only do this if we belive that the compiler can support a 64 bit
+ Only do this if we believe that the compiler can support a 64 bit
data type. For now we only rely on GCC being able to do this. */
#define BFD64
#endif
@@ -62,9 +80,11 @@
#include "elf/h8.h"
#include "elf/hppa.h"
#include "elf/i386.h"
+#include "elf/i370.h"
#include "elf/i860.h"
#include "elf/i960.h"
#include "elf/ia64.h"
+#include "elf/ip2k.h"
#include "elf/m32r.h"
#include "elf/m68k.h"
#include "elf/m68hc11.h"
@@ -73,9 +93,11 @@
#include "elf/mmix.h"
#include "elf/mn10200.h"
#include "elf/mn10300.h"
+#include "elf/msp430.h"
#include "elf/or32.h"
#include "elf/pj.h"
#include "elf/ppc.h"
+#include "elf/ppc64.h"
#include "elf/s390.h"
#include "elf/sh.h"
#include "elf/sparc.h"
@@ -83,62 +105,67 @@
#include "elf/vax.h"
#include "elf/x86-64.h"
#include "elf/xstormy16.h"
+#include "elf/iq2000.h"
+#include "elf/xtensa.h"
+
+#include "aout/ar.h"
#include "bucomm.h"
#include "getopt.h"
-
-char * program_name = "readelf";
-unsigned int dynamic_addr;
-bfd_size_type dynamic_size;
-unsigned int rela_addr;
-unsigned int rela_size;
-char * dynamic_strings;
-char * string_table;
-unsigned long string_table_length;
-unsigned long num_dynamic_syms;
-Elf_Internal_Sym * dynamic_symbols;
-Elf_Internal_Syminfo * dynamic_syminfo;
-unsigned long dynamic_syminfo_offset;
-unsigned int dynamic_syminfo_nent;
-char program_interpreter [64];
-int dynamic_info[DT_JMPREL + 1];
-int version_info[16];
-int loadaddr = 0;
-Elf_Internal_Ehdr elf_header;
-Elf_Internal_Shdr * section_headers;
-Elf_Internal_Dyn * dynamic_segment;
-Elf_Internal_Shdr * symtab_shndx_hdr;
-int show_name;
-int do_dynamic;
-int do_syms;
-int do_reloc;
-int do_sections;
-int do_segments;
-int do_unwind;
-int do_using_dynamic;
-int do_header;
-int do_dump;
-int do_version;
-int do_wide;
-int do_histogram;
-int do_debugging;
-int do_debug_info;
-int do_debug_abbrevs;
-int do_debug_lines;
-int do_debug_pubnames;
-int do_debug_aranges;
-int do_debug_frames;
-int do_debug_frames_interp;
-int do_debug_macinfo;
-int do_debug_str;
-int do_debug_loc;
-int do_arch;
-int do_notes;
-int is_32bit_elf;
+#include "libiberty.h"
+
+char *program_name = "readelf";
+long archive_file_offset;
+unsigned long archive_file_size;
+unsigned long dynamic_addr;
+bfd_size_type dynamic_size;
+char *dynamic_strings;
+char *string_table;
+unsigned long string_table_length;
+unsigned long num_dynamic_syms;
+Elf_Internal_Sym *dynamic_symbols;
+Elf_Internal_Syminfo *dynamic_syminfo;
+unsigned long dynamic_syminfo_offset;
+unsigned int dynamic_syminfo_nent;
+char program_interpreter[64];
+bfd_vma dynamic_info[DT_JMPREL + 1];
+bfd_vma version_info[16];
+Elf_Internal_Ehdr elf_header;
+Elf_Internal_Shdr *section_headers;
+Elf_Internal_Phdr *program_headers;
+Elf_Internal_Dyn *dynamic_segment;
+Elf_Internal_Shdr *symtab_shndx_hdr;
+int show_name;
+int do_dynamic;
+int do_syms;
+int do_reloc;
+int do_sections;
+int do_segments;
+int do_unwind;
+int do_using_dynamic;
+int do_header;
+int do_dump;
+int do_version;
+int do_wide;
+int do_histogram;
+int do_debugging;
+int do_debug_info;
+int do_debug_abbrevs;
+int do_debug_lines;
+int do_debug_pubnames;
+int do_debug_aranges;
+int do_debug_frames;
+int do_debug_frames_interp;
+int do_debug_macinfo;
+int do_debug_str;
+int do_debug_loc;
+int do_arch;
+int do_notes;
+int is_32bit_elf;
/* A dynamic array of flags indicating which sections require dumping. */
-char * dump_sects = NULL;
-unsigned int num_dump_sects = 0;
+char *dump_sects = NULL;
+unsigned int num_dump_sects = 0;
#define HEX_DUMP (1 << 0)
#define DISASS_DUMP (1 << 1)
@@ -157,121 +184,11 @@ typedef enum print_mode
}
print_mode;
-/* Forward declarations for dumb compilers. */
-static void print_vma PARAMS ((bfd_vma, print_mode));
-static void print_symbol PARAMS ((int, char *));
-static bfd_vma (* byte_get) PARAMS ((unsigned char *, int));
-static bfd_vma byte_get_little_endian PARAMS ((unsigned char *, int));
-static bfd_vma byte_get_big_endian PARAMS ((unsigned char *, int));
-static const char * get_mips_dynamic_type PARAMS ((unsigned long));
-static const char * get_sparc64_dynamic_type PARAMS ((unsigned long));
-static const char * get_ppc64_dynamic_type PARAMS ((unsigned long));
-static const char * get_parisc_dynamic_type PARAMS ((unsigned long));
-static const char * get_dynamic_type PARAMS ((unsigned long));
-static int slurp_rela_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **, unsigned long *));
-static int slurp_rel_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rel **, unsigned long *));
-static int dump_relocations PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Sym *, unsigned long, char *, int));
-static char * get_file_type PARAMS ((unsigned));
-static char * get_machine_name PARAMS ((unsigned));
-static void decode_ARM_machine_flags PARAMS ((unsigned, char []));
-static char * get_machine_flags PARAMS ((unsigned, unsigned));
-static const char * get_mips_segment_type PARAMS ((unsigned long));
-static const char * get_parisc_segment_type PARAMS ((unsigned long));
-static const char * get_ia64_segment_type PARAMS ((unsigned long));
-static const char * get_segment_type PARAMS ((unsigned long));
-static const char * get_mips_section_type_name PARAMS ((unsigned int));
-static const char * get_parisc_section_type_name PARAMS ((unsigned int));
-static const char * get_ia64_section_type_name PARAMS ((unsigned int));
-static const char * get_section_type_name PARAMS ((unsigned int));
-static const char * get_symbol_binding PARAMS ((unsigned int));
-static const char * get_symbol_type PARAMS ((unsigned int));
-static const char * get_symbol_visibility PARAMS ((unsigned int));
-static const char * get_symbol_index_type PARAMS ((unsigned int));
-static const char * get_dynamic_flags PARAMS ((bfd_vma));
-static void usage PARAMS ((void));
-static void parse_args PARAMS ((int, char **));
-static int process_file_header PARAMS ((void));
-static int process_program_headers PARAMS ((FILE *));
-static int process_section_headers PARAMS ((FILE *));
-static int process_unwind PARAMS ((FILE *));
-static void dynamic_segment_mips_val PARAMS ((Elf_Internal_Dyn *));
-static void dynamic_segment_parisc_val PARAMS ((Elf_Internal_Dyn *));
-static int process_dynamic_segment PARAMS ((FILE *));
-static int process_symbol_table PARAMS ((FILE *));
-static int process_syminfo PARAMS ((FILE *));
-static int process_section_contents PARAMS ((FILE *));
-static void process_mips_fpe_exception PARAMS ((int));
-static int process_mips_specific PARAMS ((FILE *));
-static int process_file PARAMS ((char *));
-static int process_relocs PARAMS ((FILE *));
-static int process_version_sections PARAMS ((FILE *));
-static char * get_ver_flags PARAMS ((unsigned int));
-static int get_32bit_section_headers PARAMS ((FILE *, unsigned int));
-static int get_64bit_section_headers PARAMS ((FILE *, unsigned int));
-static int get_32bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *));
-static int get_64bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *));
-static int get_file_header PARAMS ((FILE *));
-static Elf_Internal_Sym * get_32bit_elf_symbols PARAMS ((FILE *, Elf_Internal_Shdr *));
-static Elf_Internal_Sym * get_64bit_elf_symbols PARAMS ((FILE *, Elf_Internal_Shdr *));
-static const char * get_elf_section_flags PARAMS ((bfd_vma));
-static int * get_dynamic_data PARAMS ((FILE *, unsigned int));
-static int get_32bit_dynamic_segment PARAMS ((FILE *));
-static int get_64bit_dynamic_segment PARAMS ((FILE *));
-#ifdef SUPPORT_DISASSEMBLY
-static int disassemble_section PARAMS ((Elf32_Internal_Shdr *, FILE *));
-#endif
-static int dump_section PARAMS ((Elf32_Internal_Shdr *, FILE *));
-static int display_debug_section PARAMS ((Elf32_Internal_Shdr *, FILE *));
-static int display_debug_info PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_not_supported PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int prescan_debug_info PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_lines PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_pubnames PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_abbrev PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_aranges PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_frames PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_macinfo PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_str PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_loc PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
-static unsigned char * process_abbrev_section PARAMS ((unsigned char *, unsigned char *));
-static void load_debug_str PARAMS ((FILE *));
-static void free_debug_str PARAMS ((void));
-static const char * fetch_indirect_string PARAMS ((unsigned long));
-static void load_debug_loc PARAMS ((FILE *));
-static void free_debug_loc PARAMS ((void));
-static unsigned long read_leb128 PARAMS ((unsigned char *, int *, int));
-static int process_extended_line_op PARAMS ((unsigned char *, int, int));
-static void reset_state_machine PARAMS ((int));
-static char * get_TAG_name PARAMS ((unsigned long));
-static char * get_AT_name PARAMS ((unsigned long));
-static char * get_FORM_name PARAMS ((unsigned long));
-static void free_abbrevs PARAMS ((void));
-static void add_abbrev PARAMS ((unsigned long, unsigned long, int));
-static void add_abbrev_attr PARAMS ((unsigned long, unsigned long));
-static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
-static unsigned char * read_and_display_attr_value PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
-static unsigned char * display_block PARAMS ((unsigned char *, unsigned long));
-static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long));
-static void request_dump PARAMS ((unsigned int, int));
-static const char * get_elf_class PARAMS ((unsigned int));
-static const char * get_data_encoding PARAMS ((unsigned int));
-static const char * get_osabi_name PARAMS ((unsigned int));
-static int guess_is_rela PARAMS ((unsigned long));
-static const char * get_note_type PARAMS ((unsigned int));
-static const char * get_netbsd_elfcore_note_type PARAMS ((unsigned int));
-static int process_note PARAMS ((Elf32_Internal_Note *));
-static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma));
-static int process_corefile_note_segments PARAMS ((FILE *));
-static int process_corefile_contents PARAMS ((FILE *));
-static int process_arch_specific PARAMS ((FILE *));
-static int process_gnu_liblist PARAMS ((FILE *));
+static bfd_vma (*byte_get) (unsigned char *, int);
+static void (*byte_put) (unsigned char *, bfd_vma, int);
typedef int Elf32_Word;
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
#define UNKNOWN -1
#define SECTION_NAME(X) ((X) == NULL ? "<none>" : \
@@ -294,7 +211,7 @@ typedef int Elf32_Word;
#define SECTION_HEADER(I) (section_headers + SECTION_HEADER_INDEX (I))
-#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
+#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
#define BYTE_GET(field) byte_get (field, sizeof (field))
@@ -320,56 +237,50 @@ typedef int Elf32_Word;
static void
-error VPARAMS ((const char *message, ...))
+error (const char *message, ...)
{
- VA_OPEN (args, message);
- VA_FIXEDARG (args, const char *, message);
+ va_list args;
+ va_start (args, message);
fprintf (stderr, _("%s: Error: "), program_name);
vfprintf (stderr, message, args);
- VA_CLOSE (args);
+ va_end (args);
}
static void
-warn VPARAMS ((const char *message, ...))
+warn (const char *message, ...)
{
- VA_OPEN (args, message);
- VA_FIXEDARG (args, const char *, message);
+ va_list args;
+ va_start (args, message);
fprintf (stderr, _("%s: Warning: "), program_name);
vfprintf (stderr, message, args);
- VA_CLOSE (args);
+ va_end (args);
}
-static PTR get_data PARAMS ((PTR, FILE *, long, size_t, const char *));
-
-static PTR
-get_data (var, file, offset, size, reason)
- PTR var;
- FILE *file;
- long offset;
- size_t size;
- const char *reason;
+static void *
+get_data (void *var, FILE *file, long offset, size_t size, const char *reason)
{
- PTR mvar;
+ void *mvar;
if (size == 0)
return NULL;
- if (fseek (file, offset, SEEK_SET))
+ if (fseek (file, archive_file_offset + offset, SEEK_SET))
{
- error (_("Unable to seek to %x for %s\n"), offset, reason);
+ error (_("Unable to seek to 0x%x for %s\n"),
+ archive_file_offset + offset, reason);
return NULL;
}
mvar = var;
if (mvar == NULL)
{
- mvar = (PTR) malloc (size);
+ mvar = malloc (size);
if (mvar == NULL)
{
- error (_("Out of memory allocating %d bytes for %s\n"),
+ error (_("Out of memory allocating 0x%x bytes for %s\n"),
size, reason);
return NULL;
}
@@ -377,7 +288,7 @@ get_data (var, file, offset, size, reason)
if (fread (mvar, size, 1, file) != 1)
{
- error (_("Unable to read in %d bytes of %s\n"), size, reason);
+ error (_("Unable to read in 0x%x bytes of %s\n"), size, reason);
if (mvar != var)
free (mvar);
return NULL;
@@ -387,31 +298,29 @@ get_data (var, file, offset, size, reason)
}
static bfd_vma
-byte_get_little_endian (field, size)
- unsigned char * field;
- int size;
+byte_get_little_endian (unsigned char *field, int size)
{
switch (size)
{
case 1:
- return * field;
+ return *field;
case 2:
- return ((unsigned int) (field [0]))
- | (((unsigned int) (field [1])) << 8);
+ return ((unsigned int) (field[0]))
+ | (((unsigned int) (field[1])) << 8);
#ifndef BFD64
case 8:
/* We want to extract data from an 8 byte wide field and
place it into a 4 byte wide field. Since this is a little
- endian source we can juts use the 4 byte extraction code. */
+ endian source we can just use the 4 byte extraction code. */
/* Fall through. */
#endif
case 4:
- return ((unsigned long) (field [0]))
- | (((unsigned long) (field [1])) << 8)
- | (((unsigned long) (field [2])) << 16)
- | (((unsigned long) (field [3])) << 24);
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
#ifdef BFD64
case 8:
@@ -419,15 +328,15 @@ byte_get_little_endian (field, size)
/* This is a special case, generated by the BYTE_GET8 macro.
It means that we are loading an 8 byte value from a field
in an external structure into an 8 byte value in a field
- in an internal strcuture. */
- return ((bfd_vma) (field [0]))
- | (((bfd_vma) (field [1])) << 8)
- | (((bfd_vma) (field [2])) << 16)
- | (((bfd_vma) (field [3])) << 24)
- | (((bfd_vma) (field [4])) << 32)
- | (((bfd_vma) (field [5])) << 40)
- | (((bfd_vma) (field [6])) << 48)
- | (((bfd_vma) (field [7])) << 56);
+ in an internal structure. */
+ return ((bfd_vma) (field[0]))
+ | (((bfd_vma) (field[1])) << 8)
+ | (((bfd_vma) (field[2])) << 16)
+ | (((bfd_vma) (field[3])) << 24)
+ | (((bfd_vma) (field[4])) << 32)
+ | (((bfd_vma) (field[5])) << 40)
+ | (((bfd_vma) (field[6])) << 48)
+ | (((bfd_vma) (field[7])) << 56);
#endif
default:
error (_("Unhandled data length: %d\n"), size);
@@ -435,11 +344,58 @@ byte_get_little_endian (field, size)
}
}
+static bfd_vma
+byte_get_signed (unsigned char *field, int size)
+{
+ bfd_vma x = byte_get (field, size);
+
+ switch (size)
+ {
+ case 1:
+ return (x ^ 0x80) - 0x80;
+ case 2:
+ return (x ^ 0x8000) - 0x8000;
+ case 4:
+ return (x ^ 0x80000000) - 0x80000000;
+ case 8:
+ case -8:
+ return x;
+ default:
+ abort ();
+ }
+}
+
+static void
+byte_put_little_endian (unsigned char *field, bfd_vma value, int size)
+{
+ switch (size)
+ {
+ case 8:
+ field[7] = (((value >> 24) >> 24) >> 8) & 0xff;
+ field[6] = ((value >> 24) >> 24) & 0xff;
+ field[5] = ((value >> 24) >> 16) & 0xff;
+ field[4] = ((value >> 24) >> 8) & 0xff;
+ /* Fall through. */
+ case 4:
+ field[3] = (value >> 24) & 0xff;
+ field[2] = (value >> 16) & 0xff;
+ /* Fall through. */
+ case 2:
+ field[1] = (value >> 8) & 0xff;
+ /* Fall through. */
+ case 1:
+ field[0] = value & 0xff;
+ break;
+
+ default:
+ error (_("Unhandled data length: %d\n"), size);
+ abort ();
+ }
+}
+
/* Print a VMA value. */
static void
-print_vma (vma, mode)
- bfd_vma vma;
- print_mode mode;
+print_vma (bfd_vma vma, print_mode mode)
{
#ifdef BFD64
if (is_32bit_elf)
@@ -447,13 +403,34 @@ print_vma (vma, mode)
{
switch (mode)
{
- case FULL_HEX: printf ("0x"); /* drop through */
- case LONG_HEX: printf ("%8.8lx", (unsigned long) vma); break;
- case PREFIX_HEX: printf ("0x"); /* drop through */
- case HEX: printf ("%lx", (unsigned long) vma); break;
- case DEC: printf ("%ld", (unsigned long) vma); break;
- case DEC_5: printf ("%5ld", (long) vma); break;
- case UNSIGNED: printf ("%lu", (unsigned long) vma); break;
+ case FULL_HEX:
+ printf ("0x");
+ /* Drop through. */
+ case LONG_HEX:
+ printf ("%8.8lx", (unsigned long) vma);
+ break;
+
+ case DEC_5:
+ if (vma <= 99999)
+ {
+ printf ("%5ld", (long) vma);
+ break;
+ }
+ /* Drop through. */
+ case PREFIX_HEX:
+ printf ("0x");
+ /* Drop through. */
+ case HEX:
+ printf ("%lx", (unsigned long) vma);
+ break;
+
+ case DEC:
+ printf ("%ld", (unsigned long) vma);
+ break;
+
+ case UNSIGNED:
+ printf ("%lu", (unsigned long) vma);
+ break;
}
}
#ifdef BFD64
@@ -463,7 +440,7 @@ print_vma (vma, mode)
{
case FULL_HEX:
printf ("0x");
- /* drop through */
+ /* Drop through. */
case LONG_HEX:
printf_vma (vma);
@@ -471,7 +448,7 @@ print_vma (vma, mode)
case PREFIX_HEX:
printf ("0x");
- /* drop through */
+ /* Drop through. */
case HEX:
#if BFD_HOST_64BIT_LONG
@@ -498,13 +475,18 @@ print_vma (vma, mode)
case DEC_5:
#if BFD_HOST_64BIT_LONG
- printf ("%5ld", vma);
+ if (vma <= 99999)
+ printf ("%5ld", vma);
+ else
+ printf ("%#lx", vma);
#else
if (_bfd_int64_high (vma))
/* ugg */
printf ("++%ld", _bfd_int64_low (vma));
- else
+ else if (vma <= 99999)
printf ("%5ld", _bfd_int64_low (vma));
+ else
+ printf ("%#lx", _bfd_int64_low (vma));
#endif
break;
@@ -531,12 +513,10 @@ print_vma (vma, mode)
truncating or padding as necessary. */
static void
-print_symbol (width, symbol)
- int width;
- char * symbol;
+print_symbol (int width, const char *symbol)
{
if (do_wide)
- printf (symbol);
+ printf ("%s", symbol);
else if (width < 0)
printf ("%-*.*s", width, width, symbol);
else
@@ -544,47 +524,45 @@ print_symbol (width, symbol)
}
static bfd_vma
-byte_get_big_endian (field, size)
- unsigned char * field;
- int size;
+byte_get_big_endian (unsigned char *field, int size)
{
switch (size)
{
case 1:
- return * field;
+ return *field;
case 2:
- return ((unsigned int) (field [1])) | (((int) (field [0])) << 8);
+ return ((unsigned int) (field[1])) | (((int) (field[0])) << 8);
case 4:
- return ((unsigned long) (field [3]))
- | (((unsigned long) (field [2])) << 8)
- | (((unsigned long) (field [1])) << 16)
- | (((unsigned long) (field [0])) << 24);
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
#ifndef BFD64
case 8:
/* Although we are extracing data from an 8 byte wide field, we
are returning only 4 bytes of data. */
- return ((unsigned long) (field [7]))
- | (((unsigned long) (field [6])) << 8)
- | (((unsigned long) (field [5])) << 16)
- | (((unsigned long) (field [4])) << 24);
+ return ((unsigned long) (field[7]))
+ | (((unsigned long) (field[6])) << 8)
+ | (((unsigned long) (field[5])) << 16)
+ | (((unsigned long) (field[4])) << 24);
#else
case 8:
case -8:
/* This is a special case, generated by the BYTE_GET8 macro.
It means that we are loading an 8 byte value from a field
in an external structure into an 8 byte value in a field
- in an internal strcuture. */
- return ((bfd_vma) (field [7]))
- | (((bfd_vma) (field [6])) << 8)
- | (((bfd_vma) (field [5])) << 16)
- | (((bfd_vma) (field [4])) << 24)
- | (((bfd_vma) (field [3])) << 32)
- | (((bfd_vma) (field [2])) << 40)
- | (((bfd_vma) (field [1])) << 48)
- | (((bfd_vma) (field [0])) << 56);
+ in an internal structure. */
+ return ((bfd_vma) (field[7]))
+ | (((bfd_vma) (field[6])) << 8)
+ | (((bfd_vma) (field[5])) << 16)
+ | (((bfd_vma) (field[4])) << 24)
+ | (((bfd_vma) (field[3])) << 32)
+ | (((bfd_vma) (field[2])) << 40)
+ | (((bfd_vma) (field[1])) << 48)
+ | (((bfd_vma) (field[0])) << 56);
#endif
default:
@@ -593,11 +571,42 @@ byte_get_big_endian (field, size)
}
}
+static void
+byte_put_big_endian (unsigned char *field, bfd_vma value, int size)
+{
+ switch (size)
+ {
+ case 8:
+ field[7] = value & 0xff;
+ field[6] = (value >> 8) & 0xff;
+ field[5] = (value >> 16) & 0xff;
+ field[4] = (value >> 24) & 0xff;
+ value >>= 16;
+ value >>= 16;
+ /* Fall through. */
+ case 4:
+ field[3] = value & 0xff;
+ field[2] = (value >> 8) & 0xff;
+ value >>= 16;
+ /* Fall through. */
+ case 2:
+ field[1] = value & 0xff;
+ value >>= 8;
+ /* Fall through. */
+ case 1:
+ field[0] = value & 0xff;
+ break;
+
+ default:
+ error (_("Unhandled data length: %d\n"), size);
+ abort ();
+ }
+}
+
/* Guess the relocation size commonly used by the specific machines. */
static int
-guess_is_rela (e_machine)
- unsigned long e_machine;
+guess_is_rela (unsigned long e_machine)
{
switch (e_machine)
{
@@ -609,7 +618,6 @@ guess_is_rela (e_machine)
case EM_DLX:
case EM_OPENRISC:
case EM_OR32:
- case EM_M32R:
case EM_CYGNUS_M32R:
case EM_D10V:
case EM_CYGNUS_D10V:
@@ -650,8 +658,16 @@ guess_is_rela (e_machine)
case EM_S390:
case EM_S390_OLD:
case EM_MMIX:
+ case EM_MSP430:
+ case EM_MSP430_OLD:
case EM_XSTORMY16:
case EM_VAX:
+ case EM_IP2K:
+ case EM_IP2K_OLD:
+ case EM_IQ2000:
+ case EM_XTENSA:
+ case EM_XTENSA_OLD:
+ case EM_M32R:
return TRUE;
case EM_MMA:
@@ -678,12 +694,11 @@ guess_is_rela (e_machine)
}
static int
-slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
- FILE *file;
- unsigned long rel_offset;
- unsigned long rel_size;
- Elf_Internal_Rela **relasp;
- unsigned long *nrelasp;
+slurp_rela_relocs (FILE *file,
+ unsigned long rel_offset,
+ unsigned long rel_size,
+ Elf_Internal_Rela **relasp,
+ unsigned long *nrelasp)
{
Elf_Internal_Rela *relas;
unsigned long nrelas;
@@ -691,17 +706,15 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
if (is_32bit_elf)
{
- Elf32_External_Rela * erelas;
+ Elf32_External_Rela *erelas;
- erelas = (Elf32_External_Rela *) get_data (NULL, file, rel_offset,
- rel_size, _("relocs"));
+ erelas = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
if (!erelas)
return 0;
nrelas = rel_size / sizeof (Elf32_External_Rela);
- relas = (Elf_Internal_Rela *)
- malloc (nrelas * sizeof (Elf_Internal_Rela));
+ relas = malloc (nrelas * sizeof (Elf_Internal_Rela));
if (relas == NULL)
{
@@ -720,17 +733,15 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
}
else
{
- Elf64_External_Rela * erelas;
+ Elf64_External_Rela *erelas;
- erelas = (Elf64_External_Rela *) get_data (NULL, file, rel_offset,
- rel_size, _("relocs"));
+ erelas = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
if (!erelas)
return 0;
nrelas = rel_size / sizeof (Elf64_External_Rela);
- relas = (Elf_Internal_Rela *)
- malloc (nrelas * sizeof (Elf_Internal_Rela));
+ relas = malloc (nrelas * sizeof (Elf_Internal_Rela));
if (relas == NULL)
{
@@ -753,29 +764,27 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
}
static int
-slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
- FILE *file;
- unsigned long rel_offset;
- unsigned long rel_size;
- Elf_Internal_Rel **relsp;
- unsigned long *nrelsp;
-{
- Elf_Internal_Rel *rels;
+slurp_rel_relocs (FILE *file,
+ unsigned long rel_offset,
+ unsigned long rel_size,
+ Elf_Internal_Rela **relsp,
+ unsigned long *nrelsp)
+{
+ Elf_Internal_Rela *rels;
unsigned long nrels;
unsigned int i;
if (is_32bit_elf)
{
- Elf32_External_Rel * erels;
+ Elf32_External_Rel *erels;
- erels = (Elf32_External_Rel *) get_data (NULL, file, rel_offset,
- rel_size, _("relocs"));
+ erels = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
if (!erels)
return 0;
nrels = rel_size / sizeof (Elf32_External_Rel);
- rels = (Elf_Internal_Rel *) malloc (nrels * sizeof (Elf_Internal_Rel));
+ rels = malloc (nrels * sizeof (Elf_Internal_Rela));
if (rels == NULL)
{
@@ -787,22 +796,22 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
{
rels[i].r_offset = BYTE_GET (erels[i].r_offset);
rels[i].r_info = BYTE_GET (erels[i].r_info);
+ rels[i].r_addend = 0;
}
free (erels);
}
else
{
- Elf64_External_Rel * erels;
+ Elf64_External_Rel *erels;
- erels = (Elf64_External_Rel *) get_data (NULL, file, rel_offset,
- rel_size, _("relocs"));
+ erels = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
if (!erels)
return 0;
nrels = rel_size / sizeof (Elf64_External_Rel);
- rels = (Elf_Internal_Rel *) malloc (nrels * sizeof (Elf_Internal_Rel));
+ rels = malloc (nrels * sizeof (Elf_Internal_Rela));
if (rels == NULL)
{
@@ -814,6 +823,7 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
{
rels[i].r_offset = BYTE_GET8 (erels[i].r_offset);
rels[i].r_info = BYTE_GET8 (erels[i].r_info);
+ rels[i].r_addend = 0;
}
free (erels);
@@ -823,20 +833,20 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
return 1;
}
-/* Display the contents of the relocation data found at the specified offset. */
+/* Display the contents of the relocation data found at the specified
+ offset. */
+
static int
-dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
- FILE * file;
- unsigned long rel_offset;
- unsigned long rel_size;
- Elf_Internal_Sym * symtab;
- unsigned long nsyms;
- char * strtab;
- int is_rela;
+dump_relocations (FILE *file,
+ unsigned long rel_offset,
+ unsigned long rel_size,
+ Elf_Internal_Sym *symtab,
+ unsigned long nsyms,
+ char *strtab,
+ int is_rela)
{
- unsigned int i;
- Elf_Internal_Rel * rels;
- Elf_Internal_Rela * relas;
+ unsigned int i;
+ Elf_Internal_Rela *rels;
if (is_rela == UNKNOWN)
@@ -844,7 +854,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
if (is_rela)
{
- if (!slurp_rela_relocs (file, rel_offset, rel_size, &relas, &rel_size))
+ if (!slurp_rela_relocs (file, rel_offset, rel_size, &rels, &rel_size))
return 0;
}
else
@@ -875,14 +885,14 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
if (is_rela)
{
if (do_wide)
- printf (_(" Offset Info Type Symbol's Value Symbol's Name + Addend\n"));
+ printf (_(" Offset Info Type Symbol's Value Symbol's Name + Addend\n"));
else
printf (_(" Offset Info Type Sym. Value Sym. Name + Addend\n"));
}
else
{
if (do_wide)
- printf (_(" Offset Info Type Symbol's Value Symbol's Name\n"));
+ printf (_(" Offset Info Type Symbol's Value Symbol's Name\n"));
else
printf (_(" Offset Info Type Sym. Value Sym. Name\n"));
}
@@ -890,26 +900,18 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
for (i = 0; i < rel_size; i++)
{
- const char * rtype;
- const char * rtype2 = NULL;
- const char * rtype3 = NULL;
- bfd_vma offset;
- bfd_vma info;
- bfd_vma symtab_index;
- bfd_vma type;
- bfd_vma type2 = (bfd_vma) NULL;
- bfd_vma type3 = (bfd_vma) NULL;
+ const char *rtype;
+ const char *rtype2 = NULL;
+ const char *rtype3 = NULL;
+ bfd_vma offset;
+ bfd_vma info;
+ bfd_vma symtab_index;
+ bfd_vma type;
+ bfd_vma type2 = 0;
+ bfd_vma type3 = 0;
- if (is_rela)
- {
- offset = relas [i].r_offset;
- info = relas [i].r_info;
- }
- else
- {
- offset = rels [i].r_offset;
- info = rels [i].r_info;
- }
+ offset = rels[i].r_offset;
+ info = rels[i].r_info;
if (is_32bit_elf)
{
@@ -918,8 +920,22 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
}
else
{
+ /* The #ifdef BFD64 below is to prevent a compile time warning.
+ We know that if we do not have a 64 bit data type that we
+ will never execute this code anyway. */
+#ifdef BFD64
if (elf_header.e_machine == EM_MIPS)
{
+ /* In little-endian objects, r_info isn't really a 64-bit
+ little-endian value: it has a 32-bit little-endian
+ symbol index followed by four individual byte fields.
+ Reorder INFO accordingly. */
+ if (elf_header.e_ident[EI_DATA] != ELFDATA2MSB)
+ info = (((info & 0xffffffff) << 32)
+ | ((info >> 56) & 0xff)
+ | ((info >> 40) & 0xff00)
+ | ((info >> 24) & 0xff0000)
+ | ((info >> 8) & 0xff000000));
type = ELF64_MIPS_R_TYPE (info);
type2 = ELF64_MIPS_R_TYPE2 (info);
type3 = ELF64_MIPS_R_TYPE3 (info);
@@ -928,10 +944,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
type = ELF64_R_TYPE_ID (info);
else
type = ELF64_R_TYPE (info);
- /* The #ifdef BFD64 below is to prevent a compile time warning.
- We know that if we do not have a 64 bit data type that we
- will never execute this code anyway. */
-#ifdef BFD64
+
symtab_index = ELF64_R_SYM (info);
#endif
}
@@ -1053,11 +1066,19 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_mmix_reloc_type (type);
break;
+ case EM_MSP430:
+ case EM_MSP430_OLD:
+ rtype = elf_msp430_reloc_type (type);
+ break;
+
case EM_PPC:
- case EM_PPC64:
rtype = elf_ppc_reloc_type (type);
break;
+ case EM_PPC64:
+ rtype = elf_ppc64_reloc_type (type);
+ break;
+
case EM_MIPS:
case EM_MIPS_RS3_LE:
rtype = elf_mips_reloc_type (type);
@@ -1115,6 +1136,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_x86_64_reloc_type (type);
break;
+ case EM_S370:
+ rtype = i370_reloc_type (type);
+ break;
+
case EM_S390_OLD:
case EM_S390:
rtype = elf_s390_reloc_type (type);
@@ -1127,6 +1152,20 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
case EM_VAX:
rtype = elf_vax_reloc_type (type);
break;
+
+ case EM_IP2K:
+ case EM_IP2K_OLD:
+ rtype = elf_ip2k_reloc_type (type);
+ break;
+
+ case EM_IQ2000:
+ rtype = elf_iq2000_reloc_type (type);
+ break;
+
+ case EM_XTENSA_OLD:
+ case EM_XTENSA:
+ rtype = elf_xtensa_reloc_type (type);
+ break;
}
if (rtype == NULL)
@@ -1136,7 +1175,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
printf (_("unrecognized: %-7lx"), type);
#endif
else
- printf (do_wide ? "%-21.21s" : "%-17.17s", rtype);
+ printf (do_wide ? "%-22.22s" : "%-17.17s", rtype);
if (symtab_index)
{
@@ -1144,7 +1183,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
else
{
- Elf_Internal_Sym * psym;
+ Elf_Internal_Sym *psym;
psym = symtab + symtab_index;
@@ -1153,20 +1192,52 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
printf (is_32bit_elf ? " " : " ");
if (psym->st_name == 0)
- print_symbol (22, SECTION_NAME (section_headers + psym->st_shndx));
+ {
+ const char *sec_name = "<null>";
+ char name_buf[40];
+
+ if (ELF_ST_TYPE (psym->st_info) == STT_SECTION)
+ {
+ bfd_vma sec_index = (bfd_vma) -1;
+
+ if (psym->st_shndx < SHN_LORESERVE)
+ sec_index = psym->st_shndx;
+ else if (psym->st_shndx > SHN_LORESERVE)
+ sec_index = psym->st_shndx - (SHN_HIRESERVE + 1
+ - SHN_LORESERVE);
+
+ if (sec_index != (bfd_vma) -1)
+ sec_name = SECTION_NAME (section_headers + sec_index);
+ else if (psym->st_shndx == SHN_ABS)
+ sec_name = "ABS";
+ else if (psym->st_shndx == SHN_COMMON)
+ sec_name = "COMMON";
+ else if (elf_header.e_machine == EM_IA_64
+ && elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX
+ && psym->st_shndx == SHN_IA_64_ANSI_COMMON)
+ sec_name = "ANSI_COM";
+ else
+ {
+ sprintf (name_buf, "<section 0x%x>",
+ (unsigned int) psym->st_shndx);
+ sec_name = name_buf;
+ }
+ }
+ print_symbol (22, sec_name);
+ }
else if (strtab == NULL)
printf (_("<string table index %3ld>"), psym->st_name);
else
print_symbol (22, strtab + psym->st_name);
if (is_rela)
- printf (" + %lx", (unsigned long) relas [i].r_addend);
+ printf (" + %lx", (unsigned long) rels[i].r_addend);
}
}
else if (is_rela)
{
printf ("%*c", is_32bit_elf ? (do_wide ? 34 : 28) : (do_wide ? 26 : 20), ' ');
- print_vma (relas[i].r_addend, LONG_HEX);
+ print_vma (rels[i].r_addend, LONG_HEX);
}
if (elf_header.e_machine == EM_SPARCV9
@@ -1203,17 +1274,13 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
}
}
- if (is_rela)
- free (relas);
- else
- free (rels);
+ free (rels);
return 1;
}
static const char *
-get_mips_dynamic_type (type)
- unsigned long type;
+get_mips_dynamic_type (unsigned long type)
{
switch (type)
{
@@ -1266,8 +1333,7 @@ get_mips_dynamic_type (type)
}
static const char *
-get_sparc64_dynamic_type (type)
- unsigned long type;
+get_sparc64_dynamic_type (unsigned long type)
{
switch (type)
{
@@ -1278,8 +1344,7 @@ get_sparc64_dynamic_type (type)
}
static const char *
-get_ppc64_dynamic_type (type)
- unsigned long type;
+get_ppc64_dynamic_type (unsigned long type)
{
switch (type)
{
@@ -1292,8 +1357,7 @@ get_ppc64_dynamic_type (type)
}
static const char *
-get_parisc_dynamic_type (type)
- unsigned long type;
+get_parisc_dynamic_type (unsigned long type)
{
switch (type)
{
@@ -1316,10 +1380,20 @@ get_parisc_dynamic_type (type)
}
static const char *
-get_dynamic_type (type)
- unsigned long type;
+get_ia64_dynamic_type (unsigned long type)
{
- static char buff [32];
+ switch (type)
+ {
+ case DT_IA_64_PLT_RESERVE: return "IA_64_PLT_RESERVE";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
+get_dynamic_type (unsigned long type)
+{
+ static char buff[32];
switch (type)
{
@@ -1398,7 +1472,7 @@ get_dynamic_type (type)
default:
if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -1412,6 +1486,9 @@ get_dynamic_type (type)
case EM_PPC64:
result = get_ppc64_dynamic_type (type);
break;
+ case EM_IA_64:
+ result = get_ia64_dynamic_type (type);
+ break;
default:
result = NULL;
break;
@@ -1424,7 +1501,7 @@ get_dynamic_type (type)
}
else if ((type >= DT_LOOS) && (type <= DT_HIOS))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -1449,10 +1526,9 @@ get_dynamic_type (type)
}
static char *
-get_file_type (e_type)
- unsigned e_type;
+get_file_type (unsigned e_type)
{
- static char buff [32];
+ static char buff[32];
switch (e_type)
{
@@ -1474,10 +1550,9 @@ get_file_type (e_type)
}
static char *
-get_machine_name (e_machine)
- unsigned e_machine;
+get_machine_name (unsigned e_machine)
{
- static char buff [64]; /* XXX */
+ static char buff[64]; /* XXX */
switch (e_machine)
{
@@ -1502,17 +1577,17 @@ get_machine_name (e_machine)
case EM_V800: return "NEC V800";
case EM_FR20: return "Fujitsu FR20";
case EM_RH32: return "TRW RH32";
- case EM_MCORE: return "MCORE";
+ case EM_MCORE: return "MCORE";
case EM_ARM: return "ARM";
case EM_OLD_ALPHA: return "Digital Alpha (old)";
- case EM_SH: return "Hitachi SH";
+ case EM_SH: return "Renesas / SuperH SH";
case EM_SPARCV9: return "Sparc v9";
case EM_TRICORE: return "Siemens Tricore";
case EM_ARC: return "ARC";
- case EM_H8_300: return "Hitachi H8/300";
- case EM_H8_300H: return "Hitachi H8/300H";
- case EM_H8S: return "Hitachi H8S";
- case EM_H8_500: return "Hitachi H8/500";
+ case EM_H8_300: return "Renesas H8/300";
+ case EM_H8_300H: return "Renesas H8/300H";
+ case EM_H8S: return "Renesas H8S";
+ case EM_H8_500: return "Renesas H8/500";
case EM_IA_64: return "Intel IA-64";
case EM_MIPS_X: return "Stanford MIPS-X";
case EM_COLDFIRE: return "Motorola Coldfire";
@@ -1521,9 +1596,9 @@ get_machine_name (e_machine)
case EM_CYGNUS_D10V:
case EM_D10V: return "d10v";
case EM_CYGNUS_D30V:
- case EM_D30V: return "d30v";
+ case EM_D30V: return "d30v";
case EM_CYGNUS_M32R:
- case EM_M32R: return "Mitsubishi M32r";
+ case EM_M32R: return "Renesas M32R (formerly Mitsubishi M32r)";
case EM_CYGNUS_V850:
case EM_V850: return "NEC v850";
case EM_CYGNUS_MN10300:
@@ -1532,9 +1607,9 @@ get_machine_name (e_machine)
case EM_MN10200: return "mn10200";
case EM_CYGNUS_FR30:
case EM_FR30: return "Fujitsu FR30";
- case EM_CYGNUS_FRV: return "Fujitsu FR-V";
+ case EM_CYGNUS_FRV: return "Fujitsu FR-V";
case EM_PJ_OLD:
- case EM_PJ: return "picoJava";
+ case EM_PJ: return "picoJava";
case EM_MMA: return "Fujitsu Multimedia Accelerator";
case EM_PCP: return "Siemens PCP";
case EM_NCPU: return "Sony nCPU embedded RISC processor";
@@ -1554,21 +1629,26 @@ get_machine_name (e_machine)
case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller";
case EM_VAX: return "Digital VAX";
case EM_AVR_OLD:
- case EM_AVR: return "Atmel AVR 8-bit microcontroller";
+ case EM_AVR: return "Atmel AVR 8-bit microcontroller";
case EM_CRIS: return "Axis Communications 32-bit embedded processor";
case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu";
case EM_FIREPATH: return "Element 14 64-bit DSP processor";
case EM_ZSP: return "LSI Logic's 16-bit DSP processor";
- case EM_MMIX: return "Donald Knuth's educational 64-bit processor";
+ case EM_MMIX: return "Donald Knuth's educational 64-bit processor";
case EM_HUANY: return "Harvard Universitys's machine-independent object format";
- case EM_PRISM: return "SiTera Prism";
+ case EM_PRISM: return "Vitesse Prism";
case EM_X86_64: return "Advanced Micro Devices X86-64";
case EM_S390_OLD:
- case EM_S390: return "IBM S/390";
+ case EM_S390: return "IBM S/390";
case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
case EM_OPENRISC:
case EM_OR32: return "OpenRISC";
case EM_DLX: return "OpenDLX";
+ case EM_IP2K_OLD:
+ case EM_IP2K: return "Ubicom IP2xxx 8-bit microcontrollers";
+ case EM_IQ2000: return "Vitesse IQ2000";
+ case EM_XTENSA_OLD:
+ case EM_XTENSA: return "Tensilica Xtensa Processor";
default:
sprintf (buff, _("<unknown>: %x"), e_machine);
return buff;
@@ -1576,9 +1656,7 @@ get_machine_name (e_machine)
}
static void
-decode_ARM_machine_flags (e_flags, buf)
- unsigned e_flags;
- char buf[];
+decode_ARM_machine_flags (unsigned e_flags, char buf[])
{
unsigned eabi;
int unknown = 0;
@@ -1706,6 +1784,10 @@ decode_ARM_machine_flags (e_flags, buf)
strcat (buf, ", software FP");
break;
+ case EF_ARM_MAVERICK_FLOAT:
+ strcat (buf, ", Maverick FP");
+ break;
+
default:
unknown = 1;
break;
@@ -1718,11 +1800,9 @@ decode_ARM_machine_flags (e_flags, buf)
}
static char *
-get_machine_flags (e_flags, e_machine)
- unsigned e_flags;
- unsigned e_machine;
+get_machine_flags (unsigned e_flags, unsigned e_machine)
{
- static char buf [1024];
+ static char buf[1024];
buf[0] = '\0';
@@ -1759,12 +1839,12 @@ get_machine_flags (e_flags, e_machine)
case EM_CYGNUS_V850:
switch (e_flags & EF_V850_ARCH)
{
+ case E_V850E1_ARCH:
+ strcat (buf, ", v850e1");
+ break;
case E_V850E_ARCH:
strcat (buf, ", v850e");
break;
- case E_V850EA_ARCH:
- strcat (buf, ", v850ea");
- break;
case E_V850_ARCH:
strcat (buf, ", v850");
break;
@@ -1809,8 +1889,11 @@ get_machine_flags (e_flags, e_machine)
case E_MIPS_MACH_3900: strcat (buf, ", 3900"); break;
case E_MIPS_MACH_4010: strcat (buf, ", 4010"); break;
case E_MIPS_MACH_4100: strcat (buf, ", 4100"); break;
- case E_MIPS_MACH_4650: strcat (buf, ", 4650"); break;
case E_MIPS_MACH_4111: strcat (buf, ", 4111"); break;
+ case E_MIPS_MACH_4120: strcat (buf, ", 4120"); break;
+ case E_MIPS_MACH_4650: strcat (buf, ", 4650"); break;
+ case E_MIPS_MACH_5400: strcat (buf, ", 5400"); break;
+ case E_MIPS_MACH_5500: strcat (buf, ", 5500"); break;
case E_MIPS_MACH_SB1: strcat (buf, ", sb1"); break;
case 0:
/* We simply ignore the field in this case to avoid confusion:
@@ -1849,7 +1932,9 @@ get_machine_flags (e_flags, e_machine)
case E_MIPS_ARCH_4: strcat (buf, ", mips4"); break;
case E_MIPS_ARCH_5: strcat (buf, ", mips5"); break;
case E_MIPS_ARCH_32: strcat (buf, ", mips32"); break;
+ case E_MIPS_ARCH_32R2: strcat (buf, ", mips32r2"); break;
case E_MIPS_ARCH_64: strcat (buf, ", mips64"); break;
+ case E_MIPS_ARCH_64R2: strcat (buf, ", mips64r2"); break;
default: strcat (buf, ", unknown ISA"); break;
}
@@ -1949,8 +2034,37 @@ get_machine_flags (e_flags, e_machine)
}
static const char *
-get_mips_segment_type (type)
- unsigned long type;
+get_osabi_name (unsigned int osabi)
+{
+ static char buff[32];
+
+ switch (osabi)
+ {
+ case ELFOSABI_NONE: return "UNIX - System V";
+ case ELFOSABI_HPUX: return "UNIX - HP-UX";
+ case ELFOSABI_NETBSD: return "UNIX - NetBSD";
+ case ELFOSABI_LINUX: return "UNIX - Linux";
+ case ELFOSABI_HURD: return "GNU/Hurd";
+ case ELFOSABI_SOLARIS: return "UNIX - Solaris";
+ case ELFOSABI_AIX: return "UNIX - AIX";
+ case ELFOSABI_IRIX: return "UNIX - IRIX";
+ case ELFOSABI_FREEBSD: return "UNIX - FreeBSD";
+ case ELFOSABI_TRU64: return "UNIX - TRU64";
+ case ELFOSABI_MODESTO: return "Novell - Modesto";
+ case ELFOSABI_OPENBSD: return "UNIX - OpenBSD";
+ case ELFOSABI_OPENVMS: return "VMS - OpenVMS";
+ case ELFOSABI_NSK: return "HP - Non-Stop Kernel";
+ case ELFOSABI_AROS: return "Amiga Research OS";
+ case ELFOSABI_STANDALONE: return _("Standalone App");
+ case ELFOSABI_ARM: return "ARM";
+ default:
+ sprintf (buff, _("<unknown: %x>"), osabi);
+ return buff;
+ }
+}
+
+static const char *
+get_mips_segment_type (unsigned long type)
{
switch (type)
{
@@ -1968,8 +2082,7 @@ get_mips_segment_type (type)
}
static const char *
-get_parisc_segment_type (type)
- unsigned long type;
+get_parisc_segment_type (unsigned long type)
{
switch (type)
{
@@ -1995,8 +2108,7 @@ get_parisc_segment_type (type)
}
static const char *
-get_ia64_segment_type (type)
- unsigned long type;
+get_ia64_segment_type (unsigned long type)
{
switch (type)
{
@@ -2014,29 +2126,29 @@ get_ia64_segment_type (type)
}
static const char *
-get_segment_type (p_type)
- unsigned long p_type;
+get_segment_type (unsigned long p_type)
{
- static char buff [32];
+ static char buff[32];
switch (p_type)
{
- case PT_NULL: return "NULL";
- case PT_LOAD: return "LOAD";
+ case PT_NULL: return "NULL";
+ case PT_LOAD: return "LOAD";
case PT_DYNAMIC: return "DYNAMIC";
- case PT_INTERP: return "INTERP";
- case PT_NOTE: return "NOTE";
- case PT_SHLIB: return "SHLIB";
- case PT_PHDR: return "PHDR";
+ case PT_INTERP: return "INTERP";
+ case PT_NOTE: return "NOTE";
+ case PT_SHLIB: return "SHLIB";
+ case PT_PHDR: return "PHDR";
case PT_TLS: return "TLS";
case PT_GNU_EH_FRAME:
return "GNU_EH_FRAME";
+ case PT_GNU_STACK: return "STACK";
default:
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -2062,7 +2174,7 @@ get_segment_type (p_type)
}
else if ((p_type >= PT_LOOS) && (p_type <= PT_HIOS))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -2090,49 +2202,48 @@ get_segment_type (p_type)
}
static const char *
-get_mips_section_type_name (sh_type)
- unsigned int sh_type;
+get_mips_section_type_name (unsigned int sh_type)
{
switch (sh_type)
{
- case SHT_MIPS_LIBLIST: return "MIPS_LIBLIST";
- case SHT_MIPS_MSYM: return "MIPS_MSYM";
- case SHT_MIPS_CONFLICT: return "MIPS_CONFLICT";
- case SHT_MIPS_GPTAB: return "MIPS_GPTAB";
- case SHT_MIPS_UCODE: return "MIPS_UCODE";
- case SHT_MIPS_DEBUG: return "MIPS_DEBUG";
- case SHT_MIPS_REGINFO: return "MIPS_REGINFO";
- case SHT_MIPS_PACKAGE: return "MIPS_PACKAGE";
- case SHT_MIPS_PACKSYM: return "MIPS_PACKSYM";
- case SHT_MIPS_RELD: return "MIPS_RELD";
- case SHT_MIPS_IFACE: return "MIPS_IFACE";
- case SHT_MIPS_CONTENT: return "MIPS_CONTENT";
- case SHT_MIPS_OPTIONS: return "MIPS_OPTIONS";
- case SHT_MIPS_SHDR: return "MIPS_SHDR";
- case SHT_MIPS_FDESC: return "MIPS_FDESC";
- case SHT_MIPS_EXTSYM: return "MIPS_EXTSYM";
- case SHT_MIPS_DENSE: return "MIPS_DENSE";
- case SHT_MIPS_PDESC: return "MIPS_PDESC";
- case SHT_MIPS_LOCSYM: return "MIPS_LOCSYM";
- case SHT_MIPS_AUXSYM: return "MIPS_AUXSYM";
- case SHT_MIPS_OPTSYM: return "MIPS_OPTSYM";
- case SHT_MIPS_LOCSTR: return "MIPS_LOCSTR";
- case SHT_MIPS_LINE: return "MIPS_LINE";
- case SHT_MIPS_RFDESC: return "MIPS_RFDESC";
- case SHT_MIPS_DELTASYM: return "MIPS_DELTASYM";
- case SHT_MIPS_DELTAINST: return "MIPS_DELTAINST";
- case SHT_MIPS_DELTACLASS: return "MIPS_DELTACLASS";
- case SHT_MIPS_DWARF: return "MIPS_DWARF";
- case SHT_MIPS_DELTADECL: return "MIPS_DELTADECL";
- case SHT_MIPS_SYMBOL_LIB: return "MIPS_SYMBOL_LIB";
- case SHT_MIPS_EVENTS: return "MIPS_EVENTS";
- case SHT_MIPS_TRANSLATE: return "MIPS_TRANSLATE";
- case SHT_MIPS_PIXIE: return "MIPS_PIXIE";
- case SHT_MIPS_XLATE: return "MIPS_XLATE";
- case SHT_MIPS_XLATE_DEBUG: return "MIPS_XLATE_DEBUG";
- case SHT_MIPS_WHIRL: return "MIPS_WHIRL";
- case SHT_MIPS_EH_REGION: return "MIPS_EH_REGION";
- case SHT_MIPS_XLATE_OLD: return "MIPS_XLATE_OLD";
+ case SHT_MIPS_LIBLIST: return "MIPS_LIBLIST";
+ case SHT_MIPS_MSYM: return "MIPS_MSYM";
+ case SHT_MIPS_CONFLICT: return "MIPS_CONFLICT";
+ case SHT_MIPS_GPTAB: return "MIPS_GPTAB";
+ case SHT_MIPS_UCODE: return "MIPS_UCODE";
+ case SHT_MIPS_DEBUG: return "MIPS_DEBUG";
+ case SHT_MIPS_REGINFO: return "MIPS_REGINFO";
+ case SHT_MIPS_PACKAGE: return "MIPS_PACKAGE";
+ case SHT_MIPS_PACKSYM: return "MIPS_PACKSYM";
+ case SHT_MIPS_RELD: return "MIPS_RELD";
+ case SHT_MIPS_IFACE: return "MIPS_IFACE";
+ case SHT_MIPS_CONTENT: return "MIPS_CONTENT";
+ case SHT_MIPS_OPTIONS: return "MIPS_OPTIONS";
+ case SHT_MIPS_SHDR: return "MIPS_SHDR";
+ case SHT_MIPS_FDESC: return "MIPS_FDESC";
+ case SHT_MIPS_EXTSYM: return "MIPS_EXTSYM";
+ case SHT_MIPS_DENSE: return "MIPS_DENSE";
+ case SHT_MIPS_PDESC: return "MIPS_PDESC";
+ case SHT_MIPS_LOCSYM: return "MIPS_LOCSYM";
+ case SHT_MIPS_AUXSYM: return "MIPS_AUXSYM";
+ case SHT_MIPS_OPTSYM: return "MIPS_OPTSYM";
+ case SHT_MIPS_LOCSTR: return "MIPS_LOCSTR";
+ case SHT_MIPS_LINE: return "MIPS_LINE";
+ case SHT_MIPS_RFDESC: return "MIPS_RFDESC";
+ case SHT_MIPS_DELTASYM: return "MIPS_DELTASYM";
+ case SHT_MIPS_DELTAINST: return "MIPS_DELTAINST";
+ case SHT_MIPS_DELTACLASS: return "MIPS_DELTACLASS";
+ case SHT_MIPS_DWARF: return "MIPS_DWARF";
+ case SHT_MIPS_DELTADECL: return "MIPS_DELTADECL";
+ case SHT_MIPS_SYMBOL_LIB: return "MIPS_SYMBOL_LIB";
+ case SHT_MIPS_EVENTS: return "MIPS_EVENTS";
+ case SHT_MIPS_TRANSLATE: return "MIPS_TRANSLATE";
+ case SHT_MIPS_PIXIE: return "MIPS_PIXIE";
+ case SHT_MIPS_XLATE: return "MIPS_XLATE";
+ case SHT_MIPS_XLATE_DEBUG: return "MIPS_XLATE_DEBUG";
+ case SHT_MIPS_WHIRL: return "MIPS_WHIRL";
+ case SHT_MIPS_EH_REGION: return "MIPS_EH_REGION";
+ case SHT_MIPS_XLATE_OLD: return "MIPS_XLATE_OLD";
case SHT_MIPS_PDR_EXCEPTION: return "MIPS_PDR_EXCEPTION";
default:
break;
@@ -2141,8 +2252,7 @@ get_mips_section_type_name (sh_type)
}
static const char *
-get_parisc_section_type_name (sh_type)
- unsigned int sh_type;
+get_parisc_section_type_name (unsigned int sh_type)
{
switch (sh_type)
{
@@ -2156,13 +2266,17 @@ get_parisc_section_type_name (sh_type)
}
static const char *
-get_ia64_section_type_name (sh_type)
- unsigned int sh_type;
+get_ia64_section_type_name (unsigned int sh_type)
{
+ /* If the top 8 bits are 0x78 the next 8 are the os/abi ID. */
+ if ((sh_type & 0xFF000000) == SHT_IA_64_LOPSREG)
+ return get_osabi_name ((sh_type & 0x00FF0000) >> 16);
+
switch (sh_type)
{
- case SHT_IA_64_EXT: return "IA_64_EXT";
- case SHT_IA_64_UNWIND: return "IA_64_UNWIND";
+ case SHT_IA_64_EXT: return "IA_64_EXT";
+ case SHT_IA_64_UNWIND: return "IA_64_UNWIND";
+ case SHT_IA_64_PRIORITY_INIT: return "IA_64_PRIORITY_INIT";
default:
break;
}
@@ -2170,10 +2284,9 @@ get_ia64_section_type_name (sh_type)
}
static const char *
-get_section_type_name (sh_type)
- unsigned int sh_type;
+get_section_type_name (unsigned int sh_type)
{
- static char buff [32];
+ static char buff[32];
switch (sh_type)
{
@@ -2197,8 +2310,8 @@ get_section_type_name (sh_type)
case SHT_GNU_verdef: return "VERDEF";
case SHT_GNU_verneed: return "VERNEED";
case SHT_GNU_versym: return "VERSYM";
- case 0x6ffffff0: return "VERSYM";
- case 0x6ffffffc: return "VERDEF";
+ case 0x6ffffff0: return "VERSYM";
+ case 0x6ffffffc: return "VERDEF";
case 0x7ffffffd: return "AUXILIARY";
case 0x7fffffff: return "FILTER";
case SHT_GNU_LIBLIST: return "GNU_LIBLIST";
@@ -2206,7 +2319,7 @@ get_section_type_name (sh_type)
default:
if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -2243,39 +2356,39 @@ get_section_type_name (sh_type)
#define OPTION_DEBUG_DUMP 512
-struct option options [] =
+struct option options[] =
{
- {"all", no_argument, 0, 'a'},
+ {"all", no_argument, 0, 'a'},
{"file-header", no_argument, 0, 'h'},
{"program-headers", no_argument, 0, 'l'},
- {"headers", no_argument, 0, 'e'},
- {"histogram", no_argument, 0, 'I'},
- {"segments", no_argument, 0, 'l'},
- {"sections", no_argument, 0, 'S'},
+ {"headers", no_argument, 0, 'e'},
+ {"histogram", no_argument, 0, 'I'},
+ {"segments", no_argument, 0, 'l'},
+ {"sections", no_argument, 0, 'S'},
{"section-headers", no_argument, 0, 'S'},
- {"symbols", no_argument, 0, 's'},
- {"syms", no_argument, 0, 's'},
- {"relocs", no_argument, 0, 'r'},
- {"notes", no_argument, 0, 'n'},
- {"dynamic", no_argument, 0, 'd'},
+ {"symbols", no_argument, 0, 's'},
+ {"syms", no_argument, 0, 's'},
+ {"relocs", no_argument, 0, 'r'},
+ {"notes", no_argument, 0, 'n'},
+ {"dynamic", no_argument, 0, 'd'},
{"arch-specific", no_argument, 0, 'A'},
{"version-info", no_argument, 0, 'V'},
{"use-dynamic", no_argument, 0, 'D'},
- {"hex-dump", required_argument, 0, 'x'},
+ {"hex-dump", required_argument, 0, 'x'},
{"debug-dump", optional_argument, 0, OPTION_DEBUG_DUMP},
{"unwind", no_argument, 0, 'u'},
#ifdef SUPPORT_DISASSEMBLY
{"instruction-dump", required_argument, 0, 'i'},
#endif
- {"version", no_argument, 0, 'v'},
- {"wide", no_argument, 0, 'W'},
- {"help", no_argument, 0, 'H'},
- {0, no_argument, 0, 0}
+ {"version", no_argument, 0, 'v'},
+ {"wide", no_argument, 0, 'W'},
+ {"help", no_argument, 0, 'H'},
+ {0, no_argument, 0, 0}
};
static void
-usage ()
+usage (void)
{
fprintf (stdout, _("Usage: readelf <option(s)> elf-file(s)\n"));
fprintf (stdout, _(" Display information about the contents of ELF format files\n"));
@@ -2316,15 +2429,13 @@ usage ()
}
static void
-request_dump (section, type)
- unsigned int section;
- int type;
+request_dump (unsigned int section, int type)
{
if (section >= num_dump_sects)
{
- char * new_dump_sects;
+ char *new_dump_sects;
- new_dump_sects = (char *) calloc (section + 1, 1);
+ new_dump_sects = calloc (section + 1, 1);
if (new_dump_sects == NULL)
error (_("Out of memory allocating dump request table."));
@@ -2341,15 +2452,13 @@ request_dump (section, type)
}
if (dump_sects)
- dump_sects [section] |= type;
+ dump_sects[section] |= type;
return;
}
static void
-parse_args (argc, argv)
- int argc;
- char ** argv;
+parse_args (int argc, char **argv)
{
int c;
@@ -2357,10 +2466,10 @@ parse_args (argc, argv)
usage ();
while ((c = getopt_long
- (argc, argv, "ersuahnldSDAIw::x:i:vVW", options, NULL)) != EOF)
+ (argc, argv, "ersuahnldSDAIw::x:i:vVWH", options, NULL)) != EOF)
{
- char * cp;
- int section;
+ char *cp;
+ int section;
switch (c)
{
@@ -2372,67 +2481,67 @@ parse_args (argc, argv)
break;
case 'a':
- do_syms ++;
- do_reloc ++;
- do_unwind ++;
- do_dynamic ++;
- do_header ++;
- do_sections ++;
- do_segments ++;
- do_version ++;
- do_histogram ++;
- do_arch ++;
- do_notes ++;
+ do_syms++;
+ do_reloc++;
+ do_unwind++;
+ do_dynamic++;
+ do_header++;
+ do_sections++;
+ do_segments++;
+ do_version++;
+ do_histogram++;
+ do_arch++;
+ do_notes++;
break;
case 'e':
- do_header ++;
- do_sections ++;
- do_segments ++;
+ do_header++;
+ do_sections++;
+ do_segments++;
break;
case 'A':
- do_arch ++;
+ do_arch++;
break;
case 'D':
- do_using_dynamic ++;
+ do_using_dynamic++;
break;
case 'r':
- do_reloc ++;
+ do_reloc++;
break;
case 'u':
- do_unwind ++;
+ do_unwind++;
break;
case 'h':
- do_header ++;
+ do_header++;
break;
case 'l':
- do_segments ++;
+ do_segments++;
break;
case 's':
- do_syms ++;
+ do_syms++;
break;
case 'S':
- do_sections ++;
+ do_sections++;
break;
case 'd':
- do_dynamic ++;
+ do_dynamic++;
break;
case 'I':
- do_histogram ++;
+ do_histogram++;
break;
case 'n':
- do_notes ++;
+ do_notes++;
break;
case 'x':
- do_dump ++;
+ do_dump++;
section = strtoul (optarg, & cp, 0);
- if (! * cp && section >= 0)
+ if (! *cp && section >= 0)
{
request_dump (section, HEX_DUMP);
break;
}
goto oops;
case 'w':
- do_dump ++;
+ do_dump++;
if (optarg == 0)
do_debugging = 1;
else
@@ -2497,12 +2606,12 @@ parse_args (argc, argv)
}
break;
case OPTION_DEBUG_DUMP:
- do_dump ++;
+ do_dump++;
if (optarg == 0)
do_debugging = 1;
else
{
- const char *debug_dump_opt[]
+ static const char *debug_dump_opt[]
= { "line", "info", "abbrev", "pubnames", "ranges",
"macro", "frames", "frames-interp", "str", "loc", NULL };
unsigned int index;
@@ -2580,9 +2689,9 @@ parse_args (argc, argv)
break;
#ifdef SUPPORT_DISASSEMBLY
case 'i':
- do_dump ++;
+ do_dump++;
section = strtoul (optarg, & cp, 0);
- if (! * cp && section >= 0)
+ if (! *cp && section >= 0)
{
request_dump (section, DISASS_DUMP);
break;
@@ -2593,10 +2702,10 @@ parse_args (argc, argv)
print_version (program_name);
break;
case 'V':
- do_version ++;
+ do_version++;
break;
case 'W':
- do_wide ++;
+ do_wide++;
break;
default:
oops:
@@ -2620,10 +2729,9 @@ parse_args (argc, argv)
}
static const char *
-get_elf_class (elf_class)
- unsigned int elf_class;
+get_elf_class (unsigned int elf_class)
{
- static char buff [32];
+ static char buff[32];
switch (elf_class)
{
@@ -2637,10 +2745,9 @@ get_elf_class (elf_class)
}
static const char *
-get_data_encoding (encoding)
- unsigned int encoding;
+get_data_encoding (unsigned int encoding)
{
- static char buff [32];
+ static char buff[32];
switch (encoding)
{
@@ -2653,42 +2760,15 @@ get_data_encoding (encoding)
}
}
-static const char *
-get_osabi_name (osabi)
- unsigned int osabi;
-{
- static char buff [32];
-
- switch (osabi)
- {
- case ELFOSABI_NONE: return "UNIX - System V";
- case ELFOSABI_HPUX: return "UNIX - HP-UX";
- case ELFOSABI_NETBSD: return "UNIX - NetBSD";
- case ELFOSABI_LINUX: return "UNIX - Linux";
- case ELFOSABI_HURD: return "GNU/Hurd";
- case ELFOSABI_SOLARIS: return "UNIX - Solaris";
- case ELFOSABI_AIX: return "UNIX - AIX";
- case ELFOSABI_IRIX: return "UNIX - IRIX";
- case ELFOSABI_FREEBSD: return "UNIX - FreeBSD";
- case ELFOSABI_TRU64: return "UNIX - TRU64";
- case ELFOSABI_MODESTO: return "Novell - Modesto";
- case ELFOSABI_OPENBSD: return "UNIX - OpenBSD";
- case ELFOSABI_STANDALONE: return _("Standalone App");
- case ELFOSABI_ARM: return "ARM";
- default:
- sprintf (buff, _("<unknown: %x>"), osabi);
- return buff;
- }
-}
-
/* Decode the data held in 'elf_header'. */
+
static int
-process_file_header ()
+process_file_header (void)
{
- if ( elf_header.e_ident [EI_MAG0] != ELFMAG0
- || elf_header.e_ident [EI_MAG1] != ELFMAG1
- || elf_header.e_ident [EI_MAG2] != ELFMAG2
- || elf_header.e_ident [EI_MAG3] != ELFMAG3)
+ if ( elf_header.e_ident[EI_MAG0] != ELFMAG0
+ || elf_header.e_ident[EI_MAG1] != ELFMAG1
+ || elf_header.e_ident[EI_MAG2] != ELFMAG2
+ || elf_header.e_ident[EI_MAG3] != ELFMAG3)
{
error
(_("Not an ELF file - it has the wrong magic bytes at the start\n"));
@@ -2701,24 +2781,24 @@ process_file_header ()
printf (_("ELF Header:\n"));
printf (_(" Magic: "));
- for (i = 0; i < EI_NIDENT; i ++)
- printf ("%2.2x ", elf_header.e_ident [i]);
+ for (i = 0; i < EI_NIDENT; i++)
+ printf ("%2.2x ", elf_header.e_ident[i]);
printf ("\n");
printf (_(" Class: %s\n"),
- get_elf_class (elf_header.e_ident [EI_CLASS]));
+ get_elf_class (elf_header.e_ident[EI_CLASS]));
printf (_(" Data: %s\n"),
- get_data_encoding (elf_header.e_ident [EI_DATA]));
+ get_data_encoding (elf_header.e_ident[EI_DATA]));
printf (_(" Version: %d %s\n"),
- elf_header.e_ident [EI_VERSION],
- (elf_header.e_ident [EI_VERSION] == EV_CURRENT
+ elf_header.e_ident[EI_VERSION],
+ (elf_header.e_ident[EI_VERSION] == EV_CURRENT
? "(current)"
- : (elf_header.e_ident [EI_VERSION] != EV_NONE
+ : (elf_header.e_ident[EI_VERSION] != EV_NONE
? "<unknown: %lx>"
: "")));
printf (_(" OS/ABI: %s\n"),
- get_osabi_name (elf_header.e_ident [EI_OSABI]));
+ get_osabi_name (elf_header.e_ident[EI_OSABI]));
printf (_(" ABI Version: %d\n"),
- elf_header.e_ident [EI_ABIVERSION]);
+ elf_header.e_ident[EI_ABIVERSION]);
printf (_(" Type: %s\n"),
get_file_type (elf_header.e_type));
printf (_(" Machine: %s\n"),
@@ -2772,25 +2852,22 @@ process_file_header ()
static int
-get_32bit_program_headers (file, program_headers)
- FILE * file;
- Elf_Internal_Phdr * program_headers;
-{
- Elf32_External_Phdr * phdrs;
- Elf32_External_Phdr * external;
- Elf32_Internal_Phdr * internal;
- unsigned int i;
-
- phdrs = ((Elf32_External_Phdr *)
- get_data (NULL, file, elf_header.e_phoff,
- elf_header.e_phentsize * elf_header.e_phnum,
- _("program headers")));
+get_32bit_program_headers (FILE *file, Elf_Internal_Phdr *program_headers)
+{
+ Elf32_External_Phdr *phdrs;
+ Elf32_External_Phdr *external;
+ Elf_Internal_Phdr *internal;
+ unsigned int i;
+
+ phdrs = get_data (NULL, file, elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ _("program headers"));
if (!phdrs)
return 0;
for (i = 0, internal = program_headers, external = phdrs;
i < elf_header.e_phnum;
- i ++, internal ++, external ++)
+ i++, internal++, external++)
{
internal->p_type = BYTE_GET (external->p_type);
internal->p_offset = BYTE_GET (external->p_offset);
@@ -2808,25 +2885,22 @@ get_32bit_program_headers (file, program_headers)
}
static int
-get_64bit_program_headers (file, program_headers)
- FILE * file;
- Elf_Internal_Phdr * program_headers;
-{
- Elf64_External_Phdr * phdrs;
- Elf64_External_Phdr * external;
- Elf64_Internal_Phdr * internal;
- unsigned int i;
-
- phdrs = ((Elf64_External_Phdr *)
- get_data (NULL, file, elf_header.e_phoff,
- elf_header.e_phentsize * elf_header.e_phnum,
- _("program headers")));
+get_64bit_program_headers (FILE *file, Elf_Internal_Phdr *program_headers)
+{
+ Elf64_External_Phdr *phdrs;
+ Elf64_External_Phdr *external;
+ Elf_Internal_Phdr *internal;
+ unsigned int i;
+
+ phdrs = get_data (NULL, file, elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ _("program headers"));
if (!phdrs)
return 0;
for (i = 0, internal = program_headers, external = phdrs;
i < elf_header.e_phnum;
- i ++, internal ++, external ++)
+ i++, internal++, external++)
{
internal->p_type = BYTE_GET (external->p_type);
internal->p_flags = BYTE_GET (external->p_flags);
@@ -2843,19 +2917,50 @@ get_64bit_program_headers (file, program_headers)
return 1;
}
+/* Returns 1 if the program headers were read into `program_headers'. */
+
static int
-process_program_headers (file)
- FILE * file;
+get_program_headers (FILE *file)
{
- Elf_Internal_Phdr * program_headers;
- Elf_Internal_Phdr * segment;
- unsigned int i;
+ Elf_Internal_Phdr *phdrs;
+
+ /* Check cache of prior read. */
+ if (program_headers != NULL)
+ return 1;
+
+ phdrs = malloc (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
+
+ if (phdrs == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ if (is_32bit_elf
+ ? get_32bit_program_headers (file, phdrs)
+ : get_64bit_program_headers (file, phdrs))
+ {
+ program_headers = phdrs;
+ return 1;
+ }
+
+ free (phdrs);
+ return 0;
+}
+
+/* Returns 1 if the program headers were loaded. */
+
+static int
+process_program_headers (FILE *file)
+{
+ Elf_Internal_Phdr *segment;
+ unsigned int i;
if (elf_header.e_phnum == 0)
{
if (do_segments)
printf (_("\nThere are no program headers in this file.\n"));
- return 1;
+ return 0;
}
if (do_segments && !do_header)
@@ -2869,25 +2974,8 @@ process_program_headers (file)
printf ("\n");
}
- program_headers = (Elf_Internal_Phdr *) malloc
- (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
-
- if (program_headers == NULL)
- {
- error (_("Out of memory\n"));
- return 0;
- }
-
- if (is_32bit_elf)
- i = get_32bit_program_headers (file, program_headers);
- else
- i = get_64bit_program_headers (file, program_headers);
-
- if (i == 0)
- {
- free (program_headers);
+ if (! get_program_headers (file))
return 0;
- }
if (do_segments)
{
@@ -2911,13 +2999,12 @@ process_program_headers (file)
}
}
- loadaddr = -1;
dynamic_addr = 0;
dynamic_size = 0;
for (i = 0, segment = program_headers;
i < elf_header.e_phnum;
- i ++, segment ++)
+ i++, segment++)
{
if (do_segments)
{
@@ -2999,12 +3086,6 @@ process_program_headers (file)
switch (segment->p_type)
{
- case PT_LOAD:
- if (loadaddr == -1)
- loadaddr = (segment->p_vaddr & 0xfffff000)
- - (segment->p_offset & 0xfffff000);
- break;
-
case PT_DYNAMIC:
if (dynamic_addr)
error (_("more than one dynamic segment\n"));
@@ -3014,7 +3095,8 @@ process_program_headers (file)
break;
case PT_INTERP:
- if (fseek (file, (long) segment->p_offset, SEEK_SET))
+ if (fseek (file, archive_file_offset + (long) segment->p_offset,
+ SEEK_SET))
error (_("Unable to find program interpreter name\n"));
else
{
@@ -3032,12 +3114,6 @@ process_program_headers (file)
putc ('\n', stdout);
}
- if (loadaddr == -1)
- {
- /* Very strange. */
- loadaddr = 0;
- }
-
if (do_segments && section_headers != NULL)
{
printf (_("\n Section to Segment mapping:\n"));
@@ -3048,14 +3124,14 @@ process_program_headers (file)
for (i = 0; i < elf_header.e_phnum; i++)
{
unsigned int j;
- Elf_Internal_Shdr * section;
+ Elf_Internal_Shdr *section;
segment = program_headers + i;
section = section_headers;
printf (" %2.2d ", i);
- for (j = 1; j < elf_header.e_shnum; j++, section ++)
+ for (j = 1; j < elf_header.e_shnum; j++, section++)
{
if (section->sh_size > 0
/* Compare allocated sections by VMA, unallocated
@@ -3074,30 +3150,54 @@ process_program_headers (file)
}
}
- free (program_headers);
-
return 1;
}
+/* Find the file offset corresponding to VMA by using the program headers. */
+
+static long
+offset_from_vma (FILE *file, bfd_vma vma, bfd_size_type size)
+{
+ Elf_Internal_Phdr *seg;
+
+ if (! get_program_headers (file))
+ {
+ warn (_("Cannot interpret virtual addresses without program headers.\n"));
+ return (long) vma;
+ }
+
+ for (seg = program_headers;
+ seg < program_headers + elf_header.e_phnum;
+ ++seg)
+ {
+ if (seg->p_type != PT_LOAD)
+ continue;
+
+ if (vma >= (seg->p_vaddr & -seg->p_align)
+ && vma + size <= seg->p_vaddr + seg->p_filesz)
+ return vma - seg->p_vaddr + seg->p_offset;
+ }
+
+ warn (_("Virtual address 0x%lx not located in any PT_LOAD segment.\n"),
+ (long) vma);
+ return (long) vma;
+}
+
+
static int
-get_32bit_section_headers (file, num)
- FILE * file;
- unsigned int num;
-{
- Elf32_External_Shdr * shdrs;
- Elf32_Internal_Shdr * internal;
- unsigned int i;
-
- shdrs = ((Elf32_External_Shdr *)
- get_data (NULL, file, elf_header.e_shoff,
- elf_header.e_shentsize * num,
- _("section headers")));
+get_32bit_section_headers (FILE *file, unsigned int num)
+{
+ Elf32_External_Shdr *shdrs;
+ Elf_Internal_Shdr *internal;
+ unsigned int i;
+
+ shdrs = get_data (NULL, file, elf_header.e_shoff,
+ elf_header.e_shentsize * num, _("section headers"));
if (!shdrs)
return 0;
- section_headers = ((Elf_Internal_Shdr *)
- malloc (num * sizeof (Elf_Internal_Shdr)));
+ section_headers = malloc (num * sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
@@ -3107,7 +3207,7 @@ get_32bit_section_headers (file, num)
for (i = 0, internal = section_headers;
i < num;
- i ++, internal ++)
+ i++, internal++)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
internal->sh_type = BYTE_GET (shdrs[i].sh_type);
@@ -3127,23 +3227,18 @@ get_32bit_section_headers (file, num)
}
static int
-get_64bit_section_headers (file, num)
- FILE * file;
- unsigned int num;
-{
- Elf64_External_Shdr * shdrs;
- Elf64_Internal_Shdr * internal;
- unsigned int i;
-
- shdrs = ((Elf64_External_Shdr *)
- get_data (NULL, file, elf_header.e_shoff,
- elf_header.e_shentsize * num,
- _("section headers")));
+get_64bit_section_headers (FILE *file, unsigned int num)
+{
+ Elf64_External_Shdr *shdrs;
+ Elf_Internal_Shdr *internal;
+ unsigned int i;
+
+ shdrs = get_data (NULL, file, elf_header.e_shoff,
+ elf_header.e_shentsize * num, _("section headers"));
if (!shdrs)
return 0;
- section_headers = ((Elf_Internal_Shdr *)
- malloc (num * sizeof (Elf_Internal_Shdr)));
+ section_headers = malloc (num * sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
@@ -3153,7 +3248,7 @@ get_64bit_section_headers (file, num)
for (i = 0, internal = section_headers;
i < num;
- i ++, internal ++)
+ i++, internal++)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
internal->sh_type = BYTE_GET (shdrs[i].sh_type);
@@ -3173,20 +3268,17 @@ get_64bit_section_headers (file, num)
}
static Elf_Internal_Sym *
-get_32bit_elf_symbols (file, section)
- FILE * file;
- Elf_Internal_Shdr *section;
+get_32bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
{
unsigned long number;
- Elf32_External_Sym * esyms;
+ Elf32_External_Sym *esyms;
Elf_External_Sym_Shndx *shndx;
- Elf_Internal_Sym * isyms;
- Elf_Internal_Sym * psym;
- unsigned int j;
+ Elf_Internal_Sym *isyms;
+ Elf_Internal_Sym *psym;
+ unsigned int j;
- esyms = ((Elf32_External_Sym *)
- get_data (NULL, file, section->sh_offset,
- section->sh_size, _("symbols")));
+ esyms = get_data (NULL, file, section->sh_offset, section->sh_size,
+ _("symbols"));
if (!esyms)
return NULL;
@@ -3195,9 +3287,8 @@ get_32bit_elf_symbols (file, section)
&& (symtab_shndx_hdr->sh_link
== (unsigned long) SECTION_HEADER_NUM (section - section_headers)))
{
- shndx = ((Elf_External_Sym_Shndx *)
- get_data (NULL, file, symtab_shndx_hdr->sh_offset,
- symtab_shndx_hdr->sh_size, _("symtab shndx")));
+ shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset,
+ symtab_shndx_hdr->sh_size, _("symtab shndx"));
if (!shndx)
{
free (esyms);
@@ -3206,7 +3297,7 @@ get_32bit_elf_symbols (file, section)
}
number = section->sh_size / section->sh_entsize;
- isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
+ isyms = malloc (number * sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
@@ -3219,7 +3310,7 @@ get_32bit_elf_symbols (file, section)
for (j = 0, psym = isyms;
j < number;
- j ++, psym ++)
+ j++, psym++)
{
psym->st_name = BYTE_GET (esyms[j].st_name);
psym->st_value = BYTE_GET (esyms[j].st_value);
@@ -3240,20 +3331,17 @@ get_32bit_elf_symbols (file, section)
}
static Elf_Internal_Sym *
-get_64bit_elf_symbols (file, section)
- FILE * file;
- Elf_Internal_Shdr *section;
+get_64bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
{
unsigned long number;
- Elf64_External_Sym * esyms;
+ Elf64_External_Sym *esyms;
Elf_External_Sym_Shndx *shndx;
- Elf_Internal_Sym * isyms;
- Elf_Internal_Sym * psym;
- unsigned int j;
+ Elf_Internal_Sym *isyms;
+ Elf_Internal_Sym *psym;
+ unsigned int j;
- esyms = ((Elf64_External_Sym *)
- get_data (NULL, file, section->sh_offset,
- section->sh_size, _("symbols")));
+ esyms = get_data (NULL, file, section->sh_offset, section->sh_size,
+ _("symbols"));
if (!esyms)
return NULL;
@@ -3262,9 +3350,8 @@ get_64bit_elf_symbols (file, section)
&& (symtab_shndx_hdr->sh_link
== (unsigned long) SECTION_HEADER_NUM (section - section_headers)))
{
- shndx = ((Elf_External_Sym_Shndx *)
- get_data (NULL, file, symtab_shndx_hdr->sh_offset,
- symtab_shndx_hdr->sh_size, _("symtab shndx")));
+ shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset,
+ symtab_shndx_hdr->sh_size, _("symtab shndx"));
if (!shndx)
{
free (esyms);
@@ -3273,7 +3360,7 @@ get_64bit_elf_symbols (file, section)
}
number = section->sh_size / section->sh_entsize;
- isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
+ isyms = malloc (number * sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
@@ -3286,7 +3373,7 @@ get_64bit_elf_symbols (file, section)
for (j = 0, psym = isyms;
j < number;
- j ++, psym ++)
+ j++, psym++)
{
psym->st_name = BYTE_GET (esyms[j].st_name);
psym->st_info = BYTE_GET (esyms[j].st_info);
@@ -3307,12 +3394,11 @@ get_64bit_elf_symbols (file, section)
}
static const char *
-get_elf_section_flags (sh_flags)
- bfd_vma sh_flags;
+get_elf_section_flags (bfd_vma sh_flags)
{
- static char buff [32];
+ static char buff[32];
- * buff = 0;
+ *buff = 0;
while (sh_flags)
{
@@ -3323,15 +3409,15 @@ get_elf_section_flags (sh_flags)
switch (flag)
{
- case SHF_WRITE: strcat (buff, "W"); break;
- case SHF_ALLOC: strcat (buff, "A"); break;
- case SHF_EXECINSTR: strcat (buff, "X"); break;
- case SHF_MERGE: strcat (buff, "M"); break;
- case SHF_STRINGS: strcat (buff, "S"); break;
- case SHF_INFO_LINK: strcat (buff, "I"); break;
- case SHF_LINK_ORDER: strcat (buff, "L"); break;
+ case SHF_WRITE: strcat (buff, "W"); break;
+ case SHF_ALLOC: strcat (buff, "A"); break;
+ case SHF_EXECINSTR: strcat (buff, "X"); break;
+ case SHF_MERGE: strcat (buff, "M"); break;
+ case SHF_STRINGS: strcat (buff, "S"); break;
+ case SHF_INFO_LINK: strcat (buff, "I"); break;
+ case SHF_LINK_ORDER: strcat (buff, "L"); break;
case SHF_OS_NONCONFORMING: strcat (buff, "O"); break;
- case SHF_GROUP: strcat (buff, "G"); break;
+ case SHF_GROUP: strcat (buff, "G"); break;
case SHF_TLS: strcat (buff, "T"); break;
default:
@@ -3355,11 +3441,10 @@ get_elf_section_flags (sh_flags)
}
static int
-process_section_headers (file)
- FILE * file;
+process_section_headers (FILE *file)
{
- Elf_Internal_Shdr * section;
- unsigned int i;
+ Elf_Internal_Shdr *section;
+ unsigned int i;
section_headers = NULL;
@@ -3388,8 +3473,11 @@ process_section_headers (file)
if (section->sh_size != 0)
{
- string_table = (char *) get_data (NULL, file, section->sh_offset,
- section->sh_size, _("string table"));
+ string_table = get_data (NULL, file, section->sh_offset,
+ section->sh_size, _("string table"));
+
+ if (string_table == NULL)
+ return 0;
string_table_length = section->sh_size;
}
@@ -3399,12 +3487,13 @@ process_section_headers (file)
dynamic_symbols = NULL;
dynamic_strings = NULL;
dynamic_syminfo = NULL;
+ symtab_shndx_hdr = NULL;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i ++, section ++)
+ i++, section++)
{
- char * name = SECTION_NAME (section);
+ char *name = SECTION_NAME (section);
if (section->sh_type == SHT_DYNSYM)
{
@@ -3426,9 +3515,8 @@ process_section_headers (file)
continue;
}
- dynamic_strings = (char *) get_data (NULL, file, section->sh_offset,
- section->sh_size,
- _("dynamic strings"));
+ dynamic_strings = get_data (NULL, file, section->sh_offset,
+ section->sh_size, _("dynamic strings"));
}
else if (section->sh_type == SHT_SYMTAB_SHNDX)
{
@@ -3490,7 +3578,7 @@ process_section_headers (file)
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i ++, section ++)
+ i++, section++)
{
printf (" [%2u] %-17.17s %-15.15s ",
SECTION_HEADER_NUM (i),
@@ -3588,13 +3676,25 @@ process_section_headers (file)
return 1;
}
+struct
+{
+ const char *name;
+ int reloc;
+ int size;
+ int rela;
+} dynamic_relocations [] =
+{
+ { "REL", DT_REL, DT_RELSZ, FALSE },
+ { "RELA", DT_RELA, DT_RELASZ, TRUE },
+ { "PLT", DT_JMPREL, DT_PLTRELSZ, UNKNOWN }
+};
+
/* Process the reloc section. */
static int
-process_relocs (file)
- FILE * file;
+process_relocs (FILE *file)
{
- unsigned long rel_size;
- unsigned long rel_offset;
+ unsigned long rel_size;
+ unsigned long rel_offset;
if (!do_reloc)
@@ -3602,63 +3702,62 @@ process_relocs (file)
if (do_using_dynamic)
{
- int is_rela = FALSE;
+ int is_rela;
+ const char *name;
+ int has_dynamic_reloc;
+ unsigned int i;
- rel_size = 0;
- rel_offset = 0;
+ has_dynamic_reloc = 0;
- if (dynamic_info[DT_REL])
- {
- rel_offset = dynamic_info[DT_REL];
- rel_size = dynamic_info[DT_RELSZ];
- is_rela = FALSE;
- }
- else if (dynamic_info [DT_RELA])
- {
- rel_offset = dynamic_info[DT_RELA];
- rel_size = dynamic_info[DT_RELASZ];
- is_rela = TRUE;
- }
- else if (dynamic_info[DT_JMPREL])
+ for (i = 0; i < ARRAY_SIZE (dynamic_relocations); i++)
{
- rel_offset = dynamic_info[DT_JMPREL];
- rel_size = dynamic_info[DT_PLTRELSZ];
+ is_rela = dynamic_relocations [i].rela;
+ name = dynamic_relocations [i].name;
+ rel_size = dynamic_info [dynamic_relocations [i].size];
+ rel_offset = dynamic_info [dynamic_relocations [i].reloc];
- switch (dynamic_info[DT_PLTREL])
+ has_dynamic_reloc |= rel_size;
+
+ if (is_rela == UNKNOWN)
{
- case DT_REL:
- is_rela = FALSE;
- break;
- case DT_RELA:
- is_rela = TRUE;
- break;
- default:
- is_rela = UNKNOWN;
- break;
+ if (dynamic_relocations [i].reloc == DT_JMPREL)
+ switch (dynamic_info[DT_PLTREL])
+ {
+ case DT_REL:
+ is_rela = FALSE;
+ break;
+ case DT_RELA:
+ is_rela = TRUE;
+ break;
+ }
}
- }
-
- if (rel_size)
- {
- printf
- (_("\nRelocation section at offset 0x%lx contains %ld bytes:\n"),
- rel_offset, rel_size);
- dump_relocations (file, rel_offset - loadaddr, rel_size,
- dynamic_symbols, num_dynamic_syms, dynamic_strings, is_rela);
+ if (rel_size)
+ {
+ printf
+ (_("\n'%s' relocation section at offset 0x%lx contains %ld bytes:\n"),
+ name, rel_offset, rel_size);
+
+ dump_relocations (file,
+ offset_from_vma (file, rel_offset, rel_size),
+ rel_size,
+ dynamic_symbols, num_dynamic_syms,
+ dynamic_strings, is_rela);
+ }
}
- else
+
+ if (! has_dynamic_reloc)
printf (_("\nThere are no dynamic relocations in this file.\n"));
}
else
{
- Elf32_Internal_Shdr * section;
- unsigned long i;
- int found = 0;
+ Elf_Internal_Shdr *section;
+ unsigned long i;
+ int found = 0;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i++, section ++)
+ i++, section++)
{
if ( section->sh_type != SHT_RELA
&& section->sh_type != SHT_REL)
@@ -3669,11 +3768,11 @@ process_relocs (file)
if (rel_size)
{
- Elf32_Internal_Shdr * strsec;
- Elf_Internal_Sym * symtab;
- char * strtab;
- int is_rela;
- unsigned long nsyms;
+ Elf_Internal_Shdr *strsec;
+ Elf_Internal_Sym *symtab;
+ char *strtab;
+ int is_rela;
+ unsigned long nsyms;
printf (_("\nRelocation section "));
@@ -3690,7 +3789,7 @@ process_relocs (file)
nsyms = 0;
if (section->sh_link)
{
- Elf32_Internal_Shdr * symsec;
+ Elf_Internal_Shdr *symsec;
symsec = SECTION_HEADER (section->sh_link);
nsyms = symsec->sh_size / symsec->sh_entsize;
@@ -3701,9 +3800,8 @@ process_relocs (file)
strsec = SECTION_HEADER (symsec->sh_link);
- strtab = (char *) get_data (NULL, file, strsec->sh_offset,
- strsec->sh_size,
- _("string table"));
+ strtab = get_data (NULL, file, strsec->sh_offset,
+ strsec->sh_size, _("string table"));
}
is_rela = section->sh_type == SHT_RELA;
@@ -3742,37 +3840,29 @@ struct unw_aux_info
{
struct unw_table_entry
{
- struct absaddr start;
- struct absaddr end;
- struct absaddr info;
+ struct absaddr start;
+ struct absaddr end;
+ struct absaddr info;
}
- *table; /* Unwind table. */
- unsigned long table_len; /* Length of unwind table. */
- unsigned char * info; /* Unwind info. */
- unsigned long info_size; /* Size of unwind info. */
- bfd_vma info_addr; /* starting address of unwind info. */
- bfd_vma seg_base; /* Starting address of segment. */
- Elf_Internal_Sym * symtab; /* The symbol table. */
- unsigned long nsyms; /* Number of symbols. */
- char * strtab; /* The string table. */
- unsigned long strtab_size; /* Size of string table. */
+ *table; /* Unwind table. */
+ unsigned long table_len; /* Length of unwind table. */
+ unsigned char *info; /* Unwind info. */
+ unsigned long info_size; /* Size of unwind info. */
+ bfd_vma info_addr; /* starting address of unwind info. */
+ bfd_vma seg_base; /* Starting address of segment. */
+ Elf_Internal_Sym *symtab; /* The symbol table. */
+ unsigned long nsyms; /* Number of symbols. */
+ char *strtab; /* The string table. */
+ unsigned long strtab_size; /* Size of string table. */
};
-static void find_symbol_for_address PARAMS ((struct unw_aux_info *,
- struct absaddr, const char **,
- bfd_vma *));
-static void dump_ia64_unwind PARAMS ((struct unw_aux_info *));
-static int slurp_ia64_unwind_table PARAMS ((FILE *, struct unw_aux_info *,
- Elf32_Internal_Shdr *));
-
static void
-find_symbol_for_address (aux, addr, symname, offset)
- struct unw_aux_info *aux;
- struct absaddr addr;
- const char **symname;
- bfd_vma *offset;
+find_symbol_for_address (struct unw_aux_info *aux,
+ struct absaddr addr,
+ const char **symname,
+ bfd_vma *offset)
{
- bfd_vma dist = (bfd_vma) 0x100000;
+ bfd_vma dist = 0x100000;
Elf_Internal_Sym *sym, *best = NULL;
unsigned long i;
@@ -3802,11 +3892,10 @@ find_symbol_for_address (aux, addr, symname, offset)
}
static void
-dump_ia64_unwind (aux)
- struct unw_aux_info *aux;
+dump_ia64_unwind (struct unw_aux_info *aux)
{
bfd_vma addr_size;
- struct unw_table_entry * tp;
+ struct unw_table_entry *tp;
int in_body;
addr_size = is_32bit_elf ? 4 : 8;
@@ -3815,9 +3904,9 @@ dump_ia64_unwind (aux)
{
bfd_vma stamp;
bfd_vma offset;
- const unsigned char * dp;
- const unsigned char * head;
- const char * procname;
+ const unsigned char *dp;
+ const unsigned char *head;
+ const char *procname;
find_symbol_for_address (aux, tp->start, &procname, &offset);
@@ -3835,13 +3924,13 @@ dump_ia64_unwind (aux)
print_vma (tp->start.offset, PREFIX_HEX);
fputc ('-', stdout);
print_vma (tp->end.offset, PREFIX_HEX);
- printf ("), info at +0x%lx\n",
+ printf ("], info at +0x%lx\n",
(unsigned long) (tp->info.offset - aux->seg_base));
head = aux->info + (tp->info.offset - aux->info_addr);
stamp = BYTE_GET8 ((unsigned char *) head);
- printf (" v%u, flags=0x%lx (%s%s ), len=%lu bytes\n",
+ printf (" v%u, flags=0x%lx (%s%s), len=%lu bytes\n",
(unsigned) UNW_VER (stamp),
(unsigned long) ((stamp & UNW_FLAG_MASK) >> 32),
UNW_FLAG_EHANDLER (stamp) ? " ehandler" : "",
@@ -3861,20 +3950,18 @@ dump_ia64_unwind (aux)
}
static int
-slurp_ia64_unwind_table (file, aux, sec)
- FILE *file;
- struct unw_aux_info *aux;
- Elf32_Internal_Shdr *sec;
+slurp_ia64_unwind_table (FILE *file,
+ struct unw_aux_info *aux,
+ Elf_Internal_Shdr *sec)
{
unsigned long size, addr_size, nrelas, i;
- Elf_Internal_Phdr *prog_hdrs, *seg;
+ Elf_Internal_Phdr *seg;
struct unw_table_entry *tep;
- Elf32_Internal_Shdr *relsec;
+ Elf_Internal_Shdr *relsec;
Elf_Internal_Rela *rela, *rp;
unsigned char *table, *tp;
Elf_Internal_Sym *sym;
const char *relname;
- int result;
addr_size = is_32bit_elf ? 4 : 8;
@@ -3883,21 +3970,12 @@ slurp_ia64_unwind_table (file, aux, sec)
if (elf_header.e_phnum)
{
- prog_hdrs = (Elf_Internal_Phdr *)
- xmalloc (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
-
- if (is_32bit_elf)
- result = get_32bit_program_headers (file, prog_hdrs);
- else
- result = get_64bit_program_headers (file, prog_hdrs);
-
- if (!result)
- {
- free (prog_hdrs);
+ if (! get_program_headers (file))
return 0;
- }
- for (seg = prog_hdrs; seg < prog_hdrs + elf_header.e_phnum; ++seg)
+ for (seg = program_headers;
+ seg < program_headers + elf_header.e_phnum;
+ ++seg)
{
if (seg->p_type != PT_LOAD)
continue;
@@ -3909,19 +3987,16 @@ slurp_ia64_unwind_table (file, aux, sec)
break;
}
}
-
- free (prog_hdrs);
}
/* Second, build the unwind table from the contents of the unwind section: */
size = sec->sh_size;
- table = (char *) get_data (NULL, file, sec->sh_offset,
- size, _("unwind table"));
+ table = get_data (NULL, file, sec->sh_offset, size, _("unwind table"));
if (!table)
return 0;
tep = aux->table = xmalloc (size / (3 * addr_size) * sizeof (aux->table[0]));
- for (tp = table; tp < table + size; tp += 3 * addr_size, ++ tep)
+ for (tp = table; tp < table + size; tp += 3 * addr_size, ++tep)
{
tep->start.section = SHN_UNDEF;
tep->end.section = SHN_UNDEF;
@@ -4020,10 +4095,9 @@ slurp_ia64_unwind_table (file, aux, sec)
}
static int
-process_unwind (file)
- FILE * file;
+process_unwind (FILE *file)
{
- Elf32_Internal_Shdr *sec, *unwsec = NULL, *strsec;
+ Elf_Internal_Shdr *sec, *unwsec = NULL, *strsec;
unsigned long i, addr_size, unwcount = 0, unwstart = 0;
struct unw_aux_info aux;
@@ -4049,8 +4123,8 @@ process_unwind (file)
strsec = SECTION_HEADER (sec->sh_link);
aux.strtab_size = strsec->sh_size;
- aux.strtab = (char *) get_data (NULL, file, strsec->sh_offset,
- aux.strtab_size, _("string table"));
+ aux.strtab = get_data (NULL, file, strsec->sh_offset,
+ aux.strtab_size, _("string table"));
}
else if (sec->sh_type == SHT_IA_64_UNWIND)
unwcount++;
@@ -4119,8 +4193,8 @@ process_unwind (file)
{
aux.info_size = sec->sh_size;
aux.info_addr = sec->sh_addr;
- aux.info = (char *) get_data (NULL, file, sec->sh_offset,
- aux.info_size, _("unwind info"));
+ aux.info = get_data (NULL, file, sec->sh_offset, aux.info_size,
+ _("unwind info"));
printf (_("\nUnwind section "));
@@ -4156,8 +4230,7 @@ process_unwind (file)
}
static void
-dynamic_segment_mips_val (entry)
- Elf_Internal_Dyn * entry;
+dynamic_segment_mips_val (Elf_Internal_Dyn *entry)
{
switch (entry->d_tag)
{
@@ -4176,7 +4249,7 @@ dynamic_segment_mips_val (entry)
};
unsigned int cnt;
int first = 1;
- for (cnt = 0; cnt < NUM_ELEM (opts); ++ cnt)
+ for (cnt = 0; cnt < NUM_ELEM (opts); ++cnt)
if (entry->d_un.d_val & (1 << cnt))
{
printf ("%s%s", first ? "" : " ", opts[cnt]);
@@ -4197,7 +4270,7 @@ dynamic_segment_mips_val (entry)
case DT_MIPS_TIME_STAMP:
{
char timebuf[20];
- struct tm * tmp;
+ struct tm *tmp;
time_t time = entry->d_un.d_val;
tmp = gmtime (&time);
@@ -4231,8 +4304,7 @@ dynamic_segment_mips_val (entry)
static void
-dynamic_segment_parisc_val (entry)
- Elf_Internal_Dyn * entry;
+dynamic_segment_parisc_val (Elf_Internal_Dyn *entry)
{
switch (entry->d_tag)
{
@@ -4241,7 +4313,7 @@ dynamic_segment_parisc_val (entry)
static struct
{
long int bit;
- const char * str;
+ const char *str;
}
flags[] =
{
@@ -4284,18 +4356,37 @@ dynamic_segment_parisc_val (entry)
print_vma (entry->d_un.d_ptr, PREFIX_HEX);
break;
}
+ putchar ('\n');
+}
+
+static void
+dynamic_segment_ia64_val (Elf_Internal_Dyn *entry)
+{
+ switch (entry->d_tag)
+ {
+ case DT_IA_64_PLT_RESERVE:
+ /* First 3 slots reserved. */
+ print_vma (entry->d_un.d_ptr, PREFIX_HEX);
+ printf (" -- ");
+ print_vma (entry->d_un.d_ptr + (3 * 8), PREFIX_HEX);
+ break;
+
+ default:
+ print_vma (entry->d_un.d_ptr, PREFIX_HEX);
+ break;
+ }
+ putchar ('\n');
}
static int
-get_32bit_dynamic_segment (file)
- FILE * file;
+get_32bit_dynamic_segment (FILE *file)
{
- Elf32_External_Dyn * edyn;
- Elf_Internal_Dyn * entry;
- bfd_size_type i;
+ Elf32_External_Dyn *edyn;
+ Elf_Internal_Dyn *entry;
+ bfd_size_type i;
- edyn = (Elf32_External_Dyn *) get_data (NULL, file, dynamic_addr,
- dynamic_size, _("dynamic segment"));
+ edyn = get_data (NULL, file, dynamic_addr, dynamic_size,
+ _("dynamic segment"));
if (!edyn)
return 0;
@@ -4303,11 +4394,10 @@ get_32bit_dynamic_segment (file)
how large this .dynamic is now. We can do this even before the byte
swapping since the DT_NULL tag is recognizable. */
dynamic_size = 0;
- while (*(Elf32_Word *) edyn [dynamic_size++].d_tag != DT_NULL)
+ while (*(Elf32_Word *) edyn[dynamic_size++].d_tag != DT_NULL)
;
- dynamic_segment = (Elf_Internal_Dyn *)
- malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+ dynamic_segment = malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
if (dynamic_segment == NULL)
{
@@ -4318,10 +4408,10 @@ get_32bit_dynamic_segment (file)
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- i ++, entry ++)
+ i++, entry++)
{
- entry->d_tag = BYTE_GET (edyn [i].d_tag);
- entry->d_un.d_val = BYTE_GET (edyn [i].d_un.d_val);
+ entry->d_tag = BYTE_GET (edyn[i].d_tag);
+ entry->d_un.d_val = BYTE_GET (edyn[i].d_un.d_val);
}
free (edyn);
@@ -4330,15 +4420,14 @@ get_32bit_dynamic_segment (file)
}
static int
-get_64bit_dynamic_segment (file)
- FILE * file;
+get_64bit_dynamic_segment (FILE *file)
{
- Elf64_External_Dyn * edyn;
- Elf_Internal_Dyn * entry;
- bfd_size_type i;
+ Elf64_External_Dyn *edyn;
+ Elf_Internal_Dyn *entry;
+ bfd_size_type i;
- edyn = (Elf64_External_Dyn *) get_data (NULL, file, dynamic_addr,
- dynamic_size, _("dynamic segment"));
+ edyn = get_data (NULL, file, dynamic_addr, dynamic_size,
+ _("dynamic segment"));
if (!edyn)
return 0;
@@ -4346,11 +4435,10 @@ get_64bit_dynamic_segment (file)
how large this .dynamic is now. We can do this even before the byte
swapping since the DT_NULL tag is recognizable. */
dynamic_size = 0;
- while (*(bfd_vma *) edyn [dynamic_size ++].d_tag != DT_NULL)
+ while (*(bfd_vma *) edyn[dynamic_size++].d_tag != DT_NULL)
;
- dynamic_segment = (Elf_Internal_Dyn *)
- malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+ dynamic_segment = malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
if (dynamic_segment == NULL)
{
@@ -4361,10 +4449,10 @@ get_64bit_dynamic_segment (file)
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- i ++, entry ++)
+ i++, entry++)
{
- entry->d_tag = BYTE_GET8 (edyn [i].d_tag);
- entry->d_un.d_val = BYTE_GET8 (edyn [i].d_un.d_val);
+ entry->d_tag = BYTE_GET8 (edyn[i].d_tag);
+ entry->d_un.d_val = BYTE_GET8 (edyn[i].d_un.d_val);
}
free (edyn);
@@ -4373,10 +4461,9 @@ get_64bit_dynamic_segment (file)
}
static const char *
-get_dynamic_flags (flags)
- bfd_vma flags;
+get_dynamic_flags (bfd_vma flags)
{
- static char buff [128];
+ static char buff[128];
char *p = buff;
*p = '\0';
@@ -4392,12 +4479,12 @@ get_dynamic_flags (flags)
switch (flag)
{
- case DF_ORIGIN: strcpy (p, "ORIGIN"); break;
- case DF_SYMBOLIC: strcpy (p, "SYMBOLIC"); break;
- case DF_TEXTREL: strcpy (p, "TEXTREL"); break;
- case DF_BIND_NOW: strcpy (p, "BIND_NOW"); break;
- case DF_STATIC_TLS: strcpy (p, "STATIC_TLS"); break;
- default: strcpy (p, "unknown"); break;
+ case DF_ORIGIN: strcpy (p, "ORIGIN"); break;
+ case DF_SYMBOLIC: strcpy (p, "SYMBOLIC"); break;
+ case DF_TEXTREL: strcpy (p, "TEXTREL"); break;
+ case DF_BIND_NOW: strcpy (p, "BIND_NOW"); break;
+ case DF_STATIC_TLS: strcpy (p, "STATIC_TLS"); break;
+ default: strcpy (p, "unknown"); break;
}
p = strchr (p, '\0');
@@ -4407,11 +4494,10 @@ get_dynamic_flags (flags)
/* Parse and display the contents of the dynamic segment. */
static int
-process_dynamic_segment (file)
- FILE * file;
+process_dynamic_segment (FILE *file)
{
- Elf_Internal_Dyn * entry;
- bfd_size_type i;
+ Elf_Internal_Dyn *entry;
+ bfd_size_type i;
if (dynamic_size == 0)
{
@@ -4434,9 +4520,9 @@ process_dynamic_segment (file)
{
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- ++i, ++ entry)
+ ++i, ++entry)
{
- Elf32_Internal_Shdr section;
+ Elf_Internal_Shdr section;
if (entry->d_tag != DT_SYMTAB)
continue;
@@ -4447,12 +4533,18 @@ process_dynamic_segment (file)
we default to reading in the entire file (!) and
processing that. This is overkill, I know, but it
should work. */
- section.sh_offset = entry->d_un.d_val - loadaddr;
+ section.sh_offset = offset_from_vma (file, entry->d_un.d_val, 0);
- if (fseek (file, 0, SEEK_END))
- error (_("Unable to seek to end of file!"));
+ if (archive_file_offset != 0)
+ section.sh_size = archive_file_size - section.sh_offset;
+ else
+ {
+ if (fseek (file, 0, SEEK_END))
+ error (_("Unable to seek to end of file!"));
+
+ section.sh_size = ftell (file) - section.sh_offset;
+ }
- section.sh_size = ftell (file) - section.sh_offset;
if (is_32bit_elf)
section.sh_entsize = sizeof (Elf32_External_Sym);
else
@@ -4474,10 +4566,10 @@ process_dynamic_segment (file)
{
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- ++i, ++ entry)
+ ++i, ++entry)
{
unsigned long offset;
- long str_tab_len;
+ long str_tab_len;
if (entry->d_tag != DT_STRTAB)
continue;
@@ -4489,10 +4581,16 @@ process_dynamic_segment (file)
processing that. This is overkill, I know, but it
should work. */
- offset = entry->d_un.d_val - loadaddr;
- if (fseek (file, 0, SEEK_END))
- error (_("Unable to seek to end of file\n"));
- str_tab_len = ftell (file) - offset;
+ offset = offset_from_vma (file, entry->d_un.d_val, 0);
+
+ if (archive_file_offset != 0)
+ str_tab_len = archive_file_size - offset;
+ else
+ {
+ if (fseek (file, 0, SEEK_END))
+ error (_("Unable to seek to end of file\n"));
+ str_tab_len = ftell (file) - offset;
+ }
if (str_tab_len < 1)
{
@@ -4501,8 +4599,8 @@ process_dynamic_segment (file)
continue;
}
- dynamic_strings = (char *) get_data (NULL, file, offset, str_tab_len,
- _("dynamic string table"));
+ dynamic_strings = get_data (NULL, file, offset, str_tab_len,
+ _("dynamic string table"));
break;
}
}
@@ -4510,11 +4608,11 @@ process_dynamic_segment (file)
/* And find the syminfo section if available. */
if (dynamic_syminfo == NULL)
{
- unsigned int syminsz = 0;
+ unsigned long syminsz = 0;
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- ++i, ++ entry)
+ ++i, ++entry)
{
if (entry->d_tag == DT_SYMINENT)
{
@@ -4525,22 +4623,22 @@ process_dynamic_segment (file)
else if (entry->d_tag == DT_SYMINSZ)
syminsz = entry->d_un.d_val;
else if (entry->d_tag == DT_SYMINFO)
- dynamic_syminfo_offset = entry->d_un.d_val - loadaddr;
+ dynamic_syminfo_offset = offset_from_vma (file, entry->d_un.d_val,
+ syminsz);
}
if (dynamic_syminfo_offset != 0 && syminsz != 0)
{
- Elf_External_Syminfo * extsyminfo;
- Elf_Internal_Syminfo * syminfo;
+ Elf_External_Syminfo *extsyminfo;
+ Elf_Internal_Syminfo *syminfo;
/* There is a syminfo section. Read the data. */
- extsyminfo = ((Elf_External_Syminfo *)
- get_data (NULL, file, dynamic_syminfo_offset,
- syminsz, _("symbol information")));
+ extsyminfo = get_data (NULL, file, dynamic_syminfo_offset, syminsz,
+ _("symbol information"));
if (!extsyminfo)
return 0;
- dynamic_syminfo = (Elf_Internal_Syminfo *) malloc (syminsz);
+ dynamic_syminfo = malloc (syminsz);
if (dynamic_syminfo == NULL)
{
error (_("Out of memory\n"));
@@ -4560,18 +4658,18 @@ process_dynamic_segment (file)
}
if (do_dynamic && dynamic_addr)
- printf (_("\nDynamic segment at offset 0x%x contains %ld entries:\n"),
+ printf (_("\nDynamic segment at offset 0x%lx contains %ld entries:\n"),
dynamic_addr, (long) dynamic_size);
if (do_dynamic)
printf (_(" Tag Type Name/Value\n"));
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- i++, entry ++)
+ i++, entry++)
{
if (do_dynamic)
{
- const char * dtype;
+ const char *dtype;
putchar (' ');
print_vma (entry->d_tag, FULL_HEX);
@@ -4597,7 +4695,7 @@ process_dynamic_segment (file)
if (do_dynamic)
{
switch (entry->d_tag)
- {
+ {
case DT_AUXILIARY:
printf (_("Auxiliary library"));
break;
@@ -4606,7 +4704,7 @@ process_dynamic_segment (file)
printf (_("Filter library"));
break;
- case DT_CONFIG:
+ case DT_CONFIG:
printf (_("Configuration file"));
break;
@@ -4634,11 +4732,13 @@ process_dynamic_segment (file)
if (do_dynamic)
{
printf (_("Flags:"));
+
if (entry->d_un.d_val == 0)
printf (_(" None\n"));
else
{
unsigned long int val = entry->d_un.d_val;
+
if (val & DTF_1_PARINIT)
{
printf (" PARINIT");
@@ -4660,11 +4760,13 @@ process_dynamic_segment (file)
if (do_dynamic)
{
printf (_("Flags:"));
+
if (entry->d_un.d_val == 0)
printf (_(" None\n"));
else
{
unsigned long int val = entry->d_un.d_val;
+
if (val & DF_P1_LAZYLOAD)
{
printf (" LAZYLOAD");
@@ -4691,6 +4793,7 @@ process_dynamic_segment (file)
else
{
unsigned long int val = entry->d_un.d_val;
+
if (val & DF_1_NOW)
{
printf (" NOW");
@@ -4769,6 +4872,7 @@ process_dynamic_segment (file)
break;
case DT_PLTREL:
+ dynamic_info[entry->d_tag] = entry->d_un.d_val;
if (do_dynamic)
puts (get_dynamic_type (entry->d_un.d_val));
break;
@@ -4794,7 +4898,7 @@ process_dynamic_segment (file)
if (do_dynamic)
{
- char * name;
+ char *name;
if (dynamic_strings == NULL)
name = NULL;
@@ -4843,6 +4947,7 @@ process_dynamic_segment (file)
case DT_RELAENT :
case DT_SYMENT :
case DT_RELENT :
+ dynamic_info[entry->d_tag] = entry->d_un.d_val;
case DT_PLTPADSZ:
case DT_MOVEENT :
case DT_MOVESZ :
@@ -4878,11 +4983,11 @@ process_dynamic_segment (file)
{
if (dynamic_strings != NULL && entry->d_tag == DT_USED)
{
- char * name;
+ char *name;
name = dynamic_strings + entry->d_un.d_val;
- if (* name)
+ if (*name)
{
printf (_("Not needed object: [%s]\n"), name);
break;
@@ -4896,12 +5001,14 @@ process_dynamic_segment (file)
case DT_BIND_NOW:
/* The value of this entry is ignored. */
+ if (do_dynamic)
+ putchar ('\n');
break;
case DT_GNU_PRELINKED:
if (do_dynamic)
{
- struct tm * tmp;
+ struct tm *tmp;
time_t time = entry->d_un.d_val;
tmp = gmtime (&time);
@@ -4914,7 +5021,7 @@ process_dynamic_segment (file)
default:
if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
- version_info [DT_VERSIONTAGIDX (entry->d_tag)] =
+ version_info[DT_VERSIONTAGIDX (entry->d_tag)] =
entry->d_un.d_val;
if (do_dynamic)
@@ -4928,6 +5035,9 @@ process_dynamic_segment (file)
case EM_PARISC:
dynamic_segment_parisc_val (entry);
break;
+ case EM_IA_64:
+ dynamic_segment_ia64_val (entry);
+ break;
default:
print_vma (entry->d_un.d_val, PREFIX_HEX);
putchar ('\n');
@@ -4941,10 +5051,9 @@ process_dynamic_segment (file)
}
static char *
-get_ver_flags (flags)
- unsigned int flags;
+get_ver_flags (unsigned int flags)
{
- static char buff [32];
+ static char buff[32];
buff[0] = 0;
@@ -4970,27 +5079,26 @@ get_ver_flags (flags)
/* Display the contents of the version sections. */
static int
-process_version_sections (file)
- FILE * file;
+process_version_sections (FILE *file)
{
- Elf32_Internal_Shdr * section;
- unsigned i;
- int found = 0;
+ Elf_Internal_Shdr *section;
+ unsigned i;
+ int found = 0;
if (! do_version)
return 1;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i++, section ++)
+ i++, section++)
{
switch (section->sh_type)
{
case SHT_GNU_verdef:
{
- Elf_External_Verdef * edefs;
- unsigned int idx;
- unsigned int cnt;
+ Elf_External_Verdef *edefs;
+ unsigned int idx;
+ unsigned int cnt;
found = 1;
@@ -5004,22 +5112,20 @@ process_version_sections (file)
(unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (SECTION_HEADER (section->sh_link)));
- edefs = ((Elf_External_Verdef *)
- get_data (NULL, file, section->sh_offset,
- section->sh_size,
- _("version definition section")));
+ edefs = get_data (NULL, file, section->sh_offset, section->sh_size,
+ _("version definition section"));
if (!edefs)
break;
- for (idx = cnt = 0; cnt < section->sh_info; ++ cnt)
+ for (idx = cnt = 0; cnt < section->sh_info; ++cnt)
{
- char * vstart;
- Elf_External_Verdef * edef;
- Elf_Internal_Verdef ent;
- Elf_External_Verdaux * eaux;
- Elf_Internal_Verdaux aux;
- int j;
- int isum;
+ char *vstart;
+ Elf_External_Verdef *edef;
+ Elf_Internal_Verdef ent;
+ Elf_External_Verdaux *eaux;
+ Elf_Internal_Verdaux aux;
+ int j;
+ int isum;
vstart = ((char *) edefs) + idx;
@@ -5053,7 +5159,7 @@ process_version_sections (file)
isum = idx + ent.vd_aux;
- for (j = 1; j < ent.vd_cnt; j ++)
+ for (j = 1; j < ent.vd_cnt; j++)
{
isum += aux.vda_next;
vstart += aux.vda_next;
@@ -5080,9 +5186,9 @@ process_version_sections (file)
case SHT_GNU_verneed:
{
- Elf_External_Verneed * eneed;
- unsigned int idx;
- unsigned int cnt;
+ Elf_External_Verneed *eneed;
+ unsigned int idx;
+ unsigned int cnt;
found = 1;
@@ -5095,19 +5201,18 @@ process_version_sections (file)
(unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (SECTION_HEADER (section->sh_link)));
- eneed = ((Elf_External_Verneed *)
- get_data (NULL, file, section->sh_offset,
- section->sh_size, _("version need section")));
+ eneed = get_data (NULL, file, section->sh_offset, section->sh_size,
+ _("version need section"));
if (!eneed)
break;
for (idx = cnt = 0; cnt < section->sh_info; ++cnt)
{
- Elf_External_Verneed * entry;
- Elf_Internal_Verneed ent;
- int j;
- int isum;
- char * vstart;
+ Elf_External_Verneed *entry;
+ Elf_Internal_Verneed ent;
+ int j;
+ int isum;
+ char *vstart;
vstart = ((char *) eneed) + idx;
@@ -5132,8 +5237,8 @@ process_version_sections (file)
for (j = 0, isum = idx + ent.vn_aux; j < ent.vn_cnt; ++j)
{
- Elf_External_Vernaux * eaux;
- Elf_Internal_Vernaux aux;
+ Elf_External_Vernaux *eaux;
+ Elf_Internal_Vernaux aux;
eaux = (Elf_External_Vernaux *) vstart;
@@ -5144,10 +5249,10 @@ process_version_sections (file)
aux.vna_next = BYTE_GET (eaux->vna_next);
if (dynamic_strings)
- printf (_(" %#06x: Name: %s"),
+ printf (_(" %#06x: Name: %s"),
isum, dynamic_strings + aux.vna_name);
else
- printf (_(" %#06x: Name index: %lx"),
+ printf (_(" %#06x: Name index: %lx"),
isum, aux.vna_name);
printf (_(" Flags: %s Version: %d\n"),
@@ -5166,14 +5271,15 @@ process_version_sections (file)
case SHT_GNU_versym:
{
- Elf32_Internal_Shdr * link_section;
- int total;
- int cnt;
- unsigned char * edata;
- unsigned short * data;
- char * strtab;
- Elf_Internal_Sym * symbols;
- Elf32_Internal_Shdr * string_sec;
+ Elf_Internal_Shdr *link_section;
+ int total;
+ int cnt;
+ unsigned char *edata;
+ unsigned short *data;
+ char *strtab;
+ Elf_Internal_Sym *symbols;
+ Elf_Internal_Shdr *string_sec;
+ long off;
link_section = SECTION_HEADER (section->sh_link);
total = section->sh_size / section->sh_entsize;
@@ -5184,9 +5290,8 @@ process_version_sections (file)
string_sec = SECTION_HEADER (link_section->sh_link);
- strtab = (char *) get_data (NULL, file, string_sec->sh_offset,
- string_sec->sh_size,
- _("version string table"));
+ strtab = get_data (NULL, file, string_sec->sh_offset,
+ string_sec->sh_size, _("version string table"));
if (!strtab)
break;
@@ -5199,22 +5304,22 @@ process_version_sections (file)
(unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (link_section));
- edata =
- ((unsigned char *)
- get_data (NULL, file,
- version_info[DT_VERSIONTAGIDX (DT_VERSYM)] - loadaddr,
- total * sizeof (short), _("version symbol data")));
+ off = offset_from_vma (file,
+ version_info[DT_VERSIONTAGIDX (DT_VERSYM)],
+ total * sizeof (short));
+ edata = get_data (NULL, file, off, total * sizeof (short),
+ _("version symbol data"));
if (!edata)
{
free (strtab);
break;
}
- data = (unsigned short *) malloc (total * sizeof (short));
+ data = malloc (total * sizeof (short));
for (cnt = total; cnt --;)
- data [cnt] = byte_get (edata + cnt * sizeof (short),
- sizeof (short));
+ data[cnt] = byte_get (edata + cnt * sizeof (short),
+ sizeof (short));
free (edata);
@@ -5222,12 +5327,12 @@ process_version_sections (file)
{
int j, nn;
int check_def, check_need;
- char * name;
+ char *name;
printf (" %03x:", cnt);
for (j = 0; (j < 4) && (cnt + j) < total; ++j)
- switch (data [cnt + j])
+ switch (data[cnt + j])
{
case 0:
fputs (_(" 0 (*local*) "), stdout);
@@ -5238,35 +5343,36 @@ process_version_sections (file)
break;
default:
- nn = printf ("%4x%c", data [cnt + j] & 0x7fff,
- data [cnt + j] & 0x8000 ? 'h' : ' ');
+ nn = printf ("%4x%c", data[cnt + j] & 0x7fff,
+ data[cnt + j] & 0x8000 ? 'h' : ' ');
check_def = 1;
check_need = 1;
- if (SECTION_HEADER (symbols [cnt + j].st_shndx)->sh_type
+ if (SECTION_HEADER (symbols[cnt + j].st_shndx)->sh_type
!= SHT_NOBITS)
{
- if (symbols [cnt + j].st_shndx == SHN_UNDEF)
+ if (symbols[cnt + j].st_shndx == SHN_UNDEF)
check_def = 0;
else
check_need = 0;
}
if (check_need
- && version_info [DT_VERSIONTAGIDX (DT_VERNEED)])
+ && version_info[DT_VERSIONTAGIDX (DT_VERNEED)])
{
- Elf_Internal_Verneed ivn;
- unsigned long offset;
+ Elf_Internal_Verneed ivn;
+ unsigned long offset;
- offset = version_info [DT_VERSIONTAGIDX (DT_VERNEED)]
- - loadaddr;
+ offset = offset_from_vma
+ (file, version_info[DT_VERSIONTAGIDX (DT_VERNEED)],
+ sizeof (Elf_External_Verneed));
- do
+ do
{
- Elf_Internal_Vernaux ivna;
- Elf_External_Verneed evn;
- Elf_External_Vernaux evna;
- unsigned long a_off;
+ Elf_Internal_Vernaux ivna;
+ Elf_External_Verneed evn;
+ Elf_External_Vernaux evna;
+ unsigned long a_off;
get_data (&evn, file, offset, sizeof (evn),
_("version need"));
@@ -5286,10 +5392,10 @@ process_version_sections (file)
a_off += ivna.vna_next;
}
- while (ivna.vna_other != data [cnt + j]
+ while (ivna.vna_other != data[cnt + j]
&& ivna.vna_next != 0);
- if (ivna.vna_other == data [cnt + j])
+ if (ivna.vna_other == data[cnt + j])
{
ivna.vna_name = BYTE_GET (evna.vna_name);
@@ -5307,15 +5413,16 @@ process_version_sections (file)
while (ivn.vn_next);
}
- if (check_def && data [cnt + j] != 0x8001
- && version_info [DT_VERSIONTAGIDX (DT_VERDEF)])
+ if (check_def && data[cnt + j] != 0x8001
+ && version_info[DT_VERSIONTAGIDX (DT_VERDEF)])
{
- Elf_Internal_Verdef ivd;
- Elf_External_Verdef evd;
- unsigned long offset;
+ Elf_Internal_Verdef ivd;
+ Elf_External_Verdef evd;
+ unsigned long offset;
- offset = version_info
- [DT_VERSIONTAGIDX (DT_VERDEF)] - loadaddr;
+ offset = offset_from_vma
+ (file, version_info[DT_VERSIONTAGIDX (DT_VERDEF)],
+ sizeof evd);
do
{
@@ -5327,13 +5434,13 @@ process_version_sections (file)
offset += ivd.vd_next;
}
- while (ivd.vd_ndx != (data [cnt + j] & 0x7fff)
+ while (ivd.vd_ndx != (data[cnt + j] & 0x7fff)
&& ivd.vd_next != 0);
- if (ivd.vd_ndx == (data [cnt + j] & 0x7fff))
+ if (ivd.vd_ndx == (data[cnt + j] & 0x7fff))
{
- Elf_External_Verdaux evda;
- Elf_Internal_Verdaux ivda;
+ Elf_External_Verdaux evda;
+ Elf_Internal_Verdaux ivda;
ivd.vd_aux = BYTE_GET (evd.vd_aux);
@@ -5376,16 +5483,15 @@ process_version_sections (file)
}
static const char *
-get_symbol_binding (binding)
- unsigned int binding;
+get_symbol_binding (unsigned int binding)
{
- static char buff [32];
+ static char buff[32];
switch (binding)
{
- case STB_LOCAL: return "LOCAL";
- case STB_GLOBAL: return "GLOBAL";
- case STB_WEAK: return "WEAK";
+ case STB_LOCAL: return "LOCAL";
+ case STB_GLOBAL: return "GLOBAL";
+ case STB_WEAK: return "WEAK";
default:
if (binding >= STB_LOPROC && binding <= STB_HIPROC)
sprintf (buff, _("<processor specific>: %d"), binding);
@@ -5398,20 +5504,19 @@ get_symbol_binding (binding)
}
static const char *
-get_symbol_type (type)
- unsigned int type;
+get_symbol_type (unsigned int type)
{
- static char buff [32];
+ static char buff[32];
switch (type)
{
- case STT_NOTYPE: return "NOTYPE";
- case STT_OBJECT: return "OBJECT";
- case STT_FUNC: return "FUNC";
- case STT_SECTION: return "SECTION";
- case STT_FILE: return "FILE";
- case STT_COMMON: return "COMMON";
- case STT_TLS: return "TLS";
+ case STT_NOTYPE: return "NOTYPE";
+ case STT_OBJECT: return "OBJECT";
+ case STT_FUNC: return "FUNC";
+ case STT_SECTION: return "SECTION";
+ case STT_FILE: return "FILE";
+ case STT_COMMON: return "COMMON";
+ case STT_TLS: return "TLS";
default:
if (type >= STT_LOPROC && type <= STT_HIPROC)
{
@@ -5445,54 +5550,54 @@ get_symbol_type (type)
}
static const char *
-get_symbol_visibility (visibility)
- unsigned int visibility;
+get_symbol_visibility (unsigned int visibility)
{
switch (visibility)
{
- case STV_DEFAULT: return "DEFAULT";
- case STV_INTERNAL: return "INTERNAL";
- case STV_HIDDEN: return "HIDDEN";
+ case STV_DEFAULT: return "DEFAULT";
+ case STV_INTERNAL: return "INTERNAL";
+ case STV_HIDDEN: return "HIDDEN";
case STV_PROTECTED: return "PROTECTED";
default: abort ();
}
}
static const char *
-get_symbol_index_type (type)
- unsigned int type;
+get_symbol_index_type (unsigned int type)
{
+ static char buff[32];
+
switch (type)
{
- case SHN_UNDEF: return "UND";
- case SHN_ABS: return "ABS";
- case SHN_COMMON: return "COM";
+ case SHN_UNDEF: return "UND";
+ case SHN_ABS: return "ABS";
+ case SHN_COMMON: return "COM";
default:
- if (type >= SHN_LOPROC && type <= SHN_HIPROC)
- return "PRC";
+ if (type == SHN_IA_64_ANSI_COMMON
+ && elf_header.e_machine == EM_IA_64
+ && elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX)
+ return "ANSI_COM";
+ else if (type >= SHN_LOPROC && type <= SHN_HIPROC)
+ sprintf (buff, "PRC[0x%04x]", type);
else if (type >= SHN_LOOS && type <= SHN_HIOS)
- return "OS ";
+ sprintf (buff, "OS [0x%04x]", type);
else if (type >= SHN_LORESERVE && type <= SHN_HIRESERVE)
- return "RSV";
+ sprintf (buff, "RSV[0x%04x]", type);
else
- {
- static char buff [32];
-
- sprintf (buff, "%3d", type);
- return buff;
- }
+ sprintf (buff, "%3d", type);
+ break;
}
+
+ return buff;
}
static int *
-get_dynamic_data (file, number)
- FILE * file;
- unsigned int number;
+get_dynamic_data (FILE *file, unsigned int number)
{
- unsigned char * e_data;
- int * i_data;
+ unsigned char *e_data;
+ int *i_data;
- e_data = (unsigned char *) malloc (number * 4);
+ e_data = malloc (number * 4);
if (e_data == NULL)
{
@@ -5506,7 +5611,7 @@ get_dynamic_data (file, number)
return NULL;
}
- i_data = (int *) malloc (number * sizeof (* i_data));
+ i_data = malloc (number * sizeof (*i_data));
if (i_data == NULL)
{
@@ -5516,7 +5621,7 @@ get_dynamic_data (file, number)
}
while (number--)
- i_data [number] = byte_get (e_data + number * 4, 4);
+ i_data[number] = byte_get (e_data + number * 4, 4);
free (e_data);
@@ -5525,16 +5630,15 @@ get_dynamic_data (file, number)
/* Dump the symbol table. */
static int
-process_symbol_table (file)
- FILE * file;
+process_symbol_table (FILE *file)
{
- Elf32_Internal_Shdr * section;
- unsigned char nb [4];
- unsigned char nc [4];
- int nbuckets = 0;
- int nchains = 0;
- int * buckets = NULL;
- int * chains = NULL;
+ Elf_Internal_Shdr *section;
+ unsigned char nb[4];
+ unsigned char nc[4];
+ int nbuckets = 0;
+ int nchains = 0;
+ int *buckets = NULL;
+ int *chains = NULL;
if (! do_syms && !do_histogram)
return 1;
@@ -5542,7 +5646,11 @@ process_symbol_table (file)
if (dynamic_info[DT_HASH] && ((do_using_dynamic && dynamic_strings != NULL)
|| do_histogram))
{
- if (fseek (file, dynamic_info[DT_HASH] - loadaddr, SEEK_SET))
+ if (fseek (file,
+ (archive_file_offset
+ + offset_from_vma (file, dynamic_info[DT_HASH],
+ sizeof nb + sizeof nc)),
+ SEEK_SET))
{
error (_("Unable to seek to start of dynamic information"));
return 0;
@@ -5573,8 +5681,8 @@ process_symbol_table (file)
if (do_syms
&& dynamic_info[DT_HASH] && do_using_dynamic && dynamic_strings != NULL)
{
- int hn;
- int si;
+ int hn;
+ int si;
printf (_("\nSymbol table for image:\n"));
if (is_32bit_elf)
@@ -5584,12 +5692,12 @@ process_symbol_table (file)
for (hn = 0; hn < nbuckets; hn++)
{
- if (! buckets [hn])
+ if (! buckets[hn])
continue;
- for (si = buckets [hn]; si < nchains && si > 0; si = chains [si])
+ for (si = buckets[hn]; si < nchains && si > 0; si = chains[si])
{
- Elf_Internal_Sym * psym;
+ Elf_Internal_Sym *psym;
psym = dynamic_symbols + si;
@@ -5609,16 +5717,16 @@ process_symbol_table (file)
}
else if (do_syms && !do_using_dynamic)
{
- unsigned int i;
+ unsigned int i;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
i++, section++)
{
- unsigned int si;
- char * strtab;
- Elf_Internal_Sym * symtab;
- Elf_Internal_Sym * psym;
+ unsigned int si;
+ char *strtab;
+ Elf_Internal_Sym *symtab;
+ Elf_Internal_Sym *psym;
if ( section->sh_type != SHT_SYMTAB
@@ -5641,18 +5749,17 @@ process_symbol_table (file)
strtab = string_table;
else
{
- Elf32_Internal_Shdr * string_sec;
+ Elf_Internal_Shdr *string_sec;
string_sec = SECTION_HEADER (section->sh_link);
- strtab = (char *) get_data (NULL, file, string_sec->sh_offset,
- string_sec->sh_size,
- _("string table"));
+ strtab = get_data (NULL, file, string_sec->sh_offset,
+ string_sec->sh_size, _("string table"));
}
for (si = 0, psym = symtab;
si < section->sh_size / section->sh_entsize;
- si ++, psym ++)
+ si++, psym++)
{
printf ("%6d: ", si);
print_vma (psym->st_value, LONG_HEX);
@@ -5665,16 +5772,17 @@ process_symbol_table (file)
print_symbol (25, strtab + psym->st_name);
if (section->sh_type == SHT_DYNSYM &&
- version_info [DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
+ version_info[DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
{
- unsigned char data[2];
- unsigned short vers_data;
- unsigned long offset;
- int is_nobits;
- int check_def;
+ unsigned char data[2];
+ unsigned short vers_data;
+ unsigned long offset;
+ int is_nobits;
+ int check_def;
- offset = version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
- - loadaddr;
+ offset = offset_from_vma
+ (file, version_info[DT_VERSIONTAGIDX (DT_VERSYM)],
+ sizeof data + si * sizeof (vers_data));
get_data (&data, file, offset + si * sizeof (vers_data),
sizeof (data), _("version data"));
@@ -5688,20 +5796,21 @@ process_symbol_table (file)
if ((vers_data & 0x8000) || vers_data > 1)
{
- if (version_info [DT_VERSIONTAGIDX (DT_VERNEED)]
+ if (version_info[DT_VERSIONTAGIDX (DT_VERNEED)]
&& (is_nobits || ! check_def))
{
- Elf_External_Verneed evn;
- Elf_Internal_Verneed ivn;
- Elf_Internal_Vernaux ivna;
+ Elf_External_Verneed evn;
+ Elf_Internal_Verneed ivn;
+ Elf_Internal_Vernaux ivna;
/* We must test both. */
- offset = version_info
- [DT_VERSIONTAGIDX (DT_VERNEED)] - loadaddr;
+ offset = offset_from_vma
+ (file, version_info[DT_VERSIONTAGIDX (DT_VERNEED)],
+ sizeof evn);
do
{
- unsigned long vna_off;
+ unsigned long vna_off;
get_data (&evn, file, offset, sizeof (evn),
_("version need"));
@@ -5713,7 +5822,7 @@ process_symbol_table (file)
do
{
- Elf_External_Vernaux evna;
+ Elf_External_Vernaux evna;
get_data (&evna, file, vna_off,
sizeof (evna),
@@ -5750,26 +5859,27 @@ process_symbol_table (file)
if (check_def)
{
if (vers_data != 0x8001
- && version_info [DT_VERSIONTAGIDX (DT_VERDEF)])
+ && version_info[DT_VERSIONTAGIDX (DT_VERDEF)])
{
- Elf_Internal_Verdef ivd;
- Elf_Internal_Verdaux ivda;
- Elf_External_Verdaux evda;
- unsigned long offset;
+ Elf_Internal_Verdef ivd;
+ Elf_Internal_Verdaux ivda;
+ Elf_External_Verdaux evda;
+ unsigned long offset;
- offset =
- version_info [DT_VERSIONTAGIDX (DT_VERDEF)]
- - loadaddr;
+ offset = offset_from_vma
+ (file,
+ version_info[DT_VERSIONTAGIDX (DT_VERDEF)],
+ sizeof (Elf_External_Verdef));
do
{
- Elf_External_Verdef evd;
+ Elf_External_Verdef evd;
get_data (&evd, file, offset, sizeof (evd),
_("version def"));
- ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
- ivd.vd_aux = BYTE_GET (evd.vd_aux);
+ ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
+ ivd.vd_aux = BYTE_GET (evd.vd_aux);
ivd.vd_next = BYTE_GET (evd.vd_next);
offset += ivd.vd_next;
@@ -5808,19 +5918,19 @@ process_symbol_table (file)
if (do_histogram && buckets != NULL)
{
- int * lengths;
- int * counts;
- int hn;
- int si;
- int maxlength = 0;
- int nzero_counts = 0;
- int nsyms = 0;
+ int *lengths;
+ int *counts;
+ int hn;
+ int si;
+ int maxlength = 0;
+ int nzero_counts = 0;
+ int nsyms = 0;
printf (_("\nHistogram for bucket list length (total of %d buckets):\n"),
nbuckets);
printf (_(" Length Number %% of total Coverage\n"));
- lengths = (int *) calloc (nbuckets, sizeof (int));
+ lengths = calloc (nbuckets, sizeof (int));
if (lengths == NULL)
{
error (_("Out of memory"));
@@ -5828,18 +5938,18 @@ process_symbol_table (file)
}
for (hn = 0; hn < nbuckets; ++hn)
{
- if (! buckets [hn])
+ if (! buckets[hn])
continue;
for (si = buckets[hn]; si > 0 && si < nchains; si = chains[si])
{
- ++ nsyms;
+ ++nsyms;
if (maxlength < ++lengths[hn])
- ++ maxlength;
+ ++maxlength;
}
}
- counts = (int *) calloc (maxlength + 1, sizeof (int));
+ counts = calloc (maxlength + 1, sizeof (int));
if (counts == NULL)
{
error (_("Out of memory"));
@@ -5847,7 +5957,7 @@ process_symbol_table (file)
}
for (hn = 0; hn < nbuckets; ++hn)
- ++ counts [lengths [hn]];
+ ++counts[lengths[hn]];
if (nbuckets > 0)
{
@@ -5876,8 +5986,7 @@ process_symbol_table (file)
}
static int
-process_syminfo (file)
- FILE * file ATTRIBUTE_UNUSED;
+process_syminfo (FILE *file ATTRIBUTE_UNUSED)
{
unsigned int i;
@@ -5915,9 +6024,10 @@ process_syminfo (file)
if (dynamic_syminfo[i].si_boundto > 0
&& dynamic_syminfo[i].si_boundto < dynamic_size)
{
- print_symbol (10, dynamic_strings
- + dynamic_segment
- [dynamic_syminfo[i].si_boundto].d_un.d_val);
+ print_symbol (10,
+ dynamic_strings
+ + (dynamic_segment
+ [dynamic_syminfo[i].si_boundto].d_un.d_val));
putchar (' ' );
}
else
@@ -5942,9 +6052,7 @@ process_syminfo (file)
#ifdef SUPPORT_DISASSEMBLY
static void
-disassemble_section (section, file)
- Elf32_Internal_Shdr * section;
- FILE * file;
+disassemble_section (Elf_Internal_Shdr *section, FILE *file)
{
printf (_("\nAssembly dump of section %s\n"),
SECTION_NAME (section));
@@ -5956,18 +6064,16 @@ disassemble_section (section, file)
#endif
static int
-dump_section (section, file)
- Elf32_Internal_Shdr * section;
- FILE * file;
+dump_section (Elf_Internal_Shdr *section, FILE *file)
{
- bfd_size_type bytes;
- bfd_vma addr;
- unsigned char * data;
- unsigned char * start;
+ bfd_size_type bytes;
+ bfd_vma addr;
+ unsigned char *data;
+ unsigned char *start;
bytes = section->sh_size;
- if (bytes == 0)
+ if (bytes == 0 || section->sh_type == SHT_NOBITS)
{
printf (_("\nSection '%s' has no data to dump.\n"),
SECTION_NAME (section));
@@ -5978,8 +6084,7 @@ dump_section (section, file)
addr = section->sh_addr;
- start = (unsigned char *) get_data (NULL, file, section->sh_offset, bytes,
- _("section data"));
+ start = get_data (NULL, file, section->sh_offset, bytes, _("section data"));
if (!start)
return 0;
@@ -5995,14 +6100,14 @@ dump_section (section, file)
printf (" 0x%8.8lx ", (unsigned long) addr);
- switch (elf_header.e_ident [EI_DATA])
+ switch (elf_header.e_ident[EI_DATA])
{
default:
case ELFDATA2LSB:
for (j = 15; j >= 0; j --)
{
if (j < lbytes)
- printf ("%2.2x", data [j]);
+ printf ("%2.2x", data[j]);
else
printf (" ");
@@ -6015,7 +6120,7 @@ dump_section (section, file)
for (j = 0; j < 16; j++)
{
if (j < lbytes)
- printf ("%2.2x", data [j]);
+ printf ("%2.2x", data[j]);
else
printf (" ");
@@ -6027,8 +6132,8 @@ dump_section (section, file)
for (j = 0; j < lbytes; j++)
{
- k = data [j];
- if (k >= ' ' && k < 0x80)
+ k = data[j];
+ if (k >= ' ' && k < 0x7f)
printf ("%c", k);
else
printf (".");
@@ -6048,20 +6153,17 @@ dump_section (section, file)
static unsigned long int
-read_leb128 (data, length_return, sign)
- unsigned char * data;
- int * length_return;
- int sign;
+read_leb128 (unsigned char *data, int *length_return, int sign)
{
unsigned long int result = 0;
- unsigned int num_read = 0;
- int shift = 0;
- unsigned char byte;
+ unsigned int num_read = 0;
+ int shift = 0;
+ unsigned char byte;
do
{
- byte = * data ++;
- num_read ++;
+ byte = *data++;
+ num_read++;
result |= (byte & 0x7f) << shift;
@@ -6071,7 +6173,7 @@ read_leb128 (data, length_return, sign)
while (byte & 0x80);
if (length_return != NULL)
- * length_return = num_read;
+ *length_return = num_read;
if (sign && (shift < 32) && (byte & 0x40))
result |= -1 << shift;
@@ -6081,23 +6183,22 @@ read_leb128 (data, length_return, sign)
typedef struct State_Machine_Registers
{
- unsigned long address;
- unsigned int file;
- unsigned int line;
- unsigned int column;
- int is_stmt;
- int basic_block;
- int end_sequence;
+ unsigned long address;
+ unsigned int file;
+ unsigned int line;
+ unsigned int column;
+ int is_stmt;
+ int basic_block;
+ int end_sequence;
/* This variable hold the number of the last entry seen
in the File Table. */
- unsigned int last_file_entry;
+ unsigned int last_file_entry;
} SMR;
static SMR state_machine_regs;
static void
-reset_state_machine (is_stmt)
- int is_stmt;
+reset_state_machine (int is_stmt)
{
state_machine_regs.address = 0;
state_machine_regs.file = 1;
@@ -6112,16 +6213,13 @@ reset_state_machine (is_stmt)
/* Handled an extend line op. Returns true if this is the end
of sequence. */
static int
-process_extended_line_op (data, is_stmt, pointer_size)
- unsigned char * data;
- int is_stmt;
- int pointer_size;
+process_extended_line_op (unsigned char *data, int is_stmt, int pointer_size)
{
- unsigned char op_code;
- int bytes_read;
- unsigned int len;
- unsigned char * name;
- unsigned long adr;
+ unsigned char op_code;
+ int bytes_read;
+ unsigned int len;
+ unsigned char *name;
+ unsigned long adr;
len = read_leb128 (data, & bytes_read, 0);
data += bytes_read;
@@ -6133,7 +6231,7 @@ process_extended_line_op (data, is_stmt, pointer_size)
}
len += bytes_read;
- op_code = * data ++;
+ op_code = *data++;
printf (_(" Extended opcode %d: "), op_code);
@@ -6154,7 +6252,7 @@ process_extended_line_op (data, is_stmt, pointer_size)
printf (_(" define new File Table entry\n"));
printf (_(" Entry\tDir\tTime\tSize\tName\n"));
- printf (_(" %d\t"), ++ state_machine_regs.last_file_entry);
+ printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
name = data;
data += strlen ((char *) data) + 1;
printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
@@ -6173,42 +6271,180 @@ process_extended_line_op (data, is_stmt, pointer_size)
return len;
}
+/* Finds section NAME inside FILE and returns a
+ pointer to it, or NULL upon failure. */
+
+static Elf_Internal_Shdr *
+find_section (const char * name)
+{
+ Elf_Internal_Shdr *sec;
+ unsigned int i;
+
+ for (i = elf_header.e_shnum, sec = section_headers + i - 1;
+ i; --i, --sec)
+ if (strcmp (SECTION_NAME (sec), name) == 0)
+ break;
+
+ if (i && sec && sec->sh_size != 0)
+ return sec;
+
+ return NULL;
+}
+
/* Size of pointers in the .debug_line section. This information is not
really present in that section. It's obtained before dumping the debug
sections by doing some pre-scan of the .debug_info section. */
-static int debug_line_pointer_size = 4;
+static unsigned int * debug_line_pointer_sizes = NULL;
+static unsigned int num_debug_line_pointer_sizes = 0;
+
+/* Locate and scan the .debug_info section in the file and record the pointer
+ sizes for the compilation units in it. Usually an executable will have
+ just one pointer size, but this is not guaranteed, and so we try not to
+ make any assumptions. Returns zero upon failure, or the number of
+ compilation units upon success. */
+
+static unsigned int
+get_debug_line_pointer_sizes (FILE * file)
+{
+ Elf_Internal_Shdr * section;
+ unsigned char * start;
+ unsigned char * end;
+ unsigned char * begin;
+ unsigned long length;
+ unsigned int num_units;
+ unsigned int unit;
+
+ section = find_section (".debug_info");
+ if (section == NULL)
+ return 0;
+
+ length = section->sh_size;
+ start = get_data (NULL, file, section->sh_offset, section->sh_size,
+ _("extracting pointer sizes from .debug_info section"));
+ if (start == NULL)
+ return 0;
+
+ end = start + section->sh_size;
+ /* First scan the section to get the number of comp units. */
+ for (begin = start, num_units = 0; begin < end; num_units++)
+ {
+ /* Read the first 4 bytes. For a 32-bit DWARF section, this will
+ be the length. For a 64-bit DWARF section, it'll be the escape
+ code 0xffffffff followed by an 8 byte length. */
+ length = byte_get (begin, 4);
+
+ if (length == 0xffffffff)
+ {
+ length = byte_get (begin + 4, 8);
+ begin += length + 12;
+ }
+ else
+ begin += length + 4;
+ }
+
+ if (num_units == 0)
+ {
+ error (_("No comp units in .debug_info section ?"));
+ free (start);
+ return 0;
+ }
+
+ /* Then allocate an array to hold the pointer sizes. */
+ debug_line_pointer_sizes = malloc (num_units * sizeof * debug_line_pointer_sizes);
+ if (debug_line_pointer_sizes == NULL)
+ {
+ error (_("Not enough memory for a pointer size array of %u entries"),
+ num_units);
+ free (start);
+ return 0;
+ }
+
+ /* Populate the array. */
+ for (begin = start, unit = 0; begin < end; unit++)
+ {
+ length = byte_get (begin, 4);
+ if (length == 0xffffffff)
+ {
+ /* For 64-bit DWARF, the 1-byte address_size field is 22 bytes
+ from the start of the section. This is computed as follows:
+
+ unit_length: 12 bytes
+ version: 2 bytes
+ debug_abbrev_offset: 8 bytes
+ -----------------------------
+ Total: 22 bytes */
+
+ debug_line_pointer_sizes [unit] = byte_get (begin + 22, 1);
+ length = byte_get (begin + 4, 8);
+ begin += length + 12;
+ }
+ else
+ {
+ /* For 32-bit DWARF, the 1-byte address_size field is 10 bytes from
+ the start of the section:
+
+ unit_length: 4 bytes
+ version: 2 bytes
+ debug_abbrev_offset: 4 bytes
+ -----------------------------
+ Total: 10 bytes */
+
+ debug_line_pointer_sizes [unit] = byte_get (begin + 10, 1);
+ begin += length + 4;
+ }
+ }
+
+ free (start);
+ num_debug_line_pointer_sizes = num_units;
+ return num_units;
+}
static int
-display_debug_lines (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
-{
- DWARF2_External_LineInfo * external;
- DWARF2_Internal_LineInfo info;
- unsigned char * standard_opcodes;
- unsigned char * data = start;
- unsigned char * end = start + section->sh_size;
- unsigned char * end_of_sequence;
- int i;
+display_debug_lines (Elf_Internal_Shdr *section,
+ unsigned char *start, FILE *file)
+{
+ unsigned char *hdrptr;
+ DWARF2_Internal_LineInfo info;
+ unsigned char *standard_opcodes;
+ unsigned char *data = start;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *end_of_sequence;
+ int i;
+ int offset_size;
+ int initial_length_size;
+ unsigned int comp_unit = 0;
printf (_("\nDump of debug contents of section %s:\n\n"),
SECTION_NAME (section));
+ if (num_debug_line_pointer_sizes == 0)
+ get_debug_line_pointer_sizes (file);
+
while (data < end)
{
- external = (DWARF2_External_LineInfo *) data;
+ unsigned int pointer_size;
+
+ hdrptr = data;
/* Check the length of the block. */
- info.li_length = BYTE_GET (external->li_length);
+ info.li_length = byte_get (hdrptr, 4);
+ hdrptr += 4;
if (info.li_length == 0xffffffff)
{
- warn (_("64-bit DWARF line info is not supported yet.\n"));
- break;
+ /* This section is 64-bit DWARF 3. */
+ info.li_length = byte_get (hdrptr, 8);
+ hdrptr += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
}
- if (info.li_length + sizeof (external->li_length) > section->sh_size)
+ if (info.li_length + initial_length_size > section->sh_size)
{
warn
(_("The line info appears to be corrupt - the section is too small\n"));
@@ -6216,24 +6452,44 @@ display_debug_lines (section, start, file)
}
/* Check its version number. */
- info.li_version = BYTE_GET (external->li_version);
- if (info.li_version != 2)
+ info.li_version = byte_get (hdrptr, 2);
+ hdrptr += 2;
+ if (info.li_version != 2 && info.li_version != 3)
{
- warn (_("Only DWARF version 2 line info is currently supported.\n"));
+ warn (_("Only DWARF version 2 and 3 line info is currently supported.\n"));
return 0;
}
- info.li_prologue_length = BYTE_GET (external->li_prologue_length);
- info.li_min_insn_length = BYTE_GET (external->li_min_insn_length);
- info.li_default_is_stmt = BYTE_GET (external->li_default_is_stmt);
- info.li_line_base = BYTE_GET (external->li_line_base);
- info.li_line_range = BYTE_GET (external->li_line_range);
- info.li_opcode_base = BYTE_GET (external->li_opcode_base);
+ info.li_prologue_length = byte_get (hdrptr, offset_size);
+ hdrptr += offset_size;
+ info.li_min_insn_length = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_default_is_stmt = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_line_base = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_line_range = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_opcode_base = byte_get (hdrptr, 1);
+ hdrptr++;
/* Sign extend the line base field. */
info.li_line_base <<= 24;
info.li_line_base >>= 24;
+ /* Get the pointer size from the comp unit associated
+ with this block of line number information. */
+ if (comp_unit >= num_debug_line_pointer_sizes)
+ {
+ error (_("Not enough comp units for .debug_lines section\n"));
+ return 0;
+ }
+ else
+ {
+ pointer_size = debug_line_pointer_sizes [comp_unit];
+ comp_unit ++;
+ }
+
printf (_(" Length: %ld\n"), info.li_length);
printf (_(" DWARF Version: %d\n"), info.li_version);
printf (_(" Prologue Length: %d\n"), info.li_prologue_length);
@@ -6242,13 +6498,14 @@ display_debug_lines (section, start, file)
printf (_(" Line Base: %d\n"), info.li_line_base);
printf (_(" Line Range: %d\n"), info.li_line_range);
printf (_(" Opcode Base: %d\n"), info.li_opcode_base);
+ printf (_(" (Pointer size: %u)\n"), pointer_size);
- end_of_sequence = data + info.li_length + sizeof (external->li_length);
+ end_of_sequence = data + info.li_length + initial_length_size;
reset_state_machine (info.li_default_is_stmt);
/* Display the contents of the Opcodes table. */
- standard_opcodes = data + sizeof (* external);
+ standard_opcodes = hdrptr;
printf (_("\n Opcodes:\n"));
@@ -6258,13 +6515,13 @@ display_debug_lines (section, start, file)
/* Display the contents of the Directory table. */
data = standard_opcodes + info.li_opcode_base - 1;
- if (* data == 0)
+ if (*data == 0)
printf (_("\n The Directory Table is empty.\n"));
else
{
printf (_("\n The Directory Table:\n"));
- while (* data != 0)
+ while (*data != 0)
{
printf (_(" %s\n"), data);
@@ -6273,22 +6530,22 @@ display_debug_lines (section, start, file)
}
/* Skip the NUL at the end of the table. */
- data ++;
+ data++;
/* Display the contents of the File Name table. */
- if (* data == 0)
+ if (*data == 0)
printf (_("\n The File Name Table is empty.\n"));
else
{
printf (_("\n The File Name Table:\n"));
printf (_(" Entry\tDir\tTime\tSize\tName\n"));
- while (* data != 0)
+ while (*data != 0)
{
- unsigned char * name;
+ unsigned char *name;
int bytes_read;
- printf (_(" %d\t"), ++ state_machine_regs.last_file_entry);
+ printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
name = data;
data += strlen ((char *) data) + 1;
@@ -6304,7 +6561,7 @@ display_debug_lines (section, start, file)
}
/* Skip the NUL at the end of the table. */
- data ++;
+ data++;
/* Now display the statements. */
printf (_("\n Line Number Statements:\n"));
@@ -6313,10 +6570,10 @@ display_debug_lines (section, start, file)
while (data < end_of_sequence)
{
unsigned char op_code;
- int adv;
- int bytes_read;
+ int adv;
+ int bytes_read;
- op_code = * data ++;
+ op_code = *data++;
if (op_code >= info.li_opcode_base)
{
@@ -6334,7 +6591,7 @@ display_debug_lines (section, start, file)
{
case DW_LNS_extended_op:
data += process_extended_line_op (data, info.li_default_is_stmt,
- debug_line_pointer_size);
+ pointer_size);
break;
case DW_LNS_copy:
@@ -6436,14 +6693,12 @@ display_debug_lines (section, start, file)
}
static int
-display_debug_pubnames (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_pubnames (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file ATTRIBUTE_UNUSED)
{
- DWARF2_External_PubNames * external;
- DWARF2_Internal_PubNames pubnames;
- unsigned char * end;
+ DWARF2_Internal_PubNames pubnames;
+ unsigned char *end;
end = start + section->sh_size;
@@ -6451,32 +6706,43 @@ display_debug_pubnames (section, start, file)
while (start < end)
{
- unsigned char * data;
- unsigned long offset;
-
- external = (DWARF2_External_PubNames *) start;
-
- pubnames.pn_length = BYTE_GET (external->pn_length);
- pubnames.pn_version = BYTE_GET (external->pn_version);
- pubnames.pn_offset = BYTE_GET (external->pn_offset);
- pubnames.pn_size = BYTE_GET (external->pn_size);
+ unsigned char *data;
+ unsigned long offset;
+ int offset_size, initial_length_size;
- data = start + sizeof (* external);
- start += pubnames.pn_length + sizeof (external->pn_length);
+ data = start;
+ pubnames.pn_length = byte_get (data, 4);
+ data += 4;
if (pubnames.pn_length == 0xffffffff)
{
- warn (_("64-bit DWARF pubnames are not supported yet.\n"));
- break;
+ pubnames.pn_length = byte_get (data, 8);
+ data += 8;
+ offset_size = 8;
+ initial_length_size = 12;
}
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ pubnames.pn_version = byte_get (data, 2);
+ data += 2;
+ pubnames.pn_offset = byte_get (data, offset_size);
+ data += offset_size;
+ pubnames.pn_size = byte_get (data, offset_size);
+ data += offset_size;
- if (pubnames.pn_version != 2)
+ start += pubnames.pn_length + initial_length_size;
+
+ if (pubnames.pn_version != 2 && pubnames.pn_version != 3)
{
static int warned = 0;
if (! warned)
{
- warn (_("Only DWARF 2 pubnames are currently supported\n"));
+ warn (_("Only DWARF 2 and 3 pubnames are currently supported\n"));
warned = 1;
}
@@ -6496,12 +6762,12 @@ display_debug_pubnames (section, start, file)
do
{
- offset = byte_get (data, 4);
+ offset = byte_get (data, offset_size);
if (offset != 0)
{
- data += 4;
- printf (" %ld\t\t%s\n", offset, data);
+ data += offset_size;
+ printf (" %-6ld\t\t%s\n", offset, data);
data += strlen ((char *) data) + 1;
}
}
@@ -6513,75 +6779,78 @@ display_debug_pubnames (section, start, file)
}
static char *
-get_TAG_name (tag)
- unsigned long tag;
+get_TAG_name (unsigned long tag)
{
switch (tag)
{
- case DW_TAG_padding: return "DW_TAG_padding";
- case DW_TAG_array_type: return "DW_TAG_array_type";
- case DW_TAG_class_type: return "DW_TAG_class_type";
- case DW_TAG_entry_point: return "DW_TAG_entry_point";
- case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
- case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
- case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
- case DW_TAG_label: return "DW_TAG_label";
- case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
- case DW_TAG_member: return "DW_TAG_member";
- case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
- case DW_TAG_reference_type: return "DW_TAG_reference_type";
- case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
- case DW_TAG_string_type: return "DW_TAG_string_type";
- case DW_TAG_structure_type: return "DW_TAG_structure_type";
- case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
- case DW_TAG_typedef: return "DW_TAG_typedef";
- case DW_TAG_union_type: return "DW_TAG_union_type";
+ case DW_TAG_padding: return "DW_TAG_padding";
+ case DW_TAG_array_type: return "DW_TAG_array_type";
+ case DW_TAG_class_type: return "DW_TAG_class_type";
+ case DW_TAG_entry_point: return "DW_TAG_entry_point";
+ case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
+ case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
+ case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
+ case DW_TAG_label: return "DW_TAG_label";
+ case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
+ case DW_TAG_member: return "DW_TAG_member";
+ case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
+ case DW_TAG_reference_type: return "DW_TAG_reference_type";
+ case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
+ case DW_TAG_string_type: return "DW_TAG_string_type";
+ case DW_TAG_structure_type: return "DW_TAG_structure_type";
+ case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
+ case DW_TAG_typedef: return "DW_TAG_typedef";
+ case DW_TAG_union_type: return "DW_TAG_union_type";
case DW_TAG_unspecified_parameters: return "DW_TAG_unspecified_parameters";
- case DW_TAG_variant: return "DW_TAG_variant";
- case DW_TAG_common_block: return "DW_TAG_common_block";
- case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
- case DW_TAG_inheritance: return "DW_TAG_inheritance";
- case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
- case DW_TAG_module: return "DW_TAG_module";
- case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
- case DW_TAG_set_type: return "DW_TAG_set_type";
- case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
- case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
- case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
- case DW_TAG_base_type: return "DW_TAG_base_type";
- case DW_TAG_catch_block: return "DW_TAG_catch_block";
- case DW_TAG_const_type: return "DW_TAG_const_type";
- case DW_TAG_constant: return "DW_TAG_constant";
- case DW_TAG_enumerator: return "DW_TAG_enumerator";
- case DW_TAG_file_type: return "DW_TAG_file_type";
- case DW_TAG_friend: return "DW_TAG_friend";
- case DW_TAG_namelist: return "DW_TAG_namelist";
- case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
- case DW_TAG_packed_type: return "DW_TAG_packed_type";
- case DW_TAG_subprogram: return "DW_TAG_subprogram";
- case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
- case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
- case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
- case DW_TAG_try_block: return "DW_TAG_try_block";
- case DW_TAG_variant_part: return "DW_TAG_variant_part";
- case DW_TAG_variable: return "DW_TAG_variable";
- case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
- case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
- case DW_TAG_format_label: return "DW_TAG_format_label";
- case DW_TAG_function_template: return "DW_TAG_function_template";
- case DW_TAG_class_template: return "DW_TAG_class_template";
+ case DW_TAG_variant: return "DW_TAG_variant";
+ case DW_TAG_common_block: return "DW_TAG_common_block";
+ case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
+ case DW_TAG_inheritance: return "DW_TAG_inheritance";
+ case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
+ case DW_TAG_module: return "DW_TAG_module";
+ case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
+ case DW_TAG_set_type: return "DW_TAG_set_type";
+ case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
+ case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
+ case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
+ case DW_TAG_base_type: return "DW_TAG_base_type";
+ case DW_TAG_catch_block: return "DW_TAG_catch_block";
+ case DW_TAG_const_type: return "DW_TAG_const_type";
+ case DW_TAG_constant: return "DW_TAG_constant";
+ case DW_TAG_enumerator: return "DW_TAG_enumerator";
+ case DW_TAG_file_type: return "DW_TAG_file_type";
+ case DW_TAG_friend: return "DW_TAG_friend";
+ case DW_TAG_namelist: return "DW_TAG_namelist";
+ case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
+ case DW_TAG_packed_type: return "DW_TAG_packed_type";
+ case DW_TAG_subprogram: return "DW_TAG_subprogram";
+ case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
+ case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
+ case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
+ case DW_TAG_try_block: return "DW_TAG_try_block";
+ case DW_TAG_variant_part: return "DW_TAG_variant_part";
+ case DW_TAG_variable: return "DW_TAG_variable";
+ case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
+ case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
+ case DW_TAG_format_label: return "DW_TAG_format_label";
+ case DW_TAG_function_template: return "DW_TAG_function_template";
+ case DW_TAG_class_template: return "DW_TAG_class_template";
/* DWARF 2.1 values. */
- case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
- case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
- case DW_TAG_interface_type: return "DW_TAG_interface_type";
- case DW_TAG_namespace: return "DW_TAG_namespace";
- case DW_TAG_imported_module: return "DW_TAG_imported_module";
- case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
- case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
- case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
+ case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
+ case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
+ case DW_TAG_interface_type: return "DW_TAG_interface_type";
+ case DW_TAG_namespace: return "DW_TAG_namespace";
+ case DW_TAG_imported_module: return "DW_TAG_imported_module";
+ case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
+ case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
+ case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
+ /* UPC values. */
+ case DW_TAG_upc_shared_type: return "DW_TAG_upc_shared_type";
+ case DW_TAG_upc_strict_type: return "DW_TAG_upc_strict_type";
+ case DW_TAG_upc_relaxed_type: return "DW_TAG_upc_relaxed_type";
default:
{
- static char buffer [100];
+ static char buffer[100];
sprintf (buffer, _("Unknown TAG value: %lx"), tag);
return buffer;
@@ -6590,109 +6859,111 @@ get_TAG_name (tag)
}
static char *
-get_AT_name (attribute)
- unsigned long attribute;
+get_AT_name (unsigned long attribute)
{
switch (attribute)
{
- case DW_AT_sibling: return "DW_AT_sibling";
- case DW_AT_location: return "DW_AT_location";
- case DW_AT_name: return "DW_AT_name";
- case DW_AT_ordering: return "DW_AT_ordering";
- case DW_AT_subscr_data: return "DW_AT_subscr_data";
- case DW_AT_byte_size: return "DW_AT_byte_size";
- case DW_AT_bit_offset: return "DW_AT_bit_offset";
- case DW_AT_bit_size: return "DW_AT_bit_size";
- case DW_AT_element_list: return "DW_AT_element_list";
- case DW_AT_stmt_list: return "DW_AT_stmt_list";
- case DW_AT_low_pc: return "DW_AT_low_pc";
- case DW_AT_high_pc: return "DW_AT_high_pc";
- case DW_AT_language: return "DW_AT_language";
- case DW_AT_member: return "DW_AT_member";
- case DW_AT_discr: return "DW_AT_discr";
- case DW_AT_discr_value: return "DW_AT_discr_value";
- case DW_AT_visibility: return "DW_AT_visibility";
- case DW_AT_import: return "DW_AT_import";
- case DW_AT_string_length: return "DW_AT_string_length";
- case DW_AT_common_reference: return "DW_AT_common_reference";
- case DW_AT_comp_dir: return "DW_AT_comp_dir";
- case DW_AT_const_value: return "DW_AT_const_value";
- case DW_AT_containing_type: return "DW_AT_containing_type";
- case DW_AT_default_value: return "DW_AT_default_value";
- case DW_AT_inline: return "DW_AT_inline";
- case DW_AT_is_optional: return "DW_AT_is_optional";
- case DW_AT_lower_bound: return "DW_AT_lower_bound";
- case DW_AT_producer: return "DW_AT_producer";
- case DW_AT_prototyped: return "DW_AT_prototyped";
- case DW_AT_return_addr: return "DW_AT_return_addr";
- case DW_AT_start_scope: return "DW_AT_start_scope";
- case DW_AT_stride_size: return "DW_AT_stride_size";
- case DW_AT_upper_bound: return "DW_AT_upper_bound";
- case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
- case DW_AT_accessibility: return "DW_AT_accessibility";
- case DW_AT_address_class: return "DW_AT_address_class";
- case DW_AT_artificial: return "DW_AT_artificial";
- case DW_AT_base_types: return "DW_AT_base_types";
- case DW_AT_calling_convention: return "DW_AT_calling_convention";
- case DW_AT_count: return "DW_AT_count";
- case DW_AT_data_member_location: return "DW_AT_data_member_location";
- case DW_AT_decl_column: return "DW_AT_decl_column";
- case DW_AT_decl_file: return "DW_AT_decl_file";
- case DW_AT_decl_line: return "DW_AT_decl_line";
- case DW_AT_declaration: return "DW_AT_declaration";
- case DW_AT_discr_list: return "DW_AT_discr_list";
- case DW_AT_encoding: return "DW_AT_encoding";
- case DW_AT_external: return "DW_AT_external";
- case DW_AT_frame_base: return "DW_AT_frame_base";
- case DW_AT_friend: return "DW_AT_friend";
- case DW_AT_identifier_case: return "DW_AT_identifier_case";
- case DW_AT_macro_info: return "DW_AT_macro_info";
- case DW_AT_namelist_items: return "DW_AT_namelist_items";
- case DW_AT_priority: return "DW_AT_priority";
- case DW_AT_segment: return "DW_AT_segment";
- case DW_AT_specification: return "DW_AT_specification";
- case DW_AT_static_link: return "DW_AT_static_link";
- case DW_AT_type: return "DW_AT_type";
- case DW_AT_use_location: return "DW_AT_use_location";
- case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
- case DW_AT_virtuality: return "DW_AT_virtuality";
- case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
+ case DW_AT_sibling: return "DW_AT_sibling";
+ case DW_AT_location: return "DW_AT_location";
+ case DW_AT_name: return "DW_AT_name";
+ case DW_AT_ordering: return "DW_AT_ordering";
+ case DW_AT_subscr_data: return "DW_AT_subscr_data";
+ case DW_AT_byte_size: return "DW_AT_byte_size";
+ case DW_AT_bit_offset: return "DW_AT_bit_offset";
+ case DW_AT_bit_size: return "DW_AT_bit_size";
+ case DW_AT_element_list: return "DW_AT_element_list";
+ case DW_AT_stmt_list: return "DW_AT_stmt_list";
+ case DW_AT_low_pc: return "DW_AT_low_pc";
+ case DW_AT_high_pc: return "DW_AT_high_pc";
+ case DW_AT_language: return "DW_AT_language";
+ case DW_AT_member: return "DW_AT_member";
+ case DW_AT_discr: return "DW_AT_discr";
+ case DW_AT_discr_value: return "DW_AT_discr_value";
+ case DW_AT_visibility: return "DW_AT_visibility";
+ case DW_AT_import: return "DW_AT_import";
+ case DW_AT_string_length: return "DW_AT_string_length";
+ case DW_AT_common_reference: return "DW_AT_common_reference";
+ case DW_AT_comp_dir: return "DW_AT_comp_dir";
+ case DW_AT_const_value: return "DW_AT_const_value";
+ case DW_AT_containing_type: return "DW_AT_containing_type";
+ case DW_AT_default_value: return "DW_AT_default_value";
+ case DW_AT_inline: return "DW_AT_inline";
+ case DW_AT_is_optional: return "DW_AT_is_optional";
+ case DW_AT_lower_bound: return "DW_AT_lower_bound";
+ case DW_AT_producer: return "DW_AT_producer";
+ case DW_AT_prototyped: return "DW_AT_prototyped";
+ case DW_AT_return_addr: return "DW_AT_return_addr";
+ case DW_AT_start_scope: return "DW_AT_start_scope";
+ case DW_AT_stride_size: return "DW_AT_stride_size";
+ case DW_AT_upper_bound: return "DW_AT_upper_bound";
+ case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
+ case DW_AT_accessibility: return "DW_AT_accessibility";
+ case DW_AT_address_class: return "DW_AT_address_class";
+ case DW_AT_artificial: return "DW_AT_artificial";
+ case DW_AT_base_types: return "DW_AT_base_types";
+ case DW_AT_calling_convention: return "DW_AT_calling_convention";
+ case DW_AT_count: return "DW_AT_count";
+ case DW_AT_data_member_location: return "DW_AT_data_member_location";
+ case DW_AT_decl_column: return "DW_AT_decl_column";
+ case DW_AT_decl_file: return "DW_AT_decl_file";
+ case DW_AT_decl_line: return "DW_AT_decl_line";
+ case DW_AT_declaration: return "DW_AT_declaration";
+ case DW_AT_discr_list: return "DW_AT_discr_list";
+ case DW_AT_encoding: return "DW_AT_encoding";
+ case DW_AT_external: return "DW_AT_external";
+ case DW_AT_frame_base: return "DW_AT_frame_base";
+ case DW_AT_friend: return "DW_AT_friend";
+ case DW_AT_identifier_case: return "DW_AT_identifier_case";
+ case DW_AT_macro_info: return "DW_AT_macro_info";
+ case DW_AT_namelist_items: return "DW_AT_namelist_items";
+ case DW_AT_priority: return "DW_AT_priority";
+ case DW_AT_segment: return "DW_AT_segment";
+ case DW_AT_specification: return "DW_AT_specification";
+ case DW_AT_static_link: return "DW_AT_static_link";
+ case DW_AT_type: return "DW_AT_type";
+ case DW_AT_use_location: return "DW_AT_use_location";
+ case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
+ case DW_AT_virtuality: return "DW_AT_virtuality";
+ case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
/* DWARF 2.1 values. */
- case DW_AT_allocated: return "DW_AT_allocated";
- case DW_AT_associated: return "DW_AT_associated";
- case DW_AT_data_location: return "DW_AT_data_location";
- case DW_AT_stride: return "DW_AT_stride";
- case DW_AT_entry_pc: return "DW_AT_entry_pc";
- case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
- case DW_AT_extension: return "DW_AT_extension";
- case DW_AT_ranges: return "DW_AT_ranges";
- case DW_AT_trampoline: return "DW_AT_trampoline";
- case DW_AT_call_column: return "DW_AT_call_column";
- case DW_AT_call_file: return "DW_AT_call_file";
- case DW_AT_call_line: return "DW_AT_call_line";
+ case DW_AT_allocated: return "DW_AT_allocated";
+ case DW_AT_associated: return "DW_AT_associated";
+ case DW_AT_data_location: return "DW_AT_data_location";
+ case DW_AT_stride: return "DW_AT_stride";
+ case DW_AT_entry_pc: return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
+ case DW_AT_extension: return "DW_AT_extension";
+ case DW_AT_ranges: return "DW_AT_ranges";
+ case DW_AT_trampoline: return "DW_AT_trampoline";
+ case DW_AT_call_column: return "DW_AT_call_column";
+ case DW_AT_call_file: return "DW_AT_call_file";
+ case DW_AT_call_line: return "DW_AT_call_line";
/* SGI/MIPS extensions. */
- case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
- case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
- case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
- case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
+ case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
+ case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
+ case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
+ case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
case DW_AT_MIPS_loop_unroll_factor: return "DW_AT_MIPS_loop_unroll_factor";
- case DW_AT_MIPS_software_pipeline_depth: return "DW_AT_MIPS_software_pipeline_depth";
- case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
- case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
- case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
- case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
- case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
+ case DW_AT_MIPS_software_pipeline_depth:
+ return "DW_AT_MIPS_software_pipeline_depth";
+ case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
+ case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
+ case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
+ case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
+ case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
/* GNU extensions. */
- case DW_AT_sf_names: return "DW_AT_sf_names";
- case DW_AT_src_info: return "DW_AT_src_info";
- case DW_AT_mac_info: return "DW_AT_mac_info";
- case DW_AT_src_coords: return "DW_AT_src_coords";
- case DW_AT_body_begin: return "DW_AT_body_begin";
- case DW_AT_body_end: return "DW_AT_body_end";
- case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
+ case DW_AT_sf_names: return "DW_AT_sf_names";
+ case DW_AT_src_info: return "DW_AT_src_info";
+ case DW_AT_mac_info: return "DW_AT_mac_info";
+ case DW_AT_src_coords: return "DW_AT_src_coords";
+ case DW_AT_body_begin: return "DW_AT_body_begin";
+ case DW_AT_body_end: return "DW_AT_body_end";
+ case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
+ /* UPC extension. */
+ case DW_AT_upc_threads_scaled: return "DW_AT_upc_threads_scaled";
default:
{
- static char buffer [100];
+ static char buffer[100];
sprintf (buffer, _("Unknown AT value: %lx"), attribute);
return buffer;
@@ -6701,35 +6972,34 @@ get_AT_name (attribute)
}
static char *
-get_FORM_name (form)
- unsigned long form;
+get_FORM_name (unsigned long form)
{
switch (form)
{
- case DW_FORM_addr: return "DW_FORM_addr";
- case DW_FORM_block2: return "DW_FORM_block2";
- case DW_FORM_block4: return "DW_FORM_block4";
- case DW_FORM_data2: return "DW_FORM_data2";
- case DW_FORM_data4: return "DW_FORM_data4";
- case DW_FORM_data8: return "DW_FORM_data8";
- case DW_FORM_string: return "DW_FORM_string";
- case DW_FORM_block: return "DW_FORM_block";
- case DW_FORM_block1: return "DW_FORM_block1";
- case DW_FORM_data1: return "DW_FORM_data1";
- case DW_FORM_flag: return "DW_FORM_flag";
- case DW_FORM_sdata: return "DW_FORM_sdata";
- case DW_FORM_strp: return "DW_FORM_strp";
- case DW_FORM_udata: return "DW_FORM_udata";
- case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
- case DW_FORM_ref1: return "DW_FORM_ref1";
- case DW_FORM_ref2: return "DW_FORM_ref2";
- case DW_FORM_ref4: return "DW_FORM_ref4";
- case DW_FORM_ref8: return "DW_FORM_ref8";
- case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
- case DW_FORM_indirect: return "DW_FORM_indirect";
+ case DW_FORM_addr: return "DW_FORM_addr";
+ case DW_FORM_block2: return "DW_FORM_block2";
+ case DW_FORM_block4: return "DW_FORM_block4";
+ case DW_FORM_data2: return "DW_FORM_data2";
+ case DW_FORM_data4: return "DW_FORM_data4";
+ case DW_FORM_data8: return "DW_FORM_data8";
+ case DW_FORM_string: return "DW_FORM_string";
+ case DW_FORM_block: return "DW_FORM_block";
+ case DW_FORM_block1: return "DW_FORM_block1";
+ case DW_FORM_data1: return "DW_FORM_data1";
+ case DW_FORM_flag: return "DW_FORM_flag";
+ case DW_FORM_sdata: return "DW_FORM_sdata";
+ case DW_FORM_strp: return "DW_FORM_strp";
+ case DW_FORM_udata: return "DW_FORM_udata";
+ case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
+ case DW_FORM_ref1: return "DW_FORM_ref1";
+ case DW_FORM_ref2: return "DW_FORM_ref2";
+ case DW_FORM_ref4: return "DW_FORM_ref4";
+ case DW_FORM_ref8: return "DW_FORM_ref8";
+ case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
+ case DW_FORM_indirect: return "DW_FORM_indirect";
default:
{
- static char buffer [100];
+ static char buffer[100];
sprintf (buffer, _("Unknown FORM value: %lx"), form);
return buffer;
@@ -6737,44 +7007,44 @@ get_FORM_name (form)
}
}
-/* FIXME: There are better and more effiecint ways to handle
+/* FIXME: There are better and more efficient ways to handle
these structures. For now though, I just want something that
is simple to implement. */
typedef struct abbrev_attr
{
- unsigned long attribute;
- unsigned long form;
- struct abbrev_attr * next;
+ unsigned long attribute;
+ unsigned long form;
+ struct abbrev_attr *next;
}
abbrev_attr;
typedef struct abbrev_entry
{
- unsigned long entry;
- unsigned long tag;
- int children;
- struct abbrev_attr * first_attr;
- struct abbrev_attr * last_attr;
- struct abbrev_entry * next;
+ unsigned long entry;
+ unsigned long tag;
+ int children;
+ struct abbrev_attr *first_attr;
+ struct abbrev_attr *last_attr;
+ struct abbrev_entry *next;
}
abbrev_entry;
-static abbrev_entry * first_abbrev = NULL;
-static abbrev_entry * last_abbrev = NULL;
+static abbrev_entry *first_abbrev = NULL;
+static abbrev_entry *last_abbrev = NULL;
static void
-free_abbrevs PARAMS ((void))
+free_abbrevs (void)
{
- abbrev_entry * abbrev;
+ abbrev_entry *abbrev;
for (abbrev = first_abbrev; abbrev;)
{
- abbrev_entry * next = abbrev->next;
- abbrev_attr * attr;
+ abbrev_entry *next = abbrev->next;
+ abbrev_attr *attr;
for (attr = abbrev->first_attr; attr;)
{
- abbrev_attr * next = attr->next;
+ abbrev_attr *next = attr->next;
free (attr);
attr = next;
@@ -6788,14 +7058,11 @@ free_abbrevs PARAMS ((void))
}
static void
-add_abbrev (number, tag, children)
- unsigned long number;
- unsigned long tag;
- int children;
+add_abbrev (unsigned long number, unsigned long tag, int children)
{
- abbrev_entry * entry;
+ abbrev_entry *entry;
- entry = (abbrev_entry *) malloc (sizeof (* entry));
+ entry = malloc (sizeof (*entry));
if (entry == NULL)
/* ugg */
@@ -6817,13 +7084,11 @@ add_abbrev (number, tag, children)
}
static void
-add_abbrev_attr (attribute, form)
- unsigned long attribute;
- unsigned long form;
+add_abbrev_attr (unsigned long attribute, unsigned long form)
{
- abbrev_attr * attr;
+ abbrev_attr *attr;
- attr = (abbrev_attr *) malloc (sizeof (* attr));
+ attr = malloc (sizeof (*attr));
if (attr == NULL)
/* ugg */
@@ -6847,20 +7112,18 @@ add_abbrev_attr (attribute, form)
an abbreviation set was found. */
static unsigned char *
-process_abbrev_section (start, end)
- unsigned char * start;
- unsigned char * end;
+process_abbrev_section (unsigned char *start, unsigned char *end)
{
if (first_abbrev != NULL)
return NULL;
while (start < end)
{
- int bytes_read;
+ int bytes_read;
unsigned long entry;
unsigned long tag;
unsigned long attribute;
- int children;
+ int children;
entry = read_leb128 (start, & bytes_read, 0);
start += bytes_read;
@@ -6874,7 +7137,7 @@ process_abbrev_section (start, end)
tag = read_leb128 (start, & bytes_read, 0);
start += bytes_read;
- children = * start ++;
+ children = *start++;
add_abbrev (entry, tag, children);
@@ -6899,13 +7162,12 @@ process_abbrev_section (start, end)
static int
-display_debug_macinfo (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_macinfo (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file ATTRIBUTE_UNUSED)
{
- unsigned char * end = start + section->sh_size;
- unsigned char * curr = start;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *curr = start;
unsigned int bytes_read;
enum dwarf_macinfo_record_type op;
@@ -6914,10 +7176,10 @@ display_debug_macinfo (section, start, file)
while (curr < end)
{
unsigned int lineno;
- const char * string;
+ const char *string;
- op = * curr;
- curr ++;
+ op = *curr;
+ curr++;
switch (op)
{
@@ -6973,13 +7235,12 @@ display_debug_macinfo (section, start, file)
static int
-display_debug_abbrev (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_abbrev (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file ATTRIBUTE_UNUSED)
{
- abbrev_entry * entry;
- unsigned char * end = start + section->sh_size;
+ abbrev_entry *entry;
+ unsigned char *end = start + section->sh_size;
printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
@@ -6994,7 +7255,7 @@ display_debug_abbrev (section, start, file)
for (entry = first_abbrev; entry; entry = entry->next)
{
- abbrev_attr * attr;
+ abbrev_attr *attr;
printf (_(" %ld %s [%s]\n"),
entry->entry,
@@ -7020,32 +7281,29 @@ display_debug_abbrev (section, start, file)
static unsigned char *
-display_block (data, length)
- unsigned char * data;
- unsigned long length;
+display_block (unsigned char *data, unsigned long length)
{
printf (_(" %lu byte block: "), length);
while (length --)
- printf ("%lx ", (unsigned long) byte_get (data ++, 1));
+ printf ("%lx ", (unsigned long) byte_get (data++, 1));
return data;
}
static void
-decode_location_expression (data, pointer_size, length)
- unsigned char * data;
- unsigned int pointer_size;
- unsigned long length;
+decode_location_expression (unsigned char * data,
+ unsigned int pointer_size,
+ unsigned long length)
{
- unsigned op;
- int bytes_read;
- unsigned long uvalue;
- unsigned char * end = data + length;
+ unsigned op;
+ int bytes_read;
+ unsigned long uvalue;
+ unsigned char *end = data + length;
while (data < end)
{
- op = * data ++;
+ op = *data++;
switch (op)
{
@@ -7328,7 +7586,7 @@ decode_location_expression (data, pointer_size, length)
printf ("DW_OP_nop");
break;
- /* DWARF 2.1 extensions. */
+ /* DWARF 3 extensions. */
case DW_OP_push_object_address:
printf ("DW_OP_push_object_address");
break;
@@ -7340,8 +7598,13 @@ decode_location_expression (data, pointer_size, length)
printf ("DW_OP_call4: <%lx>", (long) byte_get (data, 4));
data += 4;
break;
- case DW_OP_calli:
- printf ("DW_OP_calli");
+ case DW_OP_call_ref:
+ printf ("DW_OP_call_ref");
+ break;
+
+ /* GNU extensions. */
+ case DW_OP_GNU_push_tls_address:
+ printf ("DW_OP_GNU_push_tls_address");
break;
default:
@@ -7355,43 +7618,36 @@ decode_location_expression (data, pointer_size, length)
}
/* Separate the ops. */
- printf ("; ");
+ if (data < end)
+ printf ("; ");
}
}
-static const char * debug_loc_contents;
-static bfd_vma debug_loc_size;
+static const char *debug_loc_contents;
+static bfd_vma debug_loc_size;
static void
-load_debug_loc (file)
- FILE * file;
+load_debug_loc (FILE *file)
{
- Elf32_Internal_Shdr * sec;
- unsigned int i;
+ Elf_Internal_Shdr *sec;
/* If it is already loaded, do nothing. */
if (debug_loc_contents != NULL)
return;
/* Locate the .debug_loc section. */
- for (i = 0, sec = section_headers;
- i < elf_header.e_shnum;
- i ++, sec ++)
- if (strcmp (SECTION_NAME (sec), ".debug_loc") == 0)
- break;
-
- if (i == elf_header.e_shnum || sec->sh_size == 0)
+ sec = find_section (".debug_loc");
+ if (sec == NULL)
return;
debug_loc_size = sec->sh_size;
- debug_loc_contents = ((char *)
- get_data (NULL, file, sec->sh_offset, sec->sh_size,
- _("debug_loc section data")));
+ debug_loc_contents = get_data (NULL, file, sec->sh_offset, sec->sh_size,
+ _("debug_loc section data"));
}
static void
-free_debug_loc ()
+free_debug_loc (void)
{
if (debug_loc_contents == NULL)
return;
@@ -7403,52 +7659,68 @@ free_debug_loc ()
static int
-display_debug_loc (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_loc (Elf_Internal_Shdr *section,
+ unsigned char *start, FILE *file)
{
unsigned char *section_end;
unsigned long bytes;
unsigned char *section_begin = start;
bfd_vma addr;
+ unsigned int comp_unit = 0;
addr = section->sh_addr;
bytes = section->sh_size;
section_end = start + bytes;
+
if (bytes == 0)
{
printf (_("\nThe .debug_loc section is empty.\n"));
return 0;
}
+
+ if (num_debug_line_pointer_sizes == 0)
+ get_debug_line_pointer_sizes (file);
+
printf (_("Contents of the .debug_loc section:\n\n"));
printf (_("\n Offset Begin End Expression\n"));
+
while (start < section_end)
{
unsigned long begin;
unsigned long end;
unsigned short length;
unsigned long offset;
+ unsigned int pointer_size;
offset = start - section_begin;
+ /* Get the pointer size from the comp unit associated
+ with this block of location information. */
+ if (comp_unit >= num_debug_line_pointer_sizes)
+ {
+ error (_("Not enough comp units for .debug_loc section\n"));
+ return 0;
+ }
+ else
+ {
+ pointer_size = debug_line_pointer_sizes [comp_unit];
+ comp_unit ++;
+ }
+
while (1)
{
- /* Normally, the lists in the debug_loc section are related to a
- given compilation unit, and thus, we would use the
- pointer size of that compilation unit. However, since we are
- displaying it seperately here, we either have to store
- pointer sizes of all compilation units, or assume they don't
- change. We assume, like the debug_line display, that
- it doesn't change. */
- begin = byte_get (start, debug_line_pointer_size);
- start += debug_line_pointer_size;
- end = byte_get (start, debug_line_pointer_size);
- start += debug_line_pointer_size;
+ begin = byte_get (start, pointer_size);
+ start += pointer_size;
+ end = byte_get (start, pointer_size);
+ start += pointer_size;
if (begin == 0 && end == 0)
break;
+ /* For now, skip any base address specifiers. */
+ if (begin == 0xffffffff)
+ continue;
+
begin += addr;
end += addr;
@@ -7456,7 +7728,7 @@ display_debug_loc (section, start, file)
start += 2;
printf (" %8.8lx %8.8lx %8.8lx (", offset, begin, end);
- decode_location_expression (start, debug_line_pointer_size, length);
+ decode_location_expression (start, pointer_size, length);
printf (")\n");
start += length;
@@ -7466,39 +7738,31 @@ display_debug_loc (section, start, file)
return 1;
}
-static const char * debug_str_contents;
-static bfd_vma debug_str_size;
+static const char *debug_str_contents;
+static bfd_vma debug_str_size;
static void
-load_debug_str (file)
- FILE * file;
+load_debug_str (FILE *file)
{
- Elf32_Internal_Shdr * sec;
- unsigned int i;
+ Elf_Internal_Shdr *sec;
/* If it is already loaded, do nothing. */
if (debug_str_contents != NULL)
return;
/* Locate the .debug_str section. */
- for (i = 0, sec = section_headers;
- i < elf_header.e_shnum;
- i ++, sec ++)
- if (strcmp (SECTION_NAME (sec), ".debug_str") == 0)
- break;
-
- if (i == elf_header.e_shnum || sec->sh_size == 0)
+ sec = find_section (".debug_str");
+ if (sec == NULL)
return;
debug_str_size = sec->sh_size;
- debug_str_contents = ((char *)
- get_data (NULL, file, sec->sh_offset, sec->sh_size,
- _("debug_str section data")));
+ debug_str_contents = get_data (NULL, file, sec->sh_offset, sec->sh_size,
+ _("debug_str section data"));
}
static void
-free_debug_str ()
+free_debug_str (void)
{
if (debug_str_contents == NULL)
return;
@@ -7509,8 +7773,7 @@ free_debug_str ()
}
static const char *
-fetch_indirect_string (offset)
- unsigned long offset;
+fetch_indirect_string (unsigned long offset)
{
if (debug_str_contents == NULL)
return _("<no .debug_str section>");
@@ -7521,15 +7784,13 @@ fetch_indirect_string (offset)
return debug_str_contents + offset;
}
-
static int
-display_debug_str (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_str (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file ATTRIBUTE_UNUSED)
{
- unsigned long bytes;
- bfd_vma addr;
+ unsigned long bytes;
+ bfd_vma addr;
addr = section->sh_addr;
bytes = section->sh_size;
@@ -7555,7 +7816,7 @@ display_debug_str (section, start, file)
for (j = 0; j < 16; j++)
{
if (j < lbytes)
- printf ("%2.2x", start [j]);
+ printf ("%2.2x", start[j]);
else
printf (" ");
@@ -7565,7 +7826,7 @@ display_debug_str (section, start, file)
for (j = 0; j < lbytes; j++)
{
- k = start [j];
+ k = start[j];
if (k >= ' ' && k < 0x80)
printf ("%c", k);
else
@@ -7582,18 +7843,18 @@ display_debug_str (section, start, file)
return 1;
}
-
static unsigned char *
-read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
- unsigned long attribute;
- unsigned long form;
- unsigned char * data;
- unsigned long cu_offset;
- unsigned long pointer_size;
+read_and_display_attr_value (unsigned long attribute,
+ unsigned long form,
+ unsigned char *data,
+ unsigned long cu_offset,
+ unsigned long pointer_size,
+ unsigned long offset_size,
+ int dwarf_version)
{
- unsigned long uvalue = 0;
- unsigned char * block_start = NULL;
- int bytes_read;
+ unsigned long uvalue = 0;
+ unsigned char *block_start = NULL;
+ int bytes_read;
switch (form)
{
@@ -7601,20 +7862,36 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
break;
case DW_FORM_ref_addr:
+ if (dwarf_version == 2)
+ {
+ uvalue = byte_get (data, pointer_size);
+ data += pointer_size;
+ }
+ else if (dwarf_version == 3)
+ {
+ uvalue = byte_get (data, offset_size);
+ data += offset_size;
+ }
+ else
+ {
+ error (_("Internal error: DWARF version is not 2 or 3.\n"));
+ }
+ break;
+
case DW_FORM_addr:
uvalue = byte_get (data, pointer_size);
data += pointer_size;
break;
case DW_FORM_strp:
- uvalue = byte_get (data, /* offset_size */ 4);
- data += /* offset_size */ 4;
+ uvalue = byte_get (data, offset_size);
+ data += offset_size;
break;
case DW_FORM_ref1:
case DW_FORM_flag:
case DW_FORM_data1:
- uvalue = byte_get (data ++, 1);
+ uvalue = byte_get (data++, 1);
break;
case DW_FORM_ref2:
@@ -7645,7 +7922,8 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
data += bytes_read;
printf (" %s", get_FORM_name (form));
return read_and_display_attr_value (attribute, form, data, cu_offset,
- pointer_size);
+ pointer_size, offset_size,
+ dwarf_version);
}
switch (form)
@@ -7663,6 +7941,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_FORM_addr:
printf (" %#lx", uvalue);
+ break;
case DW_FORM_flag:
case DW_FORM_data1:
@@ -7711,8 +7990,8 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
break;
case DW_FORM_strp:
- printf (_(" (indirect string, offset: 0x%lx): "), uvalue);
- printf (fetch_indirect_string (uvalue));
+ printf (_(" (indirect string, offset: 0x%lx): %s"),
+ uvalue, fetch_indirect_string (uvalue));
break;
case DW_FORM_indirect:
@@ -7724,7 +8003,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
break;
}
- /* For some attributes we can display futher information. */
+ /* For some attributes we can display further information. */
printf ("\t");
@@ -7733,51 +8012,65 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_AT_inline:
switch (uvalue)
{
- case DW_INL_not_inlined: printf (_("(not inlined)")); break;
- case DW_INL_inlined: printf (_("(inlined)")); break;
- case DW_INL_declared_not_inlined: printf (_("(declared as inline but ignored)")); break;
- case DW_INL_declared_inlined: printf (_("(declared as inline and inlined)")); break;
- default: printf (_(" (Unknown inline attribute value: %lx)"), uvalue); break;
+ case DW_INL_not_inlined:
+ printf (_("(not inlined)"));
+ break;
+ case DW_INL_inlined:
+ printf (_("(inlined)"));
+ break;
+ case DW_INL_declared_not_inlined:
+ printf (_("(declared as inline but ignored)"));
+ break;
+ case DW_INL_declared_inlined:
+ printf (_("(declared as inline and inlined)"));
+ break;
+ default:
+ printf (_(" (Unknown inline attribute value: %lx)"), uvalue);
+ break;
}
break;
case DW_AT_language:
switch (uvalue)
{
- case DW_LANG_C: printf ("(non-ANSI C)"); break;
- case DW_LANG_C89: printf ("(ANSI C)"); break;
- case DW_LANG_C_plus_plus: printf ("(C++)"); break;
- case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
- case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
- case DW_LANG_Modula2: printf ("(Modula 2)"); break;
- case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
- case DW_LANG_Ada83: printf ("(Ada)"); break;
- case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
- case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
- /* DWARF 2.1 values. */
- case DW_LANG_C99: printf ("(ANSI C99)"); break;
- case DW_LANG_Ada95: printf ("(ADA 95)"); break;
- case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ case DW_LANG_C: printf ("(non-ANSI C)"); break;
+ case DW_LANG_C89: printf ("(ANSI C)"); break;
+ case DW_LANG_C_plus_plus: printf ("(C++)"); break;
+ case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
+ case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
+ case DW_LANG_Modula2: printf ("(Modula 2)"); break;
+ case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
+ case DW_LANG_Ada83: printf ("(Ada)"); break;
+ case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
+ case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
+ /* DWARF 2.1 values. */
+ case DW_LANG_C99: printf ("(ANSI C99)"); break;
+ case DW_LANG_Ada95: printf ("(ADA 95)"); break;
+ case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
/* MIPS extension. */
- case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
- default: printf ("(Unknown: %lx)", uvalue); break;
+ case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
+ /* UPC extension. */
+ case DW_LANG_Upc: printf ("(Unified Parallel C)"); break;
+ default:
+ printf ("(Unknown: %lx)", uvalue);
+ break;
}
break;
case DW_AT_encoding:
switch (uvalue)
{
- case DW_ATE_void: printf ("(void)"); break;
- case DW_ATE_address: printf ("(machine address)"); break;
- case DW_ATE_boolean: printf ("(boolean)"); break;
- case DW_ATE_complex_float: printf ("(complex float)"); break;
- case DW_ATE_float: printf ("(float)"); break;
- case DW_ATE_signed: printf ("(signed)"); break;
- case DW_ATE_signed_char: printf ("(signed char)"); break;
- case DW_ATE_unsigned: printf ("(unsigned)"); break;
- case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
+ case DW_ATE_void: printf ("(void)"); break;
+ case DW_ATE_address: printf ("(machine address)"); break;
+ case DW_ATE_boolean: printf ("(boolean)"); break;
+ case DW_ATE_complex_float: printf ("(complex float)"); break;
+ case DW_ATE_float: printf ("(float)"); break;
+ case DW_ATE_signed: printf ("(signed)"); break;
+ case DW_ATE_signed_char: printf ("(signed char)"); break;
+ case DW_ATE_unsigned: printf ("(unsigned)"); break;
+ case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
/* DWARF 2.1 value. */
- case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
+ case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
default:
if (uvalue >= DW_ATE_lo_user
&& uvalue <= DW_ATE_hi_user)
@@ -7794,17 +8087,19 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_ACCESS_public: printf ("(public)"); break;
case DW_ACCESS_protected: printf ("(protected)"); break;
case DW_ACCESS_private: printf ("(private)"); break;
- default: printf ("(unknown accessibility)"); break;
+ default:
+ printf ("(unknown accessibility)");
+ break;
}
break;
case DW_AT_visibility:
switch (uvalue)
{
- case DW_VIS_local: printf ("(local)"); break;
- case DW_VIS_exported: printf ("(exported)"); break;
- case DW_VIS_qualified: printf ("(qualified)"); break;
- default: printf ("(unknown visibility)"); break;
+ case DW_VIS_local: printf ("(local)"); break;
+ case DW_VIS_exported: printf ("(exported)"); break;
+ case DW_VIS_qualified: printf ("(qualified)"); break;
+ default: printf ("(unknown visibility)"); break;
}
break;
@@ -7814,7 +8109,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_VIRTUALITY_none: printf ("(none)"); break;
case DW_VIRTUALITY_virtual: printf ("(virtual)"); break;
case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
- default: printf ("(unknown virtuality)"); break;
+ default: printf ("(unknown virtuality)"); break;
}
break;
@@ -7825,7 +8120,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_ID_up_case: printf ("(up_case)"); break;
case DW_ID_down_case: printf ("(down_case)"); break;
case DW_ID_case_insensitive: printf ("(case_insensitive)"); break;
- default: printf ("(unknown case)"); break;
+ default: printf ("(unknown case)"); break;
}
break;
@@ -7869,7 +8164,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
decode_location_expression (block_start, pointer_size, uvalue);
printf (")");
}
- else if (form == DW_FORM_data4)
+ else if (form == DW_FORM_data4 || form == DW_FORM_data8)
{
printf ("(");
printf ("location list");
@@ -7885,28 +8180,28 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
}
static unsigned char *
-read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
- unsigned long attribute;
- unsigned long form;
- unsigned char * data;
- unsigned long cu_offset;
- unsigned long pointer_size;
+read_and_display_attr (unsigned long attribute,
+ unsigned long form,
+ unsigned char *data,
+ unsigned long cu_offset,
+ unsigned long pointer_size,
+ unsigned long offset_size,
+ int dwarf_version)
{
printf (" %-18s:", get_AT_name (attribute));
data = read_and_display_attr_value (attribute, form, data, cu_offset,
- pointer_size);
+ pointer_size, offset_size, dwarf_version);
printf ("\n");
return data;
}
static int
-display_debug_info (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file;
+display_debug_info (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file)
{
- unsigned char * end = start + section->sh_size;
- unsigned char * section_begin = start;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *section_begin = start;
printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
@@ -7915,36 +8210,45 @@ display_debug_info (section, start, file)
while (start < end)
{
- DWARF2_External_CompUnit * external;
- DWARF2_Internal_CompUnit compunit;
- Elf32_Internal_Shdr * relsec;
- unsigned char * tags;
- unsigned int i;
- int level;
- unsigned long cu_offset;
+ DWARF2_Internal_CompUnit compunit;
+ Elf_Internal_Shdr *relsec;
+ unsigned char *hdrptr;
+ unsigned char *cu_abbrev_offset_ptr;
+ unsigned char *tags;
+ int level;
+ unsigned long cu_offset;
+ int offset_size;
+ int initial_length_size;
- external = (DWARF2_External_CompUnit *) start;
+ hdrptr = start;
- compunit.cu_length = BYTE_GET (external->cu_length);
- compunit.cu_version = BYTE_GET (external->cu_version);
- compunit.cu_abbrev_offset = BYTE_GET (external->cu_abbrev_offset);
- compunit.cu_pointer_size = BYTE_GET (external->cu_pointer_size);
+ compunit.cu_length = byte_get (hdrptr, 4);
+ hdrptr += 4;
if (compunit.cu_length == 0xffffffff)
{
- warn (_("64-bit DWARF debug info is not supported yet.\n"));
- break;
+ compunit.cu_length = byte_get (hdrptr, 8);
+ hdrptr += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
}
- /* Check for RELA relocations in the abbrev_offset address, and
- apply them. */
+ compunit.cu_version = byte_get (hdrptr, 2);
+ hdrptr += 2;
+
+ /* Apply addends of RELA relocations. */
for (relsec = section_headers;
relsec < section_headers + elf_header.e_shnum;
++relsec)
{
unsigned long nrelas;
Elf_Internal_Rela *rela, *rp;
- Elf32_Internal_Shdr *symsec;
+ Elf_Internal_Shdr *symsec;
Elf_Internal_Sym *symtab;
Elf_Internal_Sym *sym;
@@ -7962,9 +8266,13 @@ display_debug_info (section, start, file)
for (rp = rela; rp < rela + nrelas; ++rp)
{
- if (rp->r_offset
- != (bfd_vma) ((unsigned char *) &external->cu_abbrev_offset
- - section_begin))
+ unsigned char *loc;
+
+ if (rp->r_offset >= (bfd_vma) (hdrptr - section_begin)
+ && section->sh_size > (bfd_vma) offset_size
+ && rp->r_offset <= section->sh_size - offset_size)
+ loc = section_begin + rp->r_offset;
+ else
continue;
if (is_32bit_elf)
@@ -7992,17 +8300,23 @@ display_debug_info (section, start, file)
}
}
- compunit.cu_abbrev_offset = rp->r_addend;
- break;
+ byte_put (loc, rp->r_addend, offset_size);
}
free (rela);
break;
}
- tags = start + sizeof (* external);
+ cu_abbrev_offset_ptr = hdrptr;
+ compunit.cu_abbrev_offset = byte_get (hdrptr, offset_size);
+ hdrptr += offset_size;
+
+ compunit.cu_pointer_size = byte_get (hdrptr, 1);
+ hdrptr += 1;
+
+ tags = hdrptr;
cu_offset = start - section_begin;
- start += compunit.cu_length + sizeof (external->cu_length);
+ start += compunit.cu_length + initial_length_size;
printf (_(" Compilation Unit @ %lx:\n"), cu_offset);
printf (_(" Length: %ld\n"), compunit.cu_length);
@@ -8010,36 +8324,29 @@ display_debug_info (section, start, file)
printf (_(" Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset);
printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size);
- if (compunit.cu_version != 2)
+ if (compunit.cu_version != 2 && compunit.cu_version != 3)
{
- warn (_("Only version 2 DWARF debug information is currently supported.\n"));
+ warn (_("Only version 2 and 3 DWARF debug information is currently supported.\n"));
continue;
}
free_abbrevs ();
/* Read in the abbrevs used by this compilation unit. */
-
{
- Elf32_Internal_Shdr * sec;
- unsigned char * begin;
+ Elf_Internal_Shdr *sec;
+ unsigned char *begin;
/* Locate the .debug_abbrev section and process it. */
- for (i = 0, sec = section_headers;
- i < elf_header.e_shnum;
- i ++, sec ++)
- if (strcmp (SECTION_NAME (sec), ".debug_abbrev") == 0)
- break;
-
- if (i == elf_header.e_shnum || sec->sh_size == 0)
+ sec = find_section (".debug_abbrev");
+ if (sec == NULL)
{
warn (_("Unable to locate .debug_abbrev section!\n"));
return 0;
}
- begin = ((unsigned char *)
- get_data (NULL, file, sec->sh_offset, sec->sh_size,
- _("debug_abbrev section data")));
+ begin = get_data (NULL, file, sec->sh_offset, sec->sh_size,
+ _("debug_abbrev section data"));
if (!begin)
return 0;
@@ -8052,10 +8359,10 @@ display_debug_info (section, start, file)
level = 0;
while (tags < start)
{
- int bytes_read;
- unsigned long abbrev_number;
- abbrev_entry * entry;
- abbrev_attr * attr;
+ int bytes_read;
+ unsigned long abbrev_number;
+ abbrev_entry *entry;
+ abbrev_attr *attr;
abbrev_number = read_leb128 (tags, & bytes_read, 0);
tags += bytes_read;
@@ -8091,7 +8398,9 @@ display_debug_info (section, start, file)
tags = read_and_display_attr (attr->attribute,
attr->form,
tags, cu_offset,
- compunit.cu_pointer_size);
+ compunit.cu_pointer_size,
+ offset_size,
+ compunit.cu_version);
if (entry->children)
++level;
@@ -8107,41 +8416,58 @@ display_debug_info (section, start, file)
}
static int
-display_debug_aranges (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_aranges (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file ATTRIBUTE_UNUSED)
{
- unsigned char * end = start + section->sh_size;
+ unsigned char *end = start + section->sh_size;
printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
while (start < end)
{
- DWARF2_External_ARange * external;
- DWARF2_Internal_ARange arange;
- unsigned char * ranges;
- unsigned long length;
- unsigned long address;
- int excess;
+ unsigned char *hdrptr;
+ DWARF2_Internal_ARange arange;
+ unsigned char *ranges;
+ unsigned long length;
+ unsigned long address;
+ int excess;
+ int offset_size;
+ int initial_length_size;
- external = (DWARF2_External_ARange *) start;
+ hdrptr = start;
- arange.ar_length = BYTE_GET (external->ar_length);
- arange.ar_version = BYTE_GET (external->ar_version);
- arange.ar_info_offset = BYTE_GET (external->ar_info_offset);
- arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
- arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
+ arange.ar_length = byte_get (hdrptr, 4);
+ hdrptr += 4;
if (arange.ar_length == 0xffffffff)
{
- warn (_("64-bit DWARF aranges are not supported yet.\n"));
- break;
+ arange.ar_length = byte_get (hdrptr, 8);
+ hdrptr += 8;
+ offset_size = 8;
+ initial_length_size = 12;
}
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ arange.ar_version = byte_get (hdrptr, 2);
+ hdrptr += 2;
- if (arange.ar_version != 2)
+ arange.ar_info_offset = byte_get (hdrptr, offset_size);
+ hdrptr += offset_size;
+
+ arange.ar_pointer_size = byte_get (hdrptr, 1);
+ hdrptr += 1;
+
+ arange.ar_segment_size = byte_get (hdrptr, 1);
+ hdrptr += 1;
+
+ if (arange.ar_version != 2 && arange.ar_version != 3)
{
- warn (_("Only DWARF 2 aranges are currently supported.\n"));
+ warn (_("Only DWARF 2 and 3 aranges are currently supported.\n"));
break;
}
@@ -8153,10 +8479,10 @@ display_debug_aranges (section, start, file)
printf (_("\n Address Length\n"));
- ranges = start + sizeof (* external);
+ ranges = hdrptr;
/* Must pad to an alignment boundary that is twice the pointer size. */
- excess = sizeof (* external) % (2 * arange.ar_pointer_size);
+ excess = (hdrptr - start) % (2 * arange.ar_pointer_size);
if (excess)
ranges += (2 * arange.ar_pointer_size) - excess;
@@ -8177,7 +8503,7 @@ display_debug_aranges (section, start, file)
printf (" %8.8lx %lu\n", address, length);
}
- start += arange.ar_length + sizeof (external->ar_length);
+ start += arange.ar_length + initial_length_size;
}
printf ("\n");
@@ -8187,21 +8513,22 @@ display_debug_aranges (section, start, file)
typedef struct Frame_Chunk
{
- struct Frame_Chunk * next;
- unsigned char * chunk_start;
- int ncols;
+ struct Frame_Chunk *next;
+ unsigned char *chunk_start;
+ int ncols;
/* DW_CFA_{undefined,same_value,offset,register,unreferenced} */
- short int * col_type;
- int * col_offset;
- char * augmentation;
- unsigned int code_factor;
- int data_factor;
- unsigned long pc_begin;
- unsigned long pc_range;
- int cfa_reg;
- int cfa_offset;
- int ra;
- unsigned char fde_encoding;
+ short int *col_type;
+ int *col_offset;
+ char *augmentation;
+ unsigned int code_factor;
+ int data_factor;
+ unsigned long pc_begin;
+ unsigned long pc_range;
+ int cfa_reg;
+ int cfa_offset;
+ int ra;
+ unsigned char fde_encoding;
+ unsigned char cfa_exp;
}
Frame_Chunk;
@@ -8209,14 +8536,8 @@ Frame_Chunk;
in the frame info. */
#define DW_CFA_unreferenced (-1)
-static void frame_need_space PARAMS ((Frame_Chunk *, int));
-static void frame_display_row PARAMS ((Frame_Chunk *, int *, int *));
-static int size_of_encoded_value PARAMS ((int));
-
static void
-frame_need_space (fc, reg)
- Frame_Chunk * fc;
- int reg;
+frame_need_space (Frame_Chunk *fc, int reg)
{
int prev = fc->ncols;
@@ -8224,10 +8545,8 @@ frame_need_space (fc, reg)
return;
fc->ncols = reg + 1;
- fc->col_type = (short int *) xrealloc (fc->col_type,
- fc->ncols * sizeof (short int));
- fc->col_offset = (int *) xrealloc (fc->col_offset,
- fc->ncols * sizeof (int));
+ fc->col_type = xrealloc (fc->col_type, fc->ncols * sizeof (short int));
+ fc->col_offset = xrealloc (fc->col_offset, fc->ncols * sizeof (int));
while (prev < fc->ncols)
{
@@ -8238,24 +8557,21 @@ frame_need_space (fc, reg)
}
static void
-frame_display_row (fc, need_col_headers, max_regs)
- Frame_Chunk * fc;
- int * need_col_headers;
- int * max_regs;
+frame_display_row (Frame_Chunk *fc, int *need_col_headers, int *max_regs)
{
int r;
char tmp[100];
- if (* max_regs < fc->ncols)
- * max_regs = fc->ncols;
+ if (*max_regs < fc->ncols)
+ *max_regs = fc->ncols;
- if (* need_col_headers)
+ if (*need_col_headers)
{
- * need_col_headers = 0;
+ *need_col_headers = 0;
printf (" LOC CFA ");
- for (r = 0; r < * max_regs; r++)
+ for (r = 0; r < *max_regs; r++)
if (fc->col_type[r] != DW_CFA_unreferenced)
{
if (r == fc->ra)
@@ -8268,7 +8584,10 @@ frame_display_row (fc, need_col_headers, max_regs)
}
printf ("%08lx ", fc->pc_begin);
- sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset);
+ if (fc->cfa_exp)
+ strcpy (tmp, "exp");
+ else
+ sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset);
printf ("%-8s ", tmp);
for (r = 0; r < fc->ncols; r++)
@@ -8289,6 +8608,9 @@ frame_display_row (fc, need_col_headers, max_regs)
case DW_CFA_register:
sprintf (tmp, "r%d", fc->col_offset[r]);
break;
+ case DW_CFA_expression:
+ strcpy (tmp, "exp");
+ break;
default:
strcpy (tmp, "n/a");
break;
@@ -8300,8 +8622,7 @@ frame_display_row (fc, need_col_headers, max_regs)
}
static int
-size_of_encoded_value (encoding)
- int encoding;
+size_of_encoded_value (int encoding)
{
switch (encoding & 0x7)
{
@@ -8313,69 +8634,91 @@ size_of_encoded_value (encoding)
}
}
+static bfd_vma
+get_encoded_value (unsigned char *data, int encoding)
+{
+ int size = size_of_encoded_value (encoding);
+ if (encoding & DW_EH_PE_signed)
+ return byte_get_signed (data, size);
+ else
+ return byte_get (data, size);
+}
+
#define GET(N) byte_get (start, N); start += N
#define LEB() read_leb128 (start, & length_return, 0); start += length_return
#define SLEB() read_leb128 (start, & length_return, 1); start += length_return
static int
-display_debug_frames (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
-{
- unsigned char * end = start + section->sh_size;
- unsigned char * section_start = start;
- Frame_Chunk * chunks = 0;
- Frame_Chunk * remembered_state = 0;
- Frame_Chunk * rs;
- int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0);
- int length_return;
- int max_regs = 0;
- int addr_size = is_32bit_elf ? 4 : 8;
+display_debug_frames (Elf_Internal_Shdr *section,
+ unsigned char *start,
+ FILE *file ATTRIBUTE_UNUSED)
+{
+ unsigned char *end = start + section->sh_size;
+ unsigned char *section_start = start;
+ Frame_Chunk *chunks = 0;
+ Frame_Chunk *remembered_state = 0;
+ Frame_Chunk *rs;
+ int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0);
+ int length_return;
+ int max_regs = 0;
+ int addr_size = is_32bit_elf ? 4 : 8;
printf (_("The section %s contains:\n"), SECTION_NAME (section));
while (start < end)
{
- unsigned char * saved_start;
- unsigned char * block_end;
- unsigned long length;
- unsigned long cie_id;
- Frame_Chunk * fc;
- Frame_Chunk * cie;
- int need_col_headers = 1;
- unsigned char * augmentation_data = NULL;
- unsigned long augmentation_data_len = 0;
- int encoded_ptr_size = addr_size;
+ unsigned char *saved_start;
+ unsigned char *block_end;
+ unsigned long length;
+ unsigned long cie_id;
+ Frame_Chunk *fc;
+ Frame_Chunk *cie;
+ int need_col_headers = 1;
+ unsigned char *augmentation_data = NULL;
+ unsigned long augmentation_data_len = 0;
+ int encoded_ptr_size = addr_size;
+ int offset_size;
+ int initial_length_size;
saved_start = start;
length = byte_get (start, 4); start += 4;
if (length == 0)
- return 1;
+ {
+ printf ("\n%08lx ZERO terminator\n\n",
+ (unsigned long)(saved_start - section_start));
+ return 1;
+ }
if (length == 0xffffffff)
{
- warn (_("64-bit DWARF format frames are not supported yet.\n"));
- break;
+ length = byte_get (start, 8);
+ start += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
}
- block_end = saved_start + length + 4;
- cie_id = byte_get (start, 4); start += 4;
+ block_end = saved_start + length + initial_length_size;
+ cie_id = byte_get (start, offset_size); start += offset_size;
if (is_eh ? (cie_id == 0) : (cie_id == DW_CIE_ID))
{
int version;
- fc = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk));
+ fc = xmalloc (sizeof (Frame_Chunk));
memset (fc, 0, sizeof (Frame_Chunk));
fc->next = chunks;
chunks = fc;
fc->chunk_start = saved_start;
fc->ncols = 0;
- fc->col_type = (short int *) xmalloc (sizeof (short int));
- fc->col_offset = (int *) xmalloc (sizeof (int));
+ fc->col_type = xmalloc (sizeof (short int));
+ fc->col_offset = xmalloc (sizeof (int));
frame_need_space (fc, max_regs-1);
version = *start++;
@@ -8460,7 +8803,7 @@ display_debug_frames (section, start, file)
}
else
{
- unsigned char * look_for;
+ unsigned char *look_for;
static Frame_Chunk fde_fc;
fc = & fde_fc;
@@ -8478,8 +8821,8 @@ display_debug_frames (section, start, file)
cie_id, saved_start);
start = block_end;
fc->ncols = 0;
- fc->col_type = (short int *) xmalloc (sizeof (short int));
- fc->col_offset = (int *) xmalloc (sizeof (int));
+ fc->col_type = xmalloc (sizeof (short int));
+ fc->col_offset = xmalloc (sizeof (int));
frame_need_space (fc, max_regs - 1);
cie = fc;
fc->augmentation = "";
@@ -8488,8 +8831,8 @@ display_debug_frames (section, start, file)
else
{
fc->ncols = cie->ncols;
- fc->col_type = (short int *) xmalloc (fc->ncols * sizeof (short int));
- fc->col_offset = (int *) xmalloc (fc->ncols * sizeof (int));
+ fc->col_type = xmalloc (fc->ncols * sizeof (short int));
+ fc->col_offset = xmalloc (fc->ncols * sizeof (int));
memcpy (fc->col_type, cie->col_type, fc->ncols * sizeof (short int));
memcpy (fc->col_offset, cie->col_offset, fc->ncols * sizeof (int));
fc->augmentation = cie->augmentation;
@@ -8505,7 +8848,9 @@ display_debug_frames (section, start, file)
if (fc->fde_encoding)
encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
- fc->pc_begin = byte_get (start, encoded_ptr_size);
+ fc->pc_begin = get_encoded_value (start, fc->fde_encoding);
+ if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel)
+ fc->pc_begin += section->sh_addr + (start - section_start);
start += encoded_ptr_size;
fc->pc_range = byte_get (start, encoded_ptr_size);
start += encoded_ptr_size;
@@ -8534,19 +8879,23 @@ display_debug_frames (section, start, file)
/* At this point, fc is the current chunk, cie (if any) is set, and we're
about to interpret instructions for the chunk. */
-
- if (do_debug_frames_interp)
+ /* ??? At present we need to do this always, since this sizes the
+ fc->col_type and fc->col_offset arrays, which we write into always.
+ We should probably split the interpreted and non-interpreted bits
+ into two different routines, since there's so much that doesn't
+ really overlap between them. */
+ if (1 || do_debug_frames_interp)
{
/* Start by making a pass over the chunk, allocating storage
and taking note of what registers are used. */
- unsigned char * tmp = start;
+ unsigned char *tmp = start;
while (start < block_end)
{
unsigned op, opa;
- unsigned long reg;
+ unsigned long reg, tmp;
- op = * start ++;
+ op = *start++;
opa = op & 0x3f;
if (op & 0xc0)
op &= 0xc0;
@@ -8612,6 +8961,17 @@ display_debug_frames (section, start, file)
case DW_CFA_def_cfa_offset:
LEB ();
break;
+ case DW_CFA_def_cfa_expression:
+ tmp = LEB ();
+ start += tmp;
+ break;
+ case DW_CFA_expression:
+ reg = LEB ();
+ tmp = LEB ();
+ start += tmp;
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
case DW_CFA_offset_extended_sf:
reg = LEB (); SLEB ();
frame_need_space (fc, reg);
@@ -8623,6 +8983,9 @@ display_debug_frames (section, start, file)
case DW_CFA_def_cfa_offset_sf:
SLEB ();
break;
+ case DW_CFA_MIPS_advance_loc8:
+ start += 8;
+ break;
case DW_CFA_GNU_args_size:
LEB ();
break;
@@ -8648,7 +9011,7 @@ display_debug_frames (section, start, file)
long l, ofs;
bfd_vma vma;
- op = * start ++;
+ op = *start++;
opa = op & 0x3f;
if (op & 0xc0)
op &= 0xc0;
@@ -8684,7 +9047,9 @@ display_debug_frames (section, start, file)
break;
case DW_CFA_set_loc:
- vma = byte_get (start, encoded_ptr_size);
+ vma = get_encoded_value (start, fc->fde_encoding);
+ if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel)
+ vma += section->sh_addr + (start - section_start);
start += encoded_ptr_size;
if (do_debug_frames_interp)
frame_display_row (fc, &need_col_headers, &max_regs);
@@ -8764,7 +9129,7 @@ display_debug_frames (section, start, file)
reg = LEB ();
roffs = LEB ();
if (! do_debug_frames_interp)
- printf (" DW_CFA_register: r%ld\n", reg);
+ printf (" DW_CFA_register: r%ld in r%ld\n", reg, roffs);
fc->col_type[reg] = DW_CFA_register;
fc->col_offset[reg] = roffs;
break;
@@ -8772,10 +9137,10 @@ display_debug_frames (section, start, file)
case DW_CFA_remember_state:
if (! do_debug_frames_interp)
printf (" DW_CFA_remember_state\n");
- rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk));
+ rs = xmalloc (sizeof (Frame_Chunk));
rs->ncols = fc->ncols;
- rs->col_type = (short int *) xmalloc (rs->ncols * sizeof (short int));
- rs->col_offset = (int *) xmalloc (rs->ncols * sizeof (int));
+ rs->col_type = xmalloc (rs->ncols * sizeof (short int));
+ rs->col_offset = xmalloc (rs->ncols * sizeof (int));
memcpy (rs->col_type, fc->col_type, rs->ncols);
memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int));
rs->next = remembered_state;
@@ -8786,18 +9151,25 @@ display_debug_frames (section, start, file)
if (! do_debug_frames_interp)
printf (" DW_CFA_restore_state\n");
rs = remembered_state;
- remembered_state = rs->next;
- frame_need_space (fc, rs->ncols-1);
- memcpy (fc->col_type, rs->col_type, rs->ncols);
- memcpy (fc->col_offset, rs->col_offset, rs->ncols * sizeof (int));
- free (rs->col_type);
- free (rs->col_offset);
- free (rs);
+ if (rs)
+ {
+ remembered_state = rs->next;
+ frame_need_space (fc, rs->ncols-1);
+ memcpy (fc->col_type, rs->col_type, rs->ncols);
+ memcpy (fc->col_offset, rs->col_offset,
+ rs->ncols * sizeof (int));
+ free (rs->col_type);
+ free (rs->col_offset);
+ free (rs);
+ }
+ else if (do_debug_frames_interp)
+ printf ("Mismatched DW_CFA_restore_state\n");
break;
case DW_CFA_def_cfa:
fc->cfa_reg = LEB ();
fc->cfa_offset = LEB ();
+ fc->cfa_exp = 0;
if (! do_debug_frames_interp)
printf (" DW_CFA_def_cfa: r%d ofs %d\n",
fc->cfa_reg, fc->cfa_offset);
@@ -8805,6 +9177,7 @@ display_debug_frames (section, start, file)
case DW_CFA_def_cfa_register:
fc->cfa_reg = LEB ();
+ fc->cfa_exp = 0;
if (! do_debug_frames_interp)
printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg);
break;
@@ -8820,6 +9193,31 @@ display_debug_frames (section, start, file)
printf (" DW_CFA_nop\n");
break;
+ case DW_CFA_def_cfa_expression:
+ ul = LEB ();
+ if (! do_debug_frames_interp)
+ {
+ printf (" DW_CFA_def_cfa_expression (");
+ decode_location_expression (start, addr_size, ul);
+ printf (")\n");
+ }
+ fc->cfa_exp = 1;
+ start += ul;
+ break;
+
+ case DW_CFA_expression:
+ reg = LEB ();
+ ul = LEB ();
+ if (! do_debug_frames_interp)
+ {
+ printf (" DW_CFA_expression: r%ld (", reg);
+ decode_location_expression (start, addr_size, ul);
+ printf (")\n");
+ }
+ fc->col_type[reg] = DW_CFA_expression;
+ start += ul;
+ break;
+
case DW_CFA_offset_extended_sf:
reg = LEB ();
l = SLEB ();
@@ -8834,6 +9232,7 @@ display_debug_frames (section, start, file)
case DW_CFA_def_cfa_sf:
fc->cfa_reg = LEB ();
fc->cfa_offset = SLEB ();
+ fc->cfa_exp = 0;
if (! do_debug_frames_interp)
printf (" DW_CFA_def_cfa_sf: r%d ofs %d\n",
fc->cfa_reg, fc->cfa_offset);
@@ -8845,6 +9244,17 @@ display_debug_frames (section, start, file)
printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset);
break;
+ case DW_CFA_MIPS_advance_loc8:
+ ofs = byte_get (start, 8); start += 8;
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_MIPS_advance_loc8: %ld to %08lx\n",
+ ofs * fc->code_factor,
+ fc->pc_begin + ofs * fc->code_factor);
+ fc->pc_begin += ofs * fc->code_factor;
+ break;
+
case DW_CFA_GNU_window_save:
if (! do_debug_frames_interp)
printf (" DW_CFA_GNU_window_save\n");
@@ -8867,17 +9277,6 @@ display_debug_frames (section, start, file)
fc->col_offset[reg] = l * fc->data_factor;
break;
- /* FIXME: How do we handle these? */
- case DW_CFA_def_cfa_expression:
- fprintf (stderr, "unsupported DW_CFA_def_cfa_expression\n");
- start = block_end;
- break;
-
- case DW_CFA_expression:
- fprintf (stderr, "unsupported DW_CFA_expression\n");
- start = block_end;
- break;
-
default:
fprintf (stderr, "unsupported or unknown DW_CFA_%d\n", op);
start = block_end;
@@ -8900,10 +9299,9 @@ display_debug_frames (section, start, file)
#undef SLEB
static int
-display_debug_not_supported (section, start, file)
- Elf32_Internal_Shdr * section;
- unsigned char * start ATTRIBUTE_UNUSED;
- FILE * file ATTRIBUTE_UNUSED;
+display_debug_not_supported (Elf_Internal_Shdr *section,
+ unsigned char *start ATTRIBUTE_UNUSED,
+ FILE *file ATTRIBUTE_UNUSED)
{
printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
SECTION_NAME (section));
@@ -8911,62 +9309,40 @@ display_debug_not_supported (section, start, file)
return 1;
}
-/* Pre-scan the .debug_info section to record the size of address.
- When dumping the .debug_line, we use that size information, assuming
- that all compilation units have the same address size. */
-static int
-prescan_debug_info (section, start, file)
- Elf32_Internal_Shdr * section ATTRIBUTE_UNUSED;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
-{
- DWARF2_External_CompUnit * external;
-
- external = (DWARF2_External_CompUnit *) start;
-
- debug_line_pointer_size = BYTE_GET (external->cu_pointer_size);
- return 0;
-}
-
- /* A structure containing the name of a debug section and a pointer
- to a function that can decode it. The third field is a prescan
- function to be run over the section before displaying any of the
- sections. */
+/* A structure containing the name of a debug section
+ and a pointer to a function that can decode it. */
struct
{
- const char * const name;
- int (* display) PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
- int (* prescan) PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+ const char *const name;
+ int (*display) (Elf_Internal_Shdr *, unsigned char *, FILE *);
}
debug_displays[] =
{
- { ".debug_abbrev", display_debug_abbrev, NULL },
- { ".debug_aranges", display_debug_aranges, NULL },
- { ".debug_frame", display_debug_frames, NULL },
- { ".debug_info", display_debug_info, prescan_debug_info },
- { ".debug_line", display_debug_lines, NULL },
- { ".debug_pubnames", display_debug_pubnames, NULL },
- { ".eh_frame", display_debug_frames, NULL },
- { ".debug_macinfo", display_debug_macinfo, NULL },
- { ".debug_str", display_debug_str, NULL },
- { ".debug_loc", display_debug_loc, NULL },
- { ".debug_pubtypes", display_debug_not_supported, NULL },
- { ".debug_ranges", display_debug_not_supported, NULL },
- { ".debug_static_func", display_debug_not_supported, NULL },
- { ".debug_static_vars", display_debug_not_supported, NULL },
- { ".debug_types", display_debug_not_supported, NULL },
- { ".debug_weaknames", display_debug_not_supported, NULL }
+ { ".debug_abbrev", display_debug_abbrev },
+ { ".debug_aranges", display_debug_aranges },
+ { ".debug_frame", display_debug_frames },
+ { ".debug_info", display_debug_info },
+ { ".debug_line", display_debug_lines },
+ { ".debug_pubnames", display_debug_pubnames },
+ { ".eh_frame", display_debug_frames },
+ { ".debug_macinfo", display_debug_macinfo },
+ { ".debug_str", display_debug_str },
+ { ".debug_loc", display_debug_loc },
+ { ".debug_pubtypes", display_debug_pubnames },
+ { ".debug_ranges", display_debug_not_supported },
+ { ".debug_static_func", display_debug_not_supported },
+ { ".debug_static_vars", display_debug_not_supported },
+ { ".debug_types", display_debug_not_supported },
+ { ".debug_weaknames", display_debug_not_supported }
};
static int
-display_debug_section (section, file)
- Elf32_Internal_Shdr * section;
- FILE * file;
+display_debug_section (Elf_Internal_Shdr *section, FILE *file)
{
- char * name = SECTION_NAME (section);
- bfd_size_type length;
- unsigned char * start;
- int i;
+ char *name = SECTION_NAME (section);
+ bfd_size_type length;
+ unsigned char *start;
+ int i;
length = section->sh_size;
if (length == 0)
@@ -8975,8 +9351,8 @@ display_debug_section (section, file)
return 0;
}
- start = (unsigned char *) get_data (NULL, file, section->sh_offset, length,
- _("debug section data"));
+ start = get_data (NULL, file, section->sh_offset, length,
+ _("debug section data"));
if (!start)
return 0;
@@ -9004,55 +9380,17 @@ display_debug_section (section, file)
}
static int
-process_section_contents (file)
- FILE * file;
+process_section_contents (FILE *file)
{
- Elf32_Internal_Shdr * section;
- unsigned int i;
+ Elf_Internal_Shdr *section;
+ unsigned int i;
if (! do_dump)
return 1;
- /* Pre-scan the debug sections to find some debug information not
- present in some of them. For the .debug_line, we must find out the
- size of address (specified in .debug_info and .debug_aranges). */
for (i = 0, section = section_headers;
i < elf_header.e_shnum && i < num_dump_sects;
- i ++, section ++)
- {
- char * name = SECTION_NAME (section);
- int j;
-
- if (section->sh_size == 0)
- continue;
-
- /* See if there is some pre-scan operation for this section. */
- for (j = NUM_ELEM (debug_displays); j--;)
- if (strcmp (debug_displays[j].name, name) == 0)
- {
- if (debug_displays[j].prescan != NULL)
- {
- bfd_size_type length;
- unsigned char * start;
-
- length = section->sh_size;
- start = ((unsigned char *)
- get_data (NULL, file, section->sh_offset, length,
- _("debug section data")));
- if (!start)
- return 0;
-
- debug_displays[j].prescan (section, start, file);
- free (start);
- }
-
- break;
- }
- }
-
- for (i = 0, section = section_headers;
- i < elf_header.e_shnum && i < num_dump_sects;
- i ++, section ++)
+ i++, section++)
{
#ifdef SUPPORT_DISASSEMBLY
if (dump_sects[i] & DISASS_DUMP)
@@ -9072,8 +9410,7 @@ process_section_contents (file)
}
static void
-process_mips_fpe_exception (mask)
- int mask;
+process_mips_fpe_exception (int mask)
{
if (mask)
{
@@ -9094,10 +9431,9 @@ process_mips_fpe_exception (mask)
}
static int
-process_mips_specific (file)
- FILE * file;
+process_mips_specific (FILE *file)
{
- Elf_Internal_Dyn * entry;
+ Elf_Internal_Dyn *entry;
size_t liblist_offset = 0;
size_t liblistno = 0;
size_t conflictsno = 0;
@@ -9113,16 +9449,20 @@ process_mips_specific (file)
switch (entry->d_tag)
{
case DT_MIPS_LIBLIST:
- liblist_offset = entry->d_un.d_val - loadaddr;
+ liblist_offset
+ = offset_from_vma (file, entry->d_un.d_val,
+ liblistno * sizeof (Elf32_External_Lib));
break;
case DT_MIPS_LIBLISTNO:
liblistno = entry->d_un.d_val;
break;
case DT_MIPS_OPTIONS:
- options_offset = entry->d_un.d_val - loadaddr;
+ options_offset = offset_from_vma (file, entry->d_un.d_val, 0);
break;
case DT_MIPS_CONFLICT:
- conflicts_offset = entry->d_un.d_val - loadaddr;
+ conflicts_offset
+ = offset_from_vma (file, entry->d_un.d_val,
+ conflictsno * sizeof (Elf32_External_Conflict));
break;
case DT_MIPS_CONFLICTNO:
conflictsno = entry->d_un.d_val;
@@ -9133,13 +9473,12 @@ process_mips_specific (file)
if (liblist_offset != 0 && liblistno != 0 && do_dynamic)
{
- Elf32_External_Lib * elib;
+ Elf32_External_Lib *elib;
size_t cnt;
- elib = ((Elf32_External_Lib *)
- get_data (NULL, file, liblist_offset,
- liblistno * sizeof (Elf32_External_Lib),
- _("liblist")));
+ elib = get_data (NULL, file, liblist_offset,
+ liblistno * sizeof (Elf32_External_Lib),
+ _("liblist"));
if (elib)
{
printf ("\nSection '.liblist' contains %lu entries:\n",
@@ -9152,7 +9491,7 @@ process_mips_specific (file)
Elf32_Lib liblist;
time_t time;
char timebuf[20];
- struct tm * tmp;
+ struct tm *tmp;
liblist.l_name = BYTE_GET (elib[cnt].l_name);
time = BYTE_GET (elib[cnt].l_time_stamp);
@@ -9176,7 +9515,7 @@ process_mips_specific (file)
{
static const struct
{
- const char * name;
+ const char *name;
int bit;
}
l_flags_vals[] =
@@ -9212,23 +9551,22 @@ process_mips_specific (file)
if (options_offset != 0)
{
- Elf_External_Options * eopt;
- Elf_Internal_Shdr * sect = section_headers;
- Elf_Internal_Options * iopt;
- Elf_Internal_Options * option;
+ Elf_External_Options *eopt;
+ Elf_Internal_Shdr *sect = section_headers;
+ Elf_Internal_Options *iopt;
+ Elf_Internal_Options *option;
size_t offset;
int cnt;
/* Find the section header so that we get the size. */
while (sect->sh_type != SHT_MIPS_OPTIONS)
- ++ sect;
+ ++sect;
- eopt = (Elf_External_Options *) get_data (NULL, file, options_offset,
- sect->sh_size, _("options"));
+ eopt = get_data (NULL, file, options_offset, sect->sh_size,
+ _("options"));
if (eopt)
{
- iopt = ((Elf_Internal_Options *)
- malloc ((sect->sh_size / sizeof (eopt)) * sizeof (* iopt)));
+ iopt = malloc ((sect->sh_size / sizeof (eopt)) * sizeof (*iopt));
if (iopt == NULL)
{
error (_("Out of memory"));
@@ -9240,7 +9578,7 @@ process_mips_specific (file)
while (offset < sect->sh_size)
{
- Elf_External_Options * eoption;
+ Elf_External_Options *eoption;
eoption = (Elf_External_Options *) ((char *) eopt + offset);
@@ -9275,8 +9613,8 @@ process_mips_specific (file)
if (elf_header.e_machine == EM_MIPS)
{
/* 32bit form. */
- Elf32_External_RegInfo * ereg;
- Elf32_RegInfo reginfo;
+ Elf32_External_RegInfo *ereg;
+ Elf32_RegInfo reginfo;
ereg = (Elf32_External_RegInfo *) (option + 1);
reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);
@@ -9296,7 +9634,7 @@ process_mips_specific (file)
else
{
/* 64 bit form. */
- Elf64_External_RegInfo * ereg;
+ Elf64_External_RegInfo *ereg;
Elf64_Internal_RegInfo reginfo;
ereg = (Elf64_External_RegInfo *) (option + 1);
@@ -9393,7 +9731,7 @@ process_mips_specific (file)
break;
}
- len = sizeof (* eopt);
+ len = sizeof (*eopt);
while (len < option->size)
if (((char *) option)[len] >= ' '
&& ((char *) option)[len] < 0x7f)
@@ -9411,7 +9749,7 @@ process_mips_specific (file)
if (conflicts_offset != 0 && conflictsno != 0)
{
- Elf32_Conflict * iconf;
+ Elf32_Conflict *iconf;
size_t cnt;
if (dynamic_symbols == NULL)
@@ -9420,7 +9758,7 @@ process_mips_specific (file)
return 0;
}
- iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (* iconf));
+ iconf = malloc (conflictsno * sizeof (*iconf));
if (iconf == NULL)
{
error (_("Out of memory"));
@@ -9429,12 +9767,10 @@ process_mips_specific (file)
if (is_32bit_elf)
{
- Elf32_External_Conflict * econf32;
+ Elf32_External_Conflict *econf32;
- econf32 = ((Elf32_External_Conflict *)
- get_data (NULL, file, conflicts_offset,
- conflictsno * sizeof (* econf32),
- _("conflict")));
+ econf32 = get_data (NULL, file, conflicts_offset,
+ conflictsno * sizeof (*econf32), _("conflict"));
if (!econf32)
return 0;
@@ -9445,12 +9781,10 @@ process_mips_specific (file)
}
else
{
- Elf64_External_Conflict * econf64;
+ Elf64_External_Conflict *econf64;
- econf64 = ((Elf64_External_Conflict *)
- get_data (NULL, file, conflicts_offset,
- conflictsno * sizeof (* econf64),
- _("conflict")));
+ econf64 = get_data (NULL, file, conflicts_offset,
+ conflictsno * sizeof (*econf64), _("conflict"));
if (!econf64)
return 0;
@@ -9460,15 +9794,15 @@ process_mips_specific (file)
free (econf64);
}
- printf (_("\nSection '.conflict' contains %ld entries:\n"),
- (long) conflictsno);
+ printf (_("\nSection '.conflict' contains %lu entries:\n"),
+ (unsigned long) conflictsno);
puts (_(" Num: Index Value Name"));
for (cnt = 0; cnt < conflictsno; ++cnt)
{
- Elf_Internal_Sym * psym = & dynamic_symbols [iconf [cnt]];
+ Elf_Internal_Sym *psym = & dynamic_symbols[iconf[cnt]];
- printf ("%5lu: %8lu ", (unsigned long) cnt, iconf [cnt]);
+ printf ("%5lu: %8lu ", (unsigned long) cnt, iconf[cnt]);
print_vma (psym->st_value, FULL_HEX);
putchar (' ');
print_symbol (25, dynamic_strings + psym->st_name);
@@ -9482,12 +9816,11 @@ process_mips_specific (file)
}
static int
-process_gnu_liblist (file)
- FILE * file;
+process_gnu_liblist (FILE *file)
{
- Elf_Internal_Shdr * section, * string_sec;
- Elf32_External_Lib * elib;
- char * strtab;
+ Elf_Internal_Shdr *section, *string_sec;
+ Elf32_External_Lib *elib;
+ char *strtab;
size_t cnt;
unsigned i;
@@ -9496,22 +9829,20 @@ process_gnu_liblist (file)
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i++, section ++)
+ i++, section++)
{
switch (section->sh_type)
{
case SHT_GNU_LIBLIST:
- elib = ((Elf32_External_Lib *)
- get_data (NULL, file, section->sh_offset, section->sh_size,
- _("liblist")));
+ elib = get_data (NULL, file, section->sh_offset, section->sh_size,
+ _("liblist"));
if (elib == NULL)
break;
string_sec = SECTION_HEADER (section->sh_link);
- strtab = (char *) get_data (NULL, file, string_sec->sh_offset,
- string_sec->sh_size,
- _("liblist string table"));
+ strtab = get_data (NULL, file, string_sec->sh_offset,
+ string_sec->sh_size, _("liblist string table"));
if (strtab == NULL
|| section->sh_entsize != sizeof (Elf32_External_Lib))
@@ -9532,7 +9863,7 @@ process_gnu_liblist (file)
Elf32_Lib liblist;
time_t time;
char timebuf[20];
- struct tm * tmp;
+ struct tm *tmp;
liblist.l_name = BYTE_GET (elib[cnt].l_name);
time = BYTE_GET (elib[cnt].l_time_stamp);
@@ -9562,18 +9893,18 @@ process_gnu_liblist (file)
}
static const char *
-get_note_type (e_type)
- unsigned e_type;
+get_note_type (unsigned e_type)
{
static char buff[64];
switch (e_type)
{
+ case NT_AUXV: return _("NT_AUXV (auxiliary vector)");
case NT_PRSTATUS: return _("NT_PRSTATUS (prstatus structure)");
case NT_FPREGSET: return _("NT_FPREGSET (floating point registers)");
- case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)");
- case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)");
- case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)");
+ case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)");
+ case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)");
+ case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)");
case NT_PSTATUS: return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS: return _("NT_FPREGS (floating point registers)");
case NT_PSINFO: return _("NT_PSINFO (psinfo structure)");
@@ -9587,8 +9918,7 @@ get_note_type (e_type)
}
static const char *
-get_netbsd_elfcore_note_type (e_type)
- unsigned e_type;
+get_netbsd_elfcore_note_type (unsigned e_type)
{
static char buff[64];
@@ -9654,8 +9984,7 @@ get_netbsd_elfcore_note_type (e_type)
If the value of namesz is zero, there is no name present. */
static int
-process_note (pnote)
- Elf32_Internal_Note * pnote;
+process_note (Elf_Internal_Note *pnote)
{
const char *nt;
@@ -9685,20 +10014,16 @@ process_note (pnote)
static int
-process_corefile_note_segment (file, offset, length)
- FILE * file;
- bfd_vma offset;
- bfd_vma length;
+process_corefile_note_segment (FILE *file, bfd_vma offset, bfd_vma length)
{
- Elf_External_Note * pnotes;
- Elf_External_Note * external;
- int res = 1;
+ Elf_External_Note *pnotes;
+ Elf_External_Note *external;
+ int res = 1;
if (length <= 0)
return 0;
- pnotes = (Elf_External_Note *) get_data (NULL, file, offset, length,
- _("notes"));
+ pnotes = get_data (NULL, file, offset, length, _("notes"));
if (!pnotes)
return 0;
@@ -9710,9 +10035,9 @@ process_corefile_note_segment (file, offset, length)
while (external < (Elf_External_Note *)((char *) pnotes + length))
{
- Elf_External_Note * next;
- Elf32_Internal_Note inote;
- char * temp = NULL;
+ Elf_External_Note *next;
+ Elf_Internal_Note inote;
+ char *temp = NULL;
inote.type = BYTE_GET (external->type);
inote.namesz = BYTE_GET (external->namesz);
@@ -9771,37 +10096,18 @@ process_corefile_note_segment (file, offset, length)
}
static int
-process_corefile_note_segments (file)
- FILE * file;
+process_corefile_note_segments (FILE *file)
{
- Elf_Internal_Phdr * program_headers;
- Elf_Internal_Phdr * segment;
- unsigned int i;
- int res = 1;
-
- program_headers = (Elf_Internal_Phdr *) malloc
- (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
-
- if (program_headers == NULL)
- {
- error (_("Out of memory\n"));
- return 0;
- }
-
- if (is_32bit_elf)
- i = get_32bit_program_headers (file, program_headers);
- else
- i = get_64bit_program_headers (file, program_headers);
+ Elf_Internal_Phdr *segment;
+ unsigned int i;
+ int res = 1;
- if (i == 0)
- {
- free (program_headers);
+ if (! get_program_headers (file))
return 0;
- }
for (i = 0, segment = program_headers;
i < elf_header.e_phnum;
- i ++, segment ++)
+ i++, segment++)
{
if (segment->p_type == PT_NOTE)
res &= process_corefile_note_segment (file,
@@ -9809,14 +10115,11 @@ process_corefile_note_segments (file)
(bfd_vma) segment->p_filesz);
}
- free (program_headers);
-
return res;
}
static int
-process_corefile_contents (file)
- FILE * file;
+process_corefile_contents (FILE *file)
{
/* If we have not been asked to display the notes then do nothing. */
if (! do_notes)
@@ -9837,8 +10140,7 @@ process_corefile_contents (file)
}
static int
-process_arch_specific (file)
- FILE * file;
+process_arch_specific (FILE *file)
{
if (! do_arch)
return 1;
@@ -9856,24 +10158,29 @@ process_arch_specific (file)
}
static int
-get_file_header (file)
- FILE * file;
+get_file_header (FILE *file)
{
/* Read in the identity array. */
if (fread (elf_header.e_ident, EI_NIDENT, 1, file) != 1)
return 0;
/* Determine how to read the rest of the header. */
- switch (elf_header.e_ident [EI_DATA])
+ switch (elf_header.e_ident[EI_DATA])
{
default: /* fall through */
case ELFDATANONE: /* fall through */
- case ELFDATA2LSB: byte_get = byte_get_little_endian; break;
- case ELFDATA2MSB: byte_get = byte_get_big_endian; break;
+ case ELFDATA2LSB:
+ byte_get = byte_get_little_endian;
+ byte_put = byte_put_little_endian;
+ break;
+ case ELFDATA2MSB:
+ byte_get = byte_get_big_endian;
+ byte_put = byte_put_big_endian;
+ break;
}
/* For now we only support 32 bit and 64 bit ELF files. */
- is_32bit_elf = (elf_header.e_ident [EI_CLASS] != ELFCLASS64);
+ is_32bit_elf = (elf_header.e_ident[EI_CLASS] != ELFCLASS64);
/* Read in the rest of the header. */
if (is_32bit_elf)
@@ -9904,7 +10211,7 @@ get_file_header (file)
/* If we have been compiled with sizeof (bfd_vma) == 4, then
we will not be able to cope with the 64bit data found in
64 ELF files. Detect this now and abort before we start
- overwritting things. */
+ overwriting things. */
if (sizeof (bfd_vma) < 8)
{
error (_("This instance of readelf has been built without support for a\n\
@@ -9943,31 +10250,18 @@ get_file_header (file)
return 1;
}
+/* Process one ELF object file according to the command line options.
+ This file may actually be stored in an archive. The file is
+ positioned at the start of the ELF object. */
+
static int
-process_file (file_name)
- char * file_name;
+process_object (char *file_name, FILE *file)
{
- FILE * file;
- struct stat statbuf;
unsigned int i;
- if (stat (file_name, & statbuf) < 0)
- {
- error (_("Cannot stat input file %s.\n"), file_name);
- return 1;
- }
-
- file = fopen (file_name, "rb");
- if (file == NULL)
- {
- error (_("Input file %s not found.\n"), file_name);
- return 1;
- }
-
if (! get_file_header (file))
{
error (_("%s: Failed to read file header\n"), file_name);
- fclose (file);
return 1;
}
@@ -9983,16 +10277,20 @@ process_file (file_name)
printf (_("\nFile: %s\n"), file_name);
if (! process_file_header ())
- {
- fclose (file);
- return 1;
- }
+ return 1;
- process_section_headers (file);
+ if (! process_section_headers (file))
+ {
+ /* Without loaded section headers we
+ cannot process lots of things. */
+ do_unwind = do_version = do_dump = do_arch = 0;
- process_program_headers (file);
+ if (! do_using_dynamic)
+ do_syms = do_reloc = 0;
+ }
- process_dynamic_segment (file);
+ if (process_program_headers (file))
+ process_dynamic_segment (file);
process_relocs (file);
@@ -10012,7 +10310,11 @@ process_file (file_name)
process_arch_specific (file);
- fclose (file);
+ if (program_headers)
+ {
+ free (program_headers);
+ program_headers = NULL;
+ }
if (section_headers)
{
@@ -10049,13 +10351,237 @@ process_file (file_name)
return 0;
}
+/* Process an ELF archive. The file is positioned just after the
+ ARMAG string. */
+
+static int
+process_archive (char *file_name, FILE *file)
+{
+ struct ar_hdr arhdr;
+ size_t got;
+ unsigned long size;
+ char *longnames = NULL;
+ unsigned long longnames_size = 0;
+ size_t file_name_size;
+ int ret;
+
+ show_name = 1;
+
+ got = fread (&arhdr, 1, sizeof arhdr, file);
+ if (got != sizeof arhdr)
+ {
+ if (got == 0)
+ return 0;
+
+ error (_("%s: failed to read archive header\n"), file_name);
+ return 1;
+ }
+
+ if (memcmp (arhdr.ar_name, "/ ", 16) == 0)
+ {
+ /* This is the archive symbol table. Skip it.
+ FIXME: We should have an option to dump it. */
+ size = strtoul (arhdr.ar_size, NULL, 10);
+ if (fseek (file, size + (size & 1), SEEK_CUR) != 0)
+ {
+ error (_("%s: failed to skip archive symbol table\n"), file_name);
+ return 1;
+ }
+
+ got = fread (&arhdr, 1, sizeof arhdr, file);
+ if (got != sizeof arhdr)
+ {
+ if (got == 0)
+ return 0;
+
+ error (_("%s: failed to read archive header\n"), file_name);
+ return 1;
+ }
+ }
+
+ if (memcmp (arhdr.ar_name, "// ", 16) == 0)
+ {
+ /* This is the archive string table holding long member
+ names. */
+
+ longnames_size = strtoul (arhdr.ar_size, NULL, 10);
+
+ longnames = malloc (longnames_size);
+ if (longnames == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 1;
+ }
+
+ if (fread (longnames, longnames_size, 1, file) != 1)
+ {
+ free (longnames);
+ error(_("%s: failed to read string table\n"), file_name);
+ return 1;
+ }
+
+ if ((longnames_size & 1) != 0)
+ getc (file);
+
+ got = fread (&arhdr, 1, sizeof arhdr, file);
+ if (got != sizeof arhdr)
+ {
+ free (longnames);
+
+ if (got == 0)
+ return 0;
+
+ error (_("%s: failed to read archive header\n"), file_name);
+ return 1;
+ }
+ }
+
+ file_name_size = strlen (file_name);
+ ret = 0;
+
+ while (1)
+ {
+ char *name;
+ char *nameend;
+ char *namealc;
+
+ if (arhdr.ar_name[0] == '/')
+ {
+ unsigned long off;
+
+ off = strtoul (arhdr.ar_name + 1, NULL, 10);
+ if (off >= longnames_size)
+ {
+ error (_("%s: invalid archive string table offset %lu\n"), off);
+ ret = 1;
+ break;
+ }
+
+ name = longnames + off;
+ nameend = memchr (name, '/', longnames_size - off);
+ }
+ else
+ {
+ name = arhdr.ar_name;
+ nameend = memchr (name, '/', 16);
+ }
+
+ if (nameend == NULL)
+ {
+ error (_("%s: bad archive file name\n"));
+ ret = 1;
+ break;
+ }
+
+ namealc = malloc (file_name_size + (nameend - name) + 3);
+ if (namealc == NULL)
+ {
+ error (_("Out of memory\n"));
+ ret = 1;
+ break;
+ }
+
+ memcpy (namealc, file_name, file_name_size);
+ namealc[file_name_size] = '(';
+ memcpy (namealc + file_name_size + 1, name, nameend - name);
+ namealc[file_name_size + 1 + (nameend - name)] = ')';
+ namealc[file_name_size + 2 + (nameend - name)] = '\0';
+
+ archive_file_offset = ftell (file);
+ archive_file_size = strtoul (arhdr.ar_size, NULL, 10);
+
+ ret |= process_object (namealc, file);
+
+ free (namealc);
+
+ if (fseek (file,
+ (archive_file_offset
+ + archive_file_size
+ + (archive_file_size & 1)),
+ SEEK_SET) != 0)
+ {
+ error (_("%s: failed to seek to next archive header\n"), file_name);
+ ret = 1;
+ break;
+ }
+
+ got = fread (&arhdr, 1, sizeof arhdr, file);
+ if (got != sizeof arhdr)
+ {
+ if (got == 0)
+ break;
+
+ error (_("%s: failed to read archive header\n"), file_name);
+ ret = 1;
+ break;
+ }
+ }
+
+ if (longnames != 0)
+ free (longnames);
+
+ return ret;
+}
+
+static int
+process_file (char *file_name)
+{
+ FILE *file;
+ struct stat statbuf;
+ char armag[SARMAG];
+ int ret;
+
+ if (stat (file_name, &statbuf) < 0)
+ {
+ if (errno == ENOENT)
+ error (_("'%s': No such file\n"), file_name);
+ else
+ error (_("Could not locate '%s'. System error message: %s\n"),
+ file_name, strerror (errno));
+ return 1;
+ }
+
+ if (! S_ISREG (statbuf.st_mode))
+ {
+ error (_("'%s' is not an ordinary file\n"), file_name);
+ return 1;
+ }
+
+ file = fopen (file_name, "rb");
+ if (file == NULL)
+ {
+ error (_("Input file '%s' is not readable.\n"), file_name);
+ return 1;
+ }
+
+ if (fread (armag, SARMAG, 1, file) != 1)
+ {
+ error (_("%s: Failed to read file header\n"), file_name);
+ fclose (file);
+ return 1;
+ }
+
+ if (memcmp (armag, ARMAG, SARMAG) == 0)
+ ret = process_archive (file_name, file);
+ else
+ {
+ rewind (file);
+ archive_file_size = archive_file_offset = 0;
+ ret = process_object (file_name, file);
+ }
+
+ fclose (file);
+
+ return ret;
+}
+
#ifdef SUPPORT_DISASSEMBLY
/* Needed by the i386 disassembler. For extra credit, someone could
fix this so that we insert symbolic addresses here, esp for GOT/PLT
symbols. */
void
-print_address (unsigned int addr, FILE * outfile)
+print_address (unsigned int addr, FILE *outfile)
{
fprintf (outfile,"0x%8.8x", addr);
}
@@ -10068,14 +10594,12 @@ db_task_printsym (unsigned int addr)
}
#endif
-int main PARAMS ((int, char **));
-
int
-main (argc, argv)
- int argc;
- char ** argv;
+main (int argc, char **argv)
{
int err;
+ char *cmdline_dump_sects = NULL;
+ unsigned num_cmdline_dump_sects = 0;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
@@ -10091,12 +10615,38 @@ main (argc, argv)
if (optind < (argc - 1))
show_name = 1;
+ /* When processing more than one file remember the dump requests
+ issued on command line to reset them after each file. */
+ if (optind + 1 < argc && dump_sects != NULL)
+ {
+ cmdline_dump_sects = malloc (num_dump_sects);
+ if (cmdline_dump_sects == NULL)
+ error (_("Out of memory allocating dump request table."));
+ else
+ {
+ memcpy (cmdline_dump_sects, dump_sects, num_dump_sects);
+ num_cmdline_dump_sects = num_dump_sects;
+ }
+ }
+
err = 0;
while (optind < argc)
- err |= process_file (argv [optind ++]);
+ {
+ err |= process_file (argv[optind++]);
+
+ /* Reset dump requests. */
+ if (optind < argc && dump_sects != NULL)
+ {
+ num_dump_sects = num_cmdline_dump_sects;
+ if (num_cmdline_dump_sects > 0)
+ memcpy (dump_sects, cmdline_dump_sects, num_cmdline_dump_sects);
+ }
+ }
if (dump_sects != NULL)
free (dump_sects);
+ if (cmdline_dump_sects != NULL)
+ free (cmdline_dump_sects);
return err;
}
diff --git a/contrib/binutils/binutils/rename.c b/contrib/binutils/binutils/rename.c
index 1a6a86b..398152e 100644
--- a/contrib/binutils/binutils/rename.c
+++ b/contrib/binutils/binutils/rename.c
@@ -1,5 +1,5 @@
/* rename.c -- rename a file, preserving symlinks.
- Copyright 1999 Free Software Foundation, Inc.
+ Copyright 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -37,7 +37,7 @@
#define O_BINARY 0
#endif
-static int simple_copy PARAMS ((const char *, const char *));
+static int simple_copy (const char *, const char *);
/* The number of bytes to copy at once. */
#define COPY_BUF 8192
@@ -46,9 +46,7 @@ static int simple_copy PARAMS ((const char *, const char *));
Return 0 if ok, -1 if error. */
static int
-simple_copy (from, to)
- const char *from;
- const char *to;
+simple_copy (const char *from, const char *to)
{
int fromfd, tofd, nread;
int saved;
@@ -95,9 +93,7 @@ simple_copy (from, to)
STATBUF. */
void
-set_times (destination, statbuf)
- const char *destination;
- const struct stat *statbuf;
+set_times (const char *destination, const struct stat *statbuf)
{
int result;
@@ -144,12 +140,9 @@ set_times (destination, statbuf)
Return 0 if ok, -1 if error. */
int
-smart_rename (from, to, preserve_dates)
- const char *from;
- const char *to;
- int preserve_dates;
+smart_rename (const char *from, const char *to, int preserve_dates)
{
- boolean exists;
+ bfd_boolean exists;
struct stat s;
int ret = 0;
@@ -166,14 +159,18 @@ smart_rename (from, to, preserve_dates)
if (ret != 0)
{
/* We have to clean up here. */
-
- non_fatal (_("%s: rename: %s"), to, strerror (errno));
+ non_fatal (_("unable to rename '%s' reason: %s"), to, strerror (errno));
unlink (from);
}
#else
/* Use rename only if TO is not a symbolic link and has
- only one hard link. */
- if (! exists || (!S_ISLNK (s.st_mode) && s.st_nlink == 1))
+ only one hard link, and we have permission to write to it. */
+ if (! exists
+ || (!S_ISLNK (s.st_mode)
+ && S_ISREG (s.st_mode)
+ && (s.st_mode & S_IWUSR)
+ && s.st_nlink == 1)
+ )
{
ret = rename (from, to);
if (ret == 0)
@@ -200,7 +197,7 @@ smart_rename (from, to, preserve_dates)
else
{
/* We have to clean up here. */
- non_fatal (_("%s: rename: %s"), to, strerror (errno));
+ non_fatal (_("unable to rename '%s' reason: %s"), to, strerror (errno));
unlink (from);
}
}
@@ -208,7 +205,7 @@ smart_rename (from, to, preserve_dates)
{
ret = simple_copy (from, to);
if (ret != 0)
- non_fatal (_("%s: simple_copy: %s"), to, strerror (errno));
+ non_fatal (_("unable to copy file '%s' reason: %s"), to, strerror (errno));
if (preserve_dates)
set_times (to, &s);
diff --git a/contrib/binutils/binutils/resbin.c b/contrib/binutils/binutils/resbin.c
index 079818c..ad14bda 100644
--- a/contrib/binutils/binutils/resbin.c
+++ b/contrib/binutils/binutils/resbin.c
@@ -1,5 +1,6 @@
/* resbin.c -- manipulate the Windows binary resource format.
- Copyright 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -36,42 +37,43 @@
/* Local functions. */
-static void toosmall PARAMS ((const char *));
+static void toosmall (const char *);
+
static unichar *get_unicode
- PARAMS ((const unsigned char *, unsigned long, int, int *));
+ (const unsigned char *, unsigned long, int, int *);
static int get_resid
- PARAMS ((struct res_id *, const unsigned char *, unsigned long, int));
+ (struct res_id *, const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_generic
- PARAMS ((enum res_type, const unsigned char *, unsigned long));
+ (enum res_type, const unsigned char *, unsigned long);
static struct res_resource *bin_to_res_cursor
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_menu
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct menuitem *bin_to_res_menuitems
- PARAMS ((const unsigned char *, unsigned long, int, int *));
+ (const unsigned char *, unsigned long, int, int *);
static struct menuitem *bin_to_res_menuexitems
- PARAMS ((const unsigned char *, unsigned long, int, int *));
+ (const unsigned char *, unsigned long, int, int *);
static struct res_resource *bin_to_res_dialog
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_string
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_fontdir
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_accelerators
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_rcdata
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_group_cursor
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_group_icon
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_version
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static struct res_resource *bin_to_res_userdata
- PARAMS ((const unsigned char *, unsigned long, int));
+ (const unsigned char *, unsigned long, int);
static void get_version_header
- PARAMS ((const unsigned char *, unsigned long, int, const char *,
- unichar **, int *, int *, int *, int *));
+ (const unsigned char *, unsigned long, int, const char *,
+ unichar **, int *, int *, int *, int *);
/* Given a resource type ID, a pointer to data, a length, return a
res_resource structure which represents that resource. The caller
@@ -79,11 +81,8 @@ static void get_version_header
of the returned structure. */
struct res_resource *
-bin_to_res (type, data, length, big_endian)
- struct res_id type;
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res (struct res_id type, const unsigned char *data,
+ unsigned long length, int big_endian)
{
if (type.named)
return bin_to_res_userdata (data, length, big_endian);
@@ -128,8 +127,7 @@ bin_to_res (type, data, length, big_endian)
/* Give an error if the binary data is too small. */
static void
-toosmall (msg)
- const char *msg;
+toosmall (const char *msg)
{
fatal (_("%s: not enough binary data"), msg);
}
@@ -137,11 +135,8 @@ toosmall (msg)
/* Swap in a NULL terminated unicode string. */
static unichar *
-get_unicode (data, length, big_endian, retlen)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- int *retlen;
+get_unicode (const unsigned char *data, unsigned long length,
+ int big_endian, int *retlen)
{
int c, i;
unichar *ret;
@@ -171,11 +166,8 @@ get_unicode (data, length, big_endian, retlen)
/* Get a resource identifier. This returns the number of bytes used. */
static int
-get_resid (id, data, length, big_endian)
- struct res_id *id;
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+get_resid (struct res_id *id, const unsigned char *data,
+ unsigned long length, int big_endian)
{
int first;
@@ -203,10 +195,8 @@ get_resid (id, data, length, big_endian)
binary. */
struct res_resource *
-bin_to_res_generic (type, data, length)
- enum res_type type;
- const unsigned char *data;
- unsigned long length;
+bin_to_res_generic (enum res_type type, const unsigned char *data,
+ unsigned long length)
{
struct res_resource *r;
@@ -221,10 +211,8 @@ bin_to_res_generic (type, data, length)
/* Convert a cursor resource from binary. */
struct res_resource *
-bin_to_res_cursor (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_cursor (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct cursor *c;
struct res_resource *r;
@@ -248,10 +236,8 @@ bin_to_res_cursor (data, length, big_endian)
/* Convert a menu resource from binary. */
struct res_resource *
-bin_to_res_menu (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_menu (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct res_resource *r;
struct menu *m;
@@ -300,11 +286,8 @@ bin_to_res_menu (data, length, big_endian)
/* Convert menu items from binary. */
static struct menuitem *
-bin_to_res_menuitems (data, length, big_endian, read)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- int *read;
+bin_to_res_menuitems (const unsigned char *data, unsigned long length,
+ int big_endian, int *read)
{
struct menuitem *first, **pp;
@@ -381,11 +364,8 @@ bin_to_res_menuitems (data, length, big_endian, read)
/* Convert menuex items from binary. */
static struct menuitem *
-bin_to_res_menuexitems (data, length, big_endian, read)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- int *read;
+bin_to_res_menuexitems (const unsigned char *data, unsigned long length,
+ int big_endian, int *read)
{
struct menuitem *first, **pp;
@@ -459,10 +439,8 @@ bin_to_res_menuexitems (data, length, big_endian, read)
/* Convert a dialog resource from binary. */
static struct res_resource *
-bin_to_res_dialog (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_dialog (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int signature;
struct dialog *d;
@@ -647,10 +625,8 @@ bin_to_res_dialog (data, length, big_endian)
/* Convert a stringtable resource from binary. */
static struct res_resource *
-bin_to_res_string (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_string (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct stringtable *st;
int i;
@@ -696,10 +672,8 @@ bin_to_res_string (data, length, big_endian)
/* Convert a fontdir resource from binary. */
static struct res_resource *
-bin_to_res_fontdir (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_fontdir (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int c, i;
struct fontdir *first, **pp;
@@ -768,10 +742,8 @@ bin_to_res_fontdir (data, length, big_endian)
/* Convert an accelerators resource from binary. */
static struct res_resource *
-bin_to_res_accelerators (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_accelerators (const unsigned char *data, unsigned long length,
+ int big_endian)
{
struct accelerator *first, **pp;
struct res_resource *r;
@@ -813,10 +785,8 @@ bin_to_res_accelerators (data, length, big_endian)
/* Convert an rcdata resource from binary. */
static struct res_resource *
-bin_to_res_rcdata (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian ATTRIBUTE_UNUSED;
+bin_to_res_rcdata (const unsigned char *data, unsigned long length,
+ int big_endian ATTRIBUTE_UNUSED)
{
struct rcdata_item *ri;
struct res_resource *r;
@@ -838,10 +808,8 @@ bin_to_res_rcdata (data, length, big_endian)
/* Convert a group cursor resource from binary. */
static struct res_resource *
-bin_to_res_group_cursor (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_group_cursor (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int type, c, i;
struct group_cursor *first, **pp;
@@ -896,10 +864,8 @@ bin_to_res_group_cursor (data, length, big_endian)
/* Convert a group icon resource from binary. */
static struct res_resource *
-bin_to_res_group_icon (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_group_icon (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int type, c, i;
struct group_icon *first, **pp;
@@ -958,17 +924,9 @@ bin_to_res_group_icon (data, length, big_endian)
to the type, and *OFF to the offset to the children. */
static void
-get_version_header (data, length, big_endian, key, pkey, len, vallen, type,
- off)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
- const char *key;
- unichar **pkey;
- int *len;
- int *vallen;
- int *type;
- int *off;
+get_version_header (const unsigned char *data, unsigned long length,
+ int big_endian, const char *key, unichar **pkey,
+ int *len, int *vallen, int *type, int *off)
{
if (length < 8)
toosmall (key);
@@ -1015,10 +973,8 @@ get_version_header (data, length, big_endian, key, pkey, len, vallen, type,
/* Convert a version resource from binary. */
static struct res_resource *
-bin_to_res_version (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian;
+bin_to_res_version (const unsigned char *data, unsigned long length,
+ int big_endian)
{
int verlen, vallen, type, off;
struct fixed_versioninfo *fi;
@@ -1236,10 +1192,8 @@ bin_to_res_version (data, length, big_endian)
/* Convert an arbitrary user defined resource from binary. */
static struct res_resource *
-bin_to_res_userdata (data, length, big_endian)
- const unsigned char *data;
- unsigned long length;
- int big_endian ATTRIBUTE_UNUSED;
+bin_to_res_userdata (const unsigned char *data, unsigned long length,
+ int big_endian ATTRIBUTE_UNUSED)
{
struct rcdata_item *ri;
struct res_resource *r;
@@ -1266,43 +1220,41 @@ bin_to_res_userdata (data, length, big_endian)
/* Local functions used to convert resources to binary format. */
-static void dword_align_bin PARAMS ((struct bindata ***, unsigned long *));
-static struct bindata *resid_to_bin PARAMS ((struct res_id, int));
-static struct bindata *unicode_to_bin PARAMS ((const unichar *, int));
+static void dword_align_bin (struct bindata ***, unsigned long *);
+static struct bindata *resid_to_bin (struct res_id, int);
+static struct bindata *unicode_to_bin (const unichar *, int);
static struct bindata *res_to_bin_accelerator
- PARAMS ((const struct accelerator *, int));
+ (const struct accelerator *, int);
static struct bindata *res_to_bin_cursor
- PARAMS ((const struct cursor *, int));
+ (const struct cursor *, int);
static struct bindata *res_to_bin_group_cursor
- PARAMS ((const struct group_cursor *, int));
+ (const struct group_cursor *, int);
static struct bindata *res_to_bin_dialog
- PARAMS ((const struct dialog *, int));
+ (const struct dialog *, int);
static struct bindata *res_to_bin_fontdir
- PARAMS ((const struct fontdir *, int));
+ (const struct fontdir *, int);
static struct bindata *res_to_bin_group_icon
- PARAMS ((const struct group_icon *, int));
+ (const struct group_icon *, int);
static struct bindata *res_to_bin_menu
- PARAMS ((const struct menu *, int));
+ (const struct menu *, int);
static struct bindata *res_to_bin_menuitems
- PARAMS ((const struct menuitem *, int));
+ (const struct menuitem *, int);
static struct bindata *res_to_bin_menuexitems
- PARAMS ((const struct menuitem *, int));
+ (const struct menuitem *, int);
static struct bindata *res_to_bin_rcdata
- PARAMS ((const struct rcdata_item *, int));
+ (const struct rcdata_item *, int);
static struct bindata *res_to_bin_stringtable
- PARAMS ((const struct stringtable *, int));
-static struct bindata *string_to_unicode_bin PARAMS ((const char *, int));
+ (const struct stringtable *, int);
+static struct bindata *string_to_unicode_bin (const char *, int);
static struct bindata *res_to_bin_versioninfo
- PARAMS ((const struct versioninfo *, int));
+ (const struct versioninfo *, int);
static struct bindata *res_to_bin_generic
- PARAMS ((unsigned long, const unsigned char *));
+ (unsigned long, const unsigned char *);
/* Convert a resource to binary. */
struct bindata *
-res_to_bin (res, big_endian)
- const struct res_resource *res;
- int big_endian;
+res_to_bin (const struct res_resource *res, int big_endian)
{
switch (res->type)
{
@@ -1344,9 +1296,7 @@ res_to_bin (res, big_endian)
boundary. It updates *PPP and *LENGTH. */
static void
-dword_align_bin (ppp, length)
- struct bindata ***ppp;
- unsigned long *length;
+dword_align_bin (struct bindata ***ppp, unsigned long *length)
{
int add;
struct bindata *d;
@@ -1372,9 +1322,7 @@ dword_align_bin (ppp, length)
bindata structure. */
static struct bindata *
-resid_to_bin (id, big_endian)
- struct res_id id;
- int big_endian;
+resid_to_bin (struct res_id id, int big_endian)
{
struct bindata *d;
@@ -1407,9 +1355,7 @@ resid_to_bin (id, big_endian)
returns exactly one bindata structure. */
static struct bindata *
-unicode_to_bin (str, big_endian)
- const unichar *str;
- int big_endian;
+unicode_to_bin (const unichar *str, int big_endian)
{
int len;
struct bindata *d;
@@ -1447,9 +1393,8 @@ unicode_to_bin (str, big_endian)
/* Convert an accelerator resource to binary. */
static struct bindata *
-res_to_bin_accelerator (accelerators, big_endian)
- const struct accelerator *accelerators;
- int big_endian;
+res_to_bin_accelerator (const struct accelerator *accelerators,
+ int big_endian)
{
struct bindata *first, **pp;
const struct accelerator *a;
@@ -1483,9 +1428,7 @@ res_to_bin_accelerator (accelerators, big_endian)
/* Convert a cursor resource to binary. */
static struct bindata *
-res_to_bin_cursor (c, big_endian)
- const struct cursor *c;
- int big_endian;
+res_to_bin_cursor (const struct cursor *c, int big_endian)
{
struct bindata *d;
@@ -1507,9 +1450,8 @@ res_to_bin_cursor (c, big_endian)
/* Convert a group cursor resource to binary. */
static struct bindata *
-res_to_bin_group_cursor (group_cursors, big_endian)
- const struct group_cursor *group_cursors;
- int big_endian;
+res_to_bin_group_cursor (const struct group_cursor *group_cursors,
+ int big_endian)
{
struct bindata *first, **pp;
int c;
@@ -1556,9 +1498,7 @@ res_to_bin_group_cursor (group_cursors, big_endian)
/* Convert a dialog resource to binary. */
static struct bindata *
-res_to_bin_dialog (dialog, big_endian)
- const struct dialog *dialog;
- int big_endian;
+res_to_bin_dialog (const struct dialog *dialog, int big_endian)
{
int dialogex;
struct bindata *first, **pp;
@@ -1739,9 +1679,7 @@ res_to_bin_dialog (dialog, big_endian)
/* Convert a fontdir resource to binary. */
static struct bindata *
-res_to_bin_fontdir (fontdirs, big_endian)
- const struct fontdir *fontdirs;
- int big_endian;
+res_to_bin_fontdir (const struct fontdir *fontdirs, int big_endian)
{
struct bindata *first, **pp;
int c;
@@ -1787,9 +1725,7 @@ res_to_bin_fontdir (fontdirs, big_endian)
/* Convert a group icon resource to binary. */
static struct bindata *
-res_to_bin_group_icon (group_icons, big_endian)
- const struct group_icon *group_icons;
- int big_endian;
+res_to_bin_group_icon (const struct group_icon *group_icons, int big_endian)
{
struct bindata *first, **pp;
int c;
@@ -1838,9 +1774,7 @@ res_to_bin_group_icon (group_icons, big_endian)
/* Convert a menu resource to binary. */
static struct bindata *
-res_to_bin_menu (menu, big_endian)
- const struct menu *menu;
- int big_endian;
+res_to_bin_menu (const struct menu *menu, int big_endian)
{
int menuex;
struct bindata *d;
@@ -1873,9 +1807,7 @@ res_to_bin_menu (menu, big_endian)
/* Convert menu items to binary. */
static struct bindata *
-res_to_bin_menuitems (items, big_endian)
- const struct menuitem *items;
- int big_endian;
+res_to_bin_menuitems (const struct menuitem *items, int big_endian)
{
struct bindata *first, **pp;
const struct menuitem *mi;
@@ -1923,9 +1855,7 @@ res_to_bin_menuitems (items, big_endian)
/* Convert menuex items to binary. */
static struct bindata *
-res_to_bin_menuexitems (items, big_endian)
- const struct menuitem *items;
- int big_endian;
+res_to_bin_menuexitems (const struct menuitem *items, int big_endian)
{
struct bindata *first, **pp;
unsigned long length;
@@ -1997,9 +1927,7 @@ res_to_bin_menuexitems (items, big_endian)
to binary. */
static struct bindata *
-res_to_bin_rcdata (items, big_endian)
- const struct rcdata_item *items;
- int big_endian;
+res_to_bin_rcdata (const struct rcdata_item *items, int big_endian)
{
struct bindata *first, **pp;
const struct rcdata_item *ri;
@@ -2063,9 +1991,7 @@ res_to_bin_rcdata (items, big_endian)
/* Convert a stringtable resource to binary. */
static struct bindata *
-res_to_bin_stringtable (st, big_endian)
- const struct stringtable *st;
- int big_endian;
+res_to_bin_stringtable (const struct stringtable *st, int big_endian)
{
struct bindata *first, **pp;
int i;
@@ -2103,9 +2029,7 @@ res_to_bin_stringtable (st, big_endian)
returns exactly one bindata structure. */
static struct bindata *
-string_to_unicode_bin (s, big_endian)
- const char *s;
- int big_endian;
+string_to_unicode_bin (const char *s, int big_endian)
{
size_t len, i;
struct bindata *d;
@@ -2128,9 +2052,7 @@ string_to_unicode_bin (s, big_endian)
/* Convert a versioninfo resource to binary. */
static struct bindata *
-res_to_bin_versioninfo (versioninfo, big_endian)
- const struct versioninfo *versioninfo;
- int big_endian;
+res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
{
struct bindata *first, **pp;
unsigned long length;
@@ -2382,9 +2304,7 @@ res_to_bin_versioninfo (versioninfo, big_endian)
/* Convert a generic resource to binary. */
static struct bindata *
-res_to_bin_generic (length, data)
- unsigned long length;
- const unsigned char *data;
+res_to_bin_generic (unsigned long length, const unsigned char *data)
{
struct bindata *d;
diff --git a/contrib/binutils/binutils/rescoff.c b/contrib/binutils/binutils/rescoff.c
index e24402b..60122de 100644
--- a/contrib/binutils/binutils/rescoff.c
+++ b/contrib/binutils/binutils/rescoff.c
@@ -1,5 +1,6 @@
/* rescoff.c -- read and write resources in Windows COFF files.
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -102,20 +103,17 @@ struct extern_res_data
/* Local functions. */
-static void overrun PARAMS ((const struct coff_file_info *, const char *));
+static void overrun (const struct coff_file_info *, const char *);
static struct res_directory *read_coff_res_dir
- PARAMS ((const bfd_byte *, const struct coff_file_info *,
- const struct res_id *, int));
+ (const bfd_byte *, const struct coff_file_info *,
+ const struct res_id *, int);
static struct res_resource *read_coff_data_entry
- PARAMS ((const bfd_byte *, const struct coff_file_info *,
- const struct res_id *));
+ (const bfd_byte *, const struct coff_file_info *, const struct res_id *);
/* Read the resources in a COFF file. */
struct res_directory *
-read_coff_rsrc (filename, target)
- const char *filename;
- const char *target;
+read_coff_rsrc (const char *filename, const char *target)
{
bfd *abfd;
char **matching;
@@ -171,9 +169,7 @@ read_coff_rsrc (filename, target)
/* Give an error if we are out of bounds. */
static void
-overrun (finfo, msg)
- const struct coff_file_info *finfo;
- const char *msg;
+overrun (const struct coff_file_info *finfo, const char *msg)
{
fatal (_("%s: %s: address out of bounds"), finfo->filename, msg);
}
@@ -181,11 +177,8 @@ overrun (finfo, msg)
/* Read a resource directory. */
static struct res_directory *
-read_coff_res_dir (data, finfo, type, level)
- const bfd_byte *data;
- const struct coff_file_info *finfo;
- const struct res_id *type;
- int level;
+read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
+ const struct res_id *type, int level)
{
const struct extern_res_directory *erd;
struct res_directory *rd;
@@ -314,10 +307,7 @@ read_coff_res_dir (data, finfo, type, level)
/* Read a resource data entry. */
static struct res_resource *
-read_coff_data_entry (data, finfo, type)
- const bfd_byte *data;
- const struct coff_file_info *finfo;
- const struct res_id *type;
+read_coff_data_entry (const bfd_byte *data, const struct coff_file_info *finfo, const struct res_id *type)
{
const struct extern_res_data *erd;
struct res_resource *r;
@@ -408,12 +398,12 @@ struct coff_write_info
((cwi->big_endian) ? bfd_putb32 ((v), (s)) : bfd_putl32 ((v), (s)))
static void coff_bin_sizes
- PARAMS ((const struct res_directory *, struct coff_write_info *));
-static unsigned char *coff_alloc PARAMS ((struct bindata_build *, size_t));
+ (const struct res_directory *, struct coff_write_info *);
+static unsigned char *coff_alloc (struct bindata_build *, size_t);
static void coff_to_bin
- PARAMS ((const struct res_directory *, struct coff_write_info *));
+ (const struct res_directory *, struct coff_write_info *);
static void coff_res_to_bin
- PARAMS ((const struct res_resource *, struct coff_write_info *));
+ (const struct res_resource *, struct coff_write_info *);
/* Write resources to a COFF file. RESOURCES should already be
sorted.
@@ -424,10 +414,8 @@ static void coff_res_to_bin
adding the .rsrc section. */
void
-write_coff_file (filename, target, resources)
- const char *filename;
- const char *target;
- const struct res_directory *resources;
+write_coff_file (const char *filename, const char *target,
+ const struct res_directory *resources)
{
bfd *abfd;
asection *sec;
@@ -584,9 +572,8 @@ write_coff_file (filename, target, resources)
entries. This updates fields in CWI. */
static void
-coff_bin_sizes (resdir, cwi)
- const struct res_directory *resdir;
- struct coff_write_info *cwi;
+coff_bin_sizes (const struct res_directory *resdir,
+ struct coff_write_info *cwi)
{
const struct res_entry *re;
@@ -609,9 +596,7 @@ coff_bin_sizes (resdir, cwi)
/* Allocate data for a particular list. */
static unsigned char *
-coff_alloc (bb, size)
- struct bindata_build *bb;
- size_t size;
+coff_alloc (struct bindata_build *bb, size_t size)
{
struct bindata *d;
@@ -634,9 +619,7 @@ coff_alloc (bb, size)
/* Convert the resource directory RESDIR to binary. */
static void
-coff_to_bin (resdir, cwi)
- const struct res_directory *resdir;
- struct coff_write_info *cwi;
+coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
{
struct extern_res_directory *erd;
int ci, cn;
@@ -713,9 +696,7 @@ coff_to_bin (resdir, cwi)
/* Convert the resource RES to binary. */
static void
-coff_res_to_bin (res, cwi)
- const struct res_resource *res;
- struct coff_write_info *cwi;
+coff_res_to_bin (const struct res_resource *res, struct coff_write_info *cwi)
{
arelent *r;
struct extern_res_data *erd;
diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c
index 3cf708a..c290a9d 100644
--- a/contrib/binutils/binutils/resrc.c
+++ b/contrib/binutils/binutils/resrc.c
@@ -1,5 +1,5 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -161,24 +161,21 @@ static int icons;
/* Local functions. */
-static int run_cmd PARAMS ((char *, const char *));
-static FILE *open_input_stream PARAMS ((char *));
-static FILE *look_for_default PARAMS ((char *, const char *, int,
- const char *, const char *));
-static void close_input_stream PARAMS ((void));
-static void unexpected_eof PARAMS ((const char *));
-static int get_word PARAMS ((FILE *, const char *));
-static unsigned long get_long PARAMS ((FILE *, const char *));
-static void get_data
- PARAMS ((FILE *, unsigned char *, unsigned long, const char *));
-static void define_fontdirs PARAMS ((void));
+static int run_cmd (char *, const char *);
+static FILE *open_input_stream (char *);
+static FILE *look_for_default
+ (char *, const char *, int, const char *, const char *);
+static void close_input_stream (void);
+static void unexpected_eof (const char *);
+static int get_word (FILE *, const char *);
+static unsigned long get_long (FILE *, const char *);
+static void get_data (FILE *, unsigned char *, unsigned long, const char *);
+static void define_fontdirs (void);
/* Run `cmd' and redirect the output to `redir'. */
static int
-run_cmd (cmd, redir)
- char *cmd;
- const char *redir;
+run_cmd (char *cmd, const char *redir)
{
char *s;
int pid, wait_status, retcode;
@@ -254,7 +251,7 @@ run_cmd (cmd, redir)
/* Restore stdout to its previous setting. */
dup2 (stdout_save, STDOUT_FILENO);
- /* Close reponse file. */
+ /* Close response file. */
close (redir_handle);
if (pid == -1)
@@ -292,8 +289,7 @@ run_cmd (cmd, redir)
}
static FILE *
-open_input_stream (cmd)
- char *cmd;
+open_input_stream (char *cmd)
{
if (istream_type == ISTREAM_FILE)
{
@@ -333,12 +329,8 @@ open_input_stream (cmd)
/* look for the preprocessor program */
static FILE *
-look_for_default (cmd, prefix, end_prefix, preprocargs, filename)
- char *cmd;
- const char *prefix;
- int end_prefix;
- const char *preprocargs;
- const char *filename;
+look_for_default (char *cmd, const char *prefix, int end_prefix,
+ const char *preprocargs, const char *filename)
{
char *space;
int found;
@@ -386,12 +378,8 @@ look_for_default (cmd, prefix, end_prefix, preprocargs, filename)
/* Read an rc file. */
struct res_directory *
-read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file)
- const char *filename;
- const char *preprocessor;
- const char *preprocargs;
- int language;
- int use_temp_file;
+read_rc_file (const char *filename, const char *preprocessor,
+ const char *preprocargs, int language, int use_temp_file)
{
char *cmd;
@@ -497,7 +485,7 @@ read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file)
/* Close the input stream if it is open. */
static void
-close_input_stream ()
+close_input_stream (void)
{
if (istream_type == ISTREAM_FILE)
{
@@ -527,8 +515,7 @@ close_input_stream ()
/* Report an error while reading an rc file. */
void
-yyerror (msg)
- const char *msg;
+yyerror (const char *msg)
{
fatal ("%s:%d: %s", rc_filename, rc_lineno, msg);
}
@@ -536,8 +523,7 @@ yyerror (msg)
/* Issue a warning while reading an rc file. */
void
-rcparse_warning (msg)
- const char *msg;
+rcparse_warning (const char *msg)
{
fprintf (stderr, _("%s:%d: %s\n"), rc_filename, rc_lineno, msg);
}
@@ -545,8 +531,7 @@ rcparse_warning (msg)
/* Die if we get an unexpected end of file. */
static void
-unexpected_eof (msg)
- const char *msg;
+unexpected_eof (const char *msg)
{
fatal (_("%s: unexpected EOF"), msg);
}
@@ -555,9 +540,7 @@ unexpected_eof (msg)
endian. */
static int
-get_word (e, msg)
- FILE *e;
- const char *msg;
+get_word (FILE *e, const char *msg)
{
int b1, b2;
@@ -572,9 +555,7 @@ get_word (e, msg)
endian. */
static unsigned long
-get_long (e, msg)
- FILE *e;
- const char *msg;
+get_long (FILE *e, const char *msg)
{
int b1, b2, b3, b4;
@@ -593,11 +574,7 @@ get_long (e, msg)
/* Read data from a file. This is a wrapper to do error checking. */
static void
-get_data (e, p, c, msg)
- FILE *e;
- unsigned char *p;
- unsigned long c;
- const char *msg;
+get_data (FILE *e, unsigned char *p, unsigned long c, const char *msg)
{
unsigned long got;
@@ -611,10 +588,8 @@ get_data (e, p, c, msg)
/* Define an accelerator resource. */
void
-define_accelerator (id, resinfo, data)
- struct res_id id;
- const struct res_res_info *resinfo;
- struct accelerator *data;
+define_accelerator (struct res_id id, const struct res_res_info *resinfo,
+ struct accelerator *data)
{
struct res_resource *r;
@@ -632,10 +607,8 @@ define_accelerator (id, resinfo, data)
#define BITMAP_SKIP (14)
void
-define_bitmap (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_bitmap (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -676,10 +649,8 @@ define_bitmap (id, resinfo, filename)
select one of the actual cursors. */
void
-define_cursor (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_cursor (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -796,10 +767,8 @@ define_cursor (id, resinfo, filename)
/* Define a dialog resource. */
void
-define_dialog (id, resinfo, dialog)
- struct res_id id;
- const struct res_res_info *resinfo;
- const struct dialog *dialog;
+define_dialog (struct res_id id, const struct res_res_info *resinfo,
+ const struct dialog *dialog)
{
struct dialog *copy;
struct res_resource *r;
@@ -818,16 +787,10 @@ define_dialog (id, resinfo, dialog)
merely allocates and fills in a structure. */
struct dialog_control *
-define_control (text, id, x, y, width, height, class, style, exstyle)
- const char *text;
- unsigned long id;
- unsigned long x;
- unsigned long y;
- unsigned long width;
- unsigned long height;
- unsigned long class;
- unsigned long style;
- unsigned long exstyle;
+define_control (const struct res_id iid, unsigned long id, unsigned long x,
+ unsigned long y, unsigned long width, unsigned long height,
+ unsigned long class, unsigned long style,
+ unsigned long exstyle)
{
struct dialog_control *n;
@@ -842,9 +805,7 @@ define_control (text, id, x, y, width, height, class, style, exstyle)
n->height = height;
n->class.named = 0;
n->class.u.id = class;
- if (text == NULL)
- text = "";
- res_string_to_id (&n->text, text);
+ n->text = iid;
n->data = NULL;
n->help = 0;
@@ -852,21 +813,18 @@ define_control (text, id, x, y, width, height, class, style, exstyle)
}
struct dialog_control *
-define_icon_control (iid, id, x, y, style, exstyle, help, data, ex)
- struct res_id iid;
- unsigned long id;
- unsigned long x;
- unsigned long y;
- unsigned long style;
- unsigned long exstyle;
- unsigned long help;
- struct rcdata_item *data;
- struct dialog_ex *ex;
+define_icon_control (struct res_id iid, unsigned long id, unsigned long x,
+ unsigned long y, unsigned long style,
+ unsigned long exstyle, unsigned long help,
+ struct rcdata_item *data, struct dialog_ex *ex)
{
struct dialog_control *n;
+ struct res_id tid;
+
if (style == 0)
style = SS_ICON | WS_CHILD | WS_VISIBLE;
- n = define_control (0, id, x, y, 0, 0, CTL_STATIC, style, exstyle);
+ res_string_to_id (&tid, "");
+ n = define_control (tid, id, x, y, 0, 0, CTL_STATIC, style, exstyle);
n->text = iid;
if (help && !ex)
rcparse_warning (_("help ID requires DIALOGEX"));
@@ -881,10 +839,8 @@ define_icon_control (iid, id, x, y, style, exstyle, help, data, ex)
/* Define a font resource. */
void
-define_font (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_font (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -969,7 +925,7 @@ define_font (id, resinfo, filename)
file has been parsed, if any font resources were seen. */
static void
-define_fontdirs ()
+define_fontdirs (void)
{
struct res_resource *r;
struct res_id id;
@@ -991,10 +947,8 @@ define_fontdirs ()
select one of the actual icon bitmaps. */
void
-define_icon (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_icon (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -1086,10 +1040,20 @@ define_icon (id, resinfo, filename)
cg->height = icondirs[i].height;
cg->colors = icondirs[i].colorcount;
- cg->planes = 1;
- cg->bits = 0;
- while ((1 << cg->bits) < cg->colors)
- ++cg->bits;
+ if (icondirs[i].u.icon.planes)
+ cg->planes = icondirs[i].u.icon.planes;
+ else
+ cg->planes = 1;
+
+ if (icondirs[i].u.icon.bits)
+ cg->bits = icondirs[i].u.icon.bits;
+ else
+ {
+ cg->bits = 0;
+
+ while ((1L << cg->bits) < cg->colors)
+ ++cg->bits;
+ }
cg->bytes = icondirs[i].bytes;
cg->index = first_icon + i + 1;
@@ -1110,10 +1074,8 @@ define_icon (id, resinfo, filename)
/* Define a menu resource. */
void
-define_menu (id, resinfo, menuitems)
- struct res_id id;
- const struct res_res_info *resinfo;
- struct menuitem *menuitems;
+define_menu (struct res_id id, const struct res_res_info *resinfo,
+ struct menuitem *menuitems)
{
struct menu *m;
struct res_resource *r;
@@ -1132,13 +1094,9 @@ define_menu (id, resinfo, menuitems)
allocates and fills in a structure. */
struct menuitem *
-define_menuitem (text, menuid, type, state, help, menuitems)
- const char *text;
- int menuid;
- unsigned long type;
- unsigned long state;
- unsigned long help;
- struct menuitem *menuitems;
+define_menuitem (const char *text, int menuid, unsigned long type,
+ unsigned long state, unsigned long help,
+ struct menuitem *menuitems)
{
struct menuitem *mi;
@@ -1159,10 +1117,8 @@ define_menuitem (text, menuid, type, state, help, menuitems)
/* Define a messagetable resource. */
void
-define_messagetable (id, resinfo, filename)
- struct res_id id;
- const struct res_res_info *resinfo;
- const char *filename;
+define_messagetable (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
{
FILE *e;
char *real_filename;
@@ -1196,10 +1152,8 @@ define_messagetable (id, resinfo, filename)
/* Define an rcdata resource. */
void
-define_rcdata (id, resinfo, data)
- struct res_id id;
- const struct res_res_info *resinfo;
- struct rcdata_item *data;
+define_rcdata (struct res_id id, const struct res_res_info *resinfo,
+ struct rcdata_item *data)
{
struct res_resource *r;
@@ -1213,9 +1167,7 @@ define_rcdata (id, resinfo, data)
/* Create an rcdata item holding a string. */
struct rcdata_item *
-define_rcdata_string (string, len)
- const char *string;
- unsigned long len;
+define_rcdata_string (const char *string, unsigned long len)
{
struct rcdata_item *ri;
char *s;
@@ -1234,9 +1186,7 @@ define_rcdata_string (string, len)
/* Create an rcdata item holding a number. */
struct rcdata_item *
-define_rcdata_number (val, dword)
- unsigned long val;
- int dword;
+define_rcdata_number (unsigned long val, int dword)
{
struct rcdata_item *ri;
@@ -1252,10 +1202,8 @@ define_rcdata_number (val, dword)
which appears in a STRINGTABLE statement. */
void
-define_stringtable (resinfo, stringid, string)
- const struct res_res_info *resinfo;
- unsigned long stringid;
- const char *string;
+define_stringtable (const struct res_res_info *resinfo,
+ unsigned long stringid, const char *string)
{
struct res_id id;
struct res_resource *r;
@@ -1289,11 +1237,9 @@ define_stringtable (resinfo, stringid, string)
/* Define a user data resource where the data is in the rc file. */
void
-define_user_data (id, type, resinfo, data)
- struct res_id id;
- struct res_id type;
- const struct res_res_info *resinfo;
- struct rcdata_item *data;
+define_user_data (struct res_id id, struct res_id type,
+ const struct res_res_info *resinfo,
+ struct rcdata_item *data)
{
struct res_id ids[3];
struct res_resource *r;
@@ -1312,11 +1258,8 @@ define_user_data (id, type, resinfo, data)
/* Define a user data resource where the data is in a file. */
void
-define_user_file (id, type, resinfo, filename)
- struct res_id id;
- struct res_id type;
- const struct res_res_info *resinfo;
- const char *filename;
+define_user_file (struct res_id id, struct res_id type,
+ const struct res_res_info *resinfo, const char *filename)
{
FILE *e;
char *real_filename;
@@ -1357,11 +1300,9 @@ define_user_file (id, type, resinfo, filename)
/* Define a versioninfo resource. */
void
-define_versioninfo (id, language, fixedverinfo, verinfo)
- struct res_id id;
- int language;
- struct fixed_versioninfo *fixedverinfo;
- struct ver_info *verinfo;
+define_versioninfo (struct res_id id, int language,
+ struct fixed_versioninfo *fixedverinfo,
+ struct ver_info *verinfo)
{
struct res_resource *r;
@@ -1377,10 +1318,8 @@ define_versioninfo (id, language, fixedverinfo, verinfo)
/* Add string version info to a list of version information. */
struct ver_info *
-append_ver_stringfileinfo (verinfo, language, strings)
- struct ver_info *verinfo;
- const char *language;
- struct ver_stringinfo *strings;
+append_ver_stringfileinfo (struct ver_info *verinfo, const char *language,
+ struct ver_stringinfo *strings)
{
struct ver_info *vi, **pp;
@@ -1400,10 +1339,8 @@ append_ver_stringfileinfo (verinfo, language, strings)
/* Add variable version info to a list of version information. */
struct ver_info *
-append_ver_varfileinfo (verinfo, key, var)
- struct ver_info *verinfo;
- const char *key;
- struct ver_varinfo *var;
+append_ver_varfileinfo (struct ver_info *verinfo, const char *key,
+ struct ver_varinfo *var)
{
struct ver_info *vi, **pp;
@@ -1423,10 +1360,8 @@ append_ver_varfileinfo (verinfo, key, var)
/* Append version string information to a list. */
struct ver_stringinfo *
-append_verval (strings, key, value)
- struct ver_stringinfo *strings;
- const char *key;
- const char *value;
+append_verval (struct ver_stringinfo *strings, const char *key,
+ const char *value)
{
struct ver_stringinfo *vs, **pp;
@@ -1445,10 +1380,8 @@ append_verval (strings, key, value)
/* Append version variable information to a list. */
struct ver_varinfo *
-append_vertrans (var, language, charset)
- struct ver_varinfo *var;
- unsigned long language;
- unsigned long charset;
+append_vertrans (struct ver_varinfo *var, unsigned long language,
+ unsigned long charset)
{
struct ver_varinfo *vv, **pp;
@@ -1466,42 +1399,35 @@ append_vertrans (var, language, charset)
/* Local functions used to write out an rc file. */
-static void indent PARAMS ((FILE *, int));
+static void indent (FILE *, int);
static void write_rc_directory
- PARAMS ((FILE *, const struct res_directory *, const struct res_id *,
- const struct res_id *, int *, int));
+ (FILE *, const struct res_directory *, const struct res_id *,
+ const struct res_id *, int *, int);
static void write_rc_subdir
- PARAMS ((FILE *, const struct res_entry *, const struct res_id *,
- const struct res_id *, int *, int));
+ (FILE *, const struct res_entry *, const struct res_id *,
+ const struct res_id *, int *, int);
static void write_rc_resource
- PARAMS ((FILE *, const struct res_id *, const struct res_id *,
- const struct res_resource *, int *));
-static void write_rc_accelerators
- PARAMS ((FILE *, const struct accelerator *));
-static void write_rc_cursor PARAMS ((FILE *, const struct cursor *));
-static void write_rc_group_cursor
- PARAMS ((FILE *, const struct group_cursor *));
-static void write_rc_dialog PARAMS ((FILE *, const struct dialog *));
-static void write_rc_dialog_control
- PARAMS ((FILE *, const struct dialog_control *));
-static void write_rc_fontdir PARAMS ((FILE *, const struct fontdir *));
-static void write_rc_group_icon PARAMS ((FILE *, const struct group_icon *));
-static void write_rc_menu PARAMS ((FILE *, const struct menu *, int));
-static void write_rc_menuitems
- PARAMS ((FILE *, const struct menuitem *, int, int));
-static void write_rc_rcdata PARAMS ((FILE *, const struct rcdata_item *, int));
+ (FILE *, const struct res_id *, const struct res_id *,
+ const struct res_resource *, int *);
+static void write_rc_accelerators (FILE *, const struct accelerator *);
+static void write_rc_cursor (FILE *, const struct cursor *);
+static void write_rc_group_cursor (FILE *, const struct group_cursor *);
+static void write_rc_dialog (FILE *, const struct dialog *);
+static void write_rc_dialog_control (FILE *, const struct dialog_control *);
+static void write_rc_fontdir (FILE *, const struct fontdir *);
+static void write_rc_group_icon (FILE *, const struct group_icon *);
+static void write_rc_menu (FILE *, const struct menu *, int);
+static void write_rc_menuitems (FILE *, const struct menuitem *, int, int);
+static void write_rc_rcdata (FILE *, const struct rcdata_item *, int);
static void write_rc_stringtable
- PARAMS ((FILE *, const struct res_id *, const struct stringtable *));
-static void write_rc_versioninfo PARAMS ((FILE *, const struct versioninfo *));
-static void write_rc_filedata
- PARAMS ((FILE *, unsigned long, const unsigned char *));
+ (FILE *, const struct res_id *, const struct stringtable *);
+static void write_rc_versioninfo (FILE *, const struct versioninfo *);
+static void write_rc_filedata (FILE *, unsigned long, const unsigned char *);
/* Indent a given number of spaces. */
static void
-indent (e, c)
- FILE *e;
- int c;
+indent (FILE *e, int c)
{
int i;
@@ -1520,9 +1446,7 @@ indent (e, c)
comes, this code will have to be fixed up. */
void
-write_rc_file (filename, resources)
- const char *filename;
- const struct res_directory *resources;
+write_rc_file (const char *filename, const struct res_directory *resources)
{
FILE *e;
int language;
@@ -1548,13 +1472,9 @@ write_rc_file (filename, resources)
language. LEVEL is the level in the tree. */
static void
-write_rc_directory (e, rd, type, name, language, level)
- FILE *e;
- const struct res_directory *rd;
- const struct res_id *type;
- const struct res_id *name;
- int *language;
- int level;
+write_rc_directory (FILE *e, const struct res_directory *rd,
+ const struct res_id *type, const struct res_id *name,
+ int *language, int level)
{
const struct res_entry *re;
@@ -1632,13 +1552,9 @@ write_rc_directory (e, rd, type, name, language, level)
LEVEL is the level in the tree. */
static void
-write_rc_subdir (e, re, type, name, language, level)
- FILE *e;
- const struct res_entry *re;
- const struct res_id *type;
- const struct res_id *name;
- int *language;
- int level;
+write_rc_subdir (FILE *e, const struct res_entry *re,
+ const struct res_id *type, const struct res_id *name,
+ int *language, int level)
{
fprintf (e, "\n");
switch (level)
@@ -1711,12 +1627,9 @@ write_rc_subdir (e, re, type, name, language, level)
language. */
static void
-write_rc_resource (e, type, name, res, language)
- FILE *e;
- const struct res_id *type;
- const struct res_id *name;
- const struct res_resource *res;
- int *language;
+write_rc_resource (FILE *e, const struct res_id *type,
+ const struct res_id *name, const struct res_resource *res,
+ int *language)
{
const char *s;
int rt;
@@ -1964,9 +1877,7 @@ write_rc_resource (e, type, name, res, language)
/* Write out accelerator information. */
static void
-write_rc_accelerators (e, accelerators)
- FILE *e;
- const struct accelerator *accelerators;
+write_rc_accelerators (FILE *e, const struct accelerator *accelerators)
{
const struct accelerator *acc;
@@ -2017,9 +1928,7 @@ write_rc_accelerators (e, accelerators)
file, which the rc file would include. */
static void
-write_rc_cursor (e, cursor)
- FILE *e;
- const struct cursor *cursor;
+write_rc_cursor (FILE *e, const struct cursor *cursor)
{
fprintf (e, "// Hotspot: x: %d; y: %d\n", cursor->xhotspot,
cursor->yhotspot);
@@ -2030,9 +1939,7 @@ write_rc_cursor (e, cursor)
cursor data. */
static void
-write_rc_group_cursor (e, group_cursor)
- FILE *e;
- const struct group_cursor *group_cursor;
+write_rc_group_cursor (FILE *e, const struct group_cursor *group_cursor)
{
const struct group_cursor *gc;
@@ -2048,9 +1955,7 @@ write_rc_group_cursor (e, group_cursor)
/* Write dialog data. */
static void
-write_rc_dialog (e, dialog)
- FILE *e;
- const struct dialog *dialog;
+write_rc_dialog (FILE *e, const struct dialog *dialog)
{
const struct dialog_control *control;
@@ -2143,9 +2048,7 @@ static const struct control_info control_info[] =
/* Write a dialog control. */
static void
-write_rc_dialog_control (e, control)
- FILE *e;
- const struct dialog_control *control;
+write_rc_dialog_control (FILE *e, const struct dialog_control *control)
{
const struct control_info *ci;
@@ -2216,9 +2119,7 @@ write_rc_dialog_control (e, control)
the font data. */
static void
-write_rc_fontdir (e, fontdir)
- FILE *e;
- const struct fontdir *fontdir;
+write_rc_fontdir (FILE *e, const struct fontdir *fontdir)
{
const struct fontdir *fc;
@@ -2233,9 +2134,7 @@ write_rc_fontdir (e, fontdir)
icon data. */
static void
-write_rc_group_icon (e, group_icon)
- FILE *e;
- const struct group_icon *group_icon;
+write_rc_group_icon (FILE *e, const struct group_icon *group_icon)
{
const struct group_icon *gi;
@@ -2251,10 +2150,7 @@ write_rc_group_icon (e, group_icon)
/* Write out a menu resource. */
static void
-write_rc_menu (e, menu, menuex)
- FILE *e;
- const struct menu *menu;
- int menuex;
+write_rc_menu (FILE *e, const struct menu *menu, int menuex)
{
if (menu->help != 0)
fprintf (e, "// Help ID: %lu\n", menu->help);
@@ -2264,11 +2160,8 @@ write_rc_menu (e, menu, menuex)
/* Write out menuitems. */
static void
-write_rc_menuitems (e, menuitems, menuex, ind)
- FILE *e;
- const struct menuitem *menuitems;
- int menuex;
- int ind;
+write_rc_menuitems (FILE *e, const struct menuitem *menuitems, int menuex,
+ int ind)
{
const struct menuitem *mi;
@@ -2353,10 +2246,7 @@ write_rc_menuitems (e, menuitems, menuex, ind)
resources that need to print arbitrary data. */
static void
-write_rc_rcdata (e, rcdata, ind)
- FILE *e;
- const struct rcdata_item *rcdata;
- int ind;
+write_rc_rcdata (FILE *e, const struct rcdata_item *rcdata, int ind)
{
const struct rcdata_item *ri;
@@ -2521,10 +2411,8 @@ write_rc_rcdata (e, rcdata, ind)
/* Write out a stringtable resource. */
static void
-write_rc_stringtable (e, name, stringtable)
- FILE *e;
- const struct res_id *name;
- const struct stringtable *stringtable;
+write_rc_stringtable (FILE *e, const struct res_id *name,
+ const struct stringtable *stringtable)
{
unsigned long offset;
int i;
@@ -2557,9 +2445,7 @@ write_rc_stringtable (e, name, stringtable)
/* Write out a versioninfo resource. */
static void
-write_rc_versioninfo (e, versioninfo)
- FILE *e;
- const struct versioninfo *versioninfo;
+write_rc_versioninfo (FILE *e, const struct versioninfo *versioninfo)
{
const struct fixed_versioninfo *f;
const struct ver_info *vi;
@@ -2648,10 +2534,7 @@ write_rc_versioninfo (e, versioninfo)
/* Write out data which would normally be read from a file. */
static void
-write_rc_filedata (e, length, data)
- FILE *e;
- unsigned long length;
- const unsigned char *data;
+write_rc_filedata (FILE *e, unsigned long length, const unsigned char *data)
{
unsigned long i;
diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c
index 792cb82..9875493 100644
--- a/contrib/binutils/binutils/size.c
+++ b/contrib/binutils/binutils/size.c
@@ -1,6 +1,6 @@
/* size.c -- report size of various sections of an executable file.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -61,33 +61,31 @@ static char *target = NULL;
/* Static declarations. */
-static void usage PARAMS ((FILE *, int));
-static void display_file PARAMS ((char *));
-static void display_bfd PARAMS ((bfd *));
-static void display_archive PARAMS ((bfd *));
-static int size_number PARAMS ((bfd_size_type));
+static void usage (FILE *, int);
+static void display_file (char *);
+static void display_bfd (bfd *);
+static void display_archive (bfd *);
+static int size_number (bfd_size_type);
#if 0
-static void lprint_number PARAMS ((int, bfd_size_type));
+static void lprint_number (int, bfd_size_type);
#endif
-static void rprint_number PARAMS ((int, bfd_size_type));
-static void print_berkeley_format PARAMS ((bfd *));
-static void sysv_internal_sizer PARAMS ((bfd *, asection *, PTR));
-static void sysv_internal_printer PARAMS ((bfd *, asection *, PTR));
-static void print_sysv_format PARAMS ((bfd *));
-static void print_sizes PARAMS ((bfd * file));
-static void berkeley_sum PARAMS ((bfd *, sec_ptr, PTR));
+static void rprint_number (int, bfd_size_type);
+static void print_berkeley_format (bfd *);
+static void sysv_internal_sizer (bfd *, asection *, void *);
+static void sysv_internal_printer (bfd *, asection *, void *);
+static void print_sysv_format (bfd *);
+static void print_sizes (bfd * file);
+static void berkeley_sum (bfd *, sec_ptr, void *);
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n"));
fprintf (stream, _(" The options are:\n\
-A|-B --format={sysv|berkeley} Select output style (default is %s)\n\
- -o|-d|-h --radix={8|10|16} Display numbers in octal, decimal or hex\n\
+ -o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\
-t --totals Display the total sizes (Berkeley only)\n\
--target=<bfdname> Set the binary file format\n\
-h --help Display this information\n\
@@ -116,12 +114,10 @@ struct option long_options[] =
{0, no_argument, 0, 0}
};
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int temp;
int c;
@@ -260,8 +256,7 @@ main (argc, argv)
/* Display stats on file or archive member ABFD. */
static void
-display_bfd (abfd)
- bfd *abfd;
+display_bfd (bfd *abfd)
{
char **matching;
@@ -312,8 +307,7 @@ display_bfd (abfd)
}
static void
-display_archive (file)
- bfd *file;
+display_archive (bfd *file)
{
bfd *arfile = (bfd *) NULL;
bfd *last_arfile = (bfd *) NULL;
@@ -345,11 +339,14 @@ display_archive (file)
}
static void
-display_file (filename)
- char *filename;
+display_file (char *filename)
{
- bfd *file = bfd_openr (filename, target);
+ bfd *file;
+ if (get_file_size (filename) < 1)
+ return;
+
+ file = bfd_openr (filename, target);
if (file == NULL)
{
bfd_nonfatal (filename);
@@ -357,12 +354,12 @@ display_file (filename)
return;
}
- if (bfd_check_format (file, bfd_archive) == true)
+ if (bfd_check_format (file, bfd_archive))
display_archive (file);
else
display_bfd (file);
- if (bfd_close (file) == false)
+ if (!bfd_close (file))
{
bfd_nonfatal (filename);
return_code = 1;
@@ -373,8 +370,7 @@ display_file (filename)
/* This is what lexical functions are for. */
static int
-size_number (num)
- bfd_size_type num;
+size_number (bfd_size_type num)
{
char buffer[40];
@@ -391,9 +387,7 @@ size_number (num)
/* This is not used. */
static void
-lprint_number (width, num)
- int width;
- bfd_size_type num;
+lprint_number (int width, bfd_size_type num)
{
char buffer[40];
@@ -408,9 +402,7 @@ lprint_number (width, num)
#endif
static void
-rprint_number (width, num)
- int width;
- bfd_size_type num;
+rprint_number (int width, bfd_size_type num)
{
char buffer[40];
@@ -427,10 +419,8 @@ static bfd_size_type datasize;
static bfd_size_type textsize;
static void
-berkeley_sum (abfd, sec, ignore)
- bfd *abfd ATTRIBUTE_UNUSED;
- sec_ptr sec;
- PTR ignore ATTRIBUTE_UNUSED;
+berkeley_sum (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec,
+ void *ignore ATTRIBUTE_UNUSED)
{
flagword flags;
bfd_size_type size;
@@ -449,8 +439,7 @@ berkeley_sum (abfd, sec, ignore)
}
static void
-print_berkeley_format (abfd)
- bfd *abfd;
+print_berkeley_format (bfd *abfd)
{
static int files_seen = 0;
bfd_size_type total;
@@ -459,7 +448,7 @@ print_berkeley_format (abfd)
datasize = 0;
textsize = 0;
- bfd_map_over_sections (abfd, berkeley_sum, (PTR) NULL);
+ bfd_map_over_sections (abfd, berkeley_sum, NULL);
if (files_seen++ == 0)
#if 0
@@ -502,10 +491,8 @@ int svi_vmalen = 0;
int svi_sizelen = 0;
static void
-sysv_internal_sizer (file, sec, ignore)
- bfd *file ATTRIBUTE_UNUSED;
- sec_ptr sec;
- PTR ignore ATTRIBUTE_UNUSED;
+sysv_internal_sizer (bfd *file ATTRIBUTE_UNUSED, sec_ptr sec,
+ void *ignore ATTRIBUTE_UNUSED)
{
bfd_size_type size = bfd_section_size (file, sec);
@@ -526,10 +513,8 @@ sysv_internal_sizer (file, sec, ignore)
}
static void
-sysv_internal_printer (file, sec, ignore)
- bfd *file ATTRIBUTE_UNUSED;
- sec_ptr sec;
- PTR ignore ATTRIBUTE_UNUSED;
+sysv_internal_printer (bfd *file ATTRIBUTE_UNUSED, sec_ptr sec,
+ void *ignore ATTRIBUTE_UNUSED)
{
bfd_size_type size = bfd_section_size (file, sec);
@@ -548,14 +533,13 @@ sysv_internal_printer (file, sec, ignore)
}
static void
-print_sysv_format (file)
- bfd *file;
+print_sysv_format (bfd *file)
{
/* Size all of the columns. */
svi_total = 0;
svi_maxvma = 0;
svi_namelen = 0;
- bfd_map_over_sections (file, sysv_internal_sizer, (PTR) NULL);
+ bfd_map_over_sections (file, sysv_internal_sizer, NULL);
svi_vmalen = size_number ((bfd_size_type)svi_maxvma);
if ((size_t) svi_vmalen < sizeof ("addr") - 1)
@@ -574,7 +558,7 @@ print_sysv_format (file)
printf (":\n%-*s %*s %*s\n", svi_namelen, "section",
svi_sizelen, "size", svi_vmalen, "addr");
- bfd_map_over_sections (file, sysv_internal_printer, (PTR) NULL);
+ bfd_map_over_sections (file, sysv_internal_printer, NULL);
printf ("%-*s ", svi_namelen, "Total");
rprint_number (svi_sizelen, svi_total);
@@ -582,8 +566,7 @@ print_sysv_format (file)
}
static void
-print_sizes (file)
- bfd *file;
+print_sizes (bfd *file)
{
if (berkeley_format)
print_berkeley_format (file);
diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c
index a45437f..0ffa058 100644
--- a/contrib/binutils/binutils/srconv.c
+++ b/contrib/binutils/binutils/srconv.c
@@ -1,5 +1,5 @@
/* srconv.c -- Sysroff conversion program
- Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -42,61 +42,52 @@ static int addrsize;
static char *toolname;
static char **rnames;
-static int get_member_id PARAMS ((int));
-static int get_ordinary_id PARAMS ((int));
-static char *section_translate PARAMS ((char *));
-static char *strip_suffix PARAMS ((char *));
-static void checksum PARAMS ((FILE *, char *, int, int));
-static void writeINT PARAMS ((int, char *, int *, int, FILE *));
-static void writeBITS PARAMS ((int, char *, int *, int));
-static void writeBARRAY PARAMS ((barray, char *, int *, int, FILE *));
-static void writeCHARS PARAMS ((char *, char *, int *, int, FILE *));
-static void wr_tr PARAMS ((void));
-static void wr_un PARAMS ((struct coff_ofile *, struct coff_sfile *, int, int));
-static void wr_hd PARAMS ((struct coff_ofile *));
-static void wr_sh PARAMS ((struct coff_ofile *, struct coff_section *));
-static void wr_ob PARAMS ((struct coff_ofile *, struct coff_section *));
-static void wr_rl PARAMS ((struct coff_ofile *, struct coff_section *));
-static void wr_object_body PARAMS ((struct coff_ofile *));
+static int get_member_id (int);
+static int get_ordinary_id (int);
+static char *section_translate (char *);
+static char *strip_suffix (char *);
+static void checksum (FILE *, char *, int, int);
+static void writeINT (int, char *, int *, int, FILE *);
+static void writeBITS (int, char *, int *, int);
+static void writeBARRAY (barray, char *, int *, int, FILE *);
+static void writeCHARS (char *, char *, int *, int, FILE *);
+static void wr_tr (void);
+static void wr_un (struct coff_ofile *, struct coff_sfile *, int, int);
+static void wr_hd (struct coff_ofile *);
+static void wr_sh (struct coff_ofile *, struct coff_section *);
+static void wr_ob (struct coff_ofile *, struct coff_section *);
+static void wr_rl (struct coff_ofile *, struct coff_section *);
+static void wr_object_body (struct coff_ofile *);
static void wr_dps_start
- PARAMS ((struct coff_sfile *, struct coff_section *, struct coff_scope *,
- int, int));
-static void wr_dps_end
- PARAMS ((struct coff_section *, struct coff_scope *, int));
-static int *nints PARAMS ((int));
+ (struct coff_sfile *, struct coff_section *, struct coff_scope *, int, int);
+static void wr_dps_end (struct coff_section *, struct coff_scope *, int);
+static int *nints (int);
static void walk_tree_type_1
- PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
- int));
+ (struct coff_sfile *, struct coff_symbol *, struct coff_type *, int);
static void walk_tree_type
- PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
- int));
+ (struct coff_sfile *, struct coff_symbol *, struct coff_type *, int);
static void walk_tree_symbol
- PARAMS ((struct coff_sfile *, struct coff_section *,
- struct coff_symbol *, int));
+ (struct coff_sfile *, struct coff_section *, struct coff_symbol *, int);
static void walk_tree_scope
- PARAMS ((struct coff_section *, struct coff_sfile *, struct coff_scope *,
- int, int));
-static void walk_tree_sfile
- PARAMS ((struct coff_section *, struct coff_sfile *));
-static void wr_program_structure
- PARAMS ((struct coff_ofile *, struct coff_sfile *));
-static void wr_du PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_dus PARAMS ((struct coff_ofile *, struct coff_sfile *));
-static int find_base PARAMS ((struct coff_sfile *, struct coff_section *));
-static void wr_dln PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_globals
- PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_debug PARAMS ((struct coff_ofile *));
-static void wr_cs PARAMS ((void));
-static int wr_sc PARAMS ((struct coff_ofile *, struct coff_sfile *));
-static void wr_er PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_ed PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
-static void wr_unit_info PARAMS ((struct coff_ofile *));
-static void wr_module PARAMS ((struct coff_ofile *));
-static int align PARAMS ((int));
-static void prescan PARAMS ((struct coff_ofile *));
-static void show_usage PARAMS ((FILE *, int));
-extern int main PARAMS ((int, char **));
+ (struct coff_section *, struct coff_sfile *, struct coff_scope *, int, int);
+static void walk_tree_sfile (struct coff_section *, struct coff_sfile *);
+static void wr_program_structure (struct coff_ofile *, struct coff_sfile *);
+static void wr_du (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_dus (struct coff_ofile *, struct coff_sfile *);
+static int find_base (struct coff_sfile *, struct coff_section *);
+static void wr_dln (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_globals (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_debug (struct coff_ofile *);
+static void wr_cs (void);
+static int wr_sc (struct coff_ofile *, struct coff_sfile *);
+static void wr_er (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_ed (struct coff_ofile *, struct coff_sfile *, int);
+static void wr_unit_info (struct coff_ofile *);
+static void wr_module (struct coff_ofile *);
+static int align (int);
+static void prescan (struct coff_ofile *);
+static void show_usage (FILE *, int);
+extern int main (int, char **);
static FILE *file;
static bfd *abfd;
@@ -118,8 +109,7 @@ static int base1 = 0x18;
static int base2 = 0x2018;
static int
-get_member_id (x)
- int x;
+get_member_id (int x)
{
if (ids2[x])
return ids2[x];
@@ -129,8 +119,7 @@ get_member_id (x)
}
static int
-get_ordinary_id (x)
- int x;
+get_ordinary_id (int x)
{
if (ids1[x])
return ids1[x];
@@ -139,8 +128,7 @@ get_ordinary_id (x)
return ids1[x];
}
static char *
-section_translate (n)
- char *n;
+section_translate (char *n)
{
if (strcmp (n, ".text") == 0)
return "P";
@@ -155,8 +143,7 @@ section_translate (n)
static
char *
-strip_suffix (name)
- char *name;
+strip_suffix (char *name)
{
int i;
char *res;
@@ -171,11 +158,7 @@ strip_suffix (name)
/* IT LEN stuff CS */
static void
-checksum (file, ptr, size, code)
- FILE *file;
- char *ptr;
- int size;
- int code;
+checksum (FILE *file, char *ptr, int size, int code)
{
int j;
int last;
@@ -198,12 +181,7 @@ checksum (file, ptr, size, code)
static void
-writeINT (n, ptr, idx, size, file)
- int n;
- char *ptr;
- int *idx;
- int size;
- FILE *file;
+writeINT (int n, char *ptr, int *idx, int size, FILE *file)
{
int byte = *idx / 8;
@@ -244,11 +222,7 @@ writeINT (n, ptr, idx, size, file)
}
static void
-writeBITS (val, ptr, idx, size)
- int val;
- char *ptr;
- int *idx;
- int size;
+writeBITS (int val, char *ptr, int *idx, int size)
{
int byte = *idx / 8;
int bit = *idx % 8;
@@ -265,12 +239,8 @@ writeBITS (val, ptr, idx, size)
}
static void
-writeBARRAY (data, ptr, idx, size, file)
- barray data;
- char *ptr;
- int *idx;
- int size ATTRIBUTE_UNUSED;
- FILE *file;
+writeBARRAY (barray data, char *ptr, int *idx, int size ATTRIBUTE_UNUSED,
+ FILE *file)
{
int i;
@@ -280,12 +250,7 @@ writeBARRAY (data, ptr, idx, size, file)
}
static void
-writeCHARS (string, ptr, idx, size, file)
- char *string;
- char *ptr;
- int *idx;
- int size;
- FILE *file;
+writeCHARS (char *string, char *ptr, int *idx, int size, FILE *file)
{
int i = *idx / 8;
@@ -324,7 +289,7 @@ static char *rname_h8300[] =
};
static void
-wr_tr ()
+wr_tr (void)
{
/* The TR block is not normal - it doesn't have any contents. */
@@ -338,11 +303,8 @@ wr_tr ()
}
static void
-wr_un (ptr, sfile, first, nsecs)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile;
- int first;
- int nsecs ATTRIBUTE_UNUSED;
+wr_un (struct coff_ofile *ptr, struct coff_sfile *sfile, int first,
+ int nsecs ATTRIBUTE_UNUSED)
{
struct IT_un un;
struct coff_symbol *s;
@@ -387,8 +349,7 @@ wr_un (ptr, sfile, first, nsecs)
}
static void
-wr_hd (p)
- struct coff_ofile *p;
+wr_hd (struct coff_ofile *p)
{
struct IT_hd hd;
@@ -475,9 +436,7 @@ wr_hd (p)
static void
-wr_sh (p, sec)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_section *sec;
+wr_sh (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_section *sec)
{
struct IT_sh sh;
sh.unit = 0;
@@ -490,9 +449,7 @@ wr_sh (p, sec)
static void
-wr_ob (p, section)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_section *section;
+wr_ob (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_section *section)
{
bfd_size_type i;
int first = 1;
@@ -553,9 +510,7 @@ wr_ob (p, section)
}
static void
-wr_rl (ptr, sec)
- struct coff_ofile *ptr ATTRIBUTE_UNUSED;
- struct coff_section *sec;
+wr_rl (struct coff_ofile *ptr ATTRIBUTE_UNUSED, struct coff_section *sec)
{
int nr = sec->nrelocs;
int i;
@@ -613,8 +568,7 @@ wr_rl (ptr, sec)
}
static void
-wr_object_body (p)
- struct coff_ofile *p;
+wr_object_body (struct coff_ofile *p)
{
int i;
@@ -627,12 +581,9 @@ wr_object_body (p)
}
static void
-wr_dps_start (sfile, section, scope, type, nest)
- struct coff_sfile *sfile;
- struct coff_section *section ATTRIBUTE_UNUSED;
- struct coff_scope *scope;
- int type;
- int nest;
+wr_dps_start (struct coff_sfile *sfile,
+ struct coff_section *section ATTRIBUTE_UNUSED,
+ struct coff_scope *scope, int type, int nest)
{
struct IT_dps dps;
@@ -667,10 +618,8 @@ wr_dps_start (sfile, section, scope, type, nest)
}
static void
-wr_dps_end (section, scope, type)
- struct coff_section *section ATTRIBUTE_UNUSED;
- struct coff_scope *scope ATTRIBUTE_UNUSED;
- int type;
+wr_dps_end (struct coff_section *section ATTRIBUTE_UNUSED,
+ struct coff_scope *scope ATTRIBUTE_UNUSED, int type)
{
struct IT_dps dps;
@@ -680,18 +629,14 @@ wr_dps_end (section, scope, type)
}
static int *
-nints (x)
- int x;
+nints (int x)
{
return (int *) (xcalloc (sizeof (int), x));
}
static void
-walk_tree_type_1 (sfile, symbol, type, nest)
- struct coff_sfile *sfile;
- struct coff_symbol *symbol;
- struct coff_type *type;
- int nest;
+walk_tree_type_1 (struct coff_sfile *sfile, struct coff_symbol *symbol,
+ struct coff_type *type, int nest)
{
switch (type->type)
{
@@ -962,11 +907,8 @@ walk_tree_type_1 (sfile, symbol, type, nest)
*/
static void
-walk_tree_type (sfile, symbol, type, nest)
- struct coff_sfile *sfile;
- struct coff_symbol *symbol;
- struct coff_type *type;
- int nest;
+walk_tree_type (struct coff_sfile *sfile, struct coff_symbol *symbol,
+ struct coff_type *type, int nest)
{
if (symbol->type->type == coff_function_type)
{
@@ -1012,11 +954,7 @@ walk_tree_type (sfile, symbol, type, nest)
}
static void
-walk_tree_symbol (sfile, section, symbol, nest)
- struct coff_sfile *sfile;
- struct coff_section *section ATTRIBUTE_UNUSED;
- struct coff_symbol *symbol;
- int nest;
+walk_tree_symbol (struct coff_sfile *sfile, struct coff_section *section ATTRIBUTE_UNUSED, struct coff_symbol *symbol, int nest)
{
struct IT_dsy dsy;
@@ -1230,12 +1168,7 @@ walk_tree_symbol (sfile, section, symbol, nest)
}
static void
-walk_tree_scope (section, sfile, scope, nest, type)
- struct coff_section *section;
- struct coff_sfile *sfile;
- struct coff_scope *scope;
- int nest;
- int type;
+walk_tree_scope (struct coff_section *section, struct coff_sfile *sfile, struct coff_scope *scope, int nest, int type)
{
struct coff_symbol *vars;
struct coff_scope *child;
@@ -1259,26 +1192,19 @@ walk_tree_scope (section, sfile, scope, nest, type)
}
static void
-walk_tree_sfile (section, sfile)
- struct coff_section *section;
- struct coff_sfile *sfile;
+walk_tree_sfile (struct coff_section *section, struct coff_sfile *sfile)
{
walk_tree_scope (section, sfile, sfile->scope, 0, BLOCK_TYPE_COMPUNIT);
}
static void
-wr_program_structure (p, sfile)
- struct coff_ofile *p;
- struct coff_sfile *sfile;
+wr_program_structure (struct coff_ofile *p, struct coff_sfile *sfile)
{
walk_tree_sfile (p->sections + 4, sfile);
}
static void
-wr_du (p, sfile, n)
- struct coff_ofile *p;
- struct coff_sfile *sfile;
- int n;
+wr_du (struct coff_ofile *p, struct coff_sfile *sfile, int n)
{
struct IT_du du;
int lim;
@@ -1391,9 +1317,7 @@ wr_du (p, sfile, n)
}
static void
-wr_dus (p, sfile)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_sfile *sfile;
+wr_dus (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile)
{
struct IT_dus dus;
@@ -1429,19 +1353,14 @@ wr_dus (p, sfile)
.text section for the output file. */
static int
-find_base (sfile, section)
- struct coff_sfile *sfile;
- struct coff_section *section;
+find_base (struct coff_sfile *sfile, struct coff_section *section)
{
return sfile->section[section->number].low;
}
static void
-wr_dln (p, sfile, n)
- struct coff_ofile *p ATTRIBUTE_UNUSED;
- struct coff_sfile *sfile;
- int n ATTRIBUTE_UNUSED;
-
+wr_dln (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile,
+ int n ATTRIBUTE_UNUSED)
{
#if 0
if (n == 0)
@@ -1578,10 +1497,8 @@ wr_dln (p, sfile, n)
/* Write the global symbols out to the debug info. */
static void
-wr_globals (p, sfile, n)
- struct coff_ofile *p;
- struct coff_sfile *sfile;
- int n ATTRIBUTE_UNUSED;
+wr_globals (struct coff_ofile *p, struct coff_sfile *sfile,
+ int n ATTRIBUTE_UNUSED)
{
struct coff_symbol *sy;
@@ -1601,8 +1518,7 @@ wr_globals (p, sfile, n)
}
static void
-wr_debug (p)
- struct coff_ofile *p;
+wr_debug (struct coff_ofile *p)
{
struct coff_sfile *sfile;
int n = 0;
@@ -1623,7 +1539,7 @@ wr_debug (p)
}
static void
-wr_cs ()
+wr_cs (void)
{
/* It seems that the CS struct is not normal - the size is wrong
heres one I prepared earlier. */
@@ -1671,9 +1587,7 @@ wr_cs ()
if there isn't an equivalent one on the input. */
static int
-wr_sc (ptr, sfile)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile;
+wr_sc (struct coff_ofile *ptr, struct coff_sfile *sfile)
{
int i;
int scount = 0;
@@ -1795,10 +1709,8 @@ wr_sc (ptr, sfile)
/* Write out the ER records for a unit. */
static void
-wr_er (ptr, sfile, first)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile ATTRIBUTE_UNUSED;
- int first;
+wr_er (struct coff_ofile *ptr, struct coff_sfile *sfile ATTRIBUTE_UNUSED,
+ int first)
{
int idx = 0;
struct coff_symbol *sym;
@@ -1824,10 +1736,8 @@ wr_er (ptr, sfile, first)
/* Write out the ED records for a unit. */
static void
-wr_ed (ptr, sfile, first)
- struct coff_ofile *ptr;
- struct coff_sfile *sfile ATTRIBUTE_UNUSED;
- int first;
+wr_ed (struct coff_ofile *ptr, struct coff_sfile *sfile ATTRIBUTE_UNUSED,
+ int first)
{
struct coff_symbol *s;
@@ -1866,8 +1776,7 @@ wr_ed (ptr, sfile, first)
}
static void
-wr_unit_info (ptr)
- struct coff_ofile *ptr;
+wr_unit_info (struct coff_ofile *ptr)
{
struct coff_sfile *sfile;
int first = 1;
@@ -1894,8 +1803,7 @@ wr_unit_info (ptr)
}
static void
-wr_module (p)
- struct coff_ofile *p;
+wr_module (struct coff_ofile *p)
{
wr_cs ();
wr_hd (p);
@@ -1906,8 +1814,7 @@ wr_module (p)
}
static int
-align (x)
- int x;
+align (int x)
{
return (x + 3) & ~3;
}
@@ -1916,8 +1823,7 @@ align (x)
ordinary defs - dunno why, but thats what hitachi does with 'em. */
static void
-prescan (tree)
- struct coff_ofile *tree;
+prescan (struct coff_ofile *tree)
{
struct coff_symbol *s;
struct coff_section *common_section;
@@ -1945,9 +1851,7 @@ prescan (tree)
char *program_name;
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
fprintf (file, _("Convert a COFF object file into a SYSROFF object file\n"));
@@ -1964,9 +1868,7 @@ show_usage (file, status)
}
int
-main (ac, av)
- int ac;
- char *av[];
+main (int ac, char **av)
{
int opt;
static struct option long_options[] =
diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c
index 0873582..7af10ef 100644
--- a/contrib/binutils/binutils/stabs.c
+++ b/contrib/binutils/binutils/stabs.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse stabs debugging information
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -35,10 +35,6 @@
#include "debug.h"
#include "budbg.h"
#include "filenames.h"
-
-/* Meaningless definition needs by aout64.h. FIXME. */
-#define BYTES_IN_WORD 4
-
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
@@ -53,8 +49,8 @@ struct stab_handle
{
/* The BFD. */
bfd *abfd;
- /* True if this is stabs in sections. */
- boolean sections;
+ /* TRUE if this is stabs in sections. */
+ bfd_boolean sections;
/* The symbol table. */
asymbol **syms;
/* The number of symbols. */
@@ -74,7 +70,7 @@ struct stab_handle
int gcc_compiled;
/* Whether an N_OPT symbol was seen that was not generated by gcc,
so that we can detect the SunPRO compiler. */
- boolean n_opt_found;
+ bfd_boolean n_opt_found;
/* The main file name. */
char *main_filename;
/* A stack of unfinished N_BINCL files. */
@@ -82,7 +78,7 @@ struct stab_handle
/* A list of finished N_BINCL files. */
struct bincl_file *bincl_list;
/* Whether we are inside a function or not. */
- boolean within_function;
+ bfd_boolean within_function;
/* The address of the end of the function, used if we have seen an
N_FUN symbol while in a function. This is -1 if we have not seen
an N_FUN (the normal case). */
@@ -101,7 +97,7 @@ struct stab_handle
struct stab_tag *tags;
/* Set by parse_stab_type if it sees a structure defined as a cross
reference to itself. Reset by parse_stab_type otherwise. */
- boolean self_crossref;
+ bfd_boolean self_crossref;
};
/* A list of these structures is used to hold pending variable
@@ -151,76 +147,70 @@ struct stab_tag
debug_type type;
};
-static char *savestring PARAMS ((const char *, int));
-static bfd_vma parse_number PARAMS ((const char **, boolean *));
-static void bad_stab PARAMS ((const char *));
-static void warn_stab PARAMS ((const char *, const char *));
-static boolean parse_stab_string
- PARAMS ((PTR, struct stab_handle *, int, int, bfd_vma, const char *));
+static char *savestring (const char *, int);
+static bfd_vma parse_number (const char **, bfd_boolean *);
+static void bad_stab (const char *);
+static void warn_stab (const char *, const char *);
+static bfd_boolean parse_stab_string
+ (void *, struct stab_handle *, int, int, bfd_vma, const char *);
static debug_type parse_stab_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- debug_type **));
-static boolean parse_stab_type_number
- PARAMS ((const char **, int *));
+ (void *, struct stab_handle *, const char *, const char **, debug_type **);
+static bfd_boolean parse_stab_type_number (const char **, int *);
static debug_type parse_stab_range_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- const int *));
-static debug_type parse_stab_sun_builtin_type PARAMS ((PTR, const char **));
-static debug_type parse_stab_sun_floating_type
- PARAMS ((PTR, const char **));
-static debug_type parse_stab_enum_type PARAMS ((PTR, const char **));
+ (void *, struct stab_handle *, const char *, const char **, const int *);
+static debug_type parse_stab_sun_builtin_type (void *, const char **);
+static debug_type parse_stab_sun_floating_type (void *, const char **);
+static debug_type parse_stab_enum_type (void *, const char **);
static debug_type parse_stab_struct_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **, boolean,
- const int *));
-static boolean parse_stab_baseclasses
- PARAMS ((PTR, struct stab_handle *, const char **, debug_baseclass **));
-static boolean parse_stab_struct_fields
- PARAMS ((PTR, struct stab_handle *, const char **, debug_field **,
- boolean *));
-static boolean parse_stab_cpp_abbrev
- PARAMS ((PTR, struct stab_handle *, const char **, debug_field *));
-static boolean parse_stab_one_struct_field
- PARAMS ((PTR, struct stab_handle *, const char **, const char *,
- debug_field *, boolean *));
-static boolean parse_stab_members
- PARAMS ((PTR, struct stab_handle *, const char *, const char **,
- const int *, debug_method **));
+ (void *, struct stab_handle *, const char *, const char **,
+ bfd_boolean, const int *);
+static bfd_boolean parse_stab_baseclasses
+ (void *, struct stab_handle *, const char **, debug_baseclass **);
+static bfd_boolean parse_stab_struct_fields
+ (void *, struct stab_handle *, const char **, debug_field **, bfd_boolean *);
+static bfd_boolean parse_stab_cpp_abbrev
+ (void *, struct stab_handle *, const char **, debug_field *);
+static bfd_boolean parse_stab_one_struct_field
+ (void *, struct stab_handle *, const char **, const char *,
+ debug_field *, bfd_boolean *);
+static bfd_boolean parse_stab_members
+ (void *, struct stab_handle *, const char *, const char **, const int *,
+ debug_method **);
static debug_type parse_stab_argtypes
- PARAMS ((PTR, struct stab_handle *, debug_type, const char *, const char *,
- debug_type, const char *, boolean, boolean, const char **));
-static boolean parse_stab_tilde_field
- PARAMS ((PTR, struct stab_handle *, const char **, const int *,
- debug_type *, boolean *));
+ (void *, struct stab_handle *, debug_type, const char *, const char *,
+ debug_type, const char *, bfd_boolean, bfd_boolean, const char **);
+static bfd_boolean parse_stab_tilde_field
+ (void *, struct stab_handle *, const char **, const int *, debug_type *,
+ bfd_boolean *);
static debug_type parse_stab_array_type
- PARAMS ((PTR, struct stab_handle *, const char **, boolean));
-static void push_bincl PARAMS ((struct stab_handle *, const char *, bfd_vma));
-static const char *pop_bincl PARAMS ((struct stab_handle *));
-static boolean find_excl
- PARAMS ((struct stab_handle *, const char *, bfd_vma));
-static boolean stab_record_variable
- PARAMS ((PTR, struct stab_handle *, const char *, debug_type,
- enum debug_var_kind, bfd_vma));
-static boolean stab_emit_pending_vars PARAMS ((PTR, struct stab_handle *));
-static debug_type *stab_find_slot
- PARAMS ((struct stab_handle *, const int *));
-static debug_type stab_find_type
- PARAMS ((PTR, struct stab_handle *, const int *));
-static boolean stab_record_type
- PARAMS ((PTR, struct stab_handle *, const int *, debug_type));
+ (void *, struct stab_handle *, const char **, bfd_boolean);
+static void push_bincl (struct stab_handle *, const char *, bfd_vma);
+static const char *pop_bincl (struct stab_handle *);
+static bfd_boolean find_excl (struct stab_handle *, const char *, bfd_vma);
+static bfd_boolean stab_record_variable
+ (void *, struct stab_handle *, const char *, debug_type,
+ enum debug_var_kind, bfd_vma);
+static bfd_boolean stab_emit_pending_vars (void *, struct stab_handle *);
+static debug_type *stab_find_slot (struct stab_handle *, const int *);
+static debug_type stab_find_type (void *, struct stab_handle *, const int *);
+static bfd_boolean stab_record_type
+ (void *, struct stab_handle *, const int *, debug_type);
static debug_type stab_xcoff_builtin_type
- PARAMS ((PTR, struct stab_handle *, int));
+ (void *, struct stab_handle *, int);
static debug_type stab_find_tagged_type
- PARAMS ((PTR, struct stab_handle *, const char *, int,
- enum debug_type_kind));
+ (void *, struct stab_handle *, const char *, int, enum debug_type_kind);
static debug_type *stab_demangle_argtypes
- PARAMS ((PTR, struct stab_handle *, const char *, boolean *));
+ (void *, struct stab_handle *, const char *, bfd_boolean *, unsigned int);
+static debug_type *stab_demangle_v3_argtypes
+ (void *, struct stab_handle *, const char *, bfd_boolean *);
+static debug_type stab_demangle_v3_arg
+ (void *, struct stab_handle *, struct demangle_component *, debug_type,
+ bfd_boolean *);
/* Save a string in memory. */
static char *
-savestring (start, len)
- const char *start;
- int len;
+savestring (const char *start, int len)
{
char *ret;
@@ -233,15 +223,13 @@ savestring (start, len)
/* Read a number from a string. */
static bfd_vma
-parse_number (pp, poverflow)
- const char **pp;
- boolean *poverflow;
+parse_number (const char **pp, bfd_boolean *poverflow)
{
unsigned long ul;
const char *orig;
if (poverflow != NULL)
- *poverflow = false;
+ *poverflow = FALSE;
orig = *pp;
@@ -259,26 +247,24 @@ parse_number (pp, poverflow)
/* Note that even though strtoul overflowed, it should have set *pp
to the end of the number, which is where we want it. */
-
if (sizeof (bfd_vma) > sizeof (unsigned long))
{
const char *p;
- boolean neg;
+ bfd_boolean neg;
int base;
bfd_vma over, lastdig;
- boolean overflow;
+ bfd_boolean overflow;
bfd_vma v;
/* Our own version of strtoul, for a bfd_vma. */
-
p = orig;
- neg = false;
+ neg = FALSE;
if (*p == '+')
++p;
else if (*p == '-')
{
- neg = true;
+ neg = TRUE;
++p;
}
@@ -300,7 +286,7 @@ parse_number (pp, poverflow)
over = ((bfd_vma) (bfd_signed_vma) -1) / (bfd_vma) base;
lastdig = ((bfd_vma) (bfd_signed_vma) -1) % (bfd_vma) base;
- overflow = false;
+ overflow = FALSE;
v = 0;
while (1)
{
@@ -321,7 +307,7 @@ parse_number (pp, poverflow)
if (v > over || (v == over && (bfd_vma) d > lastdig))
{
- overflow = true;
+ overflow = TRUE;
break;
}
}
@@ -336,9 +322,8 @@ parse_number (pp, poverflow)
/* If we get here, the number is too large to represent in a
bfd_vma. */
-
if (poverflow != NULL)
- *poverflow = true;
+ *poverflow = TRUE;
else
warn_stab (orig, _("numeric overflow"));
@@ -348,8 +333,7 @@ parse_number (pp, poverflow)
/* Give an error for a bad stab string. */
static void
-bad_stab (p)
- const char *p;
+bad_stab (const char *p)
{
fprintf (stderr, _("Bad stab: %s\n"), p);
}
@@ -357,22 +341,16 @@ bad_stab (p)
/* Warn about something in a stab string. */
static void
-warn_stab (p, err)
- const char *p;
- const char *err;
+warn_stab (const char *p, const char *err)
{
fprintf (stderr, _("Warning: %s: %s\n"), err, p);
}
/* Create a handle to parse stabs symbols with. */
-PTR
-start_stab (dhandle, abfd, sections, syms, symcount)
- PTR dhandle ATTRIBUTE_UNUSED;
- bfd *abfd;
- boolean sections;
- asymbol **syms;
- long symcount;
+void *
+start_stab (void *dhandle ATTRIBUTE_UNUSED, bfd *abfd, bfd_boolean sections,
+ asymbol **syms, long symcount)
{
struct stab_handle *ret;
@@ -386,16 +364,14 @@ start_stab (dhandle, abfd, sections, syms, symcount)
ret->file_types = (struct stab_types **) xmalloc (sizeof *ret->file_types);
ret->file_types[0] = NULL;
ret->function_end = (bfd_vma) -1;
- return (PTR) ret;
+ return (void *) ret;
}
/* When we have processed all the stabs information, we need to go
through and fill in all the undefined tags. */
-boolean
-finish_stab (dhandle, handle)
- PTR dhandle;
- PTR handle;
+bfd_boolean
+finish_stab (void *dhandle, void *handle)
{
struct stab_handle *info = (struct stab_handle *) handle;
struct stab_tag *st;
@@ -404,8 +380,8 @@ finish_stab (dhandle, handle)
{
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, info->function_end))
- return false;
- info->within_function = false;
+ return FALSE;
+ info->within_function = FALSE;
info->function_end = (bfd_vma) -1;
}
@@ -418,22 +394,17 @@ finish_stab (dhandle, handle)
kind = DEBUG_KIND_STRUCT;
st->slot = debug_make_undefined_tagged_type (dhandle, st->name, kind);
if (st->slot == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Handle a single stabs symbol. */
-boolean
-parse_stab (dhandle, handle, type, desc, value, string)
- PTR dhandle;
- PTR handle;
- int type;
- int desc;
- bfd_vma value;
- const char *string;
+bfd_boolean
+parse_stab (void *dhandle, void *handle, int type, int desc, bfd_vma value,
+ const char *string)
{
struct stab_handle *info = (struct stab_handle *) handle;
@@ -445,11 +416,11 @@ parse_stab (dhandle, handle, type, desc, value, string)
&& (type != N_SO || *string == '\0' || value != info->so_value))
{
if (! debug_set_filename (dhandle, info->so_string))
- return false;
+ return FALSE;
info->main_filename = info->so_string;
info->gcc_compiled = 0;
- info->n_opt_found = false;
+ info->n_opt_found = FALSE;
/* Generally, for stabs in the symbol table, the N_LBRAC and
N_RBRAC symbols are relative to the N_SO symbol value. */
@@ -483,7 +454,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
if (! info->within_function)
{
fprintf (stderr, _("N_LBRAC not within function\n"));
- return false;
+ return FALSE;
}
/* Start an inner lexical block. */
@@ -491,11 +462,11 @@ parse_stab (dhandle, handle, type, desc, value, string)
(value
+ info->file_start_offset
+ info->function_start_offset)))
- return false;
+ return FALSE;
/* Emit any pending variable definitions. */
if (! stab_emit_pending_vars (dhandle, info))
- return false;
+ return FALSE;
++info->block_depth;
break;
@@ -509,20 +480,20 @@ parse_stab (dhandle, handle, type, desc, value, string)
if we do, we probably need to emit them before closing the
block. */
if (! stab_emit_pending_vars (dhandle, info))
- return false;
+ return FALSE;
/* End an inner lexical block. */
if (! debug_end_block (dhandle,
(value
+ info->file_start_offset
+ info->function_start_offset)))
- return false;
+ return FALSE;
--info->block_depth;
if (info->block_depth < 0)
{
fprintf (stderr, _("Too many N_RBRACs\n"));
- return false;
+ return FALSE;
}
break;
@@ -539,15 +510,15 @@ parse_stab (dhandle, handle, type, desc, value, string)
endval = info->function_end;
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, endval))
- return false;
- info->within_function = false;
+ return FALSE;
+ info->within_function = FALSE;
info->function_end = (bfd_vma) -1;
}
/* An empty string is emitted by gcc at the end of a compilation
unit. */
if (*string == '\0')
- return true;
+ return TRUE;
/* Just accumulate strings until we see a non N_SO symbol. If
the string starts with a directory separator or some other
@@ -576,43 +547,44 @@ parse_stab (dhandle, handle, type, desc, value, string)
case N_SOL:
/* Start an include file. */
if (! debug_start_source (dhandle, string))
- return false;
+ return FALSE;
break;
case N_BINCL:
/* Start an include file which may be replaced. */
push_bincl (info, string, value);
if (! debug_start_source (dhandle, string))
- return false;
+ return FALSE;
break;
case N_EINCL:
/* End an N_BINCL include. */
if (! debug_start_source (dhandle, pop_bincl (info)))
- return false;
+ return FALSE;
break;
case N_EXCL:
/* This is a duplicate of a header file named by N_BINCL which
was eliminated by the linker. */
if (! find_excl (info, string, value))
- return false;
+ return FALSE;
break;
case N_SLINE:
if (! debug_record_line (dhandle, desc,
- value + info->function_start_offset))
- return false;
+ value + (info->within_function
+ ? info->function_start_offset : 0)))
+ return FALSE;
break;
case N_BCOMM:
if (! debug_start_common_block (dhandle, string))
- return false;
+ return FALSE;
break;
case N_ECOMM:
if (! debug_end_common_block (dhandle, string))
- return false;
+ return FALSE;
break;
case N_FUN:
@@ -626,8 +598,8 @@ parse_stab (dhandle, handle, type, desc, value, string)
value += info->function_start_offset;
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, value))
- return false;
- info->within_function = false;
+ return FALSE;
+ info->within_function = FALSE;
info->function_end = (bfd_vma) -1;
}
break;
@@ -667,18 +639,18 @@ parse_stab (dhandle, handle, type, desc, value, string)
endval = info->function_end;
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, endval))
- return false;
+ return FALSE;
info->function_end = (bfd_vma) -1;
}
/* For stabs in sections, line numbers and block addresses
are offsets from the start of the function. */
if (info->sections)
info->function_start_offset = value;
- info->within_function = true;
+ info->within_function = TRUE;
}
if (! parse_stab_string (dhandle, info, type, desc, value, string))
- return false;
+ return FALSE;
}
break;
@@ -688,7 +660,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
else if (string != NULL && strcmp (string, "gcc_compiled.") == 0)
info->gcc_compiled = 1;
else
- info->n_opt_found = true;
+ info->n_opt_found = TRUE;
break;
case N_OBJ:
@@ -698,32 +670,27 @@ parse_stab (dhandle, handle, type, desc, value, string)
break;
}
- return true;
+ return TRUE;
}
/* Parse the stabs string. */
-static boolean
-parse_stab_string (dhandle, info, stabtype, desc, value, string)
- PTR dhandle;
- struct stab_handle *info;
- int stabtype;
- int desc;
- bfd_vma value;
- const char *string;
+static bfd_boolean
+parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
+ int desc, bfd_vma value, const char *string)
{
const char *p;
char *name;
int type;
debug_type dtype;
- boolean synonym;
- boolean self_crossref;
+ bfd_boolean synonym;
+ bfd_boolean self_crossref;
unsigned int lineno;
debug_type *slot;
p = strchr (string, ':');
if (p == NULL)
- return true;
+ return TRUE;
while (p[1] == ':')
{
@@ -732,7 +699,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (p == NULL)
{
bad_stab (string);
- return false;
+ return FALSE;
}
}
@@ -797,7 +764,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (*p != '=')
{
bad_stab (string);
- return false;
+ return FALSE;
}
++p;
switch (*p++)
@@ -805,7 +772,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
case 'r':
/* Floating point constant. */
if (! debug_record_float_const (dhandle, name, atof (p)))
- return false;
+ return FALSE;
break;
case 'i':
/* Integer constant. */
@@ -816,7 +783,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
other languages probably should have at least unsigned as
well as signed constants. */
if (! debug_record_int_const (dhandle, name, atoi (p)))
- return false;
+ return FALSE;
break;
case 'e':
/* SYMBOL:c=eTYPE,INTVALUE for a constant symbol whose value
@@ -826,18 +793,18 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL,
&p, (debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (*p != ',')
{
bad_stab (string);
- return false;
+ return FALSE;
}
if (! debug_record_typed_const (dhandle, name, dtype, atoi (p)))
- return false;
+ return FALSE;
break;
default:
bad_stab (string);
- return false;
+ return FALSE;
}
break;
@@ -847,9 +814,9 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL,
&p, (debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_label (dhandle, name, dtype, value))
- return false;
+ return FALSE;
break;
case 'f':
@@ -858,9 +825,9 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_function (dhandle, name, dtype, type == 'F', value))
- return false;
+ return FALSE;
/* Sun acc puts declared types of arguments here. We don't care
about their actual types (FIXME -- we should remember the whole
@@ -872,7 +839,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL)
== DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
break;
@@ -888,7 +855,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
leading = bfd_get_symbol_leading_char (info->abfd);
for (c = info->symcount, ps = info->syms; c > 0; --c, ++ps)
{
@@ -904,7 +871,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
value = bfd_asymbol_value (*ps);
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_GLOBAL,
value))
- return false;
+ return FALSE;
}
break;
@@ -916,10 +883,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_LOCAL,
value))
- return false;
+ return FALSE;
break;
case 'p':
@@ -940,21 +907,20 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
debug_type ftype;
ftype = debug_make_function_type (dhandle, dtype,
- (debug_type *) NULL, false);
+ (debug_type *) NULL, FALSE);
dtype = debug_make_pointer_type (dhandle, ftype);
}
}
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_STACK,
value))
- return false;
+ return FALSE;
/* FIXME: At this point gdb considers rearranging the parameter
address on a big endian machine if it is smaller than an int.
We have no way to do that, since we don't really know much
about the target. */
-
break;
case 'P':
@@ -967,7 +933,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL)
== DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
break;
}
@@ -977,10 +943,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_REG,
value))
- return false;
+ return FALSE;
break;
case 'r':
@@ -988,41 +954,40 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_REGISTER,
value))
- return false;
+ return FALSE;
/* FIXME: At this point gdb checks to combine pairs of 'p' and
'r' stabs into a single 'P' stab. */
-
break;
case 'S':
- /* Static symbol at top level of file */
+ /* Static symbol at top level of file. */
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_STATIC,
value))
- return false;
+ return FALSE;
break;
case 't':
/* A typedef. */
dtype = parse_stab_type (dhandle, info, name, &p, &slot);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (name == NULL)
{
/* A nameless type. Nothing to do. */
- return true;
+ return TRUE;
}
dtype = debug_name_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (slot != NULL)
*slot = dtype;
@@ -1034,21 +999,21 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
by 't' which means we are typedef'ing it as well. */
if (*p != 't')
{
- synonym = false;
- /* FIXME: gdb sets synonym to true if the current language
+ synonym = FALSE;
+ /* FIXME: gdb sets synonym to TRUE if the current language
is C++. */
}
else
{
- synonym = true;
+ synonym = TRUE;
++p;
}
dtype = parse_stab_type (dhandle, info, name, &p, &slot);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (name == NULL)
- return true;
+ return TRUE;
/* INFO->SELF_CROSSREF is set by parse_stab_type if this type is
a cross reference to itself. These are generated by some
@@ -1057,7 +1022,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = debug_tag_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (slot != NULL)
*slot = dtype;
@@ -1084,7 +1049,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
{
dtype = debug_name_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (slot != NULL)
*slot = dtype;
@@ -1097,11 +1062,11 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
/* FIXME: gdb checks os9k_stabs here. */
if (! stab_record_variable (dhandle, info, name, dtype,
DEBUG_LOCAL_STATIC, value))
- return false;
+ return FALSE;
break;
case 'v':
@@ -1109,10 +1074,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_REFERENCE,
value))
- return false;
+ return FALSE;
break;
case 'a':
@@ -1120,10 +1085,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_REF_REG,
value))
- return false;
+ return FALSE;
break;
case 'X':
@@ -1134,21 +1099,21 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_LOCAL,
value))
- return false;
+ return FALSE;
break;
default:
bad_stab (string);
- return false;
+ return FALSE;
}
/* FIXME: gdb converts structure values to structure pointers in a
couple of cases, depending upon the target. */
- return true;
+ return TRUE;
}
/* Parse a stabs type. The typename argument is non-NULL if this is a
@@ -1157,17 +1122,12 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
store the slot used if the type is being defined. */
static debug_type
-parse_stab_type (dhandle, info, typename, pp, slotp)
- PTR dhandle;
- struct stab_handle *info;
- const char *typename;
- const char **pp;
- debug_type **slotp;
+parse_stab_type (void *dhandle, struct stab_handle *info, const char *typename, const char **pp, debug_type **slotp)
{
const char *orig;
int typenums[2];
int size;
- boolean stringp;
+ bfd_boolean stringp;
int descriptor;
debug_type dtype;
@@ -1177,9 +1137,9 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
orig = *pp;
size = -1;
- stringp = false;
+ stringp = FALSE;
- info->self_crossref = false;
+ info->self_crossref = FALSE;
/* Read type number if present. The type number may be omitted.
for instance in a two-dimensional array declared with type
@@ -1196,11 +1156,9 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
return DEBUG_TYPE_NULL;
if (**pp != '=')
- {
- /* Type is not being defined here. Either it already
- exists, or this is a forward reference to it. */
- return stab_find_type (dhandle, info, typenums);
- }
+ /* Type is not being defined here. Either it already
+ exists, or this is a forward reference to it. */
+ return stab_find_type (dhandle, info, typenums);
/* Only set the slot if the type is being defined. This means
that the mapping from type numbers to types will only record
@@ -1228,10 +1186,8 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
const char *attr;
if (ISDIGIT (*p) || *p == '(' || *p == '-')
- {
- /* Member type. */
- break;
- }
+ /* Member type. */
+ break;
/* Type attributes. */
attr = p;
@@ -1256,7 +1212,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
break;
case 'S':
- stringp = true;
+ stringp = TRUE;
break;
default:
@@ -1278,7 +1234,6 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
const char *q1, *q2, *p;
/* A cross reference to another type. */
-
switch (**pp)
{
case 's':
@@ -1334,7 +1289,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
if (typename != NULL
&& strncmp (typename, *pp, p - *pp) == 0
&& typename[p - *pp] == '\0')
- info->self_crossref = true;
+ info->self_crossref = TRUE;
dtype = stab_find_tagged_type (dhandle, info, *pp, p - *pp, code);
@@ -1359,7 +1314,6 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
int xtypenums[2];
/* This type is defined as another type. */
-
(*pp)--;
hold = *pp;
@@ -1418,7 +1372,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
(dhandle,
parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL),
- (debug_type *) NULL, false));
+ (debug_type *) NULL, FALSE));
break;
case 'k':
@@ -1489,7 +1443,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
++*pp;
dtype = debug_make_method_type (dhandle, return_type,
DEBUG_TYPE_NULL,
- (debug_type *) NULL, false);
+ (debug_type *) NULL, FALSE);
}
else
{
@@ -1498,7 +1452,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
debug_type *args;
unsigned int n;
unsigned int alloc;
- boolean varargs;
+ bfd_boolean varargs;
domain = parse_stab_type (dhandle, info, (const char *) NULL,
pp, (debug_type **) NULL);
@@ -1533,7 +1487,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
{
alloc += 10;
args = ((debug_type *)
- xrealloc ((PTR) args, alloc * sizeof *args));
+ xrealloc (args, alloc * sizeof *args));
}
args[n] = parse_stab_type (dhandle, info, (const char *) NULL,
@@ -1549,11 +1503,11 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
the void type. */
if (n == 0
|| debug_get_type_kind (dhandle, args[n - 1]) != DEBUG_KIND_VOID)
- varargs = true;
+ varargs = TRUE;
else
{
--n;
- varargs = false;
+ varargs = FALSE;
}
args[n] = DEBUG_TYPE_NULL;
@@ -1640,10 +1594,8 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
single number N is equivalent to (0,N). Return the two numbers by
storing them in the vector TYPENUMS. */
-static boolean
-parse_stab_type_number (pp, typenums)
- const char **pp;
- int *typenums;
+static bfd_boolean
+parse_stab_type_number (const char **pp, int *typenums)
{
const char *orig;
@@ -1652,47 +1604,42 @@ parse_stab_type_number (pp, typenums)
if (**pp != '(')
{
typenums[0] = 0;
- typenums[1] = (int) parse_number (pp, (boolean *) NULL);
+ typenums[1] = (int) parse_number (pp, (bfd_boolean *) NULL);
}
else
{
++*pp;
- typenums[0] = (int) parse_number (pp, (boolean *) NULL);
+ typenums[0] = (int) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- typenums[1] = (int) parse_number (pp, (boolean *) NULL);
+ typenums[1] = (int) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ')')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
}
- return true;
+ return TRUE;
}
/* Parse a range type. */
static debug_type
-parse_stab_range_type (dhandle, info, typename, pp, typenums)
- PTR dhandle;
- struct stab_handle *info;
- const char *typename;
- const char **pp;
- const int *typenums;
+parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *typename, const char **pp, const int *typenums)
{
const char *orig;
int rangenums[2];
- boolean self_subrange;
+ bfd_boolean self_subrange;
debug_type index_type;
const char *s2, *s3;
bfd_signed_vma n2, n3;
- boolean ov2, ov3;
+ bfd_boolean ov2, ov3;
orig = *pp;
@@ -1742,18 +1689,18 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
{
/* gcc will emit range stabs for long long types. Handle this
as a special case. FIXME: This needs to be more general. */
-#define LLLOW "01000000000000000000000;"
-#define LLHIGH "0777777777777777777777;"
+#define LLLOW "01000000000000000000000;"
+#define LLHIGH "0777777777777777777777;"
#define ULLHIGH "01777777777777777777777;"
if (index_type == DEBUG_TYPE_NULL)
{
if (strncmp (s2, LLLOW, sizeof LLLOW - 1) == 0
&& strncmp (s3, LLHIGH, sizeof LLHIGH - 1) == 0)
- return debug_make_int_type (dhandle, 8, false);
+ return debug_make_int_type (dhandle, 8, FALSE);
if (! ov2
&& n2 == 0
&& strncmp (s3, ULLHIGH, sizeof ULLHIGH - 1) == 0)
- return debug_make_int_type (dhandle, 8, true);
+ return debug_make_int_type (dhandle, 8, TRUE);
}
warn_stab (orig, _("numeric overflow"));
@@ -1786,50 +1733,50 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
if (typename != NULL)
{
if (strcmp (typename, "long long int") == 0)
- return debug_make_int_type (dhandle, 8, false);
+ return debug_make_int_type (dhandle, 8, FALSE);
else if (strcmp (typename, "long long unsigned int") == 0)
- return debug_make_int_type (dhandle, 8, true);
+ return debug_make_int_type (dhandle, 8, TRUE);
}
/* FIXME: The size here really depends upon the target. */
- return debug_make_int_type (dhandle, 4, true);
+ return debug_make_int_type (dhandle, 4, TRUE);
}
/* A range of 0 to 127 is char. */
if (self_subrange && n2 == 0 && n3 == 127)
- return debug_make_int_type (dhandle, 1, false);
+ return debug_make_int_type (dhandle, 1, FALSE);
/* FIXME: gdb checks for the language CHILL here. */
if (n2 == 0)
{
if (n3 < 0)
- return debug_make_int_type (dhandle, - n3, true);
+ return debug_make_int_type (dhandle, - n3, TRUE);
else if (n3 == 0xff)
- return debug_make_int_type (dhandle, 1, true);
+ return debug_make_int_type (dhandle, 1, TRUE);
else if (n3 == 0xffff)
- return debug_make_int_type (dhandle, 2, true);
+ return debug_make_int_type (dhandle, 2, TRUE);
else if (n3 == (bfd_signed_vma) 0xffffffff)
- return debug_make_int_type (dhandle, 4, true);
+ return debug_make_int_type (dhandle, 4, TRUE);
#ifdef BFD64
else if (n3 == ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff))
- return debug_make_int_type (dhandle, 8, true);
+ return debug_make_int_type (dhandle, 8, TRUE);
#endif
}
else if (n3 == 0
&& n2 < 0
&& (self_subrange || n2 == -8))
- return debug_make_int_type (dhandle, - n2, true);
+ return debug_make_int_type (dhandle, - n2, TRUE);
else if (n2 == - n3 - 1 || n2 == n3 + 1)
{
if (n3 == 0x7f)
- return debug_make_int_type (dhandle, 1, false);
+ return debug_make_int_type (dhandle, 1, FALSE);
else if (n3 == 0x7fff)
- return debug_make_int_type (dhandle, 2, false);
+ return debug_make_int_type (dhandle, 2, FALSE);
else if (n3 == 0x7fffffff)
- return debug_make_int_type (dhandle, 4, false);
+ return debug_make_int_type (dhandle, 4, FALSE);
#ifdef BFD64
else if (n3 == ((((bfd_vma) 0x7fffffff) << 32) | 0xffffffff))
- return debug_make_int_type (dhandle, 8, false);
+ return debug_make_int_type (dhandle, 8, FALSE);
#endif
}
}
@@ -1849,7 +1796,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
/* Does this actually ever happen? Is that why we are worrying
about dealing with it rather than just calling error_type? */
warn_stab (orig, _("missing index type"));
- index_type = debug_make_int_type (dhandle, 4, false);
+ index_type = debug_make_int_type (dhandle, 4, FALSE);
}
return debug_make_range_type (dhandle, index_type, n2, n3);
@@ -1868,12 +1815,10 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
FIXME. */
static debug_type
-parse_stab_sun_builtin_type (dhandle, pp)
- PTR dhandle;
- const char **pp;
+parse_stab_sun_builtin_type (void *dhandle, const char **pp)
{
const char *orig;
- boolean unsignedp;
+ bfd_boolean unsignedp;
bfd_vma bits;
orig = *pp;
@@ -1881,10 +1826,10 @@ parse_stab_sun_builtin_type (dhandle, pp)
switch (**pp)
{
case 's':
- unsignedp = false;
+ unsignedp = FALSE;
break;
case 'u':
- unsignedp = true;
+ unsignedp = TRUE;
break;
default:
bad_stab (orig);
@@ -1903,7 +1848,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
by this type, except that unsigned short is 4 instead of 2.
Since this information is redundant with the third number,
we will ignore it. */
- (void) parse_number (pp, (boolean *) NULL);
+ (void) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1912,7 +1857,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
++*pp;
/* The second number is always 0, so ignore it too. */
- (void) parse_number (pp, (boolean *) NULL);
+ (void) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1921,7 +1866,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
++*pp;
/* The third number is the number of bits for this type. */
- bits = parse_number (pp, (boolean *) NULL);
+ bits = parse_number (pp, (bfd_boolean *) NULL);
/* The type *should* end with a semicolon. If it are embedded
in a larger type the semicolon may be the only way to know where
@@ -1941,9 +1886,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
/* Parse a builtin floating type generated by the Sun compiler. */
static debug_type
-parse_stab_sun_floating_type (dhandle, pp)
- PTR dhandle;
- const char **pp;
+parse_stab_sun_floating_type (void *dhandle, const char **pp)
{
const char *orig;
bfd_vma details;
@@ -1953,7 +1896,7 @@ parse_stab_sun_floating_type (dhandle, pp)
/* The first number has more details about the type, for example
FN_COMPLEX. */
- details = parse_number (pp, (boolean *) NULL);
+ details = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1961,7 +1904,7 @@ parse_stab_sun_floating_type (dhandle, pp)
}
/* The second number is the number of bytes occupied by this type */
- bytes = parse_number (pp, (boolean *) NULL);
+ bytes = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1979,9 +1922,7 @@ parse_stab_sun_floating_type (dhandle, pp)
/* Handle an enum type. */
static debug_type
-parse_stab_enum_type (dhandle, pp)
- PTR dhandle;
- const char **pp;
+parse_stab_enum_type (void *dhandle, const char **pp)
{
const char *orig;
const char **names;
@@ -2022,7 +1963,7 @@ parse_stab_enum_type (dhandle, pp)
name = savestring (*pp, p - *pp);
*pp = p + 1;
- val = (bfd_signed_vma) parse_number (pp, (boolean *) NULL);
+ val = (bfd_signed_vma) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
@@ -2034,9 +1975,9 @@ parse_stab_enum_type (dhandle, pp)
{
alloc += 10;
names = ((const char **)
- xrealloc ((PTR) names, alloc * sizeof *names));
+ xrealloc (names, alloc * sizeof *names));
values = ((bfd_signed_vma *)
- xrealloc ((PTR) values, alloc * sizeof *values));
+ xrealloc (values, alloc * sizeof *values));
}
names[n] = name;
@@ -2057,31 +1998,27 @@ parse_stab_enum_type (dhandle, pp)
describing the type.
PP points to a character pointer that points to the next unconsumed token
- in the the stabs string. For example, given stabs "A:T4=s4a:1,0,32;;",
+ in the stabs string. For example, given stabs "A:T4=s4a:1,0,32;;",
*PP will point to "4a:1,0,32;;". */
static debug_type
-parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
- PTR dhandle;
- struct stab_handle *info;
- const char *tagname;
- const char **pp;
- boolean structp;
- const int *typenums;
+parse_stab_struct_type (void *dhandle, struct stab_handle *info,
+ const char *tagname, const char **pp,
+ bfd_boolean structp, const int *typenums)
{
const char *orig;
bfd_vma size;
debug_baseclass *baseclasses;
debug_field *fields;
- boolean statics;
+ bfd_boolean statics;
debug_method *methods;
debug_type vptrbase;
- boolean ownvptr;
+ bfd_boolean ownvptr;
orig = *pp;
/* Get the size. */
- size = parse_number (pp, (boolean *) NULL);
+ size = parse_number (pp, (bfd_boolean *) NULL);
/* Get the other information. */
if (! parse_stab_baseclasses (dhandle, info, pp, &baseclasses)
@@ -2114,7 +2051,7 @@ parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
the type for the base class, and a terminating semicolon.
A typical example, with two base classes, would be "!2,020,19;0264,21;".
- ^^ ^ ^ ^ ^ ^ ^
+ ^^ ^ ^ ^ ^ ^ ^
Baseclass information marker __________________|| | | | | | |
Number of baseclasses __________________________| | | | | | |
Visibility specifiers (2) ________________________| | | | | |
@@ -2124,14 +2061,11 @@ parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
Offset in bits from start of class ________________________| |
Type number of base class ____________________________________|
- Return true for success, false for failure. */
+ Return TRUE for success, FALSE for failure. */
-static boolean
-parse_stab_baseclasses (dhandle, info, pp, retp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- debug_baseclass **retp;
+static bfd_boolean
+parse_stab_baseclasses (void *dhandle, struct stab_handle *info,
+ const char **pp, debug_baseclass **retp)
{
const char *orig;
unsigned int c, i;
@@ -2144,16 +2078,16 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
if (**pp != '!')
{
/* No base classes. */
- return true;
+ return TRUE;
}
++*pp;
- c = (unsigned int) parse_number (pp, (boolean *) NULL);
+ c = (unsigned int) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
@@ -2161,7 +2095,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
for (i = 0; i < c; i++)
{
- boolean virtual;
+ bfd_boolean virtual;
enum debug_visibility visibility;
bfd_vma bitpos;
debug_type type;
@@ -2169,14 +2103,14 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
switch (**pp)
{
case '0':
- virtual = false;
+ virtual = FALSE;
break;
case '1':
- virtual = true;
+ virtual = TRUE;
break;
default:
warn_stab (orig, _("unknown virtual character for baseclass"));
- virtual = false;
+ virtual = FALSE;
break;
}
++*pp;
@@ -2202,26 +2136,26 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
/* The remaining value is the bit offset of the portion of the
object corresponding to this baseclass. Always zero in the
absence of multiple inheritance. */
- bitpos = parse_number (pp, (boolean *) NULL);
+ bitpos = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
classes[i] = debug_make_baseclass (dhandle, type, bitpos, virtual,
visibility);
if (classes[i] == DEBUG_BASECLASS_NULL)
- return false;
+ return FALSE;
if (**pp != ';')
- return false;
+ return FALSE;
++*pp;
}
@@ -2229,12 +2163,12 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
*retp = classes;
- return true;
+ return TRUE;
}
/* Read struct or class data fields. They have the form:
- NAME : [VISIBILITY] TYPENUM , BITPOS , BITSIZE ;
+ NAME : [VISIBILITY] TYPENUM , BITPOS , BITSIZE ;
At the end, we see a semicolon instead of a field.
@@ -2243,7 +2177,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
The optional VISIBILITY is one of:
- '/0' (VISIBILITY_PRIVATE)
+ '/0' (VISIBILITY_PRIVATE)
'/1' (VISIBILITY_PROTECTED)
'/2' (VISIBILITY_PUBLIC)
'/9' (VISIBILITY_IGNORE)
@@ -2252,13 +2186,10 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
Returns 1 for success, 0 for failure. */
-static boolean
-parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- debug_field **retp;
- boolean *staticsp;
+static bfd_boolean
+parse_stab_struct_fields (void *dhandle, struct stab_handle *info,
+ const char **pp, debug_field **retp,
+ bfd_boolean *staticsp)
{
const char *orig;
const char *p;
@@ -2267,7 +2198,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
unsigned int alloc;
*retp = NULL;
- *staticsp = false;
+ *staticsp = FALSE;
orig = *pp;
@@ -2285,7 +2216,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
{
alloc += 10;
fields = ((debug_field *)
- xrealloc ((PTR) fields, alloc * sizeof *fields));
+ xrealloc (fields, alloc * sizeof *fields));
}
/* If it starts with CPLUS_MARKER it is a special abbreviation,
@@ -2299,7 +2230,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
{
++*pp;
if (! parse_stab_cpp_abbrev (dhandle, info, pp, fields + c))
- return false;
+ return FALSE;
++c;
continue;
}
@@ -2313,7 +2244,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
if (p == NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
if (p[1] == ':')
@@ -2321,7 +2252,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c,
staticsp))
- return false;
+ return FALSE;
++c;
}
@@ -2330,17 +2261,14 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
*retp = fields;
- return true;
+ return TRUE;
}
/* Special GNU C++ name. */
-static boolean
-parse_stab_cpp_abbrev (dhandle, info, pp, retp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- debug_field *retp;
+static bfd_boolean
+parse_stab_cpp_abbrev (void *dhandle, struct stab_handle *info,
+ const char **pp, debug_field *retp)
{
const char *orig;
int cpp_abbrev;
@@ -2357,7 +2285,7 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
if (**pp != 'v')
{
bad_stab (*pp);
- return false;
+ return FALSE;
}
++*pp;
@@ -2372,7 +2300,7 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
context = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (context == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
switch (cpp_abbrev)
{
@@ -2399,7 +2327,7 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
if (**pp != ':')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
@@ -2408,36 +2336,32 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- bitpos = parse_number (pp, (boolean *) NULL);
+ bitpos = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
*retp = debug_make_field (dhandle, name, type, bitpos, 0,
DEBUG_VISIBILITY_PRIVATE);
if (*retp == DEBUG_FIELD_NULL)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Parse a single field in a struct or union. */
-static boolean
-parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- const char *p;
- debug_field *retp;
- boolean *staticsp;
+static bfd_boolean
+parse_stab_one_struct_field (void *dhandle, struct stab_handle *info,
+ const char **pp, const char *p,
+ debug_field *retp, bfd_boolean *staticsp)
{
const char *orig;
char *name;
@@ -2481,7 +2405,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (**pp == ':')
{
@@ -2493,7 +2417,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
if (p == NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
varname = savestring (*pp, p - *pp);
@@ -2502,31 +2426,31 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
*retp = debug_make_static_member (dhandle, name, type, varname,
visibility);
- *staticsp = true;
+ *staticsp = TRUE;
- return true;
+ return TRUE;
}
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- bitpos = parse_number (pp, (boolean *) NULL);
+ bitpos = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- bitsize = parse_number (pp, (boolean *) NULL);
+ bitsize = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
@@ -2552,7 +2476,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
*retp = debug_make_field (dhandle, name, type, bitpos, bitsize, visibility);
- return true;
+ return TRUE;
}
/* Read member function stabs info for C++ classes. The form of each member
@@ -2568,14 +2492,10 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
$ is the CPLUS_MARKER (usually '$'), `*' holds the place for an operator
name (such as `+=') and `.' marks the end of the operator name. */
-static boolean
-parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
- PTR dhandle;
- struct stab_handle *info;
- const char *tagname;
- const char **pp;
- const int *typenums;
- debug_method **retp;
+static bfd_boolean
+parse_stab_members (void *dhandle, struct stab_handle *info,
+ const char *tagname, const char **pp,
+ const int *typenums, debug_method **retp)
{
const char *orig;
debug_method *methods;
@@ -2611,7 +2531,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
}
else
{
- /* This is a completely wierd case. In order to stuff in the
+ /* This is a completely weird case. In order to stuff in the
names that might contain colons (the usual name delimiter),
Mike Tiemann defined a different name format which is
signalled if the identifier is "op$". In that case, the
@@ -2623,7 +2543,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
if (*p != '.')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
name = savestring (*pp, p - *pp);
*pp = p + 1;
@@ -2639,14 +2559,14 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
do
{
debug_type type;
- boolean stub;
+ bfd_boolean stub;
char *argtypes;
enum debug_visibility visibility;
- boolean constp, volatilep, staticp;
+ bfd_boolean constp, volatilep, staticp;
bfd_vma voffset;
debug_type context;
const char *physname;
- boolean varargs;
+ bfd_boolean varargs;
if (look_ahead_type != DEBUG_TYPE_NULL)
{
@@ -2659,11 +2579,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (**pp != ':')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
}
@@ -2672,13 +2592,13 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
if (p == NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
- stub = false;
+ stub = FALSE;
if (debug_get_type_kind (dhandle, type) == DEBUG_KIND_METHOD
&& debug_get_parameter_types (dhandle, type, &varargs) == NULL)
- stub = true;
+ stub = TRUE;
argtypes = savestring (*pp, p - *pp);
*pp = p + 1;
@@ -2697,8 +2617,8 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
}
++*pp;
- constp = false;
- volatilep = false;
+ constp = FALSE;
+ volatilep = FALSE;
switch (**pp)
{
case 'A':
@@ -2707,18 +2627,18 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
break;
case 'B':
/* const member function. */
- constp = true;
+ constp = TRUE;
++*pp;
break;
case 'C':
/* volatile member function. */
- volatilep = true;
+ volatilep = TRUE;
++*pp;
break;
case 'D':
/* const volatile member function. */
- constp = true;
- volatilep = true;
+ constp = TRUE;
+ volatilep = TRUE;
++*pp;
break;
case '*':
@@ -2731,7 +2651,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
break;
}
- staticp = false;
+ staticp = FALSE;
switch (**pp)
{
case '*':
@@ -2739,11 +2659,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
bit is supposedly set to distinguish
pointers-to-methods from virtual function indicies. */
++*pp;
- voffset = parse_number (pp, (boolean *) NULL);
+ voffset = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
voffset &= 0x7fffffff;
@@ -2774,7 +2694,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
}
@@ -2784,11 +2704,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
case '?':
/* static member function. */
++*pp;
- staticp = true;
+ staticp = TRUE;
voffset = 0;
context = DEBUG_TYPE_NULL;
if (strncmp (argtypes, name, strlen (name)) != 0)
- stub = true;
+ stub = TRUE;
break;
default:
@@ -2817,25 +2737,25 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
class_type = stab_find_type (dhandle, info, typenums);
if (class_type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
return_type = debug_get_return_type (dhandle, type);
if (return_type == DEBUG_TYPE_NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
type = parse_stab_argtypes (dhandle, info, class_type, name,
tagname, return_type, argtypes,
constp, volatilep, &physname);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
if (cvars + 1 >= allocvars)
{
allocvars += 10;
variants = ((debug_method_variant *)
- xrealloc ((PTR) variants,
+ xrealloc (variants,
allocvars * sizeof *variants));
}
@@ -2852,7 +2772,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
constp,
volatilep);
if (variants[cvars] == DEBUG_METHOD_VARIANT_NULL)
- return false;
+ return FALSE;
++cvars;
}
@@ -2867,7 +2787,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
{
alloc += 10;
methods = ((debug_method *)
- xrealloc ((PTR) methods, alloc * sizeof *methods));
+ xrealloc (methods, alloc * sizeof *methods));
}
methods[c] = debug_make_method (dhandle, name, variants);
@@ -2880,7 +2800,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
*retp = methods;
- return true;
+ return TRUE;
}
/* Parse a string representing argument types for a method. Stabs
@@ -2890,24 +2810,19 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
the tag name. */
static debug_type
-parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
- return_type, argtypes, constp, volatilep, pphysname)
- PTR dhandle;
- struct stab_handle *info;
- debug_type class_type;
- const char *fieldname;
- const char *tagname;
- debug_type return_type;
- const char *argtypes;
- boolean constp;
- boolean volatilep;
- const char **pphysname;
+parse_stab_argtypes (void *dhandle, struct stab_handle *info,
+ debug_type class_type, const char *fieldname,
+ const char *tagname, debug_type return_type,
+ const char *argtypes, bfd_boolean constp,
+ bfd_boolean volatilep, const char **pphysname)
{
- boolean is_full_physname_constructor;
- boolean is_constructor;
- boolean is_destructor;
+ bfd_boolean is_full_physname_constructor;
+ bfd_boolean is_constructor;
+ bfd_boolean is_destructor;
+ bfd_boolean is_v3;
debug_type *args;
- boolean varargs;
+ bfd_boolean varargs;
+ unsigned int physname_len = 0;
/* Constructors are sometimes handled specially. */
is_full_physname_constructor = ((argtypes[0] == '_'
@@ -2924,8 +2839,9 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
&& (argtypes[1] == '$' || argtypes[1] == '.')
&& argtypes[2] == '_')
|| strncmp (argtypes, "__dt", 4) == 0);
+ is_v3 = argtypes[0] == '_' && argtypes[1] == 'Z';
- if (is_destructor || is_full_physname_constructor)
+ if (is_destructor || is_full_physname_constructor || is_v3)
*pphysname = argtypes;
else
{
@@ -2984,6 +2900,7 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
strcpy (physname, fieldname);
}
+ physname_len = strlen (physname);
strcat (physname, buf);
if (tagname != NULL)
strcat (physname, tagname);
@@ -2997,10 +2914,10 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
args = (debug_type *) xmalloc (sizeof *args);
*args = NULL;
return debug_make_method_type (dhandle, return_type, class_type, args,
- false);
+ FALSE);
}
- args = stab_demangle_argtypes (dhandle, info, *pphysname, &varargs);
+ args = stab_demangle_argtypes (dhandle, info, *pphysname, &varargs, physname_len);
if (args == NULL)
return DEBUG_TYPE_NULL;
@@ -3016,21 +2933,17 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
This function is called when we have parsed all the method declarations,
so we can look for the vptr base class info. */
-static boolean
-parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- const int *typenums;
- debug_type *retvptrbase;
- boolean *retownvptr;
+static bfd_boolean
+parse_stab_tilde_field (void *dhandle, struct stab_handle *info,
+ const char **pp, const int *typenums,
+ debug_type *retvptrbase, bfd_boolean *retownvptr)
{
const char *orig;
const char *hold;
int vtypenums[2];
*retvptrbase = DEBUG_TYPE_NULL;
- *retownvptr = false;
+ *retownvptr = FALSE;
orig = *pp;
@@ -3039,7 +2952,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
++*pp;
if (**pp != '~')
- return true;
+ return TRUE;
++*pp;
@@ -3051,7 +2964,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
}
if (**pp != '%')
- return true;
+ return TRUE;
++*pp;
@@ -3060,11 +2973,11 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
/* The next number is the type number of the base class (possibly
our own class) which supplies the vtable for this class. */
if (! parse_stab_type_number (pp, vtypenums))
- return false;
+ return FALSE;
if (vtypenums[0] == typenums[0]
&& vtypenums[1] == typenums[1])
- *retownvptr = true;
+ *retownvptr = TRUE;
else
{
debug_type vtype;
@@ -3079,7 +2992,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
if (*p != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
*retvptrbase = vtype;
@@ -3087,23 +3000,20 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
*pp = p + 1;
}
- return true;
+ return TRUE;
}
/* Read a definition of an array type. */
static debug_type
-parse_stab_array_type (dhandle, info, pp, stringp)
- PTR dhandle;
- struct stab_handle *info;
- const char **pp;
- boolean stringp;
+parse_stab_array_type (void *dhandle, struct stab_handle *info,
+ const char **pp, bfd_boolean stringp)
{
const char *orig;
const char *p;
int typenums[2];
debug_type index_type;
- boolean adjustable;
+ bfd_boolean adjustable;
bfd_signed_vma lower, upper;
debug_type element_type;
@@ -3127,7 +3037,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
index_type = debug_find_named_type (dhandle, "int");
if (index_type == DEBUG_TYPE_NULL)
{
- index_type = debug_make_int_type (dhandle, 4, false);
+ index_type = debug_make_int_type (dhandle, 4, FALSE);
if (index_type == DEBUG_TYPE_NULL)
return DEBUG_TYPE_NULL;
}
@@ -3146,15 +3056,15 @@ parse_stab_array_type (dhandle, info, pp, stringp)
}
++*pp;
- adjustable = false;
+ adjustable = FALSE;
if (! ISDIGIT (**pp) && **pp != '-')
{
++*pp;
- adjustable = true;
+ adjustable = TRUE;
}
- lower = (bfd_signed_vma) parse_number (pp, (boolean *) NULL);
+ lower = (bfd_signed_vma) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -3165,10 +3075,10 @@ parse_stab_array_type (dhandle, info, pp, stringp)
if (! ISDIGIT (**pp) && **pp != '-')
{
++*pp;
- adjustable = true;
+ adjustable = TRUE;
}
- upper = (bfd_signed_vma) parse_number (pp, (boolean *) NULL);
+ upper = (bfd_signed_vma) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -3213,10 +3123,7 @@ struct bincl_file
/* Start a new N_BINCL file, pushing it onto the stack. */
static void
-push_bincl (info, name, hash)
- struct stab_handle *info;
- const char *name;
- bfd_vma hash;
+push_bincl (struct stab_handle *info, const char *name, bfd_vma hash)
{
struct bincl_file *n;
@@ -3232,7 +3139,7 @@ push_bincl (info, name, hash)
++info->files;
info->file_types = ((struct stab_types **)
- xrealloc ((PTR) info->file_types,
+ xrealloc (info->file_types,
(info->files
* sizeof *info->file_types)));
info->file_types[n->file] = NULL;
@@ -3242,8 +3149,7 @@ push_bincl (info, name, hash)
stack. */
static const char *
-pop_bincl (info)
- struct stab_handle *info;
+pop_bincl (struct stab_handle *info)
{
struct bincl_file *o;
@@ -3261,17 +3167,14 @@ pop_bincl (info)
/* Handle an N_EXCL: get the types from the corresponding N_BINCL. */
-static boolean
-find_excl (info, name, hash)
- struct stab_handle *info;
- const char *name;
- bfd_vma hash;
+static bfd_boolean
+find_excl (struct stab_handle *info, const char *name, bfd_vma hash)
{
struct bincl_file *l;
++info->files;
info->file_types = ((struct stab_types **)
- xrealloc ((PTR) info->file_types,
+ xrealloc (info->file_types,
(info->files
* sizeof *info->file_types)));
@@ -3282,12 +3185,12 @@ find_excl (info, name, hash)
{
warn_stab (name, _("Undefined N_EXCL"));
info->file_types[info->files - 1] = NULL;
- return true;
+ return TRUE;
}
info->file_types[info->files - 1] = l->file_types;
- return true;
+ return TRUE;
}
/* Handle a variable definition. gcc emits variable definitions for a
@@ -3295,14 +3198,10 @@ find_excl (info, name, hash)
it. The SunPRO compiler emits variable definitions after the
N_LBRAC, so we can call debug_record_variable immediately. */
-static boolean
-stab_record_variable (dhandle, info, name, type, kind, val)
- PTR dhandle;
- struct stab_handle *info;
- const char *name;
- debug_type type;
- enum debug_var_kind kind;
- bfd_vma val;
+static bfd_boolean
+stab_record_variable (void *dhandle, struct stab_handle *info,
+ const char *name, debug_type type,
+ enum debug_var_kind kind, bfd_vma val)
{
struct stab_pending_var *v;
@@ -3321,16 +3220,14 @@ stab_record_variable (dhandle, info, name, type, kind, val)
v->val = val;
info->pending = v;
- return true;
+ return TRUE;
}
/* Emit pending variable definitions. This is called after we see the
N_LBRAC that starts the block. */
-static boolean
-stab_emit_pending_vars (dhandle, info)
- PTR dhandle;
- struct stab_handle *info;
+static bfd_boolean
+stab_emit_pending_vars (void *dhandle, struct stab_handle *info)
{
struct stab_pending_var *v;
@@ -3340,7 +3237,7 @@ stab_emit_pending_vars (dhandle, info)
struct stab_pending_var *next;
if (! debug_record_variable (dhandle, v->name, v->type, v->kind, v->val))
- return false;
+ return FALSE;
next = v->next;
free (v);
@@ -3349,15 +3246,13 @@ stab_emit_pending_vars (dhandle, info)
info->pending = NULL;
- return true;
+ return TRUE;
}
/* Find the slot for a type in the database. */
static debug_type *
-stab_find_slot (info, typenums)
- struct stab_handle *info;
- const int *typenums;
+stab_find_slot (struct stab_handle *info, const int *typenums)
{
int filenum;
int index;
@@ -3402,10 +3297,7 @@ stab_find_slot (info, typenums)
allocated yet, create an indirect type. */
static debug_type
-stab_find_type (dhandle, info, typenums)
- PTR dhandle;
- struct stab_handle *info;
- const int *typenums;
+stab_find_type (void *dhandle, struct stab_handle *info, const int *typenums)
{
debug_type *slot;
@@ -3427,33 +3319,28 @@ stab_find_type (dhandle, info, typenums)
/* Record that a given type number refers to a given type. */
-static boolean
-stab_record_type (dhandle, info, typenums, type)
- PTR dhandle ATTRIBUTE_UNUSED;
- struct stab_handle *info;
- const int *typenums;
- debug_type type;
+static bfd_boolean
+stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info,
+ const int *typenums, debug_type type)
{
debug_type *slot;
slot = stab_find_slot (info, typenums);
if (slot == NULL)
- return false;
+ return FALSE;
/* gdb appears to ignore type redefinitions, so we do as well. */
*slot = type;
- return true;
+ return TRUE;
}
/* Return an XCOFF builtin type. */
static debug_type
-stab_xcoff_builtin_type (dhandle, info, typenum)
- PTR dhandle;
- struct stab_handle *info;
- int typenum;
+stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
+ int typenum)
{
debug_type rettype;
const char *name;
@@ -3472,42 +3359,42 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
/* The size of this and all the other types are fixed, defined
by the debugging format. */
name = "int";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 2:
name = "char";
- rettype = debug_make_int_type (dhandle, 1, false);
+ rettype = debug_make_int_type (dhandle, 1, FALSE);
break;
case 3:
name = "short";
- rettype = debug_make_int_type (dhandle, 2, false);
+ rettype = debug_make_int_type (dhandle, 2, FALSE);
break;
case 4:
name = "long";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 5:
name = "unsigned char";
- rettype = debug_make_int_type (dhandle, 1, true);
+ rettype = debug_make_int_type (dhandle, 1, TRUE);
break;
case 6:
name = "signed char";
- rettype = debug_make_int_type (dhandle, 1, false);
+ rettype = debug_make_int_type (dhandle, 1, FALSE);
break;
case 7:
name = "unsigned short";
- rettype = debug_make_int_type (dhandle, 2, true);
+ rettype = debug_make_int_type (dhandle, 2, TRUE);
break;
case 8:
name = "unsigned int";
- rettype = debug_make_int_type (dhandle, 4, true);
+ rettype = debug_make_int_type (dhandle, 4, TRUE);
break;
case 9:
name = "unsigned";
- rettype = debug_make_int_type (dhandle, 4, true);
+ rettype = debug_make_int_type (dhandle, 4, TRUE);
case 10:
name = "unsigned long";
- rettype = debug_make_int_type (dhandle, 4, true);
+ rettype = debug_make_int_type (dhandle, 4, TRUE);
break;
case 11:
name = "void";
@@ -3532,7 +3419,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
break;
case 15:
name = "integer";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 16:
name = "boolean";
@@ -3554,7 +3441,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
case 20:
/* FIXME */
name = "character";
- rettype = debug_make_int_type (dhandle, 1, true);
+ rettype = debug_make_int_type (dhandle, 1, TRUE);
break;
case 21:
name = "logical*1";
@@ -3584,28 +3471,28 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
break;
case 27:
name = "integer*1";
- rettype = debug_make_int_type (dhandle, 1, false);
+ rettype = debug_make_int_type (dhandle, 1, FALSE);
break;
case 28:
name = "integer*2";
- rettype = debug_make_int_type (dhandle, 2, false);
+ rettype = debug_make_int_type (dhandle, 2, FALSE);
break;
case 29:
name = "integer*4";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 30:
/* FIXME */
name = "wchar";
- rettype = debug_make_int_type (dhandle, 2, false);
+ rettype = debug_make_int_type (dhandle, 2, FALSE);
break;
case 31:
name = "long long";
- rettype = debug_make_int_type (dhandle, 8, false);
+ rettype = debug_make_int_type (dhandle, 8, FALSE);
break;
case 32:
name = "unsigned long long";
- rettype = debug_make_int_type (dhandle, 8, true);
+ rettype = debug_make_int_type (dhandle, 8, TRUE);
break;
case 33:
name = "logical*8";
@@ -3613,7 +3500,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
break;
case 34:
name = "integer*8";
- rettype = debug_make_int_type (dhandle, 8, false);
+ rettype = debug_make_int_type (dhandle, 8, FALSE);
break;
default:
abort ();
@@ -3629,12 +3516,8 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
/* Find or create a tagged type. */
static debug_type
-stab_find_tagged_type (dhandle, info, p, len, kind)
- PTR dhandle;
- struct stab_handle *info;
- const char *p;
- int len;
- enum debug_type_kind kind;
+stab_find_tagged_type (void *dhandle, struct stab_handle *info,
+ const char *p, int len, enum debug_type_kind kind)
{
char *name;
debug_type dtype;
@@ -3709,13 +3592,13 @@ struct stab_demangle_typestring
struct stab_demangle_info
{
/* The debugging information handle. */
- PTR dhandle;
+ void *dhandle;
/* The stab information handle. */
struct stab_handle *info;
/* The array of arguments we are building. */
debug_type *args;
/* Whether the method takes a variable number of arguments. */
- boolean varargs;
+ bfd_boolean varargs;
/* The array of types we have remembered. */
struct stab_demangle_typestring *typestrings;
/* The number of typestrings. */
@@ -3724,40 +3607,37 @@ struct stab_demangle_info
unsigned int typestring_alloc;
};
-static void stab_bad_demangle PARAMS ((const char *));
-static unsigned int stab_demangle_count PARAMS ((const char **));
-static boolean stab_demangle_get_count
- PARAMS ((const char **, unsigned int *));
-static boolean stab_demangle_prefix
- PARAMS ((struct stab_demangle_info *, const char **));
-static boolean stab_demangle_function_name
- PARAMS ((struct stab_demangle_info *, const char **, const char *));
-static boolean stab_demangle_signature
- PARAMS ((struct stab_demangle_info *, const char **));
-static boolean stab_demangle_qualified
- PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
-static boolean stab_demangle_template
- PARAMS ((struct stab_demangle_info *, const char **, char **));
-static boolean stab_demangle_class
- PARAMS ((struct stab_demangle_info *, const char **, const char **));
-static boolean stab_demangle_args
- PARAMS ((struct stab_demangle_info *, const char **, debug_type **,
- boolean *));
-static boolean stab_demangle_arg
- PARAMS ((struct stab_demangle_info *, const char **, debug_type **,
- unsigned int *, unsigned int *));
-static boolean stab_demangle_type
- PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
-static boolean stab_demangle_fund_type
- PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
-static boolean stab_demangle_remember_type
- PARAMS ((struct stab_demangle_info *, const char *, int));
+static void stab_bad_demangle (const char *);
+static unsigned int stab_demangle_count (const char **);
+static bfd_boolean stab_demangle_get_count (const char **, unsigned int *);
+static bfd_boolean stab_demangle_prefix
+ (struct stab_demangle_info *, const char **, unsigned int);
+static bfd_boolean stab_demangle_function_name
+ (struct stab_demangle_info *, const char **, const char *);
+static bfd_boolean stab_demangle_signature
+ (struct stab_demangle_info *, const char **);
+static bfd_boolean stab_demangle_qualified
+ (struct stab_demangle_info *, const char **, debug_type *);
+static bfd_boolean stab_demangle_template
+ (struct stab_demangle_info *, const char **, char **);
+static bfd_boolean stab_demangle_class
+ (struct stab_demangle_info *, const char **, const char **);
+static bfd_boolean stab_demangle_args
+ (struct stab_demangle_info *, const char **, debug_type **, bfd_boolean *);
+static bfd_boolean stab_demangle_arg
+ (struct stab_demangle_info *, const char **, debug_type **,
+ unsigned int *, unsigned int *);
+static bfd_boolean stab_demangle_type
+ (struct stab_demangle_info *, const char **, debug_type *);
+static bfd_boolean stab_demangle_fund_type
+ (struct stab_demangle_info *, const char **, debug_type *);
+static bfd_boolean stab_demangle_remember_type
+ (struct stab_demangle_info *, const char *, int);
/* Warn about a bad demangling. */
static void
-stab_bad_demangle (s)
- const char *s;
+stab_bad_demangle (const char *s)
{
fprintf (stderr, _("bad mangled name `%s'\n"), s);
}
@@ -3765,8 +3645,7 @@ stab_bad_demangle (s)
/* Get a count from a stab string. */
static unsigned int
-stab_demangle_count (pp)
- const char **pp;
+stab_demangle_count (const char **pp)
{
unsigned int count;
@@ -3783,13 +3662,11 @@ stab_demangle_count (pp)
/* Require a count in a string. The count may be multiple digits, in
which case it must end in an underscore. */
-static boolean
-stab_demangle_get_count (pp, pi)
- const char **pp;
- unsigned int *pi;
+static bfd_boolean
+stab_demangle_get_count (const char **pp, unsigned int *pi)
{
if (! ISDIGIT (**pp))
- return false;
+ return FALSE;
*pi = **pp - '0';
++*pp;
@@ -3814,25 +3691,27 @@ stab_demangle_get_count (pp, pi)
}
}
- return true;
+ return TRUE;
}
/* This function demangles a physical name, returning a NULL
terminated array of argument types. */
static debug_type *
-stab_demangle_argtypes (dhandle, info, physname, pvarargs)
- PTR dhandle;
- struct stab_handle *info;
- const char *physname;
- boolean *pvarargs;
+stab_demangle_argtypes (void *dhandle, struct stab_handle *info,
+ const char *physname, bfd_boolean *pvarargs,
+ unsigned int physname_len)
{
struct stab_demangle_info minfo;
+ /* Check for the g++ V3 ABI. */
+ if (physname[0] == '_' && physname[1] == 'Z')
+ return stab_demangle_v3_argtypes (dhandle, info, physname, pvarargs);
+
minfo.dhandle = dhandle;
minfo.info = info;
minfo.args = NULL;
- minfo.varargs = false;
+ minfo.varargs = FALSE;
minfo.typestring_alloc = 10;
minfo.typestrings = ((struct stab_demangle_typestring *)
xmalloc (minfo.typestring_alloc
@@ -3842,7 +3721,7 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs)
/* cplus_demangle checks for special GNU mangled forms, but we can't
see any of them in mangled method argument types. */
- if (! stab_demangle_prefix (&minfo, &physname))
+ if (! stab_demangle_prefix (&minfo, &physname, physname_len))
goto error_return;
if (*physname != '\0')
@@ -3868,10 +3747,9 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs)
/* Demangle the prefix of the mangled name. */
-static boolean
-stab_demangle_prefix (minfo, pp)
- struct stab_demangle_info *minfo;
- const char **pp;
+static bfd_boolean
+stab_demangle_prefix (struct stab_demangle_info *minfo, const char **pp,
+ unsigned int physname_len)
{
const char *scan;
unsigned int i;
@@ -3879,26 +3757,29 @@ stab_demangle_prefix (minfo, pp)
/* cplus_demangle checks for global constructors and destructors,
but we can't see them in mangled argument types. */
- /* Look for `__'. */
- scan = *pp;
- do
+ if (physname_len)
+ scan = *pp + physname_len;
+ else
{
- scan = strchr (scan, '_');
- }
- while (scan != NULL && *++scan != '_');
+ /* Look for `__'. */
+ scan = *pp;
+ do
+ scan = strchr (scan, '_');
+ while (scan != NULL && *++scan != '_');
- if (scan == NULL)
- {
- stab_bad_demangle (*pp);
- return false;
- }
+ if (scan == NULL)
+ {
+ stab_bad_demangle (*pp);
+ return FALSE;
+ }
- --scan;
+ --scan;
- /* We found `__'; move ahead to the last contiguous `__' pair. */
- i = strspn (scan, "_");
- if (i > 2)
- scan += i - 2;
+ /* We found `__'; move ahead to the last contiguous `__' pair. */
+ i = strspn (scan, "_");
+ if (i > 2)
+ scan += i - 2;
+ }
if (scan == *pp
&& (ISDIGIT (scan[2])
@@ -3907,7 +3788,7 @@ stab_demangle_prefix (minfo, pp)
{
/* This is a GNU style constructor name. */
*pp = scan + 2;
- return true;
+ return TRUE;
}
else if (scan == *pp
&& ! ISDIGIT (scan[2])
@@ -3921,7 +3802,7 @@ stab_demangle_prefix (minfo, pp)
if (scan == NULL || scan[2] == '\0')
{
stab_bad_demangle (*pp);
- return false;
+ return FALSE;
}
return stab_demangle_function_name (minfo, pp, scan);
@@ -3934,7 +3815,7 @@ stab_demangle_prefix (minfo, pp)
else
{
stab_bad_demangle (*pp);
- return false;
+ return FALSE;
}
/*NOTREACHED*/
}
@@ -3943,11 +3824,9 @@ stab_demangle_prefix (minfo, pp)
double underscore which separates the function name from the
signature. */
-static boolean
-stab_demangle_function_name (minfo, pp, scan)
- struct stab_demangle_info *minfo;
- const char **pp;
- const char *scan;
+static bfd_boolean
+stab_demangle_function_name (struct stab_demangle_info *minfo,
+ const char **pp, const char *scan)
{
const char *name;
@@ -3968,7 +3847,7 @@ stab_demangle_function_name (minfo, pp, scan)
/* This is a type conversion operator. */
tem = name + 5;
if (! stab_demangle_type (minfo, &tem, (debug_type *) NULL))
- return false;
+ return FALSE;
}
else if (name[0] == '_'
&& name[1] == '_'
@@ -3980,28 +3859,26 @@ stab_demangle_function_name (minfo, pp, scan)
/* This is a type conversion operator. */
tem = name + 4;
if (! stab_demangle_type (minfo, &tem, (debug_type *) NULL))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Demangle the signature. This is where the argument types are
found. */
-static boolean
-stab_demangle_signature (minfo, pp)
- struct stab_demangle_info *minfo;
- const char **pp;
+static bfd_boolean
+stab_demangle_signature (struct stab_demangle_info *minfo, const char **pp)
{
const char *orig;
- boolean expect_func, func_done;
+ bfd_boolean expect_func, func_done;
const char *hold;
orig = *pp;
- expect_func = false;
- func_done = false;
+ expect_func = FALSE;
+ func_done = FALSE;
hold = NULL;
while (**pp != '\0')
@@ -4012,8 +3889,8 @@ stab_demangle_signature (minfo, pp)
hold = *pp;
if (! stab_demangle_qualified (minfo, pp, (debug_type *) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
- return false;
- expect_func = true;
+ return FALSE;
+ expect_func = TRUE;
hold = NULL;
break;
@@ -4037,8 +3914,8 @@ stab_demangle_signature (minfo, pp)
hold = *pp;
if (! stab_demangle_class (minfo, pp, (const char **) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
- return false;
- expect_func = true;
+ return FALSE;
+ expect_func = TRUE;
hold = NULL;
break;
@@ -4046,10 +3923,10 @@ stab_demangle_signature (minfo, pp)
/* Function. I don't know if this actually happens with g++
output. */
hold = NULL;
- func_done = true;
+ func_done = TRUE;
++*pp;
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
break;
case 't':
@@ -4058,9 +3935,9 @@ stab_demangle_signature (minfo, pp)
hold = *pp;
if (! stab_demangle_template (minfo, pp, (char **) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
- return false;
+ return FALSE;
hold = NULL;
- expect_func = true;
+ expect_func = TRUE;
break;
case '_':
@@ -4070,22 +3947,22 @@ stab_demangle_signature (minfo, pp)
has been mangled by some algorithm we don't know how to
deal with. So just reject the entire demangling. */
stab_bad_demangle (orig);
- return false;
+ return FALSE;
default:
/* Assume we have stumbled onto the first outermost function
argument token, and start processing args. */
- func_done = true;
+ func_done = TRUE;
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
break;
}
if (expect_func)
{
- func_done = true;
+ func_done = TRUE;
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
}
}
@@ -4096,20 +3973,18 @@ stab_demangle_signature (minfo, pp)
first case, and need to ensure that the '(void)' gets added
to the current declp. */
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Demangle a qualified name, such as "Q25Outer5Inner" which is the
mangled form of "Outer::Inner". */
-static boolean
-stab_demangle_qualified (minfo, pp, ptype)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type *ptype;
+static bfd_boolean
+stab_demangle_qualified (struct stab_demangle_info *minfo, const char **pp,
+ debug_type *ptype)
{
const char *orig;
const char *p;
@@ -4128,7 +4003,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (! ISDIGIT (*p) || *p == '0')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
qualifiers = atoi (p);
while (ISDIGIT (*p))
@@ -4136,7 +4011,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (*p != '_')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
*pp = p + 1;
break;
@@ -4153,7 +4028,7 @@ stab_demangle_qualified (minfo, pp, ptype)
case '0':
default:
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
context = DEBUG_TYPE_NULL;
@@ -4169,7 +4044,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (! stab_demangle_template (minfo, pp,
ptype != NULL ? &name : NULL))
- return false;
+ return FALSE;
if (ptype != NULL)
{
@@ -4178,7 +4053,7 @@ stab_demangle_qualified (minfo, pp, ptype)
DEBUG_KIND_CLASS);
free (name);
if (context == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
else
@@ -4189,7 +4064,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (strlen (*pp) < len)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (ptype != NULL)
@@ -4223,7 +4098,7 @@ stab_demangle_qualified (minfo, pp, ptype)
ft = debug_get_field_type (minfo->dhandle, *fields);
if (ft == NULL)
- return false;
+ return FALSE;
dn = debug_get_type_name (minfo->dhandle, ft);
if (dn != NULL && strcmp (dn, name) == 0)
{
@@ -4260,7 +4135,7 @@ stab_demangle_qualified (minfo, pp, ptype)
? DEBUG_KIND_ILLEGAL
: DEBUG_KIND_CLASS));
if (context == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
}
@@ -4272,17 +4147,15 @@ stab_demangle_qualified (minfo, pp, ptype)
if (ptype != NULL)
*ptype = context;
- return true;
+ return TRUE;
}
/* Demangle a template. If PNAME is not NULL, this sets *PNAME to a
string representation of the template. */
-static boolean
-stab_demangle_template (minfo, pp, pname)
- struct stab_demangle_info *minfo;
- const char **pp;
- char **pname;
+static bfd_boolean
+stab_demangle_template (struct stab_demangle_info *minfo, const char **pp,
+ char **pname)
{
const char *orig;
unsigned int r, i;
@@ -4296,7 +4169,7 @@ stab_demangle_template (minfo, pp, pname)
if (r == 0 || strlen (*pp) < r)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
*pp += r;
@@ -4304,7 +4177,7 @@ stab_demangle_template (minfo, pp, pname)
if (stab_demangle_get_count (pp, &r) == 0)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
for (i = 0; i < r; i++)
@@ -4314,26 +4187,26 @@ stab_demangle_template (minfo, pp, pname)
/* This is a type parameter. */
++*pp;
if (! stab_demangle_type (minfo, pp, (debug_type *) NULL))
- return false;
+ return FALSE;
}
else
{
const char *old_p;
- boolean pointerp, realp, integralp, charp, boolp;
- boolean done;
+ bfd_boolean pointerp, realp, integralp, charp, boolp;
+ bfd_boolean done;
old_p = *pp;
- pointerp = false;
- realp = false;
- integralp = false;
- charp = false;
- boolp = false;
- done = false;
+ pointerp = FALSE;
+ realp = FALSE;
+ integralp = FALSE;
+ charp = FALSE;
+ boolp = FALSE;
+ done = FALSE;
/* This is a value parameter. */
if (! stab_demangle_type (minfo, pp, (debug_type *) NULL))
- return false;
+ return FALSE;
while (*old_p != '\0' && ! done)
{
@@ -4342,8 +4215,8 @@ stab_demangle_template (minfo, pp, pname)
case 'P':
case 'p':
case 'R':
- pointerp = true;
- done = true;
+ pointerp = TRUE;
+ done = TRUE;
break;
case 'C': /* Const. */
case 'S': /* Signed. */
@@ -4355,8 +4228,8 @@ stab_demangle_template (minfo, pp, pname)
++old_p;
break;
case 'Q': /* Qualified name. */
- integralp = true;
- done = true;
+ integralp = TRUE;
+ done = TRUE;
break;
case 'T': /* Remembered type. */
abort ();
@@ -4367,27 +4240,27 @@ stab_demangle_template (minfo, pp, pname)
case 'i': /* Int. */
case 's': /* Short. */
case 'w': /* Wchar_t. */
- integralp = true;
- done = true;
+ integralp = TRUE;
+ done = TRUE;
break;
case 'b': /* Bool. */
- boolp = true;
- done = true;
+ boolp = TRUE;
+ done = TRUE;
break;
case 'c': /* Char. */
- charp = true;
- done = true;
+ charp = TRUE;
+ done = TRUE;
break;
case 'r': /* Long double. */
case 'd': /* Double. */
case 'f': /* Float. */
- realp = true;
- done = true;
+ realp = TRUE;
+ done = TRUE;
break;
default:
/* Assume it's a user defined integral type. */
- integralp = true;
- done = true;
+ integralp = TRUE;
+ done = TRUE;
break;
}
}
@@ -4409,7 +4282,7 @@ stab_demangle_template (minfo, pp, pname)
if (val == 0)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
}
else if (boolp)
@@ -4420,7 +4293,7 @@ stab_demangle_template (minfo, pp, pname)
if (val != 0 && val != 1)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
}
else if (realp)
@@ -4449,7 +4322,7 @@ stab_demangle_template (minfo, pp, pname)
if (! stab_demangle_get_count (pp, &len))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
*pp += len;
}
@@ -4480,7 +4353,7 @@ stab_demangle_template (minfo, pp, pname)
stab_bad_demangle (orig);
if (s3 != NULL)
free (s3);
- return false;
+ return FALSE;
}
/* Eliminating all spaces, except those between > characters,
@@ -4496,16 +4369,14 @@ stab_demangle_template (minfo, pp, pname)
free (s3);
}
- return true;
+ return TRUE;
}
/* Demangle a class name. */
-static boolean
-stab_demangle_class (minfo, pp, pstart)
- struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
- const char **pp;
- const char **pstart;
+static bfd_boolean
+stab_demangle_class (struct stab_demangle_info *minfo ATTRIBUTE_UNUSED,
+ const char **pp, const char **pstart)
{
const char *orig;
unsigned int n;
@@ -4516,7 +4387,7 @@ stab_demangle_class (minfo, pp, pstart)
if (strlen (*pp) < n)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (pstart != NULL)
@@ -4524,18 +4395,15 @@ stab_demangle_class (minfo, pp, pstart)
*pp += n;
- return true;
+ return TRUE;
}
/* Demangle function arguments. If the pargs argument is not NULL, it
is set to a NULL terminated array holding the arguments. */
-static boolean
-stab_demangle_args (minfo, pp, pargs, pvarargs)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type **pargs;
- boolean *pvarargs;
+static bfd_boolean
+stab_demangle_args (struct stab_demangle_info *minfo, const char **pp,
+ debug_type **pargs, bfd_boolean *pvarargs)
{
const char *orig;
unsigned int alloc, count;
@@ -4546,7 +4414,7 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
if (pargs != NULL)
{
*pargs = (debug_type *) xmalloc (alloc * sizeof **pargs);
- *pvarargs = false;
+ *pvarargs = FALSE;
}
count = 0;
@@ -4567,20 +4435,20 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
if (! stab_demangle_get_count (pp, &r))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
}
if (! stab_demangle_get_count (pp, &t))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (t >= minfo->typestring_count)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
while (r-- > 0)
{
@@ -4588,13 +4456,13 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
tem = minfo->typestrings[t].typestring;
if (! stab_demangle_arg (minfo, &tem, pargs, &count, &alloc))
- return false;
+ return FALSE;
}
}
else
{
if (! stab_demangle_arg (minfo, pp, pargs, &count, &alloc))
- return false;
+ return FALSE;
}
}
@@ -4604,22 +4472,19 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
if (**pp == 'e')
{
if (pargs != NULL)
- *pvarargs = true;
+ *pvarargs = TRUE;
++*pp;
}
- return true;
+ return TRUE;
}
/* Demangle a single argument. */
-static boolean
-stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type **pargs;
- unsigned int *pcount;
- unsigned int *palloc;
+static bfd_boolean
+stab_demangle_arg (struct stab_demangle_info *minfo, const char **pp,
+ debug_type **pargs, unsigned int *pcount,
+ unsigned int *palloc)
{
const char *start;
debug_type type;
@@ -4628,12 +4493,12 @@ stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
if (! stab_demangle_type (minfo, pp,
pargs == NULL ? (debug_type *) NULL : &type)
|| ! stab_demangle_remember_type (minfo, start, *pp - start))
- return false;
+ return FALSE;
if (pargs != NULL)
{
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (*pcount + 1 >= *palloc)
{
@@ -4645,17 +4510,15 @@ stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
++*pcount;
}
- return true;
+ return TRUE;
}
/* Demangle a type. If the ptype argument is not NULL, *ptype is set
to the newly allocated type. */
-static boolean
-stab_demangle_type (minfo, pp, ptype)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type *ptype;
+static bfd_boolean
+stab_demangle_type (struct stab_demangle_info *minfo, const char **pp,
+ debug_type *ptype)
{
const char *orig;
@@ -4668,7 +4531,7 @@ stab_demangle_type (minfo, pp, ptype)
/* A pointer type. */
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_pointer_type (minfo->dhandle, *ptype);
break;
@@ -4677,7 +4540,7 @@ stab_demangle_type (minfo, pp, ptype)
/* A reference type. */
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_reference_type (minfo->dhandle, *ptype);
break;
@@ -4694,7 +4557,7 @@ stab_demangle_type (minfo, pp, ptype)
if (! ISDIGIT (**pp))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
high *= 10;
high += **pp - '0';
@@ -4703,21 +4566,21 @@ stab_demangle_type (minfo, pp, ptype)
if (**pp != '_')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
{
debug_type int_type;
int_type = debug_find_named_type (minfo->dhandle, "int");
if (int_type == NULL)
- int_type = debug_make_int_type (minfo->dhandle, 4, false);
+ int_type = debug_make_int_type (minfo->dhandle, 4, FALSE);
*ptype = debug_make_array_type (minfo->dhandle, *ptype, int_type,
- 0, high, false);
+ 0, high, FALSE);
}
}
break;
@@ -4732,16 +4595,16 @@ stab_demangle_type (minfo, pp, ptype)
if (! stab_demangle_get_count (pp, &i))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (i >= minfo->typestring_count)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
p = minfo->typestrings[i].typestring;
if (! stab_demangle_type (minfo, &p, ptype))
- return false;
+ return FALSE;
}
break;
@@ -4749,7 +4612,7 @@ stab_demangle_type (minfo, pp, ptype)
/* A function. */
{
debug_type *args;
- boolean varargs;
+ bfd_boolean varargs;
++*pp;
if (! stab_demangle_args (minfo, pp,
@@ -4757,20 +4620,20 @@ stab_demangle_type (minfo, pp, ptype)
? (debug_type **) NULL
: &args),
(ptype == NULL
- ? (boolean *) NULL
+ ? (bfd_boolean *) NULL
: &varargs)))
- return false;
+ return FALSE;
if (**pp != '_')
{
/* cplus_demangle will accept a function without a return
type, but I don't know when that will happen, or what
to do if it does. */
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_function_type (minfo->dhandle, *ptype, args,
varargs);
@@ -4781,18 +4644,18 @@ stab_demangle_type (minfo, pp, ptype)
case 'M':
case 'O':
{
- boolean memberp, constp, volatilep;
+ bfd_boolean memberp, constp, volatilep;
debug_type class_type = DEBUG_TYPE_NULL;
debug_type *args;
- boolean varargs;
+ bfd_boolean varargs;
unsigned int n;
const char *name;
memberp = **pp == 'M';
- constp = false;
- volatilep = false;
+ constp = FALSE;
+ volatilep = FALSE;
args = NULL;
- varargs = false;
+ varargs = FALSE;
++*pp;
if (ISDIGIT (**pp))
@@ -4801,7 +4664,7 @@ stab_demangle_type (minfo, pp, ptype)
if (strlen (*pp) < n)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
name = *pp;
*pp += n;
@@ -4813,7 +4676,7 @@ stab_demangle_type (minfo, pp, ptype)
name, (int) n,
DEBUG_KIND_CLASS);
if (class_type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
else if (**pp == 'Q')
@@ -4822,30 +4685,30 @@ stab_demangle_type (minfo, pp, ptype)
(ptype == NULL
? (debug_type *) NULL
: &class_type)))
- return false;
+ return FALSE;
}
else
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (memberp)
{
if (**pp == 'C')
{
- constp = true;
+ constp = TRUE;
++*pp;
}
else if (**pp == 'V')
{
- volatilep = true;
+ volatilep = TRUE;
++*pp;
}
if (**pp != 'F')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_args (minfo, pp,
@@ -4853,20 +4716,20 @@ stab_demangle_type (minfo, pp, ptype)
? (debug_type **) NULL
: &args),
(ptype == NULL
- ? (boolean *) NULL
+ ? (bfd_boolean *) NULL
: &varargs)))
- return false;
+ return FALSE;
}
if (**pp != '_')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
{
@@ -4887,13 +4750,13 @@ stab_demangle_type (minfo, pp, ptype)
case 'G':
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
break;
case 'C':
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_const_type (minfo->dhandle, *ptype);
break;
@@ -4904,66 +4767,64 @@ stab_demangle_type (minfo, pp, ptype)
hold = *pp;
if (! stab_demangle_qualified (minfo, pp, ptype))
- return false;
+ return FALSE;
}
break;
default:
if (! stab_demangle_fund_type (minfo, pp, ptype))
- return false;
+ return FALSE;
break;
}
- return true;
+ return TRUE;
}
/* Demangle a fundamental type. If the ptype argument is not NULL,
*ptype is set to the newly allocated type. */
-static boolean
-stab_demangle_fund_type (minfo, pp, ptype)
- struct stab_demangle_info *minfo;
- const char **pp;
- debug_type *ptype;
+static bfd_boolean
+stab_demangle_fund_type (struct stab_demangle_info *minfo, const char **pp,
+ debug_type *ptype)
{
const char *orig;
- boolean constp, volatilep, unsignedp, signedp;
- boolean done;
+ bfd_boolean constp, volatilep, unsignedp, signedp;
+ bfd_boolean done;
orig = *pp;
- constp = false;
- volatilep = false;
- unsignedp = false;
- signedp = false;
+ constp = FALSE;
+ volatilep = FALSE;
+ unsignedp = FALSE;
+ signedp = FALSE;
- done = false;
+ done = FALSE;
while (! done)
{
switch (**pp)
{
case 'C':
- constp = true;
+ constp = TRUE;
++*pp;
break;
case 'U':
- unsignedp = true;
+ unsignedp = TRUE;
++*pp;
break;
case 'S':
- signedp = true;
+ signedp = TRUE;
++*pp;
break;
case 'V':
- volatilep = true;
+ volatilep = TRUE;
++*pp;
break;
default:
- done = true;
+ done = TRUE;
break;
}
}
@@ -5068,7 +4929,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
{
*ptype = debug_find_named_type (minfo->dhandle, "__wchar_t");
if (*ptype == DEBUG_TYPE_NULL)
- *ptype = debug_make_int_type (minfo->dhandle, 2, true);
+ *ptype = debug_make_int_type (minfo->dhandle, 2, TRUE);
}
++*pp;
break;
@@ -5108,7 +4969,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
if (! ISDIGIT (**pp))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
/* Fall through. */
case '0': case '1': case '2': case '3': case '4':
@@ -5117,7 +4978,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
const char *hold;
if (! stab_demangle_class (minfo, pp, &hold))
- return false;
+ return FALSE;
if (ptype != NULL)
{
char *name;
@@ -5133,7 +4994,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
hold, *pp - hold,
DEBUG_KIND_ILLEGAL);
if (*ptype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
}
@@ -5145,7 +5006,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
if (! stab_demangle_template (minfo, pp,
ptype != NULL ? &name : NULL))
- return false;
+ return FALSE;
if (ptype != NULL)
{
*ptype = stab_find_tagged_type (minfo->dhandle, minfo->info,
@@ -5153,14 +5014,14 @@ stab_demangle_fund_type (minfo, pp, ptype)
DEBUG_KIND_CLASS);
free (name);
if (*ptype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
break;
default:
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (ptype != NULL)
@@ -5171,16 +5032,14 @@ stab_demangle_fund_type (minfo, pp, ptype)
*ptype = debug_make_volatile_type (minfo->dhandle, *ptype);
}
- return true;
+ return TRUE;
}
/* Remember a type string in a demangled string. */
-static boolean
-stab_demangle_remember_type (minfo, p, len)
- struct stab_demangle_info *minfo;
- const char *p;
- int len;
+static bfd_boolean
+stab_demangle_remember_type (struct stab_demangle_info *minfo,
+ const char *p, int len)
{
if (minfo->typestring_count >= minfo->typestring_alloc)
{
@@ -5195,5 +5054,296 @@ stab_demangle_remember_type (minfo, p, len)
minfo->typestrings[minfo->typestring_count].len = (unsigned int) len;
++minfo->typestring_count;
- return true;
+ return TRUE;
+}
+
+/* Demangle names encoded using the g++ V3 ABI. The newer versions of
+ g++ which use this ABI do not encode ordinary method argument types
+ in a mangled name; they simply output the argument types. However,
+ for a static method, g++ simply outputs the return type and the
+ physical name. So in that case we need to demangle the name here.
+ Here PHYSNAME is the physical name of the function, and we set the
+ variable pointed at by PVARARGS to indicate whether this function
+ is varargs. This returns NULL, or a NULL terminated array of
+ argument types. */
+
+static debug_type *
+stab_demangle_v3_argtypes (void *dhandle, struct stab_handle *info,
+ const char *physname, bfd_boolean *pvarargs)
+{
+ struct demangle_component *dc;
+ void *mem;
+ unsigned int alloc, count;
+ debug_type *pargs;
+
+ dc = cplus_demangle_v3_components (physname, DMGL_PARAMS | DMGL_ANSI, &mem);
+ if (dc == NULL)
+ {
+ stab_bad_demangle (physname);
+ return NULL;
+ }
+
+ /* We expect to see TYPED_NAME, and the right subtree describes the
+ function type. */
+ if (dc->type != DEMANGLE_COMPONENT_TYPED_NAME
+ || dc->u.s_binary.right->type != DEMANGLE_COMPONENT_FUNCTION_TYPE)
+ {
+ fprintf (stderr, _("Demangled name is not a function\n"));
+ free (mem);
+ return NULL;
+ }
+
+ alloc = 10;
+ pargs = (debug_type *) xmalloc (alloc * sizeof *pargs);
+ *pvarargs = FALSE;
+
+ count = 0;
+
+ for (dc = dc->u.s_binary.right->u.s_binary.right;
+ dc != NULL;
+ dc = dc->u.s_binary.right)
+ {
+ debug_type arg;
+ bfd_boolean varargs;
+
+ if (dc->type != DEMANGLE_COMPONENT_ARGLIST)
+ {
+ fprintf (stderr, _("Unexpected type in demangle tree\n"));
+ free (mem);
+ return NULL;
+ }
+
+ arg = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left,
+ NULL, &varargs);
+ if (arg == NULL)
+ {
+ if (varargs)
+ {
+ *pvarargs = TRUE;
+ continue;
+ }
+ free (mem);
+ return NULL;
+ }
+
+ if (count + 1 >= alloc)
+ {
+ alloc += 10;
+ pargs = (debug_type *) xrealloc (pargs, alloc * sizeof *pargs);
+ }
+
+ pargs[count] = arg;
+ ++count;
+ }
+
+ pargs[count] = DEBUG_TYPE_NULL;
+
+ free (mem);
+
+ return pargs;
+}
+
+/* Convert a struct demangle_component tree describing an argument
+ type into a debug_type. */
+
+static debug_type
+stab_demangle_v3_arg (void *dhandle, struct stab_handle *info,
+ struct demangle_component *dc, debug_type context,
+ bfd_boolean *pvarargs)
+{
+ debug_type dt;
+
+ if (pvarargs != NULL)
+ *pvarargs = FALSE;
+
+ switch (dc->type)
+ {
+ /* FIXME: These are demangle component types which we probably
+ need to handle one way or another. */
+ case DEMANGLE_COMPONENT_LOCAL_NAME:
+ case DEMANGLE_COMPONENT_TYPED_NAME:
+ case DEMANGLE_COMPONENT_TEMPLATE_PARAM:
+ case DEMANGLE_COMPONENT_CTOR:
+ case DEMANGLE_COMPONENT_DTOR:
+ case DEMANGLE_COMPONENT_JAVA_CLASS:
+ case DEMANGLE_COMPONENT_RESTRICT_THIS:
+ case DEMANGLE_COMPONENT_VOLATILE_THIS:
+ case DEMANGLE_COMPONENT_CONST_THIS:
+ case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
+ case DEMANGLE_COMPONENT_COMPLEX:
+ case DEMANGLE_COMPONENT_IMAGINARY:
+ case DEMANGLE_COMPONENT_VENDOR_TYPE:
+ case DEMANGLE_COMPONENT_FUNCTION_TYPE:
+ case DEMANGLE_COMPONENT_ARRAY_TYPE:
+ case DEMANGLE_COMPONENT_PTRMEM_TYPE:
+ case DEMANGLE_COMPONENT_ARGLIST:
+ default:
+ fprintf (stderr, _("Unrecognized demangle component\n"));
+ return NULL;
+
+ case DEMANGLE_COMPONENT_NAME:
+ if (context != NULL)
+ {
+ const debug_field *fields;
+
+ fields = debug_get_fields (dhandle, context);
+ if (fields != NULL)
+ {
+ /* Try to find this type by looking through the context
+ class. */
+ for (; *fields != DEBUG_FIELD_NULL; fields++)
+ {
+ debug_type ft;
+ const char *dn;
+
+ ft = debug_get_field_type (dhandle, *fields);
+ if (ft == NULL)
+ return NULL;
+ dn = debug_get_type_name (dhandle, ft);
+ if (dn != NULL
+ && (int) strlen (dn) == dc->u.s_name.len
+ && strncmp (dn, dc->u.s_name.s, dc->u.s_name.len) == 0)
+ return ft;
+ }
+ }
+ }
+ return stab_find_tagged_type (dhandle, info, dc->u.s_name.s,
+ dc->u.s_name.len, DEBUG_KIND_ILLEGAL);
+
+ case DEMANGLE_COMPONENT_QUAL_NAME:
+ context = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left,
+ context, NULL);
+ if (context == NULL)
+ return NULL;
+ return stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.right,
+ context, NULL);
+
+ case DEMANGLE_COMPONENT_TEMPLATE:
+ {
+ char *p;
+ size_t alc;
+
+ /* We print this component to get a class name which we can
+ use. FIXME: This probably won't work if the template uses
+ template parameters which refer to an outer template. */
+ p = cplus_demangle_print (DMGL_PARAMS | DMGL_ANSI, dc, 20, &alc);
+ if (p == NULL)
+ {
+ fprintf (stderr, _("Failed to print demangled template\n"));
+ return NULL;
+ }
+ dt = stab_find_tagged_type (dhandle, info, p, strlen (p),
+ DEBUG_KIND_CLASS);
+ free (p);
+ return dt;
+ }
+
+ case DEMANGLE_COMPONENT_SUB_STD:
+ return stab_find_tagged_type (dhandle, info, dc->u.s_string.string,
+ dc->u.s_string.len, DEBUG_KIND_ILLEGAL);
+
+ case DEMANGLE_COMPONENT_RESTRICT:
+ case DEMANGLE_COMPONENT_VOLATILE:
+ case DEMANGLE_COMPONENT_CONST:
+ case DEMANGLE_COMPONENT_POINTER:
+ case DEMANGLE_COMPONENT_REFERENCE:
+ dt = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left, NULL,
+ NULL);
+ if (dt == NULL)
+ return NULL;
+
+ switch (dc->type)
+ {
+ default:
+ abort ();
+ case DEMANGLE_COMPONENT_RESTRICT:
+ /* FIXME: We have no way to represent restrict. */
+ return dt;
+ case DEMANGLE_COMPONENT_VOLATILE:
+ return debug_make_volatile_type (dhandle, dt);
+ case DEMANGLE_COMPONENT_CONST:
+ return debug_make_const_type (dhandle, dt);
+ case DEMANGLE_COMPONENT_POINTER:
+ return debug_make_pointer_type (dhandle, dt);
+ case DEMANGLE_COMPONENT_REFERENCE:
+ return debug_make_reference_type (dhandle, dt);
+ }
+
+ case DEMANGLE_COMPONENT_BUILTIN_TYPE:
+ {
+ char *p;
+ size_t alc;
+ debug_type ret;
+
+ /* We print this component in order to find out the type name.
+ FIXME: Should we instead expose the
+ demangle_builtin_type_info structure? */
+ p = cplus_demangle_print (DMGL_PARAMS | DMGL_ANSI, dc, 20, &alc);
+ if (p == NULL)
+ {
+ fprintf (stderr, _("Couldn't get demangled builtin type\n"));
+ return NULL;
+ }
+
+ /* The mangling is based on the type, but does not itself
+ indicate what the sizes are. So we have to guess. */
+ if (strcmp (p, "signed char") == 0)
+ ret = debug_make_int_type (dhandle, 1, FALSE);
+ else if (strcmp (p, "bool") == 0)
+ ret = debug_make_bool_type (dhandle, 1);
+ else if (strcmp (p, "char") == 0)
+ ret = debug_make_int_type (dhandle, 1, FALSE);
+ else if (strcmp (p, "double") == 0)
+ ret = debug_make_float_type (dhandle, 8);
+ else if (strcmp (p, "long double") == 0)
+ ret = debug_make_float_type (dhandle, 8);
+ else if (strcmp (p, "float") == 0)
+ ret = debug_make_float_type (dhandle, 4);
+ else if (strcmp (p, "__float128") == 0)
+ ret = debug_make_float_type (dhandle, 16);
+ else if (strcmp (p, "unsigned char") == 0)
+ ret = debug_make_int_type (dhandle, 1, TRUE);
+ else if (strcmp (p, "int") == 0)
+ ret = debug_make_int_type (dhandle, 4, FALSE);
+ else if (strcmp (p, "unsigned int") == 0)
+ ret = debug_make_int_type (dhandle, 4, TRUE);
+ else if (strcmp (p, "long") == 0)
+ ret = debug_make_int_type (dhandle, 4, FALSE);
+ else if (strcmp (p, "unsigned long") == 0)
+ ret = debug_make_int_type (dhandle, 4, TRUE);
+ else if (strcmp (p, "__int128") == 0)
+ ret = debug_make_int_type (dhandle, 16, FALSE);
+ else if (strcmp (p, "unsigned __int128") == 0)
+ ret = debug_make_int_type (dhandle, 16, TRUE);
+ else if (strcmp (p, "short") == 0)
+ ret = debug_make_int_type (dhandle, 2, FALSE);
+ else if (strcmp (p, "unsigned short") == 0)
+ ret = debug_make_int_type (dhandle, 2, TRUE);
+ else if (strcmp (p, "void") == 0)
+ ret = debug_make_void_type (dhandle);
+ else if (strcmp (p, "wchar_t") == 0)
+ ret = debug_make_int_type (dhandle, 4, TRUE);
+ else if (strcmp (p, "long long") == 0)
+ ret = debug_make_int_type (dhandle, 8, FALSE);
+ else if (strcmp (p, "unsigned long long") == 0)
+ ret = debug_make_int_type (dhandle, 8, TRUE);
+ else if (strcmp (p, "...") == 0)
+ {
+ if (pvarargs == NULL)
+ fprintf (stderr, _("Unexpected demangled varargs\n"));
+ else
+ *pvarargs = TRUE;
+ ret = NULL;
+ }
+ else
+ {
+ fprintf (stderr, _("Unrecognized demangled builtin type\n"));
+ ret = NULL;
+ }
+
+ free (p);
+
+ return ret;
+ }
+ }
}
diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c
index 2d0362b..a1df1e0 100644
--- a/contrib/binutils/binutils/sysdump.c
+++ b/contrib/binutils/binutils/sysdump.c
@@ -1,5 +1,5 @@
/* Sysroff object format dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -40,35 +40,31 @@ static int code;
static int addrsize = 4;
static FILE *file;
-static void dh PARAMS ((unsigned char *, int));
-static void itheader PARAMS ((char *, int));
-static void p PARAMS ((void));
-static void tabout PARAMS ((void));
-static void pbarray PARAMS ((barray *));
-static int getone PARAMS ((int));
-static int opt PARAMS ((int));
-static void must PARAMS ((int));
-static void tab PARAMS ((int, char *));
-static void dump_symbol_info PARAMS ((void));
-static void derived_type PARAMS ((void));
-static void module PARAMS ((void));
-static void show_usage PARAMS ((FILE *, int));
-
-extern char *getCHARS PARAMS ((unsigned char *, int *, int, int));
-extern int fillup PARAMS ((char *));
-extern barray getBARRAY PARAMS ((unsigned char *, int *, int, int));
-extern int getINT PARAMS ((unsigned char *, int *, int, int));
-extern int getBITS PARAMS ((char *, int *, int, int));
-extern void sysroff_swap_tr_in PARAMS ((void));
-extern void sysroff_print_tr_out PARAMS ((void));
-extern int main PARAMS ((int, char **));
+static void dh (unsigned char *, int);
+static void itheader (char *, int);
+static void p (void);
+static void tabout (void);
+static void pbarray (barray *);
+static int getone (int);
+static int opt (int);
+static void must (int);
+static void tab (int, char *);
+static void dump_symbol_info (void);
+static void derived_type (void);
+static void module (void);
+static void show_usage (FILE *, int);
+
+extern char *getCHARS (unsigned char *, int *, int, int);
+extern int fillup (char *);
+extern barray getBARRAY (unsigned char *, int *, int, int);
+extern int getINT (unsigned char *, int *, int, int);
+extern int getBITS (char *, int *, int, int);
+extern void sysroff_swap_tr_in (void);
+extern void sysroff_print_tr_out (void);
+extern int main (int, char **);
char *
-getCHARS (ptr, idx, size, max)
- unsigned char *ptr;
- int *idx;
- int size;
- int max;
+getCHARS (unsigned char *ptr, int *idx, int size, int max)
{
int oc = *idx / 8;
char *r;
@@ -93,9 +89,7 @@ getCHARS (ptr, idx, size, max)
}
static void
-dh (ptr, size)
- unsigned char *ptr;
- int size;
+dh (unsigned char *ptr, int size)
{
int i;
int j;
@@ -127,8 +121,7 @@ dh (ptr, size)
}
int
-fillup (ptr)
- char *ptr;
+fillup (char *ptr)
{
int size;
int sum;
@@ -151,11 +144,8 @@ fillup (ptr)
}
barray
-getBARRAY (ptr, idx, dsize, max)
- unsigned char *ptr;
- int *idx;
- int dsize ATTRIBUTE_UNUSED;
- int max ATTRIBUTE_UNUSED;
+getBARRAY (unsigned char *ptr, int *idx, int dsize ATTRIBUTE_UNUSED,
+ int max ATTRIBUTE_UNUSED)
{
barray res;
int i;
@@ -172,11 +162,7 @@ getBARRAY (ptr, idx, dsize, max)
}
int
-getINT (ptr, idx, size, max)
- unsigned char *ptr;
- int *idx;
- int size;
- int max;
+getINT (unsigned char *ptr, int *idx, int size, int max)
{
int n = 0;
int byte = *idx / 8;
@@ -212,10 +198,7 @@ getINT (ptr, idx, size, max)
}
int
-getBITS (ptr, idx, size, max)
- char *ptr;
- int *idx;
- int size, max;
+getBITS (char *ptr, int *idx, int size, int max)
{
int byte = *idx / 8;
int bit = *idx % 8;
@@ -229,9 +212,7 @@ getBITS (ptr, idx, size, max)
}
static void
-itheader (name, code)
- char *name;
- int code;
+itheader (char *name, int code)
{
printf ("\n%s 0x%02x\n", name, code);
}
@@ -239,7 +220,7 @@ itheader (name, code)
static int indent;
static void
-p ()
+p (void)
{
int i;
@@ -250,14 +231,13 @@ p ()
}
static void
-tabout ()
+tabout (void)
{
p ();
}
static void
-pbarray (y)
- barray *y;
+pbarray (barray *y)
{
int x;
@@ -283,7 +263,7 @@ pbarray (y)
#define IT_tr_CODE 0x7f
void
-sysroff_swap_tr_in()
+sysroff_swap_tr_in (void)
{
char raw[255];
@@ -292,14 +272,13 @@ sysroff_swap_tr_in()
}
void
-sysroff_print_tr_out()
+sysroff_print_tr_out (void)
{
itheader ("tr", IT_tr_CODE);
}
static int
-getone (type)
- int type;
+getone (int type)
{
int c = getc (file);
@@ -531,8 +510,7 @@ getone (type)
}
static int
-opt (x)
- int x;
+opt (int x)
{
return getone (x);
}
@@ -542,7 +520,7 @@ opt (x)
/* This is no longer used. */
static void
-unit_info_list ()
+unit_info_list (void)
{
while (opt (IT_un_CODE))
{
@@ -566,7 +544,7 @@ unit_info_list ()
/* This is no longer used. */
static void
-object_body_list ()
+object_body_list (void)
{
while (getone (IT_sh_CODE))
{
@@ -580,17 +558,14 @@ object_body_list ()
#endif
static void
-must (x)
- int x;
+must (int x)
{
if (!getone (x))
printf ("WANTED %x!!\n", x);
}
static void
-tab (i, s)
- int i;
- char *s;
+tab (int i, char *s)
{
indent += i;
@@ -603,7 +578,7 @@ tab (i, s)
}
static void
-dump_symbol_info ()
+dump_symbol_info (void)
{
tab (1, "SYMBOL INFO");
@@ -621,7 +596,7 @@ dump_symbol_info ()
}
static void
-derived_type ()
+derived_type (void)
{
tab (1, "DERIVED TYPE");
@@ -679,7 +654,7 @@ derived_type ()
/* This is no longer used. */
static void
-program_structure ()
+program_structure (void)
{
tab (1, "PROGRAM STRUCTURE");
while (opt (IT_dps_CODE))
@@ -699,7 +674,7 @@ program_structure ()
/* This is no longer used. */
static void
-debug_list ()
+debug_list (void)
{
tab (1, "DEBUG LIST");
@@ -714,7 +689,7 @@ debug_list ()
#endif
static void
-module ()
+module (void)
{
int c = 0;
int l = 0;
@@ -760,9 +735,7 @@ module ()
char *program_name;
static void
-show_usage (file, status)
- FILE *file;
- int status;
+show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
fprintf (file, _("Print a human readable interpretation of a SYSROFF object file\n"));
@@ -776,9 +749,7 @@ show_usage (file, status)
}
int
-main (ac, av)
- int ac;
- char **av;
+main (int ac, char **av)
{
char *input_file = NULL;
int opt;
diff --git a/contrib/binutils/binutils/unwind-ia64.c b/contrib/binutils/binutils/unwind-ia64.c
index 803a5fa..2e7e726 100644
--- a/contrib/binutils/binutils/unwind-ia64.c
+++ b/contrib/binutils/binutils/unwind-ia64.c
@@ -1,5 +1,5 @@
/* unwind-ia64.c -- utility routines to dump IA-64 unwind info for readelf.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GNU Binutils.
@@ -25,7 +25,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if __GNUC__ >= 2
/* Define BFD64 here, even if our default architecture is 32 bit ELF
as this will allow us to read in and parse 64bit and 32bit ELF files.
- Only do this if we belive that the compiler can support a 64 bit
+ Only do this if we believe that the compiler can support a 64 bit
data type. For now we only rely on GCC being able to do this. */
#define BFD64
#endif
@@ -33,16 +33,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static bfd_vma unw_rlen = 0;
-static void unw_print_brmask PARAMS ((char *, unsigned int));
-static void unw_print_grmask PARAMS ((char *, unsigned int));
-static void unw_print_frmask PARAMS ((char *, unsigned int));
-static void unw_print_abreg PARAMS ((char *, unsigned int));
-static void unw_print_xyreg PARAMS ((char *, unsigned int, unsigned int));
+static void unw_print_brmask (char *, unsigned int);
+static void unw_print_grmask (char *, unsigned int);
+static void unw_print_frmask (char *, unsigned int);
+static void unw_print_abreg (char *, unsigned int);
+static void unw_print_xyreg (char *, unsigned int, unsigned int);
static void
-unw_print_brmask (cp, mask)
- char * cp;
- unsigned int mask;
+unw_print_brmask (char *cp, unsigned int mask)
{
int sep = 0;
int i;
@@ -63,9 +61,7 @@ unw_print_brmask (cp, mask)
}
static void
-unw_print_grmask (cp, mask)
- char * cp;
- unsigned int mask;
+unw_print_grmask (char *cp, unsigned int mask)
{
int sep = 0;
int i;
@@ -86,9 +82,7 @@ unw_print_grmask (cp, mask)
}
static void
-unw_print_frmask (cp, mask)
- char * cp;
- unsigned int mask;
+unw_print_frmask (char *cp, unsigned int mask)
{
int sep = 0;
int i;
@@ -115,9 +109,7 @@ unw_print_frmask (cp, mask)
}
static void
-unw_print_abreg (cp, abreg)
- char * cp;
- unsigned int abreg;
+unw_print_abreg (char *cp, unsigned int abreg)
{
static const char *special_reg[16] =
{
@@ -147,10 +139,7 @@ unw_print_abreg (cp, abreg)
}
static void
-unw_print_xyreg (cp, x, ytreg)
- char * cp;
- unsigned int x;
- unsigned int ytreg;
+unw_print_xyreg (char *cp, unsigned int x, unsigned int ytreg)
{
switch ((x << 1) | ((ytreg >> 7) & 1))
{
@@ -252,13 +241,13 @@ typedef bfd_vma unw_word;
} \
while (0)
-#define UNW_DEC_FRGR_MEM(fmt, grmask, frmask, arg) \
+#define UNW_DEC_FRGR_MEM(fmt, grmask, frmask, arg) \
do \
- { \
+ { \
char frstr[200], grstr[20]; \
- \
- unw_print_grmask (grstr, grmask); \
- unw_print_frmask (frstr, frmask); \
+ \
+ unw_print_grmask (grstr, grmask); \
+ unw_print_frmask (frstr, frmask); \
printf ("\t%s:frgr_mem(grmask=[%s],frmask=[%s])\n", fmt, grstr, frstr); \
} \
while (0)
@@ -360,8 +349,8 @@ typedef bfd_vma unw_word;
#define UNW_DEC_SPILL_MASK(fmt, dp, arg) \
do \
{ \
- static const char * spill_type = "-frb"; \
- unsigned const char * imaskp = dp; \
+ static const char *spill_type = "-frb"; \
+ unsigned const char *imaskp = dp; \
unsigned char mask = 0; \
bfd_vma insn = 0; \
\
@@ -390,13 +379,13 @@ typedef bfd_vma unw_word;
} \
while (0)
-#define UNW_DEC_SPILL_PSPREL(fmt, t, abreg, pspoff, arg) \
+#define UNW_DEC_SPILL_PSPREL(fmt, t, abreg, pspoff, arg) \
do \
- { \
- char regname[10]; \
- \
- unw_print_abreg (regname, abreg); \
- printf ("\t%s:spill_psprel(reg=%s,t=%lu,pspoff=0x10-0x%lx)\n", \
+ { \
+ char regname[10]; \
+ \
+ unw_print_abreg (regname, abreg); \
+ printf ("\t%s:spill_psprel(reg=%s,t=%lu,pspoff=0x10-0x%lx)\n", \
fmt, regname, (unsigned long) t, 4*(unsigned long)pspoff); \
} \
while (0)
@@ -424,12 +413,12 @@ typedef bfd_vma unw_word;
} \
while (0)
-#define UNW_DEC_SPILL_SPREL_P(fmt, qp, t, abreg, spoff, arg) \
+#define UNW_DEC_SPILL_SPREL_P(fmt, qp, t, abreg, spoff, arg) \
do \
- { \
- char regname[20]; \
- \
- unw_print_abreg (regname, abreg); \
+ { \
+ char regname[20]; \
+ \
+ unw_print_abreg (regname, abreg); \
printf ("\t%s:spill_sprel_p(qp=p%u,t=%lu,reg=%s,spoff=0x%lx)\n", \
fmt, qp, (unsigned long) t, regname, 4 * (unsigned long)spoff); \
} \
@@ -541,39 +530,38 @@ typedef bfd_vma unw_word;
* UNW_DEC_SPILL_SPREL_P(fmt,qp,t,abreg,pspoff,arg)
*/
-static unw_word unw_decode_uleb128 PARAMS ((const unsigned char **));
-static const unsigned char *unw_decode_x1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_x2 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_x3 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_x4 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_r1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_r2 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_r3 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p2_p5 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p6 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_p7_p10 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_b1 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_b2 PARAMS ((const unsigned char *,
- unsigned int, void *));
-static const unsigned char *unw_decode_b3_x4 PARAMS ((const unsigned char *,
- unsigned int, void *));
+static unw_word unw_decode_uleb128 (const unsigned char **);
+static const unsigned char *unw_decode_x1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_x2
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_x3
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_x4
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_r1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_r2
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_r3
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p2_p5
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p6
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_p7_p10
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_b1
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_b2
+ (const unsigned char *, unsigned int, void *);
+static const unsigned char *unw_decode_b3_x4
+ (const unsigned char *, unsigned int, void *);
static unw_word
-unw_decode_uleb128 (dpp)
- const unsigned char **dpp;
+unw_decode_uleb128 (const unsigned char **dpp)
{
unsigned shift = 0;
unw_word byte, result = 0;
@@ -596,10 +584,8 @@ unw_decode_uleb128 (dpp)
}
static const unsigned char *
-unw_decode_x1 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x1 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, abreg;
unw_word t, off;
@@ -616,10 +602,8 @@ unw_decode_x1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_x2 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x2 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, byte2, abreg, x, ytreg;
unw_word t;
@@ -638,10 +622,8 @@ unw_decode_x2 (dp, code, arg)
}
static const unsigned char *
-unw_decode_x3 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x3 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, byte2, abreg, qp;
unw_word t, off;
@@ -662,10 +644,8 @@ unw_decode_x3 (dp, code, arg)
}
static const unsigned char *
-unw_decode_x4 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code ATTRIBUTE_UNUSED;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_x4 (const unsigned char *dp, unsigned int code ATTRIBUTE_UNUSED,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char byte1, byte2, byte3, qp, abreg, x, ytreg;
unw_word t;
@@ -688,10 +668,7 @@ unw_decode_x4 (dp, code, arg)
}
static const unsigned char *
-unw_decode_r1 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_r1 (const unsigned char *dp, unsigned int code, void *arg)
{
int body = (code & 0x20) != 0;
unw_word rlen;
@@ -702,10 +679,7 @@ unw_decode_r1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_r2 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_r2 (const unsigned char *dp, unsigned int code, void *arg)
{
unsigned char byte1, mask, grsave;
unw_word rlen;
@@ -720,10 +694,7 @@ unw_decode_r2 (dp, code, arg)
}
static const unsigned char *
-unw_decode_r3 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_r3 (const unsigned char *dp, unsigned int code, void *arg)
{
unw_word rlen;
@@ -733,10 +704,8 @@ unw_decode_r3 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p1 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_p1 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
unsigned char brmask = (code & 0x1f);
@@ -745,10 +714,8 @@ unw_decode_p1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p2_p5 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_p2_p5 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
if ((code & 0x10) == 0)
{
@@ -826,10 +793,8 @@ unw_decode_p2_p5 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p6 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_p6 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
int gregs = (code & 0x10) != 0;
unsigned char mask = (code & 0x0f);
@@ -842,10 +807,7 @@ unw_decode_p6 (dp, code, arg)
}
static const unsigned char *
-unw_decode_p7_p10 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_p7_p10 (const unsigned char *dp, unsigned int code, void *arg)
{
unsigned char r, byte1, byte2;
unw_word t, size;
@@ -1018,10 +980,8 @@ unw_decode_p7_p10 (dp, code, arg)
}
static const unsigned char *
-unw_decode_b1 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_b1 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
unw_word label = (code & 0x1f);
@@ -1033,10 +993,8 @@ unw_decode_b1 (dp, code, arg)
}
static const unsigned char *
-unw_decode_b2 (dp, code, arg)
- const unsigned char * dp;
- unsigned int code;
- void * arg ATTRIBUTE_UNUSED;
+unw_decode_b2 (const unsigned char *dp, unsigned int code,
+ void *arg ATTRIBUTE_UNUSED)
{
unw_word t;
@@ -1046,10 +1004,7 @@ unw_decode_b2 (dp, code, arg)
}
static const unsigned char *
-unw_decode_b3_x4 (dp, code, arg)
- const unsigned char *dp;
- unsigned int code;
- void *arg;
+unw_decode_b3_x4 (const unsigned char *dp, unsigned int code, void *arg)
{
unw_word t, ecount, label;
@@ -1086,7 +1041,7 @@ unw_decode_b3_x4 (dp, code, arg)
}
typedef const unsigned char *(*unw_decoder)
- PARAMS ((const unsigned char *, unsigned int, void *));
+ (const unsigned char *, unsigned int, void *);
static unw_decoder unw_decode_table[2][8] =
{
@@ -1115,10 +1070,8 @@ static unw_decoder unw_decode_table[2][8] =
/* Decode one descriptor and return address of next descriptor. */
const unsigned char *
-unw_decode (dp, inside_body, ptr_inside_body)
- const unsigned char * dp;
- int inside_body;
- void * ptr_inside_body;
+unw_decode (const unsigned char *dp, int inside_body,
+ void *ptr_inside_body)
{
unw_decoder decoder;
unsigned char code;
diff --git a/contrib/binutils/binutils/unwind-ia64.h b/contrib/binutils/binutils/unwind-ia64.h
index 7d5033d..3b6ab22 100644
--- a/contrib/binutils/binutils/unwind-ia64.h
+++ b/contrib/binutils/binutils/unwind-ia64.h
@@ -1,5 +1,5 @@
/* unwind-ia64.h -- dump IA-64 unwind info.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GNU Binutils.
@@ -22,10 +22,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
#define UNW_VER(x) ((x) >> 48)
-#define UNW_FLAG_MASK 0x0000ffff00000000
-#define UNW_FLAG_OSMASK 0x0000f00000000000
-#define UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000L)
-#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
-#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
+#define UNW_FLAG_MASK 0x0000ffff00000000LL
+#define UNW_FLAG_OSMASK 0x0000f00000000000LL
+#define UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000LL)
+#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000LL)
+#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffLL)
-extern const unsigned char * unw_decode PARAMS ((const unsigned char *, int, void *));
+extern const unsigned char *unw_decode (const unsigned char *, int, void *);
diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c
index edaa065..f965619 100644
--- a/contrib/binutils/binutils/version.c
+++ b/contrib/binutils/binutils/version.c
@@ -1,38 +1,38 @@
/* version.c -- binutils version information
- Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ This file is part of GNU Binutils.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "bfd.h"
+#include "bfdver.h"
#include "bucomm.h"
/* Print the version number and copyright information, and exit. This
implements the --version option for the various programs. */
void
-print_version (name)
- const char *name;
+print_version (const char *name)
{
/* This output is intended to follow the GNU standards document. */
/* xgettext:c-format */
printf ("GNU %s %s\n", name, BFD_VERSION_STRING);
- printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2004 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c
index 5d0dc3b..0d301f6 100644
--- a/contrib/binutils/binutils/wrstabs.c
+++ b/contrib/binutils/binutils/wrstabs.c
@@ -1,5 +1,6 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -31,10 +32,6 @@
#include "safe-ctype.h"
#include "debug.h"
#include "budbg.h"
-
-/* Meaningless definition needs by aout64.h. FIXME. */
-#define BYTES_IN_WORD 4
-
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
@@ -75,7 +72,7 @@ struct stab_type_stack
/* The size of the type. */
unsigned int size;
/* Whether type string defines a new type. */
- boolean definition;
+ bfd_boolean definition;
/* String defining struct fields. */
char *fields;
/* NULL terminated array of strings defining base classes for a
@@ -176,83 +173,80 @@ struct stab_write_handle
};
static struct bfd_hash_entry *string_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static boolean stab_write_symbol
- PARAMS ((struct stab_write_handle *, int, int, bfd_vma, const char *));
-static boolean stab_push_string
- PARAMS ((struct stab_write_handle *, const char *, long, boolean,
- unsigned int));
-static boolean stab_push_defined_type
- PARAMS ((struct stab_write_handle *, long, unsigned int));
-static char *stab_pop_type PARAMS ((struct stab_write_handle *));
-static boolean stab_modify_type
- PARAMS ((struct stab_write_handle *, int, unsigned int, long **, size_t *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
+static bfd_boolean stab_write_symbol
+ (struct stab_write_handle *, int, int, bfd_vma, const char *);
+static bfd_boolean stab_push_string
+ (struct stab_write_handle *, const char *, long, bfd_boolean, unsigned int);
+static bfd_boolean stab_push_defined_type
+ (struct stab_write_handle *, long, unsigned int);
+static char *stab_pop_type (struct stab_write_handle *);
+static bfd_boolean stab_modify_type
+ (struct stab_write_handle *, int, unsigned int, long **, size_t *);
static long stab_get_struct_index
- PARAMS ((struct stab_write_handle *, const char *, unsigned int,
- enum debug_type_kind, unsigned int *));
-static boolean stab_class_method_var
- PARAMS ((struct stab_write_handle *, const char *, enum debug_visibility,
- boolean, boolean, boolean, bfd_vma, boolean));
-
-static boolean stab_start_compilation_unit PARAMS ((PTR, const char *));
-static boolean stab_start_source PARAMS ((PTR, const char *));
-static boolean stab_empty_type PARAMS ((PTR));
-static boolean stab_void_type PARAMS ((PTR));
-static boolean stab_int_type PARAMS ((PTR, unsigned int, boolean));
-static boolean stab_float_type PARAMS ((PTR, unsigned int));
-static boolean stab_complex_type PARAMS ((PTR, unsigned int));
-static boolean stab_bool_type PARAMS ((PTR, unsigned int));
-static boolean stab_enum_type
- PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static boolean stab_pointer_type PARAMS ((PTR));
-static boolean stab_function_type PARAMS ((PTR, int, boolean));
-static boolean stab_reference_type PARAMS ((PTR));
-static boolean stab_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-static boolean stab_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, boolean));
-static boolean stab_set_type PARAMS ((PTR, boolean));
-static boolean stab_offset_type PARAMS ((PTR));
-static boolean stab_method_type PARAMS ((PTR, boolean, int, boolean));
-static boolean stab_const_type PARAMS ((PTR));
-static boolean stab_volatile_type PARAMS ((PTR));
-static boolean stab_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int));
-static boolean stab_struct_field
- PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static boolean stab_end_struct_type PARAMS ((PTR));
-static boolean stab_start_class_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int, boolean,
- boolean));
-static boolean stab_class_static_member
- PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-static boolean stab_class_baseclass
- PARAMS ((PTR, bfd_vma, boolean, enum debug_visibility));
-static boolean stab_class_start_method PARAMS ((PTR, const char *));
-static boolean stab_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean,
- bfd_vma, boolean));
-static boolean stab_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean));
-static boolean stab_class_end_method PARAMS ((PTR));
-static boolean stab_end_class_type PARAMS ((PTR));
-static boolean stab_typedef_type PARAMS ((PTR, const char *));
-static boolean stab_tag_type
- PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static boolean stab_typdef PARAMS ((PTR, const char *));
-static boolean stab_tag PARAMS ((PTR, const char *));
-static boolean stab_int_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean stab_float_constant PARAMS ((PTR, const char *, double));
-static boolean stab_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean stab_variable
- PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static boolean stab_start_function PARAMS ((PTR, const char *, boolean));
-static boolean stab_function_parameter
- PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static boolean stab_start_block PARAMS ((PTR, bfd_vma));
-static boolean stab_end_block PARAMS ((PTR, bfd_vma));
-static boolean stab_end_function PARAMS ((PTR));
-static boolean stab_lineno
- PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ (struct stab_write_handle *, const char *, unsigned int,
+ enum debug_type_kind, unsigned int *);
+static bfd_boolean stab_class_method_var
+ (struct stab_write_handle *, const char *, enum debug_visibility,
+ bfd_boolean, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean);
+static bfd_boolean stab_start_compilation_unit (void *, const char *);
+static bfd_boolean stab_start_source (void *, const char *);
+static bfd_boolean stab_empty_type (void *);
+static bfd_boolean stab_void_type (void *);
+static bfd_boolean stab_int_type (void *, unsigned int, bfd_boolean);
+static bfd_boolean stab_float_type (void *, unsigned int);
+static bfd_boolean stab_complex_type (void *, unsigned int);
+static bfd_boolean stab_bool_type (void *, unsigned int);
+static bfd_boolean stab_enum_type
+ (void *, const char *, const char **, bfd_signed_vma *);
+static bfd_boolean stab_pointer_type (void *);
+static bfd_boolean stab_function_type (void *, int, bfd_boolean);
+static bfd_boolean stab_reference_type (void *);
+static bfd_boolean stab_range_type (void *, bfd_signed_vma, bfd_signed_vma);
+static bfd_boolean stab_array_type
+ (void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
+static bfd_boolean stab_set_type (void *, bfd_boolean);
+static bfd_boolean stab_offset_type (void *);
+static bfd_boolean stab_method_type (void *, bfd_boolean, int, bfd_boolean);
+static bfd_boolean stab_const_type (void *);
+static bfd_boolean stab_volatile_type (void *);
+static bfd_boolean stab_start_struct_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int);
+static bfd_boolean stab_struct_field
+ (void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
+static bfd_boolean stab_end_struct_type (void *);
+static bfd_boolean stab_start_class_type
+ (void *, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean);
+static bfd_boolean stab_class_static_member
+ (void *, const char *, const char *, enum debug_visibility);
+static bfd_boolean stab_class_baseclass
+ (void *, bfd_vma, bfd_boolean, enum debug_visibility);
+static bfd_boolean stab_class_start_method (void *, const char *);
+static bfd_boolean stab_class_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
+static bfd_boolean stab_class_static_method_variant
+ (void *, const char *, enum debug_visibility, bfd_boolean, bfd_boolean);
+static bfd_boolean stab_class_end_method (void *);
+static bfd_boolean stab_end_class_type (void *);
+static bfd_boolean stab_typedef_type (void *, const char *);
+static bfd_boolean stab_tag_type
+ (void *, const char *, unsigned int, enum debug_type_kind);
+static bfd_boolean stab_typdef (void *, const char *);
+static bfd_boolean stab_tag (void *, const char *);
+static bfd_boolean stab_int_constant (void *, const char *, bfd_vma);
+static bfd_boolean stab_float_constant (void *, const char *, double);
+static bfd_boolean stab_typed_constant (void *, const char *, bfd_vma);
+static bfd_boolean stab_variable
+ (void *, const char *, enum debug_var_kind, bfd_vma);
+static bfd_boolean stab_start_function (void *, const char *, bfd_boolean);
+static bfd_boolean stab_function_parameter
+ (void *, const char *, enum debug_parm_kind, bfd_vma);
+static bfd_boolean stab_start_block (void *, bfd_vma);
+static bfd_boolean stab_end_block (void *, bfd_vma);
+static bfd_boolean stab_end_function (void *);
+static bfd_boolean stab_lineno (void *, const char *, unsigned long, bfd_vma);
static const struct debug_write_fns stab_fns =
{
@@ -305,10 +299,8 @@ static const struct debug_write_fns stab_fns =
/* Routine to create an entry in a string hash table. */
static struct bfd_hash_entry *
-string_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+string_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table, const char *string)
{
struct string_hash_entry *ret = (struct string_hash_entry *) entry;
@@ -343,13 +335,9 @@ string_hash_newfunc (entry, table, string)
/* Add a symbol to the stabs debugging information we are building. */
-static boolean
-stab_write_symbol (info, type, desc, value, string)
- struct stab_write_handle *info;
- int type;
- int desc;
- bfd_vma value;
- const char *string;
+static bfd_boolean
+stab_write_symbol (struct stab_write_handle *info, int type, int desc,
+ bfd_vma value, const char *string)
{
bfd_size_type strx;
bfd_byte sym[STAB_SYMBOL_SIZE];
@@ -360,12 +348,12 @@ stab_write_symbol (info, type, desc, value, string)
{
struct string_hash_entry *h;
- h = string_hash_lookup (&info->strhash, string, true, true);
+ h = string_hash_lookup (&info->strhash, string, TRUE, TRUE);
if (h == NULL)
{
non_fatal (_("string_hash_lookup failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
if (h->index != -1)
strx = h->index;
@@ -400,18 +388,14 @@ stab_write_symbol (info, type, desc, value, string)
info->symbols_size += STAB_SYMBOL_SIZE;
- return true;
+ return TRUE;
}
/* Push a string on to the type stack. */
-static boolean
-stab_push_string (info, string, index, definition, size)
- struct stab_write_handle *info;
- const char *string;
- long index;
- boolean definition;
- unsigned int size;
+static bfd_boolean
+stab_push_string (struct stab_write_handle *info, const char *string,
+ long index, bfd_boolean definition, unsigned int size)
{
struct stab_type_stack *s;
@@ -429,29 +413,26 @@ stab_push_string (info, string, index, definition, size)
s->next = info->type_stack;
info->type_stack = s;
- return true;
+ return TRUE;
}
/* Push a type index which has already been defined. */
-static boolean
-stab_push_defined_type (info, index, size)
- struct stab_write_handle *info;
- long index;
- unsigned int size;
+static bfd_boolean
+stab_push_defined_type (struct stab_write_handle *info, long index,
+ unsigned int size)
{
char buf[20];
sprintf (buf, "%ld", index);
- return stab_push_string (info, buf, index, false, size);
+ return stab_push_string (info, buf, index, FALSE, size);
}
/* Pop a type off the type stack. The caller is responsible for
freeing the string. */
static char *
-stab_pop_type (info)
- struct stab_write_handle *info;
+stab_pop_type (struct stab_write_handle *info)
{
struct stab_type_stack *s;
char *ret;
@@ -477,15 +458,12 @@ stab_pop_type (info)
the symbols, *PSYMSIZE the size of the symbols, *PSTRINGS to the
strings, and *PSTRINGSIZE to the size of the strings. */
-boolean
-write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
- pstrings, pstringsize)
- bfd *abfd;
- PTR dhandle;
- bfd_byte **psyms;
- bfd_size_type *psymsize;
- bfd_byte **pstrings;
- bfd_size_type *pstringsize;
+bfd_boolean
+write_stabs_in_sections_debugging_info (bfd *abfd, void *dhandle,
+ bfd_byte **psyms,
+ bfd_size_type *psymsize,
+ bfd_byte **pstrings,
+ bfd_size_type *pstringsize)
{
struct stab_write_handle info;
struct string_hash_entry *h;
@@ -507,7 +485,7 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
{
non_fatal ("bfd_hash_table_init_failed: %s",
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
info.type_stack = NULL;
@@ -522,22 +500,22 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
/* The initial symbol holds the string size. */
if (! stab_write_symbol (&info, 0, 0, 0, (const char *) NULL))
- return false;
+ return FALSE;
/* Output an initial N_SO symbol. */
info.so_offset = info.symbols_size;
if (! stab_write_symbol (&info, N_SO, 0, 0, bfd_get_filename (abfd)))
- return false;
+ return FALSE;
- if (! debug_write (dhandle, &stab_fns, (PTR) &info))
- return false;
+ if (! debug_write (dhandle, &stab_fns, (void *) &info))
+ return FALSE;
assert (info.pending_lbrac == (bfd_vma) -1);
/* Output a trailing N_SO. */
if (! stab_write_symbol (&info, N_SO, 0, info.last_text_address,
(const char *) NULL))
- return false;
+ return FALSE;
/* Put the string size in the initial symbol. */
bfd_put_32 (abfd, info.strings_size, info.symbols + 8);
@@ -556,15 +534,13 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
p += strlen ((char *) p) + 1;
}
- return true;
+ return TRUE;
}
/* Start writing out information for a compilation unit. */
-static boolean
-stab_start_compilation_unit (p, filename)
- PTR p;
- const char *filename;
+static bfd_boolean
+stab_start_compilation_unit (void *p, const char *filename)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -580,10 +556,8 @@ stab_start_compilation_unit (p, filename)
/* Start writing out information for a particular source file. */
-static boolean
-stab_start_source (p, filename)
- PTR p;
- const char *filename;
+static bfd_boolean
+stab_start_source (void *p, const char *filename)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -599,9 +573,8 @@ stab_start_source (p, filename)
/* Push an empty type. This shouldn't normally happen. We just use a
void type. */
-static boolean
-stab_empty_type (p)
- PTR p;
+static bfd_boolean
+stab_empty_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -620,15 +593,14 @@ stab_empty_type (p)
sprintf (buf, "%ld=%ld", index, index);
- return stab_push_string (info, buf, index, false, 0);
+ return stab_push_string (info, buf, index, FALSE, 0);
}
}
/* Push a void type. */
-static boolean
-stab_void_type (p)
- PTR p;
+static bfd_boolean
+stab_void_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -646,17 +618,14 @@ stab_void_type (p)
sprintf (buf, "%ld=%ld", index, index);
- return stab_push_string (info, buf, index, true, 0);
+ return stab_push_string (info, buf, index, TRUE, 0);
}
}
/* Push an integer type. */
-static boolean
-stab_int_type (p, size, unsignedp)
- PTR p;
- unsigned int size;
- boolean unsignedp;
+static bfd_boolean
+stab_int_type (void *p, unsigned int size, bfd_boolean unsignedp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long *cache;
@@ -664,7 +633,7 @@ stab_int_type (p, size, unsignedp)
if (size <= 0 || (size > sizeof (long) && size != 8))
{
non_fatal (_("stab_int_type: bad size %u"), size);
- return false;
+ return FALSE;
}
if (unsignedp)
@@ -709,16 +678,14 @@ stab_int_type (p, size, unsignedp)
abort ();
}
- return stab_push_string (info, buf, index, true, size);
+ return stab_push_string (info, buf, index, TRUE, size);
}
}
/* Push a floating point type. */
-static boolean
-stab_float_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+stab_float_type (void *p, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -736,8 +703,8 @@ stab_float_type (p, size)
char buf[50];
/* Floats are defined as a subrange of int. */
- if (! stab_int_type (info, 4, false))
- return false;
+ if (! stab_int_type (info, 4, FALSE))
+ return FALSE;
int_type = stab_pop_type (info);
index = info->type_index;
@@ -752,16 +719,14 @@ stab_float_type (p, size)
free (int_type);
- return stab_push_string (info, buf, index, true, size);
+ return stab_push_string (info, buf, index, TRUE, size);
}
}
/* Push a complex type. */
-static boolean
-stab_complex_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+stab_complex_type (void *p, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char buf[50];
@@ -772,16 +737,14 @@ stab_complex_type (p, size)
sprintf (buf, "%ld=r%ld;%u;0;", index, index, size);
- return stab_push_string (info, buf, index, true, size * 2);
+ return stab_push_string (info, buf, index, TRUE, size * 2);
}
-/* Push a boolean type. We use an XCOFF predefined type, since gdb
+/* Push a bfd_boolean type. We use an XCOFF predefined type, since gdb
always recognizes them. */
-static boolean
-stab_bool_type (p, size)
- PTR p;
- unsigned int size;
+static bfd_boolean
+stab_bool_type (void *p, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -811,12 +774,9 @@ stab_bool_type (p, size)
/* Push an enum type. */
-static boolean
-stab_enum_type (p, tag, names, vals)
- PTR p;
- const char *tag;
- const char **names;
- bfd_signed_vma *vals;
+static bfd_boolean
+stab_enum_type (void *p, const char *tag, const char **names,
+ bfd_signed_vma *vals)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
size_t len;
@@ -832,10 +792,10 @@ stab_enum_type (p, tag, names, vals)
buf = (char *) xmalloc (10 + strlen (tag));
sprintf (buf, "xe%s:", tag);
/* FIXME: The size is just a guess. */
- if (! stab_push_string (info, buf, 0, false, 4))
- return false;
+ if (! stab_push_string (info, buf, 0, FALSE, 4))
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
len = 10;
@@ -862,32 +822,28 @@ stab_enum_type (p, tag, names, vals)
if (tag == NULL)
{
/* FIXME: The size is just a guess. */
- if (! stab_push_string (info, buf, 0, false, 4))
- return false;
+ if (! stab_push_string (info, buf, 0, FALSE, 4))
+ return FALSE;
}
else
{
/* FIXME: The size is just a guess. */
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf)
|| ! stab_push_defined_type (info, index, 4))
- return false;
+ return FALSE;
}
free (buf);
- return true;
+ return TRUE;
}
/* Push a modification of the top type on the stack. Cache the
results in CACHE and CACHE_ALLOC. */
-static boolean
-stab_modify_type (info, mod, size, cache, cache_alloc)
- struct stab_write_handle *info;
- int mod;
- unsigned int size;
- long **cache;
- size_t *cache_alloc;
+static bfd_boolean
+stab_modify_type (struct stab_write_handle *info, int mod,
+ unsigned int size, long **cache, size_t *cache_alloc)
{
long targindex;
long index;
@@ -899,7 +855,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
if (targindex <= 0
|| cache == NULL)
{
- boolean definition;
+ bfd_boolean definition;
/* Either the target type has no index, or we aren't caching
this modifier. Either way we have no way of recording the
@@ -910,7 +866,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
sprintf (buf, "%c%s", mod, s);
free (s);
if (! stab_push_string (info, buf, 0, definition, size))
- return false;
+ return FALSE;
free (buf);
}
else
@@ -941,7 +897,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
referenced). */
free (stab_pop_type (info));
if (! stab_push_defined_type (info, index, size))
- return false;
+ return FALSE;
}
else
{
@@ -955,21 +911,20 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
(*cache)[targindex] = index;
- if (! stab_push_string (info, buf, index, true, size))
- return false;
+ if (! stab_push_string (info, buf, index, TRUE, size))
+ return FALSE;
free (buf);
}
}
- return true;
+ return TRUE;
}
/* Push a pointer type. */
-static boolean
-stab_pointer_type (p)
- PTR p;
+static bfd_boolean
+stab_pointer_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -980,11 +935,9 @@ stab_pointer_type (p)
/* Push a function type. */
-static boolean
-stab_function_type (p, argcount, varargs)
- PTR p;
- int argcount;
- boolean varargs ATTRIBUTE_UNUSED;
+static bfd_boolean
+stab_function_type (void *p, int argcount,
+ bfd_boolean varargs ATTRIBUTE_UNUSED)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
int i;
@@ -1007,7 +960,7 @@ stab_function_type (p, argcount, varargs)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
}
@@ -1019,9 +972,8 @@ stab_function_type (p, argcount, varargs)
/* Push a reference type. */
-static boolean
-stab_reference_type (p)
- PTR p;
+static bfd_boolean
+stab_reference_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1032,14 +984,11 @@ stab_reference_type (p)
/* Push a range type. */
-static boolean
-stab_range_type (p, low, high)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
+static bfd_boolean
+stab_range_type (void *p, bfd_signed_vma low, bfd_signed_vma high)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
unsigned int size;
char *s, *buf;
@@ -1052,24 +1001,21 @@ stab_range_type (p, low, high)
free (s);
if (! stab_push_string (info, buf, 0, definition, size))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push an array type. */
-static boolean
-stab_array_type (p, low, high, stringp)
- PTR p;
- bfd_signed_vma low;
- bfd_signed_vma high;
- boolean stringp;
+static bfd_boolean
+stab_array_type (void *p, bfd_signed_vma low, bfd_signed_vma high,
+ bfd_boolean stringp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
unsigned int element_size;
char *range, *element, *buf;
long index;
@@ -1095,7 +1041,7 @@ stab_array_type (p, low, high, stringp)
attribute. */
index = info->type_index;
++info->type_index;
- definition = true;
+ definition = TRUE;
sprintf (buf, "%ld=@S;", index);
}
@@ -1109,22 +1055,20 @@ stab_array_type (p, low, high, stringp)
else
size = element_size * ((high - low) + 1);
if (! stab_push_string (info, buf, index, definition, size))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push a set type. */
-static boolean
-stab_set_type (p, bitstringp)
- PTR p;
- boolean bitstringp;
+static bfd_boolean
+stab_set_type (void *p, bfd_boolean bitstringp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *s, *buf;
long index;
@@ -1144,7 +1088,7 @@ stab_set_type (p, bitstringp)
attribute. */
index = info->type_index;
++info->type_index;
- definition = true;
+ definition = TRUE;
sprintf (buf, "%ld=@S;", index);
}
@@ -1152,21 +1096,20 @@ stab_set_type (p, bitstringp)
free (s);
if (! stab_push_string (info, buf, index, definition, 0))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push an offset type. */
-static boolean
-stab_offset_type (p)
- PTR p;
+static bfd_boolean
+stab_offset_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *target, *base, *buf;
definition = info->type_stack->definition;
@@ -1181,24 +1124,21 @@ stab_offset_type (p)
free (target);
if (! stab_push_string (info, buf, 0, definition, 0))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push a method type. */
-static boolean
-stab_method_type (p, domainp, argcount, varargs)
- PTR p;
- boolean domainp;
- int argcount;
- boolean varargs;
+static bfd_boolean
+stab_method_type (void *p, bfd_boolean domainp, int argcount,
+ bfd_boolean varargs)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *domain, *return_type, *buf;
char **args;
int i;
@@ -1213,7 +1153,7 @@ stab_method_type (p, domainp, argcount, varargs)
if (! domainp)
{
if (! stab_empty_type (p))
- return false;
+ return FALSE;
}
definition = info->type_stack->definition;
@@ -1235,7 +1175,7 @@ stab_method_type (p, domainp, argcount, varargs)
{
args = (char **) xmalloc (1 * sizeof (*args));
if (! stab_empty_type (p))
- return false;
+ return FALSE;
definition = definition || info->type_stack->definition;
args[0] = stab_pop_type (info);
argcount = 1;
@@ -1252,7 +1192,7 @@ stab_method_type (p, domainp, argcount, varargs)
if (! varargs)
{
if (! stab_empty_type (p))
- return false;
+ return FALSE;
definition = definition || info->type_stack->definition;
args[argcount] = stab_pop_type (info);
++argcount;
@@ -1283,18 +1223,17 @@ stab_method_type (p, domainp, argcount, varargs)
free (args);
if (! stab_push_string (info, buf, 0, definition, 0))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push a const version of a type. */
-static boolean
-stab_const_type (p)
- PTR p;
+static bfd_boolean
+stab_const_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1304,9 +1243,8 @@ stab_const_type (p)
/* Push a volatile version of a type. */
-static boolean
-stab_volatile_type (p)
- PTR p;
+static bfd_boolean
+stab_volatile_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1318,12 +1256,9 @@ stab_volatile_type (p)
return -1 if it fails. */
static long
-stab_get_struct_index (info, tag, id, kind, psize)
- struct stab_write_handle *info;
- const char *tag;
- unsigned int id;
- enum debug_type_kind kind;
- unsigned int *psize;
+stab_get_struct_index (struct stab_write_handle *info, const char *tag,
+ unsigned int id, enum debug_type_kind kind,
+ unsigned int *psize)
{
if (id >= info->type_cache.struct_types_alloc)
{
@@ -1368,17 +1303,13 @@ stab_get_struct_index (info, tag, id, kind, psize)
/* Start outputting a struct. We ignore the tag, and handle it in
stab_tag. */
-static boolean
-stab_start_struct_type (p, tag, id, structp, size)
- PTR p;
- const char *tag;
- unsigned int id;
- boolean structp;
- unsigned int size;
+static bfd_boolean
+stab_start_struct_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
- boolean definition;
+ bfd_boolean definition;
char *buf;
buf = (char *) xmalloc (40);
@@ -1387,16 +1318,16 @@ stab_start_struct_type (p, tag, id, structp, size)
{
index = 0;
*buf = '\0';
- definition = false;
+ definition = FALSE;
}
else
{
index = stab_get_struct_index (info, tag, id, DEBUG_KIND_ILLEGAL,
&size);
if (index < 0)
- return false;
+ return FALSE;
sprintf (buf, "%ld=", index);
- definition = true;
+ definition = TRUE;
}
sprintf (buf + strlen (buf), "%c%u",
@@ -1404,26 +1335,22 @@ stab_start_struct_type (p, tag, id, structp, size)
size);
if (! stab_push_string (info, buf, index, definition, size))
- return false;
+ return FALSE;
info->type_stack->fields = (char *) xmalloc (1);
info->type_stack->fields[0] = '\0';
- return true;
+ return TRUE;
}
/* Add a field to a struct. */
-static boolean
-stab_struct_field (p, name, bitpos, bitsize, visibility)
- PTR p;
- const char *name;
- bfd_vma bitpos;
- bfd_vma bitsize;
- enum debug_visibility visibility;
+static bfd_boolean
+stab_struct_field (void *p, const char *name, bfd_vma bitpos,
+ bfd_vma bitsize, enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
unsigned int size;
char *s, *n;
const char *vis;
@@ -1474,19 +1401,18 @@ stab_struct_field (p, name, bitpos, bitsize, visibility)
info->type_stack->fields = n;
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Finish up a struct. */
-static boolean
-stab_end_struct_type (p)
- PTR p;
+static bfd_boolean
+stab_end_struct_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
long index;
unsigned int size;
char *fields, *first, *buf;
@@ -1505,32 +1431,25 @@ stab_end_struct_type (p)
free (fields);
if (! stab_push_string (info, buf, index, definition, size))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Start outputting a class. */
-static boolean
-stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
- PTR p;
- const char *tag;
- unsigned int id;
- boolean structp;
- unsigned int size;
- boolean vptr;
- boolean ownvptr;
+static bfd_boolean
+stab_start_class_type (void *p, const char *tag, unsigned int id, bfd_boolean structp, unsigned int size, bfd_boolean vptr, bfd_boolean ownvptr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *vstring;
if (! vptr || ownvptr)
{
- definition = false;
+ definition = FALSE;
vstring = NULL;
}
else
@@ -1540,7 +1459,7 @@ stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
}
if (! stab_start_struct_type (p, tag, id, structp, size))
- return false;
+ return FALSE;
if (vptr)
{
@@ -1563,22 +1482,19 @@ stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
}
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Add a static member to the class on the type stack. */
-static boolean
-stab_class_static_member (p, name, physname, visibility)
- PTR p;
- const char *name;
- const char *physname;
- enum debug_visibility visibility;
+static bfd_boolean
+stab_class_static_member (void *p, const char *name, const char *physname,
+ enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *s, *n;
const char *vis;
@@ -1620,22 +1536,19 @@ stab_class_static_member (p, name, physname, visibility)
info->type_stack->fields = n;
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Add a base class to the class on the type stack. */
-static boolean
-stab_class_baseclass (p, bitpos, virtual, visibility)
- PTR p;
- bfd_vma bitpos;
- boolean virtual;
- enum debug_visibility visibility;
+static bfd_boolean
+stab_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *s;
char *buf;
unsigned int c;
@@ -1690,17 +1603,15 @@ stab_class_baseclass (p, bitpos, virtual, visibility)
info->type_stack->baseclasses = baseclasses;
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Start adding a method to the class on the type stack. */
-static boolean
-stab_class_start_method (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+stab_class_start_method (void *p, const char *name)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *m;
@@ -1724,24 +1635,19 @@ stab_class_start_method (p, name)
info->type_stack->methods = m;
- return true;
+ return TRUE;
}
/* Add a variant, either static or not, to the current method. */
-static boolean
-stab_class_method_var (info, physname, visibility, staticp, constp, volatilep,
- voffset, contextp)
- struct stab_write_handle *info;
- const char *physname;
- enum debug_visibility visibility;
- boolean staticp;
- boolean constp;
- boolean volatilep;
- bfd_vma voffset;
- boolean contextp;
+static bfd_boolean
+stab_class_method_var (struct stab_write_handle *info, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean staticp, bfd_boolean constp,
+ bfd_boolean volatilep, bfd_vma voffset,
+ bfd_boolean contextp)
{
- boolean definition;
+ bfd_boolean definition;
char *type;
char *context = NULL;
char visc, qualc, typec;
@@ -1817,51 +1723,42 @@ stab_class_method_var (info, physname, visibility, staticp, constp, volatilep,
}
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Add a variant to the current method. */
-static boolean
-stab_class_method_variant (p, physname, visibility, constp, volatilep,
- voffset, contextp)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
- bfd_vma voffset;
- boolean contextp;
+static bfd_boolean
+stab_class_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep,
+ bfd_vma voffset, bfd_boolean contextp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- return stab_class_method_var (info, physname, visibility, false, constp,
+ return stab_class_method_var (info, physname, visibility, FALSE, constp,
volatilep, voffset, contextp);
}
/* Add a static variant to the current method. */
-static boolean
-stab_class_static_method_variant (p, physname, visibility, constp, volatilep)
- PTR p;
- const char *physname;
- enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+static bfd_boolean
+stab_class_static_method_variant (void *p, const char *physname,
+ enum debug_visibility visibility,
+ bfd_boolean constp, bfd_boolean volatilep)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- return stab_class_method_var (info, physname, visibility, true, constp,
- volatilep, 0, false);
+ return stab_class_method_var (info, physname, visibility, TRUE, constp,
+ volatilep, 0, FALSE);
}
/* Finish up a method. */
-static boolean
-stab_class_end_method (p)
- PTR p;
+static bfd_boolean
+stab_class_end_method (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -1871,14 +1768,13 @@ stab_class_end_method (p)
trailing semicolon. */
strcat (info->type_stack->methods, ";");
- return true;
+ return TRUE;
}
/* Finish up a class. */
-static boolean
-stab_end_class_type (p)
- PTR p;
+static bfd_boolean
+stab_end_class_type (void *p)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
size_t len;
@@ -1946,20 +1842,18 @@ stab_end_class_type (p)
free (info->type_stack->string);
info->type_stack->string = buf;
- return true;
+ return TRUE;
}
/* Push a typedef which was previously defined. */
-static boolean
-stab_typedef_type (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+stab_typedef_type (void *p, const char *name)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
struct string_hash_entry *h;
- h = string_hash_lookup (&info->typedef_hash, name, false, false);
+ h = string_hash_lookup (&info->typedef_hash, name, FALSE, FALSE);
assert (h != NULL && h->index > 0);
return stab_push_defined_type (info, h->index, h->size);
@@ -1967,12 +1861,9 @@ stab_typedef_type (p, name)
/* Push a struct, union or class tag. */
-static boolean
-stab_tag_type (p, name, id, kind)
- PTR p;
- const char *name;
- unsigned int id;
- enum debug_type_kind kind;
+static bfd_boolean
+stab_tag_type (void *p, const char *name, unsigned int id,
+ enum debug_type_kind kind)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -1980,17 +1871,15 @@ stab_tag_type (p, name, id, kind)
index = stab_get_struct_index (info, name, id, kind, &size);
if (index < 0)
- return false;
+ return FALSE;
return stab_push_defined_type (info, index, size);
}
/* Define a typedef. */
-static boolean
-stab_typdef (p, name)
- PTR p;
- const char *name;
+static bfd_boolean
+stab_typdef (void *p, const char *name)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
@@ -2016,16 +1905,16 @@ stab_typdef (p, name)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- h = string_hash_lookup (&info->typedef_hash, name, true, false);
+ h = string_hash_lookup (&info->typedef_hash, name, TRUE, FALSE);
if (h == NULL)
{
non_fatal (_("string_hash_lookup failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
/* I don't think we care about redefinitions. */
@@ -2033,15 +1922,13 @@ stab_typdef (p, name)
h->index = index;
h->size = size;
- return true;
+ return TRUE;
}
/* Define a tag. */
-static boolean
-stab_tag (p, tag)
- PTR p;
- const char *tag;
+static bfd_boolean
+stab_tag (void *p, const char *tag)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2054,20 +1941,17 @@ stab_tag (p, tag)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Define an integer constant. */
-static boolean
-stab_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+static bfd_boolean
+stab_int_constant (void *p, const char *name, bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *buf;
@@ -2076,20 +1960,17 @@ stab_int_constant (p, name, val)
sprintf (buf, "%s:c=i%ld", name, (long) val);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Define a floating point constant. */
-static boolean
-stab_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+static bfd_boolean
+stab_float_constant (void *p, const char *name, double val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *buf;
@@ -2098,20 +1979,17 @@ stab_float_constant (p, name, val)
sprintf (buf, "%s:c=f%g", name, val);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Define a typed constant. */
-static boolean
-stab_typed_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+static bfd_boolean
+stab_typed_constant (void *p, const char *name, bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2123,21 +2001,18 @@ stab_typed_constant (p, name, val)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Record a variable. */
-static boolean
-stab_variable (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_var_kind kind;
- bfd_vma val;
+static bfd_boolean
+stab_variable (void *p, const char *name, enum debug_var_kind kind,
+ bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2196,20 +2071,17 @@ stab_variable (p, name, kind, val)
free (s);
if (! stab_write_symbol (info, stab_type, 0, val, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Start outputting a function. */
-static boolean
-stab_start_function (p, name, globalp)
- PTR p;
- const char *name;
- boolean globalp;
+static bfd_boolean
+stab_start_function (void *p, const char *name, bfd_boolean globalp)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *rettype, *buf;
@@ -2227,21 +2099,17 @@ stab_start_function (p, name, globalp)
info->fun_offset = info->symbols_size;
if (! stab_write_symbol (info, N_FUN, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Output a function parameter. */
-static boolean
-stab_function_parameter (p, name, kind, val)
- PTR p;
- const char *name;
- enum debug_parm_kind kind;
- bfd_vma val;
+static bfd_boolean
+stab_function_parameter (void *p, const char *name, enum debug_parm_kind kind, bfd_vma val)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *s, *buf;
@@ -2281,19 +2149,17 @@ stab_function_parameter (p, name, kind, val)
free (s);
if (! stab_write_symbol (info, stab_type, 0, val, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Start a block. */
-static boolean
-stab_start_block (p, addr)
- PTR p;
- bfd_vma addr;
+static bfd_boolean
+stab_start_block (void *p, bfd_vma addr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -2321,7 +2187,7 @@ stab_start_block (p, addr)
if (info->nesting == 1)
{
info->fnaddr = addr;
- return true;
+ return TRUE;
}
/* We have to output the LBRAC symbol after any variables which are
@@ -2333,22 +2199,20 @@ stab_start_block (p, addr)
{
if (! stab_write_symbol (info, N_LBRAC, 0, info->pending_lbrac,
(const char *) NULL))
- return false;
+ return FALSE;
}
/* Remember the address and output it later. */
info->pending_lbrac = addr - info->fnaddr;
- return true;
+ return TRUE;
}
/* End a block. */
-static boolean
-stab_end_block (p, addr)
- PTR p;
- bfd_vma addr;
+static bfd_boolean
+stab_end_block (void *p, bfd_vma addr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -2360,7 +2224,7 @@ stab_end_block (p, addr)
{
if (! stab_write_symbol (info, N_LBRAC, 0, info->pending_lbrac,
(const char *) NULL))
- return false;
+ return FALSE;
info->pending_lbrac = (bfd_vma) -1;
}
@@ -2370,7 +2234,7 @@ stab_end_block (p, addr)
/* We ignore the outermost block. */
if (info->nesting == 0)
- return true;
+ return TRUE;
return stab_write_symbol (info, N_RBRAC, 0, addr - info->fnaddr,
(const char *) NULL);
@@ -2378,21 +2242,16 @@ stab_end_block (p, addr)
/* End a function. */
-static boolean
-stab_end_function (p)
- PTR p ATTRIBUTE_UNUSED;
+static bfd_boolean
+stab_end_function (void *p ATTRIBUTE_UNUSED)
{
- return true;
+ return TRUE;
}
/* Output a line number. */
-static boolean
-stab_lineno (p, file, lineno, addr)
- PTR p;
- const char *file;
- unsigned long lineno;
- bfd_vma addr;
+static bfd_boolean
+stab_lineno (void *p, const char *file, unsigned long lineno, bfd_vma addr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
@@ -2404,7 +2263,7 @@ stab_lineno (p, file, lineno, addr)
if (strcmp (file, info->lineno_filename) != 0)
{
if (! stab_write_symbol (info, N_SOL, 0, addr, file))
- return false;
+ return FALSE;
info->lineno_filename = file;
}
OpenPOWER on IntegriCloud