aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog349
-rw-r--r--binutils/Makefile.am14
-rw-r--r--binutils/Makefile.in21
-rw-r--r--binutils/NEWS12
-rw-r--r--binutils/addr2line.c2
-rw-r--r--binutils/ar.c8
-rw-r--r--binutils/arparse.y2
-rw-r--r--binutils/arsup.c5
-rw-r--r--binutils/binutils.texi32
-rw-r--r--binutils/config.in6
-rwxr-xr-xbinutils/configure530
-rw-r--r--binutils/configure.in20
-rw-r--r--binutils/debug.c51
-rw-r--r--binutils/deflex.l11
-rw-r--r--binutils/defparse.y30
-rw-r--r--binutils/dlltool.c640
-rw-r--r--binutils/dllwrap.c215
-rw-r--r--binutils/filemode.c6
-rw-r--r--binutils/ieee.c34
-rw-r--r--binutils/nm.c6
-rw-r--r--binutils/objcopy.111
-rw-r--r--binutils/objcopy.c78
-rw-r--r--binutils/objdump.c47
-rw-r--r--binutils/po/POTFILES.in9
-rw-r--r--binutils/po/binutils.pot830
-rw-r--r--binutils/prdbg.c8
-rw-r--r--binutils/rclex.l201
-rw-r--r--binutils/rcparse.y2
-rw-r--r--binutils/rdcoff.c6
-rw-r--r--binutils/readelf.c1739
-rw-r--r--binutils/rename.c20
-rw-r--r--binutils/rescoff.c7
-rw-r--r--binutils/resrc.c131
-rw-r--r--binutils/size.c12
-rw-r--r--binutils/stabs.c75
-rw-r--r--binutils/testsuite/ChangeLog22
-rw-r--r--binutils/testsuite/binutils-all/objdump.exp4
-rw-r--r--binutils/testsuite/binutils-all/readelf.h8
-rw-r--r--binutils/testsuite/binutils-all/readelf.r2
-rw-r--r--binutils/testsuite/binutils-all/readelf.wi48
-rw-r--r--binutils/windres.c65
-rw-r--r--binutils/windres.h2
-rw-r--r--binutils/wrstabs.c6
43 files changed, 3798 insertions, 1529 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b8a3d27..954e3d4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,352 @@
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * readelf.c (get_machine_flags): Print EF_SPARC_SUN_US3.
+
+1999-07-15 Ian Lance Taylor <ian@zembu.com>
+
+ * configure.in: Bump version number to 2.9.5.
+ * configure: Rebuild.
+
+1999-07-14 Richard Henderson <rth@cygnus.com>
+
+ * objdump.c (dump_section_header): Print SEC_SHORT.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
+ as appropriate. Add variable initializations. Add casts.
+ * objdump.c (disassemble_bytes): Change j to bfd_vma.
+ * readelf.c (process_syminfo): Change i to unsigned int.
+ (display_debug_info): Change abbrev_number to unsigned long.
+ (process_mips_specific): Change fcnt to size_t.
+
+1999-07-09 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c: Only support decoding 64bit ELF files if the compiler
+ supports a 64 bit data type.
+ Add -I equivalent for --histogram.
+ Add -A command-line option to display architecture specific information.
+
+1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * readelf.c (guess_is_rela): Sparcv9 and v8plus use rela.
+ (dump_relocations): Use ELF64_R_TYPE_ID for Sparc, for R_SPARC_OLO10
+ print the secondary addend.
+ (get_machine_flags): Print Sparc machine flags.
+ (get_symbol_type): Print STT_REGISTER.
+
+1999-07-08 Ian Lance Taylor <ian@zembu.com>
+
+ * stabs.c (parse_stab_type): Fix handling of template names with
+ template parameters containing `::'.
+ (stab_demangle_type): Handle a qualified name in a pointer to
+ member.
+
+1999-06-23 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.am (dlltool_SOURCES): Add dyn-string.c.
+ * Makefile.in: Rebuild.
+
+1999-06-23 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * configure.in (HAVE_EXECUTABLE_SUFFIX): Define.
+ * dlltool.c (look_for_prog): Use HAVE_EXECUTABLE_SUFFIX.
+ * dllwrap.c (look_for_prog): Likewise.
+ * resrc.c (look_for_default): Likewise.
+ * configure, config.in: Rebuild.
+
+1999-06-22 Ian Lance Taylor <ian@zembu.com>
+
+ Based on patches from Mumit Khan <khan@xraylith.wisc.EDU>:
+ * configure.in: Define EXECUTABLE_SUFFIX.
+ * dlltool.c: Include "dyn-string.h". Include <stdarg.h> based on
+ ANSI_PROTOTYPES, not __STDC__.
+ (outfile): Remove.
+ (gen_exp_file): Change uses of outfile to use alloca.
+ (make_one_lib_file, make_head, make_tail): Likewise.
+ (gen_lib_file): Likewise.
+ (look_for_prog): New static function.
+ (deduce_name): Rewrite to use look_for_prog.
+ (mcore_elf_gen_out_file): Use dyn_string_t rather than outfile.
+ * dllwrap.c: Don't include <stdio.h>, <errno.h>, <string.h>,
+ <stdlib.h>, or <unistd.h>. Include <sys/stat.h> and either
+ <stdarg.h> or <varargs.h>.
+ (driver_name): Initialize to NULL, not "gcc".
+ (dlltool_name): Initialize to NULL, not "dlltool".
+ (display, inform, look_for_prog, deduce_name): New static
+ functions.
+ (usage): Mention -mno-cygwin.
+ (OPTION_MNO_CYGWIN): Define.
+ (main): Handle -mno-cygwin. Deduce driver_name and dlltool_name.
+ * resrc.c (look_for_default): Make static. Remove unused local
+ path. Check using EXECUTABLE_SUFFIX.
+ (read_rc_file): Allocate enough space to hold EXECUTABLE_SUFFIX.
+ * Makefile.am: Rebuild dependencies.
+ (dllwrap_LDADD): Add $(INTLLIBS).
+ * configure, Makefile.in, config.in: Rebuild.
+
+Mon Jun 21 16:49:11 1999 Jeffrey A Law (law@cygnus.com)
+
+ * readelf.c (dump_relocations): Use elf_hppa_reloc_type instead of
+ elf32_hppa_reloc_type.
+
+1999-06-17 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c (mcore_elf_gen_out_file): Link object files with the
+ .exp file, not the .lib file.
+
+Fri Jun 18 20:17:51 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * deflex.l: Accept single-character symbol names.
+
+1999-06-16 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_symbol_type): Detect ARM symbols typed as Thumb
+ functions.
+
+1999-06-14 Nick Clifton <nickc@cygnus.com>
+
+ * objdump.c (disassembler_options): New variable.
+ (usage): Document new -M/--disassembler-options option.
+ (long_options): Add --disassembler-options.
+ (disassemble_data): Initialise disassembler_options field of
+ disassembler_info structure.
+ (main): Add parsing of -M option.
+
+ * binutils.texi: Document new command line switch to objdump.
+
+ * NEWS: Describe new command line switch to objdump.
+
+
+Mon Jun 14 10:27:54 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * binutils.texi: Fix typos.
+
+1999-06-13 Ian Lance Taylor <ian@zembu.com>
+
+ * objdump.c (disassemble_bytes): If the disassembler returns an
+ error, print out anything it may have printed to the buffer. From
+ H.J. Lu <hjl@gnu.org>.
+
+ * defparse.y (explist): Remove separate expline to eliminate
+ shift/reduce conflict.
+
+ From Kai-Uwe Rommel <rommel@ars.de>:
+ * defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE,
+ INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
+ (command): Add option_list after LIBRARY.
+ (attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE.
+ (option_list, option): New nonterminals.
+ * deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE,
+ INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
+
+1999-06-12 Ian Lance Taylor <ian@zembu.com>
+
+ * ar.c (O_BINARY): Define as 0 if not defined.
+ (ranlib_touch): Open file with O_BINARY.
+
+ * rename.c (O_BINARY): Define as 0 if not defined.
+ (simple_copy): Open files with O_BINARY.
+
+ Based on patch from H. Peter Anvin <hpa@transmeta.com>:
+ * objcopy.c (struct section_list): Add copy field.
+ (sections_copied): New static variable.
+ (copy_options): Add "only-section".
+ (copy_usage): Mention -j and --only-section.
+ (find_section_list): Initialize copy field.
+ (is_strip_section): Check for copying sections.
+ (copy_object): Check sections_copied when calling filter_symbols.
+ (setup_section): Check for copying sections.
+ (copy_section): Likewise.
+ (copy_main): Handle -j/--only-section.
+ * binutils.texi, objcopy.1: Document -j/--only-section.
+
+ * configure.in: If frexp is not available, check in -lm.
+ * configure: Rebuild.
+
+ * readelf.c (get_elf_class): Use correct printf format for type.
+ (get_data_encoding): Likewise.
+ (get_osabi_name): Likewise.
+ (process_file_header): Don't pass an extra argument to printf.
+ (process_dynamic_segment): Cast dynamic_size to long before
+ printing.
+ (decode_location_expression): Cast byte_get to long before
+ printing.
+
+Wed Jun 9 11:40:16 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * readelf.c (dump_section): Cast values from byte_get to
+ [unsigned] long for printing, in case it is wider than long.
+ (display_block): Likewise.
+ (read_and_display_attr): Likewise.
+ (decode_location_expression): Likewise. Don't depend on
+ evaluation order.
+
+Mon Jun 7 12:14:57 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * windres.c (usage): Fix typo.
+
+1999-06-04 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c: Use 64bit wide fields in internal strcutures even if
+ targetting a 32bit architecture.
+ (dump_relocations): Take a new parameter - the number of symbols
+ in the symbol table.
+
+1999-06-04 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c: Add support for 64bit ELF files.
+
+1999-06-03 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c (mcore_elf_gen_out_file): Use constants for temporary
+ file names.
+
+Wed Jun 2 12:34:36 1999 Richard Henderson <rth@cygnus.com>
+
+ * dlltool.c (gen_exp_file): Revert 19990411 change.
+
+Mon May 31 09:56:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * readelf.c (process_relocs): Determine type of reloc from
+ DT_PLTREL and from section type.
+
+1999-05-29 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_elf_class): Display unknown class number.
+ (get_data_encoding): Display unknown encoding number.
+ (get_osabi_name): Display unknown ABI number.
+ (process_file_header): Display unknown version number.
+
+1999-05-29 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (dump_relocations): Fix typo.
+
+1999-05-28 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (dump_relocations): Add extra parameter: is_rela to
+ specify the kind of relocations to be dumped. Call guess_is_rela
+ if this parameter has a value of UNKNOWN.
+ (guess_is_rela): New function: Guess the kind of reloc being used
+ baced on the machine number.
+ (process_relocs): Determine type of reloc before calling
+ dump_relocations.
+
+1999-05-28 Ian Lance Taylor <ian@zembu.com>
+
+ * readelf.c: Include "elf/i960.h".
+ (dump_relocations): Handle EM_960.
+
+Thu May 27 11:58:33 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * objcopy.c (copy_archive): Preserve dates of archive members if
+ requested.
+
+ * readelf.c (dump_relocations): Always print the addend on RELA
+ systems even if there is no symbol.
+ (process_program_headers): Reset dynamic_size before looping
+ through the program headers.
+ (process_version_sections): Cast sh_offset to unsigned long for
+ printing in case bfd_vma is wider.
+ (process_symbol_table): Use get_symbol_index_type when printing
+ st_shndx.
+
+1999-05-17 DJ Delorie <dj@cygnus.com>
+
+ * windres.c: add verbose option
+ (main): process verbose option
+ * resrc.c (look_for_default): new. Look for the default
+ preprocessor in a given location.
+ (read_rc_file): for foo/bar-windres, look for foo/bar-gcc,
+ foo/gcc (in case of foo/windres), and then gcc (the old default).
+
+1999-05-16 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c (deduce_name): New function: Deduce name of program to
+ run.
+ (mcore_elf_out_file): New variable: Name of mcore-elf output file.
+ (mcore_elf_linker): New variable: Name of linker to use.
+ (mcore_elf_linker_flags): New variable: Linker flags to pass.
+ (scan_obj_file): Cache filenames if necessary.
+ (usage): Document new command line options.
+ (main): Support new command line options: -M (generate an
+ mcore-elf output file) -L (name of linker to use) -F (flags to
+ pass to linker).
+ (mcore_elf_cache_filename): Store a filename in a cache.
+ (mcore_elf_gen_out_file): New function: Generate an output file
+ per the mcore-elf spec.
+
+1999-05-15 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (BUILD_MISC): Build dlltool for mcore
+ * configure: Regenerate.
+ * dlltool.c: Update example in comment.
+ (DLLTOOL_MCORE): Define.
+ (DLLTOOL_MCORE_ELF): Define.
+ (DRECTVE_SECTION_NAME): Define.
+ (mcore_be_jtab, mcore_le_jtab): Binary for performing an mcore
+ jump to address.
+ (mtable): Add entries for mcore variants.
+ (rvaafter, rvabefore, asm_prefix): Add mcore suppport.
+ (scan_drectve_symbols): Use DRECTVE_SECTION_NAME.
+ (make_head, make_tail): Cope if file cannot be created.
+ (usage): Improve layout.
+
+1999-05-13 DJ Delorie <dj@cygnus.com>
+
+ * rclex.l: add code to suppress certain output from cpp, replace
+ all returns with MAYBE_RETURN
+ (MAYBE_RETURN): new, implement the suppression by returning
+ IGNORED_TOKEN as needed.
+ (cpp_line): remember which file we're in, mark data from included
+ *.h files for suppression.
+ * rcparse.y (input): allow IGNORED_TOKEN outside of known constructs
+
+1999-05-10 DJ Delorie <dj@cygnus.com>
+
+ * windres.c (quot): Quote shell metacharacters in a string
+ (main): quote parameters to cpp that might have metacharacters in
+ them. Allow -D as an alias for --define to allow for sharing make
+ macros with gcc.
+
+ * objdump.c (dump_reloc_set): don't core if howto->name is NULL
+
+ * Makefile.am: Give rescoff.c a cpu-specific -D so it can set
+ the correct BFD.
+ * Makefile.in: ditto
+ * rescoff.c (write_coff_file): Set the correct BFD
+
+1999-05-06 Ian Lance Taylor <ian@zembu.com>
+
+ * rename.c (smart_rename): Fix test of whether file exists.
+
+1999-05-06 Nick Clifton <nickc@cygnus.com>
+
+ * objdump.c (disassemble_data): Set display_endian based on target
+ endianism.
+
+1999-05-05 Catherine Moore <clm@cygnus.com>
+
+ * dlltool.c (interwork): Remove.
+ (arm_interwork_jtab): Use bx insn.
+ (thumb_jtab): Likewise.
+ (MARM_INTERWORK): New machine type.
+ (rvaafter): Handle it.
+ (rvabefore) Likewise.
+ (asm_prefix): Likewise.
+ (gen_exp_type): Check machine type instead of
+ interwork flag.
+ (make_one_lib_file): Likewise.
+ (make_head): Likewise.
+ (make_tail): Likewise.
+ (usage): Update machine types.
+ (main): Remove -interwork support.
+
+1999-05-05 Catherine Moore <clm@cygnus.com>
+
+ * readelf.c (get_machine_flags): Check for EF_CPU32.
+ (get_data_encoding): Fix typo.
+
1999-04-26 Tom Tromey <tromey@cygnus.com>
* aclocal.m4, configure: Updated for new version of libtool.
diff --git a/binutils/Makefile.am b/binutils/Makefile.am
index 4f3014f..a01f9ed 100644
--- a/binutils/Makefile.am
+++ b/binutils/Makefile.am
@@ -234,12 +234,15 @@ sysinfo.o: sysinfo.c
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
-dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
+dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
dlltool.o:dlltool.c
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
+rescoff.o:rescoff.c
+ $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
+
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
sysdump_SOURCES = sysdump.c $(BULIBS)
@@ -257,7 +260,7 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
dllwrap_SOURCES = dllwrap.c dyn-string.c
-dllwrap_LDADD = $(LIBIBERTY)
+dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
@@ -378,7 +381,8 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
debug.h
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/demangle.h dlltool.h
+ $(INCDIR)/getopt.h $(INCDIR)/demangle.h dyn-string.h \
+ dlltool.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/fopen-same.h
ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \
@@ -459,8 +463,8 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/d10v.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/mn10200.h \
$(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/fr30.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h
+ $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \
+ bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
windres.h winduni.h
diff --git a/binutils/Makefile.in b/binutils/Makefile.in
index c32ae4d..fd7488f 100644
--- a/binutils/Makefile.in
+++ b/binutils/Makefile.in
@@ -267,7 +267,7 @@ addr2line_SOURCES = addr2line.c $(BULIBS)
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
-dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
+dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
@@ -282,7 +282,7 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
dllwrap_SOURCES = dllwrap.c dyn-string.c
-dllwrap_LDADD = $(LIBIBERTY)
+dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
DISTSTUFF = 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
@@ -331,8 +331,8 @@ coffdump_OBJECTS = coffdump.o coffgrok.o bucomm.o version.o filemode.o
coffdump_LDADD = $(LDADD)
coffdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
coffdump_LDFLAGS =
-dlltool_OBJECTS = dlltool.o defparse.o deflex.o bucomm.o version.o \
-filemode.o
+dlltool_OBJECTS = dlltool.o defparse.o deflex.o dyn-string.o bucomm.o \
+version.o filemode.o
dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
dlltool_LDFLAGS =
windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \
@@ -412,7 +412,7 @@ configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(dllwrap_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(c__filt_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(readelf_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES)
OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(dllwrap_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(c__filt_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(readelf_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS)
@@ -1125,13 +1125,15 @@ sysinfo.o: sysinfo.c
dlltool.o:dlltool.c
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
+rescoff.o:rescoff.c
+ $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
+
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
# scripts, since they are only included conditionally.
nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
ldname=`echo ld | sed '$(transform)'`; \
$(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c
-
diststuff: $(DISTSTUFF) info
# Targets to rebuild dependencies in this Makefile.
@@ -1237,7 +1239,8 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
debug.h
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/demangle.h dlltool.h
+ $(INCDIR)/getopt.h $(INCDIR)/demangle.h dyn-string.h \
+ dlltool.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/fopen-same.h
ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \
@@ -1318,8 +1321,8 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/d10v.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/mn10200.h \
$(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/fr30.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h
+ $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \
+ bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
windres.h winduni.h
diff --git a/binutils/NEWS b/binutils/NEWS
index 76dcebd..eb27ad5 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -2,8 +2,13 @@
Changes in binutils 2.10:
-* objdump support for -mi386:intel which causes disassembly to be displayed with
- intel syntax.
+* 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.
* New program: readelf. This displays the contents of ELF format files,
regardless of target machine.
@@ -18,6 +23,9 @@ Changes in binutils 2.10:
* dlltool now takes --export-all-symbols, --no-export-all-symbols,
--exclude-symbols, and --no-default-excludes options.
+* objcopy now takes a -j/--only-section option to copy only the specified
+ sections.
+
Changes in binutils 2.9:
* Added windres program, which can be used to manipulate resources in WIN32
diff --git a/binutils/addr2line.c b/binutils/addr2line.c
index 3cee867..72707c2 100644
--- a/binutils/addr2line.c
+++ b/binutils/addr2line.c
@@ -123,7 +123,7 @@ static void
find_address_in_section (abfd, section, data)
bfd *abfd;
asection *section;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
{
bfd_vma vma;
bfd_size_type size;
diff --git a/binutils/ar.c b/binutils/ar.c
index c951ef7..3e9dcef 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -40,6 +40,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EXT_NAME_LEN 6 /* ditto for *NIX */
#endif
+/* We need to open files in binary modes on system where that makes a
+ difference. */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
#define BUFSIZE 8192
/* Kludge declaration from BFD! This is ugly! FIXME! XXX */
@@ -1296,7 +1302,7 @@ ranlib_touch (archname)
bfd *arch;
char **matching;
- f = open (archname, O_RDWR, 0);
+ f = open (archname, O_RDWR | O_BINARY, 0);
if (f < 0)
{
bfd_set_error (bfd_error_system_call);
diff --git a/binutils/arparse.y b/binutils/arparse.y
index d6c7600..a5e90fa 100644
--- a/binutils/arparse.y
+++ b/binutils/arparse.y
@@ -193,7 +193,7 @@ verbose_command:
static int
yyerror (x)
- const char *x;
+ const char *x ATTRIBUTE_UNUSED;
{
extern int linenumber;
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 38fd695..d6809fc 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -1,5 +1,6 @@
/* arsup.c - Archive support for MRI compatibility
- Copyright (C) 1992, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -95,7 +96,7 @@ FILE *outfile;
static void
ar_directory_doer (abfd, ignore)
bfd *abfd;
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
print_arelt_descr(outfile, abfd, verbose);
}
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index 5f7c646..535df3f 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -554,7 +554,7 @@ Requires prior use of @code{OPEN} or @code{CREATE}.
@item LIST
Display full contents of the current archive, in ``verbose'' style
regardless of the state of @code{VERBOSE}. The effect is like @samp{ar
-tv @var{archive}}). (This single command is a @sc{gnu} @code{ld}
+tv @var{archive}}. (This single command is a @sc{gnu} @code{ar}
enhancement, rather than present for MRI compatibility.)
Requires prior use of @code{OPEN} or @code{CREATE}.
@@ -837,6 +837,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
[ -x | --discard-all ] [ -X | --discard-locals ]
[ -b @var{byte} | --byte=@var{byte} ]
[ -i @var{interleave} | --interleave=@var{interleave} ]
+ [ -j @var{sectionname} | --only-section=@var{sectionname} ]
[ -R @var{sectionname} | --remove-section=@var{sectionname} ]
[ -p | --preserve-dates ] [ --debugging ]
[ --gap-fill=@var{val} ] [ --pad-to=@var{address} ]
@@ -905,6 +906,12 @@ Use @var{bfdname} as the object format for both the input and the output
file; i.e., simply transfer data from source to destination with no
translation. @xref{Target Selection}, for more information.
+@item -j @var{sectionname}
+@itemx --only-section=@var{sectionname}
+Copy only the named section from the input file to the output file.
+This option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+
@item -R @var{sectionname}
@itemx --remove-section=@var{sectionname}
Remove any section named @var{sectionname} from the output file. This
@@ -1130,6 +1137,7 @@ objdump [ -a | --archive-headers ]
[ -j @var{section} | --section=@var{section} ]
[ -l | --line-numbers ] [ -S | --source ]
[ -m @var{machine} | --architecture=@var{machine} ]
+ [ -M @var{options} | --disassembler-options=@var{options}]
[ -p | --private-headers ]
[ -r | --reloc ] [ -R | --dynamic-reloc ]
[ -s | --full-contents ] [ --stabs ]
@@ -1288,6 +1296,21 @@ can be useful when disassembling object files which do not describe
architecture information, such as S-records. You can list the available
architectures with the @samp{-i} option.
+@item -M @var{options}
+@itemx --disassembler-options=@var{options}
+Pass target specific information to the disassembler. Only supported on
+some targets.
+
+If the target is an ARM architecture then this switch can be used to
+select which register name set is used during disassembler. Specifying
+@samp{--disassembler-options=reg-name-std} (the default) will select the
+register names as used in ARM's instruction set documentation, but with
+register 13 called 'sp', register 14 called 'lr' and register 15 called
+'pc'. Specifying @samp{--disassembler-options=reg-names-apcs} will
+select the name set used by the ARM Procedure Call Standard, whilst
+specifying @samp{--disassembler-options=reg-names-raw} will just use
+@samp{r} followed by the register number.
+
@item -p
@itemx --private-headers
Print information that is specific to the object file format. The exact
@@ -2048,10 +2071,15 @@ Specify an include directory to use when reading an @code{rc} file.
option. @code{windres} will also search this directory when looking for
files named in the @code{rc} file.
-@item --define @var{sym[=val]}
+@item -D @var{target}
+@itemx --define @var{sym[=val]}
Specify a @code{-D} option to pass to the preprocessor when reading an
@code{rc} file.
+@item -v
+Enable verbose mode. This tells you what the preprocessor is if you
+didn't specify one.
+
@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
diff --git a/binutils/config.in b/binutils/config.in
index 38272dd..3c26c5c 100644
--- a/binutils/config.in
+++ b/binutils/config.in
@@ -151,6 +151,12 @@
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
+/* Does the platform use an executable suffix? */
+#undef HAVE_EXECUTABLE_SUFFIX
+
+/* Suffix used for executables, if any. */
+#undef EXECUTABLE_SUFFIX
+
/* Is the type time_t defined in <time.h>? */
#undef HAVE_TIME_T_IN_TIME_H
diff --git a/binutils/configure b/binutils/configure
index 594e154..d4c77e6 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -49,6 +49,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -163,6 +164,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
@@ -333,6 +335,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=*)
@@ -498,12 +505,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
@@ -590,7 +601,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:594: checking host system type" >&5
+echo "configure:605: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -611,7 +622,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:615: checking target system type" >&5
+echo "configure:626: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -629,7 +640,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:633: checking build system type" >&5
+echo "configure:644: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -664,7 +675,7 @@ test "$host_alias" != "$target_alias" &&
# 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:668: checking for a BSD compatible install" >&5
+echo "configure:679: 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
@@ -717,7 +728,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:721: checking whether build environment is sane" >&5
+echo "configure:732: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -774,7 +785,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:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:789: 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
@@ -803,7 +814,7 @@ fi
PACKAGE=binutils
-VERSION=2.9.4
+VERSION=2.9.5
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -820,7 +831,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:824: checking for working aclocal" >&5
+echo "configure:835: 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.
@@ -833,7 +844,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:837: checking for working autoconf" >&5
+echo "configure:848: 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.
@@ -846,7 +857,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:850: checking for working automake" >&5
+echo "configure:861: 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.
@@ -859,7 +870,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:863: checking for working autoheader" >&5
+echo "configure:874: 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.
@@ -872,7 +883,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:876: checking for working makeinfo" >&5
+echo "configure:887: 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.
@@ -958,7 +969,7 @@ fi
# 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:962: checking for $ac_word" >&5
+echo "configure:973: 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
@@ -988,7 +999,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:992: checking for $ac_word" >&5
+echo "configure:1003: 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
@@ -1018,7 +1029,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:1022: checking for $ac_word" >&5
+echo "configure:1033: 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
@@ -1069,7 +1080,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:1073: checking for $ac_word" >&5
+echo "configure:1084: 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
@@ -1101,7 +1112,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1116: 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.
@@ -1112,12 +1123,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1116 "configure"
+#line 1127 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1132: \"$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
@@ -1143,12 +1154,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:1147: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1158: 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:1152: checking whether we are using GNU C" >&5
+echo "configure:1163: 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
@@ -1157,7 +1168,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1161: \"$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:1172: \"$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
@@ -1176,7 +1187,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:1180: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1191: 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
@@ -1219,7 +1230,7 @@ ac_prog=ld
if test "$ac_cv_prog_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:1223: checking for ld used by GCC" >&5
+echo "configure:1234: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -1243,10 +1254,10 @@ echo "configure:1223: 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:1247: checking for GNU ld" >&5
+echo "configure:1258: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1250: checking for non-GNU ld" >&5
+echo "configure:1261: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1282,7 +1293,7 @@ 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:1286: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1297: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1298,7 +1309,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1302: checking for BSD-compatible nm" >&5
+echo "configure:1313: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1336,7 +1347,7 @@ echo "$ac_t""$NM" 1>&6
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
-echo "configure:1340: checking command to parse $NM output" >&5
+echo "configure:1351: checking command to parse $NM output" >&5
if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1399,11 +1410,11 @@ void nm_test_func(){}
int main(){nm_test_var='a';nm_test_func;return 0;}
EOF
- if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:1414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
# Now try to grab the symbols.
ac_nlist=conftest.nm
- if { (eval echo configure:1407: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
+ if { (eval echo configure:1418: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
# Try sorting and uniquifying the output.
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
@@ -1455,7 +1466,7 @@ EOF
ac_save_CFLAGS="$CFLAGS"
LIBS="conftestm.$ac_objext"
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_pipe_works=yes
else
echo "configure: failed program was:" >&5
@@ -1501,7 +1512,7 @@ fi
echo "$ac_t""$ac_result" 1>&6
echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
-echo "configure:1505: checking for _ prefix in compiled symbols" >&5
+echo "configure:1516: checking for _ prefix in compiled symbols" >&5
if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1510,10 +1521,10 @@ cat > conftest.$ac_ext <<EOF
void nm_test_func(){}
int main(){nm_test_func;return 0;}
EOF
-if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
# Now try to grab the symbols.
ac_nlist=conftest.nm
- if { (eval echo configure:1517: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
+ if { (eval echo configure:1528: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
# See whether the symbols have a leading underscore.
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
ac_cv_sys_symbol_underscore=yes
@@ -1539,7 +1550,7 @@ echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1543: checking whether ln -s works" >&5
+echo "configure:1554: 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
@@ -1581,8 +1592,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1585 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1596 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1603,19 +1614,19 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1607: checking whether the C compiler needs -belf" >&5
+echo "configure:1618: 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
cat > conftest.$ac_ext <<EOF
-#line 1612 "configure"
+#line 1623 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1630: \"$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
@@ -1638,7 +1649,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1642: checking for $ac_word" >&5
+echo "configure:1653: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1670,7 +1681,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1674: checking for $ac_word" >&5
+echo "configure:1685: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1705,7 +1716,7 @@ fi
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1709: checking for $ac_word" >&5
+echo "configure:1720: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1737,7 +1748,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1741: checking for $ac_word" >&5
+echo "configure:1752: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1902,7 +1913,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:1906: checking for $ac_word" >&5
+echo "configure:1917: 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
@@ -1932,7 +1943,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:1936: checking for $ac_word" >&5
+echo "configure:1947: 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
@@ -1983,7 +1994,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:1987: checking for $ac_word" >&5
+echo "configure:1998: 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
@@ -2015,7 +2026,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2030: 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.
@@ -2026,12 +2037,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2030 "configure"
+#line 2041 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2046: \"$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
@@ -2057,12 +2068,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:2061: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2072: 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:2066: checking whether we are using GNU C" >&5
+echo "configure:2077: 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
@@ -2071,7 +2082,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2075: \"$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:2086: \"$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
@@ -2090,7 +2101,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:2094: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2105: 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
@@ -2127,7 +2138,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:2131: checking for $ac_word" >&5
+echo "configure:2142: 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
@@ -2158,7 +2169,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2162: checking how to run the C preprocessor" >&5
+echo "configure:2173: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2173,13 +2184,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 2177 "configure"
+#line 2188 "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:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2194: \"$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
:
@@ -2190,13 +2201,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2194 "configure"
+#line 2205 "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:2200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2211: \"$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
:
@@ -2207,13 +2218,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2211 "configure"
+#line 2222 "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:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2228: \"$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
:
@@ -2243,7 +2254,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:2247: checking for $ac_word" >&5
+echo "configure:2258: 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
@@ -2276,7 +2287,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:2280: checking for $ac_word" >&5
+echo "configure:2291: 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
@@ -2310,7 +2321,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2314: checking for yywrap in -l$ac_lib" >&5
+echo "configure:2325: 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
@@ -2318,7 +2329,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2322 "configure"
+#line 2333 "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
@@ -2329,7 +2340,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2344: \"$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
@@ -2352,7 +2363,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2356: checking lex output file root" >&5
+echo "configure:2367: 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
@@ -2373,7 +2384,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:2377: checking whether yytext is a pointer" >&5
+echo "configure:2388: 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
@@ -2385,14 +2396,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 2389 "configure"
+#line 2400 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2407: \"$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
@@ -2416,7 +2427,7 @@ fi
ALL_LINGUAS=
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:2420: checking for POSIXized ISC" >&5
+echo "configure:2431: 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
@@ -2437,12 +2448,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2441: checking for ANSI C header files" >&5
+echo "configure:2452: 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 2446 "configure"
+#line 2457 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2450,7 +2461,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2465: \"$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*
@@ -2467,7 +2478,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 2471 "configure"
+#line 2482 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2485,7 +2496,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 2489 "configure"
+#line 2500 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2506,7 +2517,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2510 "configure"
+#line 2521 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2517,7 +2528,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2541,12 +2552,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2545: checking for working const" >&5
+echo "configure:2556: 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 2550 "configure"
+#line 2561 "configure"
#include "confdefs.h"
int main() {
@@ -2595,7 +2606,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2616,21 +2627,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2620: checking for inline" >&5
+echo "configure:2631: 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 2627 "configure"
+#line 2638 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2656,12 +2667,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2660: checking for off_t" >&5
+echo "configure:2671: 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 2665 "configure"
+#line 2676 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2689,12 +2700,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2693: checking for size_t" >&5
+echo "configure:2704: 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 2698 "configure"
+#line 2709 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2724,19 +2735,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:2728: checking for working alloca.h" >&5
+echo "configure:2739: 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 2733 "configure"
+#line 2744 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2751: \"$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
@@ -2757,12 +2768,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2761: checking for alloca" >&5
+echo "configure:2772: 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 2766 "configure"
+#line 2777 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2790,7 +2801,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2805: \"$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
@@ -2822,12 +2833,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2826: checking whether alloca needs Cray hooks" >&5
+echo "configure:2837: 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 2831 "configure"
+#line 2842 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2852,12 +2863,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:2856: checking for $ac_func" >&5
+echo "configure:2867: 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 2861 "configure"
+#line 2872 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2880,7 +2891,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2895: \"$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
@@ -2907,7 +2918,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2911: checking stack direction for C alloca" >&5
+echo "configure:2922: 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
@@ -2915,7 +2926,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2919 "configure"
+#line 2930 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2934,7 +2945,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2949: \"$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
@@ -2959,17 +2970,17 @@ 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:2963: checking for $ac_hdr" >&5
+echo "configure:2974: 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 2968 "configure"
+#line 2979 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2984: \"$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*
@@ -2998,12 +3009,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3002: checking for $ac_func" >&5
+echo "configure:3013: 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 3007 "configure"
+#line 3018 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3026,7 +3037,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3041: \"$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
@@ -3051,7 +3062,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3055: checking for working mmap" >&5
+echo "configure:3066: 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
@@ -3059,7 +3070,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3063 "configure"
+#line 3074 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3199,7 +3210,7 @@ main()
}
EOF
-if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3214: \"$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
@@ -3227,17 +3238,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:3231: checking for $ac_hdr" >&5
+echo "configure:3242: 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 3236 "configure"
+#line 3247 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3252: \"$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*
@@ -3267,12 +3278,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3271: checking for $ac_func" >&5
+echo "configure:3282: 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 3276 "configure"
+#line 3287 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3295,7 +3306,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3310: \"$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
@@ -3324,12 +3335,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3328: checking for $ac_func" >&5
+echo "configure:3339: 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 3333 "configure"
+#line 3344 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3352,7 +3363,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3367: \"$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
@@ -3386,19 +3397,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3390: checking for LC_MESSAGES" >&5
+echo "configure:3401: 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 3395 "configure"
+#line 3406 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3413: \"$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
@@ -3419,7 +3430,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3423: checking whether NLS is requested" >&5
+echo "configure:3434: 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"
@@ -3439,7 +3450,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3443: checking whether included gettext is requested" >&5
+echo "configure:3454: 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"
@@ -3458,17 +3469,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3462: checking for libintl.h" >&5
+echo "configure:3473: 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 3467 "configure"
+#line 3478 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3483: \"$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*
@@ -3485,19 +3496,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:3489: checking for gettext in libc" >&5
+echo "configure:3500: 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 3494 "configure"
+#line 3505 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3512: \"$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
@@ -3513,7 +3524,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:3517: checking for bindtextdomain in -lintl" >&5
+echo "configure:3528: 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
@@ -3521,7 +3532,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3525 "configure"
+#line 3536 "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
@@ -3532,7 +3543,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3547: \"$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
@@ -3548,19 +3559,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:3552: checking for gettext in libintl" >&5
+echo "configure:3563: 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 3557 "configure"
+#line 3568 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3575: \"$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
@@ -3588,7 +3599,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:3592: checking for $ac_word" >&5
+echo "configure:3603: 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
@@ -3622,12 +3633,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3626: checking for $ac_func" >&5
+echo "configure:3637: 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 3631 "configure"
+#line 3642 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3650,7 +3661,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3665: \"$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
@@ -3677,7 +3688,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:3681: checking for $ac_word" >&5
+echo "configure:3692: 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
@@ -3713,7 +3724,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:3717: checking for $ac_word" >&5
+echo "configure:3728: 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
@@ -3745,7 +3756,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3749 "configure"
+#line 3760 "configure"
#include "confdefs.h"
int main() {
@@ -3753,7 +3764,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3785,7 +3796,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:3789: checking for $ac_word" >&5
+echo "configure:3800: 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
@@ -3819,7 +3830,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:3823: checking for $ac_word" >&5
+echo "configure:3834: 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
@@ -3855,7 +3866,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:3859: checking for $ac_word" >&5
+echo "configure:3870: 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
@@ -3945,7 +3956,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3949: checking for catalogs to be installed" >&5
+echo "configure:3960: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3973,17 +3984,17 @@ echo "configure:3949: 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:3977: checking for linux/version.h" >&5
+echo "configure:3988: 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 3982 "configure"
+#line 3993 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3998: \"$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*
@@ -4046,7 +4057,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4050: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4061: 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"
@@ -4069,12 +4080,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:4073: checking for Cygwin environment" >&5
+echo "configure:4084: 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 4078 "configure"
+#line 4089 "configure"
#include "confdefs.h"
int main() {
@@ -4085,7 +4096,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -4102,19 +4113,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:4106: checking for mingw32 environment" >&5
+echo "configure:4117: 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 4111 "configure"
+#line 4122 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -4133,7 +4144,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4137: checking for executable suffix" >&5
+echo "configure:4148: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4143,7 +4154,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -4163,6 +4174,16 @@ test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
+if test -n "$EXEEXT"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_EXECUTABLE_SUFFIX 1
+EOF
+
+fi
+cat >> confdefs.h <<EOF
+#define EXECUTABLE_SUFFIX "${EXEEXT}"
+EOF
+
# host-specific stuff:
@@ -4176,7 +4197,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:4180: checking for $ac_word" >&5
+echo "configure:4201: 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
@@ -4215,7 +4236,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:4219: checking for a BSD compatible install" >&5
+echo "configure:4240: 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
@@ -4282,7 +4303,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:4286: checking for build system executable suffix" >&5
+echo "configure:4307: 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
@@ -4307,17 +4328,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:4311: checking for $ac_hdr" >&5
+echo "configure:4332: 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 4316 "configure"
+#line 4337 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4342: \"$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*
@@ -4344,12 +4365,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4348: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4369: 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 4353 "configure"
+#line 4374 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -4365,7 +4386,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:4369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -4388,19 +4409,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:4392: checking for working alloca.h" >&5
+echo "configure:4413: 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 4397 "configure"
+#line 4418 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4425: \"$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
@@ -4421,12 +4442,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4425: checking for alloca" >&5
+echo "configure:4446: 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 4430 "configure"
+#line 4451 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -4454,7 +4475,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4479: \"$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
@@ -4486,12 +4507,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4490: checking whether alloca needs Cray hooks" >&5
+echo "configure:4511: 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 4495 "configure"
+#line 4516 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4516,12 +4537,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:4520: checking for $ac_func" >&5
+echo "configure:4541: 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 4525 "configure"
+#line 4546 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4544,7 +4565,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4569: \"$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
@@ -4571,7 +4592,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4575: checking stack direction for C alloca" >&5
+echo "configure:4596: 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
@@ -4579,7 +4600,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4583 "configure"
+#line 4604 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -4598,7 +4619,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4623: \"$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
@@ -4622,12 +4643,12 @@ fi
for ac_func in sbrk utimes
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4626: checking for $ac_func" >&5
+echo "configure:4647: 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 4631 "configure"
+#line 4652 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4650,7 +4671,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4675: \"$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
@@ -4675,20 +4696,84 @@ fi
done
+# Some systems have frexp only in -lm, not in -lc.
+
+echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
+echo "configure:4703: 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 4710 "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 frexp();
+
+int main() {
+frexp()
+; return 0; }
+EOF
+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_search_frexp="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_frexp" = "no" && for i in -lm; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4732 "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 frexp();
+
+int main() {
+frexp()
+; return 0; }
+EOF
+if { (eval echo configure:4743: \"$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
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_frexp" 1>&6
+if test "$ac_cv_search_frexp" != "no"; then
+ test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
+
+else :
+
+fi
+
echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:4680: checking for time_t in time.h" >&5
+echo "configure:4765: 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 4685 "configure"
+#line 4770 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:4692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_time_h=yes
else
@@ -4709,19 +4794,19 @@ EOF
fi
echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:4713: checking for time_t in sys/types.h" >&5
+echo "configure:4798: 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 4718 "configure"
+#line 4803 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:4725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_types_h=yes
else
@@ -4744,12 +4829,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:4748: checking for utime.h" >&5
+echo "configure:4833: 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 4753 "configure"
+#line 4838 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TIME_H
@@ -4760,7 +4845,7 @@ int main() {
struct utimbuf s;
; return 0; }
EOF
-if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_header_utime_h=yes
else
@@ -4781,12 +4866,12 @@ EOF
fi
echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:4785: checking whether fprintf must be declared" >&5
+echo "configure:4870: 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 4790 "configure"
+#line 4875 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4807,7 +4892,7 @@ int main() {
char *(*pfn) = (char *(*)) fprintf
; return 0; }
EOF
-if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_fprintf=no
else
@@ -4828,12 +4913,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4832: checking whether strstr must be declared" >&5
+echo "configure:4917: 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 4837 "configure"
+#line 4922 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4854,7 +4939,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4875,12 +4960,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4879: checking whether sbrk must be declared" >&5
+echo "configure:4964: 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 4884 "configure"
+#line 4969 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4901,7 +4986,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -4922,12 +5007,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4926: checking whether getenv must be declared" >&5
+echo "configure:5011: 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 4931 "configure"
+#line 5016 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4948,7 +5033,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4969,12 +5054,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:4973: checking whether environ must be declared" >&5
+echo "configure:5058: 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 4978 "configure"
+#line 5063 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4995,7 +5080,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:4999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -5102,6 +5187,15 @@ do
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
+ mcore-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mcore-*elf)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
+ ;;
esac
fi
done
diff --git a/binutils/configure.in b/binutils/configure.in
index 298dcd8..c4ee803 100644
--- a/binutils/configure.in
+++ b/binutils/configure.in
@@ -5,7 +5,7 @@ AC_INIT(ar.c)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(binutils, 2.9.4)
+AM_INIT_AUTOMAKE(binutils, 2.9.5)
AM_PROG_LIBTOOL
@@ -44,6 +44,12 @@ CY_GNU_GETTEXT
AM_MAINTAINER_MODE
AC_EXEEXT
+if test -n "$EXEEXT"; then
+ AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1,
+ [Does the platform use an executable suffix?])
+fi
+AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}",
+ [Suffix used for executables, if any.])
# host-specific stuff:
@@ -64,6 +70,9 @@ AC_HEADER_SYS_WAIT
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(sbrk utimes)
+# Some systems have frexp only in -lm, not in -lc.
+AC_SEARCH_LIBS(frexp, -lm)
+
AC_MSG_CHECKING(for time_t in time.h)
AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
[AC_TRY_COMPILE([#include <time.h>], [time_t i;],
@@ -189,6 +198,15 @@ changequote([,])dnl
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
+ mcore-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mcore-*elf)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
+ ;;
esac
fi
done
diff --git a/binutils/debug.c b/binutils/debug.c
index 173d627..dad4559 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information.
- Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -603,7 +603,7 @@ debug_error (message)
static struct debug_name *
debug_add_to_namespace (info, nsp, name, kind, linkage)
- struct debug_handle *info;
+ struct debug_handle *info ATTRIBUTE_UNUSED;
struct debug_namespace **nsp;
const char *name;
enum debug_object_kind kind;
@@ -1039,8 +1039,8 @@ debug_record_line (handle, lineno, addr)
boolean
debug_start_common_block (handle, name)
- PTR handle;
- const char *name;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
debug_error (_("debug_start_common_block: not implemented"));
@@ -1051,8 +1051,8 @@ debug_start_common_block (handle, name)
boolean
debug_end_common_block (handle, name)
- PTR handle;
- const char *name;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
debug_error (_("debug_end_common_block: not implemented"));
@@ -1143,10 +1143,10 @@ debug_record_typed_const (handle, name, type, val)
boolean
debug_record_label (handle, name, type, addr)
- PTR handle;
- const char *name;
- debug_type type;
- bfd_vma addr;
+ PTR 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"));
@@ -1219,7 +1219,7 @@ debug_record_variable (handle, name, type, kind, val)
/*ARGSUSED*/
static struct debug_type *
debug_make_type (info, kind, size)
- struct debug_handle *info;
+ struct debug_handle *info ATTRIBUTE_UNUSED;
enum debug_type_kind kind;
unsigned int size;
{
@@ -1781,7 +1781,7 @@ debug_make_undefined_tagged_type (handle, name, kind)
/*ARGSUSED*/
debug_baseclass
debug_make_baseclass (handle, type, bitpos, virtual, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_type type;
bfd_vma bitpos;
boolean virtual;
@@ -1809,7 +1809,7 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
/*ARGSUSED*/
debug_field
debug_make_field (handle, name, type, bitpos, bitsize, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_type type;
bfd_vma bitpos;
@@ -1840,7 +1840,7 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
/*ARGSUSED*/
debug_field
debug_make_static_member (handle, name, type, physname, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_type type;
const char *physname;
@@ -1866,7 +1866,7 @@ debug_make_static_member (handle, name, type, physname, visibility)
/*ARGSUSED*/
debug_method
debug_make_method (handle, name, variants)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_method_variant *variants;
{
@@ -1894,7 +1894,7 @@ debug_make_method (handle, name, variants)
debug_method_variant
debug_make_method_variant (handle, physname, type, visibility, constp,
volatilep, voffset, context)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *physname;
debug_type type;
enum debug_visibility visibility;
@@ -1926,7 +1926,7 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
debug_method_variant
debug_make_static_method_variant (handle, physname, type, visibility,
constp, volatilep)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *physname;
debug_type type;
enum debug_visibility visibility;
@@ -2058,7 +2058,7 @@ debug_tag_type (handle, name, type)
/*ARGSUSED*/
boolean
debug_record_type_size (handle, type, size)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_type type;
unsigned int size;
{
@@ -2394,7 +2394,7 @@ debug_get_fields (handle, type)
/*ARGSUSED*/
debug_type
debug_get_field_type (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2407,7 +2407,7 @@ debug_get_field_type (handle, field)
/*ARGSUSED*/
const char *
debug_get_field_name (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2420,7 +2420,7 @@ debug_get_field_name (handle, field)
/*ARGSUSED*/
bfd_vma
debug_get_field_bitpos (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || field->static_member)
@@ -2433,7 +2433,7 @@ debug_get_field_bitpos (handle, field)
/*ARGSUSED*/
bfd_vma
debug_get_field_bitsize (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || field->static_member)
@@ -2446,7 +2446,7 @@ debug_get_field_bitsize (handle, field)
/*ARGSUSED*/
enum debug_visibility
debug_get_field_visibility (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2458,7 +2458,7 @@ debug_get_field_visibility (handle, field)
const char *
debug_get_field_physname (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || ! field->static_member)
@@ -2598,7 +2598,7 @@ debug_write_type (info, fns, fhandle, type, name)
{
unsigned int i;
int is;
- const char *tag;
+ const char *tag = NULL;
/* If we have a name for this type, just output it. We only output
typedef names after they have been defined. We output type tags
@@ -2648,7 +2648,6 @@ debug_write_type (info, fns, fhandle, type, name)
if (name != NULL)
name->mark = info->mark;
- tag = NULL;
if (name != NULL
&& type->kind != DEBUG_KIND_NAMED
&& type->kind != DEBUG_KIND_TAGGED)
diff --git a/binutils/deflex.l b/binutils/deflex.l
index e7fa362..15a43c0 100644
--- a/binutils/deflex.l
+++ b/binutils/deflex.l
@@ -1,6 +1,6 @@
%{/* deflex.l - Lexer for .def files */
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -50,11 +50,18 @@ int linenumber;
"WRITE" { return WRITE;}
"EXECUTE" { return EXECUTE;}
"SHARED" { return SHARED;}
+"NONSHARED" { return NONSHARED;}
+"SINGLE" { return SINGLE;}
+"MULTIPLE" { return MULTIPLE;}
+"INITINSTANCE" { return INITINSTANCE;}
+"INITGLOBAL" { return INITGLOBAL;}
+"TERMINSTANCE" { return TERMINSTANCE;}
+"TERMGLOBAL" { return TERMGLOBAL;}
[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;
}
diff --git a/binutils/defparse.y b/binutils/defparse.y
index 1cb6360..5718d46 100644
--- a/binutils/defparse.y
+++ b/binutils/defparse.y
@@ -1,6 +1,6 @@
%{ /* defparse.y - parser for .def files */
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -30,7 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATA
%token SECTIONS, EXPORTS, IMPORTS, VERSIONK, BASE, CONSTANT
-%token READ WRITE EXECUTE SHARED NONAME
+%token READ WRITE EXECUTE SHARED NONSHARED NONAME
+%token SINGLE MULTIPLE INITINSTANCE INITGLOBAL TERMINSTANCE TERMGLOBAL
%token <id> ID
%token <number> NUMBER
%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT opt_DATA
@@ -45,7 +46,7 @@ start: start command
command:
NAME opt_name opt_base { def_name ($2, $3); }
- | LIBRARY opt_name opt_base { def_library ($2, $3); }
+ | LIBRARY opt_name opt_base option_list { def_library ($2, $3); }
| EXPORTS explist
| DESCRIPTION ID { def_description ($2);}
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
@@ -61,7 +62,6 @@ command:
explist:
/* EMPTY */
- | expline
| explist expline
;
@@ -108,10 +108,13 @@ opt_number: ',' NUMBER { $$=$2;}
;
attr:
- READ { $$ = 1;}
- | WRITE { $$ = 2;}
- | EXECUTE { $$=4;}
- | SHARED { $$=8;}
+ READ { $$ = 1; }
+ | WRITE { $$ = 2; }
+ | EXECUTE { $$ = 4; }
+ | SHARED { $$ = 8; }
+ | NONSHARED { $$ = 0; }
+ | SINGLE { $$ = 0; }
+ | MULTIPLE { $$ = 0; }
;
opt_CONSTANT:
@@ -153,5 +156,14 @@ opt_base: BASE '=' NUMBER { $$= $3;}
| { $$=-1;}
;
-
+option_list:
+ /* empty */
+ | option_list opt_comma option
+ ;
+option:
+ INITINSTANCE
+ | INITGLOBAL
+ | TERMINSTANCE
+ | TERMGLOBAL
+ ;
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index ed5cf5e..6f8a26c 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -121,16 +121,16 @@
printf ("hello from the dll and the other entry point %s\n", s);
}
- printf()
+ int printf (void)
{
return 9;
}
- main.c
-
- void main()
+ themain.c:
+ int main (void)
{
- cdef();
+ cdef ();
+ return 0;
}
thedll.def
@@ -164,7 +164,7 @@
gcc -c themain.c
# link the executable with the import library
- ld -e main -Tthemain.ld -o themain.exe themain.o thedll.a
+ gcc -o themain.exe themain.o thedll.a
*/
@@ -221,11 +221,14 @@
#include "bucomm.h"
#include "getopt.h"
#include "demangle.h"
+#include "dyn-string.h"
#include "dlltool.h"
#include <ctype.h>
#include <time.h>
-#ifdef __STDC__
+#include <sys/stat.h>
+
+#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
@@ -236,6 +239,15 @@
#include "coff/internal.h"
#endif
+/* Forward references. */
+static char *look_for_prog PARAMS ((const char *, const char *, int));
+static char *deduce_name PARAMS ((const char *));
+
+#ifdef DLLTOOL_MCORE_ELF
+static void mcore_elf_cache_filename (char *);
+static void mcore_elf_gen_out_file (void);
+#endif
+
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#else /* ! HAVE_SYS_WAIT_H */
@@ -304,7 +316,7 @@ typedef struct iheadt
static iheadtype *import_list = NULL;
-static char *as_name = "as";
+static char *as_name = NULL;
static char * as_flags = "";
static int no_idata4;
@@ -319,10 +331,6 @@ static int add_indirect = 0;
static int add_underscore = 0;
static int dontdeltemps = 0;
-#ifdef DLLTOOL_ARM
-static int interwork = 0;
-#endif
-
/* 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;
@@ -345,10 +353,6 @@ static int verbose;
static FILE *output_def;
static FILE *base_file;
-#ifdef DLLTOOL_BEOS
-static const char *mname = "beos";
-#endif
-
#ifdef DLLTOOL_ARM
static const char *mname = "arm";
#endif
@@ -361,6 +365,23 @@ static const char *mname = "i386";
static const char *mname = "ppc";
#endif
+#ifdef DLLTOOL_MCORE
+static const char * mname = "mcore";
+#endif
+
+#ifdef DLLTOOL_MCORE_ELF
+static const char * mname = "mcore-elf";
+static char * mcore_elf_out_file = NULL;
+static char * mcore_elf_linker = NULL;
+static char * mcore_elf_linker_flags = NULL;
+
+#define DRECTVE_SECTION_NAME ((machine == MMCORE_ELF || machine == MMCORE_ELF_LE) ? ".exports" : ".drectve")
+#endif
+
+#ifndef DRECTVE_SECTION_NAME
+#define DRECTVE_SECTION_NAME ".drectve"
+#endif
+
#define PATHMAX 250 /* What's the right name for this ? */
#define TMP_ASM "dc.s"
@@ -370,8 +391,7 @@ static const char *mname = "ppc";
#define TMP_TAIL_O "dt.o"
#define TMP_STUB "ds"
-/* This bit of assemly does jmp * ....
-s set how_jtab_roff to mark where the 32bit abs branch should go */
+/* This bit of assemly does jmp * .... */
static const unsigned char i386_jtab[] =
{
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
@@ -379,22 +399,44 @@ static const unsigned char i386_jtab[] =
static const unsigned char arm_jtab[] =
{
- 0x00, 0xc0, 0x9f, 0xe5,
- 0x00, 0xf0, 0x9c, 0xe5,
+ 0x00, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
+ 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */
+ 0, 0, 0, 0
+};
+
+static const unsigned char arm_interwork_jtab[] =
+{
+ 0x04, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
+ 0x00, 0xc0, 0x9c, 0xe5, /* ldr ip, [ip] */
+ 0x1c, 0xff, 0x2f, 0xe1, /* bx ip */
0, 0, 0, 0
};
static const unsigned char thumb_jtab[] =
{
- 0xc0, 0xb4,
- 0x02, 0x4e,
- 0x36, 0x68,
- 0x01, 0x96,
- 0x40, 0xbd,
- 0xc0, 0x46,
+ 0x40, 0xb4, /* push {r6} */
+ 0x02, 0x4e, /* ldr r6, [pc, #8] */
+ 0x36, 0x68, /* ldr r6, [r6] */
+ 0xb4, 0x46, /* mov ip, r6 */
+ 0x40, 0xbc, /* pop {r6} */
+ 0x60, 0x47, /* bx ip */
0, 0, 0, 0
};
+static const unsigned char mcore_be_jtab[] =
+{
+ 0x70, 0x01, /* jmpi 1 */
+ 0x12, 0x11, /* nop */
+ 0x00, 0x00, 0x00, 0x00 /* <address> */
+};
+
+static const unsigned char mcore_le_jtab[] =
+{
+ 0x01, 0x70, /* jmpi 1 */
+ 0x11, 0x12, /* nop */
+ 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 */
@@ -417,12 +459,6 @@ static const unsigned char ppc_jtab[] =
static bfd_vma ppc_glue_insn = 0x80410004;
#endif
-/* The outfile array must be big enough to contain a fully
- qualified path name, plus an arbitary series of command
- line switches. We hope that PATH_MAX times two will be
- enough. */
-static char outfile [PATHMAX * 2];
-
struct mac
{
const char *type;
@@ -469,12 +505,52 @@ mtable[] =
{
#define MTHUMB 3
"thumb", ".byte", ".short", ".long", ".asciz", "@",
- "push\t{r6, r7}\n\tldr\tr6, [pc, #8]\n\tldr\tr6, [r6]\n\tstr\tr6, [sp, #4]\n\tpop\t{r6, pc}\n\tnop",
+ "push\t{r6}\n\tldr\tr6, [pc, #8]\n\tldr\tr6, [r6]\n\tmov\tip, r6\n\tpop\t{r6}\n\tbx\tip",
".global", ".space", ".align\t2",".align\t4","pe-arm-little", bfd_arch_arm,
thumb_jtab, sizeof (thumb_jtab), 12
}
,
-{ 0}
+#define MARM_INTERWORK 4
+ {
+ "arm_interwork", ".byte", ".short", ".long", ".asciz", "@",
+ "ldr\tip,[pc]\n\tldr\tip,[ip]\n\tbx\tip\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4","pe-arm-little", bfd_arch_arm,
+ arm_interwork_jtab, sizeof (arm_interwork_jtab), 12
+ }
+ ,
+ {
+#define MMCORE_BE 5
+ "mcore", ".byte", ".short", ".long", ".asciz", "//",
+ "jmpi\t1\n\tnop\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4","pe-mcore-big", bfd_arch_mcore,
+ mcore_be_jtab, sizeof (mcore_be_jtab), 8
+ }
+ ,
+ {
+#define MMCORE_LE 6
+ "mcore-le", ".byte", ".short", ".long", ".asciz", "//",
+ "jmpi\t1\n\tnop\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4","pe-mcore-little", bfd_arch_mcore,
+ mcore_le_jtab, sizeof (mcore_le_jtab), 8
+ }
+ ,
+ {
+#define MMCORE_ELF 7
+ "mcore-elf", ".byte", ".short", ".long", ".asciz", "//",
+ "jmpi\t1\n\tnop\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4","elf32-mcore-big", bfd_arch_mcore,
+ mcore_be_jtab, sizeof (mcore_be_jtab), 8
+ }
+ ,
+ {
+#define MMCORE_ELF_LE 8
+ "mcore-elf-le", ".byte", ".short", ".long", ".asciz", "//",
+ "jmpi\t1\n\tnop\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4","elf32-mcore-little", bfd_arch_mcore,
+ mcore_le_jtab, sizeof (mcore_le_jtab), 8
+ }
+ ,
+ { 0}
};
typedef struct dlist
@@ -621,6 +697,11 @@ rvaafter (machine)
case M386:
case MPPC:
case MTHUMB:
+ case MARM_INTERWORK:
+ case MMCORE_BE:
+ case MMCORE_LE:
+ case MMCORE_ELF:
+ case MMCORE_ELF_LE:
break;
default:
/* xgettext:c-format */
@@ -640,6 +721,11 @@ rvabefore (machine)
case M386:
case MPPC:
case MTHUMB:
+ case MARM_INTERWORK:
+ case MMCORE_BE:
+ case MMCORE_LE:
+ case MMCORE_ELF:
+ case MMCORE_ELF_LE:
return ".rva\t";
default:
/* xgettext:c-format */
@@ -658,6 +744,11 @@ asm_prefix (machine)
case MARM:
case MPPC:
case MTHUMB:
+ case MARM_INTERWORK:
+ case MMCORE_BE:
+ case MMCORE_LE:
+ case MMCORE_ELF:
+ case MMCORE_ELF_LE:
break;
case M386:
return "_";
@@ -681,12 +772,12 @@ asm_prefix (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 ASM_ALIGN_LONG mtable[machine].how_align_long
#define HOW_BFD_TARGET 0 /* always default*/
-#define HOW_BFD_ARCH mtable[machine].how_bfd_arch
-#define HOW_JTAB mtable[machine].how_jtab
-#define HOW_JTAB_SIZE mtable[machine].how_jtab_size
-#define HOW_JTAB_ROFF mtable[machine].how_jtab_roff
+#define HOW_BFD_ARCH mtable[machine].how_bfd_arch
+#define HOW_JTAB mtable[machine].how_jtab
+#define HOW_JTAB_SIZE mtable[machine].how_jtab_size
+#define HOW_JTAB_ROFF mtable[machine].how_jtab_roff
static char **oav;
void
@@ -1071,9 +1162,9 @@ scan_drectve_symbols (abfd)
char * buf;
char * p;
char * e;
-
+
/* Look for .drectve's */
- s = bfd_get_section_by_name (abfd, ".drectve");
+ s = bfd_get_section_by_name (abfd, DRECTVE_SECTION_NAME);
if (s == NULL)
return;
@@ -1084,8 +1175,8 @@ scan_drectve_symbols (abfd)
bfd_get_section_contents (abfd, s, buf, 0, size);
/* xgettext:c-format */
- inform (_("Sucking in info from .drective section in %s\n"),
- bfd_get_filename (abfd));
+ inform (_("Sucking in info from %s section in %s\n"),
+ DRECTVE_SECTION_NAME, bfd_get_filename (abfd));
/* Search for -export: strings */
p = buf;
@@ -1327,7 +1418,7 @@ scan_open_obj_file (abfd)
/* FIXME: we ought to read in and block out the base relocations */
/* xgettext:c-format */
- inform (_("%s: Done reading %s\n"), bfd_get_filename (abfd));
+ inform (_("Done reading %s\n"), bfd_get_filename (abfd));
}
static void
@@ -1353,10 +1444,20 @@ scan_obj_file (filename)
bfd_close (arfile);
arfile = bfd_openr_next_archived_file (f, arfile);
}
+
+#ifdef DLLTOOL_MCORE_ELF
+ if (mcore_elf_out_file)
+ inform (_("Cannot produce mcore-elf dll from archive file: %s"), filename);
+#endif
}
else if (bfd_check_format (f, bfd_object))
{
scan_open_obj_file (f);
+
+#ifdef DLLTOOL_MCORE_ELF
+ if (mcore_elf_out_file)
+ mcore_elf_cache_filename ((char *) filename);
+#endif
}
bfd_close (f);
@@ -1582,6 +1683,7 @@ gen_exp_file ()
int i;
export_type *exp;
dlist_type *dl;
+ char *cmd;
/* xgettext:c-format */
inform (_("Generating export file: %s\n"), exp_name);
@@ -1647,8 +1749,8 @@ gen_exp_file ()
}
}
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);
+ ASM_PREFIX,
+ exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
i++;
}
@@ -1678,12 +1780,13 @@ gen_exp_file ()
if (a_list)
{
- fprintf (f, "\t.section .drectve\n");
+ fprintf (f, "\t.section %s\n", DRECTVE_SECTION_NAME);
for (dl = a_list; dl; dl = dl->next)
{
fprintf (f, "\t%s\t\"%s\"\n", ASM_TEXT, dl->text);
}
}
+
if (d_list)
{
fprintf (f, "\t.section .rdata\n");
@@ -1765,8 +1868,6 @@ gen_exp_file ()
int src;
int dst = 0;
int last = -1;
- int totsize = 0;
-
qsort (copy, num_entries, sizeof (long), sfunc);
/* Delete duplcates */
for (src = 0; src < num_entries; src++)
@@ -1780,31 +1881,18 @@ gen_exp_file ()
on_page = 0;
for (j = 0; j < num_entries; j++)
{
- totsize += 2;
addr = copy[j];
if ((addr & PAGE_MASK) != page_addr)
{
- totsize += 8 + (on_page & 1)*2;
flush_page (f, need, page_addr, on_page);
on_page = 0;
page_addr = addr & PAGE_MASK;
}
need[on_page++] = addr;
}
-
- /* Pad the section to an even 32-byte boundary. This will make
- the BeOS loader much happier, and shouldn't matter for other
- OSes. */
- while ((totsize + 8 + (on_page & 1)*2) % 32 != 0)
- {
- /* 0x0000 is an absolute relocation that should be ignored. */
- need[on_page++] = 0x0000;
- totsize += 2;
- }
-
flush_page (f, need, page_addr, on_page);
- /* fprintf (f, "\t%s\t0,0\t%s End\n", ASM_LONG, ASM_C);*/
+/* fprintf (f, "\t%s\t0,0\t%s End\n", ASM_LONG, ASM_C);*/
}
}
@@ -1813,15 +1901,17 @@ gen_exp_file ()
fclose (f);
/* assemble the file */
- sprintf (outfile, "%s -o %s %s", as_flags, exp_name, TMP_ASM);
+ cmd = (char *) alloca (strlen (as_flags) + strlen (exp_name)
+ + sizeof TMP_ASM + 50);
+ sprintf (cmd, "%s -o %s %s", as_flags, exp_name, TMP_ASM);
#ifdef DLLTOOL_ARM
- if (interwork)
- strcat (outfile, " -mthumb-interwork");
+ if (machine == MARM_INTERWORK || machine == MTHUMB)
+ strcat (cmd, " -mthumb-interwork");
#endif
-
- run (as_name, outfile);
-
+
+ run (as_name, cmd);
+
if (dontdeltemps == 0)
unlink (TMP_ASM);
@@ -2001,10 +2091,14 @@ make_one_lib_file (exp, i)
{
#if 0
{
+ char *name;
FILE *f;
- char *prefix="d";
- sprintf (outfile, "%ss%05d.s", prefix, i);
- f = fopen (outfile, FOPEN_WT);
+ const char *prefix = "d";
+ char *cmd;
+
+ name = (char *) alloca (strlen (prefix) + 10);
+ sprintf (name, "%ss%05d.s", prefix, i);
+ f = fopen (name, FOPEN_WT);
fprintf (f, "\t.text\n");
fprintf (f, "\t%s\t%s%s\n", ASM_GLOBAL, ASM_PREFIX, exp->name);
fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
@@ -2039,15 +2133,16 @@ make_one_lib_file (exp, i)
fclose (f);
- sprintf (outfile, "%s -o %ss%05d.o %ss%d.s",
+ cmd = (char *) alloca (strlen (as_flags) + 2 * strlen (prefix) + 50);
+ sprintf (cmd, "%s -o %ss%05d.o %ss%d.s",
as_flags, prefix, i, prefix, i);
#ifdef DLLTOOL_ARM
- if (interwork)
- strcat (outfile, " -mthumb-interwork");
+ if (machine == MARM_INTERWORK || machine == MTHUMB)
+ strcat (cmd, " -mthumb-interwork");
#endif
- run (as_name, outfile);
+ run (as_name, cmd);
}
#else /* if 0 */
{
@@ -2087,7 +2182,7 @@ make_one_lib_file (exp, i)
bfd_set_arch_mach (abfd, HOW_BFD_ARCH, 0);
#ifdef DLLTOOL_ARM
- if (interwork)
+ if (machine == MARM_INTERWORK || machine == MTHUMB)
bfd_set_private_flags (abfd, F_INTERWORK);
#endif
@@ -2460,8 +2555,15 @@ make_one_lib_file (exp, i)
static bfd *
make_head ()
{
- FILE * f = fopen (TMP_HEAD_S, FOPEN_WT);
+ FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
+ char *cmd;
+ if (f == NULL)
+ {
+ fatal (_("failed to open temporary head file: %s"), TMP_HEAD_S);
+ return NULL;
+ }
+
fprintf (f, "%s IMAGE_IMPORT_DESCRIPTOR\n", ASM_C);
fprintf (f, "\t.section .idata$2\n");
@@ -2493,6 +2595,7 @@ make_head ()
fprintf (f, "\t%s\t0\n", ASM_LONG);
fprintf (f, "fthunk:\n");
}
+
if (!no_idata4)
{
fprintf (f, "\t.section\t.idata$4\n");
@@ -2501,30 +2604,41 @@ make_head ()
fprintf (f, "\t.section .idata$4\n");
fprintf (f, "hname:\n");
}
+
fclose (f);
- sprintf (outfile, "%s -o %s %s", as_flags, TMP_HEAD_O, TMP_HEAD_S);
+ cmd = (char *) alloca (strlen (as_flags) + sizeof TMP_HEAD_O
+ + sizeof TMP_HEAD_S + 50);
+ sprintf (cmd, "%s -o %s %s", as_flags, TMP_HEAD_O, TMP_HEAD_S);
#ifdef DLLTOOL_ARM
- if (interwork)
- strcat (outfile, " -mthumb-interwork");
+ if (machine == MARM_INTERWORK || machine == MTHUMB)
+ strcat (cmd, " -mthumb-interwork");
#endif
- run (as_name, outfile);
+ run (as_name, cmd);
- return bfd_openr (TMP_HEAD_O, HOW_BFD_TARGET);
+ return bfd_openr (TMP_HEAD_O, HOW_BFD_TARGET);
}
static bfd *
make_tail ()
{
- FILE * f = fopen (TMP_TAIL_S, FOPEN_WT);
+ FILE *f = fopen (TMP_TAIL_S, FOPEN_WT);
+ char *cmd;
+ if (f == NULL)
+ {
+ fatal (_("failed to open temporary tail file: %s"), TMP_TAIL_S);
+ return NULL;
+ }
+
if (!no_idata4)
{
fprintf (f, "\t.section .idata$4\n");
fprintf (f, "\t%s\t0\n", ASM_LONG);
}
+
if (!no_idata5)
{
fprintf (f, "\t.section .idata$5\n");
@@ -2562,14 +2676,16 @@ make_tail ()
fclose (f);
- sprintf (outfile, "%s -o %s %s", as_flags, TMP_TAIL_O, TMP_TAIL_S);
+ cmd = (char *) alloca (strlen (as_flags) + sizeof TMP_TAIL_O
+ + sizeof TMP_TAIL_S + 50);
+ sprintf (cmd, "%s -o %s %s", as_flags, TMP_TAIL_O, TMP_TAIL_S);
#ifdef DLLTOOL_ARM
- if (interwork)
- strcat (outfile, " -mthumb-interwork");
+ if (machine == MARM_INTERWORK || MTHUMB)
+ strcat (cmd, " -mthumb-interwork");
#endif
- run (as_name, outfile);
+ run (as_name, cmd);
return bfd_openr (TMP_TAIL_O, HOW_BFD_TARGET);
}
@@ -2644,12 +2760,15 @@ gen_lib_file ()
if (dontdeltemps < 2)
{
+ char *name;
+
+ name = (char *) alloca (sizeof TMP_STUB + 10);
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
{
- sprintf (outfile, "%s%05d.o", TMP_STUB, i);
- if (unlink (outfile) < 0)
+ sprintf (name, "%s%05d.o", TMP_STUB, i);
+ if (unlink (name) < 0)
/* xgettext:c-format */
- warn (_("cannot delete %s: %s\n"), outfile, strerror (errno));
+ warn (_("cannot delete %s: %s\n"), name, strerror (errno));
}
}
@@ -2938,17 +3057,18 @@ usage (file, status)
/* xgetext:c-format */
fprintf (file, _("Usage %s <options> <object-files>\n"), program_name);
/* xgetext:c-format */
- fprintf (file, _(" -m --machine <machine> Create {arm, i386, ppc, thumb} DLL. [default: %s]\n"), mname);
+ fprintf (file, _(" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"), mname);
+ fprintf (file, _(" possible <machine>: arm[_interwork], i386, mcore[-elf][-le], ppc, thumb\n"));
fprintf (file, _(" -e --output-exp <outname> Generate an export file.\n"));
fprintf (file, _(" -l --output-lib <outname> Generate an interface library.\n"));
fprintf (file, _(" -a --add-indirect Add dll indirects to export file.\n"));
fprintf (file, _(" -D --dllname <name> Name of input dll to put into interface lib.\n"));
fprintf (file, _(" -d --input-def <deffile> Name of .def file to be read in.\n"));
fprintf (file, _(" -z --output-def <deffile> Name of .def file to be created.\n"));
- fprintf (file, _(" --export-all-symbols Export all symbols to .def\n"));
- fprintf (file, _(" --no-export-all-symbols Only export listed symbols\n"));
- fprintf (file, _(" --exclude-symbols <list> Don't export <list>\n"));
- fprintf (file, _(" --no-default-excludes Clear default exclude symbols\n"));
+ fprintf (file, _(" --export-all-symbols Export all symbols to .def\n"));
+ fprintf (file, _(" --no-export-all-symbols Only export listed symbols\n"));
+ fprintf (file, _(" --exclude-symbols <list> Don't export <list>\n"));
+ fprintf (file, _(" --no-default-excludes Clear default exclude symbols\n"));
fprintf (file, _(" -b --base-file <basefile> Read linker generated base file.\n"));
fprintf (file, _(" -x --no-idata4 Don't generate idata$4 section.\n"));
fprintf (file, _(" -c --no-idata5 Don't generate idata$5 section.\n"));
@@ -2957,14 +3077,15 @@ usage (file, status)
fprintf (file, _(" -A --add-stdcall-alias Add aliases without @<n>.\n"));
fprintf (file, _(" -S --as <name> Use <name> for assembler.\n"));
fprintf (file, _(" -f --as-flags <flags> Pass <flags> to the assembler.\n"));
-#ifdef DLLTOOL_ARM
- fprintf (file, _(" -i --interwork Support ARM/Thumb interworking.\n"));
-#endif
fprintf (file, _(" -n --no-delete Keep temp files (repeat for extra preservation).\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"));
-
+#ifdef DLLTOOL_MCORE_ELF
+ fprintf (file, _(" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"));
+ fprintf (file, _(" -L --linker <name> Use <name> as the linker.\n"));
+ fprintf (file, _(" -F --linker-flags <flags> Pass <flags> to the linker.\n"));
+#endif
exit (status);
}
@@ -2972,15 +3093,13 @@ usage (file, status)
#define OPTION_NO_EXPORT_ALL_SYMS (OPTION_EXPORT_ALL_SYMS + 1)
#define OPTION_EXCLUDE_SYMS (OPTION_NO_EXPORT_ALL_SYMS + 1)
#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_EXCLUDE_SYMS + 1)
-#define OPTION_NO_IDATA4 'x'
-#define OPTION_NO_IDATA5 'c'
static const struct option long_options[] =
{
{"no-delete", no_argument, NULL, 'n'},
{"dllname", required_argument, NULL, 'D'},
- {"no-idata4", no_argument, NULL, OPTION_NO_IDATA4},
- {"no-idata5", no_argument, NULL, OPTION_NO_IDATA5},
+ {"no-idata4", no_argument, NULL, 'x'},
+ {"no-idata5", no_argument, NULL, 'c'},
{"output-exp", required_argument, NULL, 'e'},
{"output-def", required_argument, NULL, 'z'},
{"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL_SYMS},
@@ -3001,9 +3120,7 @@ static const struct option long_options[] =
{"base-file", required_argument, NULL, 'b'},
{"as", required_argument, NULL, 'S'},
{"as-flags", required_argument, NULL, 'f'},
-#ifdef DLLTOOL_ARM
- {"interwork", no_argument, NULL, 'i'},
-#endif
+ {"mcore-elf", required_argument, NULL, 'M'},
{0}
};
@@ -3024,18 +3141,17 @@ main (ac, av)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- while ((c = getopt_long (ac, av, "xcz:S:aD:l:e:nkAvVb:Uh?m:d:f:i",
+ while ((c = getopt_long (ac, av,
+#ifdef DLLTOOL_MCORE_ELF
+ "m:e:l:aD:d:z:b:xcuUkAS:f:nvVhM:L:F:",
+#else
+ "m:e:l:aD:d:z:b:xcuUkAS:f:nvVh",
+#endif
long_options, 0))
!= EOF)
{
switch (c)
{
- case OPTION_NO_IDATA4:
- no_idata4 = 1;
- break;
- case OPTION_NO_IDATA5:
- no_idata5 = 1;
- break;
case OPTION_EXPORT_ALL_SYMS:
export_all_symbols = true;
break;
@@ -3048,6 +3164,12 @@ main (ac, av)
case OPTION_NO_DEFAULT_EXCLUDES:
do_default_excludes = false;
break;
+ case 'x':
+ no_idata4 = 1;
+ break;
+ case 'c':
+ no_idata5 = 1;
+ break;
case 'S':
as_name = optarg;
break;
@@ -3085,18 +3207,6 @@ main (ac, av)
case 'V':
print_version (program_name);
break;
-#ifdef DLLTOOL_ARM
- case 'i':
- interwork = 1;
- break;
-#endif
- case 'y':
-#if 0
- /* We don't currently define YYDEBUG when building
- defparse.y. */
- yydebug = 1;
-#endif
- break;
case 'U':
add_underscore = 1;
break;
@@ -3120,6 +3230,17 @@ main (ac, av)
fatal (_("Unable to open base-file: %s"), optarg);
break;
+#ifdef DLLTOOL_MCORE_ELF
+ case 'M':
+ mcore_elf_out_file = optarg;
+ break;
+ case 'L':
+ mcore_elf_linker = optarg;
+ break;
+ case 'F':
+ mcore_elf_linker_flags = optarg;
+ break;
+#endif
default:
usage (stderr, 1);
break;
@@ -3127,10 +3248,8 @@ main (ac, av)
}
for (i = 0; mtable[i].type; i++)
- {
- if (strcmp (mtable[i].type, mname) == 0)
- break;
- }
+ if (strcmp (mtable[i].type, mname) == 0)
+ break;
if (!mtable[i].type)
/* xgettext:c-format */
@@ -3138,12 +3257,6 @@ main (ac, av)
machine = i;
-#ifdef DLLTOOL_ARM
- /* Always enable interworking for Thumb targets. */
- if (machine == MTHUMB && (! interwork))
- interwork = 1;
-#endif
-
if (!dll_name && exp_name)
{
int len = strlen (exp_name) + 5;
@@ -3152,6 +3265,9 @@ main (ac, av)
strcat (dll_name, ".dll");
}
+ if (as_name == NULL)
+ as_name = deduce_name ("as");
+
/* Don't use the default exclude list if we're reading only the
symbols in the .drectve section. The default excludes are meant
to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
@@ -3194,6 +3310,256 @@ main (ac, av)
if (output_def)
gen_def_file ();
-
+
+#ifdef DLLTOOL_MCORE_ELF
+ if (mcore_elf_out_file)
+ mcore_elf_gen_out_file ();
+#endif
+
return 0;
}
+
+/* Look for the program formed by concatenating PROG_NAME and the
+ string running from PREFIX to END_PREFIX. If the concatenated
+ string contains a '/', try appending EXECUTABLE_SUFFIX if it is
+ appropriate. */
+
+static char *
+look_for_prog (prog_name, prefix, end_prefix)
+ const char *prog_name;
+ const char *prefix;
+ int end_prefix;
+{
+ struct stat s;
+ char *cmd;
+
+ cmd = xmalloc (strlen (prefix)
+ + strlen (prog_name)
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ + strlen (EXECUTABLE_SUFFIX)
+#endif
+ + 10);
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s", prog_name);
+
+ if (strchr (cmd, '/') != NULL)
+ {
+ int found;
+
+ found = (stat (cmd, &s) == 0
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0
+#endif
+ );
+
+ if (! found)
+ {
+ /* xgettext:c-format */
+ inform (_("Tried file: %s"), cmd);
+ free (cmd);
+ return NULL;
+ }
+ }
+
+ /* xgettext:c-format */
+ inform (_("Using file: %s"), cmd);
+
+ return cmd;
+}
+
+/* Deduce the name of the program we are want to invoke.
+ PROG_NAME is the basic name of the program we want to run,
+ eg "as" or "ld". The catch is that we might want actually
+ run "i386-pe-as" or "ppc-pe-ld".
+
+ If argv[0] contains the full path, then try to find the program
+ in the same place, with and then without a target-like prefix.
+
+ Given, argv[0] = /usr/local/bin/i586-cygwin32-dlltool,
+ deduce_name("as") uses the following search order:
+
+ /usr/local/bin/i586-cygwin32-as
+ /usr/local/bin/as
+ as
+
+ If there's an EXECUTABLE_SUFFIX, it'll use that as well; for each
+ name, it'll try without and then with EXECUTABLE_SUFFIX.
+
+ Given, argv[0] = i586-cygwin32-dlltool, it will not even try "as"
+ as the fallback, but rather return i586-cygwin32-as.
+
+ Oh, and given, argv[0] = dlltool, it'll return "as".
+
+ Returns a dynamically allocated string. */
+
+static char *
+deduce_name (prog_name)
+ const char *prog_name;
+{
+ char *cmd;
+ char *dash, *slash, *cp;
+
+ dash = NULL;
+ slash = NULL;
+ for (cp = program_name; *cp != '\0'; ++cp)
+ {
+ if (*cp == '-')
+ dash = cp;
+ if (
+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
+ *cp == ':' || *cp == '\\' ||
+#endif
+ *cp == '/')
+ {
+ slash = cp;
+ dash = NULL;
+ }
+ }
+
+ cmd = NULL;
+
+ if (dash != NULL)
+ {
+ /* First, try looking for a prefixed PROG_NAME in the
+ PROGRAM_NAME directory, with the same prefix as PROGRAM_NAME. */
+ cmd = look_for_prog (prog_name, program_name, dash - program_name + 1);
+ }
+
+ if (slash != NULL && cmd == NULL)
+ {
+ /* Next, try looking for a PROG_NAME in the same directory as
+ that of this program. */
+ cmd = look_for_prog (prog_name, program_name, slash - program_name + 1);
+ }
+
+ if (cmd == NULL)
+ {
+ /* Just return PROG_NAME as is. */
+ cmd = xstrdup (prog_name);
+ }
+
+ return cmd;
+}
+
+#ifdef DLLTOOL_MCORE_ELF
+typedef struct fname_cache
+{
+ char * filename;
+ struct fname_cache * next;
+}
+fname_cache;
+
+static fname_cache fnames;
+
+static void
+mcore_elf_cache_filename (char * filename)
+{
+ fname_cache * ptr;
+
+ ptr = & fnames;
+
+ while (ptr->next != NULL)
+ ptr = ptr->next;
+
+ ptr->filename = filename;
+ ptr->next = (fname_cache *) malloc (sizeof (fname_cache));
+ if (ptr->next != NULL)
+ ptr->next->next = NULL;
+}
+
+#define MCORE_ELF_TMP_OBJ "mcoreelf.o"
+#define MCORE_ELF_TMP_EXP "mcoreelf.exp"
+#define MCORE_ELF_TMP_LIB "mcoreelf.lib"
+
+static void
+mcore_elf_gen_out_file (void)
+{
+ fname_cache * ptr;
+ dyn_string_t ds;
+
+ /* Step one. Run 'ld -r' on the input object files in order to resolve
+ any internal references and to generate a single .exports section. */
+ ptr = & fnames;
+
+ ds = dyn_string_new (100);
+ dyn_string_append (ds, "-r ");
+
+ if (mcore_elf_linker_flags != NULL)
+ dyn_string_append (ds, mcore_elf_linker_flags);
+
+ while (ptr->next != NULL)
+ {
+ dyn_string_append (ds, ptr->filename);
+ dyn_string_append (ds, " ");
+
+ ptr = ptr->next;
+ }
+
+ dyn_string_append (ds, "-o ");
+ dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
+
+ if (mcore_elf_linker == NULL)
+ mcore_elf_linker = deduce_name ("ld");
+
+ run (mcore_elf_linker, ds->s);
+
+ dyn_string_delete (ds);
+
+ /* Step two. Create a .exp file and a .lib file from the temporary file.
+ 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 (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);
+
+ if (verbose)
+ dyn_string_append (ds, " -v");
+
+ if (dontdeltemps)
+ {
+ dyn_string_append (ds, " -n");
+
+ if (dontdeltemps > 1)
+ dyn_string_append (ds, " -n");
+ }
+
+ /* XXX - FIME: ought to check/copy other command line options as well. */
+
+ run (program_name, ds->s);
+
+ dyn_string_delete (ds);
+
+ /* 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 ");
+
+ 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);
+
+ run (mcore_elf_linker, ds->s);
+
+ dyn_string_delete (ds);
+
+ if (dontdeltemps == 0)
+ unlink (MCORE_ELF_TMP_EXP);
+
+ if (dontdeltemps < 2)
+ unlink (MCORE_ELF_TMP_OBJ);
+}
+#endif /* DLLTOOL_MCORE_ELF */
diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c
index 574611b..84606fb 100644
--- a/binutils/dllwrap.c
+++ b/binutils/dllwrap.c
@@ -26,21 +26,10 @@
#endif
#endif
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include "bfd.h"
#include "libiberty.h"
#include "bucomm.h"
@@ -49,6 +38,13 @@
#include <ctype.h>
#include <time.h>
+#include <sys/stat.h>
+
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -83,7 +79,7 @@
#endif /* ! HAVE_SYS_WAIT_H */
static char *program_version = "0.2.4";
-static char *driver_name = "gcc";
+static char *driver_name = NULL;
static char *cygwin_driver_flags =
"-Wl,--dll -nostartfiles";
static char *mingw32_driver_flags = "-mdll";
@@ -91,7 +87,7 @@ static char *generic_driver_flags = "-Wl,--dll";
static char *entry_point;
-static char *dlltool_name = "dlltool";
+static char *dlltool_name = NULL;
static char *target = TARGET;
@@ -122,11 +118,186 @@ static int delete_def_file = 1;
static int run PARAMS ((const char *, char *));
static void usage PARAMS ((FILE *, int));
+static void display PARAMS ((const char *, va_list));
+static void inform 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 status));
/**********************************************************************/
+/* Please keep the following 4 routines in sync with dlltool.c:
+ display ()
+ inform ()
+ look_for_prog ()
+ deduce_name ()
+ It's not worth the hassle to break these out since dllwrap will
+ (hopefully) soon be retired in favor of `ld --shared. */
+
+static void
+display (message, args)
+ const char * message;
+ va_list args;
+{
+ if (program_name != NULL)
+ fprintf (stderr, "%s: ", program_name);
+
+ vfprintf (stderr, message, args);
+
+ if (message [strlen (message) - 1] != '\n')
+ fputc ('\n', stderr);
+}
+
+
+static void
+#ifdef __STDC__
+inform (const char * message, ...)
+#else
+inform (message, va_alist)
+ const char * message;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ if (!verbose)
+ return;
+
+#ifdef __STDC__
+ va_start (args, message);
+#else
+ va_start (args);
+#endif
+
+ display (message, args);
+
+ va_end (args);
+}
+
+/* Look for the program formed by concatenating PROG_NAME and the
+ string running from PREFIX to END_PREFIX. If the concatenated
+ string contains a '/', try appending EXECUTABLE_SUFFIX if it is
+ appropriate. */
+
+static char *
+look_for_prog (prog_name, prefix, end_prefix)
+ const char *prog_name;
+ const char *prefix;
+ int end_prefix;
+{
+ struct stat s;
+ char *cmd;
+
+ cmd = xmalloc (strlen (prefix)
+ + strlen (prog_name)
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ + strlen (EXECUTABLE_SUFFIX)
+#endif
+ + 10);
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s", prog_name);
+
+ if (strchr (cmd, '/') != NULL)
+ {
+ int found;
+
+ found = (stat (cmd, &s) == 0
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0
+#endif
+ );
+
+ if (! found)
+ {
+ /* xgettext:c-format */
+ inform (_("Tried file: %s"), cmd);
+ free (cmd);
+ return NULL;
+ }
+ }
+
+ /* xgettext:c-format */
+ inform (_("Using file: %s"), cmd);
+
+ return cmd;
+}
+
+/* Deduce the name of the program we are want to invoke.
+ PROG_NAME is the basic name of the program we want to run,
+ eg "as" or "ld". The catch is that we might want actually
+ run "i386-pe-as" or "ppc-pe-ld".
+
+ If argv[0] contains the full path, then try to find the program
+ in the same place, with and then without a target-like prefix.
+
+ Given, argv[0] = /usr/local/bin/i586-cygwin32-dlltool,
+ deduce_name("as") uses the following search order:
+
+ /usr/local/bin/i586-cygwin32-as
+ /usr/local/bin/as
+ as
+
+ If there's an EXECUTABLE_SUFFIX, it'll use that as well; for each
+ name, it'll try without and then with EXECUTABLE_SUFFIX.
+
+ Given, argv[0] = i586-cygwin32-dlltool, it will not even try "as"
+ as the fallback, but rather return i586-cygwin32-as.
+
+ Oh, and given, argv[0] = dlltool, it'll return "as".
+
+ Returns a dynamically allocated string. */
+
+static char *
+deduce_name (prog_name)
+ const char *prog_name;
+{
+ char *cmd;
+ char *dash, *slash, *cp;
+
+ dash = NULL;
+ slash = NULL;
+ for (cp = program_name; *cp != '\0'; ++cp)
+ {
+ if (*cp == '-')
+ dash = cp;
+ if (
+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
+ *cp == ':' || *cp == '\\' ||
+#endif
+ *cp == '/')
+ {
+ slash = cp;
+ dash = NULL;
+ }
+ }
+
+ cmd = NULL;
+
+ if (dash != NULL)
+ {
+ /* First, try looking for a prefixed PROG_NAME in the
+ PROGRAM_NAME directory, with the same prefix as PROGRAM_NAME. */
+ cmd = look_for_prog (prog_name, program_name, dash - program_name + 1);
+ }
+
+ if (slash != NULL && cmd == NULL)
+ {
+ /* Next, try looking for a PROG_NAME in the same directory as
+ that of this program. */
+ cmd = look_for_prog (prog_name, program_name, slash - program_name + 1);
+ }
+
+ if (cmd == NULL)
+ {
+ /* Just return PROG_NAME as is. */
+ cmd = xstrdup (prog_name);
+ }
+
+ return cmd;
+}
+
static void
delete_temp_files ()
{
@@ -341,6 +512,7 @@ usage (file, status)
fprintf (file, " --image-base <base> Specify image base address\n");
fprintf (file, " --target <machine> i386-cygwin32 or i386-mingw32\n");
fprintf (file, " --dry-run Show what needs to be run\n");
+ fprintf (file, " --mno-cygwin Create Mingw DLL\n");
fprintf (file, " Options passed to DLLTOOL:\n");
fprintf (file, " --machine <machine>\n");
fprintf (file, " --output-exp <outname> Generate export file.\n");
@@ -381,9 +553,10 @@ usage (file, status)
#define OPTION_ENTRY (OPTION_DLLTOOL_NAME + 1)
#define OPTION_IMAGE_BASE (OPTION_ENTRY + 1)
#define OPTION_TARGET (OPTION_IMAGE_BASE + 1)
+#define OPTION_MNO_CYGWIN (OPTION_TARGET + 1)
/* DLLTOOL options. */
-#define OPTION_NODELETE (OPTION_TARGET + 1)
+#define OPTION_NODELETE (OPTION_MNO_CYGWIN + 1)
#define OPTION_DLLNAME (OPTION_NODELETE + 1)
#define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1)
#define OPTION_NO_IDATA5 (OPTION_NO_IDATA4 + 1)
@@ -568,6 +741,9 @@ main (argc, argv)
case OPTION_TARGET:
target = optarg;
break;
+ case OPTION_MNO_CYGWIN:
+ target = "i386-mingw32";
+ break;
case OPTION_BASE_FILE:
base_file_name = optarg;
delete_base_file = 0;
@@ -614,7 +790,7 @@ main (argc, argv)
}
}
}
-
+
/* sanity checks. */
if (! dll_name && ! dll_file_name)
{
@@ -631,7 +807,14 @@ main (argc, argv)
{
dll_file_name = xstrdup (dll_name);
}
-
+
+ /* Deduce driver-name and dlltool-name from our own. */
+ if (driver_name == NULL)
+ driver_name = deduce_name ("gcc");
+
+ if (dlltool_name == NULL)
+ dlltool_name = deduce_name ("dlltool");
+
if (! def_file_seen)
{
char *fileprefix = choose_temp_base ();
diff --git a/binutils/filemode.c b/binutils/filemode.c
index 58b52ba..f9811bc 100644
--- a/binutils/filemode.c
+++ b/binutils/filemode.c
@@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 90, 91, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1985, 90, 91, 94, 95, 97, 1999 Free Software Foundation, Inc.
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
@@ -230,8 +230,8 @@ ftypelet (bits)
static void
setst (bits, chars)
- unsigned long bits;
- char *chars;
+ unsigned long bits ATTRIBUTE_UNUSED;
+ char *chars ATTRIBUTE_UNUSED;
{
#ifdef S_ISUID
if (bits & S_ISUID)
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 17a5b88..c036928 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -4104,7 +4104,7 @@ static const struct debug_write_fns ieee_fns =
/*ARGSUSED*/
static boolean
ieee_init_buffer (info, buflist)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *buflist;
{
buflist->head = NULL;
@@ -4145,7 +4145,7 @@ ieee_change_buffer (info, buflist)
/*ARGSUSED*/
static boolean
ieee_append_buffer (info, mainbuf, newbuf)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *mainbuf;
struct ieee_buflist *newbuf;
{
@@ -5135,7 +5135,7 @@ ieee_finish_compilation_unit (info)
static void
ieee_add_bb11_blocks (abfd, sec, data)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
PTR data;
{
@@ -5258,8 +5258,8 @@ ieee_add_bb11 (info, sec, low, high)
/*ARGSUSED*/
static boolean
ieee_start_source (p, filename)
- PTR p;
- const char *filename;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *filename ATTRIBUTE_UNUSED;
{
return true;
}
@@ -5725,7 +5725,7 @@ ieee_array_type (p, low, high, stringp)
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
- boolean stringp;
+ boolean stringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
@@ -5792,7 +5792,7 @@ ieee_array_type (p, low, high, stringp)
static boolean
ieee_set_type (p, bitstringp)
PTR p;
- boolean bitstringp;
+ boolean bitstringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
boolean localp;
@@ -7012,7 +7012,7 @@ ieee_typdef (p, name)
static boolean
ieee_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7026,9 +7026,9 @@ ieee_tag (p, name)
static boolean
ieee_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
@@ -7038,9 +7038,9 @@ ieee_int_constant (p, name, val)
static boolean
ieee_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ double val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
@@ -7051,8 +7051,8 @@ ieee_float_constant (p, name, val)
static boolean
ieee_typed_constant (p, name, val)
PTR p;
- const char *name;
- bfd_vma val;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
diff --git a/binutils/nm.c b/binutils/nm.c
index c51b7fb..884f0b8 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -1305,13 +1305,13 @@ print_archive_filename_bsd (filename)
static void
print_archive_filename_sysv (filename)
- char *filename;
+ char *filename ATTRIBUTE_UNUSED;
{
}
static void
print_archive_filename_posix (filename)
- char *filename;
+ char *filename ATTRIBUTE_UNUSED;
{
}
@@ -1319,7 +1319,7 @@ print_archive_filename_posix (filename)
static void
print_archive_member_bsd (archive, filename)
- char *archive;
+ char *archive ATTRIBUTE_UNUSED;
CONST char *filename;
{
if (!filename_per_symbol)
diff --git a/binutils/objcopy.1 b/binutils/objcopy.1
index aee7760..68b98d3 100644
--- a/binutils/objcopy.1
+++ b/binutils/objcopy.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation
+.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH objcopy 1 "October 1994" "cygnus support" "GNU Development Tools"
.de BP
@@ -18,6 +18,7 @@ objcopy \- copy and translate object files
.RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]"
.RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]"
.RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]"
+.RB "[\|" \-j\ \fIsectionname\fR\ |\ \fB\-\-only\-section=\fIsectionname\fR "\|]"
.RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]"
.RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]"
.RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]"
@@ -123,6 +124,12 @@ Use
as the object format for both the input and the output file; i.e.
simply transfer data from source to destination with no translation.
.TP
+.B \-j \fIsectionname\fR, \fB\-\-only\-section=\fIsectionname
+Copy only the named section from the input file to the output file,
+discarding all other sections. This option may be given more than
+once. Note that using this option inappropriately may make the output
+file unusable.
+.TP
.B \-R \fIsectionname\fR, \fB\-\-remove-section=\fIsectionname
Remove the named section from the file. This option may be given more
than once. Note that using this option inappropriately may make the
@@ -301,7 +308,7 @@ The GNU Binary Utilities\c
\&, Roland H. Pesch (June 1993).
.SH COPYING
-Copyright (c) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright (c) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 5fd7777..6137f11 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -111,6 +111,7 @@ struct section_list
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. */
@@ -121,6 +122,7 @@ struct section_list
static struct section_list *change_sections;
static boolean sections_removed;
+static boolean sections_copied;
/* Changes to the start address. */
static bfd_vma change_start = 0;
@@ -246,6 +248,7 @@ 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'},
@@ -292,10 +295,12 @@ copy_usage (stream, exit_status)
{
fprintf (stream, _("\
Usage: %s [-vVSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-b byte]\n\
- [-R section] [-i interleave] [--interleave=interleave] [--byte=byte]\n\
+ [-j section] [-R section]\n\
+ [-i interleave] [--interleave=interleave] [--byte=byte]\n\
[--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\
[--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\
- [--discard-locals] [--debugging] [--remove-section=section]\n"),
+ [--discard-locals] [--debugging]\n\
+ [--only-section=section] [--remove-section=section]\n"),
program_name);
fprintf (stream, _("\
[--gap-fill=val] [--pad-to=address] [--preserve-dates]\n\
@@ -411,6 +416,7 @@ find_section_list (name, add)
p->name = name;
p->used = false;
p->remove = false;
+ p->copy = false;
p->change_vma = CHANGE_IGNORE;
p->change_lma = CHANGE_IGNORE;
p->vma_val = 0;
@@ -461,7 +467,7 @@ is_specified_symbol (name, list)
static boolean
is_strip_section (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
struct section_list *p;
@@ -474,10 +480,15 @@ is_strip_section (abfd, sec)
|| convert_debugging))
return true;
- if (! sections_removed)
+ if (! sections_removed && ! sections_copied)
return false;
+
p = find_section_list (bfd_get_section_name (abfd, sec), false);
- return p != NULL && p->remove ? true : false;
+ if (sections_removed && p != NULL && p->remove)
+ return true;
+ if (sections_copied && (p == NULL || ! p->copy))
+ return true;
+ return false;
}
/* Choose which symbol entries to copy; put the result in OSYMS.
@@ -594,7 +605,7 @@ filter_bytes (memhunk, size)
for (; from < end; from += interleave)
*to++ = *from;
- if (*size % interleave > copy_byte)
+ if (*size % interleave > (bfd_size_type) copy_byte)
*size = (*size / interleave) + 1;
else
*size /= interleave;
@@ -816,6 +827,7 @@ copy_object (ibfd, obfd)
|| localize_specific_list != NULL
|| weaken_specific_list != NULL
|| sections_removed
+ || sections_copied
|| convert_debugging
|| change_leading_char
|| remove_leading_char
@@ -962,6 +974,16 @@ copy_archive (ibfd, obfd, output_target)
(char *) NULL);
bfd *output_bfd = bfd_openw (output_name, output_target);
bfd *last_element;
+ struct stat buf;
+ int stat_status = 0;
+
+ if (preserve_dates)
+ {
+ stat_status = bfd_stat_arch_elt (this_element, &buf);
+ if (stat_status != 0)
+ non_fatal (_("internal stat error on %s"),
+ bfd_get_filename (this_element));
+ }
l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
@@ -984,6 +1006,9 @@ copy_archive (ibfd, obfd, output_target)
status = 1;
}
+ 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);
@@ -1114,7 +1139,9 @@ setup_section (ibfd, isection, obfdarg)
if (p != NULL)
p->used = true;
- if (p != NULL && p->remove)
+ if (sections_removed && p != NULL && p->remove)
+ return;
+ if (sections_copied && (p == NULL || ! p->copy))
return;
osection = bfd_make_section_anyway (obfd, bfd_section_name (ibfd, isection));
@@ -1243,7 +1270,9 @@ copy_section (ibfd, isection, obfdarg)
p = find_section_list (bfd_section_name (ibfd, isection), false);
- if (p != NULL && p->remove)
+ if (sections_removed && p != NULL && p->remove)
+ return;
+ if (sections_copied && (p == NULL || ! p->copy))
return;
osection = isection->output_section;
@@ -1331,7 +1360,7 @@ copy_section (ibfd, isection, obfdarg)
static void
get_sections (obfd, osection, secppparg)
- bfd *obfd;
+ bfd *obfd ATTRIBUTE_UNUSED;
asection *osection;
PTR secppparg;
{
@@ -1438,8 +1467,8 @@ static boolean
write_debugging_info (obfd, dhandle, symcountp, symppp)
bfd *obfd;
PTR dhandle;
- long *symcountp;
- asymbol ***symppp;
+ long *symcountp ATTRIBUTE_UNUSED;
+ asymbol ***symppp ATTRIBUTE_UNUSED;
{
if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour)
return write_ieee_debugging_info (obfd, dhandle);
@@ -1644,7 +1673,7 @@ copy_main (argc, argv)
struct section_list *p;
struct stat statbuf;
- while ((c = getopt_long (argc, argv, "b:i:I:K:N:s:O:d:F:L:R:SpgxXVvW:",
+ while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:R:SpgxXVvW:",
copy_options, (int *) 0)) != EOF)
{
switch (c)
@@ -1670,8 +1699,17 @@ copy_main (argc, argv)
case 'F':
input_target = output_target = optarg;
break;
+ case 'j':
+ p = find_section_list (optarg, true);
+ if (p->remove)
+ fatal (_("%s both copied and removed"), optarg);
+ p->copy = true;
+ sections_copied = true;
+ break;
case 'R':
p = find_section_list (optarg, true);
+ if (p->copy)
+ fatal (_("%s both copied and removed"), optarg);
p->remove = true;
sections_removed = true;
break;
@@ -1769,15 +1807,21 @@ copy_main (argc, argv)
const char *s;
int len;
char *name;
- char *option;
+ char *option = NULL;
bfd_vma val;
- enum change_action what;
+ enum change_action what = CHANGE_IGNORE;
switch (c)
{
- case OPTION_CHANGE_SECTION_ADDRESS: option = "--change-section-address"; break;
- case OPTION_CHANGE_SECTION_LMA: option = "--change-section-lma"; break;
- case OPTION_CHANGE_SECTION_VMA: option = "--change-section-vma"; break;
+ case OPTION_CHANGE_SECTION_ADDRESS:
+ option = "--change-section-address";
+ break;
+ case OPTION_CHANGE_SECTION_LMA:
+ option = "--change-section-lma";
+ break;
+ case OPTION_CHANGE_SECTION_VMA:
+ option = "--change-section-vma";
+ break;
}
s = strchr (optarg, '=');
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 3f9e8c4..4cff97b 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -83,6 +83,9 @@ struct objdump_disasm_info {
/* Architecture to disassemble for, or default if NULL. */
static char *machine = (char *) NULL;
+/* Target specific options to the disassembler. */
+static char *disassembler_options = (char *) NULL;
+
/* Endianness to disassemble for, or default if BFD_ENDIAN_UNKNOWN. */
static enum bfd_endian endian = BFD_ENDIAN_UNKNOWN;
@@ -217,7 +220,8 @@ usage (stream, status)
int status;
{
fprintf (stream, _("\
-Usage: %s [-ahifCdDprRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\
+Usage: %s [-ahifCdDprRtTxsSlw] [-b bfdname] [-m machine] \n\
+ [-j section-name] [-M disassembler-options]\n\
[--archive-headers] [--target=bfdname] [--debugging] [--disassemble]\n\
[--disassemble-all] [--disassemble-zeroes] [--file-headers]\n\
[--section-headers] [--headers]\n\
@@ -255,6 +259,7 @@ static struct option long_options[]=
{"demangle", no_argument, &do_demangle, 1},
{"disassemble", no_argument, NULL, 'd'},
{"disassemble-all", no_argument, NULL, 'D'},
+ {"disassembler-options", required_argument, NULL, 'M'},
{"disassemble-zeroes", no_argument, &disassemble_zeroes, 1},
{"dynamic-reloc", no_argument, NULL, 'R'},
{"dynamic-syms", no_argument, NULL, 'T'},
@@ -284,9 +289,9 @@ static struct option long_options[]=
static void
dump_section_header (abfd, section, ignored)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *section;
- PTR ignored;
+ PTR ignored ATTRIBUTE_UNUSED;
{
char *comma = "";
@@ -324,6 +329,7 @@ dump_section_header (abfd, section, ignored)
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
PF (SEC_EXCLUDE, "EXCLUDE");
PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
+ PF (SEC_SHORT, "SHORT");
if ((section->flags & SEC_LINK_ONCE) != 0)
{
@@ -1134,7 +1140,7 @@ objdump_sprintf (va_alist)
n = strlen (buf);
- while ((f->buffer + f->size) - f->current < n + 1)
+ while ((size_t) ((f->buffer + f->size) - f->current) < n + 1)
{
size_t curroff;
@@ -1305,11 +1311,16 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
if (info->bytes_per_line != 0)
bytes_per_line = info->bytes_per_line;
if (bytes < 0)
- break;
+ {
+ if (sfile.current != sfile.buffer)
+ printf ("%s\n", sfile.buffer);
+ free (sfile.buffer);
+ break;
+ }
}
else
{
- long j;
+ bfd_vma j;
bytes = bytes_per_line;
if (i + bytes > stop)
@@ -1329,7 +1340,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
? show_raw_insn > 0
: show_raw_insn >= 0)
{
- long j;
+ bfd_vma j;
/* If ! prefix_addresses and ! wide_output, we print
bytes_per_line bytes per line. */
@@ -1389,7 +1400,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
{
while (pb < bytes)
{
- long j;
+ bfd_vma j;
char *s;
putchar ('\n');
@@ -1559,10 +1570,12 @@ disassemble_data (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;
+
if (bfd_big_endian (abfd))
- disasm_info.endian = BFD_ENDIAN_BIG;
+ disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG;
else if (bfd_little_endian (abfd))
- disasm_info.endian = BFD_ENDIAN_LITTLE;
+ disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_LITTLE;
else
/* ??? Aborting here seems too drastic. We could default to big or little
instead. */
@@ -1859,7 +1872,7 @@ static void
print_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd;
const char *stabsect_name;
- const char *strsect_name;
+ const char *strsect_name ATTRIBUTE_UNUSED;
{
int i;
unsigned file_string_table_offset = 0, next_file_string_table_offset = 0;
@@ -2215,7 +2228,7 @@ dump_data (abfd)
/* Should perhaps share code and display with nm? */
static void
dump_symbols (abfd, dynamic)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
boolean dynamic;
{
asymbol **current;
@@ -2468,7 +2481,10 @@ dump_reloc_set (abfd, sec, relpp, relcount)
if (sym_name)
{
printf_vma (q->address);
- printf (" %-16s ", q->howto->name);
+ if (q->howto->name)
+ printf (" %-16s ", q->howto->name);
+ else
+ printf (" %-16d ", q->howto->type);
objdump_print_symname (abfd, (struct disassemble_info *) NULL,
*q->sym_ptr_ptr);
}
@@ -2686,7 +2702,7 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "pib:m:VCdDlfahrRtTxsSj:wE:",
+ while ((c = getopt_long (argc, argv, "pib:m:M:VCdDlfahrRtTxsSj:wE:",
long_options, (int *) 0))
!= EOF)
{
@@ -2699,6 +2715,9 @@ main (argc, argv)
case 'm':
machine = optarg;
break;
+ case 'M':
+ disassembler_options = optarg;
+ break;
case 'j':
only = optarg;
break;
diff --git a/binutils/po/POTFILES.in b/binutils/po/POTFILES.in
index 47f3860..a3a0586 100644
--- a/binutils/po/POTFILES.in
+++ b/binutils/po/POTFILES.in
@@ -1,4 +1,3 @@
-readelf.c
addr2line.c
ar.c
arsup.c
@@ -10,6 +9,7 @@ coffdump.c
coffgrok.c
coffgrok.h
debug.c
+debug.c
debug.h
dlltool.c
dlltool.h
@@ -18,6 +18,7 @@ dyn-string.c
dyn-string.h
filemode.c
ieee.c
+ieee.c
is-ranlib.c
is-strip.c
maybe-ranlib.c
@@ -31,7 +32,10 @@ objcopy.c
objdump.c
prdbg.c
rdcoff.c
+rdcoff.c
rddbg.c
+rddbg.c
+readelf.c
rename.c
resbin.c
rescoff.c
@@ -40,6 +44,7 @@ resres.c
size.c
srconv.c
stabs.c
+stabs.c
strings.c
sysdump.c
version.c
@@ -48,5 +53,3 @@ windres.h
winduni.c
winduni.h
wrstabs.c
-testsuite/binutils-all/readelf.h
-testsuite/binutils-all/testprog.c
diff --git a/binutils/po/binutils.pot b/binutils/po/binutils.pot
index beeb383..97795cb 100644
--- a/binutils/po/binutils.pot
+++ b/binutils/po/binutils.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-04-26 10:11-0600\n"
+"POT-Creation-Date: 1999-06-03 02:58-0700\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"
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
#: addr2line.c:83 ar.c:255 nlmconv.c:1141 nm.c:304 objcopy.c:318 objcopy.c:337
-#: objdump.c:236 readelf.c:1133 size.c:89 strings.c:512 windres.c:723
+#: objdump.c:236 readelf.c:1168 size.c:89 strings.c:512 windres.c:730
msgid "Report bugs to bug-gnu-utils@gnu.org\n"
msgstr ""
@@ -158,7 +158,7 @@ msgstr ""
msgid "%s: internal error -- this option not implemented\n"
msgstr ""
-#: ar.c:730 ar.c:782 ar.c:1212
+#: ar.c:730 ar.c:782 ar.c:1212 objcopy.c:972
#, c-format
msgid "internal stat error on %s"
msgstr ""
@@ -402,290 +402,323 @@ msgstr ""
msgid "debug_write_type: illegal type encountered"
msgstr ""
-#: dlltool.c:627 dlltool.c:646 dlltool.c:666
+#: dlltool.c:711 dlltool.c:735 dlltool.c:760
#, c-format
msgid "Internal error: Unknown machine type: %d\n"
msgstr ""
-#: dlltool.c:700
+#: dlltool.c:794
#, c-format
msgid "Can't open def file: %s"
msgstr ""
-#: dlltool.c:705
+#: dlltool.c:799
#, c-format
msgid "Processing def file: %s"
msgstr ""
-#: dlltool.c:709
+#: dlltool.c:803
msgid "Processed def file"
msgstr ""
-#: dlltool.c:734
+#: dlltool.c:828
#, c-format
msgid "Syntax error in def file %s:%d\n"
msgstr ""
-#: dlltool.c:767
+#: dlltool.c:861
#, c-format
msgid "NAME: %s base: %x"
msgstr ""
-#: dlltool.c:770
+#: dlltool.c:864
msgid "Can't have LIBRARY and NAME\n"
msgstr ""
-#: dlltool.c:786
+#: dlltool.c:880
#, c-format
msgid "LIBRARY: %s base: %x"
msgstr ""
-#: dlltool.c:789
+#: dlltool.c:883
#, c-format
msgid "%s: Can't have LIBRARY and NAME\n"
msgstr ""
-#: dlltool.c:1044
+#: dlltool.c:1138
#, c-format
msgid "wait: %s"
msgstr ""
-#: dlltool.c:1049
+#: dlltool.c:1143
#, c-format
msgid "subprocess got fatal signal %d"
msgstr ""
-#: dlltool.c:1055
+#: dlltool.c:1149
#, c-format
msgid "%s exited with status %d\n"
msgstr ""
-#: dlltool.c:1087
+#: dlltool.c:1181
#, c-format
-msgid "Sucking in info from .drective section in %s\n"
+msgid "Sucking in info from %s section in %s\n"
msgstr ""
-#: dlltool.c:1197
+#: dlltool.c:1291
#, c-format
msgid "Excluding symbol: %s\n"
msgstr ""
-#: dlltool.c:1292 dlltool.c:1303 nm.c:902 nm.c:913 objdump.c:379 objdump.c:396
+#: dlltool.c:1386 dlltool.c:1397 nm.c:902 nm.c:913 objdump.c:379 objdump.c:396
#, c-format
msgid "%s: no symbols\n"
msgstr ""
#. FIXME: we ought to read in and block out the base relocations
-#: dlltool.c:1330
+#: dlltool.c:1424
#, c-format
-msgid "%s: Done reading %s\n"
+msgid "Done reading %s\n"
msgstr ""
-#: dlltool.c:1341
+#: dlltool.c:1435
#, c-format
msgid "Unable to open object file: %s"
msgstr ""
-#: dlltool.c:1344
+#: dlltool.c:1438
#, c-format
msgid "Scanning object file %s"
msgstr ""
-#: dlltool.c:1434
+#: dlltool.c:1453
+#, c-format
+msgid "Cannot produce mcore-elf dll from archive file: %s"
+msgstr ""
+
+#: dlltool.c:1538
msgid "Adding exports to output file"
msgstr ""
-#: dlltool.c:1479
+#: dlltool.c:1583
msgid "Added exports to output file"
msgstr ""
-#: dlltool.c:1587
+#: dlltool.c:1691
#, c-format
msgid "Generating export file: %s\n"
msgstr ""
-#: dlltool.c:1592
+#: dlltool.c:1696
#, c-format
msgid "Unable to open temporary assembler file: %s"
msgstr ""
-#: dlltool.c:1595
+#: dlltool.c:1699
#, c-format
msgid "Opened temporary file: %s"
msgstr ""
-#: dlltool.c:1828
+#: dlltool.c:1918
msgid "Generated exports file"
msgstr ""
-#: dlltool.c:2081
+#: dlltool.c:2171
#, c-format
msgid "bfd_open failed open stub file: %s"
msgstr ""
-#: dlltool.c:2084
+#: dlltool.c:2174
#, c-format
msgid "Creating stub file: %s"
msgstr ""
-#: dlltool.c:2593
+#: dlltool.c:2557
+#, c-format
+msgid "failed to open temporary head file: %s"
+msgstr ""
+
+#: dlltool.c:2623
+#, c-format
+msgid "failed to open temporary tail file: %s"
+msgstr ""
+
+#: dlltool.c:2698
#, c-format
msgid "Can't open .lib file: %s"
msgstr ""
-#: dlltool.c:2596
+#: dlltool.c:2701
#, c-format
msgid "Creating library file: %s\n"
msgstr ""
-#: dlltool.c:2652
+#: dlltool.c:2757
#, c-format
msgid "cannot delete %s: %s\n"
msgstr ""
-#: dlltool.c:2656
+#: dlltool.c:2761
msgid "Created lib file"
msgstr ""
-#: dlltool.c:2757
+#: dlltool.c:2862
#, c-format
msgid "Warning, ignoring duplicate EXPORT %s %d,%d\n"
msgstr ""
-#: dlltool.c:2763
+#: dlltool.c:2868
#, c-format
msgid "Error, duplicate EXPORT with oridinals: %s"
msgstr ""
-#: dlltool.c:2890
+#: dlltool.c:2995
msgid "Processing definitions"
msgstr ""
-#: dlltool.c:2928
+#: dlltool.c:3033
msgid "Processed definitions"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:2939
+#: dlltool.c:3044
#, c-format
msgid "Usage %s <options> <object-files>\n"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:2941
+#: dlltool.c:3046
#, c-format
msgid ""
-" -m --machine <machine> Create {arm, i386, ppc, thumb} DLL. [default: "
-"%s]\n"
+" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"
+msgstr ""
+
+#: dlltool.c:3047
+msgid ""
+" possible <machine>: arm[_interwork], i386, mcore[-elf][-le], ppc, "
+"thumb\n"
msgstr ""
-#: dlltool.c:2942
+#: dlltool.c:3048
msgid " -e --output-exp <outname> Generate an export file.\n"
msgstr ""
-#: dlltool.c:2943
+#: dlltool.c:3049
msgid " -l --output-lib <outname> Generate an interface library.\n"
msgstr ""
-#: dlltool.c:2944
+#: dlltool.c:3050
msgid " -a --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dlltool.c:2945
+#: dlltool.c:3051
msgid ""
" -D --dllname <name> Name of input dll to put into interface lib.\n"
msgstr ""
-#: dlltool.c:2946
+#: dlltool.c:3052
msgid " -d --input-def <deffile> Name of .def file to be read in.\n"
msgstr ""
-#: dlltool.c:2947
+#: dlltool.c:3053
msgid " -z --output-def <deffile> Name of .def file to be created.\n"
msgstr ""
-#: dlltool.c:2948
-msgid " --export-all-symbols Export all symbols to .def\n"
+#: dlltool.c:3054
+msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dlltool.c:2949
-msgid " --no-export-all-symbols Only export listed symbols\n"
+#: dlltool.c:3055
+msgid " --no-export-all-symbols Only export listed symbols\n"
msgstr ""
-#: dlltool.c:2950
-msgid " --exclude-symbols <list> Don't export <list>\n"
+#: dlltool.c:3056
+msgid " --exclude-symbols <list> Don't export <list>\n"
msgstr ""
-#: dlltool.c:2951
-msgid " --no-default-excludes Clear default exclude symbols\n"
+#: dlltool.c:3057
+msgid " --no-default-excludes Clear default exclude symbols\n"
msgstr ""
-#: dlltool.c:2952
+#: dlltool.c:3058
msgid " -b --base-file <basefile> Read linker generated base file.\n"
msgstr ""
-#: dlltool.c:2953
+#: dlltool.c:3059
msgid " -x --no-idata4 Don't generate idata$4 section.\n"
msgstr ""
-#: dlltool.c:2954
+#: dlltool.c:3060
msgid " -c --no-idata5 Don't generate idata$5 section.\n"
msgstr ""
-#: dlltool.c:2955
+#: dlltool.c:3061
msgid ""
" -U --add-underscore Add underscores to symbols in interface "
"library.\n"
msgstr ""
-#: dlltool.c:2956
+#: dlltool.c:3062
msgid " -k --kill-at Kill @<n> from exported names.\n"
msgstr ""
-#: dlltool.c:2957
+#: dlltool.c:3063
msgid " -A --add-stdcall-alias Add aliases without @<n>.\n"
msgstr ""
-#: dlltool.c:2958
+#: dlltool.c:3064
msgid " -S --as <name> Use <name> for assembler.\n"
msgstr ""
-#: dlltool.c:2959
+#: dlltool.c:3065
msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n"
msgstr ""
-#: dlltool.c:2961
-msgid " -i --interwork Support ARM/Thumb interworking.\n"
-msgstr ""
-
-#: dlltool.c:2963
+#: dlltool.c:3066
msgid ""
" -n --no-delete Keep temp files (repeat for extra "
"preservation).\n"
msgstr ""
-#: dlltool.c:2964
+#: dlltool.c:3067
msgid " -v --verbose Be verbose.\n"
msgstr ""
-#: dlltool.c:2965
+#: dlltool.c:3068
msgid " -V --version Display the program version.\n"
msgstr ""
-#: dlltool.c:2966
+#: dlltool.c:3069
msgid " -h --help Display this information.\n"
msgstr ""
-#: dlltool.c:3120
+#: dlltool.c:3071
+msgid ""
+" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"
+msgstr ""
+
+#: dlltool.c:3072
+msgid " -L --linker <name> Use <name> as the linker.\n"
+msgstr ""
+
+#: dlltool.c:3073
+msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n"
+msgstr ""
+
+#: dlltool.c:3216
#, c-format
msgid "Unable to open base-file: %s"
msgstr ""
-#: dlltool.c:3137
+#: dlltool.c:3242
#, c-format
msgid "Machine '%s' not supported"
msgstr ""
+#: dlltool.c:3385
+msgid "buffer overflow\n"
+msgstr ""
+
#: ieee.c:316
msgid "unexpected end of debugging information"
msgstr ""
@@ -1273,87 +1306,87 @@ msgstr ""
msgid "cannot mkdir %s for archive copying (error: %s)"
msgstr ""
-#: objcopy.c:1204
+#: objcopy.c:1217
#, c-format
msgid "%s: section `%s': error in %s: %s"
msgstr ""
-#: objcopy.c:1476
+#: objcopy.c:1489
#, c-format
msgid "%s: can't create debugging section: %s"
msgstr ""
-#: objcopy.c:1491
+#: objcopy.c:1504
#, c-format
msgid "%s: can't set debugging section contents: %s"
msgstr ""
-#: objcopy.c:1500
+#: objcopy.c:1513
#, c-format
msgid "%s: don't know how to write debugging information for %s"
msgstr ""
-#: objcopy.c:1605
+#: objcopy.c:1618
#, c-format
msgid "%s: cannot stat: %s"
msgstr ""
-#: objcopy.c:1655
+#: objcopy.c:1668
msgid "byte number must be non-negative"
msgstr ""
-#: objcopy.c:1660
+#: objcopy.c:1673
msgid "interleave must be positive"
msgstr ""
-#: objcopy.c:1729
+#: objcopy.c:1742
msgid "bad format for --add-section NAME=FILENAME"
msgstr ""
-#: objcopy.c:1732
+#: objcopy.c:1745
#, c-format
msgid "cannot stat: %s: %s"
msgstr ""
-#: objcopy.c:1750
+#: objcopy.c:1763
#, c-format
msgid "cannot open: %s: %s"
msgstr ""
-#: objcopy.c:1754
+#: objcopy.c:1767
#, c-format
msgid "%s: fread failed"
msgstr ""
-#: objcopy.c:1791
+#: objcopy.c:1804
#, c-format
msgid "bad format for %s"
msgstr ""
-#: objcopy.c:1855
+#: objcopy.c:1868
#, c-format
msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
msgstr ""
-#: objcopy.c:1879
+#: objcopy.c:1892
msgid "bad format for --set-section-flags"
msgstr ""
-#: objcopy.c:1909
+#: objcopy.c:1922
msgid "byte number must be less than interleave"
msgstr ""
-#: objcopy.c:1928
+#: objcopy.c:1941
#, c-format
msgid "Cannot stat: %s: %s"
msgstr ""
-#: objcopy.c:1968
+#: objcopy.c:1981
#, c-format
msgid "Warning: --change-section-vma %s%c0x%s never used"
msgstr ""
-#: objcopy.c:1981
+#: objcopy.c:1994
#, c-format
msgid "Warning: --change-section-lma %s%c0x%s never used"
msgstr ""
@@ -1484,17 +1517,17 @@ msgstr ""
msgid "Contents of section %s:\n"
msgstr ""
-#: objdump.c:2661
+#: objdump.c:2664
#, c-format
msgid "BFD header file version %s\n"
msgstr ""
-#: objdump.c:2786
+#: objdump.c:2789
#, c-format
msgid "%s: unrecognized -E option\n"
msgstr ""
-#: objdump.c:2797
+#: objdump.c:2800
#, c-format
msgid "%s: unrecognized --endian type `%s'\n"
msgstr ""
@@ -1533,884 +1566,889 @@ msgstr ""
msgid "Last stabs entries before error:\n"
msgstr ""
-#: readelf.c:229 readelf.c:255
+#: readelf.c:237 readelf.c:263
#, c-format
msgid "%s: Error: "
msgstr ""
-#: readelf.c:241 readelf.c:270
+#: readelf.c:249 readelf.c:278
#, c-format
msgid "%s: Warning: "
msgstr ""
-#: readelf.c:300 readelf.c:325
+#: readelf.c:308 readelf.c:333
#, c-format
msgid "Unhandled data length: %d\n"
msgstr ""
-#: readelf.c:420
+#: readelf.c:372
msgid "Don't know about relocations on this machine architecture\n"
msgstr ""
-#: readelf.c:426
+#: readelf.c:410 readelf.c:439
+msgid "out of memory parsing relocs"
+msgstr ""
+
+#: readelf.c:456
msgid ""
" Offset Info Type Symbol's Value Symbol's Name "
"Addend\n"
msgstr ""
-#: readelf.c:429
+#: readelf.c:459
msgid " Offset Info Type Symbol's Value Symbol's Name\n"
msgstr ""
-#: readelf.c:533
+#: readelf.c:567
#, c-format
msgid "unrecognised: %-7lx"
msgstr ""
-#: readelf.c:551
+#: readelf.c:585
#, c-format
msgid "<string table index %3ld>"
msgstr ""
-#: readelf.c:703
+#: readelf.c:739
#, c-format
msgid "Processor Specific: %lx"
msgstr ""
-#: readelf.c:706
+#: readelf.c:742
#, c-format
msgid "Operating System specific: %lx"
msgstr ""
-#: readelf.c:708 readelf.c:961
+#: readelf.c:744 readelf.c:996
#, c-format
msgid "<unknown>: %lx"
msgstr ""
-#: readelf.c:722
+#: readelf.c:758
msgid "NONE (None)"
msgstr ""
-#: readelf.c:723
+#: readelf.c:759
msgid "REL (Relocatable file)"
msgstr ""
-#: readelf.c:724
+#: readelf.c:760
msgid "EXEC (Executable file)"
msgstr ""
-#: readelf.c:725
+#: readelf.c:761
msgid "DYN (Shared object file)"
msgstr ""
-#: readelf.c:726
+#: readelf.c:762
msgid "CORE (Core file)"
msgstr ""
-#: readelf.c:730
+#: readelf.c:766
#, c-format
msgid "Processor Specific: (%x)"
msgstr ""
-#: readelf.c:732
+#: readelf.c:768
#, c-format
msgid "OS Specific: (%x)"
msgstr ""
-#: readelf.c:734 readelf.c:793 readelf.c:897 readelf.c:1072
+#: readelf.c:770 readelf.c:829 readelf.c:932 readelf.c:1107
#, c-format
msgid "<unknown>: %x"
msgstr ""
-#: readelf.c:747
+#: readelf.c:783
msgid "None"
msgstr ""
-#: readelf.c:894
+#: readelf.c:929
msgid "ELFDATA2LSB (little endian)"
msgstr ""
-#: readelf.c:895
+#: readelf.c:930
msgid "ELFDATA2MSB (big endian)"
msgstr ""
-#: readelf.c:1108
+#: readelf.c:1143
msgid "Usage: readelf {options} elf-file(s)\n"
msgstr ""
-#: readelf.c:1109
+#: readelf.c:1144
msgid " Options are:\n"
msgstr ""
-#: readelf.c:1110
+#: readelf.c:1145
msgid ""
" -a or --all Equivalent to: -h -l -S -s -r -d -V --histogram\n"
msgstr ""
-#: readelf.c:1111
+#: readelf.c:1146
msgid " -h or --file-header Display the ELF file header\n"
msgstr ""
-#: readelf.c:1112
+#: readelf.c:1147
msgid " -l or --program-headers or --segments\n"
msgstr ""
-#: readelf.c:1113
+#: readelf.c:1148
msgid " Display the program headers\n"
msgstr ""
-#: readelf.c:1114
+#: readelf.c:1149
msgid " -S or --section-headers or --sections\n"
msgstr ""
-#: readelf.c:1115
+#: readelf.c:1150
msgid " Display the sections' header\n"
msgstr ""
-#: readelf.c:1116
+#: readelf.c:1151
msgid " -e or --headers Equivalent to: -h -l -S\n"
msgstr ""
-#: readelf.c:1117
+#: readelf.c:1152
msgid " -s or --syms or --symbols Display the symbol table\n"
msgstr ""
-#: readelf.c:1118
+#: readelf.c:1153
msgid " -r or --relocs Display the relocations (if present)\n"
msgstr ""
-#: readelf.c:1119
+#: readelf.c:1154
msgid " -d or --dynamic Display the dynamic segment (if present)\n"
msgstr ""
-#: readelf.c:1120
+#: readelf.c:1155
msgid " -V or --version-info Display the version sections (if present)\n"
msgstr ""
-#: readelf.c:1121
+#: readelf.c:1156
msgid ""
" -D or --use-dynamic Use the dynamic section info when displaying "
"symbols\n"
msgstr ""
-#: readelf.c:1122
+#: readelf.c:1157
msgid " -x <number> or --hex-dump=<number>\n"
msgstr ""
-#: readelf.c:1123
+#: readelf.c:1158
msgid " Dump the contents of section <number>\n"
msgstr ""
-#: readelf.c:1124
+#: readelf.c:1159
msgid " -w[liapr] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]\n"
msgstr ""
-#: readelf.c:1125
+#: readelf.c:1160
msgid ""
" Display the contents of DWARF2 debug sections\n"
msgstr ""
-#: readelf.c:1127
+#: readelf.c:1162
msgid " -i <number> or --instruction-dump=<number>\n"
msgstr ""
-#: readelf.c:1128
+#: readelf.c:1163
msgid ""
" Disassemble the contents of section <number>\n"
msgstr ""
-#: readelf.c:1130
+#: readelf.c:1165
msgid " --histogram Display histogram of bucket list lengths\n"
msgstr ""
-#: readelf.c:1131
+#: readelf.c:1166
msgid " -v or --version Display the version number of readelf\n"
msgstr ""
-#: readelf.c:1132
+#: readelf.c:1167
msgid " -H or --help Display this information\n"
msgstr ""
-#: readelf.c:1150
+#: readelf.c:1185
msgid "Out of memory allocating dump request table."
msgstr ""
-#: readelf.c:1274
+#: readelf.c:1309
#, c-format
msgid "Unrecognised debug option '%s'\n"
msgstr ""
-#: readelf.c:1299
+#: readelf.c:1334
#, c-format
msgid "Invalid option '-%c'\n"
msgstr ""
-#: readelf.c:1312
+#: readelf.c:1347
msgid "Nothing to do.\n"
msgstr ""
-#: readelf.c:1323 readelf.c:1336 readelf.c:2459
+#: readelf.c:1360 readelf.c:1377 readelf.c:2531
msgid "none"
msgstr ""
-#: readelf.c:1324
+#: readelf.c:1361
msgid "ELF32"
msgstr ""
-#: readelf.c:1325
+#: readelf.c:1362
msgid "ELF64"
msgstr ""
-#: readelf.c:1326 readelf.c:1339 readelf.c:1352
-msgid "<unknown>"
+#: readelf.c:1364 readelf.c:1381 readelf.c:1398
+#, c-format
+msgid "<unknown: %lx>"
msgstr ""
-#: readelf.c:1337
-msgid "2's compilment, little endian"
+#: readelf.c:1378
+msgid "2's complement, little endian"
msgstr ""
-#: readelf.c:1338
-msgid "2's compilment, big endian"
+#: readelf.c:1379
+msgid "2's complement, big endian"
msgstr ""
-#: readelf.c:1349
+#: readelf.c:1394
msgid "UNIX - System V"
msgstr ""
-#: readelf.c:1350
+#: readelf.c:1395
msgid "UNIX - HP-UX"
msgstr ""
-#: readelf.c:1351
+#: readelf.c:1396
msgid "Standalone App"
msgstr ""
-#: readelf.c:1366
+#: readelf.c:1413
msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
msgstr ""
-#: readelf.c:1374
+#: readelf.c:1421
msgid "ELF Header:\n"
msgstr ""
-#: readelf.c:1375
+#: readelf.c:1422
msgid " Magic: "
msgstr ""
-#: readelf.c:1379
+#: readelf.c:1426
#, c-format
msgid " Class: %s\n"
msgstr ""
-#: readelf.c:1381 readelf.c:1397
+#: readelf.c:1428 readelf.c:1445
#, c-format
msgid " Data: %s\n"
msgstr ""
-#: readelf.c:1383
+#: readelf.c:1430
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: readelf.c:1387
+#: readelf.c:1435
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: readelf.c:1389
+#: readelf.c:1437
#, c-format
msgid " ABI Version: %d\n"
msgstr ""
-#: readelf.c:1391
+#: readelf.c:1439
#, c-format
msgid " Type: %s\n"
msgstr ""
-#: readelf.c:1393
+#: readelf.c:1441
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: readelf.c:1395
+#: readelf.c:1443
#, c-format
msgid " Version: 0x%lx\n"
msgstr ""
-#: readelf.c:1399
+#: readelf.c:1447
#, c-format
msgid " Entry point address: 0x%lx\n"
msgstr ""
-#: readelf.c:1401
+#: readelf.c:1449
#, c-format
msgid " Start of program headers: %ld (bytes into file)\n"
msgstr ""
-#: readelf.c:1403
+#: readelf.c:1451
#, c-format
msgid " Start of section headers: %ld (bytes into file)\n"
msgstr ""
-#: readelf.c:1405
+#: readelf.c:1453
#, c-format
msgid " Flags: 0x%lx%s\n"
msgstr ""
-#: readelf.c:1408
+#: readelf.c:1456
#, c-format
msgid " Size of this header: %ld (bytes)\n"
msgstr ""
-#: readelf.c:1410
+#: readelf.c:1458
#, c-format
msgid " Size of program headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:1412
+#: readelf.c:1460
#, c-format
msgid " Number of program headers: %ld\n"
msgstr ""
-#: readelf.c:1414
+#: readelf.c:1462
#, c-format
msgid " Size of section headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:1416
+#: readelf.c:1464
#, c-format
msgid " Number of section headers: %ld\n"
msgstr ""
-#: readelf.c:1418
+#: readelf.c:1466
#, c-format
msgid " Section header string table index: %ld\n"
msgstr ""
-#: readelf.c:1428
+#: readelf.c:1476
msgid "Not a 32 bit ELF file\n"
msgstr ""
-#: readelf.c:1448
+#: readelf.c:1496
msgid ""
"\n"
"There are no program headers in this file.\n"
msgstr ""
-#: readelf.c:1454
+#: readelf.c:1502
#, c-format
msgid ""
"\n"
"Elf file is %s\n"
msgstr ""
-#: readelf.c:1455
+#: readelf.c:1503
#, c-format
msgid "Entry point 0x%lx\n"
msgstr ""
-#: readelf.c:1456
+#: readelf.c:1504
#, c-format
msgid "There are %d program headers, starting at offset %lx:\n"
msgstr ""
-#: readelf.c:1469 readelf.c:1619 readelf.c:1662 readelf.c:2018 readelf.c:2142
-#: readelf.c:3043 readelf.c:3057
+#: readelf.c:1517 readelf.c:1668 readelf.c:1711 readelf.c:2090 readelf.c:2214
+#: readelf.c:3115 readelf.c:3129
msgid "Out of memory\n"
msgstr ""
-#: readelf.c:1492
+#: readelf.c:1540
#, c-format
msgid ""
"\n"
"Program Header%s:\n"
msgstr ""
-#: readelf.c:1494
+#: readelf.c:1542
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:1529
+#: readelf.c:1578
msgid "more than one dynamic segment\n"
msgstr ""
-#: readelf.c:1537
+#: readelf.c:1586
msgid "Unable to find program interpreter name\n"
msgstr ""
-#: readelf.c:1544
+#: readelf.c:1593
#, c-format
msgid ""
"\n"
" [Requesting program interpreter: %s]"
msgstr ""
-#: readelf.c:1562
+#: readelf.c:1611
msgid ""
"\n"
" Section to Segment mapping:\n"
msgstr ""
-#: readelf.c:1563
+#: readelf.c:1612
msgid " Segment Sections...\n"
msgstr ""
-#: readelf.c:1697
+#: readelf.c:1746
msgid ""
"\n"
"There are no sections in this file.\n"
msgstr ""
-#: readelf.c:1703
+#: readelf.c:1752
#, c-format
msgid "There are %d section headers, starting at offset %lx:\n"
msgstr ""
-#: readelf.c:1737
+#: readelf.c:1786
msgid "File contains multiple dynamic symbol tables\n"
msgstr ""
-#: readelf.c:1750
+#: readelf.c:1799
msgid "File contains multiple dynamic string tables\n"
msgstr ""
-#: readelf.c:1777
+#: readelf.c:1826
#, c-format
msgid ""
"\n"
"Section Header%s:\n"
msgstr ""
-#: readelf.c:1779
+#: readelf.c:1828
msgid ""
" [Nr] Name Type Addr Off Size ES Flg Lk "
"Inf Al\n"
msgstr ""
-#: readelf.c:1844
+#: readelf.c:1909
#, c-format
msgid ""
"\n"
"Relocation section at offset 0x%lx contains %ld bytes:\n"
msgstr ""
-#: readelf.c:1851
+#: readelf.c:1916
msgid ""
"\n"
"There are no dynamic relocations in this file.\n"
msgstr ""
-#: readelf.c:1877
+#: readelf.c:1943
msgid ""
"\n"
"Relocation section "
msgstr ""
-#: readelf.c:1884
+#: readelf.c:1954
#, c-format
msgid " at offset 0x%lx contains %lu entries:\n"
msgstr ""
-#: readelf.c:1910
+#: readelf.c:1982
msgid ""
"\n"
"There are no relocations in this file.\n"
msgstr ""
-#: readelf.c:1998
+#: readelf.c:2070
msgid ""
"\n"
"There is no dynamic segment in this file.\n"
msgstr ""
-#: readelf.c:2056
+#: readelf.c:2128
msgid "Unable to seek to end of file!"
msgstr ""
-#: readelf.c:2062
+#: readelf.c:2134
msgid "Unable to determine the number of symbols to load\n"
msgstr ""
-#: readelf.c:2092
+#: readelf.c:2164
msgid "Unable to seek to end of file\n"
msgstr ""
-#: readelf.c:2098
+#: readelf.c:2170
msgid "Unable to determine the length of the dynamic string table\n"
msgstr ""
-#: readelf.c:2159
+#: readelf.c:2231
#, c-format
msgid ""
"\n"
"Dynamic segment at offset 0x%x contains %d entries:\n"
msgstr ""
-#: readelf.c:2162
+#: readelf.c:2234
msgid " Tag Type Name/Value\n"
msgstr ""
-#: readelf.c:2169
+#: readelf.c:2241
#, c-format
msgid " 0x%-8.8lx (%s)%*s"
msgstr ""
-#: readelf.c:2182
+#: readelf.c:2254
msgid "Auxiliary library"
msgstr ""
-#: readelf.c:2184
+#: readelf.c:2256
msgid "Filter library"
msgstr ""
-#: readelf.c:2196 readelf.c:2217 readelf.c:2243
+#: readelf.c:2268 readelf.c:2289 readelf.c:2315
msgid "Flags:"
msgstr ""
-#: readelf.c:2198 readelf.c:2219 readelf.c:2245
+#: readelf.c:2270 readelf.c:2291 readelf.c:2317
msgid " None\n"
msgstr ""
-#: readelf.c:2348
+#: readelf.c:2420
#, c-format
msgid "Shared library: [%s]"
msgstr ""
-#: readelf.c:2353
+#: readelf.c:2425
msgid " program interpreter\n"
msgstr ""
-#: readelf.c:2357
+#: readelf.c:2429
#, c-format
msgid "Library soname: [%s]\n"
msgstr ""
-#: readelf.c:2361
+#: readelf.c:2433
#, c-format
msgid "Library rpath: [%s]\n"
msgstr ""
-#: readelf.c:2413
+#: readelf.c:2485
#, c-format
msgid "Not needed object: [%s]\n"
msgstr ""
-#: readelf.c:2505
+#: readelf.c:2577
#, c-format
msgid ""
"\n"
"Version definition section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:2508
+#: readelf.c:2580
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:2510 readelf.c:2699
+#: readelf.c:2582 readelf.c:2771
#, c-format
msgid " Offset: %#08lx Link: %lx (%s)\n"
msgstr ""
-#: readelf.c:2540
+#: readelf.c:2612
#, c-format
msgid " %#06x: Rev: %d Flags: %s"
msgstr ""
-#: readelf.c:2543
+#: readelf.c:2615
#, c-format
msgid " Index: %d Cnt: %d "
msgstr ""
-#: readelf.c:2554
+#: readelf.c:2626
#, c-format
msgid "Name: %s\n"
msgstr ""
-#: readelf.c:2556
+#: readelf.c:2628
#, c-format
msgid "Name index: %ld\n"
msgstr ""
-#: readelf.c:2571
+#: readelf.c:2643
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
-#: readelf.c:2574
+#: readelf.c:2646
#, c-format
msgid " %#06x: Parent %d, name index: %ld\n"
msgstr ""
-#: readelf.c:2593
+#: readelf.c:2665
#, c-format
msgid ""
"\n"
"Version needs section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:2596
+#: readelf.c:2668
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:2598
+#: readelf.c:2670
#, c-format
msgid " Offset: %#08lx Link to section: %ld (%s)\n"
msgstr ""
-#: readelf.c:2624
+#: readelf.c:2696
#, c-format
msgid " %#06x: Version: %d"
msgstr ""
-#: readelf.c:2627
+#: readelf.c:2699
#, c-format
msgid " File: %s"
msgstr ""
-#: readelf.c:2629
+#: readelf.c:2701
#, c-format
msgid " File: %lx"
msgstr ""
-#: readelf.c:2631
+#: readelf.c:2703
#, c-format
msgid " Cnt: %d\n"
msgstr ""
-#: readelf.c:2649
+#: readelf.c:2721
#, c-format
msgid " %#06x: Name: %s"
msgstr ""
-#: readelf.c:2652
+#: readelf.c:2724
#, c-format
msgid " %#06x: Name index: %lx"
msgstr ""
-#: readelf.c:2655
+#: readelf.c:2727
#, c-format
msgid " Flags: %s Version: %d\n"
msgstr ""
-#: readelf.c:2694
+#: readelf.c:2766
#, c-format
msgid ""
"\n"
"Version symbols section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:2697
+#: readelf.c:2769
msgid " Addr: "
msgstr ""
-#: readelf.c:2726
+#: readelf.c:2798
msgid " 0 (*local*) "
msgstr ""
-#: readelf.c:2730
+#: readelf.c:2802
msgid " 1 (*global*) "
msgstr ""
-#: readelf.c:2953
+#: readelf.c:3025
msgid ""
"\n"
"No version information found in this file.\n"
msgstr ""
-#: readelf.c:2966
+#: readelf.c:3038
msgid "LOCAL"
msgstr ""
-#: readelf.c:2967
+#: readelf.c:3039
msgid "GLOBAL"
msgstr ""
-#: readelf.c:2968
+#: readelf.c:3040
msgid "WEAK"
msgstr ""
-#: readelf.c:2971 readelf.c:2995
+#: readelf.c:3043 readelf.c:3067
#, c-format
msgid "<processor specific>: %d"
msgstr ""
-#: readelf.c:2973 readelf.c:2997
+#: readelf.c:3045 readelf.c:3069
#, c-format
msgid "<OS specific>: %d"
msgstr ""
-#: readelf.c:2975 readelf.c:2999
+#: readelf.c:3047 readelf.c:3071
#, c-format
msgid "<unknown>: %d"
msgstr ""
-#: readelf.c:2988
+#: readelf.c:3060
msgid "NOTYPE"
msgstr ""
-#: readelf.c:2989
+#: readelf.c:3061
msgid "OBJECT"
msgstr ""
-#: readelf.c:2990
+#: readelf.c:3062
msgid "FUNC"
msgstr ""
-#: readelf.c:2991
+#: readelf.c:3063
msgid "SECTION"
msgstr ""
-#: readelf.c:2992
+#: readelf.c:3064
msgid "FILE"
msgstr ""
-#: readelf.c:3049
+#: readelf.c:3121
msgid "Unable to read in dynamic data\n"
msgstr ""
-#: readelf.c:3091
+#: readelf.c:3163
msgid "Unable to seek to start of dynamic information"
msgstr ""
-#: readelf.c:3097
+#: readelf.c:3169
msgid "Failed to read in number of buckets\n"
msgstr ""
-#: readelf.c:3103
+#: readelf.c:3175
msgid "Failed to read in number of chains\n"
msgstr ""
-#: readelf.c:3123
+#: readelf.c:3195
msgid ""
"\n"
"Symbol table for image:\n"
msgstr ""
-#: readelf.c:3124
+#: readelf.c:3196
msgid " Num Buc: Value Size Type Bind Ot Ndx Name\n"
msgstr ""
-#: readelf.c:3169
+#: readelf.c:3241
#, c-format
msgid ""
"\n"
"Symbol table '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:3172
+#: readelf.c:3244
msgid " Num: Value Size Type Bind Ot Ndx Name\n"
msgstr ""
-#: readelf.c:3291
+#: readelf.c:3356
msgid "bad dynamic symbol"
msgstr ""
-#: readelf.c:3350
+#: readelf.c:3415
msgid ""
"\n"
"Dynamic symbol information is not available for displaying symbols.\n"
msgstr ""
-#: readelf.c:3362
+#: readelf.c:3427
#, c-format
msgid ""
"\n"
"Histogram for bucket list length (total of %d buckets):\n"
msgstr ""
-#: readelf.c:3364
+#: readelf.c:3429
msgid " Length Number %% of total Coverage\n"
msgstr ""
-#: readelf.c:3369 readelf.c:3388 readelf.c:5271 readelf.c:5461
+#: readelf.c:3434 readelf.c:3453 readelf.c:5336 readelf.c:5526
msgid "Out of memory"
msgstr ""
-#: readelf.c:3434
+#: readelf.c:3499
#, c-format
msgid ""
"\n"
"Dynamic info segment at offset 0x%lx contains %d entries:\n"
msgstr ""
-#: readelf.c:3437
+#: readelf.c:3502
msgid " Num: Name BoundTo Flags\n"
msgstr ""
-#: readelf.c:3485
+#: readelf.c:3550
#, c-format
msgid ""
"\n"
"Assembly dump of section %s\n"
msgstr ""
-#: readelf.c:3508
+#: readelf.c:3573
#, c-format
msgid ""
"\n"
"Section '%s' has no data to dump.\n"
msgstr ""
-#: readelf.c:3513
+#: readelf.c:3578
#, c-format
msgid ""
"\n"
"Hex dump of section '%s':\n"
msgstr ""
-#: readelf.c:3663
+#: readelf.c:3728
msgid "badly formed extended line op encountered!"
msgstr ""
-#: readelf.c:3670
+#: readelf.c:3735
#, c-format
msgid " Extended opcode %d: "
msgstr ""
-#: readelf.c:3675
+#: readelf.c:3740
msgid ""
"End of Sequence\n"
"\n"
msgstr ""
-#: readelf.c:3682
+#: readelf.c:3747
#, c-format
msgid "set Address to 0x%lx\n"
msgstr ""
-#: readelf.c:3687
+#: readelf.c:3752
msgid " define new File Table entry\n"
msgstr ""
-#: readelf.c:3688 readelf.c:3806
+#: readelf.c:3753 readelf.c:3871
msgid " Entry\tDir\tTime\tSize\tName\n"
msgstr ""
-#: readelf.c:3690
+#: readelf.c:3755
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:3693 readelf.c:3695 readelf.c:3697 readelf.c:3818 readelf.c:3820
-#: readelf.c:3822
+#: readelf.c:3758 readelf.c:3760 readelf.c:3762 readelf.c:3883 readelf.c:3885
+#: readelf.c:3887
#, c-format
msgid "%lu\t"
msgstr ""
-#: readelf.c:3698
+#: readelf.c:3763
#, c-format
msgid ""
"%s\n"
"\n"
msgstr ""
-#: readelf.c:3702
+#: readelf.c:3767
#, c-format
msgid "UNKNOWN: length %d\n"
msgstr ""
-#: readelf.c:3724
+#: readelf.c:3789
#, c-format
msgid ""
"\n"
@@ -2418,421 +2456,421 @@ msgid ""
"\n"
msgstr ""
-#: readelf.c:3736
+#: readelf.c:3801
msgid "The line info appears to be corrupt - the section is too small\n"
msgstr ""
-#: readelf.c:3744
+#: readelf.c:3809
msgid "Only DWARF version 2 line info is currently supported.\n"
msgstr ""
-#: readelf.c:3759
+#: readelf.c:3824
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:3760
+#: readelf.c:3825
#, c-format
msgid " DWARF Version: %d\n"
msgstr ""
-#: readelf.c:3761
+#: readelf.c:3826
#, c-format
msgid " Prolgue Length: %d\n"
msgstr ""
-#: readelf.c:3762
+#: readelf.c:3827
#, c-format
msgid " Minimum Instruction Length: %d\n"
msgstr ""
-#: readelf.c:3763
+#: readelf.c:3828
#, c-format
msgid " Initial value of 'is_stmt': %d\n"
msgstr ""
-#: readelf.c:3764
+#: readelf.c:3829
#, c-format
msgid " Line Base: %d\n"
msgstr ""
-#: readelf.c:3765
+#: readelf.c:3830
#, c-format
msgid " Line Range: %d\n"
msgstr ""
-#: readelf.c:3766
+#: readelf.c:3831
#, c-format
msgid " Opcode Base: %d\n"
msgstr ""
-#: readelf.c:3775
+#: readelf.c:3840
msgid ""
"\n"
" Opcodes:\n"
msgstr ""
-#: readelf.c:3778
+#: readelf.c:3843
#, c-format
msgid " Opcode %d has %d args\n"
msgstr ""
-#: readelf.c:3784
+#: readelf.c:3849
msgid ""
"\n"
" The Directory Table is empty.\n"
msgstr ""
-#: readelf.c:3787
+#: readelf.c:3852
msgid ""
"\n"
" The Directory Table:\n"
msgstr ""
-#: readelf.c:3791
+#: readelf.c:3856
#, c-format
msgid " %s\n"
msgstr ""
-#: readelf.c:3802
+#: readelf.c:3867
msgid ""
"\n"
" The File Name Table is empty.\n"
msgstr ""
-#: readelf.c:3805
+#: readelf.c:3870
msgid ""
"\n"
" The File Name Table:\n"
msgstr ""
-#: readelf.c:3813
+#: readelf.c:3878
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:3824
+#: readelf.c:3889
#, c-format
msgid "%s\n"
msgstr ""
#. Now display the statements.
-#: readelf.c:3832
+#: readelf.c:3897
msgid ""
"\n"
" Line Number Statements:\n"
msgstr ""
-#: readelf.c:3850
+#: readelf.c:3915
msgid " Copy\n"
msgstr ""
-#: readelf.c:3857
+#: readelf.c:3922
#, c-format
msgid " Advance PC by %d to %lx\n"
msgstr ""
-#: readelf.c:3865
+#: readelf.c:3930
#, c-format
msgid " Advance Line by %d to %d\n"
msgstr ""
-#: readelf.c:3872
+#: readelf.c:3937
#, c-format
msgid " Set File Name to entry %d in the File Name Table\n"
msgstr ""
-#: readelf.c:3880
+#: readelf.c:3945
#, c-format
msgid " Set column to %d\n"
msgstr ""
-#: readelf.c:3887
+#: readelf.c:3952
#, c-format
msgid " Set is_stmt to %d\n"
msgstr ""
-#: readelf.c:3892
+#: readelf.c:3957
msgid " Set basic block\n"
msgstr ""
-#: readelf.c:3899
+#: readelf.c:3964
#, c-format
msgid " Advance PC by constant %d to 0x%lx\n"
msgstr ""
-#: readelf.c:3907
+#: readelf.c:3972
#, c-format
msgid " Advance PC by fixed size amount %d to 0x%lx\n"
msgstr ""
-#: readelf.c:3915
+#: readelf.c:3980
#, c-format
msgid " Special opcode %d: advance Address by %d to 0x%lx"
msgstr ""
-#: readelf.c:3919
+#: readelf.c:3984
#, c-format
msgid " and Line by %d to %d\n"
msgstr ""
-#: readelf.c:3942 readelf.c:4361
+#: readelf.c:4007 readelf.c:4426
#, c-format
msgid ""
"Contents of the %s section:\n"
"\n"
msgstr ""
-#: readelf.c:3961
+#: readelf.c:4026
msgid "Only DWARF 2 pubnames are currently supported"
msgstr ""
-#: readelf.c:3965
+#: readelf.c:4030
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:3967
+#: readelf.c:4032
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:3969
+#: readelf.c:4034
#, c-format
msgid " Offset into .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:3971
+#: readelf.c:4036
#, c-format
msgid " Size of area in .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:3974
+#: readelf.c:4039
msgid ""
"\n"
" Offset\tName\n"
msgstr ""
-#: readelf.c:4056
+#: readelf.c:4121
#, c-format
msgid "Unknown TAG value: %lx"
msgstr ""
-#: readelf.c:4151
+#: readelf.c:4216
#, c-format
msgid "Unknown AT value: %lx"
msgstr ""
-#: readelf.c:4188
+#: readelf.c:4253
#, c-format
msgid "Unknown FORM value: %lx"
msgstr ""
-#: readelf.c:4367
+#: readelf.c:4432
msgid " Number TAG\n"
msgstr ""
-#: readelf.c:4373
+#: readelf.c:4438
#, c-format
msgid " %ld %s [%s]\n"
msgstr ""
-#: readelf.c:4376
+#: readelf.c:4441
msgid "has children"
msgstr ""
-#: readelf.c:4376
+#: readelf.c:4441
msgid "no children"
msgstr ""
-#: readelf.c:4380
+#: readelf.c:4445
#, c-format
msgid " %-18s %s\n"
msgstr ""
-#: readelf.c:4399
+#: readelf.c:4464
#, c-format
msgid " %lu byte block: "
msgstr ""
-#: readelf.c:4568
+#: readelf.c:4633
msgid "(User defined location op)"
msgstr ""
-#: readelf.c:4570
+#: readelf.c:4635
msgid "(Unknown location op)"
msgstr ""
-#: readelf.c:4687
+#: readelf.c:4752
#, c-format
msgid "Unable to handle FORM: %d"
msgstr ""
-#: readelf.c:4691
+#: readelf.c:4756
#, c-format
msgid "Unrecognised form: %d"
msgstr ""
-#: readelf.c:4704
+#: readelf.c:4769
msgid "(not inlined)"
msgstr ""
-#: readelf.c:4705
+#: readelf.c:4770
msgid "(inlined)"
msgstr ""
-#: readelf.c:4706
+#: readelf.c:4771
msgid "(declared as inline but ignored)"
msgstr ""
-#: readelf.c:4707
+#: readelf.c:4772
msgid "(declared as inline and inlined)"
msgstr ""
-#: readelf.c:4708
+#: readelf.c:4773
#, c-format
msgid " (Unknown inline attribute value: %lx)"
msgstr ""
-#: readelf.c:4838 readelf.c:4962
+#: readelf.c:4903 readelf.c:5027
#, c-format
msgid ""
"The section %s contains:\n"
"\n"
msgstr ""
-#: readelf.c:4860
+#: readelf.c:4925
msgid "Only version 2 DWARF debug information is currently supported.\n"
msgstr ""
-#: readelf.c:4864
+#: readelf.c:4929
msgid " Compilation Unit:\n"
msgstr ""
-#: readelf.c:4865
+#: readelf.c:4930
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:4866
+#: readelf.c:4931
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:4867
+#: readelf.c:4932
#, c-format
msgid " Abbrev Offset: %ld\n"
msgstr ""
-#: readelf.c:4868
+#: readelf.c:4933
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:4888
+#: readelf.c:4953
msgid "Unable to locate .debug_abbrev section!\n"
msgstr ""
-#: readelf.c:4928
+#: readelf.c:4993
#, c-format
msgid "Unable to locate entry %d in the abbreviation table\n"
msgstr ""
-#: readelf.c:4933
+#: readelf.c:4998
#, c-format
msgid " <%d><%x>: Abbrev Number: %d (%s)\n"
msgstr ""
-#: readelf.c:4980
+#: readelf.c:5045
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:4981
+#: readelf.c:5046
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:4982
+#: readelf.c:5047
#, c-format
msgid " Offset into .debug_info: %lx\n"
msgstr ""
-#: readelf.c:4983
+#: readelf.c:5048
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:4984
+#: readelf.c:5049
#, c-format
msgid " Segment Size: %d\n"
msgstr ""
-#: readelf.c:4986
+#: readelf.c:5051
msgid ""
"\n"
" Address Length\n"
msgstr ""
-#: readelf.c:5021
+#: readelf.c:5086
#, c-format
msgid "Displaying the debug contents of section %s is not yet supported.\n"
msgstr ""
-#: readelf.c:5063
+#: readelf.c:5128
#, c-format
msgid ""
"\n"
"Section '%s' has no debugging data.\n"
msgstr ""
-#: readelf.c:5079
+#: readelf.c:5144
#, c-format
msgid "Unrecognised debug section: %s\n"
msgstr ""
-#: readelf.c:5118
+#: readelf.c:5183
msgid "Some sections were not dumped because they do not exist!\n"
msgstr ""
-#: readelf.c:5293
+#: readelf.c:5358
#, c-format
msgid ""
"\n"
"Section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:5454
+#: readelf.c:5519
msgid "conflict list with without table"
msgstr ""
-#: readelf.c:5482
+#: readelf.c:5547
#, c-format
msgid ""
"\n"
"Section '.conflict' contains %d entries:\n"
msgstr ""
-#: readelf.c:5483
+#: readelf.c:5548
msgid " Num: Index Value Name"
msgstr ""
-#: readelf.c:5560
+#: readelf.c:5625
#, c-format
msgid "Cannot stat input file %s.\n"
msgstr ""
-#: readelf.c:5567
+#: readelf.c:5632
#, c-format
msgid "Input file %s not found.\n"
msgstr ""
-#: readelf.c:5573
+#: readelf.c:5638
#, c-format
msgid "%s: Failed to read file header\n"
msgstr ""
-#: readelf.c:5587
+#: readelf.c:5652
#, c-format
msgid ""
"\n"
@@ -3125,51 +3163,51 @@ msgstr ""
msgid "filename required for COFF output"
msgstr ""
-#: rescoff.c:729
+#: rescoff.c:734
msgid "can't get BFD_RELOC_RVA relocation type"
msgstr ""
-#: resrc.c:150
+#: resrc.c:253
#, c-format
msgid "can't popen `%s': %s"
msgstr ""
-#: resrc.c:163
+#: resrc.c:266
#, c-format
msgid "%s: warning: preprocessor failed\n"
msgstr ""
-#: resrc.c:208
+#: resrc.c:311
#, c-format
msgid "%s: unexpected EOF"
msgstr ""
-#: resrc.c:265
+#: resrc.c:368
#, c-format
msgid "%s: read of %lu returned %lu"
msgstr ""
-#: resrc.c:307 resrc.c:538 resrc.c:811 resrc.c:965
+#: resrc.c:410 resrc.c:641 resrc.c:914 resrc.c:1068
#, c-format
msgid "stat failed on bitmap file `%s': %s"
msgstr ""
-#: resrc.c:360
+#: resrc.c:463
#, c-format
msgid "cursor file `%s' does not contain cursor data"
msgstr ""
-#: resrc.c:392 resrc.c:682
+#: resrc.c:495 resrc.c:785
#, c-format
msgid "%s: fseek to %lu failed: %s"
msgstr ""
-#: resrc.c:651
+#: resrc.c:754
#, c-format
msgid "icon file `%s' does not contain icon data"
msgstr ""
-#: resrc.c:1170
+#: resrc.c:1273
#, c-format
msgid "can't open `%s' for output: %s"
msgstr ""
@@ -3347,50 +3385,50 @@ msgid ""
"the GNU General Public License. This program has absolutely no warranty.\n"
msgstr ""
-#: windres.c:228
+#: windres.c:233
#, c-format
msgid "can't open %s `%s': %s"
msgstr ""
-#: windres.c:407
+#: windres.c:412
msgid ": expected to be a directory\n"
msgstr ""
-#: windres.c:419
+#: windres.c:424
msgid ": expected to be a leaf\n"
msgstr ""
-#: windres.c:428
+#: windres.c:433
#, c-format
msgid "%s: warning: "
msgstr ""
-#: windres.c:430
+#: windres.c:435
msgid ": duplicate value\n"
msgstr ""
-#: windres.c:593
+#: windres.c:598
#, c-format
msgid "%s: unknown format type `%s'\n"
msgstr ""
-#: windres.c:594
+#: windres.c:599
#, c-format
msgid "%s: supported formats:"
msgstr ""
#. Otherwise, we give up.
-#: windres.c:681
+#: windres.c:686
#, c-format
msgid "can not determine type of file `%s'; use the -I option"
msgstr ""
-#: windres.c:695
+#: windres.c:700
#, c-format
msgid "Usage: %s [options] [input-file] [output-file]\n"
msgstr ""
-#: windres.c:697
+#: windres.c:702
msgid ""
"Options:\n"
" -i FILE, --input FILE Name input file\n"
@@ -3402,28 +3440,30 @@ msgid ""
" -F TARGET, --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"
-" --define SYM[=VAL] Define SYM when preprocessing rc file\n"
-" --language VAL Set language when reading rc file\n"
+" -DSYM[=VAL], --define SYM[=VAL]\n"
+" Define SYM when preprocessing rc file\n"
+" -v Verbose - tells you what it's doing\n"
+"\n"
msgstr ""
-#: windres.c:711
+#: windres.c:718
msgid " --yydebug Turn on parser debugging\n"
msgstr ""
-#: windres.c:714
+#: windres.c:721
msgid ""
" --help Print this help message\n"
" --version Print version information\n"
msgstr ""
-#: windres.c:717
+#: windres.c:724
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:918
+#: windres.c:963
msgid "no resources"
msgstr ""
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 958cbd2..abd684d 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -985,7 +985,7 @@ pr_fix_visibility (info, visibility)
struct pr_handle *info;
enum debug_visibility visibility;
{
- const char *s;
+ const char *s = NULL;
char *t;
unsigned int len;
@@ -1602,7 +1602,7 @@ pr_typdef (p, name)
static boolean
pr_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1856,7 +1856,7 @@ pr_end_block (p, addr)
/*ARGSUSED*/
static boolean
pr_end_function (p)
- PTR p;
+ PTR p ATTRIBUTE_UNUSED;
{
return true;
}
diff --git a/binutils/rclex.l b/binutils/rclex.l
index 06a6607..47b479b 100644
--- a/binutils/rclex.l
+++ b/binutils/rclex.l
@@ -37,6 +37,23 @@
static int rcdata_mode;
+/* Whether we are supressing lines from cpp (including windows.h or
+ headers from your C sources may bring in externs and typedefs).
+ When active, we return IGNORED_TOKEN, which lets us ignore these
+ outside of resource constructs. Thus, it isn't required to protect
+ all the non-preprocessor lines in your header files with #ifdef
+ RC_INVOKED. It also means your RC file can't include other RC
+ files if they're named "*.h". Sorry. Name them *.rch or whatever. */
+
+static int suppress_cpp_data;
+
+#define MAYBE_RETURN(x) return suppress_cpp_data ? IGNORED_TOKEN : (x)
+
+/* The first filename we detect in the cpp output. We use this to
+ tell included files from the original file. */
+
+static char *initial_fn;
+
/* List of allocated strings. */
struct alloc_string
@@ -57,82 +74,82 @@ static char *get_string PARAMS ((int));
%%
-"BEGIN" { return BEG; }
-"{" { return BEG; }
-"END" { return END; }
-"}" { return END; }
-"ACCELERATORS" { return ACCELERATORS; }
-"VIRTKEY" { return VIRTKEY; }
-"ASCII" { return ASCII; }
-"NOINVERT" { return NOINVERT; }
-"SHIFT" { return SHIFT; }
-"CONTROL" { return CONTROL; }
-"ALT" { return ALT; }
-"BITMAP" { return BITMAP; }
-"CURSOR" { return CURSOR; }
-"DIALOG" { return DIALOG; }
-"DIALOGEX" { return DIALOGEX; }
-"EXSTYLE" { return EXSTYLE; }
-"CAPTION" { return CAPTION; }
-"CLASS" { return CLASS; }
-"STYLE" { return STYLE; }
-"AUTO3STATE" { return AUTO3STATE; }
-"AUTOCHECKBOX" { return AUTOCHECKBOX; }
-"AUTORADIOBUTTON" { return AUTORADIOBUTTON; }
-"CHECKBOX" { return CHECKBOX; }
-"COMBOBOX" { return COMBOBOX; }
-"CTEXT" { return CTEXT; }
-"DEFPUSHBUTTON" { return DEFPUSHBUTTON; }
-"EDITTEXT" { return EDITTEXT; }
-"GROUPBOX" { return GROUPBOX; }
-"LISTBOX" { return LISTBOX; }
-"LTEXT" { return LTEXT; }
-"PUSHBOX" { return PUSHBOX; }
-"PUSHBUTTON" { return PUSHBUTTON; }
-"RADIOBUTTON" { return RADIOBUTTON; }
-"RTEXT" { return RTEXT; }
-"SCROLLBAR" { return SCROLLBAR; }
-"STATE3" { return STATE3; }
-"USERBUTTON" { return USERBUTTON; }
-"BEDIT" { return BEDIT; }
-"HEDIT" { return HEDIT; }
-"IEDIT" { return IEDIT; }
-"FONT" { return FONT; }
-"ICON" { return ICON; }
-"LANGUAGE" { return LANGUAGE; }
-"CHARACTERISTICS" { return CHARACTERISTICS; }
-"VERSION" { return VERSIONK; }
-"MENU" { return MENU; }
-"MENUEX" { return MENUEX; }
-"MENUITEM" { return MENUITEM; }
-"SEPARATOR" { return SEPARATOR; }
-"POPUP" { return POPUP; }
-"CHECKED" { return CHECKED; }
-"GRAYED" { return GRAYED; }
-"HELP" { return HELP; }
-"INACTIVE" { return INACTIVE; }
-"MENUBARBREAK" { return MENUBARBREAK; }
-"MENUBREAK" { return MENUBREAK; }
-"MESSAGETABLE" { return MESSAGETABLE; }
-"RCDATA" { return RCDATA; }
-"STRINGTABLE" { return STRINGTABLE; }
-"VERSIONINFO" { return VERSIONINFO; }
-"FILEVERSION" { return FILEVERSION; }
-"PRODUCTVERSION" { return PRODUCTVERSION; }
-"FILEFLAGSMASK" { return FILEFLAGSMASK; }
-"FILEFLAGS" { return FILEFLAGS; }
-"FILEOS" { return FILEOS; }
-"FILETYPE" { return FILETYPE; }
-"FILESUBTYPE" { return FILESUBTYPE; }
-"VALUE" { return VALUE; }
-"MOVEABLE" { return MOVEABLE; }
-"FIXED" { return FIXED; }
-"PURE" { return PURE; }
-"IMPURE" { return IMPURE; }
-"PRELOAD" { return PRELOAD; }
-"LOADONCALL" { return LOADONCALL; }
-"DISCARDABLE" { return DISCARDABLE; }
-"NOT" { return NOT; }
+"BEGIN" { MAYBE_RETURN (BEG); }
+"{" { MAYBE_RETURN (BEG); }
+"END" { MAYBE_RETURN (END); }
+"}" { MAYBE_RETURN (END); }
+"ACCELERATORS" { MAYBE_RETURN (ACCELERATORS); }
+"VIRTKEY" { MAYBE_RETURN (VIRTKEY); }
+"ASCII" { MAYBE_RETURN (ASCII); }
+"NOINVERT" { MAYBE_RETURN (NOINVERT); }
+"SHIFT" { MAYBE_RETURN (SHIFT); }
+"CONTROL" { MAYBE_RETURN (CONTROL); }
+"ALT" { MAYBE_RETURN (ALT); }
+"BITMAP" { MAYBE_RETURN (BITMAP); }
+"CURSOR" { MAYBE_RETURN (CURSOR); }
+"DIALOG" { MAYBE_RETURN (DIALOG); }
+"DIALOGEX" { MAYBE_RETURN (DIALOGEX); }
+"EXSTYLE" { MAYBE_RETURN (EXSTYLE); }
+"CAPTION" { MAYBE_RETURN (CAPTION); }
+"CLASS" { MAYBE_RETURN (CLASS); }
+"STYLE" { MAYBE_RETURN (STYLE); }
+"AUTO3STATE" { MAYBE_RETURN (AUTO3STATE); }
+"AUTOCHECKBOX" { MAYBE_RETURN (AUTOCHECKBOX); }
+"AUTORADIOBUTTON" { MAYBE_RETURN (AUTORADIOBUTTON); }
+"CHECKBOX" { MAYBE_RETURN (CHECKBOX); }
+"COMBOBOX" { MAYBE_RETURN (COMBOBOX); }
+"CTEXT" { MAYBE_RETURN (CTEXT); }
+"DEFPUSHBUTTON" { MAYBE_RETURN (DEFPUSHBUTTON); }
+"EDITTEXT" { MAYBE_RETURN (EDITTEXT); }
+"GROUPBOX" { MAYBE_RETURN (GROUPBOX); }
+"LISTBOX" { MAYBE_RETURN (LISTBOX); }
+"LTEXT" { MAYBE_RETURN (LTEXT); }
+"PUSHBOX" { MAYBE_RETURN (PUSHBOX); }
+"PUSHBUTTON" { MAYBE_RETURN (PUSHBUTTON); }
+"RADIOBUTTON" { MAYBE_RETURN (RADIOBUTTON); }
+"RTEXT" { MAYBE_RETURN (RTEXT); }
+"SCROLLBAR" { MAYBE_RETURN (SCROLLBAR); }
+"STATE3" { MAYBE_RETURN (STATE3); }
+"USERBUTTON" { MAYBE_RETURN (USERBUTTON); }
+"BEDIT" { MAYBE_RETURN (BEDIT); }
+"HEDIT" { MAYBE_RETURN (HEDIT); }
+"IEDIT" { MAYBE_RETURN (IEDIT); }
+"FONT" { MAYBE_RETURN (FONT); }
+"ICON" { MAYBE_RETURN (ICON); }
+"LANGUAGE" { MAYBE_RETURN (LANGUAGE); }
+"CHARACTERISTICS" { MAYBE_RETURN (CHARACTERISTICS); }
+"VERSION" { MAYBE_RETURN (VERSIONK); }
+"MENU" { MAYBE_RETURN (MENU); }
+"MENUEX" { MAYBE_RETURN (MENUEX); }
+"MENUITEM" { MAYBE_RETURN (MENUITEM); }
+"SEPARATOR" { MAYBE_RETURN (SEPARATOR); }
+"POPUP" { MAYBE_RETURN (POPUP); }
+"CHECKED" { MAYBE_RETURN (CHECKED); }
+"GRAYED" { MAYBE_RETURN (GRAYED); }
+"HELP" { MAYBE_RETURN (HELP); }
+"INACTIVE" { MAYBE_RETURN (INACTIVE); }
+"MENUBARBREAK" { MAYBE_RETURN (MENUBARBREAK); }
+"MENUBREAK" { MAYBE_RETURN (MENUBREAK); }
+"MESSAGETABLE" { MAYBE_RETURN (MESSAGETABLE); }
+"RCDATA" { MAYBE_RETURN (RCDATA); }
+"STRINGTABLE" { MAYBE_RETURN (STRINGTABLE); }
+"VERSIONINFO" { MAYBE_RETURN (VERSIONINFO); }
+"FILEVERSION" { MAYBE_RETURN (FILEVERSION); }
+"PRODUCTVERSION" { MAYBE_RETURN (PRODUCTVERSION); }
+"FILEFLAGSMASK" { MAYBE_RETURN (FILEFLAGSMASK); }
+"FILEFLAGS" { MAYBE_RETURN (FILEFLAGS); }
+"FILEOS" { MAYBE_RETURN (FILEOS); }
+"FILETYPE" { MAYBE_RETURN (FILETYPE); }
+"FILESUBTYPE" { MAYBE_RETURN (FILESUBTYPE); }
+"VALUE" { MAYBE_RETURN (VALUE); }
+"MOVEABLE" { MAYBE_RETURN (MOVEABLE); }
+"FIXED" { MAYBE_RETURN (FIXED); }
+"PURE" { MAYBE_RETURN (PURE); }
+"IMPURE" { MAYBE_RETURN (IMPURE); }
+"PRELOAD" { MAYBE_RETURN (PRELOAD); }
+"LOADONCALL" { MAYBE_RETURN (LOADONCALL); }
+"DISCARDABLE" { MAYBE_RETURN (DISCARDABLE); }
+"NOT" { MAYBE_RETURN (NOT); }
"BLOCK"[ \t\n]*"\""[^\#\n]*"\"" {
char *s, *send;
@@ -146,11 +163,11 @@ static char *get_string PARAMS ((int));
if (strncmp (s, "StringFileInfo",
sizeof "StringFileInfo" - 1) == 0
&& s + sizeof "StringFileInfo" - 1 == send)
- return BLOCKSTRINGFILEINFO;
+ MAYBE_RETURN (BLOCKSTRINGFILEINFO);
else if (strncmp (s, "VarFileInfo",
sizeof "VarFileInfo" - 1) == 0
&& s + sizeof "VarFileInfo" - 1 == send)
- return BLOCKVARFILEINFO;
+ MAYBE_RETURN (BLOCKVARFILEINFO);
else
{
char *r;
@@ -159,7 +176,7 @@ static char *get_string PARAMS ((int));
strncpy (r, s, send - s);
r[send - s] = '\0';
yylval.s = r;
- return BLOCK;
+ MAYBE_RETURN (BLOCK);
}
}
@@ -170,13 +187,13 @@ static char *get_string PARAMS ((int));
[0-9][x0-9A-Fa-f]*L {
yylval.i.val = strtoul (yytext, 0, 0);
yylval.i.dword = 1;
- return NUMBER;
+ MAYBE_RETURN (NUMBER);
}
[0-9][x0-9A-Fa-f]* {
yylval.i.val = strtoul (yytext, 0, 0);
yylval.i.dword = 0;
- return NUMBER;
+ MAYBE_RETURN (NUMBER);
}
("\""[^\"\n]*"\""[ \t]*)+ {
@@ -187,13 +204,13 @@ static char *get_string PARAMS ((int));
if (! rcdata_mode)
{
yylval.s = s;
- return QUOTEDSTRING;
+ MAYBE_RETURN (QUOTEDSTRING);
}
else
{
yylval.ss.length = length;
yylval.ss.s = s;
- return SIZEDSTRING;
+ MAYBE_RETURN (SIZEDSTRING);
}
}
@@ -209,12 +226,12 @@ static char *get_string PARAMS ((int));
s = get_string (strlen (yytext) + 1);
strcpy (s, yytext);
yylval.s = s;
- return STRING;
+ MAYBE_RETURN (STRING);
}
[\n] { ++rc_lineno; }
[ \t\r]+ { /* ignore whitespace */ }
-. { return *yytext; }
+. { MAYBE_RETURN (*yytext); }
%%
#ifndef yywrap
@@ -263,6 +280,20 @@ cpp_line (s)
free (rc_filename);
rc_filename = fn;
+
+ if (!initial_fn)
+ {
+ initial_fn = xmalloc (strlen (fn) + 1);
+ strcpy(initial_fn, fn);
+ }
+
+ /* Allow the initial file, regardless of name. Suppress all other
+ files if they end in ".h" (this allows included "*.rc") */
+ if (strcmp (initial_fn, fn) == 0
+ || strcmp (fn + strlen (fn) - 2, ".h") != 0)
+ suppress_cpp_data = 0;
+ else
+ suppress_cpp_data = 1;
}
/* Handle a quoted string. The quotes are stripped. A pair of quotes
diff --git a/binutils/rcparse.y b/binutils/rcparse.y
index 67079a5..03cbbdc 100644
--- a/binutils/rcparse.y
+++ b/binutils/rcparse.y
@@ -122,6 +122,7 @@ static unsigned long class;
%token <s> QUOTEDSTRING STRING
%token <i> NUMBER
%token <ss> SIZEDSTRING
+%token IGNORED_TOKEN
%type <pacc> acc_entries
%type <acc> acc_entry acc_event
@@ -167,6 +168,7 @@ input:
| input newcmd stringtable
| input newcmd user
| input newcmd versioninfo
+ | input newcmd IGNORED_TOKEN
;
newcmd:
diff --git a/binutils/rdcoff.c b/binutils/rdcoff.c
index ee68bc6..d1ee6e6 100644
--- a/binutils/rdcoff.c
+++ b/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -498,7 +498,7 @@ static debug_type
parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
bfd *abfd;
struct coff_symbols *symbols;
- struct coff_types *types;
+ struct coff_types *types ATTRIBUTE_UNUSED;
union internal_auxent *pauxent;
PTR dhandle;
{
@@ -569,7 +569,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
static boolean
parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
within_function)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
struct coff_types *types;
asymbol *sym;
long coff_symno;
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 549bf1a..266db75 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -27,6 +27,14 @@
#include <stdio.h>
#include <time.h>
+#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
+ data type. For now we only rely on GCC being able to do this. */
+#define BFD64
+#endif
+
#include "bfd.h"
#include "elf/common.h"
@@ -58,6 +66,7 @@
#include "elf/arc.h"
#include "elf/fr30.h"
#include "elf/mcore.h"
+#include "elf/i960.h"
#include "bucomm.h"
#include "getopt.h"
@@ -70,11 +79,12 @@
char * program_name = "readelf";
unsigned int dynamic_addr;
-unsigned int dynamic_size;
+bfd_size_type dynamic_size;
unsigned int rela_addr;
unsigned int rela_size;
char * dynamic_strings;
char * string_table;
+unsigned long num_dynamic_syms;
Elf_Internal_Sym * dynamic_symbols;
Elf_Internal_Syminfo * dynamic_syminfo;
unsigned long dynamic_syminfo_offset;
@@ -103,7 +113,8 @@ int do_debug_abbrevs;
int do_debug_lines;
int do_debug_pubnames;
int do_debug_aranges;
-int binary_class;
+int do_arch;
+int is_32bit_elf;
/* A dynamic array of flags indicating which sections require dumping. */
char * dump_sects = NULL;
@@ -114,38 +125,45 @@ unsigned int num_dump_sects = 0;
#define DEBUG_DUMP (1 << 2)
/* Forward declarations for dumb compilers. */
-static unsigned long (* byte_get) PARAMS ((unsigned char *, int));
-static const char * get_mips_dynamic_type PARAMS ((unsigned long type));
-static const char * get_dynamic_type PARAMS ((unsigned long type));
-static int dump_relocations PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Sym *, char *));
-static char * get_file_type PARAMS ((unsigned e_type));
-static char * get_machine_name PARAMS ((unsigned e_machine));
-static char * get_machine_data PARAMS ((unsigned e_data));
-static char * get_machine_flags PARAMS ((unsigned, unsigned e_machine));
-static const char * get_mips_segment_type PARAMS ((unsigned long type));
-static const char * get_segment_type PARAMS ((unsigned long p_type));
-static const char * get_mips_section_type_name PARAMS ((unsigned int sh_type));
-static const char * get_section_type_name PARAMS ((unsigned int sh_type));
-static char * get_symbol_binding PARAMS ((unsigned int binding));
-static char * get_symbol_type PARAMS ((unsigned int type));
+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_dynamic_type PARAMS ((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 char * get_machine_flags PARAMS ((unsigned, unsigned));
+static const char * get_mips_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_section_type_name PARAMS ((unsigned int));
+static char * get_symbol_binding PARAMS ((unsigned int));
+static char * get_symbol_type PARAMS ((unsigned int));
static void usage PARAMS ((void));
-static void parse_args PARAMS ((int argc, char ** argv));
+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 void dynamic_segment_mips_val PARAMS ((Elf_Internal_Dyn *entry));
+static void dynamic_segment_mips_val PARAMS ((Elf_Internal_Dyn *));
static int process_dynamic_segment PARAMS ((FILE *));
static int process_symbol_table PARAMS ((FILE *));
static int process_section_contents PARAMS ((FILE *));
-static void process_file PARAMS ((char * file_name));
+static void 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 flags));
-static char * get_symbol_index_type PARAMS ((unsigned int type));
-static int get_section_headers PARAMS ((FILE * file));
-static int get_file_header PARAMS ((FILE * file));
-static Elf_Internal_Sym * get_elf_symbols PARAMS ((FILE * file, unsigned long offset, unsigned long number));
-static int * get_dynamic_data PARAMS ((FILE * file, unsigned int number));
+static char * get_ver_flags PARAMS ((unsigned int));
+static char * get_symbol_index_type PARAMS ((unsigned int));
+static int get_32bit_section_headers PARAMS ((FILE *));
+static int get_64bit_section_headers PARAMS ((FILE *));
+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 *, unsigned long, unsigned long));
+static Elf_Internal_Sym * get_64bit_elf_symbols PARAMS ((FILE *, unsigned long, unsigned long));
+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
@@ -173,15 +191,36 @@ static void request_dump PARAMS ((unsigned int, char));
static const char * get_elf_class PARAMS ((unsigned char));
static const char * get_data_encoding PARAMS ((unsigned char));
static const char * get_osabi_name PARAMS ((unsigned char));
+static int guess_is_rela PARAMS ((unsigned long));
typedef int Elf32_Word;
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#define UNKNOWN -1
+
#define SECTION_NAME(X) (string_table + (X)->sh_name)
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
#define BYTE_GET(field) byte_get (field, sizeof (field))
+/* If we can support a 64 bit data type then BFD64 should be defined
+ and sizeof (bfd_vma) == 8. In this case when translating from an
+ external 8 byte field to an internal field, we can assume that the
+ internal field is also 8 bytes wide and so we can extact all the data.
+ If, however, BFD64 is not defined, then we must assume that the
+ internal data structure only has 4 byte wide fields that are the
+ equivalent of the 8 byte wide external counterparts, and so we must
+ truncate the data. */
+#ifdef BFD64
+#define BYTE_GET8(field) byte_get (field, -8)
+#else
+#define BYTE_GET8(field) byte_get (field, 8)
+#endif
+
#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0]))
#define GET_DATA_ALLOC(offset, size, var, type, reason) \
@@ -220,6 +259,11 @@ typedef int Elf32_Word;
return 0; \
}
+#define GET_ELF_SYMBOLS(file, offset, size) \
+ (is_32bit_elf ? get_32bit_elf_symbols (file, offset, size) \
+ : get_64bit_elf_symbols (file, offset, size))
+
+
#ifdef ANSI_PROTOTYPES
static void
error (const char * message, ...)
@@ -276,7 +320,7 @@ warn (va_alist)
}
#endif
-static unsigned long int
+static bfd_vma
byte_get_little_endian (field, size)
unsigned char * field;
int size;
@@ -290,19 +334,39 @@ byte_get_little_endian (field, size)
return ((unsigned int) (field [0]))
| (((unsigned int) (field [1])) << 8);
+ 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. */
+ /* Fall through. */
case 4:
return ((unsigned long) (field [0]))
| (((unsigned long) (field [1])) << 8)
| (((unsigned long) (field [2])) << 16)
| (((unsigned long) (field [3])) << 24);
+#ifdef BFD64
+ 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 [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);
- abort();
+ abort ();
}
}
-static unsigned long int
+static bfd_vma
byte_get_big_endian (field, size)
unsigned char * field;
int size;
@@ -321,66 +385,59 @@ byte_get_big_endian (field, size)
| (((unsigned long) (field [1])) << 16)
| (((unsigned long) (field [0])) << 24);
+ 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);
+
+#ifdef BFD64
+ 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);
+#endif
+
default:
error (_("Unhandled data length: %d\n"), size);
- abort();
+ abort ();
}
}
-/* Display the contents of the relocation data
- found at the specified offset. */
+/* Guess the relocation sized based on the sized commonly used by the specific machine. */
static int
-dump_relocations (file, rel_offset, rel_size, symtab, strtab)
- FILE * file;
- unsigned long rel_offset;
- unsigned long rel_size;
- Elf_Internal_Sym * symtab;
- char * strtab;
+guess_is_rela (e_machine)
+ unsigned long e_machine;
{
- unsigned int i;
- int is_rela;
- Elf_Internal_Rel * rels;
- Elf_Internal_Rela * relas;
-
-
- /* Compute number of relocations and read them in. */
- switch (elf_header.e_machine)
+ switch (e_machine)
{
/* Targets that use REL relocations. */
case EM_ARM:
case EM_386:
case EM_486:
+ case EM_960:
case EM_CYGNUS_M32R:
case EM_CYGNUS_D10V:
case EM_MIPS:
case EM_MIPS_RS4_BE:
- {
- Elf32_External_Rel * erels;
-
- GET_DATA_ALLOC (rel_offset, rel_size, erels,
- Elf32_External_Rel *, "relocs");
-
- rel_size = rel_size / sizeof (Elf32_External_Rel);
-
- rels = (Elf_Internal_Rel *) malloc (rel_size *
- sizeof (Elf_Internal_Rel));
-
- for (i = 0; i < rel_size; i++)
- {
- rels[i].r_offset = BYTE_GET (erels[i].r_offset);
- rels[i].r_info = BYTE_GET (erels[i].r_info);
- }
-
- free (erels);
-
- is_rela = 0;
- relas = (Elf_Internal_Rela *) rels;
- }
- break;
-
+ return FALSE;
+
/* Targets that use RELA relocations. */
case EM_68K:
+ case EM_SPARC32PLUS:
+ case EM_SPARCV9:
case EM_SPARC:
case EM_PPC:
case EM_CYGNUS_V850:
@@ -391,34 +448,152 @@ dump_relocations (file, rel_offset, rel_size, symtab, strtab)
case EM_SH:
case EM_ALPHA:
case EM_MCORE:
- {
- Elf32_External_Rela * erelas;
-
- GET_DATA_ALLOC (rel_offset, rel_size, erelas,
- Elf32_External_Rela *, "relocs");
-
- rel_size = rel_size / sizeof (Elf32_External_Rela);
+ return TRUE;
+
+ default:
+ warn (_("Don't know about relocations on this machine architecture\n"));
+ return FALSE;
+ }
+}
- relas = (Elf_Internal_Rela *) malloc (rel_size *
- sizeof (Elf_Internal_Rela));
+/* 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;
+{
+ unsigned int i;
+ Elf_Internal_Rel * rels;
+ Elf_Internal_Rela * relas;
- for (i = 0; i < rel_size; i++)
- {
- relas[i].r_offset = BYTE_GET (erelas[i].r_offset);
- relas[i].r_info = BYTE_GET (erelas[i].r_info);
- relas[i].r_addend = BYTE_GET (erelas[i].r_addend);
- }
+
+ if (is_rela == UNKNOWN)
+ is_rela = guess_is_rela (elf_header.e_machine);
- free (erelas);
+ if (is_rela)
+ {
+ if (is_32bit_elf)
+ {
+ Elf32_External_Rela * erelas;
+
+ GET_DATA_ALLOC (rel_offset, rel_size, erelas,
+ Elf32_External_Rela *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf32_External_Rela);
+
+ relas = (Elf_Internal_Rela *)
+ malloc (rel_size * sizeof (Elf_Internal_Rela));
+
+ if (relas == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ relas[i].r_offset = BYTE_GET (erelas[i].r_offset);
+ relas[i].r_info = BYTE_GET (erelas[i].r_info);
+ relas[i].r_addend = BYTE_GET (erelas[i].r_addend);
+ }
+
+ free (erelas);
+
+ rels = (Elf_Internal_Rel *) relas;
+ }
+ else
+ {
+ Elf64_External_Rela * erelas;
+
+ GET_DATA_ALLOC (rel_offset, rel_size, erelas,
+ Elf64_External_Rela *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf64_External_Rela);
+
+ relas = (Elf_Internal_Rela *)
+ malloc (rel_size * sizeof (Elf_Internal_Rela));
+
+ if (relas == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset);
+ relas[i].r_info = BYTE_GET8 (erelas[i].r_info);
+ relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend);
+ }
+
+ free (erelas);
+
+ rels = (Elf_Internal_Rel *) relas;
+ }
+ }
+ else
+ {
+ if (is_32bit_elf)
+ {
+ Elf32_External_Rel * erels;
- is_rela = 1;
- rels = (Elf_Internal_Rel *) relas;
- }
- break;
+ GET_DATA_ALLOC (rel_offset, rel_size, erels,
+ Elf32_External_Rel *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf32_External_Rel);
+
+ rels = (Elf_Internal_Rel *)
+ malloc (rel_size * sizeof (Elf_Internal_Rel));
+
+ if (rels == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ rels[i].r_offset = BYTE_GET (erels[i].r_offset);
+ rels[i].r_info = BYTE_GET (erels[i].r_info);
+ }
+
+ free (erels);
+
+ relas = (Elf_Internal_Rela *) rels;
+ }
+ else
+ {
+ Elf64_External_Rel * erels;
- default:
- warn (_("Don't know about relocations on this machine architecture\n"));
- return 0;
+ GET_DATA_ALLOC (rel_offset, rel_size, erels,
+ Elf64_External_Rel *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf64_External_Rel);
+
+ rels = (Elf_Internal_Rel *)
+ malloc (rel_size * sizeof (Elf_Internal_Rel));
+
+ if (rels == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ rels[i].r_offset = BYTE_GET8 (erels[i].r_offset);
+ rels[i].r_info = BYTE_GET8 (erels[i].r_info);
+ }
+
+ free (erels);
+
+ relas = (Elf_Internal_Rela *) rels;
+ }
}
if (is_rela)
@@ -430,11 +605,12 @@ dump_relocations (file, rel_offset, rel_size, symtab, strtab)
for (i = 0; i < rel_size; i++)
{
- const char * rtype;
- unsigned long offset;
- unsigned long info;
- int symtab_index;
-
+ const char * rtype;
+ bfd_vma offset;
+ bfd_vma info;
+ bfd_vma symtab_index;
+ bfd_vma type;
+
if (is_rela)
{
offset = relas [i].r_offset;
@@ -445,9 +621,32 @@ dump_relocations (file, rel_offset, rel_size, symtab, strtab)
offset = rels [i].r_offset;
info = rels [i].r_info;
}
+
+ if (is_32bit_elf)
+ {
+ type = ELF32_R_TYPE (info);
+ symtab_index = ELF32_R_SYM (info);
+ }
+ else
+ {
+ if (elf_header.e_machine == EM_SPARCV9)
+ 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
+ }
+#ifdef _bfd_int64_low
+ printf (" %8.8lx %5.5lx ", _bfd_int64_low (offset), _bfd_int64_low (info));
+#else
printf (" %8.8lx %5.5lx ", offset, info);
-
+#endif
+
switch (elf_header.e_machine)
{
default:
@@ -455,106 +654,129 @@ dump_relocations (file, rel_offset, rel_size, symtab, strtab)
break;
case EM_CYGNUS_M32R:
- rtype = elf_m32r_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_m32r_reloc_type (type);
break;
case EM_386:
case EM_486:
- rtype = elf_i386_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_i386_reloc_type (type);
break;
case EM_68K:
- rtype = elf_m68k_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_m68k_reloc_type (type);
break;
+ case EM_960:
+ rtype = elf_i960_reloc_type (type);
+ break;
+
+ case EM_OLD_SPARCV9:
+ case EM_SPARC32PLUS:
+ case EM_SPARCV9:
case EM_SPARC:
- rtype = elf_sparc_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_sparc_reloc_type (type);
break;
case EM_CYGNUS_V850:
- rtype = v850_reloc_type (ELF32_R_TYPE (info));
+ rtype = v850_reloc_type (type);
break;
case EM_CYGNUS_D10V:
- rtype = elf_d10v_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_d10v_reloc_type (type);
break;
case EM_CYGNUS_D30V:
- rtype = elf_d30v_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_d30v_reloc_type (type);
break;
case EM_SH:
- rtype = elf_sh_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_sh_reloc_type (type);
break;
case EM_CYGNUS_MN10300:
- rtype = elf_mn10300_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_mn10300_reloc_type (type);
break;
case EM_CYGNUS_MN10200:
- rtype = elf_mn10200_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_mn10200_reloc_type (type);
break;
case EM_CYGNUS_FR30:
- rtype = elf_fr30_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_fr30_reloc_type (type);
break;
case EM_MCORE:
- rtype = elf_mcore_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_mcore_reloc_type (type);
break;
case EM_PPC:
- rtype = elf_ppc_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_ppc_reloc_type (type);
break;
case EM_MIPS:
case EM_MIPS_RS4_BE:
- rtype = elf_mips_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_mips_reloc_type (type);
break;
case EM_ALPHA:
- rtype = elf_alpha_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_alpha_reloc_type (type);
break;
case EM_ARM:
- rtype = elf_arm_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_arm_reloc_type (type);
break;
case EM_CYGNUS_ARC:
- rtype = elf_arc_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_arc_reloc_type (type);
break;
case EM_PARISC:
- rtype = elf32_hppa_reloc_type (ELF32_R_TYPE (info));
+ rtype = elf_hppa_reloc_type (type);
break;
}
if (rtype == NULL)
- printf (_("unrecognised: %-7lx"), ELF32_R_TYPE (info));
+#ifdef _bfd_int64_low
+ printf (_("unrecognised: %-7lx"), _bfd_int64_low (type));
+#else
+ printf (_("unrecognised: %-7lx"), type);
+#endif
else
printf ("%-21.21s", rtype);
- symtab_index = ELF32_R_SYM (info);
-
- if (symtab_index && symtab != NULL)
+ if (symtab_index)
{
- Elf_Internal_Sym * psym;
-
- psym = symtab + symtab_index;
-
- printf (" %08lx ", (unsigned long) psym->st_value);
-
- if (psym->st_name == 0)
- printf ("%-25.25s",
- SECTION_NAME (section_headers + psym->st_shndx));
- else if (strtab == NULL)
- printf (_("<string table index %3ld>"), psym->st_name);
- else
- printf ("%-25.25s", strtab + psym->st_name);
-
- if (is_rela)
- printf (" + %lx", (unsigned long) relas [i].r_addend);
+ if (symtab != NULL)
+ {
+ if (symtab_index >= nsyms)
+ printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
+ else
+ {
+ Elf_Internal_Sym * psym;
+
+ psym = symtab + symtab_index;
+
+ printf (" %08lx ", (unsigned long) psym->st_value);
+
+ if (psym->st_name == 0)
+ printf ("%-25.25s",
+ SECTION_NAME (section_headers + psym->st_shndx));
+ else if (strtab == NULL)
+ printf (_("<string table index %3ld>"), psym->st_name);
+ else
+ printf ("%-25.25s", strtab + psym->st_name);
+
+ if (is_rela)
+ printf (" + %lx", (unsigned long) relas [i].r_addend);
+ }
+ }
}
+ else if (is_rela)
+ printf ("%34c%lx", ' ', (unsigned long) relas[i].r_addend);
+
+ if (elf_header.e_machine == EM_SPARCV9
+ && !strcmp (rtype, "R_SPARC_OLO10"))
+ printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info));
putchar ('\n');
}
@@ -810,6 +1032,11 @@ get_machine_flags (e_flags, e_machine)
default:
break;
+ case EM_68K:
+ if (e_flags & EF_CPU32)
+ strcat (buf, ", cpu32");
+ break;
+
case EM_PPC:
if (e_flags & EF_PPC_EMB)
strcat (buf, ", emb");
@@ -871,26 +1098,36 @@ get_machine_flags (e_flags, e_machine)
if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4)
strcat (buf, ", mips4");
break;
- }
- }
- return buf;
-}
+ case EM_SPARCV9:
+ if (e_flags & EF_SPARC_32PLUS)
+ strcat (buf, ", v8+");
-static char *
-get_machine_data (e_data)
- unsigned e_data;
-{
- static char buff [32];
+ if (e_flags & EF_SPARC_SUN_US1)
+ strcat (buf, ", ultrasparcI");
- switch (e_data)
- {
- case ELFDATA2LSB: return _("ELFDATA2LSB (little endian)");
- case ELFDATA2MSB: return _("ELFDATA2MSB (big endian)");
- default:
- sprintf (buff, _("<unknown>: %x"), e_data);
- return buff;
+ if (e_flags & EF_SPARC_SUN_US3)
+ strcat (buf, ", ultrasparcIII");
+
+ if (e_flags & EF_SPARC_HAL_R1)
+ strcat (buf, ", halr1");
+
+ if (e_flags & EF_SPARC_LEDATA)
+ strcat (buf, ", ledata");
+
+ if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_TSO)
+ strcat (buf, ", tso");
+
+ if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_PSO)
+ strcat (buf, ", pso");
+
+ if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_RMO)
+ strcat (buf, ", rmo");
+ break;
+ }
}
+
+ return buf;
}
static const char *
@@ -1075,7 +1312,7 @@ struct option options [] =
{"file-header", no_argument, 0, 'h'},
{"program-headers", no_argument, 0, 'l'},
{"headers", no_argument, 0, 'e'},
- {"histogram", no_argument, & do_histogram, 1},
+ {"histogram", no_argument, 0, 'I'},
{"segments", no_argument, 0, 'l'},
{"sections", no_argument, 0, 'S'},
{"section-headers", no_argument, 0, 'S'},
@@ -1083,6 +1320,7 @@ struct option options [] =
{"syms", no_argument, 0, 's'},
{"relocs", no_argument, 0, 'r'},
{"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'},
@@ -1101,7 +1339,7 @@ usage ()
{
fprintf (stdout, _("Usage: readelf {options} elf-file(s)\n"));
fprintf (stdout, _(" Options are:\n"));
- fprintf (stdout, _(" -a or --all Equivalent to: -h -l -S -s -r -d -V --histogram\n"));
+ fprintf (stdout, _(" -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"));
fprintf (stdout, _(" -h or --file-header Display the ELF file header\n"));
fprintf (stdout, _(" -l or --program-headers or --segments\n"));
fprintf (stdout, _(" Display the program headers\n"));
@@ -1112,6 +1350,7 @@ usage ()
fprintf (stdout, _(" -r or --relocs Display the relocations (if present)\n"));
fprintf (stdout, _(" -d or --dynamic Display the dynamic segment (if present)\n"));
fprintf (stdout, _(" -V or --version-info Display the version sections (if present)\n"));
+ fprintf (stdout, _(" -A or --arch-specific Display architecture specific information (if any).\n"));
fprintf (stdout, _(" -D or --use-dynamic Use the dynamic section info when displaying symbols\n"));
fprintf (stdout, _(" -x <number> or --hex-dump=<number>\n"));
fprintf (stdout, _(" Dump the contents of section <number>\n"));
@@ -1121,7 +1360,7 @@ usage ()
fprintf (stdout, _(" -i <number> or --instruction-dump=<number>\n"));
fprintf (stdout, _(" Disassemble the contents of section <number>\n"));
#endif
- fprintf (stdout, _(" --histogram Display histogram of bucket list lengths\n"));
+ fprintf (stdout, _(" -I or --histogram Display histogram of bucket list lengths\n"));
fprintf (stdout, _(" -v or --version Display the version number of readelf\n"));
fprintf (stdout, _(" -H or --help Display this information\n"));
fprintf (stdout, _("Report bugs to bug-gnu-utils@gnu.org\n"));
@@ -1171,7 +1410,7 @@ parse_args (argc, argv)
usage ();
while ((c = getopt_long
- (argc, argv, "ersahldSDw::x:i:vV", options, NULL)) != EOF)
+ (argc, argv, "ersahldSDAIw::x:i:vV", options, NULL)) != EOF)
{
char * cp;
int section;
@@ -1194,12 +1433,16 @@ parse_args (argc, argv)
do_segments ++;
do_version ++;
do_histogram ++;
+ do_arch ++;
break;
case 'e':
do_header ++;
do_sections ++;
do_segments ++;
break;
+ case 'A':
+ do_arch ++;
+ break;
case 'D':
do_using_dynamic ++;
break;
@@ -1221,6 +1464,9 @@ parse_args (argc, argv)
case 'd':
do_dynamic ++;
break;
+ case 'I':
+ do_histogram ++;
+ break;
case 'x':
do_dump ++;
section = strtoul (optarg, & cp, 0);
@@ -1299,7 +1545,7 @@ parse_args (argc, argv)
if (!do_dynamic && !do_syms && !do_reloc && !do_sections
&& !do_segments && !do_header && !do_dump && !do_version
- && !do_histogram && !do_debugging)
+ && !do_histogram && !do_debugging && !do_arch)
usage ();
else if (argc < 3)
{
@@ -1312,12 +1558,16 @@ static const char *
get_elf_class (elf_class)
unsigned char elf_class;
{
+ static char buff [32];
+
switch (elf_class)
{
case ELFCLASSNONE: return _("none");
case ELFCLASS32: return _("ELF32");
case ELFCLASS64: return _("ELF64");
- default: return _("<unknown>");
+ default:
+ sprintf (buff, _("<unknown: %x>"), elf_class);
+ return buff;
}
}
@@ -1325,12 +1575,16 @@ static const char *
get_data_encoding (encoding)
unsigned char encoding;
{
+ static char buff [32];
+
switch (encoding)
{
case ELFDATANONE: return _("none");
- case ELFDATA2LSB: return _("2's compilment, little endian");
- case ELFDATA2MSB: return _("2's compilment, big endian");
- default: return _("<unknown>");
+ case ELFDATA2LSB: return _("2's complement, little endian");
+ case ELFDATA2MSB: return _("2's complement, big endian");
+ default:
+ sprintf (buff, _("<unknown: %x>"), encoding);
+ return buff;
}
}
@@ -1338,12 +1592,16 @@ static const char *
get_osabi_name (osabi)
unsigned char osabi;
{
+ static char buff [32];
+
switch (osabi)
{
case ELFOSABI_SYSV: return _("UNIX - System V");
case ELFOSABI_HPUX: return _("UNIX - HP-UX");
case ELFOSABI_STANDALONE: return _("Standalone App");
- default: return _("<unknown>");
+ default:
+ sprintf (buff, _("<unknown: %x>"), osabi);
+ return buff;
}
}
@@ -1376,8 +1634,11 @@ process_file_header ()
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 ? "(current)" :
- elf_header.e_ident [EI_VERSION] != EV_NONE ? "<unknown>" : "");
+ (elf_header.e_ident [EI_VERSION] == EV_CURRENT
+ ? "(current)"
+ : (elf_header.e_ident [EI_VERSION] != EV_NONE
+ ? "<unknown: %lx>"
+ : "")));
printf (_(" OS/ABI: %s\n"),
get_osabi_name (elf_header.e_ident [EI_OSABI]));
printf (_(" ABI Version: %d\n"),
@@ -1388,8 +1649,6 @@ process_file_header ()
get_machine_name (elf_header.e_machine));
printf (_(" Version: 0x%lx\n"),
(unsigned long) elf_header.e_version);
- printf (_(" Data: %s\n"),
- get_machine_data (elf_header.e_ident [EI_DATA]));
printf (_(" Entry point address: 0x%lx\n"),
(unsigned long) elf_header.e_entry);
printf (_(" Start of program headers: %ld (bytes into file)\n"),
@@ -1412,29 +1671,84 @@ process_file_header ()
printf (_(" Section header string table index: %ld\n"),
(long) elf_header.e_shstrndx);
}
+
+ return 1;
+}
- /* Test class after dumping header so that at least the header can be
- display on 64 bit binaries. */
+
+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;
- binary_class = elf_header.e_ident [EI_CLASS];
- if (binary_class != ELFCLASS32)
+ GET_DATA_ALLOC (elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ phdrs, Elf32_External_Phdr *, "program headers");
+
+ for (i = 0, internal = program_headers, external = phdrs;
+ i < elf_header.e_phnum;
+ i ++, internal ++, external ++)
{
- error (_("Not a 32 bit ELF file\n"));
- return 0;
+ internal->p_type = BYTE_GET (external->p_type);
+ internal->p_offset = BYTE_GET (external->p_offset);
+ internal->p_vaddr = BYTE_GET (external->p_vaddr);
+ internal->p_paddr = BYTE_GET (external->p_paddr);
+ internal->p_filesz = BYTE_GET (external->p_filesz);
+ internal->p_memsz = BYTE_GET (external->p_memsz);
+ internal->p_flags = BYTE_GET (external->p_flags);
+ internal->p_align = BYTE_GET (external->p_align);
}
+ free (phdrs);
+
return 1;
}
+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;
+
+ GET_DATA_ALLOC (elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ phdrs, Elf64_External_Phdr *, "program headers");
+
+ for (i = 0, internal = program_headers, external = phdrs;
+ i < elf_header.e_phnum;
+ i ++, internal ++, external ++)
+ {
+ internal->p_type = BYTE_GET (external->p_type);
+ internal->p_flags = BYTE_GET (external->p_flags);
+ internal->p_offset = BYTE_GET8 (external->p_offset);
+ internal->p_vaddr = BYTE_GET8 (external->p_vaddr);
+ internal->p_paddr = BYTE_GET8 (external->p_paddr);
+ internal->p_filesz = BYTE_GET8 (external->p_filesz);
+ internal->p_memsz = BYTE_GET8 (external->p_memsz);
+ internal->p_align = BYTE_GET8 (external->p_align);
+ }
+
+ free (phdrs);
+
+ return 1;
+}
static int
process_program_headers (file)
FILE * file;
{
- Elf32_External_Phdr * phdrs;
- Elf32_Internal_Phdr * program_headers;
- Elf32_Internal_Phdr * segment;
- unsigned int i;
+ Elf_Internal_Phdr * program_headers;
+ Elf_Internal_Phdr * segment;
+ unsigned int i;
if (elf_header.e_phnum == 0)
{
@@ -1451,12 +1765,8 @@ process_program_headers (file)
elf_header.e_phnum, (unsigned long) elf_header.e_phoff);
}
- GET_DATA_ALLOC (elf_header.e_phoff,
- elf_header.e_phentsize * elf_header.e_phnum,
- phdrs, Elf32_External_Phdr *, "program headers");
-
- program_headers = (Elf32_Internal_Phdr *) malloc
- (elf_header.e_phnum * sizeof (Elf32_Internal_Phdr));
+ program_headers = (Elf_Internal_Phdr *) malloc
+ (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
if (program_headers == NULL)
{
@@ -1464,22 +1774,17 @@ process_program_headers (file)
return 0;
}
- for (i = 0, segment = program_headers;
- i < elf_header.e_phnum;
- i ++, segment ++)
+ if (is_32bit_elf)
+ i = get_32bit_program_headers (file, program_headers);
+ else
+ i = get_64bit_program_headers (file, program_headers);
+
+ if (i == 0)
{
- segment->p_type = BYTE_GET (phdrs[i].p_type);
- segment->p_offset = BYTE_GET (phdrs[i].p_offset);
- segment->p_vaddr = BYTE_GET (phdrs[i].p_vaddr);
- segment->p_paddr = BYTE_GET (phdrs[i].p_paddr);
- segment->p_filesz = BYTE_GET (phdrs[i].p_filesz);
- segment->p_memsz = BYTE_GET (phdrs[i].p_memsz);
- segment->p_flags = BYTE_GET (phdrs[i].p_flags);
- segment->p_align = BYTE_GET (phdrs[i].p_align);
+ free (program_headers);
+ return 0;
}
-
- free (phdrs);
-
+
if (do_segments)
{
printf
@@ -1490,6 +1795,7 @@ process_program_headers (file)
loadaddr = -1;
dynamic_addr = 0;
+ dynamic_size = 0;
for (i = 0, segment = program_headers;
i < elf_header.e_phnum;
@@ -1560,8 +1866,8 @@ process_program_headers (file)
for (i = 0; i < elf_header.e_phnum; i++)
{
- int j;
- Elf32_Internal_Shdr * section;
+ int j;
+ Elf_Internal_Shdr * section;
segment = program_headers + i;
section = section_headers;
@@ -1577,7 +1883,7 @@ process_program_headers (file)
? (section->sh_addr >= segment->p_vaddr
&& section->sh_addr + section->sh_size
<= segment->p_vaddr + segment->p_memsz)
- : (section->sh_offset >= segment->p_offset
+ : ((bfd_vma) section->sh_offset >= segment->p_offset
&& (section->sh_offset + section->sh_size
<= segment->p_offset + segment->p_filesz))))
printf ("%s ", SECTION_NAME (section));
@@ -1594,7 +1900,7 @@ process_program_headers (file)
static int
-get_section_headers (file)
+get_32bit_section_headers (file)
FILE * file;
{
Elf32_External_Shdr * shdrs;
@@ -1605,8 +1911,8 @@ get_section_headers (file)
elf_header.e_shentsize * elf_header.e_shnum,
shdrs, Elf32_External_Shdr *, "section headers");
- section_headers = (Elf32_Internal_Shdr *) malloc
- (elf_header.e_shnum * sizeof (Elf32_Internal_Shdr));
+ section_headers = (Elf_Internal_Shdr *) malloc
+ (elf_header.e_shnum * sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
@@ -1635,8 +1941,50 @@ get_section_headers (file)
return 1;
}
+static int
+get_64bit_section_headers (file)
+ FILE * file;
+{
+ Elf64_External_Shdr * shdrs;
+ Elf64_Internal_Shdr * internal;
+ unsigned int i;
+
+ GET_DATA_ALLOC (elf_header.e_shoff,
+ elf_header.e_shentsize * elf_header.e_shnum,
+ shdrs, Elf64_External_Shdr *, "section headers");
+
+ section_headers = (Elf_Internal_Shdr *) malloc
+ (elf_header.e_shnum * sizeof (Elf_Internal_Shdr));
+
+ if (section_headers == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ for (i = 0, internal = section_headers;
+ i < elf_header.e_shnum;
+ i ++, internal ++)
+ {
+ internal->sh_name = BYTE_GET (shdrs[i].sh_name);
+ internal->sh_type = BYTE_GET (shdrs[i].sh_type);
+ internal->sh_flags = BYTE_GET8 (shdrs[i].sh_flags);
+ internal->sh_addr = BYTE_GET8 (shdrs[i].sh_addr);
+ internal->sh_size = BYTE_GET8 (shdrs[i].sh_size);
+ internal->sh_entsize = BYTE_GET8 (shdrs[i].sh_entsize);
+ internal->sh_link = BYTE_GET (shdrs[i].sh_link);
+ internal->sh_info = BYTE_GET (shdrs[i].sh_info);
+ internal->sh_offset = BYTE_GET (shdrs[i].sh_offset);
+ internal->sh_addralign = BYTE_GET (shdrs[i].sh_addralign);
+ }
+
+ free (shdrs);
+
+ return 1;
+}
+
static Elf_Internal_Sym *
-get_elf_symbols (file, offset, number)
+get_32bit_elf_symbols (file, offset, number)
FILE * file;
unsigned long offset;
unsigned long number;
@@ -1676,12 +2024,53 @@ get_elf_symbols (file, offset, number)
return isyms;
}
+static Elf_Internal_Sym *
+get_64bit_elf_symbols (file, offset, number)
+ FILE * file;
+ unsigned long offset;
+ unsigned long number;
+{
+ Elf64_External_Sym * esyms;
+ Elf_Internal_Sym * isyms;
+ Elf_Internal_Sym * psym;
+ unsigned int j;
+
+ GET_DATA_ALLOC (offset, number * sizeof (Elf64_External_Sym),
+ esyms, Elf64_External_Sym *, "symbols");
+
+ isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
+
+ if (isyms == NULL)
+ {
+ error (_("Out of memory\n"));
+ free (esyms);
+
+ return NULL;
+ }
+
+ for (j = 0, psym = isyms;
+ j < number;
+ j ++, psym ++)
+ {
+ psym->st_name = BYTE_GET (esyms[j].st_name);
+ psym->st_info = BYTE_GET (esyms[j].st_info);
+ psym->st_other = BYTE_GET (esyms[j].st_other);
+ psym->st_shndx = BYTE_GET (esyms[j].st_shndx);
+ psym->st_value = BYTE_GET8 (esyms[j].st_value);
+ psym->st_size = BYTE_GET8 (esyms[j].st_size);
+ }
+
+ free (esyms);
+
+ return isyms;
+}
+
static int
process_section_headers (file)
FILE * file;
{
- Elf32_Internal_Shdr * section;
- int i;
+ Elf_Internal_Shdr * section;
+ int i;
section_headers = NULL;
@@ -1694,10 +2083,15 @@ process_section_headers (file)
}
if (do_sections && !do_header)
- printf (_("There are %d section headers, starting at offset %lx:\n"),
+ printf (_("There are %d section headers, starting at offset 0x%lx:\n"),
elf_header.e_shnum, (unsigned long) elf_header.e_shoff);
- if (! get_section_headers (file))
+ if (is_32bit_elf)
+ {
+ if (! get_32bit_section_headers (file))
+ return 0;
+ }
+ else if (! get_64bit_section_headers (file))
return 0;
/* Read in the string table, so that we have names to display. */
@@ -1718,6 +2112,7 @@ process_section_headers (file)
dynamic_symbols = NULL;
dynamic_strings = NULL;
dynamic_syminfo = NULL;
+
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
i ++, section ++)
@@ -1732,9 +2127,9 @@ process_section_headers (file)
continue;
}
- dynamic_symbols = get_elf_symbols
- (file, section->sh_offset,
- section->sh_size / section->sh_entsize);
+ num_dynamic_syms = section->sh_size / section->sh_entsize;
+ dynamic_symbols =
+ GET_ELF_SYMBOLS (file, section->sh_offset, num_dynamic_syms);
}
else if (section->sh_type == SHT_STRTAB
&& strcmp (name, ".dynstr") == 0)
@@ -1813,6 +2208,8 @@ process_relocs (file)
if (do_using_dynamic)
{
+ int is_rela = FALSE;
+
rel_size = 0;
rel_offset = 0;
@@ -1820,16 +2217,31 @@ process_relocs (file)
{
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])
{
rel_offset = dynamic_info[DT_JMPREL];
rel_size = dynamic_info[DT_PLTRELSZ];
+
+ switch (dynamic_info[DT_PLTREL])
+ {
+ case DT_REL:
+ is_rela = FALSE;
+ break;
+ case DT_RELA:
+ is_rela = TRUE;
+ break;
+ default:
+ is_rela = UNKNOWN;
+ break;
+ }
}
if (rel_size)
@@ -1839,7 +2251,7 @@ process_relocs (file)
rel_offset, rel_size);
dump_relocations (file, rel_offset - loadaddr, rel_size,
- dynamic_symbols, dynamic_strings);
+ dynamic_symbols, num_dynamic_syms, dynamic_strings, is_rela);
}
else
printf (_("\nThere are no dynamic relocations in this file.\n"));
@@ -1867,7 +2279,9 @@ process_relocs (file)
Elf32_Internal_Shdr * symsec;
Elf_Internal_Sym * symtab;
char * strtab;
-
+ int is_rela;
+ unsigned long nsyms;
+
printf (_("\nRelocation section "));
if (string_table == NULL)
@@ -1880,8 +2294,8 @@ process_relocs (file)
symsec = section_headers + section->sh_link;
- symtab = get_elf_symbols (file, symsec->sh_offset,
- symsec->sh_size / symsec->sh_entsize);
+ nsyms = symsec->sh_size / symsec->sh_entsize;
+ symtab = GET_ELF_SYMBOLS (file, symsec->sh_offset, nsyms);
if (symtab == NULL)
continue;
@@ -1890,8 +2304,10 @@ process_relocs (file)
GET_DATA_ALLOC (strsec->sh_offset, strsec->sh_size, strtab,
char *, "string table");
+
+ is_rela = section->sh_type == SHT_RELA;
- dump_relocations (file, rel_offset, rel_size, symtab, strtab);
+ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela);
free (strtab);
free (symtab);
@@ -1977,31 +2393,63 @@ dynamic_segment_mips_val (entry)
}
}
-/* Parse the dynamic segment */
static int
-process_dynamic_segment (file)
+get_32bit_dynamic_segment (file)
FILE * file;
{
- Elf_Internal_Dyn * entry;
- Elf32_External_Dyn * edyn;
- unsigned int i;
+ Elf32_External_Dyn * edyn;
+ Elf_Internal_Dyn * entry;
+ bfd_size_type i;
+
+ GET_DATA_ALLOC (dynamic_addr, dynamic_size,
+ edyn, Elf32_External_Dyn *, "dynamic segment");
+
+ /* SGI's ELF has more than one section in the DYNAMIC segment. Determine
+ 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)
+ ;
- if (dynamic_size == 0)
+ dynamic_segment = (Elf_Internal_Dyn *)
+ malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+
+ if (dynamic_segment == NULL)
{
- if (do_dynamic)
- printf (_("\nThere is no dynamic segment in this file.\n"));
+ error (_("Out of memory\n"));
+ free (edyn);
+ return 0;
+ }
- return 1;
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ i ++, entry ++)
+ {
+ entry->d_tag = BYTE_GET (edyn [i].d_tag);
+ entry->d_un.d_val = BYTE_GET (edyn [i].d_un.d_val);
}
+ free (edyn);
+
+ return 1;
+}
+
+static int
+get_64bit_dynamic_segment (file)
+ FILE * file;
+{
+ Elf64_External_Dyn * edyn;
+ Elf_Internal_Dyn * entry;
+ bfd_size_type i;
+
GET_DATA_ALLOC (dynamic_addr, dynamic_size,
- edyn, Elf32_External_Dyn *, "dynamic segment");
+ edyn, Elf64_External_Dyn *, "dynamic segment");
/* SGI's ELF has more than one section in the DYNAMIC segment. Determine
- how large .dynamic is now. We can do this even before the byte
+ 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 (*(bfd_vma *) edyn [dynamic_size ++].d_tag != DT_NULL)
;
dynamic_segment = (Elf_Internal_Dyn *)
@@ -2018,12 +2466,39 @@ process_dynamic_segment (file)
i < dynamic_size;
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_GET8 (edyn [i].d_tag);
+ entry->d_un.d_val = BYTE_GET8 (edyn [i].d_un.d_val);
}
free (edyn);
+ return 1;
+}
+
+/* Parse and display the contents of the dynamic segment. */
+static int
+process_dynamic_segment (file)
+ FILE * file;
+{
+ Elf_Internal_Dyn * entry;
+ bfd_size_type i;
+
+ if (dynamic_size == 0)
+ {
+ if (do_dynamic)
+ printf (_("\nThere is no dynamic segment in this file.\n"));
+
+ return 1;
+ }
+
+ if (is_32bit_elf)
+ {
+ if (! get_32bit_dynamic_segment (file))
+ return 0;
+ }
+ else if (! get_64bit_dynamic_segment (file))
+ return 0;
+
/* Find the appropriate symbol table. */
if (dynamic_symbols == NULL)
{
@@ -2032,7 +2507,6 @@ process_dynamic_segment (file)
++i, ++ entry)
{
unsigned long offset;
- long num_syms;
if (entry->d_tag != DT_SYMTAB)
continue;
@@ -2043,21 +2517,23 @@ process_dynamic_segment (file)
we default to reading in the entire file (!) and
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!"));
- num_syms = (ftell (file) - offset) / sizeof (Elf32_External_Sym);
+ if (is_32bit_elf)
+ num_dynamic_syms = (ftell (file) - offset) / sizeof (Elf32_External_Sym);
+ else
+ num_dynamic_syms = (ftell (file) - offset) / sizeof (Elf64_External_Sym);
- if (num_syms < 1)
+ if (num_dynamic_syms < 1)
{
error (_("Unable to determine the number of symbols to load\n"));
continue;
}
- dynamic_symbols = get_elf_symbols (file, offset, num_syms);
+ dynamic_symbols = GET_ELF_SYMBOLS (file, offset, num_dynamic_syms);
}
}
@@ -2123,8 +2599,8 @@ process_dynamic_segment (file)
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. */
GET_DATA_ALLOC (dynamic_syminfo_offset, syminsz, extsyminfo,
@@ -2150,8 +2626,8 @@ process_dynamic_segment (file)
}
if (do_dynamic && dynamic_addr)
- printf (_("\nDynamic segment at offset 0x%x contains %d entries:\n"),
- dynamic_addr, dynamic_size);
+ printf (_("\nDynamic segment at offset 0x%x contains %ld entries:\n"),
+ dynamic_addr, (long) dynamic_size);
if (do_dynamic)
printf (_(" Tag Type Name/Value\n"));
@@ -2502,7 +2978,7 @@ process_version_sections (file)
printf (_(" Addr: 0x"));
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
- section->sh_offset, section->sh_link,
+ (unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (section_headers + section->sh_link));
GET_DATA_ALLOC (section->sh_offset, section->sh_size,
@@ -2590,7 +3066,7 @@ process_version_sections (file)
printf (_(" Addr: 0x"));
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link to section: %ld (%s)\n"),
- section->sh_offset, section->sh_link,
+ (unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (section_headers + section->sh_link));
GET_DATA_ALLOC (section->sh_offset, section->sh_size,
@@ -2676,9 +3152,8 @@ process_version_sections (file)
found = 1;
- symbols = get_elf_symbols
- (file, link_section->sh_offset,
- link_section->sh_size / link_section->sh_entsize);
+ symbols = GET_ELF_SYMBOLS (file, link_section->sh_offset,
+ link_section->sh_size / link_section->sh_entsize);
string_sec = section_headers + link_section->sh_link;
@@ -2691,7 +3166,7 @@ process_version_sections (file)
printf (_(" Addr: "));
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
- section->sh_offset, section->sh_link,
+ (unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (link_section));
GET_DATA_ALLOC (version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
@@ -2986,7 +3461,15 @@ get_symbol_type (type)
case STT_FILE: return _("FILE");
default:
if (type >= STT_LOPROC && type <= STT_HIPROC)
- sprintf (buff, _("<processor specific>: %d"), type);
+ {
+ if (elf_header.e_machine == EM_ARM && type == STT_ARM_TFUNC)
+ return _("THUMB_FUNC");
+
+ if (elf_header.e_machine == EM_SPARCV9 && type == STT_REGISTER)
+ return _("REGISTER");
+
+ sprintf (buff, _("<processor specific>: %d"), type);
+ }
else if (type >= STT_LOOS && type <= STT_HIOS)
sprintf (buff, _("<OS specific>: %d"), type);
else
@@ -3069,7 +3552,7 @@ process_symbol_table (file)
Elf32_Internal_Shdr * section;
char nb [4];
char nc [4];
- int nbuckets;
+ int nbuckets = 0;
int nchains;
int * buckets = NULL;
int * chains = NULL;
@@ -3166,7 +3649,7 @@ process_symbol_table (file)
fputs (_(" Num: Value Size Type Bind Ot Ndx Name\n"),
stdout);
- symtab = get_elf_symbols (file, section->sh_offset,
+ symtab = GET_ELF_SYMBOLS (file, section->sh_offset,
section->sh_size / section->sh_entsize);
if (symtab == NULL)
continue;
@@ -3195,14 +3678,7 @@ process_symbol_table (file)
get_symbol_binding (ELF_ST_BIND (psym->st_info)),
psym->st_other);
- if (psym->st_shndx == 0)
- fputs (" UND", stdout);
- else if ((psym->st_shndx & 0xffff) == 0xfff1)
- fputs (" ABS", stdout);
- else if ((psym->st_shndx & 0xffff) == 0xfff2)
- fputs (" COM", stdout);
- else
- printf ("%4x", psym->st_shndx);
+ printf ("%4s", get_symbol_index_type (psym->st_shndx));
printf (" %s", strtab + psym->st_name);
@@ -3411,9 +3887,9 @@ process_symbol_table (file)
static int
process_syminfo (file)
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
- int i;
+ unsigned int i;
if (dynamic_syminfo == NULL
|| !do_dynamic)
@@ -3490,8 +3966,8 @@ dump_section (section, file)
Elf32_Internal_Shdr * section;
FILE * file;
{
- int bytes;
- int addr;
+ bfd_size_type bytes;
+ bfd_vma addr;
unsigned char * data;
unsigned char * start;
@@ -3521,10 +3997,11 @@ dump_section (section, file)
lbytes = (bytes > 16 ? 16 : bytes);
- printf (" 0x%8.8x ", addr);
+ printf (" 0x%8.8lx ", (unsigned long) addr);
switch (elf_header.e_ident [EI_DATA])
{
+ default:
case ELFDATA2LSB:
for (j = 15; j >= 0; j --)
{
@@ -3705,7 +4182,7 @@ static int
display_debug_lines (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
DWARF2_External_LineInfo * external;
DWARF2_Internal_LineInfo info;
@@ -3925,7 +4402,7 @@ static int
display_debug_pubnames (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
DWARF2_External_PubNames * external;
DWARF2_Internal_PubNames pubnames;
@@ -4347,7 +4824,7 @@ static int
display_debug_abbrev (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
abbrev_entry * entry;
unsigned char * end = start + section->sh_size;
@@ -4393,7 +4870,7 @@ display_block (data, length)
printf (_(" %lu byte block: "), length);
while (length --)
- printf ("%lx ", byte_get (data ++, 1));
+ printf ("%lx ", (unsigned long) byte_get (data ++, 1));
return data;
}
@@ -4405,156 +4882,451 @@ decode_location_expression (data, pointer_size)
{
unsigned char op;
int bytes_read;
+ unsigned long uvalue;
op = * data ++;
switch (op)
{
- case DW_OP_addr: printf ("DW_OP_addr: %lx", byte_get (data, pointer_size)); break;
- case DW_OP_deref: printf ("DW_OP_deref"); break;
- case DW_OP_const1u: printf ("DW_OP_const1u: %lu", byte_get (data, 1)); break;
- case DW_OP_const1s: printf ("DW_OP_const1s: %ld", (long) byte_get (data, 1)); break;
- case DW_OP_const2u: printf ("DW_OP_const2u: %lu", byte_get (data, 2)); break;
- case DW_OP_const2s: printf ("DW_OP_const2s: %ld", (long) byte_get (data, 2)); break;
- case DW_OP_const4u: printf ("DW_OP_const4u: %lu", byte_get (data, 4)); break;
- case DW_OP_const4s: printf ("DW_OP_const4s: %ld", (long) byte_get (data, 4)); break;
- case DW_OP_const8u: printf ("DW_OP_const8u: %lu %lu", byte_get (data, 4), byte_get (data + 4, 4)); break;
- case DW_OP_const8s: printf ("DW_OP_const8s: %ld %ld", byte_get (data, 4), byte_get (data + 4, 4)); break;
- case DW_OP_constu: printf ("DW_OP_constu: %lu", read_leb128 (data, NULL, 0)); break;
- case DW_OP_consts: printf ("DW_OP_consts: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_dup: printf ("DW_OP_dup"); break;
- case DW_OP_drop: printf ("DW_OP_drop"); break;
- case DW_OP_over: printf ("DW_OP_over"); break;
- case DW_OP_pick: printf ("DW_OP_pick: %ld", byte_get (data, 1)); break;
- case DW_OP_swap: printf ("DW_OP_swap"); break;
- case DW_OP_rot: printf ("DW_OP_rot"); break;
- case DW_OP_xderef: printf ("DW_OP_xderef"); break;
- case DW_OP_abs: printf ("DW_OP_abs"); break;
- case DW_OP_and: printf ("DW_OP_and"); break;
- case DW_OP_div: printf ("DW_OP_div"); break;
- case DW_OP_minus: printf ("DW_OP_minus"); break;
- case DW_OP_mod: printf ("DW_OP_mod"); break;
- case DW_OP_mul: printf ("DW_OP_mul"); break;
- case DW_OP_neg: printf ("DW_OP_neg"); break;
- case DW_OP_not: printf ("DW_OP_not"); break;
- case DW_OP_or: printf ("DW_OP_or"); break;
- case DW_OP_plus: printf ("DW_OP_plus"); break;
- case DW_OP_plus_uconst: printf ("DW_OP_plus_uconst: %lu", read_leb128 (data, NULL, 0)); break;
- case DW_OP_shl: printf ("DW_OP_shl"); break;
- case DW_OP_shr: printf ("DW_OP_shr"); break;
- case DW_OP_shra: printf ("DW_OP_shra"); break;
- case DW_OP_xor: printf ("DW_OP_xor"); break;
- case DW_OP_bra: printf ("DW_OP_bra: %ld", byte_get (data, 2)); break;
- case DW_OP_eq: printf ("DW_OP_eq"); break;
- case DW_OP_ge: printf ("DW_OP_ge"); break;
- case DW_OP_gt: printf ("DW_OP_gt"); break;
- case DW_OP_le: printf ("DW_OP_le"); break;
- case DW_OP_lt: printf ("DW_OP_lt"); break;
- case DW_OP_ne: printf ("DW_OP_ne"); break;
- case DW_OP_skip: printf ("DW_OP_skip: %ld", byte_get (data, 2)); break;
- case DW_OP_lit0: printf ("DW_OP_lit0"); break;
- case DW_OP_lit1: printf ("DW_OP_lit1"); break;
- case DW_OP_lit2: printf ("DW_OP_lit2"); break;
- case DW_OP_lit3: printf ("DW_OP_lit3"); break;
- case DW_OP_lit4: printf ("DW_OP_lit4"); break;
- case DW_OP_lit5: printf ("DW_OP_lit5"); break;
- case DW_OP_lit6: printf ("DW_OP_lit6"); break;
- case DW_OP_lit7: printf ("DW_OP_lit7"); break;
- case DW_OP_lit8: printf ("DW_OP_lit8"); break;
- case DW_OP_lit9: printf ("DW_OP_lit9"); break;
- case DW_OP_lit10: printf ("DW_OP_lit10"); break;
- case DW_OP_lit11: printf ("DW_OP_lit11"); break;
- case DW_OP_lit12: printf ("DW_OP_lit12"); break;
- case DW_OP_lit13: printf ("DW_OP_lit13"); break;
- case DW_OP_lit14: printf ("DW_OP_lit14"); break;
- case DW_OP_lit15: printf ("DW_OP_lit15"); break;
- case DW_OP_lit16: printf ("DW_OP_lit16"); break;
- case DW_OP_lit17: printf ("DW_OP_lit17"); break;
- case DW_OP_lit18: printf ("DW_OP_lit18"); break;
- case DW_OP_lit19: printf ("DW_OP_lit19"); break;
- case DW_OP_lit20: printf ("DW_OP_lit20"); break;
- case DW_OP_lit21: printf ("DW_OP_lit21"); break;
- case DW_OP_lit22: printf ("DW_OP_lit22"); break;
- case DW_OP_lit23: printf ("DW_OP_lit23"); break;
- case DW_OP_lit24: printf ("DW_OP_lit24"); break;
- case DW_OP_lit25: printf ("DW_OP_lit25"); break;
- case DW_OP_lit26: printf ("DW_OP_lit26"); break;
- case DW_OP_lit27: printf ("DW_OP_lit27"); break;
- case DW_OP_lit28: printf ("DW_OP_lit28"); break;
- case DW_OP_lit29: printf ("DW_OP_lit29"); break;
- case DW_OP_lit30: printf ("DW_OP_lit30"); break;
- case DW_OP_lit31: printf ("DW_OP_lit31"); break;
- case DW_OP_reg0: printf ("DW_OP_reg0"); break;
- case DW_OP_reg1: printf ("DW_OP_reg1"); break;
- case DW_OP_reg2: printf ("DW_OP_reg2"); break;
- case DW_OP_reg3: printf ("DW_OP_reg3"); break;
- case DW_OP_reg4: printf ("DW_OP_reg4"); break;
- case DW_OP_reg5: printf ("DW_OP_reg5"); break;
- case DW_OP_reg6: printf ("DW_OP_reg6"); break;
- case DW_OP_reg7: printf ("DW_OP_reg7"); break;
- case DW_OP_reg8: printf ("DW_OP_reg8"); break;
- case DW_OP_reg9: printf ("DW_OP_reg9"); break;
- case DW_OP_reg10: printf ("DW_OP_reg10"); break;
- case DW_OP_reg11: printf ("DW_OP_reg11"); break;
- case DW_OP_reg12: printf ("DW_OP_reg12"); break;
- case DW_OP_reg13: printf ("DW_OP_reg13"); break;
- case DW_OP_reg14: printf ("DW_OP_reg14"); break;
- case DW_OP_reg15: printf ("DW_OP_reg15"); break;
- case DW_OP_reg16: printf ("DW_OP_reg16"); break;
- case DW_OP_reg17: printf ("DW_OP_reg17"); break;
- case DW_OP_reg18: printf ("DW_OP_reg18"); break;
- case DW_OP_reg19: printf ("DW_OP_reg19"); break;
- case DW_OP_reg20: printf ("DW_OP_reg20"); break;
- case DW_OP_reg21: printf ("DW_OP_reg21"); break;
- case DW_OP_reg22: printf ("DW_OP_reg22"); break;
- case DW_OP_reg23: printf ("DW_OP_reg23"); break;
- case DW_OP_reg24: printf ("DW_OP_reg24"); break;
- case DW_OP_reg25: printf ("DW_OP_reg25"); break;
- case DW_OP_reg26: printf ("DW_OP_reg26"); break;
- case DW_OP_reg27: printf ("DW_OP_reg27"); break;
- case DW_OP_reg28: printf ("DW_OP_reg28"); break;
- case DW_OP_reg29: printf ("DW_OP_reg29"); break;
- case DW_OP_reg30: printf ("DW_OP_reg30"); break;
- case DW_OP_reg31: printf ("DW_OP_reg31"); break;
- case DW_OP_breg0: printf ("DW_OP_breg0: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg1: printf ("DW_OP_breg1: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg2: printf ("DW_OP_breg2: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg3: printf ("DW_OP_breg3: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg4: printf ("DW_OP_breg4: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg5: printf ("DW_OP_breg5: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg6: printf ("DW_OP_breg6: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg7: printf ("DW_OP_breg7: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg8: printf ("DW_OP_breg8: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg9: printf ("DW_OP_breg9: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg10: printf ("DW_OP_breg10: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg11: printf ("DW_OP_breg11: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg12: printf ("DW_OP_breg12: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg13: printf ("DW_OP_breg13: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg14: printf ("DW_OP_breg14: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg15: printf ("DW_OP_breg15: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg16: printf ("DW_OP_breg16: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg17: printf ("DW_OP_breg17: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg18: printf ("DW_OP_breg18: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg19: printf ("DW_OP_breg19: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg20: printf ("DW_OP_breg20: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg21: printf ("DW_OP_breg21: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg22: printf ("DW_OP_breg22: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg23: printf ("DW_OP_breg23: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg24: printf ("DW_OP_breg24: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg25: printf ("DW_OP_breg25: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg26: printf ("DW_OP_breg26: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg27: printf ("DW_OP_breg27: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg28: printf ("DW_OP_breg28: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg29: printf ("DW_OP_breg29: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg30: printf ("DW_OP_breg30: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_breg31: printf ("DW_OP_breg31: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_regx: printf ("DW_OP_regx: %lu", read_leb128 (data, NULL, 0)); break;
- case DW_OP_fbreg: printf ("DW_OP_fbreg: %ld", read_leb128 (data, NULL, 1)); break;
- case DW_OP_bregx: printf ("DW_OP_bregx: %lu %ld", read_leb128 (data, & bytes_read, 0), read_leb128 (data + bytes_read, NULL, 1)); break;
- case DW_OP_piece: printf ("DW_OP_piece: %lu", read_leb128 (data, NULL, 0)); break;
- case DW_OP_deref_size: printf ("DW_OP_deref_size: %ld", byte_get (data, 1)); break;
- case DW_OP_xderef_size: printf ("DW_OP_xderef_size: %ld", byte_get (data, 1)); break;
- case DW_OP_nop: printf ("DW_OP_nop"); break;
+ case DW_OP_addr:
+ printf ("DW_OP_addr: %lx", (unsigned long) byte_get (data, pointer_size));
+ break;
+ case DW_OP_deref:
+ printf ("DW_OP_deref");
+ break;
+ case DW_OP_const1u:
+ printf ("DW_OP_const1u: %lu", (unsigned long) byte_get (data, 1));
+ break;
+ case DW_OP_const1s:
+ printf ("DW_OP_const1s: %ld", (long) byte_get (data, 1));
+ break;
+ case DW_OP_const2u:
+ printf ("DW_OP_const2u: %lu", (unsigned long) byte_get (data, 2));
+ break;
+ case DW_OP_const2s:
+ printf ("DW_OP_const2s: %ld", (long) byte_get (data, 2));
+ break;
+ case DW_OP_const4u:
+ printf ("DW_OP_const4u: %lu", (unsigned long) byte_get (data, 4));
+ break;
+ case DW_OP_const4s:
+ printf ("DW_OP_const4s: %ld", (long) byte_get (data, 4));
+ break;
+ case DW_OP_const8u:
+ printf ("DW_OP_const8u: %lu %lu", (unsigned long) byte_get (data, 4),
+ (unsigned long) byte_get (data + 4, 4));
+ break;
+ case DW_OP_const8s:
+ printf ("DW_OP_const8s: %ld %ld", (long) byte_get (data, 4),
+ (long) byte_get (data + 4, 4));
+ break;
+ case DW_OP_constu:
+ printf ("DW_OP_constu: %lu", read_leb128 (data, NULL, 0));
+ break;
+ case DW_OP_consts:
+ printf ("DW_OP_consts: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_dup:
+ printf ("DW_OP_dup");
+ break;
+ case DW_OP_drop:
+ printf ("DW_OP_drop");
+ break;
+ case DW_OP_over:
+ printf ("DW_OP_over");
+ break;
+ case DW_OP_pick:
+ printf ("DW_OP_pick: %ld", (unsigned long) byte_get (data, 1));
+ break;
+ case DW_OP_swap:
+ printf ("DW_OP_swap");
+ break;
+ case DW_OP_rot:
+ printf ("DW_OP_rot");
+ break;
+ case DW_OP_xderef:
+ printf ("DW_OP_xderef");
+ break;
+ case DW_OP_abs:
+ printf ("DW_OP_abs");
+ break;
+ case DW_OP_and:
+ printf ("DW_OP_and");
+ break;
+ case DW_OP_div:
+ printf ("DW_OP_div");
+ break;
+ case DW_OP_minus:
+ printf ("DW_OP_minus");
+ break;
+ case DW_OP_mod:
+ printf ("DW_OP_mod");
+ break;
+ case DW_OP_mul:
+ printf ("DW_OP_mul");
+ break;
+ case DW_OP_neg:
+ printf ("DW_OP_neg");
+ break;
+ case DW_OP_not:
+ printf ("DW_OP_not");
+ break;
+ case DW_OP_or:
+ printf ("DW_OP_or");
+ break;
+ case DW_OP_plus:
+ printf ("DW_OP_plus");
+ break;
+ case DW_OP_plus_uconst:
+ printf ("DW_OP_plus_uconst: %lu", read_leb128 (data, NULL, 0));
+ break;
+ case DW_OP_shl:
+ printf ("DW_OP_shl");
+ break;
+ case DW_OP_shr:
+ printf ("DW_OP_shr");
+ break;
+ case DW_OP_shra:
+ printf ("DW_OP_shra");
+ break;
+ case DW_OP_xor:
+ printf ("DW_OP_xor");
+ break;
+ case DW_OP_bra:
+ printf ("DW_OP_bra: %ld", (long) byte_get (data, 2));
+ break;
+ case DW_OP_eq:
+ printf ("DW_OP_eq");
+ break;
+ case DW_OP_ge:
+ printf ("DW_OP_ge");
+ break;
+ case DW_OP_gt:
+ printf ("DW_OP_gt");
+ break;
+ case DW_OP_le:
+ printf ("DW_OP_le");
+ break;
+ case DW_OP_lt:
+ printf ("DW_OP_lt");
+ break;
+ case DW_OP_ne:
+ printf ("DW_OP_ne");
+ break;
+ case DW_OP_skip:
+ printf ("DW_OP_skip: %ld", (long) byte_get (data, 2));
+ break;
+ case DW_OP_lit0:
+ printf ("DW_OP_lit0");
+ break;
+ case DW_OP_lit1:
+ printf ("DW_OP_lit1");
+ break;
+ case DW_OP_lit2:
+ printf ("DW_OP_lit2");
+ break;
+ case DW_OP_lit3:
+ printf ("DW_OP_lit3");
+ break;
+ case DW_OP_lit4:
+ printf ("DW_OP_lit4");
+ break;
+ case DW_OP_lit5:
+ printf ("DW_OP_lit5");
+ break;
+ case DW_OP_lit6:
+ printf ("DW_OP_lit6");
+ break;
+ case DW_OP_lit7:
+ printf ("DW_OP_lit7");
+ break;
+ case DW_OP_lit8:
+ printf ("DW_OP_lit8");
+ break;
+ case DW_OP_lit9:
+ printf ("DW_OP_lit9");
+ break;
+ case DW_OP_lit10:
+ printf ("DW_OP_lit10");
+ break;
+ case DW_OP_lit11:
+ printf ("DW_OP_lit11");
+ break;
+ case DW_OP_lit12:
+ printf ("DW_OP_lit12");
+ break;
+ case DW_OP_lit13:
+ printf ("DW_OP_lit13");
+ break;
+ case DW_OP_lit14:
+ printf ("DW_OP_lit14");
+ break;
+ case DW_OP_lit15:
+ printf ("DW_OP_lit15");
+ break;
+ case DW_OP_lit16:
+ printf ("DW_OP_lit16");
+ break;
+ case DW_OP_lit17:
+ printf ("DW_OP_lit17");
+ break;
+ case DW_OP_lit18:
+ printf ("DW_OP_lit18");
+ break;
+ case DW_OP_lit19:
+ printf ("DW_OP_lit19");
+ break;
+ case DW_OP_lit20:
+ printf ("DW_OP_lit20");
+ break;
+ case DW_OP_lit21:
+ printf ("DW_OP_lit21");
+ break;
+ case DW_OP_lit22:
+ printf ("DW_OP_lit22");
+ break;
+ case DW_OP_lit23:
+ printf ("DW_OP_lit23");
+ break;
+ case DW_OP_lit24:
+ printf ("DW_OP_lit24");
+ break;
+ case DW_OP_lit25:
+ printf ("DW_OP_lit25");
+ break;
+ case DW_OP_lit26:
+ printf ("DW_OP_lit26");
+ break;
+ case DW_OP_lit27:
+ printf ("DW_OP_lit27");
+ break;
+ case DW_OP_lit28:
+ printf ("DW_OP_lit28");
+ break;
+ case DW_OP_lit29:
+ printf ("DW_OP_lit29");
+ break;
+ case DW_OP_lit30:
+ printf ("DW_OP_lit30");
+ break;
+ case DW_OP_lit31:
+ printf ("DW_OP_lit31");
+ break;
+ case DW_OP_reg0:
+ printf ("DW_OP_reg0");
+ break;
+ case DW_OP_reg1:
+ printf ("DW_OP_reg1");
+ break;
+ case DW_OP_reg2:
+ printf ("DW_OP_reg2");
+ break;
+ case DW_OP_reg3:
+ printf ("DW_OP_reg3");
+ break;
+ case DW_OP_reg4:
+ printf ("DW_OP_reg4");
+ break;
+ case DW_OP_reg5:
+ printf ("DW_OP_reg5");
+ break;
+ case DW_OP_reg6:
+ printf ("DW_OP_reg6");
+ break;
+ case DW_OP_reg7:
+ printf ("DW_OP_reg7");
+ break;
+ case DW_OP_reg8:
+ printf ("DW_OP_reg8");
+ break;
+ case DW_OP_reg9:
+ printf ("DW_OP_reg9");
+ break;
+ case DW_OP_reg10:
+ printf ("DW_OP_reg10");
+ break;
+ case DW_OP_reg11:
+ printf ("DW_OP_reg11");
+ break;
+ case DW_OP_reg12:
+ printf ("DW_OP_reg12");
+ break;
+ case DW_OP_reg13:
+ printf ("DW_OP_reg13");
+ break;
+ case DW_OP_reg14:
+ printf ("DW_OP_reg14");
+ break;
+ case DW_OP_reg15:
+ printf ("DW_OP_reg15");
+ break;
+ case DW_OP_reg16:
+ printf ("DW_OP_reg16");
+ break;
+ case DW_OP_reg17:
+ printf ("DW_OP_reg17");
+ break;
+ case DW_OP_reg18:
+ printf ("DW_OP_reg18");
+ break;
+ case DW_OP_reg19:
+ printf ("DW_OP_reg19");
+ break;
+ case DW_OP_reg20:
+ printf ("DW_OP_reg20");
+ break;
+ case DW_OP_reg21:
+ printf ("DW_OP_reg21");
+ break;
+ case DW_OP_reg22:
+ printf ("DW_OP_reg22");
+ break;
+ case DW_OP_reg23:
+ printf ("DW_OP_reg23");
+ break;
+ case DW_OP_reg24:
+ printf ("DW_OP_reg24");
+ break;
+ case DW_OP_reg25:
+ printf ("DW_OP_reg25");
+ break;
+ case DW_OP_reg26:
+ printf ("DW_OP_reg26");
+ break;
+ case DW_OP_reg27:
+ printf ("DW_OP_reg27");
+ break;
+ case DW_OP_reg28:
+ printf ("DW_OP_reg28");
+ break;
+ case DW_OP_reg29:
+ printf ("DW_OP_reg29");
+ break;
+ case DW_OP_reg30:
+ printf ("DW_OP_reg30");
+ break;
+ case DW_OP_reg31:
+ printf ("DW_OP_reg31");
+ break;
+ case DW_OP_breg0:
+ printf ("DW_OP_breg0: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg1:
+ printf ("DW_OP_breg1: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg2:
+ printf ("DW_OP_breg2: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg3:
+ printf ("DW_OP_breg3: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg4:
+ printf ("DW_OP_breg4: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg5:
+ printf ("DW_OP_breg5: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg6:
+ printf ("DW_OP_breg6: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg7:
+ printf ("DW_OP_breg7: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg8:
+ printf ("DW_OP_breg8: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg9:
+ printf ("DW_OP_breg9: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg10:
+ printf ("DW_OP_breg10: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg11:
+ printf ("DW_OP_breg11: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg12:
+ printf ("DW_OP_breg12: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg13:
+ printf ("DW_OP_breg13: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg14:
+ printf ("DW_OP_breg14: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg15:
+ printf ("DW_OP_breg15: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg16:
+ printf ("DW_OP_breg16: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg17:
+ printf ("DW_OP_breg17: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg18:
+ printf ("DW_OP_breg18: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg19:
+ printf ("DW_OP_breg19: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg20:
+ printf ("DW_OP_breg20: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg21:
+ printf ("DW_OP_breg21: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg22:
+ printf ("DW_OP_breg22: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg23:
+ printf ("DW_OP_breg23: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg24:
+ printf ("DW_OP_breg24: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg25:
+ printf ("DW_OP_breg25: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg26:
+ printf ("DW_OP_breg26: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg27:
+ printf ("DW_OP_breg27: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg28:
+ printf ("DW_OP_breg28: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg29:
+ printf ("DW_OP_breg29: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg30:
+ printf ("DW_OP_breg30: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_breg31:
+ printf ("DW_OP_breg31: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_regx:
+ printf ("DW_OP_regx: %lu", read_leb128 (data, NULL, 0));
+ break;
+ case DW_OP_fbreg:
+ printf ("DW_OP_fbreg: %ld", read_leb128 (data, NULL, 1));
+ break;
+ case DW_OP_bregx:
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ printf ("DW_OP_bregx: %lu %ld", uvalue,
+ read_leb128 (data + bytes_read, NULL, 1));
+ break;
+ case DW_OP_piece:
+ printf ("DW_OP_piece: %lu", read_leb128 (data, NULL, 0));
+ break;
+ case DW_OP_deref_size:
+ printf ("DW_OP_deref_size: %ld", (long) byte_get (data, 1));
+ break;
+ case DW_OP_xderef_size:
+ printf ("DW_OP_xderef_size: %ld", (long) byte_get (data, 1));
+ break;
+ case DW_OP_nop:
+ printf ("DW_OP_nop");
+ break;
default:
if (op >= DW_OP_lo_user
@@ -4574,8 +5346,8 @@ read_and_display_attr (attribute, form, data, pointer_size)
unsigned char * data;
unsigned long pointer_size;
{
- unsigned long uvalue;
- unsigned char * block_start;
+ unsigned long uvalue = 0;
+ unsigned char * block_start = NULL;
int bytes_read;
int is_ref = 0;
@@ -4626,7 +5398,7 @@ read_and_display_attr (attribute, form, data, pointer_size)
case DW_FORM_data8:
uvalue = byte_get (data, 4);
printf (" %lx", uvalue);
- printf (" %lx", byte_get (data + 4, 4));
+ printf (" %lx", (unsigned long) byte_get (data + 4, 4));
data += 8;
break;
@@ -4896,7 +5668,7 @@ display_debug_info (section, start, file)
while (tags < start)
{
int bytes_read;
- int abbrev_number;
+ unsigned long abbrev_number;
abbrev_entry * entry;
abbrev_attr * attr;
@@ -4919,12 +5691,12 @@ display_debug_info (section, start, file)
if (entry == NULL)
{
- warn (_("Unable to locate entry %d in the abbreviation table\n"),
+ warn (_("Unable to locate entry %lu in the abbreviation table\n"),
abbrev_number);
return 0;
}
- printf (_(" <%d><%x>: Abbrev Number: %d (%s)\n"),
+ printf (_(" <%d><%x>: Abbrev Number: %lu (%s)\n"),
level, tags - section_begin - bytes_read,
abbrev_number,
get_TAG_name (entry->tag));
@@ -4949,7 +5721,7 @@ static int
display_debug_aranges (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
- FILE * file;
+ FILE * file ATTRIBUTE_UNUSED;
{
unsigned char * end = start + section->sh_size;
@@ -5009,8 +5781,8 @@ display_debug_aranges (section, start, file)
static int
display_debug_not_supported (section, start, file)
Elf32_Internal_Shdr * section;
- unsigned char * start;
- FILE * file;
+ 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));
@@ -5138,9 +5910,9 @@ process_mips_fpe_exception (mask)
static int
process_mips_specific (file)
- FILE *file;
+ FILE * file;
{
- Elf_Internal_Dyn *entry;
+ Elf_Internal_Dyn * entry;
size_t liblist_offset = 0;
size_t liblistno = 0;
size_t conflictsno = 0;
@@ -5176,7 +5948,7 @@ process_mips_specific (file)
if (liblist_offset != 0 && liblistno != 0 && do_dynamic)
{
- Elf32_External_Lib *elib;
+ Elf32_External_Lib * elib;
size_t cnt;
GET_DATA_ALLOC (liblist_offset, liblistno * sizeof (Elf32_External_Lib),
@@ -5222,7 +5994,7 @@ process_mips_specific (file)
{ " DELTA", LL_DELTA }
};
int flags = liblist.l_flags;
- int fcnt;
+ size_t fcnt;
for (fcnt = 0;
fcnt < sizeof (l_flags_vals) / sizeof (l_flags_vals[0]);
@@ -5244,10 +6016,10 @@ 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;
@@ -5270,7 +6042,7 @@ process_mips_specific (file)
option = iopt;
while (offset < sect->sh_size)
{
- Elf_External_Options *eoption;
+ Elf_External_Options * eoption;
eoption = (Elf_External_Options *) ((char *) eopt + offset);
@@ -5324,16 +6096,16 @@ 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);
- reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);
+ reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);
reginfo.ri_cprmask[0] = BYTE_GET (ereg->ri_cprmask[0]);
reginfo.ri_cprmask[1] = BYTE_GET (ereg->ri_cprmask[1]);
reginfo.ri_cprmask[2] = BYTE_GET (ereg->ri_cprmask[2]);
reginfo.ri_cprmask[3] = BYTE_GET (ereg->ri_cprmask[3]);
- reginfo.ri_gp_value = BYTE_GET (ereg->ri_gp_value);
+ reginfo.ri_gp_value = BYTE_GET8 (ereg->ri_gp_value);
printf ("GPR %08lx GP 0x",
reginfo.ri_gprmask);
@@ -5438,9 +6210,9 @@ process_mips_specific (file)
if (conflicts_offset != 0 && conflictsno != 0)
{
- Elf32_External_Conflict *econf32;
- Elf64_External_Conflict *econf64;
- Elf32_Conflict *iconf;
+ Elf32_External_Conflict * econf32;
+ Elf64_External_Conflict * econf64;
+ Elf32_Conflict * iconf;
size_t cnt;
if (dynamic_symbols == NULL)
@@ -5456,7 +6228,7 @@ process_mips_specific (file)
return 0;
}
- if (binary_class == ELFCLASS32)
+ if (is_32bit_elf)
{
GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf32),
econf32, Elf32_External_Conflict *, "conflict");
@@ -5478,7 +6250,7 @@ process_mips_specific (file)
for (cnt = 0; cnt < conflictsno; ++cnt)
{
- Elf_Internal_Sym *psym = &dynamic_symbols[iconf[cnt]];
+ Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];
printf ("%5u: %8lu %#10lx %s\n",
cnt, iconf[cnt], (unsigned long) psym->st_value,
@@ -5494,8 +6266,11 @@ process_mips_specific (file)
static int
process_arch_specific (file)
- FILE *file;
+ FILE * file;
{
+ if (! do_arch)
+ return 1;
+
switch (elf_header.e_machine)
{
case EM_MIPS:
@@ -5512,31 +6287,76 @@ static int
get_file_header (file)
FILE * file;
{
- Elf32_External_Ehdr ehdr;
-
- if (fread (& ehdr, sizeof (ehdr), 1, file) != 1)
+ /* Read in the identity array. */
+ if (fread (elf_header.e_ident, EI_NIDENT, 1, file) != 1)
return 0;
- memcpy (elf_header.e_ident, ehdr.e_ident, EI_NIDENT);
+ /* Determine how to read the rest of the header. */
+ 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;
+ }
+
+ /* For now we only support 32 bit and 64 bit ELF files. */
+ is_32bit_elf = (elf_header.e_ident [EI_CLASS] != ELFCLASS64);
+
+ /* Read in the rest of the header. */
+ if (is_32bit_elf)
+ {
+ Elf32_External_Ehdr ehdr32;
- if (elf_header.e_ident [EI_DATA] == ELFDATA2LSB)
- byte_get = byte_get_little_endian;
+ if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT, 1, file) != 1)
+ return 0;
+
+ elf_header.e_type = BYTE_GET (ehdr32.e_type);
+ elf_header.e_machine = BYTE_GET (ehdr32.e_machine);
+ elf_header.e_version = BYTE_GET (ehdr32.e_version);
+ elf_header.e_entry = BYTE_GET (ehdr32.e_entry);
+ elf_header.e_phoff = BYTE_GET (ehdr32.e_phoff);
+ elf_header.e_shoff = BYTE_GET (ehdr32.e_shoff);
+ elf_header.e_flags = BYTE_GET (ehdr32.e_flags);
+ elf_header.e_ehsize = BYTE_GET (ehdr32.e_ehsize);
+ elf_header.e_phentsize = BYTE_GET (ehdr32.e_phentsize);
+ elf_header.e_phnum = BYTE_GET (ehdr32.e_phnum);
+ elf_header.e_shentsize = BYTE_GET (ehdr32.e_shentsize);
+ elf_header.e_shnum = BYTE_GET (ehdr32.e_shnum);
+ elf_header.e_shstrndx = BYTE_GET (ehdr32.e_shstrndx);
+ }
else
- byte_get = byte_get_big_endian;
-
- elf_header.e_entry = BYTE_GET (ehdr.e_entry);
- elf_header.e_phoff = BYTE_GET (ehdr.e_phoff);
- elf_header.e_shoff = BYTE_GET (ehdr.e_shoff);
- elf_header.e_version = BYTE_GET (ehdr.e_version);
- elf_header.e_flags = BYTE_GET (ehdr.e_flags);
- elf_header.e_type = BYTE_GET (ehdr.e_type);
- elf_header.e_machine = BYTE_GET (ehdr.e_machine);
- elf_header.e_ehsize = BYTE_GET (ehdr.e_ehsize);
- elf_header.e_phentsize = BYTE_GET (ehdr.e_phentsize);
- elf_header.e_phnum = BYTE_GET (ehdr.e_phnum);
- elf_header.e_shentsize = BYTE_GET (ehdr.e_shentsize);
- elf_header.e_shnum = BYTE_GET (ehdr.e_shnum);
- elf_header.e_shstrndx = BYTE_GET (ehdr.e_shstrndx);
+ {
+ Elf64_External_Ehdr ehdr64;
+
+ /* 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. */
+ if (sizeof (bfd_vma) < 8)
+ {
+ error (_("This instance of readelf has been built without support for a\n"));
+ error (_("64 bit data type and so it cannot read 64 bit ELF files.\n"));
+ return 0;
+ }
+
+ if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT, 1, file) != 1)
+ return 0;
+
+ elf_header.e_type = BYTE_GET (ehdr64.e_type);
+ elf_header.e_machine = BYTE_GET (ehdr64.e_machine);
+ elf_header.e_version = BYTE_GET (ehdr64.e_version);
+ elf_header.e_entry = BYTE_GET8 (ehdr64.e_entry);
+ elf_header.e_phoff = BYTE_GET8 (ehdr64.e_phoff);
+ elf_header.e_shoff = BYTE_GET8 (ehdr64.e_shoff);
+ elf_header.e_flags = BYTE_GET (ehdr64.e_flags);
+ elf_header.e_ehsize = BYTE_GET (ehdr64.e_ehsize);
+ elf_header.e_phentsize = BYTE_GET (ehdr64.e_phentsize);
+ elf_header.e_phnum = BYTE_GET (ehdr64.e_phnum);
+ elf_header.e_shentsize = BYTE_GET (ehdr64.e_shentsize);
+ elf_header.e_shnum = BYTE_GET (ehdr64.e_shnum);
+ elf_header.e_shstrndx = BYTE_GET (ehdr64.e_shstrndx);
+ }
return 1;
}
@@ -5628,6 +6448,7 @@ process_file (file_name)
{
free (dynamic_symbols);
dynamic_symbols = NULL;
+ num_dynamic_syms = 0;
}
if (dynamic_syminfo)
@@ -5639,8 +6460,8 @@ process_file (file_name)
#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 */
+ fix this so that we insert symbolic addresses here, esp for GOT/PLT
+ symbols */
void
print_address (unsigned int addr, FILE * outfile)
diff --git a/binutils/rename.c b/binutils/rename.c
index fdc7263..78ea9fd 100644
--- a/binutils/rename.c
+++ b/binutils/rename.c
@@ -31,6 +31,12 @@
#endif /* HAVE_UTIMES */
#endif /* ! HAVE_GOOD_UTIME_H */
+/* We need to open the file in binary modes on system where that makes
+ a difference. */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
static int simple_copy PARAMS ((const char *, const char *));
/* The number of bytes to copy at once. */
@@ -48,10 +54,14 @@ simple_copy (from, to)
int saved;
char buf[COPY_BUF];
- fromfd = open (from, O_RDONLY);
+ fromfd = open (from, O_RDONLY | O_BINARY);
if (fromfd < 0)
return -1;
+#ifdef O_CREAT
+ tofd = open (to, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0777);
+#else
tofd = creat (to, 0777);
+#endif
if (tofd < 0)
{
saved = errno;
@@ -139,17 +149,17 @@ smart_rename (from, to, preserve_dates)
const char *to;
int preserve_dates;
{
- int exists;
+ boolean exists;
struct stat s;
int ret = 0;
- exists = lstat (to, &s);
+ exists = lstat (to, &s) == 0;
#if defined (_WIN32) && !defined (__CYGWIN32__)
/* Win32, unlike unix, will not erase `to' in `rename(from, to)' but
fail instead. Also, chown is not present. */
- if (exists == 0)
+ if (exists)
remove (to);
ret = rename (from, to);
@@ -163,7 +173,7 @@ smart_rename (from, to, preserve_dates)
#else
/* Use rename only if TO is not a symbolic link and has
only one hard link. */
- if (exists < 0 || (!S_ISLNK (s.st_mode) && s.st_nlink == 1))
+ if (! exists || (!S_ISLNK (s.st_mode) && s.st_nlink == 1))
{
ret = rename (from, to);
if (ret == 0)
diff --git a/binutils/rescoff.c b/binutils/rescoff.c
index 9a028c7..fe2487a 100644
--- a/binutils/rescoff.c
+++ b/binutils/rescoff.c
@@ -447,9 +447,14 @@ write_coff_file (filename, target, resources)
if (! bfd_set_format (abfd, bfd_object))
bfd_fatal ("bfd_set_format");
+#ifdef DLLTOOL_ARM
+ if (! bfd_set_arch_mach (abfd, bfd_arch_arm, 0))
+ bfd_fatal ("bfd_set_arch_mach(arm)");
+#else
/* FIXME: This is obviously i386 specific. */
if (! bfd_set_arch_mach (abfd, bfd_arch_i386, 0))
- bfd_fatal ("bfd_set_arch_mach");
+ bfd_fatal ("bfd_set_arch_mach(i386)");
+#endif /* arm */
if (! bfd_set_file_flags (abfd, HAS_SYMS | HAS_RELOC))
bfd_fatal ("bfd_set_file_flags");
diff --git a/binutils/resrc.c b/binutils/resrc.c
index 9ba3c11..c633c2a 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -1,5 +1,5 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -112,6 +112,8 @@ static int icons;
/* Local functions. */
+static FILE *look_for_default PARAMS ((char *, const char *, int,
+ const char *, const char *));
static void close_pipe PARAMS ((void));
static void unexpected_eof PARAMS ((const char *));
static int get_word PARAMS ((FILE *, const char *));
@@ -120,6 +122,55 @@ static void get_data
PARAMS ((FILE *, unsigned char *, unsigned long, const char *));
static void define_fontdirs PARAMS ((void));
+/* 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;
+{
+ char *space;
+ int found;
+ struct stat s;
+
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s", DEFAULT_PREPROCESSOR);
+ space = strchr (cmd + end_prefix, ' ');
+ if (space)
+ *space = 0;
+
+ if (strchr (cmd, '/'))
+ {
+ found = (stat (cmd, &s) == 0
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0
+#endif
+ );
+
+ if (! found)
+ {
+ if (verbose)
+ fprintf (stderr, "Tried `%s'\n", cmd);
+ return NULL;
+ }
+ }
+
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s %s %s",
+ DEFAULT_PREPROCESSOR, preprocargs, filename);
+
+ if (verbose)
+ fprintf (stderr, "Using `%s'\n", cmd);
+
+ cpp_pipe = popen (cmd, FOPEN_RT);
+ return cpp_pipe;
+}
+
/* Read an rc file. */
struct res_directory *
@@ -131,21 +182,81 @@ read_rc_file (filename, preprocessor, preprocargs, language)
{
char *cmd;
- if (preprocessor == NULL)
- preprocessor = DEFAULT_PREPROCESSOR;
-
if (preprocargs == NULL)
preprocargs = "";
if (filename == NULL)
filename = "-";
- cmd = xmalloc (strlen (preprocessor)
- + strlen (preprocargs)
- + strlen (filename)
- + 10);
- sprintf (cmd, "%s %s %s", preprocessor, preprocargs, filename);
+ if (preprocessor)
+ {
+ cmd = xmalloc (strlen (preprocessor)
+ + strlen (preprocargs)
+ + strlen (filename)
+ + 10);
+ sprintf (cmd, "%s %s %s", preprocessor, preprocargs, filename);
- cpp_pipe = popen (cmd, FOPEN_RT);
+ cpp_pipe = popen (cmd, FOPEN_RT);
+ }
+ else
+ {
+ char *dash, *slash, *cp;
+
+ preprocessor = DEFAULT_PREPROCESSOR;
+
+ cmd = xmalloc (strlen (program_name)
+ + strlen (preprocessor)
+ + strlen (preprocargs)
+ + strlen (filename)
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ + strlen (EXECUTABLE_SUFFIX)
+#endif
+ + 10);
+
+
+ dash = slash = 0;
+ for (cp = program_name; *cp; cp++)
+ {
+ if (*cp == '-')
+ dash = cp;
+ if (
+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
+ *cp == ':' || *cp == '\\' ||
+#endif
+ *cp == '/')
+ {
+ slash = cp;
+ dash = 0;
+ }
+ }
+
+ cpp_pipe = 0;
+
+ if (dash)
+ {
+ /* First, try looking for a prefixed gcc in the windres
+ directory, with the same prefix as windres */
+
+ cpp_pipe = look_for_default (cmd, program_name, dash-program_name+1,
+ preprocargs, filename);
+ }
+
+ if (slash && !cpp_pipe)
+ {
+ /* Next, try looking for a gcc in the same directory as
+ that windres */
+
+ cpp_pipe = look_for_default (cmd, program_name, slash-program_name+1,
+ preprocargs, filename);
+ }
+
+ if (!cpp_pipe)
+ {
+ /* Sigh, try the default */
+
+ cpp_pipe = look_for_default (cmd, "", 0, preprocargs, filename);
+ }
+
+ }
if (cpp_pipe == NULL)
fatal (_("can't popen `%s': %s"), cmd, strerror (errno));
free (cmd);
diff --git a/binutils/size.c b/binutils/size.c
index f57c7ed..c93850c 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -366,9 +366,9 @@ static bfd_size_type textsize;
static void
berkeley_sum (abfd, sec, ignore)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
flagword flags;
bfd_size_type size;
@@ -433,9 +433,9 @@ int svi_sizelen = 0;
static void
sysv_internal_sizer (file, sec, ignore)
- bfd *file;
+ bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec)
@@ -454,9 +454,9 @@ sysv_internal_sizer (file, sec, ignore)
static void
sysv_internal_printer (file, sec, ignore)
- bfd *file;
+ bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec)
diff --git a/binutils/stabs.c b/binutils/stabs.c
index a47b3bd..53e1070 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse stabs debugging information
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -375,7 +375,7 @@ warn_stab (p, err)
/*ARGSUSED*/
PTR
start_stab (dhandle, abfd, sections, syms, symcount)
- PTR dhandle;
+ PTR dhandle ATTRIBUTE_UNUSED;
bfd *abfd;
boolean sections;
asymbol **syms;
@@ -1316,14 +1316,21 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
bad_stab (orig);
return DEBUG_TYPE_NULL;
}
- while (q1 != NULL && p > q1 && p[1] == ':')
+ if (q1 != NULL && p > q1 && p[1] == ':')
{
- q2 = strchr (q1, '>');
- if (q2 == NULL || q2 < p)
- break;
- p += 2;
- p = strchr (p, ':');
- if (p == NULL)
+ int nest = 0;
+
+ for (q2 = q1; *q2 != '\0'; ++q2)
+ {
+ if (*q2 == '<')
+ ++nest;
+ else if (*q2 == '>')
+ --nest;
+ else if (*q2 == ':' && nest == 0)
+ break;
+ }
+ p = q2;
+ if (*p != ':')
{
bad_stab (orig);
return DEBUG_TYPE_NULL;
@@ -1811,7 +1818,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
return debug_make_int_type (dhandle, 1, true);
else if (n3 == 0xffff)
return debug_make_int_type (dhandle, 2, true);
- else if (n3 == 0xffffffff)
+ else if (n3 == (bfd_signed_vma) 0xffffffff)
return debug_make_int_type (dhandle, 4, true);
#ifdef BFD64
else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff))
@@ -3432,7 +3439,7 @@ stab_find_type (dhandle, info, typenums)
static boolean
stab_record_type (dhandle, info, typenums, type)
- PTR dhandle;
+ PTR dhandle ATTRIBUTE_UNUSED;
struct stab_handle *info;
const int *typenums;
debug_type type;
@@ -4506,7 +4513,7 @@ stab_demangle_template (minfo, pp, pname)
static boolean
stab_demangle_class (minfo, pp, pstart)
- struct stab_demangle_info *minfo;
+ struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
const char **pp;
const char **pstart;
{
@@ -4785,6 +4792,7 @@ stab_demangle_type (minfo, pp, ptype)
case 'O':
{
boolean memberp, constp, volatilep;
+ debug_type class_type = DEBUG_TYPE_NULL;
debug_type *args;
boolean varargs;
unsigned int n;
@@ -4797,19 +4805,40 @@ stab_demangle_type (minfo, pp, ptype)
varargs = false;
++*pp;
- if (! isdigit ((unsigned char) **pp))
+ if (isdigit ((unsigned char) **pp))
{
- stab_bad_demangle (orig);
- return false;
+ n = stab_demangle_count (pp);
+ if (strlen (*pp) < n)
+ {
+ stab_bad_demangle (orig);
+ return false;
+ }
+ name = *pp;
+ *pp += n;
+
+ if (ptype != NULL)
+ {
+ class_type = stab_find_tagged_type (minfo->dhandle,
+ minfo->info,
+ name, (int) n,
+ DEBUG_KIND_CLASS);
+ if (class_type == DEBUG_TYPE_NULL)
+ return false;
+ }
+ }
+ else if (**pp == 'Q')
+ {
+ if (! stab_demangle_qualified (minfo, pp,
+ (ptype == NULL
+ ? (debug_type *) NULL
+ : &class_type)))
+ return false;
}
- n = stab_demangle_count (pp);
- if (strlen (*pp) < n)
+ else
{
stab_bad_demangle (orig);
return false;
}
- name = *pp;
- *pp += n;
if (memberp)
{
@@ -4851,14 +4880,6 @@ stab_demangle_type (minfo, pp, ptype)
if (ptype != NULL)
{
- debug_type class_type;
-
- class_type = stab_find_tagged_type (minfo->dhandle, minfo->info,
- name, (int) n,
- DEBUG_KIND_CLASS);
- if (class_type == DEBUG_TYPE_NULL)
- return false;
-
if (! memberp)
*ptype = debug_make_offset_type (minfo->dhandle, class_type,
*ptype);
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 15a0577..2e9f2ea 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,25 @@
+1999-06-29 Nick Clifton <nickc@cygnus.com>
+
+ * binutils-all/objdump.exp: Add fr30 and MCore to expected cpus
+ list.
+
+ * binutils-all/readelf.r: Do not assume a fixed number of spaces
+ in the output.
+
+1999-06-10 Nick Clifton <nickc@cygnus.com>
+
+ * binutils-all/readelf.wi: Update to match latest output.
+ * binutils-all/readelf.h: Update to match latest output.
+
+Wed Jun 9 11:59:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * binutils-all/objdump.exp: Tighten regexp to match `objdump -i'
+ output to avoid massive exponential behaviour.
+
+1999-05-28 Ian Lance Taylor <ian@zembu.com>
+
+ * binutils-all/readelf.h: Update for changes of 1999-04-08.
+
1999-03-12 Nick Clifton <nickc@cygnus.com>
* binutils-all/readelf.wi: Remove FR30 specific componnts.
diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index 7c50f02..3bfb34c 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -33,14 +33,14 @@ send_user "Version [binutil_version $OBJDUMP]"
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -i"]
-set cpus_expected "(a29k|alliant|alpha|arc|arm|convex|d10v|d30v|h8|hppa|i386|i860|i960|m32r|m68k|m88k|mips|mn10200|mn10300|ns32k|powerpc|pyramid|romp|rs6000|sh|sparc|tahoe|v850|vax|we32k|z8k|z8001|z8002)"
+set cpus_expected "(a29k|alliant|alpha|arc|arm|convex|d10v|d30v|fr30|h8|hppa|i386|i860|i960|m32r|m68k|m88k|MCore|mips|mn10200|mn10300|ns32k|powerpc|pyramid|romp|rs6000|sh|sparc|tahoe|v850|vax|we32k|z8k|z8001|z8002)"
# Make sure the target CPU shows up in the list.
if ![regexp $cpus_expected $target_cpu] {
regsub "^\[(\]" "$cpus_expected" "(${target_cpu}|" cpus_expected;
}
-set want "BFD header file version.*srec.*header .* endian.*, data .* endian.*$cpus_expected"
+set want "BFD header file version.*srec\[^\n\]*\n\[^\n\]*header \[^\n\]*endian\[^\n\]*, data \[^\n\]*endian.*$cpus_expected"
if [regexp $want $got] then {
pass "objdump -i"
diff --git a/binutils/testsuite/binutils-all/readelf.h b/binutils/testsuite/binutils-all/readelf.h
index 555afe9..810eab5 100644
--- a/binutils/testsuite/binutils-all/readelf.h
+++ b/binutils/testsuite/binutils-all/readelf.h
@@ -1,9 +1,13 @@
ELF Header:
- Magic: 7f 45 4c 46 0[12] 0[12] 01 00 00 00 00 00 00 00 00 00
+ Magic: 7f 45 4c 46 0[12] 0[12] 01 .. 00 00 00 00 00 00 00 00
+ Class: ELF[36][24]
+ Data: 2's complement,.* endian
+ Version: 1 \(current\)
+ OS/ABI: .*
+ ABI Version: .*
Type: REL \(Relocatable file\)
Machine: .*
Version: 0x1
- Data: ELFDATA.* endian\)
Entry point address: 0x0
Start of program headers: 0 \(bytes into file\)
Start of section headers: .* \(bytes into file\)
diff --git a/binutils/testsuite/binutils-all/readelf.r b/binutils/testsuite/binutils-all/readelf.r
index 4bea721..1349659 100644
--- a/binutils/testsuite/binutils-all/readelf.r
+++ b/binutils/testsuite/binutils-all/readelf.r
@@ -1,4 +1,4 @@
Relocation section '.rel.*text' at offset 0x.* contains 1 entries:
Offset Info Type Symbol's Value Symbol's Name.*
- 00000004 00.* R_.* 00000000 external_symbol.*
+ 00000004 00.* R_.*00000000 external_symbol.*
diff --git a/binutils/testsuite/binutils-all/readelf.wi b/binutils/testsuite/binutils-all/readelf.wi
index 3cb2ecc..e022fff 100644
--- a/binutils/testsuite/binutils-all/readelf.wi
+++ b/binutils/testsuite/binutils-all/readelf.wi
@@ -5,7 +5,7 @@ The section .debug_info contains:
Version: 2
Abbrev Offset: 0
Pointer Size: 4
- Abbrev Number: 1 \(DW_TAG_compile_unit\)
+ <.><.*>: Abbrev Number: 1 \(DW_TAG_compile_unit\)
DW_AT_name : .*/testprog.c
DW_AT_comp_dir : .*/binutils
DW_AT_producer : GNU C .*
@@ -13,66 +13,64 @@ The section .debug_info contains:
DW_AT_low_pc : 0
DW_AT_high_pc : .*
DW_AT_stmt_list : 0
- Abbrev Number: 2 \(DW_TAG_subprogram\)
+ <.><.*>: Abbrev Number: 2 \(DW_TAG_subprogram\)
DW_AT_external : 1
DW_AT_name : fn
DW_AT_decl_file : 1
- DW_AT_decl_line : a
+ DW_AT_decl_line : 10
DW_AT_type : .*
DW_AT_low_pc : 0
DW_AT_high_pc : .*
DW_AT_frame_base : 1 byte block: .*
- Abbrev Number: 3 \(DW_TAG_base_type\)
+ <.><.*>: Abbrev Number: 3 \(DW_TAG_base_type\)
DW_AT_name : int
DW_AT_byte_size : 4
DW_AT_encoding : 5 \(signed\)
- Abbrev Number: 4 \(DW_TAG_subprogram\)
+ <.><.*>: Abbrev Number: 4 \(DW_TAG_subprogram\)
DW_AT_sibling : .*
DW_AT_external : 1
DW_AT_name : main
DW_AT_decl_file : 1
- DW_AT_decl_line : 10
+ DW_AT_decl_line : 16
DW_AT_type : .*
DW_AT_low_pc : .*
DW_AT_high_pc : .*
DW_AT_frame_base : 1 byte block: .*
- Abbrev Number: 5 \(DW_TAG_lexical_block\)
+ <.><.*>: Abbrev Number: 5 \(DW_TAG_lexical_block\)
DW_AT_low_pc : .*
DW_AT_high_pc : .*
-
- Extra data at end of comp unit:
- .*: Abbrev Number: 6 \(DW_TAG_variable\)
+ <.><.*>: Abbrev Number: 6 \(DW_TAG_variable\)
DW_AT_name : common
DW_AT_decl_file : 1
DW_AT_decl_line : 3
- DW_AT_type : .*
+ DW_AT_type : <.*>
DW_AT_external : 1
- DW_AT_location : 5 byte block: 3 . 0 0 0 \(DW_OP_addr: 0\)
- .*: Abbrev Number: 6 \(DW_TAG_variable\)
+ DW_AT_location : 5 byte block: 3 0 0 0 0 \(DW_OP_addr: 0\)
+ <.><.*>: Abbrev Number: 6 \(DW_TAG_variable\)
DW_AT_name : global
DW_AT_decl_file : 1
DW_AT_decl_line : 4
- DW_AT_type : .*
+ DW_AT_type : <.*>
DW_AT_external : 1
- DW_AT_location : 5 byte block: 3 . 0 0 0 \(DW_OP_addr: 0\)
- .*: Abbrev Number: 7 \(DW_TAG_variable\)
+ DW_AT_location : 5 byte block: 3 0 0 0 0 \(DW_OP_addr: 0\)
+ <.><.*>: Abbrev Number: 7 \(DW_TAG_variable\)
DW_AT_name : local
DW_AT_decl_file : 1
DW_AT_decl_line : 5
- DW_AT_type : .*
+ DW_AT_type : <.*>
DW_AT_location : 5 byte block: 3 . 0 0 . \(DW_OP_addr: .\)
- .*: Abbrev Number: 8 \(DW_TAG_array_type\)
- DW_AT_sibling : .*
- DW_AT_type : .*
- .*: Abbrev Number: 9 \(DW_TAG_subrange_type\)
+ <.><.*>: Abbrev Number: 8 \(DW_TAG_array_type\)
+ DW_AT_sibling : <.*>
+ DW_AT_type : <.*>
+ <.><.*>: Abbrev Number: 9 \(DW_TAG_subrange_type\)
DW_AT_upper_bound : 6
- .*: Abbrev Number: 3 \(DW_TAG_base_type\)
+ <.><.*>: Abbrev Number: 3 \(DW_TAG_base_type\)
DW_AT_name : char
DW_AT_byte_size : 1
- DW_AT_encoding : . \(.* char\)
- .*: Abbrev Number: 7 \(DW_TAG_variable\)
+ DW_AT_encoding : 8 \(unsigned char\)
+ <.><.*>: Abbrev Number: 7 \(DW_TAG_variable\)
DW_AT_name : string
DW_AT_decl_file : 1
DW_AT_decl_line : 6
- DW_AT_type : .*
+ DW_AT_type : <.*>
DW_AT_location : 5 byte block: 3 . 0 0 . \(DW_OP_addr: .\)
diff --git a/binutils/windres.c b/binutils/windres.c
index 7de28c2..0ccd909 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -46,6 +46,10 @@
#include <ctype.h>
#include <time.h>
+/* used by resrc.c at least */
+
+int verbose = 0;
+
/* An enumeration of format types. */
enum res_format
@@ -122,6 +126,7 @@ static const struct option long_options[] =
{"output-format", required_argument, 0, 'O'},
{"preprocessor", required_argument, 0, OPTION_PREPROCESSOR},
{"target", required_argument, 0, 'F'},
+ {"verbose", no_argument, 0, 'v'},
{"version", no_argument, 0, OPTION_VERSION},
{"yydebug", no_argument, 0, OPTION_YYDEBUG},
{0, no_argument, 0, 0}
@@ -705,7 +710,9 @@ Options:\n\
-F TARGET, --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\
- --define SYM[=VAL] Define SYM when preprocessing rc file\n\
+ -DSYM[=VAL], --define SYM[=VAL]\n\
+ Define SYM when preprocessing rc file\n\
+ -v Verbose - tells you what it's doing\n\
--language VAL Set language when reading rc file\n"));
#ifdef YYDEBUG
fprintf (stream, _("\
@@ -724,6 +731,34 @@ No input-file is stdin, default rc. No output-file is stdout, default rc.\n"));
exit (status);
}
+/* Quote characters that will confuse the shell when we run the preprocessor */
+static const char *quot (string)
+ const char *string;
+{
+ static char *buf = 0;
+ static int buflen = 0;
+ int slen = strlen (string);
+ const char *src;
+ char *dest;
+
+ if ((buflen < slen * 2 + 2) || !buf)
+ {
+ buflen = slen * 2 + 2;
+ if (buf)
+ free (buf);
+ buf = (char *) xmalloc (buflen);
+ }
+
+ for (src=string, dest=buf; *src; src++, dest++)
+ {
+ if (*src == '(' || *src == ')' || *src == ' ')
+ *dest++ = '\\';
+ *dest = *src;
+ }
+ *dest = 0;
+ return buf;
+}
+
/* The main function. */
int
@@ -739,6 +774,7 @@ main (argc, argv)
char *target;
char *preprocessor;
char *preprocargs;
+ const char *quotedarg;
int language;
struct res_directory *resources;
@@ -765,7 +801,7 @@ main (argc, argv)
preprocargs = NULL;
language = -1;
- while ((c = getopt_long (argc, argv, "i:o:I:O:F:", long_options,
+ while ((c = getopt_long (argc, argv, "i:o:I:O:F:D:v", long_options,
(int *) 0)) != EOF)
{
switch (c)
@@ -794,35 +830,44 @@ main (argc, argv)
preprocessor = optarg;
break;
+ case 'D':
case OPTION_DEFINE:
if (preprocargs == NULL)
{
- preprocargs = xmalloc (strlen (optarg) + 3);
- sprintf (preprocargs, "-D%s", optarg);
+ quotedarg = quot (optarg);
+ preprocargs = xmalloc (strlen (quotedarg) + 3);
+ sprintf (preprocargs, "-D%s", quotedarg);
}
else
{
char *n;
- n = xmalloc (strlen (preprocargs) + strlen (optarg) + 4);
- sprintf (n, "%s -D%s", preprocargs, optarg);
+ quotedarg = quot (optarg);
+ n = xmalloc (strlen (preprocargs) + strlen (quotedarg) + 4);
+ sprintf (n, "%s -D%s", preprocargs, quotedarg);
free (preprocargs);
preprocargs = n;
}
break;
+ case 'v':
+ verbose ++;
+ break;
+
case OPTION_INCLUDE_DIR:
if (preprocargs == NULL)
{
- preprocargs = xmalloc (strlen (optarg) + 3);
- sprintf (preprocargs, "-I%s", optarg);
+ quotedarg = quot (optarg);
+ preprocargs = xmalloc (strlen (quotedarg) + 3);
+ sprintf (preprocargs, "-I%s", quotedarg);
}
else
{
char *n;
- n = xmalloc (strlen (preprocargs) + strlen (optarg) + 4);
- sprintf (n, "%s -I%s", preprocargs, optarg);
+ quotedarg = quot (optarg);
+ n = xmalloc (strlen (preprocargs) + strlen (quotedarg) + 4);
+ sprintf (n, "%s -I%s", preprocargs, quotedarg);
free (preprocargs);
preprocargs = n;
}
diff --git a/binutils/windres.h b/binutils/windres.h
index a3c789a..db43dd5 100644
--- a/binutils/windres.h
+++ b/binutils/windres.h
@@ -742,6 +742,8 @@ struct bindata
unsigned char *data;
};
+extern int verbose;
+
/* Function declarations. */
extern struct res_directory *read_rc_file
diff --git a/binutils/wrstabs.c b/binutils/wrstabs.c
index e428174..8b51587 100644
--- a/binutils/wrstabs.c
+++ b/binutils/wrstabs.c
@@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -984,7 +984,7 @@ static boolean
stab_function_type (p, argcount, varargs)
PTR p;
int argcount;
- boolean varargs;
+ boolean varargs ATTRIBUTE_UNUSED;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
int i;
@@ -2383,7 +2383,7 @@ stab_end_block (p, addr)
/*ARGSUSED*/
static boolean
stab_end_function (p)
- PTR p;
+ PTR p ATTRIBUTE_UNUSED;
{
return true;
}