aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog16
-rw-r--r--bfd/Makefile.am24
-rw-r--r--bfd/Makefile.in96
-rw-r--r--bfd/acconfig.h15
-rw-r--r--bfd/archive.c6
-rw-r--r--bfd/coff-a29k.c10
-rw-r--r--bfd/coff-arm.c57
-rwxr-xr-xbfd/configure1961
-rw-r--r--bfd/configure.in8
-rw-r--r--bfd/doc/Makefile.in67
-rw-r--r--bfd/elf.c41
-rw-r--r--bfd/elf32-v850.c36
-rw-r--r--bfd/elf64-alpha.c8
-rw-r--r--bfd/elfcode.h25
-rw-r--r--bfd/elflink.h12
-rw-r--r--bfd/evax-egsd.c2
-rw-r--r--bfd/evax-emh.c2
-rw-r--r--bfd/evax-etir.c46
-rw-r--r--bfd/evax-misc.c6
-rw-r--r--bfd/libbfd-in.h46
-rw-r--r--bfd/libbfd.h35
-rw-r--r--bfd/peicode.h112
-rw-r--r--bfd/po/Make-in250
-rw-r--r--bfd/po/POTFILES.in200
-rw-r--r--bfd/syms.c459
25 files changed, 2959 insertions, 581 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 565f935..e75a9f8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,19 @@
+Tue Apr 21 21:19:36 1998 Tom Tromey <tromey@scribbles.cygnus.com>
+
+ * Many files: Added gettext invocations around user-visible
+ strings.
+ * libbfd-in.h: Added gettext includes and defines.
+ * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
+ HAVE_LC_MESSAGES): Define.
+ * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
+ po/Makefile.
+ * Makefile.am (SUBDIRS): Added po.
+ (POTFILES): New macro.
+ (po/POTFILES.in): New target.
+ (SOURCE_HFILES): New macro.
+ (HFILES): Use it.
+ * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
+
Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* elfcore.h (bfd_prstatus): Copy core_prstatus from the first
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 097924b..6550937 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -6,7 +6,7 @@ INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
DEP = mkdep
-SUBDIRS = doc
+SUBDIRS = doc po
docdir = doc
@@ -391,13 +391,23 @@ CFILES = \
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
-HFILES = \
+## This is a list of all .h files which are in the source tree.
+SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \
- ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
+ ecoffswap.h elf32-hppa.h \
elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \
libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
- libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
- targmatch.h
+ libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h
+
+HFILES = \
+ elf32-target.h elf64-target.h targmatch.h \
+ $(SOURCE_HFILES)
+
+POTFILES = $(CFILES) $(SOURCE_HFILES)
+
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
diststuff: info
@@ -424,8 +434,8 @@ ofiles: stamp-ofiles ; @true
libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles`
-libbfd_la_LDFLAGS = -release $(VERSION)
+libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
+libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
# directory so that we don't have to convert all the programs that use
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 19bbe11..50f379c 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DISTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -62,30 +64,53 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
+AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
NM = @NM@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
TDEFINES = @TDEFINES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WIN32LDFLAGS = @WIN32LDFLAGS@
+WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
bfd_machines = @bfd_machines@
+l = @l@
tdefaults = @tdefaults@
wordsize = @wordsize@
@@ -95,7 +120,7 @@ INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
DEP = mkdep
-SUBDIRS = doc
+SUBDIRS = doc po
docdir = doc
@@ -480,13 +505,18 @@ CFILES = \
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
-HFILES = \
+SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \
- ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
+ ecoffswap.h elf32-hppa.h \
elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \
libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
- libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
- targmatch.h
+ libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h
+
+HFILES = \
+ elf32-target.h elf64-target.h targmatch.h \
+ $(SOURCE_HFILES)
+
+POTFILES = $(CFILES) $(SOURCE_HFILES)
# Various kinds of .o files to put in libbfd.a:
# BFD_BACKENDS Routines the configured targets need.
@@ -496,8 +526,8 @@ OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles`
-libbfd_la_LDFLAGS = -release $(VERSION)
+libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
+libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
# directory so that we don't have to convert all the programs that use
@@ -555,14 +585,14 @@ GZIP = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
-default: all
+all: all-recursive-am all-am
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -655,18 +685,18 @@ maintainer-clean-libLTLIBRARIES:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(libdir)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
+ echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
- $(NORMAL_UNINSTALL)
+ @$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$$p; \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
@@ -815,12 +845,10 @@ install: install-recursive install-exec-am install-data-am
uninstall: uninstall-recursive uninstall-am
-all: all-recursive-am all-am
-
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs: installdirs-recursive
- $(mkinstalldirs) $(libdir)
+ $(mkinstalldirs) $(DATADIR)$(libdir)
mostlyclean-generic:
@@ -869,19 +897,19 @@ maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "it deletes files that may require special tools to rebuild."
-rm -f config.status
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstLIBRARIES \
-distclean-noinstLIBRARIES clean-noinstLIBRARIES \
-maintainer-clean-noinstLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \
+distclean-libLTLIBRARIES clean-libLTLIBRARIES \
+maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \
+install-libLTLIBRARIES install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
installcheck install-info all-recursive-am all-am install-exec-am \
@@ -891,6 +919,10 @@ clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
diststuff: info
stamp-ofiles: Makefile
diff --git a/bfd/acconfig.h b/bfd/acconfig.h
index 1d5e819..12a5fc9 100644
--- a/bfd/acconfig.h
+++ b/bfd/acconfig.h
@@ -32,3 +32,18 @@
/* Do we really want to use mmap if it's available? */
#undef USE_MMAP
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define as 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
diff --git a/bfd/archive.c b/bfd/archive.c
index 33ef321..10bf43c 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1699,7 +1699,7 @@ _bfd_write_archive_contents (arch)
if (bfd_update_armap_timestamp (arch))
break;
(*_bfd_error_handler)
- ("Warning: writing archive was slow: rewriting timestamp\n");
+ (_("Warning: writing archive was slow: rewriting timestamp\n"));
}
while (++tries < 6);
}
@@ -1970,7 +1970,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
bfd_flush (arch);
if (bfd_stat (arch, &archstat) == -1)
{
- perror ("Reading archive file mod timestamp");
+ perror (_("Reading archive file mod timestamp"));
return true; /* Can't read mod time for some reason */
}
if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp)
@@ -1994,7 +1994,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
!= sizeof (hdr.ar_date)))
{
/* FIXME: bfd can't call perror. */
- perror ("Writing updated armap timestamp");
+ perror (_("Writing updated armap timestamp"));
return true; /* Some error while writing */
}
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index 7b783f0..bbf23ee 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -118,7 +118,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
if ((part1_consth_active) && (r_type != R_IHCONST))
{
part1_consth_active = false;
- *error_message = (char *) "Missing IHCONST";
+ *error_message = (char *) _("Missing IHCONST");
return(bfd_reloc_dangerous);
}
@@ -178,7 +178,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
/* consth, part 2
Now relocate the reference */
if (part1_consth_active == false) {
- *error_message = (char *) "Missing IHIHALF";
+ *error_message = (char *) _("Missing IHIHALF");
return(bfd_reloc_dangerous);
}
/* sym_ptr_ptr = r_symndx, in coff_slurp_reloc_table() */
@@ -210,7 +210,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
bfd_put_32(abfd, insn, hit_data);
break;
default:
- *error_message = "Unrecognized reloc";
+ *error_message = _("Unrecognized reloc");
return (bfd_reloc_dangerous);
}
@@ -403,7 +403,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
if (hihalf)
{
if (! ((*info->callbacks->reloc_dangerous)
- (info, "missing IHCONST reloc", input_bfd,
+ (info, _("missing IHCONST reloc"), input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
hihalf = false;
@@ -494,7 +494,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
if (! hihalf)
{
if (! ((*info->callbacks->reloc_dangerous)
- (info, "missing IHIHALF reloc", input_bfd,
+ (info, _("missing IHIHALF reloc"), input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
hihalf_val = 0;
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index a64e0be..c8f6aab 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -865,7 +865,7 @@ find_thumb_glue (info, name, input_bfd)
(coff_hash_table (info), tmp_name, false, false, true);
if (myh == NULL)
- _bfd_error_handler ("%s: unable to find THUMB glue '%s' for `%s'",
+ _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
bfd_get_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -893,7 +893,7 @@ find_arm_glue (info, name, input_bfd)
(coff_hash_table (info), tmp_name, false, false, true);
if (myh == NULL)
- _bfd_error_handler ("%s: unable to find ARM glue '%s' for `%s'",
+ _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
bfd_get_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -1146,10 +1146,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& ! INTERWORK_FLAG (h_sec->owner))
{
_bfd_error_handler
- ("%s(%s): warning: interworking not enabled.",
+ (_("%s(%s): warning: interworking not enabled."),
bfd_get_filename (h_sec->owner), name);
_bfd_error_handler
- (" first occurrence: %s: arm call to thumb",
+ (_(" first occurrence: %s: arm call to thumb"),
bfd_get_filename (input_bfd));
}
@@ -1233,10 +1233,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& ! INTERWORK_FLAG (h_sec->owner))
{
_bfd_error_handler
- ("%s(%s): warning: interworking not enabled.",
+ (_("%s(%s): warning: interworking not enabled."),
bfd_get_filename (h_sec->owner), name);
_bfd_error_handler
- (" first occurrence: %s: thumb call to arm",
+ (_(" first occurrence: %s: thumb call to arm"),
bfd_get_filename (input_bfd));
}
@@ -1503,7 +1503,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- ("%s: bad reloc address 0x%lx in section `%s'",
+ (_("%s: bad reloc address 0x%lx in section `%s'"),
bfd_get_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
@@ -1951,7 +1951,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (APCS_26_FLAG (obfd) != APCS_26_FLAG (ibfd))
{
_bfd_error_handler
- ("%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d",
+ (_("%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"),
bfd_get_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
);
@@ -1962,11 +1962,14 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd))
{
- _bfd_error_handler
- ("%s: ERROR: passes floats in %s registers whereas target %s uses %s registers",
- bfd_get_filename (ibfd), APCS_FLOAT_FLAG (ibfd) ? "float" : "integer",
- bfd_get_filename (obfd), APCS_FLOAT_FLAG (obfd) ? "float" : "integer"
- );
+ const char *msg;
+
+ if (APCS_FLOAT_FLAG (ibfd))
+ msg = _("%s: ERROR: passes floats in float registers whereas target %s uses integer registers");
+ else
+ msg = _("%s: ERROR: passes floats in integer registers whereas target %s uses float registers");
+ _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -1974,11 +1977,14 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (PIC_FLAG (obfd) != PIC_FLAG (ibfd))
{
- _bfd_error_handler
- ("%s: ERROR: compiled as %s code, whereas target %s is %s",
- bfd_get_filename (ibfd), PIC_FLAG (ibfd) ? "position independent" : "absoluste position",
- bfd_get_filename (obfd), PIC_FLAG (obfd) ? "position independent" : "absoluste position"
- );
+ const char *msg;
+
+ if (PIC_FLAG (ibfd))
+ msg = _("%s: ERROR: compiled as position independent code, whereas target %s is absolute position");
+ else
+ msg = _("%s: ERROR: compiled as absolute position code, whereas target %s is position independent");
+ _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -2001,13 +2007,14 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
/* If the src and dest differ in their interworking issue a warning. */
if (INTERWORK_FLAG (obfd) != INTERWORK_FLAG (ibfd))
{
- _bfd_error_handler
- ("Warning: input file %s %s interworking, whereas %s does%s",
- bfd_get_filename (ibfd),
- INTERWORK_FLAG (ibfd) ? "supports" : "does not support",
- bfd_get_filename (obfd),
- INTERWORK_FLAG (obfd) ? "." : " not."
- );
+ const char *msg;
+
+ if (INTERWORK_FLAG (ibfd))
+ msg = _("Warning: input file %s supports internetworking, whereas %s does not.");
+ else
+ msg = _("Warning: input file %s does not support internetworking, whereas %s does.");
+ _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ bfd_get_filename (obfd));
}
}
else
diff --git a/bfd/configure b/bfd/configure
index 266cc7f..b946010 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -32,6 +32,10 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -588,7 +592,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:592: checking host system type" >&5
+echo "configure:596: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -609,7 +613,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:613: checking target system type" >&5
+echo "configure:617: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -627,7 +631,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:631: checking build system type" >&5
+echo "configure:635: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -652,7 +656,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:656: checking for $ac_word" >&5
+echo "configure:660: 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
@@ -681,7 +685,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:685: checking for $ac_word" >&5
+echo "configure:689: 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
@@ -729,7 +733,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:737: 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.
@@ -739,11 +743,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 743 "configure"
+#line 747 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -763,12 +767,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:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:771: 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:772: checking whether we are using GNU C" >&5
+echo "configure:776: 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
@@ -777,7 +781,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$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:785: \"$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
@@ -792,7 +796,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:796: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:800: 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
@@ -820,7 +824,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:824: checking for POSIXized ISC" >&5
+echo "configure:828: 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
@@ -853,7 +857,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:857: checking for a BSD compatible install" >&5
+echo "configure:861: 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
@@ -907,7 +911,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:911: checking whether build environment is sane" >&5
+echo "configure:915: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -964,7 +968,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:968: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:972: 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
@@ -1010,7 +1014,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1014: checking for working aclocal" >&5
+echo "configure:1018: 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.
@@ -1023,7 +1027,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1027: checking for working autoconf" >&5
+echo "configure:1031: 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.
@@ -1036,7 +1040,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1040: checking for working automake" >&5
+echo "configure:1044: 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.
@@ -1049,7 +1053,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1053: checking for working autoheader" >&5
+echo "configure:1057: 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.
@@ -1062,7 +1066,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1066: checking for working makeinfo" >&5
+echo "configure:1070: 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.
@@ -1085,7 +1089,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1089: checking for $ac_word" >&5
+echo "configure:1093: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1116,7 +1120,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1120: checking for $ac_word" >&5
+echo "configure:1124: 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
@@ -1147,7 +1151,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1151: checking for $ac_word" >&5
+echo "configure:1155: 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
@@ -1229,7 +1233,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:1233: checking for $ac_word" >&5
+echo "configure:1237: 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
@@ -1268,7 +1272,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:1272: checking for ld used by GCC" >&5
+echo "configure:1276: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -1286,10 +1290,10 @@ echo "configure:1272: 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:1290: checking for GNU ld" >&5
+echo "configure:1294: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1293: checking for non-GNU ld" >&5
+echo "configure:1297: 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
@@ -1325,7 +1329,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:1329: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1333: 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
@@ -1341,7 +1345,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:1345: checking for BSD-compatible nm" >&5
+echo "configure:1349: 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
@@ -1375,7 +1379,7 @@ echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1379: checking whether ln -s works" >&5
+echo "configure:1383: 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
@@ -1411,8 +1415,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 1415 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1419 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1437,7 +1441,7 @@ case "$host" in
# 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:1441: checking for $ac_word" >&5
+echo "configure:1445: 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
@@ -1468,7 +1472,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:1472: checking for $ac_word" >&5
+echo "configure:1476: 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
@@ -1502,7 +1506,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:1506: checking for $ac_word" >&5
+echo "configure:1510: 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
@@ -1533,7 +1537,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:1537: checking for $ac_word" >&5
+echo "configure:1541: 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
@@ -1648,7 +1652,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1652: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:1656: 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"
@@ -1666,19 +1670,19 @@ fi
echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:1670: checking for Cygwin32 environment" >&5
+echo "configure:1674: checking for Cygwin32 environment" >&5
if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1675 "configure"
+#line 1679 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN32__;
; return 0; }
EOF
-if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_cygwin32=yes
else
@@ -1695,19 +1699,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6
CYGWIN32=
test "$am_cv_cygwin32" = yes && CYGWIN32=yes
echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:1699: checking for Mingw32 environment" >&5
+echo "configure:1703: checking for Mingw32 environment" >&5
if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1704 "configure"
+#line 1708 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_mingw32=yes
else
@@ -1726,7 +1730,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1730: checking for executable suffix" >&5
+echo "configure:1734: checking for executable suffix" >&5
if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1739,7 +1743,14 @@ int main() {
}
EOF
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+am_cv_exeext=
+for file in am_c_test.*; do
+ case $file in
+ *.c) ;;
+ *.o) ;;
+ *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
+ esac
+done
rm -f am_c_test*
fi
@@ -1758,7 +1769,7 @@ target64=false
# 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:1762: checking for $ac_word" >&5
+echo "configure:1773: 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
@@ -1787,7 +1798,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:1791: checking for $ac_word" >&5
+echo "configure:1802: 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
@@ -1835,7 +1846,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1839: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1850: 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.
@@ -1845,11 +1856,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1849 "configure"
+#line 1860 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -1869,12 +1880,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:1873: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1884: 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:1878: checking whether we are using GNU C" >&5
+echo "configure:1889: 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
@@ -1883,7 +1894,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1887: \"$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:1898: \"$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
@@ -1898,7 +1909,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1902: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1913: 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
@@ -1926,141 +1937,1744 @@ else
fi
-# Permit host specific settings.
-. ${srcdir}/configure.host
+ALL_LINGUAS=
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1943: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1958 "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:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1975 "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:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2004: 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 2009 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+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 2034 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+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 2052 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
-BFD_HOST_64BIT_LONG=0
-BFD_HOST_64_BIT_DEFINED=0
-BFD_HOST_64_BIT=
-BFD_HOST_U_64_BIT=
-if test "x${HOST_64BIT_TYPE}" = "xlong"; then
- BFD_HOST_64BIT_LONG=1
-elif test "x${HOST_64BIT_TYPE}" != "x"; then
- BFD_HOST_64_BIT_DEFINED=1
- BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
- BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
fi
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2073 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+EOF
+if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+fi
+fi
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test -z "$CC_FOR_BUILD"; then
- if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
- else
- CC_FOR_BUILD=gcc
- fi
fi
-# Also set EXEEXT_FOR_BUILD.
-if test "x$cross_compiling" = "xno"; then
- EXEEXT_FOR_BUILD='$(EXEEXT)'
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2108: 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
- echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:1968: checking for build system executable suffix" >&5
-if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
+ cat > conftest.$ac_ext <<EOF
+#line 2113 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2183: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > ac_c_test.c << 'EOF'
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 2190 "configure"
+#include "confdefs.h"
+
int main() {
-/* Nothing needed here */
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2223: 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 2228 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2256: 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 2261 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+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:2291: 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 2296 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_header_alloca_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2324: 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 2329 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_func_alloca_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.o
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2384: 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 2389 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+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:2414: 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 2419 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2469: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2477 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
}
EOF
- ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
- bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
- rm -f ac_c_test*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_stack_direction=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
fi
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
- EXEEXT_FOR_BUILD=""
- test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1990: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
+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:2521: 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 2526 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2560: 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
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2005 "configure"
+#line 2565 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
-Syntax Error
+/* 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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2613: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2621 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+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:2789: 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 2794 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
- :
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2829: 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 2022 "configure"
+#line 2834 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
-Syntax Error
+/* 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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2886: 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 2891 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:2948: 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 2953 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:2981: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3001: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3020: 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 3025 "configure"
+#include "confdefs.h"
+#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
- :
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP=/lib/cpp
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+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:3047: 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 3052 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
fi
rm -f conftest*
fi
+
+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:3075: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3083 "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 bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+LIBS="$ac_save_LIBS"
+
fi
- CPP="$ac_cv_prog_CPP"
+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:3110: 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
- ac_cv_prog_CPP="$CPP"
+ cat > conftest.$ac_ext <<EOF
+#line 3115 "configure"
+#include "confdefs.h"
+
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
fi
-echo "$ac_t""$CPP" 1>&6
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:3150: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3184: 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 3189 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:3239: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3274: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3306 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:3346: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3380: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3415: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/../intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=libintl.h
+ nls_cv_header_libgt=libgettext.h
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=libintl.h
+ nls_cv_header_libgt=libgettext.h
+ fi
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3505: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ 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:3533: 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 3538 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ if test -d $srcdir/po; then
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ fi
+
+
+# Permit host specific settings.
+. ${srcdir}/configure.host
+
+
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+
+BFD_HOST_64BIT_LONG=0
+BFD_HOST_64_BIT_DEFINED=0
+BFD_HOST_64_BIT=
+BFD_HOST_U_64_BIT=
+if test "x${HOST_64BIT_TYPE}" = "xlong"; then
+ BFD_HOST_64BIT_LONG=1
+elif test "x${HOST_64BIT_TYPE}" != "x"; then
+ BFD_HOST_64_BIT_DEFINED=1
+ BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
+ BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
+fi
+
+
+
+
+
+# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ CC_FOR_BUILD=gcc
+ fi
+fi
+
+# Also set EXEEXT_FOR_BUILD.
+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:3643: 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
+ cat > ac_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+ ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
+ bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
+ rm -f ac_c_test*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+
+echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+
for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2054: checking for $ac_hdr" >&5
+echo "configure:3668: 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 2059 "configure"
+#line 3673 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2090,17 +3704,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2094: checking for $ac_hdr" >&5
+echo "configure:3708: 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 2099 "configure"
+#line 3713 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2127,12 +3741,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2131: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3745: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
+#line 3750 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2141,7 +3755,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2164,12 +3778,12 @@ fi
for ac_func in fcntl getpagesize setitimer sysconf fdopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2168: checking for $ac_func" >&5
+echo "configure:3782: 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 2173 "configure"
+#line 3787 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2192,7 +3806,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2227,12 +3841,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:2231: checking whether strstr must be declared" >&5
+echo "configure:3845: 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 2236 "configure"
+#line 3850 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2253,7 +3867,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -2275,12 +3889,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:2279: checking whether malloc must be declared" >&5
+echo "configure:3893: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2284 "configure"
+#line 3898 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2301,7 +3915,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -2323,12 +3937,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:2327: checking whether realloc must be declared" >&5
+echo "configure:3941: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2332 "configure"
+#line 3946 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2349,7 +3963,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:2353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -2371,12 +3985,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:2375: checking whether free must be declared" >&5
+echo "configure:3989: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2380 "configure"
+#line 3994 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2397,7 +4011,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -2419,12 +4033,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:2423: checking whether getenv must be declared" >&5
+echo "configure:4037: 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 2428 "configure"
+#line 4042 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2445,7 +4059,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:2449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -2720,19 +4334,19 @@ EOF
# Define HAVE_SYS_PROCFS_H if the file exists and defines
# prstatus_t.
echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
-echo "configure:2724: checking for sys/procfs.h" >&5
+echo "configure:4338: checking for sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2729 "configure"
+#line 4343 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
prstatus_t t;
; return 0; }
EOF
-if { (eval echo configure:2736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_header_sys_procfs_h=yes
else
@@ -2763,7 +4377,7 @@ case "${host}" in
*-*-cygwin32*)
if test "$enable_shared" = "yes"; then
WIN32LDFLAGS="-no-undefined"
- WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin"
+ WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin -lkernel32"
fi
;;
esac
@@ -3067,17 +4681,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:3071: checking for $ac_hdr" >&5
+echo "configure:4685: 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 3076 "configure"
+#line 4690 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3106,12 +4720,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3110: checking for $ac_func" >&5
+echo "configure:4724: 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 3115 "configure"
+#line 4729 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3134,7 +4748,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3159,7 +4773,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3163: checking for working mmap" >&5
+echo "configure:4777: 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
@@ -3167,7 +4781,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3171 "configure"
+#line 4785 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3307,7 +4921,7 @@ main()
}
EOF
-if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3332,12 +4946,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3336: checking for $ac_func" >&5
+echo "configure:4950: 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 3341 "configure"
+#line 4955 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3360,7 +4974,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3493,7 +5107,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3561,6 +5175,28 @@ s%@DLLTOOL@%$DLLTOOL%g
s%@AS@%$AS%g
s%@MAINT@%$MAINT%g
s%@EXEEXT@%$EXEEXT%g
+s%@CPP@%$CPP%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
s%@HDEFINES@%$HDEFINES%g
s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
@@ -3568,7 +5204,6 @@ s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@CPP@%$CPP%g
s%@COREFILE@%$COREFILE%g
s%@COREFLAG@%$COREFLAG%g
s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
@@ -3620,7 +5255,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3793,7 +5428,7 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-
+sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/bfd/configure.in b/bfd/configure.in
index d379ce6..e23898a 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -68,6 +68,9 @@ target64=false
AC_PROG_CC
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
# Permit host specific settings.
. ${srcdir}/configure.host
@@ -315,7 +318,7 @@ case "${host}" in
*-*-cygwin32*)
if test "$enable_shared" = "yes"; then
WIN32LDFLAGS="-no-undefined"
- WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin"
+ WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin -lkernel32"
fi
;;
esac
@@ -623,4 +626,5 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h)
+AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
+[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index cc1a092..541ecf1 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DISTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -62,30 +64,53 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
+AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
NM = @NM@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
TDEFINES = @TDEFINES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WIN32LDFLAGS = @WIN32LDFLAGS@
+WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
bfd_machines = @bfd_machines@
+l = @l@
tdefaults = @tdefaults@
wordsize = @wordsize@
@@ -158,14 +183,14 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
-default: all
+all: Makefile
.SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -199,26 +224,38 @@ DVIPS = dvips
.texinfo.dvi:
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.txi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(infodir)
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
@for file in $(INFO_DEPS); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
for file in $(INFO_DEPS); do \
- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
@@ -229,11 +266,11 @@ uninstall-info:
else ii=; fi; \
for file in $(INFO_DEPS); do \
test -z "$ii" \
- || install-info --info-dir=$(infodir) --remove $$file; \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
- $(NORMAL_UNINSTALL)
+ @$(NORMAL_UNINSTALL)
for file in $(INFO_DEPS); do \
- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
@@ -296,8 +333,6 @@ install: install-exec install-data all
uninstall:
-all: Makefile
-
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
@@ -330,7 +365,7 @@ maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
+.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \
dvi installcheck install-info install-exec install-data install \
uninstall all installdirs mostlyclean-generic distclean-generic \
diff --git a/bfd/elf.c b/bfd/elf.c
index 954207e..166769a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -308,7 +308,7 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex)
if (strindex >= hdr->sh_size)
{
(*_bfd_error_handler)
- ("%s: invalid string offset %u >= %lu for section `%s'",
+ (_("%s: invalid string offset %u >= %lu for section `%s'"),
bfd_get_filename (abfd), strindex, (unsigned long) hdr->sh_size,
((shindex == elf_elfheader(abfd)->e_shstrndx
&& strindex == hdr->sh_name)
@@ -519,7 +519,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
{
unsigned int i, c;
- fprintf (f, "\nProgram Header:\n");
+ fprintf (f, _("\nProgram Header:\n"));
c = elf_elfheader (abfd)->e_phnum;
for (i = 0; i < c; i++, p++)
{
@@ -567,7 +567,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
size_t extdynsize;
void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
- fprintf (f, "\nDynamic Section:\n");
+ fprintf (f, _("\nDynamic Section:\n"));
dynbuf = (bfd_byte *) bfd_malloc (s->_raw_size);
if (dynbuf == NULL)
@@ -669,7 +669,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
{
Elf_Internal_Verdef *t;
- fprintf (f, "\nVersion definitions:\n");
+ fprintf (f, _("\nVersion definitions:\n"));
for (t = elf_tdata (abfd)->verdef; t != NULL; t = t->vd_nextdef)
{
fprintf (f, "%d 0x%2.2x 0x%8.8lx %s\n", t->vd_ndx,
@@ -692,12 +692,12 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
{
Elf_Internal_Verneed *t;
- fprintf (f, "\nVersion References:\n");
+ fprintf (f, _("\nVersion References:\n"));
for (t = elf_tdata (abfd)->verref; t != NULL; t = t->vn_nextref)
{
Elf_Internal_Vernaux *a;
- fprintf (f, " required from %s:\n", t->vn_filename);
+ fprintf (f, _(" required from %s:\n"), t->vn_filename);
for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
fprintf (f, " 0x%8.8lx 0x%2.2x %2.2d %s\n", a->vna_hash,
a->vna_flags, a->vna_other, a->vna_nodename);
@@ -1754,7 +1754,7 @@ elf_map_symbols (abfd)
num_sections++;
#ifdef DEBUG
fprintf (stderr,
- "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n",
+ _("creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"),
asect->name, (long) asect->vma, asect->index, (long) asect);
#endif
}
@@ -2347,7 +2347,7 @@ assign_file_positions_for_segments (abfd)
if (alloc != 0 && count > alloc)
{
((*_bfd_error_handler)
- ("%s: Not enough room for program headers (allocated %u, need %u)",
+ (_("%s: Not enough room for program headers (allocated %u, need %u)"),
bfd_get_filename (abfd), alloc, count));
bfd_set_error (bfd_error_bad_value);
return false;
@@ -2436,7 +2436,7 @@ assign_file_positions_for_segments (abfd)
if (p->p_vaddr < (bfd_vma) off)
{
- _bfd_error_handler ("%s: Not enough room for program headers, try linking with -N",
+ _bfd_error_handler (_("%s: Not enough room for program headers, try linking with -N"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value);
return false;
@@ -2776,7 +2776,7 @@ assign_file_positions_except_relocs (abfd)
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
{
((*_bfd_error_handler)
- ("%s: warning: allocated section `%s' not in segment",
+ (_("%s: warning: allocated section `%s' not in segment"),
bfd_get_filename (abfd),
(hdr->bfd_section == NULL
? "*unknown*"
@@ -3124,7 +3124,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
/* This case can occur when using --strip-symbol on a symbol
which is used in a relocation entry. */
(*_bfd_error_handler)
- ("%s: symbol `%s' required but not present",
+ (_("%s: symbol `%s' required but not present"),
bfd_get_filename (abfd), bfd_asymbol_name (asym_ptr));
bfd_set_error (bfd_error_no_symbols);
return -1;
@@ -3133,7 +3133,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
#if DEBUG & 4
{
fprintf (stderr,
- "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n",
+ _("elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"),
(long) asym_ptr, asym_ptr->name, idx, flags,
elf_symbol_flags (flags));
fflush (stderr);
@@ -3153,6 +3153,7 @@ copy_private_bfd_data (ibfd, obfd)
Elf_Internal_Ehdr *iehdr;
struct elf_segment_map *mfirst;
struct elf_segment_map **pm;
+ struct elf_segment_map *m;
Elf_Internal_Phdr *p;
unsigned int i, c;
@@ -3173,7 +3174,6 @@ copy_private_bfd_data (ibfd, obfd)
{
unsigned int csecs;
asection *s;
- struct elf_segment_map *m;
unsigned int isec;
csecs = 0;
@@ -3243,6 +3243,19 @@ copy_private_bfd_data (ibfd, obfd)
pm = &m->next;
}
+ /* The Solaris linker creates program headers in which all the
+ p_paddr fields are zero. When we try to objcopy or strip such a
+ file, we get confused. Check for this case, and if we find it
+ reset the p_paddr_valid fields. */
+ for (m = mfirst; m != NULL; m = m->next)
+ if (m->p_paddr != 0)
+ break;
+ if (m == NULL)
+ {
+ for (m = mfirst; m != NULL; m = m->next)
+ m->p_paddr_valid = 0;
+ }
+
elf_tdata (obfd)->segment_map = mfirst;
return true;
@@ -4227,7 +4240,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
fail:
(*_bfd_error_handler)
- ("%s: unsupported relocation type %s",
+ (_("%s: unsupported relocation type %s"),
bfd_get_filename (abfd), areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return false;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index b5931b6..47f78df 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -603,28 +603,28 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
&& (h->other & V850_OTHER_ERROR) == 0)
{
const char * msg;
- static char buff[100]; /* XXX */
-
+ static char buff[200]; /* XXX */
+
switch (h->other & V850_OTHER_MASK)
{
default:
- msg = "cannot occupy in multiple small data regions";
+ msg = _("Variable `%s' cannot occupy in multiple small data regions");
break;
case V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA:
- msg = "can only be in one of the small, zero, and tiny data regions";
+ msg = _("Variable `%s' can only be in one of the small, zero, and tiny data regions");
break;
case V850_OTHER_SDA | V850_OTHER_ZDA:
- msg = "cannot be in both small and zero data regions simultaneously";
+ msg = _("Variable `%s' cannot be in both small and zero data regions simultaneously");
break;
case V850_OTHER_SDA | V850_OTHER_TDA:
- msg = "cannot be in both small and tiny data regions simultaneously";
+ msg = _("Variable `%s' cannot be in both small and tiny data regions simultaneously");
break;
case V850_OTHER_ZDA | V850_OTHER_TDA:
- msg = "cannot be in both zero and tiny data regions simultaneously";
+ msg = _("Variable `%s' cannot be in both zero and tiny data regions simultaneously");
break;
}
- sprintf (buff, "Variable '%s' %s", h->root.root.string, msg );
+ sprintf (buff, msg, h->root.root.string);
info->callbacks->warning (info, buff, h->root.root.string,
abfd, h->root.u.def.section, 0);
@@ -979,7 +979,7 @@ v850_elf_perform_relocation (abfd, r_type, addend, address)
}
else
{
- fprintf (stderr, "FAILED to find previous HI16 reloc\n");
+ fprintf (stderr, _("FAILED to find previous HI16 reloc\n"));
return bfd_reloc_overflow;
}
}
@@ -1383,7 +1383,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
}
/* Perform the relocation. */
- return v850_elf_perform_relocation (input_bfd, r_type, value+addend, hit_data);
+ return v850_elf_perform_relocation (input_bfd, r_type, value + addend, hit_data);
}
@@ -1548,31 +1548,31 @@ fprintf (stderr, "unknown: name: %s\n", h->root.root.string);
break;
case bfd_reloc_outofrange:
- msg = "internal error: out of range error";
+ msg = _("internal error: out of range error");
goto common_error;
case bfd_reloc_notsupported:
- msg = "internal error: unsupported relocation error";
+ msg = _("internal error: unsupported relocation error");
goto common_error;
case bfd_reloc_dangerous:
- msg = "internal error: dangerous relocation";
+ msg = _("internal error: dangerous relocation");
goto common_error;
case bfd_reloc_other:
- msg = "could not locate special linker symbol __gp";
+ msg = _("could not locate special linker symbol __gp");
goto common_error;
case bfd_reloc_continue:
- msg = "could not locate special linker symbol __ep";
+ msg = _("could not locate special linker symbol __ep");
goto common_error;
case (bfd_reloc_dangerous + 1):
- msg = "could not locate special linker symbol __ctbp";
+ msg = _("could not locate special linker symbol __ctbp");
goto common_error;
default:
- msg = "internal error: unknown error";
+ msg = _("internal error: unknown error");
/* fall through */
common_error:
@@ -1707,7 +1707,7 @@ v850_elf_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
&& (in_flags & EF_V850_ARCH) != E_V850_ARCH)
- _bfd_error_handler ("%s: Architecture mismatch with previous modules",
+ _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
bfd_get_filename (ibfd));
return true;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 36da889..54cb033 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -946,7 +946,7 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
/* Complain if the instructions are not correct. */
if (ret == bfd_reloc_dangerous)
- *err_msg = "GPDISP relocation did not find ldah and lda instructions";
+ *err_msg = _("GPDISP relocation did not find ldah and lda instructions");
return ret;
}
@@ -2944,7 +2944,7 @@ elf64_alpha_size_got_sections (output_bfd, info)
{
/* Yikes! A single object file has too many entries. */
(*_bfd_error_handler)
- ("%s: .got subsegment exceeds 64K (size %d)",
+ (_("%s: .got subsegment exceeds 64K (size %d)"),
bfd_get_filename(i),
alpha_elf_tdata(this_got)->total_got_entries * 8);
return false;
@@ -2964,7 +2964,7 @@ elf64_alpha_size_got_sections (output_bfd, info)
if (++ngots == 2)
{
(*info->callbacks->warning)
- (info, "using multiple gp values", (char *) NULL,
+ (info, _("using multiple gp values"), (char *) NULL,
output_bfd, (asection *) NULL, (bfd_vma) 0);
}
*cur_got_tail = NULL;
@@ -4368,7 +4368,7 @@ elf64_alpha_final_link (abfd, info)
else
{
(*_bfd_error_handler)
- ("%s: illegal section name `%s'",
+ (_("%s: illegal section name `%s'"),
bfd_get_filename (abfd), o->name);
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index fe85d69..60ac0ea 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1,5 +1,5 @@
/* ELF executable support for BFD.
- Copyright 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -142,7 +142,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define LOG_FILE_ALIGN 2
#endif
-/* Forward declarations of static functions */
+/* Static functions */
static void elf_swap_ehdr_in
PARAMS ((bfd *, const Elf_External_Ehdr *, Elf_Internal_Ehdr *));
@@ -162,6 +162,8 @@ static boolean elf_slurp_reloc_table
static void write_relocs PARAMS ((bfd *, asection *, PTR));
+static boolean elf_file_p PARAMS ((Elf_External_Ehdr *));
+
#ifdef DEBUG
static void elf_debug_section PARAMS ((int, Elf_Internal_Shdr *));
static void elf_debug_file PARAMS ((Elf_Internal_Ehdr *));
@@ -174,11 +176,15 @@ static char *elf_symbol_flags PARAMS ((flagword));
can be handled by explicitly specifying 32 bits or "the long type". */
#if ARCH_SIZE == 64
#define put_word bfd_h_put_64
+#define put_signed_word bfd_h_put_signed_64
#define get_word bfd_h_get_64
+#define get_signed_word bfd_h_get_signed_64
#endif
#if ARCH_SIZE == 32
#define put_word bfd_h_put_32
+#define put_signed_word bfd_h_put_signed_32
#define get_word bfd_h_get_32
+#define get_signed_word bfd_h_get_signed_32
#endif
/* Translate an ELF symbol in external format into an ELF symbol in internal
@@ -370,7 +376,7 @@ elf_swap_reloca_in (abfd, src, dst)
{
dst->r_offset = get_word (abfd, (bfd_byte *) src->r_offset);
dst->r_info = get_word (abfd, (bfd_byte *) src->r_info);
- dst->r_addend = get_word (abfd, (bfd_byte *) src->r_addend);
+ dst->r_addend = get_signed_word (abfd, (bfd_byte *) src->r_addend);
}
/* Translate an ELF reloc from internal format to external format. */
@@ -392,7 +398,7 @@ elf_swap_reloca_out (abfd, src, dst)
{
put_word (abfd, src->r_offset, dst->r_offset);
put_word (abfd, src->r_info, dst->r_info);
- put_word (abfd, src->r_addend, dst->r_addend);
+ put_signed_word (abfd, src->r_addend, dst->r_addend);
}
INLINE void
@@ -924,7 +930,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
{
Elf_Internal_Shdr *hdr;
Elf_Internal_Shdr *verhdr;
- long symcount; /* Number of external ELF symbols */
+ unsigned long symcount; /* Number of external ELF symbols */
elf_symbol_type *sym; /* Pointer to current bfd symbol */
elf_symbol_type *symbase; /* Buffer for generated bfd symbols */
Elf_Internal_Sym i_sym;
@@ -972,7 +978,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
sym = symbase = NULL;
else
{
- long i;
+ unsigned long i;
if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) == -1)
return -1;
@@ -999,7 +1005,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
&& verhdr->sh_size / sizeof (Elf_External_Versym) != symcount)
{
(*_bfd_error_handler)
- ("%s: version count (%ld) does not match symbol count (%ld)",
+ (_("%s: version count (%ld) does not match symbol count (%ld)"),
abfd->filename,
(long) (verhdr->sh_size / sizeof (Elf_External_Versym)),
symcount);
@@ -1071,7 +1077,10 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
else
sym->symbol.section = bfd_abs_section_ptr;
- sym->symbol.value -= sym->symbol.section->vma;
+ /* If this is a relocateable file, then the symbol value is
+ already section relative. */
+ if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
+ sym->symbol.value -= sym->symbol.section->vma;
switch (ELF_ST_BIND (i_sym.st_info))
{
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 21bd270..db79db7 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -1123,7 +1123,7 @@ elf_link_add_object_symbols (abfd, info)
if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
{
(*_bfd_error_handler)
- ("%s: %s: invalid version %u (max %d)",
+ (_("%s: %s: invalid version %u (max %d)"),
abfd->filename, name, vernum,
elf_tdata (abfd)->dynverdef_hdr.sh_info);
bfd_set_error (bfd_error_bad_value);
@@ -1164,7 +1164,7 @@ elf_link_add_object_symbols (abfd, info)
if (verstr == NULL)
{
(*_bfd_error_handler)
- ("%s: %s: invalid needed version %d",
+ (_("%s: %s: invalid needed version %d"),
abfd->filename, name, vernum);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1277,7 +1277,7 @@ elf_link_add_object_symbols (abfd, info)
{
if (h->size != 0 && h->size != sym.st_size && ! size_change_ok)
(*_bfd_error_handler)
- ("Warning: size of symbol `%s' changed from %lu to %lu in %s",
+ (_("Warning: size of symbol `%s' changed from %lu to %lu in %s"),
name, (unsigned long) h->size, (unsigned long) sym.st_size,
bfd_get_filename (abfd));
@@ -1299,7 +1299,7 @@ elf_link_add_object_symbols (abfd, info)
&& h->type != ELF_ST_TYPE (sym.st_info)
&& ! type_change_ok)
(*_bfd_error_handler)
- ("Warning: type of symbol `%s' changed from %d to %d in %s",
+ (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
name, h->type, ELF_ST_TYPE (sym.st_info),
bfd_get_filename (abfd));
@@ -1521,7 +1521,7 @@ elf_link_add_object_symbols (abfd, info)
don't expect to see the type of override we
do in the case above. */
(*_bfd_error_handler)
- ("%s: warning: unexpected redefinition of `%s'",
+ (_("%s: warning: unexpected redefinition of `%s'"),
bfd_get_filename (abfd), shortname);
}
else
@@ -3217,7 +3217,7 @@ elf_link_assign_sym_version (h, data)
/* We could not find the version for a symbol when
generating a shared archive. Return an error. */
(*_bfd_error_handler)
- ("%s: undefined versioned symbol name %s",
+ (_("%s: undefined versioned symbol name %s"),
bfd_get_filename (sinfo->output_bfd), h->root.root.string);
bfd_set_error (bfd_error_bad_value);
sinfo->failed = true;
diff --git a/bfd/evax-egsd.c b/bfd/evax-egsd.c
index 0713863..25aebc4 100644
--- a/bfd/evax-egsd.c
+++ b/bfd/evax-egsd.c
@@ -369,7 +369,7 @@ _bfd_evax_slurp_egsd (abfd)
break;
default:
- (*_bfd_error_handler) ("unknown egsd subtype %d", gsd_type);
+ (*_bfd_error_handler) (_("unknown egsd subtype %d"), gsd_type);
bfd_set_error (bfd_error_bad_value);
return -1;
diff --git a/bfd/evax-emh.c b/bfd/evax-emh.c
index 9311bf0..590fb81 100644
--- a/bfd/evax-emh.c
+++ b/bfd/evax-emh.c
@@ -319,7 +319,7 @@ _bfd_evax_slurp_eeom (abfd)
PRIV(eeom_data).eeom_b_comcod = *(evax_rec + 8);
if (PRIV(eeom_data).eeom_b_comcod > 1)
{
- (*_bfd_error_handler) ("Object module NOT error-free !\n");
+ (*_bfd_error_handler) (_("Object module NOT error-free !\n"));
bfd_set_error (bfd_error_bad_value);
return -1;
}
diff --git a/bfd/evax-etir.c b/bfd/evax-etir.c
index 187353b..4989baa 100644
--- a/bfd/evax-etir.c
+++ b/bfd/evax-etir.c
@@ -300,7 +300,7 @@ etir_sta (abfd, cmd, ptr)
psect = bfd_getl32 (ptr);
if (psect >= PRIV(egsd_sec_count))
{
- (*_bfd_error_handler) ("Bad section index in ETIR_S_C_STA_PQ");
+ (*_bfd_error_handler) (_("Bad section index in ETIR_S_C_STA_PQ"));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -315,12 +315,12 @@ etir_sta (abfd, cmd, ptr)
case ETIR_S_C_STA_MOD:
case ETIR_S_C_STA_CKARG:
- (*_bfd_error_handler) ("Unsupported STA cmd %d", cmd);
+ (*_bfd_error_handler) (_("Unsupported STA cmd %d"), cmd);
return false;
break;
default:
- (*_bfd_error_handler) ("Reserved STA cmd %d", cmd);
+ (*_bfd_error_handler) (_("Reserved STA cmd %d"), cmd);
return false;
break;
}
@@ -431,7 +431,7 @@ etir_sto (abfd, cmd, ptr)
entry = (evax_symbol_entry *)bfd_hash_lookup (PRIV(evax_symbol_table), name, false, false);
if (entry == (evax_symbol_entry *)NULL)
{
- (*_bfd_error_handler) ("ETIR_S_C_STO_GBL: no symbol \"%s\"",
+ (*_bfd_error_handler) (_("ETIR_S_C_STO_GBL: no symbol \"%s\""),
name);
return false;
}
@@ -452,7 +452,7 @@ etir_sto (abfd, cmd, ptr)
entry = (evax_symbol_entry *) bfd_hash_lookup (PRIV(evax_symbol_table), name, false, false);
if (entry == (evax_symbol_entry *)NULL)
{
- (*_bfd_error_handler) ("ETIR_S_C_STO_CA: no symbol \"%s\"",
+ (*_bfd_error_handler) (_("ETIR_S_C_STO_CA: no symbol \"%s\""),
name);
return false;
}
@@ -465,7 +465,7 @@ etir_sto (abfd, cmd, ptr)
case ETIR_S_C_STO_RB:
case ETIR_S_C_STO_AB:
- (*_bfd_error_handler) ("ETIR_S_C_STO_RB/AB: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_STO_RB/AB: Not supported"));
break;
/* store offset to psect: pop stack, add low 32 bits to base of psect
@@ -523,23 +523,23 @@ etir_sto (abfd, cmd, ptr)
/* not supported */
case ETIR_S_C_STO_LP_PSB:
- (*_bfd_error_handler) ("ETIR_S_C_STO_LP_PSB: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_STO_LP_PSB: Not supported"));
break;
/* */
case ETIR_S_C_STO_HINT_GBL:
- (*_bfd_error_handler) ("ETIR_S_C_STO_HINT_GBL: not implemented");
+ (*_bfd_error_handler) (_("ETIR_S_C_STO_HINT_GBL: not implemented"));
break;
/* */
case ETIR_S_C_STO_HINT_PS:
- (*_bfd_error_handler) ("ETIR_S_C_STO_HINT_PS: not implemented");
+ (*_bfd_error_handler) (_("ETIR_S_C_STO_HINT_PS: not implemented"));
break;
default:
- (*_bfd_error_handler) ("Reserved STO cmd %d", cmd);
+ (*_bfd_error_handler) (_("Reserved STO cmd %d"), cmd);
break;
}
@@ -647,7 +647,7 @@ etir_opr (abfd, cmd, ptr)
case ETIR_S_C_OPR_INSV:
(void)_bfd_evax_pop (abfd, NULL);
- (*_bfd_error_handler) ("ETIR_S_C_OPR_INSV: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_OPR_INSV: Not supported"));
break;
/* arithmetic shift */
@@ -665,13 +665,13 @@ etir_opr (abfd, cmd, ptr)
/* unsigned shift */
case ETIR_S_C_OPR_USH:
- (*_bfd_error_handler) ("ETIR_S_C_OPR_USH: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_OPR_USH: Not supported"));
break;
/* rotate */
case ETIR_S_C_OPR_ROT:
- (*_bfd_error_handler) ("ETIR_S_C_OPR_ROT: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_OPR_ROT: Not supported"));
break;
/* select */
@@ -690,17 +690,17 @@ etir_opr (abfd, cmd, ptr)
/* redefine symbol to current location */
case ETIR_S_C_OPR_REDEF:
- (*_bfd_error_handler) ("ETIR_S_C_OPR_REDEF: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_OPR_REDEF: Not supported"));
break;
/* define a literal */
case ETIR_S_C_OPR_DFLIT:
- (*_bfd_error_handler) ("ETIR_S_C_OPR_DFLIT: Not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_OPR_DFLIT: Not supported"));
break;
default:
- (*_bfd_error_handler) ("Reserved OPR cmd %d", cmd);
+ (*_bfd_error_handler) (_("Reserved OPR cmd %d"), cmd);
break;
}
@@ -764,7 +764,7 @@ etir_ctl (abfd, cmd, ptr)
break;
default:
- (*_bfd_error_handler) ("Reserved CTL cmd %d", cmd);
+ (*_bfd_error_handler) (_("Reserved CTL cmd %d"), cmd);
break;
}
return true;
@@ -788,7 +788,7 @@ etir_stc (abfd, cmd, ptr)
arg: */
case ETIR_S_C_STC_LP:
- (*_bfd_error_handler) ("ETIR_S_C_STC_LP: not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_STC_LP: not supported"));
break;
/* 201 Store-conditional Linkage Pair with Procedure Signature
@@ -806,7 +806,7 @@ etir_stc (abfd, cmd, ptr)
cs global name */
case ETIR_S_C_STC_GBL:
- (*_bfd_error_handler) ("ETIR_S_C_STC_GBL: not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_STC_GBL: not supported"));
break;
/* 203 Store-conditional Code Address at global address
@@ -814,7 +814,7 @@ etir_stc (abfd, cmd, ptr)
cs procedure name */
case ETIR_S_C_STC_GCA:
- (*_bfd_error_handler) ("ETIR_S_C_STC_GCA: not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_STC_GCA: not supported"));
break;
/* 204 Store-conditional Address at psect + offset
@@ -823,7 +823,7 @@ etir_stc (abfd, cmd, ptr)
qw offset */
case ETIR_S_C_STC_PS:
- (*_bfd_error_handler) ("ETIR_S_C_STC_PS: not supported");
+ (*_bfd_error_handler) (_("ETIR_S_C_STC_PS: not supported"));
break;
/* 205 Store-conditional NOP at address of global
@@ -1148,7 +1148,7 @@ _bfd_evax_write_etir (abfd)
if ((i = section->reloc_count) <= 0)
{
- (*_bfd_error_handler) ("SEC_RELOC with no relocs in section %s",
+ (*_bfd_error_handler) (_("SEC_RELOC with no relocs in section %s"),
section->name);
}
#if EVAX_DEBUG
@@ -1422,7 +1422,7 @@ _bfd_evax_write_etir (abfd)
break;
default:
- (*_bfd_error_handler) ("Unhandled relocation %s",
+ (*_bfd_error_handler) (_("Unhandled relocation %s"),
(*rptr)->howto->name);
break;
}
diff --git a/bfd/evax-misc.c b/bfd/evax-misc.c
index 33dd399..856bb6e 100644
--- a/bfd/evax-misc.c
+++ b/bfd/evax-misc.c
@@ -898,12 +898,12 @@ int len;
len = strlen (value);
if (len == 0)
{
- (*_bfd_error_handler) ("_bfd_evax_output_counted called with zero bytes");
+ (*_bfd_error_handler) (_("_bfd_evax_output_counted called with zero bytes"));
return;
}
if (len > 255)
{
- (*_bfd_error_handler) ("_bfd_evax_output_counted called with too many bytes");
+ (*_bfd_error_handler) (_("_bfd_evax_output_counted called with too many bytes"));
return;
}
_bfd_evax_output_byte (abfd, len & 0xff);
@@ -1038,7 +1038,7 @@ _bfd_evax_length_hash_symbol (abfd, in, maxlen)
if (in_len > maxlen
&& PRIV(flag_hash_long_names)
&& PRIV(flag_show_after_trunc))
- printf ("Symbol %s replaced by %s\n", old_name, new_name);
+ printf (_("Symbol %s replaced by %s\n"), old_name, new_name);
return outbuf;
}
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index e1fd858..23b7eae 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -1,6 +1,6 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@@ -23,10 +23,37 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#define _(String) dgettext (PACKAGE, String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop (String)
+#else
+#define N_(String) (String)
+#endif
+#else
+/* Stubs that do something close enough. */
+#define textdomain(String) (String)
+#define gettext(String) (String)
+#define dgettext(Domain,Message) (Message)
+#define dcgettext(Domain,Message,Type) (Message)
+#define bindtextdomain(Domain,Directory) (Domain)
+#define _(String) (String)
+#define N_(String) (String)
+/* In this case we don't care about the value. */
+#ifndef LC_MESSAGES
+#define LC_MESSAGES 0
+#endif
+#endif
+
/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. */
-#define BFD_ALIGN(this, boundary) \
- ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
+ E.g. align to an 8-byte boundary with argument of 8. Take care never
+ to wrap around if the address is within boundary-1 of the end of the
+ address space. */
+#define BFD_ALIGN(this, boundary) \
+ ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
+ ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
+ : ~ (bfd_vma) 0)
/* If you want to read and write large blocks, you might want to do it
in quanta of this amount */
@@ -348,6 +375,11 @@ extern boolean _bfd_stab_section_find_nearest_line
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
const char **, unsigned int *, PTR *));
+/* Find the nearest line using DWARF 2 debugging information. */
+extern boolean _bfd_dwarf2_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
@@ -435,6 +467,12 @@ extern boolean _bfd_write_section_stabs
extern boolean _bfd_write_stab_strings PARAMS ((bfd *, PTR *));
+/* Find an offset within a .stab section when linking stabs in
+ sections. */
+
+extern bfd_vma _bfd_stab_section_offset
+ PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma));
+
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void));
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 6af5ca2..8b4504c 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1,6 +1,6 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@@ -23,13 +23,38 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#ifdef ENABLE_NLS
+#include <libintl.h>
+/* FIXME: We might want to use dgettext instead, in some cases.
+ This is still under investigation. */
+#define _(String) gettext (String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop (String)
+#else
+#define N_(String) (String)
+#endif
+#else
+/* Stubs that do something close enough. */
+#define textdomain(String) (String)
+#define gettext(String) (String)
+#define dgettext(Domain,Message) (Message)
+#define dcgettext(Domain,Message,Type) (Message)
+#define bindtextdomain(Domain,Directory) (Domain)
+#define _(String) (String)
+#define N_(String) (String)
+/* In this case we don't care about the value. */
+#ifndef LC_MESSAGES
+#define LC_MESSAGES 0
+#endif
+#endif
+
/* Align an address upward to a boundary, expressed as a number of bytes.
E.g. align to an 8-byte boundary with argument of 8. Take care never
to wrap around if the address is within boundary-1 of the end of the
address space. */
#define BFD_ALIGN(this, boundary) \
- ((((this) + (boundary) - 1) >= (this)) \
- ? (((this) + ((boundary) - 1)) & (~((boundary)-1))) \
+ ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
+ ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
: ~ (bfd_vma) 0)
/* If you want to read and write large blocks, you might want to do it
@@ -669,8 +694,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_GOT_LO16",
"BFD_RELOC_MIPS_CALL_HI16",
"BFD_RELOC_MIPS_CALL_LO16",
+/* start-sanitize-r5900 */
+ "BFD_RELOC_MIPS15_S3",
+/* end-sanitize-r5900 */
/* start-sanitize-sky */
"BFD_RELOC_MIPS_DVP_11_PCREL",
+ "BFD_RELOC_MIPS_DVP_27_S4",
/* end-sanitize-sky */
"BFD_RELOC_386_GOT32",
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 478f959..77e8d68 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -1180,7 +1180,7 @@ coff_swap_scnhdr_out (abfd, in, out)
bfd_h_put_16(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno);
else
{
- (*_bfd_error_handler) ("%s: line number overflow: 0x%lx > 0xffff",
+ (*_bfd_error_handler) (_("%s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
scnhdr_int->s_nlnno);
bfd_set_error (bfd_error_file_truncated);
@@ -1191,7 +1191,7 @@ coff_swap_scnhdr_out (abfd, in, out)
bfd_h_put_16(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc);
else
{
- (*_bfd_error_handler) ("%s: reloc overflow: 0x%lx > 0xffff",
+ (*_bfd_error_handler) (_("%s: reloc overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
@@ -1203,22 +1203,22 @@ coff_swap_scnhdr_out (abfd, in, out)
static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
{
- "Export Directory [.edata (or where ever we found it)]",
- "Import Directory [parts of .idata]",
- "Resource Directory [.rsrc]",
- "Exception Directory [.pdata]",
- "Security Directory",
- "Base Relocation Directory [.reloc]",
- "Debug Directory",
- "Description Directory",
- "Special Directory",
- "Thread Storage Directory [.tls]",
- "Load Configuration Directory",
- "Bound Import Directory",
- "Import Address Table Directory",
- "Reserved",
- "Reserved",
- "Reserved"
+ N_ ("Export Directory [.edata (or where ever we found it)]"),
+ N_ ("Import Directory [parts of .idata]"),
+ _("Resource Directory [.rsrc]"),
+ _("Exception Directory [.pdata]"),
+ _("Security Directory"),
+ _("Base Relocation Directory [.reloc]"),
+ _("Debug Directory"),
+ _("Description Directory"),
+ _("Special Directory"),
+ _("Thread Storage Directory [.tls]"),
+ _("Load Configuration Directory"),
+ _("Bound Import Directory"),
+ _("Import Address Table Directory"),
+ _("Reserved"),
+ _("Reserved"),
+ _("Reserved")
};
/**********************************************************************/
@@ -1316,25 +1316,25 @@ pe_print_idata(abfd, vfile)
toc_address = loadable_toc_address - 32768;
fprintf(file,
- "\nFunction descriptor located at the start address: %04lx\n",
+ _("\nFunction descriptor located at the start address: %04lx\n"),
(unsigned long int) (abfd->start_address));
fprintf (file,
- "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n",
+ _("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"),
start_address, loadable_toc_address, toc_address);
}
else
{
fprintf(file,
- "\nNo reldata section! Function descriptor not decoded.\n");
+ _("\nNo reldata section! Function descriptor not decoded.\n"));
}
#endif
fprintf(file,
- "\nThe Import Tables (interpreted .idata section contents)\n");
+ _("\nThe Import Tables (interpreted .idata section contents)\n"));
fprintf(file,
- " vma: Hint Time Forward DLL First\n");
+ _(" vma: Hint Time Forward DLL First\n"));
fprintf(file,
- " Table Stamp Chain Name Thunk\n");
+ _(" Table Stamp Chain Name Thunk\n"));
secsize = bfd_section_size (abfd, section);
data = (bfd_byte *) bfd_malloc (secsize);
@@ -1387,11 +1387,11 @@ pe_print_idata(abfd, vfile)
/* the image base is present in the section->vma */
dll = (char *) data + dll_name + adj;
- fprintf(file, "\n\tDLL Name: %s\n", dll);
+ fprintf(file, _("\n\tDLL Name: %s\n"), dll);
if (hint_addr != 0)
{
- fprintf (file, "\tvma: Hint/Ord Member-Name\n");
+ fprintf (file, _("\tvma: Hint/Ord Member-Name\n"));
idx = hint_addr + adj;
@@ -1453,14 +1453,14 @@ pe_print_idata(abfd, vfile)
if (differ == 0)
{
fprintf (file,
- "\tThe Import Address Table (difference found)\n");
- fprintf(file, "\tvma: Hint/Ord Member-Name\n");
+ _("\tThe Import Address Table (difference found)\n"));
+ fprintf(file, _("\tvma: Hint/Ord Member-Name\n"));
differ = 1;
}
if (iat_member == 0)
{
fprintf(file,
- "\t>>> Ran out of IAT members!\n");
+ _("\t>>> Ran out of IAT members!\n"));
}
else
{
@@ -1478,7 +1478,7 @@ pe_print_idata(abfd, vfile)
if (differ == 0)
{
fprintf(file,
- "\tThe Import Address Table is identical\n");
+ _("\tThe Import Address Table is identical\n"));
}
}
@@ -1579,51 +1579,51 @@ pe_print_edata (abfd, vfile)
/* Dump the EDT first first */
fprintf(file,
- "\nThe Export Tables (interpreted .edata section contents)\n\n");
+ _("\nThe Export Tables (interpreted .edata section contents)\n\n"));
fprintf(file,
- "Export Flags \t\t\t%lx\n", (unsigned long) edt.export_flags);
+ _("Export Flags \t\t\t%lx\n"), (unsigned long) edt.export_flags);
fprintf(file,
- "Time/Date stamp \t\t%lx\n", (unsigned long) edt.time_stamp);
+ _("Time/Date stamp \t\t%lx\n"), (unsigned long) edt.time_stamp);
fprintf(file,
- "Major/Minor \t\t\t%d/%d\n", edt.major_ver, edt.minor_ver);
+ _("Major/Minor \t\t\t%d/%d\n"), edt.major_ver, edt.minor_ver);
fprintf (file,
- "Name \t\t\t\t");
+ _("Name \t\t\t\t"));
fprintf_vma (file, edt.name);
fprintf (file,
" %s\n", data + edt.name + adj);
fprintf(file,
- "Ordinal Base \t\t\t%ld\n", edt.base);
+ _("Ordinal Base \t\t\t%ld\n"), edt.base);
fprintf(file,
- "Number in:\n");
+ _("Number in:\n"));
fprintf(file,
- "\tExport Address Table \t\t%lx\n",
+ _("\tExport Address Table \t\t%lx\n"),
edt.num_functions);
fprintf(file,
- "\t[Name Pointer/Ordinal] Table\t%lu\n", edt.num_names);
+ _("\t[Name Pointer/Ordinal] Table\t%lu\n"), edt.num_names);
fprintf(file,
- "Table Addresses\n");
+ _("Table Addresses\n"));
fprintf (file,
- "\tExport Address Table \t\t");
+ _("\tExport Address Table \t\t"));
fprintf_vma (file, edt.eat_addr);
fprintf (file, "\n");
fprintf (file,
- "\tName Pointer Table \t\t");
+ _("\tName Pointer Table \t\t"));
fprintf_vma (file, edt.npt_addr);
fprintf (file, "\n");
fprintf (file,
- "\tOrdinal Table \t\t\t");
+ _("\tOrdinal Table \t\t\t"));
fprintf_vma (file, edt.ot_addr);
fprintf (file, "\n");
@@ -1639,7 +1639,7 @@ pe_print_edata (abfd, vfile)
*/
fprintf(file,
- "\nExport Address Table -- Ordinal Base %ld\n",
+ _("\nExport Address Table -- Ordinal Base %ld\n"),
edt.base);
for (i = 0; i < edt.num_functions; ++i)
@@ -1674,7 +1674,7 @@ pe_print_edata (abfd, vfile)
/* The Export Name Pointer Table is paired with the Export Ordinal Table */
/* Dump them in parallel for clarity */
fprintf(file,
- "\n[Ordinal/Name Pointer] Table\n");
+ _("\n[Ordinal/Name Pointer] Table\n"));
for (i = 0; i < edt.num_names; ++i)
{
@@ -1717,15 +1717,15 @@ pe_print_pdata (abfd, vfile)
stop = bfd_section_size (abfd, section);
if ((stop % onaline) != 0)
- fprintf (file, "Warning, .pdata section size (%ld) is not a multiple of %d\n",
+ fprintf (file, _("Warning, .pdata section size (%ld) is not a multiple of %d\n"),
(long)stop, onaline);
fprintf(file,
- "\nThe Function Table (interpreted .pdata section contents)\n");
+ _("\nThe Function Table (interpreted .pdata section contents)\n"));
fprintf(file,
- " vma:\t\tBegin End EH EH PrologEnd\n");
+ _(" vma:\t\tBegin End EH EH PrologEnd\n"));
fprintf(file,
- " \t\tAddress Address Handler Data Address\n");
+ _(" \t\tAddress Address Handler Data Address\n"));
if (bfd_section_size (abfd, section) == 0)
return true;
@@ -1792,13 +1792,13 @@ pe_print_pdata (abfd, vfile)
switch (eh_data)
{
case 0x01:
- fprintf(file, " Register save millicode");
+ fprintf(file, _(" Register save millicode"));
break;
case 0x02:
- fprintf(file, " Register restore millicode");
+ fprintf(file, _(" Register restore millicode"));
break;
case 0x03:
- fprintf(file, " Glue code sequence");
+ fprintf(file, _(" Glue code sequence"));
break;
default:
break;
@@ -1842,7 +1842,7 @@ pe_print_reloc (abfd, vfile)
return true;
fprintf(file,
- "\n\nPE File Base Relocations (interpreted .reloc section contents)\n");
+ _("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section));
datasize = bfd_section_size (abfd, section);
@@ -1877,7 +1877,7 @@ pe_print_reloc (abfd, vfile)
}
fprintf (file,
- "\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n",
+ _("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"),
virtual_address, size, size, number);
for (j = 0; j < number; ++j)
@@ -1890,7 +1890,7 @@ pe_print_reloc (abfd, vfile)
abort();
fprintf(file,
- "\treloc %4d offset %4x [%4lx] %s\n",
+ _("\treloc %4d offset %4x [%4lx] %s\n"),
j, off, (long) (off + virtual_address), tbl[t]);
}
@@ -1915,7 +1915,7 @@ pe_print_private_bfd_data (abfd, vfile)
/* The MS dumpbin program reportedly ands with 0xff0f before
printing the characteristics field. Not sure why. No reason to
emulate it here. */
- fprintf (file, "\nCharacteristics 0x%x\n", pe->real_flags);
+ fprintf (file, _("\nCharacteristics 0x%x\n"), pe->real_flags);
#undef PF
#define PF(x, y) if (pe->real_flags & x) { fprintf (file, "\t%s\n", y); }
PF (F_RELFLG, "relocations stripped");
diff --git a/bfd/po/Make-in b/bfd/po/Make-in
new file mode 100644
index 0000000..82d3590
--- /dev/null
+++ b/bfd/po/Make-in
@@ -0,0 +1,250 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: @MAINT@ $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/bfd/po/POTFILES.in b/bfd/po/POTFILES.in
new file mode 100644
index 0000000..f16781a
--- /dev/null
+++ b/bfd/po/POTFILES.in
@@ -0,0 +1,200 @@
+aix386-core.c
+aout-adobe.c
+aout-arm.c
+aout-ns32k.c
+aout-sparcle.c
+aout-target.h
+aout-tic30.c
+aout0.c
+aout32.c
+aout64.c
+aoutf1.h
+aoutx.h
+archive.c
+archures.c
+bfd.c
+binary.c
+bout.c
+cache.c
+cf-i386lynx.c
+cf-m68klynx.c
+cf-sparclynx.c
+cisco-core.c
+coff-a29k.c
+coff-alpha.c
+coff-apollo.c
+coff-arm.c
+coff-aux.c
+coff-go32.c
+coff-h8300.c
+coff-h8500.c
+coff-i386.c
+coff-i860.c
+coff-i960.c
+coff-m68k.c
+coff-m88k.c
+coff-mips.c
+coff-pmac.c
+coff-rs6000.c
+coff-sh.c
+coff-sparc.c
+coff-stgo32.c
+coff-svm68k.c
+coff-tic30.c
+coff-u68k.c
+coff-w65.c
+coff-we32k.c
+coff-z8k.c
+coffcode.h
+coffgen.c
+cofflink.c
+coffswap.h
+corefile.c
+cpu-a29k.c
+cpu-alpha.c
+cpu-arc.c
+cpu-arm.c
+cpu-h8300.c
+cpu-h8500.c
+cpu-hppa.c
+cpu-i386.c
+cpu-i860.c
+cpu-i960.c
+cpu-m10200.c
+cpu-m10300.c
+cpu-m32r.c
+cpu-m68k.c
+cpu-m88k.c
+cpu-mips.c
+cpu-ns32k.c
+cpu-powerpc.c
+cpu-rs6000.c
+cpu-sh.c
+cpu-sparc.c
+cpu-tic30.c
+cpu-v850.c
+cpu-vax.c
+cpu-w65.c
+cpu-we32k.c
+cpu-z8k.c
+demo64.c
+dwarf2.c
+ecoff.c
+ecofflink.c
+ecoffswap.h
+elf-bfd.h
+elf-m10200.c
+elf-m10300.c
+elf.c
+elf32-arc.c
+elf32-d10v.c
+elf32-gen.c
+elf32-hppa.c
+elf32-hppa.h
+elf32-i386.c
+elf32-i860.c
+elf32-m32r.c
+elf32-m68k.c
+elf32-m88k.c
+elf32-mips.c
+elf32-ppc.c
+elf32-sh.c
+elf32-sparc.c
+elf32-v850.c
+elf32.c
+elf64-alpha.c
+elf64-gen.c
+elf64-mips.c
+elf64-sparc.c
+elf64.c
+elfcode.h
+elflink.c
+evax-alpha.c
+evax-egsd.c
+evax-emh.c
+evax-etir.c
+evax-misc.c
+evax.h
+format.c
+genlink.h
+go32stub.h
+hash.c
+hp300bsd.c
+hp300hpux.c
+hppa_stubs.h
+hpux-core.c
+i386aout.c
+i386bsd.c
+i386dynix.c
+i386freebsd.c
+i386linux.c
+i386lynx.c
+i386mach3.c
+i386msdos.c
+i386netbsd.c
+i386os9k.c
+ieee.c
+ihex.c
+init.c
+irix-core.c
+libaout.h
+libbfd.c
+libbfd.h
+libcoff.h
+libecoff.h
+libhppa.h
+libieee.h
+libnlm.h
+liboasys.h
+linker.c
+lynx-core.c
+m68k4knetbsd.c
+m68klinux.c
+m68klynx.c
+m68knetbsd.c
+m88kmach3.c
+mipsbsd.c
+netbsd.h
+newsos3.c
+nlm-target.h
+nlm.c
+nlm32-alpha.c
+nlm32-i386.c
+nlm32-ppc.c
+nlm32-sparc.c
+nlm32.c
+nlm64.c
+nlmcode.h
+ns32k.h
+ns32knetbsd.c
+oasys.c
+opncls.c
+osf-core.c
+pc532-mach.c
+pe-arm.c
+pe-i386.c
+pe-ppc.c
+pei-arm.c
+pei-i386.c
+pei-ppc.c
+ppcboot.c
+reloc.c
+reloc16.c
+riscix.c
+section.c
+som.c
+som.h
+sparclinux.c
+sparclynx.c
+sparcnetbsd.c
+srec.c
+stab-syms.c
+stabs.c
+sunos.c
+syms.c
+targets.c
+tekhex.c
+trad-core.c
+vaxnetbsd.c
+versados.c
+xcofflink.c
diff --git a/bfd/syms.c b/bfd/syms.c
index feaddd6..0feacbc 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -1,5 +1,5 @@
/* Generic symbol-table support for the BFD library.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -626,12 +626,6 @@ bfd_symbol_info (symbol, ret)
ret->name = symbol->name;
}
-void
-bfd_symbol_is_absolute ()
-{
- abort ();
-}
-
/*
FUNCTION
bfd_copy_private_symbol_data
@@ -721,6 +715,42 @@ _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
placed in *pinfo should be saved with the BFD, and passed back each
time this function is called. */
+/* We use a cache by default. */
+
+#define ENABLE_CACHING
+
+/* We keep an array of indexentry structures to record where in the
+ stabs section we should look to find line number information for a
+ particular address. */
+
+struct indexentry
+{
+ bfd_vma val;
+ bfd_byte *stab;
+ bfd_byte *str;
+ bfd_byte *directory_name;
+ bfd_byte *file_name;
+ bfd_byte *function_name;
+};
+
+/* Compare two indexentry structures. This is called via qsort. */
+
+static int
+cmpindexentry (a, b)
+ const PTR *a;
+ const PTR *b;
+{
+ const struct indexentry *contestantA = (const struct indexentry *) a;
+ const struct indexentry *contestantB = (const struct indexentry *) b;
+
+ if (contestantA->val < contestantB->val)
+ return -1;
+ else if (contestantA->val > contestantB->val)
+ return 1;
+ else
+ return 0;
+}
+
/* A pointer to this structure is stored in *pinfo. */
struct stab_find_info
@@ -733,13 +763,22 @@ struct stab_find_info
bfd_byte *stabs;
/* The contents of the .stabstr section. */
bfd_byte *strs;
- /* An malloc buffer to hold the file name. */
- char *filename;
+
+ /* A table that indexes stabs by memory address. */
+ struct indexentry *indextable;
+ /* The number of entries in indextable. */
+ int indextablesize;
+
+#ifdef ENABLE_CACHING
/* Cached values to restart quickly. */
+ struct indexentry *cached_indexentry;
bfd_vma cached_offset;
bfd_byte *cached_stab;
- bfd_byte *cached_str;
- bfd_size_type cached_stroff;
+ bfd_byte *cached_file_name;
+#endif
+
+ /* Saved ptr to malloc'ed filename. */
+ char *filename;
};
boolean
@@ -757,18 +796,36 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
struct stab_find_info *info;
bfd_size_type stabsize, strsize;
- bfd_byte *stab, *stabend, *str;
+ bfd_byte *stab, *str;
bfd_size_type stroff;
- bfd_vma fnaddr;
- char *directory_name, *main_file_name, *current_file_name, *line_file_name;
- char *fnname;
- bfd_vma low_func_vma, low_line_vma;
+ struct indexentry *indexentry;
+ char *directory_name, *file_name;
*pfound = false;
*pfilename = bfd_get_filename (abfd);
*pfnname = NULL;
*pline = 0;
+ /* Stabs entries use a 12 byte format:
+ 4 byte string table index
+ 1 byte stab type
+ 1 byte stab other field
+ 2 byte stab desc field
+ 4 byte stab value
+ FIXME: This will have to change for a 64 bit object format.
+
+ The stabs symbols are divided into compilation units. For the
+ first entry in each unit, the type of 0, the value is the length
+ of the string table for this unit, and the desc field is the
+ number of stabs symbols for this unit. */
+
+#define STRDXOFF (0)
+#define TYPEOFF (4)
+#define OTHEROFF (5)
+#define DESCOFF (6)
+#define VALOFF (8)
+#define STABSIZE (12)
+
info = (struct stab_find_info *) *pinfo;
if (info != NULL)
{
@@ -785,6 +842,12 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
long reloc_size, reloc_count;
arelent **reloc_vector;
+ bfd_vma val;
+ int i;
+ char *name;
+ char *file_name;
+ char *directory_name;
+ char *function_name;
info = (struct stab_find_info *) bfd_zalloc (abfd, sizeof *info);
if (info == NULL)
@@ -856,7 +919,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|| r->howto->dst_mask != 0xffffffff)
{
(*_bfd_error_handler)
- ("Unsupported .stab relocation");
+ (_("Unsupported .stab relocation"));
bfd_set_error (bfd_error_invalid_operation);
if (reloc_vector != NULL)
free (reloc_vector);
@@ -874,140 +937,189 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (reloc_vector != NULL)
free (reloc_vector);
- *pinfo = (PTR) info;
- }
+ /* First time through this function, build a table matching
+ function VM addresses to stabs, then sort based on starting
+ VM address. Do this in two passes: once to count how many
+ table entries we'll need, and a second to actually build the
+ table. */
- /* We are passed a section relative offset. The offsets in the
- stabs information are absolute. */
- offset += bfd_get_section_vma (abfd, section);
+ info->indextablesize = 0;
+ for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
+ {
+ if (stab[TYPEOFF] == N_FUN)
+ ++info->indextablesize;
+ }
- /* Stabs entries use a 12 byte format:
- 4 byte string table index
- 1 byte stab type
- 1 byte stab other field
- 2 byte stab desc field
- 4 byte stab value
- FIXME: This will have to change for a 64 bit object format.
+ if (info->indextablesize == 0)
+ return true;
+ ++info->indextablesize;
- The stabs symbols are divided into compilation units. For the
- first entry in each unit, the type of 0, the value is the length
- of the string table for this unit, and the desc field is the
- number of stabs symbols for this unit. */
+ info->indextable = ((struct indexentry *)
+ bfd_alloc (abfd,
+ (sizeof (struct indexentry)
+ * info->indextablesize)));
+ if (info->indextable == NULL)
+ return false;
-#define STRDXOFF (0)
-#define TYPEOFF (4)
-#define OTHEROFF (5)
-#define DESCOFF (6)
-#define VALOFF (8)
-#define STABSIZE (12)
+ file_name = NULL;
+ directory_name = NULL;
- /* It would be nice if we could skip ahead to the stabs symbols for
- the next compilation unit to quickly scan through the compilation
- units. Unfortunately, since each line number gets a separate
- stabs entry, it is entirely plausible that a large source file
- will overflow the 16 bit count of stabs entries. */
- fnaddr = 0;
- directory_name = NULL;
- main_file_name = NULL;
- current_file_name = NULL;
- line_file_name = NULL;
- fnname = NULL;
- low_func_vma = 0;
- low_line_vma = 0;
-
- stabend = info->stabs + stabsize;
-
- if (info->cached_stab == NULL || offset < info->cached_offset)
- {
- stab = info->stabs;
- str = info->strs;
- stroff = 0;
- }
- else
- {
- stab = info->cached_stab;
- str = info->cached_str;
- stroff = info->cached_stroff;
- }
+ for (i = 0, stroff = 0, stab = info->stabs, str = info->strs;
+ i < info->indextablesize && stab < info->stabs + stabsize;
+ stab += STABSIZE)
+ {
+ switch (stab[TYPEOFF])
+ {
+ case 0:
+ /* This is the first entry in a compilation unit. */
+ if ((bfd_size_type) ((info->strs + strsize) - str) < stroff)
+ break;
+ str += stroff;
+ stroff = bfd_get_32 (abfd, stab + VALOFF);
+ break;
- info->cached_offset = offset;
+ case N_SO:
+ /* The main file name. */
- for (; stab < stabend; stab += STABSIZE)
- {
- boolean done;
- bfd_vma val;
- char *name;
+ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
- done = false;
+ if (*file_name == '\0')
+ {
+ directory_name = NULL;
+ file_name = NULL;
+ }
+ else if (stab + STABSIZE >= info->stabs + stabsize
+ || *(stab + STABSIZE + TYPEOFF) != N_SO)
+ {
+ directory_name = NULL;
+ }
+ else
+ {
+ /* Two consecutive N_SOs are a directory and a file
+ name. */
+ stab += STABSIZE;
+ directory_name = file_name;
+ file_name = ((char *) str
+ + bfd_get_32 (abfd, stab + STRDXOFF));
+ }
+ break;
- switch (stab[TYPEOFF])
- {
- case 0:
- /* This is the first entry in a compilation unit. */
- if ((bfd_size_type) ((info->strs + strsize) - str) < stroff)
- {
- done = true;
+ case N_SOL:
+ /* The name of an include file. */
+ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
break;
- }
- str += stroff;
- stroff = bfd_get_32 (abfd, stab + VALOFF);
- break;
- case N_SO:
- /* The main file name. */
+ case N_FUN:
+ /* A function name. */
- val = bfd_get_32 (abfd, stab + VALOFF);
- if (val > offset)
- {
- done = true;
+ name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
+
+ if (*name == '\0')
+ name = NULL;
+
+ function_name = name;
+
+ if (name == NULL)
+ continue;
+
+ val = bfd_get_32 (abfd, stab + VALOFF);
+
+ info->indextable[i].val = val;
+ info->indextable[i].stab = stab;
+ info->indextable[i].str = str;
+ info->indextable[i].directory_name = directory_name;
+ info->indextable[i].file_name = file_name;
+ info->indextable[i].function_name = function_name;
+
+ ++i;
break;
}
+ }
- name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
+ info->indextable[i].val = (bfd_vma) -1;
+ info->indextable[i].stab = info->stabs + stabsize;
+ info->indextable[i].str = str;
+ info->indextable[i].directory_name = NULL;
+ info->indextable[i].file_name = NULL;
+ info->indextable[i].function_name = NULL;
+ ++i;
- /* An empty string indicates the end of the compilation
- unit. */
- if (*name == '\0')
+ info->indextablesize = i;
+
+ qsort (info->indextable, i, sizeof (struct indexentry), cmpindexentry);
+
+ *pinfo = (PTR) info;
+ }
+
+ /* We are passed a section relative offset. The offsets in the
+ stabs information are absolute. */
+ offset += bfd_get_section_vma (abfd, section);
+
+#ifdef ENABLE_CACHING
+ if (info->cached_indexentry != NULL
+ && offset >= info->cached_offset
+ && offset < (info->cached_indexentry + 1)->val)
+ {
+ stab = info->cached_stab;
+ indexentry = info->cached_indexentry;
+ file_name = info->cached_file_name;
+ }
+ else
+#endif
+ {
+ /* Cache non-existant or invalid. Do binary search on
+ indextable. */
+
+ long low, high;
+ long mid = -1;
+
+ indexentry = NULL;
+
+ low = 0;
+ high = info->indextablesize - 1;
+ while (low != high)
+ {
+ mid = (high + low) / 2;
+ if (offset >= info->indextable[mid].val
+ && offset < info->indextable[mid + 1].val)
{
- /* If there are functions in different sections, they
- may have addresses larger than val, but we don't want
- to forget the file name. When there are functions in
- different cases, there is supposed to be an N_FUN at
- the end of the function indicating where it ends. */
- if (low_func_vma < val || fnname == NULL)
- main_file_name = NULL;
+ indexentry = &info->indextable[mid];
break;
}
- /* We know that we have to get to at least this point in the
- stabs entries for this offset. */
- info->cached_stab = stab;
- info->cached_str = str;
- info->cached_stroff = stroff;
+ if (info->indextable[mid].val > offset)
+ high = mid;
+ else
+ low = mid + 1;
+ }
- current_file_name = name;
+ if (indexentry == NULL)
+ return true;
- /* Look ahead to the next symbol. Two consecutive N_SO
- symbols are a directory and a file name. */
- if (stab + STABSIZE >= stabend
- || *(stab + STABSIZE + TYPEOFF) != N_SO)
- directory_name = NULL;
- else
- {
- stab += STABSIZE;
- directory_name = current_file_name;
- current_file_name = ((char *) str
- + bfd_get_32 (abfd, stab + STRDXOFF));
- }
+ stab = indexentry->stab + STABSIZE;
+ file_name = indexentry->file_name;
+ }
- main_file_name = current_file_name;
+ directory_name = indexentry->directory_name;
+ str = indexentry->str;
- break;
+ for (; stab < (indexentry+1)->stab; stab += STABSIZE)
+ {
+ boolean done;
+ bfd_vma val;
+ done = false;
+
+ switch (stab[TYPEOFF])
+ {
case N_SOL:
/* The name of an include file. */
- current_file_name = ((char *) str
- + bfd_get_32 (abfd, stab + STRDXOFF));
+ val = bfd_get_32 (abfd, stab + VALOFF);
+ if (val <= offset)
+ {
+ file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
+ *pline = 0;
+ }
break;
case N_SLINE:
@@ -1015,40 +1127,25 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
case N_BSLINE:
/* A line number. The value is relative to the start of the
current function. */
- val = fnaddr + bfd_get_32 (abfd, stab + VALOFF);
- if (val >= low_line_vma && val <= offset)
+ val = indexentry->val + bfd_get_32 (abfd, stab + VALOFF);
+ if (val <= offset)
{
*pline = bfd_get_16 (abfd, stab + DESCOFF);
- low_line_vma = val;
- line_file_name = current_file_name;
+
+#ifdef ENABLE_CACHING
+ info->cached_stab = stab;
+ info->cached_offset = val;
+ info->cached_file_name = file_name;
+ info->cached_indexentry = indexentry;
+#endif
}
+ if (val > offset)
+ done = true;
break;
case N_FUN:
- /* A function name. */
- val = bfd_get_32 (abfd, stab + VALOFF);
- name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
-
- /* An empty string here indicates the end of a function, and
- the value is relative to fnaddr. */
-
- if (*name == '\0')
- {
- val += fnaddr;
- if (val >= low_func_vma && val < offset)
- fnname = NULL;
- }
- else
- {
- if (val >= low_func_vma && val <= offset)
- {
- fnname = name;
- low_func_vma = val;
- }
-
- fnaddr = val;
- }
-
+ case N_SO:
+ done = true;
break;
}
@@ -1056,46 +1153,34 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
break;
}
- if (main_file_name == NULL)
- {
- /* No information found. */
- return true;
- }
-
*pfound = true;
- if (*pline != 0)
- main_file_name = line_file_name;
-
- if (main_file_name != NULL)
+ if (file_name[0] == '/' || directory_name == NULL)
+ *pfilename = file_name;
+ else
{
- if (main_file_name[0] == '/' || directory_name == NULL)
- *pfilename = main_file_name;
- else
- {
- size_t dirlen;
+ size_t dirlen;
- dirlen = strlen (directory_name);
- if (info->filename == NULL
- || strncmp (info->filename, directory_name, dirlen) != 0
- || strcmp (info->filename + dirlen, main_file_name) != 0)
- {
- if (info->filename != NULL)
- free (info->filename);
- info->filename = (char *) bfd_malloc (dirlen +
- strlen (main_file_name)
- + 1);
- if (info->filename == NULL)
- return false;
- strcpy (info->filename, directory_name);
- strcpy (info->filename + dirlen, main_file_name);
- }
-
- *pfilename = info->filename;
+ dirlen = strlen (directory_name);
+ if (info->filename == NULL
+ || strncmp (info->filename, directory_name, dirlen) != 0
+ || strcmp (info->filename + dirlen, file_name) != 0)
+ {
+ if (info->filename != NULL)
+ free (info->filename);
+ info->filename = (char *) bfd_malloc (dirlen +
+ strlen (file_name)
+ + 1);
+ if (info->filename == NULL)
+ return false;
+ strcpy (info->filename, directory_name);
+ strcpy (info->filename + dirlen, file_name);
}
+
+ *pfilename = info->filename;
}
- if (fnname != NULL)
+ if (indexentry->function_name != NULL)
{
char *s;
@@ -1103,11 +1188,11 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
to clobber the colon. It's OK to change the name, since the
string is in our own local storage anyhow. */
- s = strchr (fnname, ':');
+ s = strchr (indexentry->function_name, ':');
if (s != NULL)
*s = '\0';
- *pfnname = fnname;
+ *pfnname = indexentry->function_name;
}
return true;