* 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.
This commit is contained in:
parent
6bf191bf4d
commit
53d3ce37d4
25 changed files with 2965 additions and 587 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
1963
bfd/configure
vendored
1963
bfd/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -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])
|
||||
|
|
|
@ -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 \
|
||||
|
|
41
bfd/elf.c
41
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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
35
bfd/libbfd.h
35
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",
|
||||
|
|
112
bfd/peicode.h
112
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");
|
||||
|
|
250
bfd/po/Make-in
Normal file
250
bfd/po/Make-in
Normal file
|
@ -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:
|
200
bfd/po/POTFILES.in
Normal file
200
bfd/po/POTFILES.in
Normal file
|
@ -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
|
469
bfd/syms.c
469
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,6 +937,117 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
if (reloc_vector != NULL)
|
||||
free (reloc_vector);
|
||||
|
||||
/* 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. */
|
||||
|
||||
info->indextablesize = 0;
|
||||
for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
|
||||
{
|
||||
if (stab[TYPEOFF] == N_FUN)
|
||||
++info->indextablesize;
|
||||
}
|
||||
|
||||
if (info->indextablesize == 0)
|
||||
return true;
|
||||
++info->indextablesize;
|
||||
|
||||
info->indextable = ((struct indexentry *)
|
||||
bfd_alloc (abfd,
|
||||
(sizeof (struct indexentry)
|
||||
* info->indextablesize)));
|
||||
if (info->indextable == NULL)
|
||||
return false;
|
||||
|
||||
file_name = NULL;
|
||||
directory_name = NULL;
|
||||
|
||||
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;
|
||||
|
||||
case N_SO:
|
||||
/* The main file name. */
|
||||
|
||||
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
|
||||
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;
|
||||
|
||||
case N_SOL:
|
||||
/* The name of an include file. */
|
||||
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
break;
|
||||
|
||||
case N_FUN:
|
||||
/* A function name. */
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
info->indextablesize = i;
|
||||
|
||||
qsort (info->indextable, i, sizeof (struct indexentry), cmpindexentry);
|
||||
|
||||
*pinfo = (PTR) info;
|
||||
}
|
||||
|
||||
|
@ -881,133 +1055,71 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
stabs information are absolute. */
|
||||
offset += bfd_get_section_vma (abfd, section);
|
||||
|
||||
/* 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)
|
||||
|
||||
/* 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
|
||||
#ifdef ENABLE_CACHING
|
||||
if (info->cached_indexentry != NULL
|
||||
&& offset >= info->cached_offset
|
||||
&& offset < (info->cached_indexentry + 1)->val)
|
||||
{
|
||||
stab = info->cached_stab;
|
||||
str = info->cached_str;
|
||||
stroff = info->cached_stroff;
|
||||
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)
|
||||
{
|
||||
indexentry = &info->indextable[mid];
|
||||
break;
|
||||
}
|
||||
|
||||
if (info->indextable[mid].val > offset)
|
||||
high = mid;
|
||||
else
|
||||
low = mid + 1;
|
||||
}
|
||||
|
||||
if (indexentry == NULL)
|
||||
return true;
|
||||
|
||||
stab = indexentry->stab + STABSIZE;
|
||||
file_name = indexentry->file_name;
|
||||
}
|
||||
|
||||
info->cached_offset = offset;
|
||||
directory_name = indexentry->directory_name;
|
||||
str = indexentry->str;
|
||||
|
||||
for (; stab < stabend; stab += STABSIZE)
|
||||
for (; stab < (indexentry+1)->stab; stab += STABSIZE)
|
||||
{
|
||||
boolean done;
|
||||
bfd_vma val;
|
||||
char *name;
|
||||
|
||||
done = false;
|
||||
|
||||
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;
|
||||
break;
|
||||
}
|
||||
str += stroff;
|
||||
stroff = bfd_get_32 (abfd, stab + VALOFF);
|
||||
break;
|
||||
|
||||
case N_SO:
|
||||
/* The main file name. */
|
||||
|
||||
val = bfd_get_32 (abfd, stab + VALOFF);
|
||||
if (val > offset)
|
||||
{
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
|
||||
name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
|
||||
/* An empty string indicates the end of the compilation
|
||||
unit. */
|
||||
if (*name == '\0')
|
||||
{
|
||||
/* 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;
|
||||
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;
|
||||
|
||||
current_file_name = name;
|
||||
|
||||
/* 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));
|
||||
}
|
||||
|
||||
main_file_name = current_file_name;
|
||||
|
||||
break;
|
||||
|
||||
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;
|
||||
|
||||
dirlen = strlen (directory_name);
|
||||
if (info->filename == NULL
|
||||
|| strncmp (info->filename, directory_name, dirlen) != 0
|
||||
|| strcmp (info->filename + dirlen, file_name) != 0)
|
||||
{
|
||||
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;
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue