From: Karol Lewandowski Date: Wed, 23 Mar 2016 12:27:01 +0000 (+0100) Subject: Imported Upstream version 0.165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fupstream_0.165;p=platform%2Fupstream%2Felfutils.git Imported Upstream version 0.165 --- diff --git a/ChangeLog b/ChangeLog index 8277932..637bc13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,128 @@ +2016-01-08 Mark Wielaard + + * configure.ac: Set version to 0.165. + * NEWS: Add 0.164 section. + +2016-01-04 Mark Wielaard + + * configure.ac: Add BZ2_LIBS and LIBLZMA substitutions. + Add config/libelf.pc and config/libdw.pc config files. + +2015-12-31 Mark Wielaard + + * Makefile.am (AM_MAKEFLAGS): Set --no-print-directory. + +2015-10-16 Mark Wielaard + + * configure.ac: Make zlib mandatory. + +2015-10-15 Mark Wielaard + + * configure.ac: Set version to 0.164. + * NEWS: Add 0.164 additions. + +2015-10-07 Mark Wielaard + + * configure.ac: Add AM_SILENT_RULES([yes]). + +2015-09-24 Jose E. Marchesi + + * configure.ac: Use -fPIC instead of -fpic to avoid relocation + overflows in some platforms. + +2015-07-11 Pino Toscano + + * .gitignore: Add more generated files, and anchor some of the + existing ones. + +2015-06-19 Mark Wielaard + + * configure.ac: Set version to 0.163. + * NEWS: Mention 0.163 is bug fixes only. + +2015-06-10 Mark Wielaard + + * configure.ac: Set version to 0.162. + * NEWS: Add 0.162 additions. + +2015-06-08 Mark Wielaard + + * configure.ac (ADD_STACK_USAGE_WARNING): New conditional based on + gcc -Wstack-usage check. + +2015-05-31 Mark Wielaard + + * configure.ac (MODVERSION): Define using LIBEBL_SUBDIR, eu_version + and ac_cv_build. + +2015-05-31 Mark Wielaard + + * configure.ac (use_undefined): Use AC_LINK_IFELSE. AC_DEFINE + CHECK_UNDEFINED. + +2015-05-30 Mark Wielaard + + * configure.ac: Check for bunzip2. Check flex and bison are + installed in maintainer-mode. Otherwise check libdw/known-dwarf.h + is already generated. + +2015-05-21 Mark Wielaard + + * configure.ac: Add --enable-sanitize-undefined. + * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Rename to... + (AM_DISTCHECK_CONFIGURE_FLAGS): this. Add --enable-sanitize-undefined. + +2015-05-04 Anthony G. Basile + + * configure.ac (argp_LDADD): Check if libc has argp and set + argp_LDADD accordingly. + +2015-05-03 Max Filippov + + * configure.ac (DEMANGLE): Fix enable_demangler setting. + +2015-05-01 Mark Wielaard + + * configure.ac (DEMANGLE): Explicitly set enable_demangler. + +2015-05-01 Mark Wielaard + + * configure.ac (debugpred): Use and set use_debugpred_val. + (textrelcheck): Explicitly set enable_textrelcheck to yes or no. + (symbol-versioning): Likewise for enable_symbol_versioning. + AC_MSG_NOTICE overview of enabled/disabled features. + +2015-04-23 Max Filippov + + * configure.ac: Add --disable-symbol-versioning. + +2015-04-14 Mark Wielaard + + * configure.ac (ac_cv_c99): Add explicit checks for all GNU99 + extensions used. + +2015-03-13 Mark Wielaard + + * configure.ac (ac_cv_c99): Add explicit return. + (ac_cv_tls): Add stdlib.h include. + +2014-12-18 Mark Wielaard + + * configure.ac: Set version to 0.161. + * NEWS: Add dwarf.h additions. + +2014-12-15 Josh Stone + + * .gitignore: Add config/compile as installed by automake 1.14. + +2014-11-27 Mark Wielaard + + * configure.ac: Add --disable-textrelcheck. + +2014-10-06 Mark Wielaard + + * NEWS: New section 0.161. Add dwarf_peel_type. + 2014-08-25 Mark Wielaard * configure.ac: Set version to 0.160. diff --git a/INSTALL b/INSTALL index 007e939..2099840 100644 --- a/INSTALL +++ b/INSTALL @@ -12,8 +12,8 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented diff --git a/Makefile.am b/Makefile.am index d044a7c..2ff444e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to create Makefile.in ## Configure input file for elfutils. ## -## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2008, 2009 Red Hat, Inc. +## Copyright (C) 1996-2006, 2008, 2009, 2015 Red Hat, Inc. ## ## This file is part of elfutils. ## @@ -20,6 +20,10 @@ ## ACLOCAL_AMFLAGS = -I m4 +# automake already tells which subdir is being entered. +# Don't make make repeat. +AM_MAKEFLAGS = --no-print-directory + pkginclude_HEADERS = version.h # Add doc back when we have some real content. @@ -33,9 +37,9 @@ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ # Make sure the test build uses the same compiler, which on e.g. ppc64 # determines which platform we are actually testing. # Run all tests under valgrind. -DISTCHECK_CONFIGURE_FLAGS = \ +AM_DISTCHECK_CONFIGURE_FLAGS = \ --libdir=`echo $(libdir) | sed "s,^$(exec_prefix),$$dc_install_base,"`\ - --enable-valgrind \ + --enable-valgrind --enable-sanitize-undefined \ CC="$(CC)" distcheck-hook: diff --git a/Makefile.in b/Makefile.in index ea448e1..5af9d3b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,15 +89,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog THANKS \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(top_srcdir)/config/elfutils.spec.in \ - $(top_srcdir)/config/version.h.in $(pkginclude_HEADERS) \ - ABOUT-NLS COPYING TODO $(top_srcdir)/config/ar-lib \ - $(top_srcdir)/config/config.guess \ - $(top_srcdir)/config/config.sub \ - $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ @@ -95,6 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(pkginclude_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -187,6 +190,14 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/config/ar-lib $(top_srcdir)/config/compile \ + $(top_srcdir)/config/config.guess \ + $(top_srcdir)/config/config.sub \ + $(top_srcdir)/config/elfutils.spec.in \ + $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \ + $(top_srcdir)/config/version.h.in ABOUT-NLS AUTHORS COPYING \ + ChangeLog INSTALL NEWS README THANKS TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -237,6 +248,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -256,6 +268,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -267,6 +282,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -310,6 +326,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -354,6 +371,10 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ ACLOCAL_AMFLAGS = -I m4 + +# automake already tells which subdir is being entered. +# Don't make make repeat. +AM_MAKEFLAGS = --no-print-directory pkginclude_HEADERS = version.h # Add doc back when we have some real content. @@ -368,9 +389,9 @@ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ # Make sure the test build uses the same compiler, which on e.g. ppc64 # determines which platform we are actually testing. # Run all tests under valgrind. -DISTCHECK_CONFIGURE_FLAGS = \ +AM_DISTCHECK_CONFIGURE_FLAGS = \ --libdir=`echo $(libdir) | sed "s,^$(exec_prefix),$$dc_install_base,"`\ - --enable-valgrind \ + --enable-valgrind --enable-sanitize-undefined \ CC="$(CC)" all: config.h @@ -392,7 +413,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -413,8 +433,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -644,10 +664,16 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -682,17 +708,18 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -871,6 +898,8 @@ uninstall-am: uninstall-pkgincludeHEADERS pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + distcheck-hook: chmod -R u+w $(distdir) diff --git a/NEWS b/NEWS index aceb3e3..53fe364 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,74 @@ +Version 0.165 + +elfcompress: New utility to compress or decompress ELF sections. + +readelf: Add -z,--decompress option. + +libelf: Add elf_compress, elf_compress_gnu, elf32_getchdr, elf64_getchdr + and gelf_getchdr. + +libdwelf: New function dwelf_scn_gnu_compressed_size. + +config: Add libelf and libdw pkg-config files. + +backends: sparc support for core and live backtraces. + +translations: Updated Polish translation. + +Version 0.164 + +strip, unstrip: Handle ELF files with merged strtab/shstrtab tables. + Handle missing SHF_INFO_LINK section flags. + +libelf: Use int64_t for offsets in libelf.h instead of loff_t. + +libdw: dwarf.h Add preliminary DWARF5 DW_LANG_Haskell. + +libdwfl: dwfl_standard_find_debuginfo now searches any subdir of the binary + path under the debuginfo root when the separate debug file couldn't + be found by build-id. + dwfl_linux_proc_attach can now be called before any Dwfl_Modules + have been reported. + +backends: Better sparc and sparc64 support. + +translations: Updated Ukrainian translation. + +Provide default-yama-scope subpackage. + +Version 0.163 + +Bug fixes only, no new features. + +Version 0.162 + +libdw: Install new header elfutils/known-dwarf.h. + dwarf.h Add preliminary DWARF5 constants DW_TAG_atomic_type, + DW_LANG_Fortran03, DW_LANG_Fortran08. dwarf_peel_type now also + handles DW_TAG_atomic_type. + +addr2line: Input addresses are now always interpreted as hexadecimal + numbers, never as octal or decimal numbers. + New option -a, --addresses to print address before each entry. + New option -C, --demangle to show demangled symbols. + New option --pretty-print to print all information on one line. + +ar: CVE-2014-9447 Directory traversal vulnerability in ar extraction. + +backends: x32 support. + +Version 0.161 + +libdw: New function dwarf_peel_type. dwarf_aggregate_size now uses + dwarf_peel_type to also provide the sizes of qualified types. + dwarf_getmacros will now serve either of .debug_macro and + .debug_macinfo transparently. New interfaces + dwarf_getmacros_off, dwarf_macro_getsrcfiles, + dwarf_macro_getparamcnt, and dwarf_macro_param are available + for more generalized inspection of macros and their parameters. + dwarf.h: Add DW_AT_GNU_deleted, DW_AT_noreturn, DW_LANG_C11, + DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14. + Version 0.160 libdw: New functions dwarf_cu_getdwarf, dwarf_cu_die. diff --git a/README b/README index f7e4b61..3564676 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Fundamental design decision: greatly simplified and speed increases. Since no change violating this assumption is in sight this is believed to be a worthwhile optimization. -- the ABI of the backend modules is not guaranteed. Really, not guarantee +- the ABI of the backend modules is not guaranteed. Really, no guarantee whatsoever. We are enforcing this in the code. The modules and their users must match. No third-party EBL module are supported or allowed. The only reason there are separate modules is to not have the code for diff --git a/aclocal.m4 b/aclocal.m4 index 451a3ff..2513181 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.4])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -76,7 +76,8 @@ AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -93,7 +94,7 @@ AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], fi rm -f conftest.lib libconftest.a ]) - ]) + AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) @@ -117,7 +118,7 @@ AC_SUBST([AR])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -162,15 +163,14 @@ AC_SUBST([AR])dnl # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -392,7 +392,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -468,7 +468,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -477,6 +477,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -552,8 +558,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -585,6 +591,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -593,7 +644,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -615,7 +665,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,7 +676,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -636,7 +686,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -655,7 +705,7 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Copyright (C) 1998-2013 Free Software Foundation, Inc. +# Copyright (C) 1998-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +726,7 @@ fi]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -711,7 +761,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -761,7 +811,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -800,7 +850,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -829,9 +879,73 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -912,7 +1026,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -972,7 +1086,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1000,7 +1114,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1019,7 +1133,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/backends/ChangeLog b/backends/ChangeLog index a335b20..4b604fd 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,168 @@ +2015-12-08 Jose E. Marchesi + + * sparc_init.c (sparc_init): Hook sparc_set_initial_registers_tid. + * sparc_initreg.c: New file. + * Makefile.am (sparc_SRCS): Added sparc_initreg.c. + +2015-12-08 Jose E. Marchesi + + * sparc_corenote.c: Header comment typo fixed. + (PRSTATUS_REGSET_ITEMS): Defined, so the PC can be fetched from + core files. + * Makefile.am (sparc_SRCS): Added sparc_cfi.c + * sparc_cfi.c: New file. + * sparc_init.c (sparc_init): Set eh->frame_nregs, eh->ra_offset + and hook sparc_abi_cfi. + +2015-10-21 Chih-Hung Hsieh + + * ia64_retval.c (hfa_type): Move nested function 'hfa' to file scope. + * aarch64_regs.c (aarch64_register_info): Move nested function 'regtype' + to file scope. + +2015-10-16 Mark Wielaard + + * ppc_symbol.c (ppc_check_special_symbol): Also allow _SDA_BASE_ + in .data section. + +2015-10-05 Josh Stone + + * Makefile.am (libebl_%.so): Add AM_V_at and AM_V_CCLD silencers. + +2015-10-06 Jose E. Marchesi + + * sparc_attrs.c: New file. + * Makefile.am (sparc_SRCS): Added sparc_attrs.c + * sparc_init.c (sparc_init): Hook sparc_check_object_attribute. + +2015-10-02 Jose E. Marchesi + + * sparc_init.c (RELOC_TYPE_ID): Defined. + * common-reloc.c (reloc_type_name): Apply target-specific + relocation ID extractors if defined. + (reloc_type_check): Likewise. + (reloc_valid_use): Likewise. + +2015-10-02 Jose E. Marchesi + + * sparc_reloc.def: Added relocation types WDISP10, JMP_IREL and + IRELATIVE. + +2015-09-22 Mark Wielaard + + * arm_attrs.c: Remove old-style function definitions. + * linux-core-note.c: Likewise. + * ppc_attrs.c: Likewise. + +2015-09-04 Chih-Hung Hsieh + + * aarch64_init.c (aarch64_init): Replace K&R function definition + with ansi-C definitions. + * alpha_init.c (alpha_init): Likewise. + * arm_init.c (arm_init): Likewise. + * i386_init.c (i386_init): Likewise. + * ia64_init.c (ia64_init): Likewise. + * ppc64_init.c (ppc64_init): Likewise. + * ppc_init.c (ppc_init): Likewise. + * s390_init.c (s390_init): Likewise. + * sh_init.c (sh_init): Likewise. + * sparc_init.c (sparc_init): Likewise. + * tilegx_init.c (tilegx_init): Likewise. + * x86_64_init.c (x86_64_init): Likewise. + +2015-09-03 Mark Wielaard + + * sparc_regs.c (sparc_register_info): Use ebl->class not ebl->machine. + +2015-06-26 Pino Toscano + + * i386_initreg.c: Reduce scope of some includes to match their usage. + +2015-04-28 Mark Wielaard + + * aarch64_reloc.def: Drop "64" from TLS_DTPMOD64, TLS_DTPREL64 and + TLS_TPREL64. + +2015-04-01 H.J. Lu + + * Makefile.am (x86_64_SRCS): Add x32_corenote.c. + * linux-core-note.c (PR_REG): New. + (PRPSINFO_UID_T): Likewise. + (ALIGN_PRPSINFO_UID_T): Likewise. + (TYPE_PRPSINFO_UID_T): Likewise. + (PRPSINFO_GID_T): Likewise. + (ALIGN_PRPSINFO_GID_T): Likewise. + (TYPE_PRPSINFO_GID_T): Likewise. + (pr_reg): Replace ULONG with PR_REG. + (pr_uid): Replace UID_T with PRPSINFO_UID_T. + (uid): Likewise. + (pr_gid): Replace GID_T with PRPSINFO_GID_T. + (gid): Likewise. + * x32_corenote.c: New file. + * x86_64_corenote.c (BITS): New. Support x32. + (BACKEND): Support x32. + (ULONG): Likewise. + (ALIGN_ULONG): Likewise. + (TYPE_ULONG): Likewise. + (PRPSINFO_UID_T): New. + (ALIGN_PRPSINFO_UID_T): Likewise. + (TYPE_PRPSINFO_UID_T): Likewise. + (PRPSINFO_GID_T): Likewise. + (ALIGN_PRPSINFO_GID_T): Likewise. + (TYPE_PRPSINFO_GID_T): Likewise. + (PR_REG): Likewise. + (ALIGN_PR_REG): Likewise. + * x86_64_init.c (x32_core_note): New. + (x86_64_init): Set eh->core_note to x32_core_note for x32. + +2015-03-23 Mark Wielaard + + * aarch64_symbol.c (aarch64_check_special_symbol): Accept + _GLOBAL_OFFSET_TABLE_ pointing anywhere in .got. + +2015-03-09 Mark Wielaard + + * aarch64_reloc.def (COPY): Add DYN. + * arm_reloc.def (COPY): Likewise. + * i386_reloc.def (COPY): Likewise. + * ia64_reloc.def (COPY): Likewise. + * ppc64_reloc.def (COPY): Likewise. + * ppc_reloc.def (COPY): Likewise. + * s390_reloc.def (COPY): Likewise. + * sh_reloc.def (COPY): Likewise. + * sparc_reloc.def (COPY): Likewise. + * tilegx_reloc.def (COPY): Likewise. + * x86_64_reloc.def (COPY): Likewise. + +2015-02-23 Petr Machata + + * arm_symbol.c (arm_symbol_type_name): New function. + * arm_init.c (arm_init): Initialize the hook. + +2014-12-30 Mark Wielaard + + * ppc_symbol.c (find_dyn_got): Check sh_entsize is not zero. + +2014-12-18 Ulrich Drepper + + * Makefile.am: Suppress output of textrel_check command. + +2014-11-22 Mark Wielaard + + * ppc64_symbol.c (ppc64_bss_plt_p): Remove ehdr argument. + * ppc_symbol.c (find_dyn_got): Likewise. Use elf_getphdrnum. + (ppc_check_special_symbol): Call find_dyn_got without ehdr. + (ppc_bss_plt_p): Remove ehdr argument. + +2014-11-17 Mark Wielaard + + * ppc64_init.c (ppc64_init): Check section name is not NULL. + +2014-10-06 Mark Wielaard + + * libebl_CPU.h (dwarf_peel_type): Removed. + (dwarf_peeled_die_type): Use libdw dwarf_peel_type. + 2014-07-18 Kyle McMartin Mark Wielaard diff --git a/backends/Makefile.am b/backends/Makefile.am index e06841c..b16f948 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -58,7 +58,7 @@ am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \ - x86_64_initreg.c + x86_64_initreg.c x32_corenote.c cpu_x86_64 = ../libcpu/libcpu_x86_64.a libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os) @@ -84,7 +84,8 @@ libebl_aarch64_pic_a_SOURCES = $(aarch64_SRCS) am_libebl_aarch64_pic_a_OBJECTS = $(aarch64_SRCS:.c=.os) sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \ - sparc_corenote.c sparc64_corenote.c sparc_auxv.c + sparc_corenote.c sparc64_corenote.c sparc_auxv.c sparc_attrs.c \ + sparc_cfi.c sparc_initreg.c libebl_sparc_pic_a_SOURCES = $(sparc_SRCS) am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os) @@ -114,13 +115,13 @@ am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os) libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) @rm -f $(@:.so=.map) - echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ + $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ > $(@:.so=.map) - $(LINK) -shared -o $(@:.map=.so) \ + $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ -Wl,--version-script,$(@:.so=.map) \ -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) - $(textrel_check) + @$(textrel_check) libebl_i386.so: $(cpu_i386) libebl_x86_64.so: $(cpu_x86_64) diff --git a/backends/Makefile.in b/backends/Makefile.in index 9e678b0..01b400a 100644 --- a/backends/Makefile.in +++ b/backends/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,9 +90,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(noinst_HEADERS) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING subdir = backends ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ @@ -91,12 +99,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -166,7 +175,8 @@ libebl_sparc_pic_a_LIBADD = am__objects_10 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \ sparc_regs.$(OBJEXT) sparc_retval.$(OBJEXT) \ sparc_corenote.$(OBJEXT) sparc64_corenote.$(OBJEXT) \ - sparc_auxv.$(OBJEXT) + sparc_auxv.$(OBJEXT) sparc_attrs.$(OBJEXT) sparc_cfi.$(OBJEXT) \ + sparc_initreg.$(OBJEXT) libebl_sparc_pic_a_OBJECTS = $(am_libebl_sparc_pic_a_OBJECTS) libebl_tilegx_pic_a_AR = $(AR) $(ARFLAGS) libebl_tilegx_pic_a_LIBADD = @@ -180,7 +190,7 @@ am__objects_12 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \ x86_64_corenote.$(OBJEXT) x86_64_cfi.$(OBJEXT) \ x86_64_retval.$(OBJEXT) x86_64_regs.$(OBJEXT) \ i386_auxv.$(OBJEXT) x86_64_syscall.$(OBJEXT) \ - x86_64_initreg.$(OBJEXT) + x86_64_initreg.$(OBJEXT) x32_corenote.$(OBJEXT) libebl_x86_64_pic_a_OBJECTS = $(am_libebl_x86_64_pic_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -250,6 +260,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -259,6 +271,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -278,6 +291,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -289,6 +305,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -332,6 +349,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -378,15 +396,29 @@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda $(foreach m,$(modules), libebl_$(m).map \ libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS)) -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ tilegx @@ -411,7 +443,7 @@ libebl_sh_pic_a_SOURCES = $(sh_SRCS) am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \ - x86_64_initreg.c + x86_64_initreg.c x32_corenote.c cpu_x86_64 = ../libcpu/libcpu_x86_64.a libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) @@ -436,7 +468,8 @@ aarch64_SRCS = aarch64_init.c aarch64_regs.c aarch64_symbol.c \ libebl_aarch64_pic_a_SOURCES = $(aarch64_SRCS) am_libebl_aarch64_pic_a_OBJECTS = $(aarch64_SRCS:.c=.os) sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \ - sparc_corenote.c sparc64_corenote.c sparc_auxv.c + sparc_corenote.c sparc64_corenote.c sparc_auxv.c sparc_attrs.c \ + sparc_cfi.c sparc_initreg.c libebl_sparc_pic_a_SOURCES = $(sparc_SRCS) am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os) @@ -481,7 +514,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits backends/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits backends/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -490,7 +522,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -635,9 +667,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh_retval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh_symbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc64_corenote.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_attrs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_auxv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_cfi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_corenote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_initreg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_regs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_retval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_symbol.Po@am__quote@ @@ -646,6 +681,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilegx_regs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilegx_retval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilegx_symbol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x32_corenote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86_64_cfi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86_64_corenote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86_64_init.Po@am__quote@ @@ -660,14 +696,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -868,25 +904,30 @@ uninstall-am: mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) @rm -f $(@:.so=.map) - echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ + $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ > $(@:.so=.map) - $(LINK) -shared -o $(@:.map=.so) \ + $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ -Wl,--version-script,$(@:.so=.map) \ -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) - $(textrel_check) + @$(textrel_check) libebl_i386.so: $(cpu_i386) libebl_x86_64.so: $(cpu_x86_64) diff --git a/backends/aarch64_init.c b/backends/aarch64_init.c index b0fd17a..6395f11 100644 --- a/backends/aarch64_init.c +++ b/backends/aarch64_init.c @@ -39,11 +39,10 @@ const char * -aarch64_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +aarch64_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/aarch64_regs.c b/backends/aarch64_regs.c index 7a8a678..23014bf 100644 --- a/backends/aarch64_regs.c +++ b/backends/aarch64_regs.c @@ -38,6 +38,25 @@ #define BACKEND aarch64_ #include "libebl_CPU.h" +__attribute__ ((format (printf, 7, 8))) +static ssize_t +do_regtype (const char *setname, int type, + const char **setnamep, int *typep, + char *name, size_t namelen, const char *fmt, ...) +{ + *setnamep = setname; + *typep = type; + + va_list ap; + va_start (ap, fmt); + int s = vsnprintf (name, namelen, fmt, ap); + va_end(ap); + + if (s < 0 || (unsigned) s >= namelen) + return -1; + return s + 1; +} + ssize_t aarch64_register_info (Ebl *ebl __attribute__ ((unused)), int regno, char *name, size_t namelen, @@ -47,26 +66,13 @@ aarch64_register_info (Ebl *ebl __attribute__ ((unused)), if (name == NULL) return 128; - __attribute__ ((format (printf, 3, 4))) - ssize_t - regtype (const char *setname, int type, const char *fmt, ...) - { - *setnamep = setname; - *typep = type; - - va_list ap; - va_start (ap, fmt); - int s = vsnprintf (name, namelen, fmt, ap); - va_end(ap); - - if (s < 0 || (unsigned) s >= namelen) - return -1; - return s + 1; - } *prefix = ""; *bits = 64; +#define regtype(setname, type, ...) \ + do_regtype(setname, type, setnamep, typep, name, namelen, __VA_ARGS__) + switch (regno) { case 0 ... 30: diff --git a/backends/aarch64_reloc.def b/backends/aarch64_reloc.def index 36d29e6..f894687 100644 --- a/backends/aarch64_reloc.def +++ b/backends/aarch64_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for AArch64. -*- C -*- - Copyright (C) 2013, 2014 Red Hat, Inc. + Copyright (C) 2013, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -30,13 +30,13 @@ RELOC_TYPE (ABS64, REL|EXEC|DYN) RELOC_TYPE (ABS32, REL|EXEC|DYN) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JUMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) -RELOC_TYPE (TLS_DTPMOD64, EXEC|DYN) -RELOC_TYPE (TLS_DTPREL64, EXEC|DYN) -RELOC_TYPE (TLS_TPREL64, EXEC|DYN) +RELOC_TYPE (TLS_DTPMOD, EXEC|DYN) +RELOC_TYPE (TLS_DTPREL, EXEC|DYN) +RELOC_TYPE (TLS_TPREL, EXEC|DYN) RELOC_TYPE (TLSDESC, EXEC|DYN) /* R_AARCH64_NONE records that the section containing the place to be diff --git a/backends/aarch64_symbol.c b/backends/aarch64_symbol.c index 3fdc9cf..76999e4 100644 --- a/backends/aarch64_symbol.c +++ b/backends/aarch64_symbol.c @@ -1,5 +1,5 @@ /* AArch64 specific symbolic name handling. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -56,8 +56,11 @@ aarch64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) } } -/* If this is the _GLOBAL_OFFSET_TABLE_ symbol, then it should point to - .got[0] even if there is a .got.plt section. */ +/* If this is the _GLOBAL_OFFSET_TABLE_ symbol, then it should point in + the .got even if there is a .got.plt section. + https://sourceware.org/ml/libc-ports/2013-06/msg00057.html + https://bugzilla.redhat.com/show_bug.cgi?id=1201778 + */ bool aarch64_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, const char *name, const GElf_Shdr *destshdr) @@ -66,7 +69,8 @@ aarch64_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, && strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0) { const char *sname = elf_strptr (elf, ehdr->e_shstrndx, destshdr->sh_name); - if (sname != NULL && strcmp (sname, ".got.plt") == 0) + if (sname != NULL + && (strcmp (sname, ".got") == 0 || strcmp (sname, ".got.plt") == 0)) { Elf_Scn *scn = NULL; while ((scn = elf_nextscn (elf, scn)) != NULL) @@ -77,7 +81,8 @@ aarch64_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, { sname = elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name); if (sname != NULL && strcmp (sname, ".got") == 0) - return sym->st_value == shdr->sh_addr; + return (sym->st_value >= shdr->sh_addr + && sym->st_value < shdr->sh_addr + shdr->sh_size); } } } diff --git a/backends/alpha_init.c b/backends/alpha_init.c index a3307d8..25c5b32 100644 --- a/backends/alpha_init.c +++ b/backends/alpha_init.c @@ -40,11 +40,10 @@ const char * -alpha_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +alpha_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/arm_attrs.c b/backends/arm_attrs.c index c858715..6842b77 100644 --- a/backends/arm_attrs.c +++ b/backends/arm_attrs.c @@ -44,13 +44,9 @@ } while (0) bool -arm_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name) - Ebl *ebl __attribute__ ((unused)); - const char *vendor; - int tag; - uint64_t value __attribute__ ((unused)); - const char **tag_name; - const char **value_name; +arm_check_object_attribute (Ebl *ebl __attribute__ ((unused)), + const char *vendor, int tag, uint64_t value, + const char **tag_name, const char **value_name) { if (!strcmp (vendor, "aeabi")) switch (tag) diff --git a/backends/arm_init.c b/backends/arm_init.c index 3283c97..caadac6 100644 --- a/backends/arm_init.c +++ b/backends/arm_init.c @@ -1,5 +1,5 @@ /* Initialization of Arm specific backend library. - Copyright (C) 2002, 2005, 2009, 2013, 2014 Red Hat, Inc. + Copyright (C) 2002, 2005, 2009, 2013, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -40,11 +40,10 @@ const char * -arm_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +arm_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) @@ -64,6 +63,7 @@ arm_init (elf, machine, eh, ehlen) HOOK (eh, return_value_location); HOOK (eh, abi_cfi); HOOK (eh, check_reloc_target_type); + HOOK (eh, symbol_type_name); /* We only unwind the core integer registers. */ eh->frame_nregs = 16; diff --git a/backends/arm_reloc.def b/backends/arm_reloc.def index 4b7894b..113648e 100644 --- a/backends/arm_reloc.def +++ b/backends/arm_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for arm. -*- C -*- - Copyright (C) 2005-2010, 2014 Red Hat, Inc. + Copyright (C) 2005-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -48,7 +48,7 @@ RELOC_TYPE (THM_XPC22, REL) RELOC_TYPE (TLS_DTPMOD32, EXEC|DYN) RELOC_TYPE (TLS_DTPOFF32, EXEC|DYN) RELOC_TYPE (TLS_TPOFF32, EXEC|DYN) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JUMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c index cd467ff..da4a50a 100644 --- a/backends/arm_symbol.c +++ b/backends/arm_symbol.c @@ -1,5 +1,5 @@ /* Arm specific symbolic name handling. - Copyright (C) 2002-2009, 2014 Red Hat, Inc. + Copyright (C) 2002-2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -129,3 +129,16 @@ arm_check_reloc_target_type (Ebl *ebl __attribute__ ((unused)), Elf64_Word sh_ty { return sh_type == SHT_ARM_EXIDX; } + +const char * +arm_symbol_type_name (int type, + char *buf __attribute__ ((unused)), + size_t len __attribute__ ((unused))) +{ + switch (type) + { + case STT_ARM_TFUNC: + return "ARM_TFUNC"; + } + return NULL; +} diff --git a/backends/common-reloc.c b/backends/common-reloc.c index 2667ec4..3317b6c 100644 --- a/backends/common-reloc.c +++ b/backends/common-reloc.c @@ -87,6 +87,10 @@ EBLHOOK(reloc_type_name) (int reloc, char *buf __attribute__ ((unused)), size_t len __attribute__ ((unused))) { +#ifdef RELOC_TYPE_ID + reloc = RELOC_TYPE_ID (reloc); +#endif + if (reloc >= 0 && reloc < nreloc && EBLHOOK(reloc_nameidx)[reloc] != 0) return &reloc_namestr[EBLHOOK(reloc_nameidx)[reloc]]; return NULL; @@ -95,19 +99,28 @@ EBLHOOK(reloc_type_name) (int reloc, bool EBLHOOK(reloc_type_check) (int reloc) { +#ifdef RELOC_TYPE_ID + reloc = RELOC_TYPE_ID (reloc); +#endif + return reloc >= 0 && reloc < nreloc && EBLHOOK(reloc_nameidx)[reloc] != 0; } bool EBLHOOK(reloc_valid_use) (Elf *elf, int reloc) { - uint8_t uses = EBLHOOK(reloc_valid)[reloc]; + uint8_t uses; GElf_Ehdr ehdr_mem; GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); assert (ehdr != NULL); uint8_t type = ehdr->e_type; +#ifdef RELOC_TYPE_ID + reloc = RELOC_TYPE_ID (reloc); +#endif + + uses = EBLHOOK(reloc_valid)[reloc]; return type > ET_NONE && type < ET_CORE && (uses & (1 << (type - 1))); } diff --git a/backends/i386_init.c b/backends/i386_init.c index 1e0b486..515d5ac 100644 --- a/backends/i386_init.c +++ b/backends/i386_init.c @@ -39,11 +39,10 @@ #include "common-reloc.c" const char * -i386_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +i386_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/i386_initreg.c b/backends/i386_initreg.c index 51fd9ea..c344282 100644 --- a/backends/i386_initreg.c +++ b/backends/i386_initreg.c @@ -30,7 +30,7 @@ # include #endif -#if defined __i386__ || defined __x86_64__ +#if (defined __i386__ || defined __x86_64__) && defined(__linux__) # include # include # include diff --git a/backends/i386_reloc.def b/backends/i386_reloc.def index bd273b3..de3575d 100644 --- a/backends/i386_reloc.def +++ b/backends/i386_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for i386. -*- C -*- - Copyright (C) 2000, 2001, 2002, 2003, 2005, 2009 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2005, 2009, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ /* NAME, REL|EXEC|DYN */ RELOC_TYPE (NONE, 0) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (32, REL|EXEC|DYN) RELOC_TYPE (PC32, REL|EXEC|DYN) RELOC_TYPE (GOT32, REL) diff --git a/backends/ia64_init.c b/backends/ia64_init.c index 91da748..7241d7b 100644 --- a/backends/ia64_init.c +++ b/backends/ia64_init.c @@ -39,11 +39,10 @@ #include "common-reloc.c" const char * -ia64_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +ia64_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/ia64_reloc.def b/backends/ia64_reloc.def index 9e058c8..2428925 100644 --- a/backends/ia64_reloc.def +++ b/backends/ia64_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for ia64. -*- C -*- - Copyright (C) 2005, 2006 Red Hat, Inc. + Copyright (C) 2005, 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -88,7 +88,7 @@ RELOC_TYPE (PCREL22, REL) RELOC_TYPE (PCREL64I, REL) RELOC_TYPE (IPLTMSB, REL|EXEC|DYN) RELOC_TYPE (IPLTLSB, REL|EXEC|DYN) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (SUB, 0) RELOC_TYPE (LTOFF22X, REL) RELOC_TYPE (LDXMOV, REL) diff --git a/backends/ia64_retval.c b/backends/ia64_retval.c index b5928c5..dcd5f28 100644 --- a/backends/ia64_retval.c +++ b/backends/ia64_retval.c @@ -89,6 +89,17 @@ static const Dwarf_Op loc_aggregate[] = #define nloc_aggregate 1 +static inline int +compute_hfa (const Dwarf_Op *loc, int nregs, + const Dwarf_Op **locp, int fpregs_used) +{ + if (fpregs_used == 0) + *locp = loc; + else if (*locp != loc) + return 9; + return fpregs_used + nregs; +} + /* If this type is an HFA small enough to be returned in FP registers, return the number of registers to use. Otherwise 9, or -1 for errors. */ static int @@ -100,15 +111,6 @@ hfa_type (Dwarf_Die *typedie, Dwarf_Word size, If we find a datum that's not the same FP type as the first datum, punt. If we count more than eight total homogeneous FP data, punt. */ - inline int hfa (const Dwarf_Op *loc, int nregs) - { - if (fpregs_used == 0) - *locp = loc; - else if (*locp != loc) - return 9; - return fpregs_used + nregs; - } - int tag = DWARF_TAG_OR_RETURN (typedie); switch (tag) { @@ -123,6 +125,7 @@ hfa_type (Dwarf_Die *typedie, Dwarf_Word size, &attr_mem), &encoding) != 0) return -1; +#define hfa(loc, nregs) compute_hfa(loc, nregs, locp, fpregs_used) switch (encoding) { case DW_ATE_float: diff --git a/backends/libebl_CPU.h b/backends/libebl_CPU.h index fa0d4f2..ef2b922 100644 --- a/backends/libebl_CPU.h +++ b/backends/libebl_CPU.h @@ -53,23 +53,6 @@ extern bool (*generic_debugscn_p) (const char *) attribute_hidden; if (_die == NULL) return -1; \ dwarf_tag (_die); }) -/* Follow typedefs and qualifiers to get to the actual type. */ -static inline int -dwarf_peel_type (Dwarf_Die *typediep, Dwarf_Attribute *attrp) -{ - int tag = DWARF_TAG_OR_RETURN (typediep); - while (tag == DW_TAG_typedef - || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type - || tag == DW_TAG_restrict_type) - { - attrp = dwarf_attr_integrate (typediep, DW_AT_type, attrp); - typediep = dwarf_formref_die (attrp, typediep); - tag = DWARF_TAG_OR_RETURN (typediep); - } - - return tag; -} - /* Get a type die corresponding to DIE. Peel CV qualifiers off it. */ static inline int @@ -84,7 +67,10 @@ dwarf_peeled_die_type (Dwarf_Die *die, Dwarf_Die *result) if (dwarf_formref_die (attr, result) == NULL) return -1; - return dwarf_peel_type (result, attr); + if (dwarf_peel_type (result, result) != 0) + return -1; + + return DWARF_TAG_OR_RETURN (result); } #endif /* libebl_CPU.h */ diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c index e3c0109..ff2b226 100644 --- a/backends/linux-core-note.c +++ b/backends/linux-core-note.c @@ -1,5 +1,6 @@ /* Common core note type descriptions for Linux. Copyright (C) 2007-2010 Red Hat, Inc. + Copyright (C) H.J. Lu , 2015. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -42,9 +43,22 @@ #define INT int32_t #define ALIGN_INT 4 #define TYPE_INT ELF_T_SWORD +#ifndef PR_REG +# define PR_REG ULONG +#endif #ifndef ALIGN_PR_REG # define ALIGN_PR_REG ALIGN_ULONG #endif +#ifndef PRPSINFO_UID_T +# define PRPSINFO_UID_T UID_T +# define ALIGN_PRPSINFO_UID_T ALIGN_UID_T +# define TYPE_PRPSINFO_UID_T TYPE_UID_T +#endif +#ifndef PRPSINFO_GID_T +# define PRPSINFO_GID_T GID_T +# define ALIGN_PRPSINFO_GID_T ALIGN_GID_T +# define TYPE_PRPSINFO_GID_T TYPE_GID_T +#endif #define FIELD(type, name) type name __attribute__ ((aligned (ALIGN_##type))) @@ -86,7 +100,7 @@ struct EBLHOOK(prstatus) struct EBLHOOK(timeval) pr_cstime; struct { - FIELD (ULONG, pr_reg[PRSTATUS_REGS_SIZE / sizeof (ULONG)]); + FIELD (PR_REG, pr_reg[PRSTATUS_REGS_SIZE / sizeof (PR_REG)]); } #ifdef ALIGN_PR_REG __attribute__ ((aligned (ALIGN_PR_REG))) @@ -105,8 +119,8 @@ struct EBLHOOK(prpsinfo) FIELD (CHAR, pr_zomb); FIELD (CHAR, pr_nice); FIELD (ULONG, pr_flag); - FIELD (UID_T, pr_uid); - FIELD (GID_T, pr_gid); + FIELD (PRPSINFO_UID_T, pr_uid); + FIELD (PRPSINFO_GID_T, pr_gid); FIELD (PID_T, pr_pid); FIELD (PID_T, pr_ppid); FIELD (PID_T, pr_pgrp); @@ -170,8 +184,8 @@ static const Ebl_Core_Item prpsinfo_items[] = FIELD (state, CHAR, zomb, 'd'), FIELD (state, CHAR, nice, 'd'), FIELD (state, ULONG, flag, 'x'), - FIELD (identity, UID_T, uid, 'd'), - FIELD (identity, GID_T, gid, 'd'), + FIELD (identity, PRPSINFO_UID_T, uid, 'd'), + FIELD (identity, PRPSINFO_GID_T, gid, 'd'), FIELD (identity, PID_T, pid, 'd'), FIELD (identity, PID_T, ppid, 'd'), FIELD (identity, PID_T, pgrp, 'd'), @@ -190,14 +204,10 @@ static const Ebl_Core_Item vmcoreinfo_items[] = #undef FIELD int -EBLHOOK(core_note) (nhdr, name, regs_offset, nregloc, reglocs, nitems, items) - const GElf_Nhdr *nhdr; - const char *name; - GElf_Word *regs_offset; - size_t *nregloc; - const Ebl_Register_Location **reglocs; - size_t *nitems; - const Ebl_Core_Item **items; +EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name, + GElf_Word *regs_offset, size_t *nregloc, + const Ebl_Register_Location **reglocs, + size_t *nitems, const Ebl_Core_Item **items) { switch (nhdr->n_namesz) { diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c index 7ea2b23..2ba8232 100644 --- a/backends/ppc64_init.c +++ b/backends/ppc64_init.c @@ -42,11 +42,10 @@ const char * -ppc64_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +ppc64_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) @@ -90,13 +89,16 @@ ppc64_init (elf, machine, eh, ehlen) if (opd_shdr != NULL && (opd_shdr->sh_flags & SHF_ALLOC) != 0 && opd_shdr->sh_type == SHT_PROGBITS - && opd_shdr->sh_size > 0 - && strcmp (elf_strptr (elf, ehdr->e_shstrndx, - opd_shdr->sh_name), ".opd") == 0) + && opd_shdr->sh_size > 0) { - eh->fd_addr = opd_shdr->sh_addr; - eh->fd_data = elf_getdata (scn, NULL); - break; + const char *name = elf_strptr (elf, ehdr->e_shstrndx, + opd_shdr->sh_name); + if (name != NULL && strcmp (name, ".opd") == 0) + { + eh->fd_addr = opd_shdr->sh_addr; + eh->fd_data = elf_getdata (scn, NULL); + break; + } } } } diff --git a/backends/ppc64_reloc.def b/backends/ppc64_reloc.def index 3a693cf..15a73ba 100644 --- a/backends/ppc64_reloc.def +++ b/backends/ppc64_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for ppc64. -*- C -*- - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -46,7 +46,7 @@ RELOC_TYPE (GOT16, REL) RELOC_TYPE (GOT16_LO, REL) RELOC_TYPE (GOT16_HI, REL) RELOC_TYPE (GOT16_HA, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/backends/ppc64_symbol.c b/backends/ppc64_symbol.c index 5a020d8..0feddce 100644 --- a/backends/ppc64_symbol.c +++ b/backends/ppc64_symbol.c @@ -108,8 +108,7 @@ ppc64_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, /* Check if backend uses a bss PLT in this file. */ bool -ppc64_bss_plt_p (Elf *elf __attribute__ ((unused)), - GElf_Ehdr *ehdr __attribute__ ((unused))) +ppc64_bss_plt_p (Elf *elf __attribute__ ((unused))) { return true; } diff --git a/backends/ppc_attrs.c b/backends/ppc_attrs.c index ebeafe5..612c576 100644 --- a/backends/ppc_attrs.c +++ b/backends/ppc_attrs.c @@ -37,13 +37,9 @@ #include "libebl_CPU.h" bool -ppc_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name) - Ebl *ebl __attribute__ ((unused)); - const char *vendor; - int tag; - uint64_t value; - const char **tag_name; - const char **value_name; +ppc_check_object_attribute (Ebl *ebl __attribute__ ((unused)), + const char *vendor, int tag, uint64_t value, + const char **tag_name, const char **value_name) { if (!strcmp (vendor, "gnu")) switch (tag) diff --git a/backends/ppc_init.c b/backends/ppc_init.c index ad92765..c3e3ca3 100644 --- a/backends/ppc_init.c +++ b/backends/ppc_init.c @@ -40,11 +40,10 @@ const char * -ppc_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +ppc_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/ppc_reloc.def b/backends/ppc_reloc.def index dc963a0..3723a9c 100644 --- a/backends/ppc_reloc.def +++ b/backends/ppc_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for ppc. -*- C -*- - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -47,7 +47,7 @@ RELOC_TYPE (GOT16_LO, REL) RELOC_TYPE (GOT16_HI, REL) RELOC_TYPE (GOT16_HA, REL) RELOC_TYPE (PLTREL24, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/backends/ppc_symbol.c b/backends/ppc_symbol.c index 220f243..37d4918 100644 --- a/backends/ppc_symbol.c +++ b/backends/ppc_symbol.c @@ -1,5 +1,5 @@ /* PPC specific symbolic name handling. - Copyright (C) 2004, 2005, 2007 Red Hat, Inc. + Copyright (C) 2004, 2005, 2007, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -81,9 +81,13 @@ ppc_dynamic_tag_check (int64_t tag) /* Look for DT_PPC_GOT. */ static bool -find_dyn_got (Elf *elf, GElf_Ehdr *ehdr, GElf_Addr *addr) +find_dyn_got (Elf *elf, GElf_Addr *addr) { - for (int i = 0; i < ehdr->e_phnum; ++i) + size_t phnum; + if (elf_getphdrnum (elf, &phnum) != 0) + return false; + + for (size_t i = 0; i < phnum; ++i) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); @@ -94,7 +98,8 @@ find_dyn_got (Elf *elf, GElf_Ehdr *ehdr, GElf_Addr *addr) GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); Elf_Data *data = elf_getdata (scn, NULL); - if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC && data != NULL) + if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC && data != NULL + && shdr->sh_entsize != 0) for (unsigned int j = 0; j < shdr->sh_size / shdr->sh_entsize; ++j) { GElf_Dyn dyn_mem; @@ -127,7 +132,7 @@ ppc_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, { /* In -msecure-plt mode, DT_PPC_GOT is present and must match. */ GElf_Addr gotaddr; - if (find_dyn_got (elf, ehdr, &gotaddr)) + if (find_dyn_got (elf, &gotaddr)) return sym->st_value == gotaddr; /* In -mbss-plt mode, any place in the section is valid. */ @@ -138,9 +143,14 @@ ppc_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, if (sname == NULL) return false; + /* Small data area. Normally points to .sdata, in which case we + check it is at an offset of 0x8000. It might however fall in the + .data section, in which case we cannot check the offset. The + size always should be zero. */ if (strcmp (name, "_SDA_BASE_") == 0) - return (strcmp (sname, ".sdata") == 0 - && sym->st_value == destshdr->sh_addr + 0x8000 + return (((strcmp (sname, ".sdata") == 0 + && sym->st_value == destshdr->sh_addr + 0x8000) + || strcmp (sname, ".data") == 0) && sym->st_size == 0); if (strcmp (name, "_SDA2_BASE_") == 0) @@ -154,8 +164,8 @@ ppc_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, /* Check if backend uses a bss PLT in this file. */ bool -ppc_bss_plt_p (Elf *elf, GElf_Ehdr *ehdr) +ppc_bss_plt_p (Elf *elf) { GElf_Addr addr; - return ! find_dyn_got (elf, ehdr, &addr); + return ! find_dyn_got (elf, &addr); } diff --git a/backends/s390_init.c b/backends/s390_init.c index 26b20b4..ba8df45 100644 --- a/backends/s390_init.c +++ b/backends/s390_init.c @@ -41,11 +41,10 @@ extern __typeof (s390_core_note) s390x_core_note; const char * -s390_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +s390_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/s390_reloc.def b/backends/s390_reloc.def index b4686a3..cdef9eb 100644 --- a/backends/s390_reloc.def +++ b/backends/s390_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for s390. -*- C -*- - Copyright (C) 2005, 2006 Red Hat, Inc. + Copyright (C) 2005, 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,7 +37,7 @@ RELOC_TYPE (PC32, REL|EXEC|DYN) RELOC_TYPE (GOT12, REL) RELOC_TYPE (GOT32, REL) RELOC_TYPE (PLT32, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/backends/sh_init.c b/backends/sh_init.c index 90ddcb2..5526aca 100644 --- a/backends/sh_init.c +++ b/backends/sh_init.c @@ -40,11 +40,10 @@ const char * -sh_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +sh_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/sh_reloc.def b/backends/sh_reloc.def index 66a5a9d..aded361 100644 --- a/backends/sh_reloc.def +++ b/backends/sh_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for SH. -*- C -*- - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ RELOC_TYPE (TLS_DTPOFF32, DYN) RELOC_TYPE (TLS_TPOFF32, DYN) RELOC_TYPE (GOT32, REL) RELOC_TYPE (PLT32, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/backends/sparc_attrs.c b/backends/sparc_attrs.c new file mode 100644 index 0000000..e95b577 --- /dev/null +++ b/backends/sparc_attrs.c @@ -0,0 +1,75 @@ +/* Object attribute tags for SPARC. + Copyright (C) 2015 Oracle, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#define BACKEND sparc_ +#include "libebl_CPU.h" + +bool +sparc_check_object_attribute (Ebl *ebl __attribute__ ((unused)), + const char *vendor, int tag, uint64_t value, + const char **tag_name, const char **value_name) +{ + if (!strcmp (vendor, "gnu")) + switch (tag) + { + case 4: + *tag_name = "GNU_Sparc_HWCAPS"; + static const char *hwcaps[30] = + { + "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2", + "asi_blk_init", "fmaf", NULL, "vis3", "hpc", "random", "trans", "fjfmau", + "ima", "asi_cache_sparing", "aes", "des", "kasumi", "camellia", + "md5", "sha1", "sha256", "sha512", "mpmul", "mont", "pause", + "cbcond", "crc32c" + }; + if (value < 30 && hwcaps[value] != NULL) + *value_name = hwcaps[value]; + return true; + + case 8: + *tag_name = "GNU_Sparc_HWCAPS2"; + static const char *hwcaps2[11] = + { + "fjathplus", "vis3b", "adp", "sparc5", "mwait", "xmpmul", + "xmont", "nsec", "fjathhpc", "fjdes", "fjaes" + }; + if (value < 11) + *value_name = hwcaps2[value]; + return true; + } + + return false; +} + diff --git a/backends/sparc_cfi.c b/backends/sparc_cfi.c new file mode 100644 index 0000000..dcc17bd --- /dev/null +++ b/backends/sparc_cfi.c @@ -0,0 +1,83 @@ +/* SPARC defaults for DWARF CFI. + Copyright (C) 2015 Oracle Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#define BACKEND sparc_ +#include "libebl_CPU.h" + +int +sparc_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info) +{ + static const uint8_t abi_cfi[] = + { +#define SV(n) DW_CFA_same_value, ULEB128_7 (n) + /* %g0 .. %g7 */ + SV (0), SV (1), SV (2), SV (3), SV (4), SV (5), SV (6), SV (7), + /* %o0 .. %o7 */ + SV (8), SV (9), SV (10), SV (11), SV (12), SV (13), SV (14), SV (15), + /* %l0 .. %l7 */ + SV (16), SV (17), SV (18), SV (19), SV (20), SV (21), SV (22), SV (23), + /* %i0 .. %i7 */ + SV (24), SV (25), SV (26), SV (27), SV (28), SV (29), SV (30), SV (31), + /* %f0 .. %f32 */ + SV (32), SV (33), SV (34), SV (35), SV (36), SV (37), SV (38), SV (39), + SV (40), SV (41), SV (42), SV (43), SV (44), SV (45), SV (46), SV (47), + SV (48), SV (49), SV (50), SV (51), SV (52), SV (53), SV (54), SV (55), + SV (56), SV (57), SV (58), SV (59), SV (60), SV (61), SV (52), SV (63), + /* %f33 .. %63 + Note that there are DWARF columns for the odd registers, even + if they don't exist in hardware) */ + SV (64), SV (65), SV (66), SV (67), SV (68), SV (69), SV (70), SV (71), + SV (72), SV (73), SV (74), SV (75), SV (76), SV (77), SV (78), SV (79), + SV (80), SV (81), SV (82), SV (83), SV (84), SV (85), SV (86), SV (87), + SV (88), SV (89), SV (90), SV (91), SV (92), SV (93), SV (94), SV (95), + /* %fcc[0123] */ + SV (96), SV (97), SV (98), SV (99), + /* %icc/%xcc */ + SV (100), + /* Soft frame-pointer */ + SV (101), + /* %gsr */ + SV (102) +#undef SV + }; + + abi_info->initial_instructions = abi_cfi; + abi_info->initial_instructions_end = &abi_cfi[sizeof abi_cfi]; + abi_info->data_alignment_factor = 4; + + abi_info->return_address_register = 31; /* %i7 */ + + return 0; +} + diff --git a/backends/sparc_corenote.c b/backends/sparc_corenote.c index 7912539..c9b6ff3 100644 --- a/backends/sparc_corenote.c +++ b/backends/sparc_corenote.c @@ -1,5 +1,6 @@ -/* PowerPC specific core note handling. +/* SPARC specific core note handling. Copyright (C) 2007 Red Hat, Inc. + Copyright (C) 2015 Oracle, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -109,4 +110,11 @@ static const Ebl_Register_Location fpregset_regs[] = #define ALIGN_PID_T 4 #define TYPE_PID_T ELF_T_SWORD +#define PRSTATUS_REGSET_ITEMS \ + { \ + .name = "pc", .type = ELF_T_ADDR, .format = 'x', \ + .offset = offsetof (struct EBLHOOK(prstatus), pr_reg[33]), \ + .group = "register", .pc_register = true \ + } + #include "linux-core-note.c" diff --git a/backends/sparc_init.c b/backends/sparc_init.c index 7d22998..8e946fb 100644 --- a/backends/sparc_init.c +++ b/backends/sparc_init.c @@ -34,17 +34,21 @@ #define RELOC_PREFIX R_SPARC_ #include "libebl_CPU.h" +/* In SPARC some relocations use the most significative 24 bits of the + r_type field to encode a secondary addend. Make sure the routines + in common-reloc.c acknowledge this. */ +#define RELOC_TYPE_ID(type) ((type) & 0xff) + /* This defines the common reloc hooks based on sparc_reloc.def. */ #include "common-reloc.c" extern __typeof (EBLHOOK (core_note)) sparc64_core_note attribute_hidden; const char * -sparc_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +sparc_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) @@ -71,6 +75,15 @@ sparc_init (elf, machine, eh, ehlen) HOOK (eh, auxv_info); HOOK (eh, register_info); HOOK (eh, return_value_location); + HOOK (eh, check_object_attribute); + HOOK (eh, abi_cfi); + /* gcc/config/sparc.h define FIRST_PSEUDO_REGISTER */ + eh->frame_nregs = 103; + /* The CFI Dwarf register with the "return address" in sparc + actually contains the call address. The return address is + located 8 bytes after it. */ + eh->ra_offset = 8; + HOOK (eh, set_initial_registers_tid); return MODVERSION; } diff --git a/backends/sparc_initreg.c b/backends/sparc_initreg.c new file mode 100644 index 0000000..c2a9b32 --- /dev/null +++ b/backends/sparc_initreg.c @@ -0,0 +1,129 @@ +/* Fetch live process registers from TID. + Copyright (C) 2015 Oracle, In + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "system.h" +#include +#ifdef __sparc__ +# include +# include +#endif + +#define BACKEND sparc_ +#include "libebl_CPU.h" + +bool +EBLHOOK (set_initial_registers_tid) (pid_t tid __attribute__ ((unused)), + ebl_tid_registers_t *setfunc __attribute__ ((unused)), + void *arg __attribute__ ((unused))) +{ +#ifndef __sparc__ + return false; +#else /* __sparc__ */ + + + /* The pt_regs structure filled in by PTRACE_GETREGS provides the + PC, the global registers and the output registers. Note how the + %g0 register is not explicitly provided in the structure (it's + value is always 0) and the resulting weird packing in the u_regs + array: the last element is not used. */ + + struct pt_regs regs; + if (ptrace (PTRACE_GETREGS, tid, ®s, 0) == -1) + return false; + + /* PC: no DWARF number */ + if (!setfunc (-1, 1, (Dwarf_Word *) ®s.tpc, arg)) + return false; + + /* Global registers: DWARF 0 .. 7 */ + Dwarf_Word zero = 0; + if (!setfunc (0, 1, &zero, arg)) + return false; + if (!setfunc (1, 7, (Dwarf_Word *) ®s.u_regs[0], arg)) + return false; + + /* Output registers: DWARF 8 .. 15 */ + if (!setfunc (8, 8, (Dwarf_Word *) ®s.u_regs[7], arg)) + return false; + + /* Local and input registers must be read from the stack. They are + saved in the previous stack frame. The stack pointer is %o6, + read above. */ + + Dwarf_Word locals_outs[16]; + Dwarf_Word sp = regs.u_regs[13]; + + if (sp & 1) + { + /* Registers are 64 bits, and we need to apply the 2047 stack + bias in order to get the real stack pointer. */ + + sp += 2047; + + for (unsigned i = 0; i < 16; i++) + { + locals_outs[i] = ptrace (PTRACE_PEEKDATA, tid, + (void *) (uintptr_t) (sp + (i * 8)), + NULL); + if (errno != 0) + return false; + } + } + else + { + /* Registers are 32 bits. */ + + for (unsigned i = 0; i < 8; i++) + { + Dwarf_Word tuple = ptrace (PTRACE_PEEKDATA, tid, + (void *) (uintptr_t) (sp + (i * 8)), + NULL); + if (errno != 0) + return false; + + locals_outs[2*i] = (tuple >> 32) & 0xffffffff; + locals_outs[2*i+1] = tuple & 0xffffffff; + } + } + + + /* Local registers: DWARF 16 .. 23 */ + if (!setfunc (16, 8, &locals_outs[0], arg)) + return false; + + /* Input registers: DWARF 24 .. 31 */ + if (!setfunc (24, 8, &locals_outs[8], arg)) + return false; + + return true; +#endif +} diff --git a/backends/sparc_regs.c b/backends/sparc_regs.c index f9709bb..2bddcf4 100644 --- a/backends/sparc_regs.c +++ b/backends/sparc_regs.c @@ -1,5 +1,5 @@ /* Register names and numbers for SPARC DWARF. - Copyright (C) 2005, 2006 Red Hat, Inc. + Copyright (C) 2005, 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -42,8 +42,8 @@ sparc_register_info (Ebl *ebl, const char **prefix, const char **setname, int *bits, int *type) { - const int nfp = 32 + (ebl->machine == EM_SPARC ? 0 : 16); - const int nspec = ebl->machine == EM_SPARC ? 8 : 6; + const int nfp = 32 + (ebl->class == ELFCLASS32 ? 0 : 16); + const int nspec = ebl->class == ELFCLASS32 ? 8 : 6; if (name == NULL) return 32 + nfp + nspec; @@ -51,7 +51,7 @@ sparc_register_info (Ebl *ebl, if (regno < 0 || regno >= 32 + nfp + nspec || namelen < 6) return -1; - *bits = ebl->machine == EM_SPARC ? 32 : 64; + *bits = ebl->class == ELFCLASS32 ? 32 : 64; *type = DW_ATE_signed; *prefix = "%"; @@ -66,9 +66,9 @@ sparc_register_info (Ebl *ebl, }; *setname = "control"; *type = DW_ATE_unsigned; - if ((ebl->machine != EM_SPARC ? 0 : 4) + 1 - (unsigned int) regno <= 1) + if ((ebl->class == ELFCLASS64 ? 0 : 4) + 1 - (unsigned int) regno <= 1) *type = DW_ATE_address; - return stpncpy (name, names[ebl->machine != EM_SPARC][regno], + return stpncpy (name, names[ebl->class == ELFCLASS64][regno], namelen) + 1 - name; } diff --git a/backends/sparc_reloc.def b/backends/sparc_reloc.def index c39b0fa..ce0b555 100644 --- a/backends/sparc_reloc.def +++ b/backends/sparc_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for sparc. -*- C -*- - Copyright (C) 2009 Red Hat, Inc. + Copyright (C) 2009, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -47,7 +47,7 @@ RELOC_TYPE (GOT22, REL) RELOC_TYPE (PC10, REL) RELOC_TYPE (PC22, REL) RELOC_TYPE (WPLT30, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) @@ -116,6 +116,9 @@ RELOC_TYPE (GOTDATA_OP, DYN) RELOC_TYPE (H34, REL) RELOC_TYPE (SIZE32, REL) RELOC_TYPE (SIZE64, REL) +RELOC_TYPE (WDISP10, REL) +RELOC_TYPE (JMP_IREL, REL) +RELOC_TYPE (IRELATIVE, REL) RELOC_TYPE (GNU_VTINHERIT, REL) RELOC_TYPE (GNU_VTENTRY, REL) RELOC_TYPE (REV32, REL) diff --git a/backends/tilegx_init.c b/backends/tilegx_init.c index 858798b..162ed36 100644 --- a/backends/tilegx_init.c +++ b/backends/tilegx_init.c @@ -38,11 +38,10 @@ #include "common-reloc.c" const char * -tilegx_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +tilegx_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) diff --git a/backends/tilegx_reloc.def b/backends/tilegx_reloc.def index 9736286..1018110 100644 --- a/backends/tilegx_reloc.def +++ b/backends/tilegx_reloc.def @@ -1,5 +1,6 @@ /* List the relocation types for tilegx. -*- C -*- Copyright (C) 2012 Tilera Corporation + Copyright (C) 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -44,7 +45,7 @@ RELOC_TYPE (HW3, REL) RELOC_TYPE (HW0_LAST, REL) RELOC_TYPE (HW1_LAST, REL) RELOC_TYPE (HW2_LAST, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/backends/x32_corenote.c b/backends/x32_corenote.c new file mode 100644 index 0000000..bd6560d --- /dev/null +++ b/backends/x32_corenote.c @@ -0,0 +1,2 @@ +#define BITS 32 +#include "x86_64_corenote.c" diff --git a/backends/x86_64_corenote.c b/backends/x86_64_corenote.c index f9d8db4..1bacc60 100644 --- a/backends/x86_64_corenote.c +++ b/backends/x86_64_corenote.c @@ -1,5 +1,6 @@ /* x86-64 specific core note handling. Copyright (C) 2005, 2007, 2008 Red Hat, Inc. + Copyright (C) H.J. Lu , 2015. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -36,7 +37,13 @@ #include #include -#define BACKEND x86_64_ +#ifndef BITS +# define BITS 64 +# define BACKEND x86_64_ +#else +# define BITS 32 +# define BACKEND x32_ +#endif #include "libebl_CPU.h" @@ -77,15 +84,35 @@ static const Ebl_Register_Location prstatus_regs[] = }; #define PRSTATUS_REGS_SIZE (27 * 8) -#define ULONG uint64_t +#if BITS == 32 +# define ULONG uint32_t +# define ALIGN_ULONG 4 +# define TYPE_ULONG ELF_T_WORD +# define PRPSINFO_UID_T uint16_t +# define ALIGN_PRPSINFO_UID_T 2 +# define TYPE_PRPSINFO_UID_T ELF_T_HALF +# define PRPSINFO_GID_T uint16_t +# define ALIGN_PRPSINFO_GID_T 2 +# define TYPE_PRPSINFO_GID_T ELF_T_HALF +#else +# define ULONG uint64_t +# define ALIGN_ULONG 8 +# define TYPE_ULONG ELF_T_XWORD +# define PRPSINFO_UID_T uint32_t +# define ALIGN_PRPSINFO_UID_T 4 +# define TYPE_PRPSINFO_UID_T TYPE_UID_T +# define PRPSINFO_GID_T uint32_t +# define ALIGN_PRPSINFO_GID_T 4 +# define TYPE_PRPSINFO_GID_T TYPE_GID_T +#endif +#define PR_REG uint64_t +#define ALIGN_PR_REG 8 #define PID_T int32_t #define UID_T uint32_t #define GID_T uint32_t -#define ALIGN_ULONG 8 #define ALIGN_PID_T 4 #define ALIGN_UID_T 4 #define ALIGN_GID_T 4 -#define TYPE_ULONG ELF_T_XWORD #define TYPE_PID_T ELF_T_SWORD #define TYPE_UID_T ELF_T_SWORD #define TYPE_GID_T ELF_T_SWORD diff --git a/backends/x86_64_init.c b/backends/x86_64_init.c index b885558..cfd0158 100644 --- a/backends/x86_64_init.c +++ b/backends/x86_64_init.c @@ -1,5 +1,6 @@ /* Initialization of x86-64 specific backend library. Copyright (C) 2002-2009, 2013 Red Hat, Inc. + Copyright (C) H.J. Lu , 2015. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -38,12 +39,13 @@ /* This defines the common reloc hooks based on x86_64_reloc.def. */ #include "common-reloc.c" +extern __typeof (EBLHOOK (core_note)) x32_core_note attribute_hidden; + const char * -x86_64_init (elf, machine, eh, ehlen) - Elf *elf __attribute__ ((unused)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +x86_64_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) @@ -53,7 +55,10 @@ x86_64_init (elf, machine, eh, ehlen) eh->name = "AMD x86-64"; x86_64_init_reloc (eh); HOOK (eh, reloc_simple_type); - HOOK (eh, core_note); + if (eh->class == ELFCLASS32) + eh->core_note = x32_core_note; + else + HOOK (eh, core_note); HOOK (eh, return_value_location); HOOK (eh, register_info); HOOK (eh, syscall_abi); diff --git a/backends/x86_64_reloc.def b/backends/x86_64_reloc.def index 8ed98f6..ad84efa 100644 --- a/backends/x86_64_reloc.def +++ b/backends/x86_64_reloc.def @@ -1,5 +1,5 @@ /* List the relocation types for x86-64. -*- C -*- - Copyright (C) 2000, 2001, 2002, 2003, 2005, 2009 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2005, 2009, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -33,7 +33,7 @@ RELOC_TYPE (64, REL|EXEC|DYN) RELOC_TYPE (PC32, REL|EXEC|DYN) RELOC_TYPE (GOT32, REL) RELOC_TYPE (PLT32, REL) -RELOC_TYPE (COPY, EXEC) +RELOC_TYPE (COPY, EXEC|DYN) RELOC_TYPE (GLOB_DAT, EXEC|DYN) RELOC_TYPE (JUMP_SLOT, EXEC|DYN) RELOC_TYPE (RELATIVE, EXEC|DYN) diff --git a/config.h.in b/config.h.in index 8ceb0f9..a70a964 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Building with -fsanitize=undefined or not */ +#undef CHECK_UNDEFINED + /* Should ar and ranlib use -D behavior by default? */ #undef DEFAULT_AR_DETERMINISTIC diff --git a/config/10-default-yama-scope.conf b/config/10-default-yama-scope.conf new file mode 100644 index 0000000..ba78ebd --- /dev/null +++ b/config/10-default-yama-scope.conf @@ -0,0 +1,35 @@ +# When yama is enabled in the kernel it might be used to filter any user +# space access which requires PTRACE_MODE_ATTACH like ptrace attach, access +# to /proc/PID/{mem,personality,stack,syscall}, and the syscalls +# process_vm_readv and process_vm_writev which are used for interprocess +# services, communication and introspection (like synchronisation, signaling, +# debugging, tracing and profiling) of processes. +# +# Usage of ptrace attach is restricted by normal user permissions. Normal +# unprivileged processes cannot interact through ptrace with processes +# that they cannot send signals to or processes that are running set-uid +# or set-gid. +# +# yama ptrace scope can be used to reduce these permissions even more. +# This should normally not be done because it will break various programs +# relying on the default ptrace security restrictions. But can be used +# if you don't have any other way to separate processes in their own +# domains. A different way to restrict ptrace is to set the selinux +# deny_ptrace boolean. Both mechanisms will break some programs relying +# on the ptrace system call and might force users to elevate their +# priviliges to root to do their work. +# +# For more information see Documentation/security/Yama.txt in the kernel +# sources. Which also describes the defaults when CONFIG_SECURITY_YAMA +# is enabled in a kernel build (currently 1 for ptrace_scope). +# +# This runtime kernel parameter can be set to the following options: +# (Note that setting this to anything except zero will break programs!) +# +# 0 - Default attach security permissions. +# 1 - Restricted attach. Only child processes plus normal permissions. +# 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE. +# 3 - No attach. No process may call ptrace at all. Irrevocable. +# +kernel.yama.ptrace_scope = 0 + diff --git a/config/ChangeLog b/config/ChangeLog index 9ebf14f..8e20f1e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,97 @@ +2016-01-08 Mark Wielaard + + * elfutils.spec.in: Add elfcompress. Update for 0.165. + +2016-01-04 Mark Wielaard + + * libelf.pc.in: New file. + * libdw.pc.in: Likewise. + * Makefile.am (EXTRA_DIST): Add libelf.pc.in and libdw.pc.in. + (pkgconfigdir): New variable. + (pkgconfigdir_DATA): Likewise. + * elfutils.spec.in (files devel): Add libdw.pc. + (files libelf-devel): Add libelf.pc. + +2015-10-15 Mark Wielaard + + * elfutils.spec.in: Update for 0.164. + +2015-10-07 Mark Wielaard + + * eu.am (ARFLAGS): Set to "cr". + +2015-10-09 Josh Stone + + * eu.am (print-%): New target to print any variable. + +2015-10-05 Josh Stone + + * eu.am (%.os): Add AM_V_CC silencers. + +2015-09-24 Jose E. Marchesi + + * eu.am (%.os): Use -fPIC instead of -fpic to avoid relocation + overflows in some platforms. + +2015-09-22 Mark Wielaard + + * eu.am (AM_CFLAGS): Add -Wold-style-definition -Wstrict-prototypes. + +2015-08-04 Mark Wielaard + + * 10-default-yama-scope.conf: New file. + * Makefile.am (EXTRA_DIST): Add 10-default-yama-scope.conf. + * elfutils.spec.in (Requires): default-yama-scope. + (default-yama-scope): New package. + +2015-06-19 Mark Wielaard + + * elfutils.spec.in: Update for 0.163. + +2015-06-11 Mark Wielaard + + * elfutils.spec.in (devel): Include elfutils/known-dwarf.h and + elfutils/version.h. + +2015-06-10 Mark Wielaard + + * elfutils.spec.in: Update for 0.162. + +2015-05-23 Mark Wielaard + + * eu.am (STACK_USAGE_WARNING): New variable set based on + ADD_STACK_USAGE_WARNING conditional. + (AM_CFLAGS): Use STACK_USAGE_WARNING variable. + +2015-05-23 Mark Wielaard + + * eu.am (AM_CFLAGS): Add -Wstack-usage=262144. + +2015-04-23 Max Filippov + + * eu.am (DEFS.os): New variable. + +2015-03-18 Petr Machata + + * known-dwarf.awk (comment): Drop all uses of this variable. + (END): Always emit the non-_DESC variant. Emit + DWARF_ALL_KNOWN_DW_ instead of ALL_KNOWN_DW_*, and + DWARF_ONE_KNOWN_DW_ instead of ONE_KNOWN_DW_*. + +2015-02-20 Petr Machata + + * known-dwarf.awk (END): Drop useless variables lo, hi. Merge two + continue-checks in one. + +2014-12-18 Mark Wielaard + + * elfutils.spec.in: Update for 0.161. + +2014-11-27 Mark Wielaard + + * eu.am: Define textrel_msg, textrel_found and textrel_check based + on FATAL_TEXTREL. + 2014-08-25 Mark Wielaard * elfutils.spec.in: Update for 0.160. diff --git a/config/Makefile.am b/config/Makefile.am index 6e61b77..66012d0 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in -*-Makefile-*- ## Configure input file for elfutils. ## -## Copyright (C) 2004, 2005, 2008, 2009, 2011 Red Hat, Inc. +## Copyright (C) 2004, 2005, 2008, 2009, 2011, 2015, 2016 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -28,7 +28,11 @@ ## the GNU Lesser General Public License along with this program. If ## not, see . ## -EXTRA_DIST = elfutils.spec.in known-dwarf.awk +EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf + libelf.pc.in libdw.pc.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libelf.pc libdw.pc if MAINTAINER_MODE $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS diff --git a/config/Makefile.in b/config/Makefile.in index 186fe08..cb519fa 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,8 +13,19 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,8 +89,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = config -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ChangeLog \ - ar-lib config.guess config.sub depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ @@ -87,9 +96,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = libelf.pc libdw.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -110,7 +120,39 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +DATA = $(pkgconfig_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libdw.pc.in \ + $(srcdir)/libelf.pc.in ChangeLog ar-lib compile config.guess \ + config.sub depcomp install-sh missing ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -120,6 +162,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -139,6 +182,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -150,6 +196,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -193,6 +240,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -236,7 +284,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ -EXTRA_DIST = elfutils.spec.in known-dwarf.awk +EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libelf.pc libdw.pc all: all-am .SUFFIXES: @@ -252,7 +302,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits config/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -270,6 +319,31 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +libelf.pc: $(top_builddir)/config.status $(srcdir)/libelf.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +libdw.pc: $(top_builddir)/config.status $(srcdir)/libdw.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: @@ -309,8 +383,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(DATA) installdirs: + for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -361,7 +438,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-pkgconfigDATA install-dvi: install-dvi-am @@ -405,7 +482,7 @@ ps: ps-am ps-am: -uninstall-am: +uninstall-am: uninstall-pkgconfigDATA .MAKE: install-am install-strip @@ -415,11 +492,15 @@ uninstall-am: install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags-am uninstall uninstall-am + pdf-am ps ps-am tags-am uninstall uninstall-am \ + uninstall-pkgconfigDATA + +.PRECIOUS: Makefile + libelf.pc.in libdw.pc.in @MAINTAINER_MODE_TRUE@$(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS @MAINTAINER_MODE_TRUE@ @tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XXXXXX); \ diff --git a/config/ar-lib b/config/ar-lib index fe2301e..463b9ec 100755 --- a/config/ar-lib +++ b/config/ar-lib @@ -4,7 +4,7 @@ me=ar-lib scriptversion=2012-03-01.08; # UTC -# Copyright (C) 2010-2013 Free Software Foundation, Inc. +# Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify diff --git a/config/compile b/config/compile new file mode 100755 index 0000000..a85b723 --- /dev/null +++ b/config/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/config/config.guess b/config/config.guess index 1804e9f..dbfb978 100755 --- a/config/config.guess +++ b/config/config.guess @@ -1,10 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012, 2013 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2012-12-29' +timestamp='2015-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -26,12 +24,12 @@ timestamp='2012-12-29' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -52,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, -2012, 2013 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -136,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -562,8 +579,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -809,7 +827,7 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -857,21 +875,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -884,59 +902,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -955,54 +968,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1235,19 +1257,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1338,154 +1372,6 @@ EOF exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -70,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, -2012, 2013 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -256,19 +252,20 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc \ + | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ - | fido | fr30 | frv \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -286,23 +283,26 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -313,6 +313,7 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -327,7 +328,10 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -369,13 +373,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -384,6 +388,7 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -403,18 +408,22 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -432,6 +441,7 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -769,6 +779,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -796,7 +809,7 @@ case $basic_machine in os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -824,6 +837,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -832,7 +849,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1354,7 +1371,7 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1369,14 +1386,14 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1500,9 +1517,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1551,6 +1565,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff --git a/config/depcomp b/config/depcomp index 4ebd5b3..fc98710 100755 --- a/config/depcomp +++ b/config/depcomp @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index 912f237..693c262 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -10,6 +10,7 @@ Obsoletes: libelf libelf-devel Requires: elfutils-libelf = %{version}-%{release} Requires: glibc >= 2.7 Requires: libstdc++ +Requires: default-yama-scope # ExcludeArch: xxx @@ -30,13 +31,15 @@ BuildRequires: gcc-c++ %define _programprefix eu- %description -Elfutils is a collection of utilities, including ld (a linker), -nm (for listing symbols from object files), size (for listing the -section sizes of an object or archive file), strip (for discarding -symbols), readelf (to see the raw ELF file structures), and elflint -(to check for well-formed ELF files). Also included are numerous -helper libraries which implement DWARF, ELF, and machine-specific ELF -handling. + +Elfutils is a collection of utilities, including stack (to show +backtraces), nm (for listing symbols from object files), size +(for listing the section sizes of an object or archive file), +strip (for discarding symbols), readelf (to see the raw ELF file +structures), elflint (to check for well-formed ELF files) and +elfcompress (to compress or decompress ELF sections). +Also included are helper libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. %package devel Summary: Development libraries to handle compiled objects. @@ -97,6 +100,22 @@ Conflicts: libelf-devel The elfutils-libelf-static package contains the static archive for libelf. +%package default-yama-scope +Summary: Default yama attach scope sysctl setting +Group: Development/Tools +License: GPLv2+ or LGPLv3+ +Provides: default-yama-scope +BuildArch: noarch + +%description default-yama-scope +Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + %prep %setup -q @@ -121,6 +140,8 @@ chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/elfutils/lib*.so* rm -f .%{_libdir}/libasm.a } +install -Dm0644 config/10-default-yama-scope.conf ${RPM_BUILD_ROOT}%{_sysctldir}/10-default-yama-scope.conf + %check make check @@ -135,6 +156,9 @@ rm -rf ${RPM_BUILD_ROOT} %postun libelf -p /sbin/ldconfig +%post default-yama-scope +%sysctl_apply 10-default-yama-scope.conf + %files %defattr(-,root,root) %doc COPYING COPYING-GPLV2 COPYING-LGPLV3 README TODO CONTRIBUTING @@ -153,6 +177,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_bindir}/eu-unstrip %{_bindir}/eu-make-debug-archive #%{_bindir}/eu-ld +%{_bindir}/eu-elfcompress %{_libdir}/libasm-%{version}.so %{_libdir}/libdw-%{version}.so %{_libdir}/libasm.so.* @@ -165,14 +190,17 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/dwarf.h %dir %{_includedir}/elfutils %{_includedir}/elfutils/elf-knowledge.h +%{_includedir}/elfutils/known-dwarf.h #%{_includedir}/elfutils/libasm.h %{_includedir}/elfutils/libebl.h %{_includedir}/elfutils/libdw.h %{_includedir}/elfutils/libdwfl.h %{_includedir}/elfutils/libdwelf.h +%{_includedir}/elfutils/version.h %{_libdir}/libebl.a #%{_libdir}/libasm.so %{_libdir}/libdw.so +%{_libdir}/pkgconfig/libdw.pc %files devel-static %{_libdir}/libdw.a @@ -191,11 +219,67 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/nlist.h %{_includedir}/elfutils/version.h %{_libdir}/libelf.so +%{_libdir}/pkgconfig/libelf.pc %files libelf-devel-static %{_libdir}/libelf.a +%files default-yama-scope +%config(noreplace) %{_sysctldir}/10-default-yama-scope.conf + %changelog +* Fri Jan 8 2016 Mark Wielaard 0.165-1 +- elfcompress: New utility to compress or decompress ELF sections. +- readelf: Add -z,--decompress option. +- libelf: Add elf_compress, elf_compress_gnu, elf32_getchdr, + elf64_getchdr and gelf_getchdr. +- libdwelf: New function dwelf_scn_gnu_compressed_size. +- config: Add libelf and libdw pkg-config files. +- backends: sparc support for core and live backtraces. +- translations: Updated Polish translation. + +* Thu Oct 15 2015 Mark Wielaard 0.164-1 +- strip, unstrip: Handle ELF files with merged strtab/shstrtab + tables. Handle missing SHF_INFO_LINK section flags. +- libelf: Use int64_t for offsets in libelf.h instead of loff_t. +- libdw: dwarf.h Add preliminary DWARF5 DW_LANG_Haskell. +- libdwfl: dwfl_standard_find_debuginfo now searches any subdir of + the binary path under the debuginfo root when the separate + debug file couldn't be found by build-id. + dwfl_linux_proc_attach can now be called before any Dwfl_Modules + have been reported. +- backends: Better sparc and sparc64 support. +- translations: Updated Ukrainian translation. +- Provide default-yama-scope subpackage. + +* Fri Jun 19 2015 Mark Wielaard 0.163-1 +- Bug fixes only, no new features. + +* Wed Jun 10 2015 Mark Wielaard 0.162-1 +- libdw: Install new header elfutils/known-dwarf.h. + dwarf.h Add preliminary DWARF5 constants DW_TAG_atomic_type, + DW_LANG_Fortran03, DW_LANG_Fortran08. dwarf_peel_type now also + handles DW_TAG_atomic_type. +- addr2line: Input addresses are now always interpreted as + hexadecimal numbers, never as octal or decimal numbers. + New option -a, --addresses to print address before each entry. + New option -C, --demangle to show demangled symbols. + New option --pretty-print to print all information on one line. +- ar: CVE-2014-9447 Directory traversal vulnerability in ar + extraction. +- backends: x32 support. + +* Thu Dec 18 2014 Mark Wielaard 0.161-1 +- libdw: New function dwarf_peel_type. dwarf_aggregate_size now uses + dwarf_peel_type to also provide the sizes of qualified types. + dwarf_getmacros will now serve either of .debug_macro and + .debug_macinfo transparently. New interfaces dwarf_getmacros_off, + dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, and + dwarf_macro_param are available for more generalized inspection of + macros and their parameters. + dwarf.h: Add DW_AT_GNU_deleted, DW_AT_noreturn, DW_LANG_C11, + DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14. + * Mon Aug 25 2014 Mark Wielaard 0.160-1 - libdw: New functions dwarf_cu_getdwarf, dwarf_cu_die. dwarf.h remove non-existing DW_TAG_mutable_type. diff --git a/config/eu.am b/config/eu.am index c3b00e0..0095da5 100644 --- a/config/eu.am +++ b/config/eu.am @@ -31,25 +31,53 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr + +# Warn about stack usage of more than 256K = 262144 bytes. +if ADD_STACK_USAGE_WARNING +STACK_USAGE_WARNING=-Wstack-usage=262144 +else +STACK_USAGE_WARNING= +endif AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED +if SYMBOL_VERSIONING +DEFS.os += -DSYMBOL_VERSIONING +else +endif + %.os: %.c %.o if AMDEP - if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ + $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ rm -f "$(DEPDIR)/$*.Tpo"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi else - $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< + $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< endif CLEANFILES = *.gcno *.gcda -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +if FATAL_TEXTREL +textrel_found = $(textrel_msg); exit 1 +else +textrel_found = $(textrel_msg) +endif +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi + +print-%: + @echo $*=$($*) diff --git a/config/install-sh b/config/install-sh index 377bb86..0b0fdcb 100755 --- a/config/install-sh +++ b/config/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ do # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,74 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +370,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +449,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +467,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff --git a/config/known-dwarf.awk b/config/known-dwarf.awk old mode 100644 new mode 100755 index 52ec5b6..bc9b02d --- a/config/known-dwarf.awk +++ b/config/known-dwarf.awk @@ -1,6 +1,6 @@ #!/bin/gawk -f -## Copyright (C) 2012 Red Hat, Inc. +## Copyright (C) 2012, 2015 Red Hat, Inc. ## ## This file is part of elfutils. ## @@ -33,11 +33,6 @@ $1 ~ /DW([_A-Z]+)_([^ ]+)/ { DW[set] = DW[set] "," elt; else DW[set] = elt; - if ($NF == "*/" && $4 == "/*") { - c = $5; - for (i = 6; i < NF; ++i) c = c " " $i; - comment[set, elt] = c; - } } END { @@ -48,24 +43,13 @@ END { if (what && what != set) continue; split(DW[set], elts, ","); m = asort(elts); - lo = hi = ""; if (m == 0) continue; - print "\n#define ALL_KNOWN_DW_" set " \\"; + print "\n#define DWARF_ALL_KNOWN_DW_" set " \\"; for (j = 1; j <= m; ++j) { elt = elts[j]; - if (elt ~ /(lo|low)_user$/) { - lo = elt; - continue; - } - if (elt ~ /(hi|high)_user$/) { - hi = elt; + if (elt ~ /(low?|hi|high)_user$/) continue; - } - if (comment[set, elt]) - print " ONE_KNOWN_DW_" set "_DESC (" elt ", DW_" set "_" elt \ - ", \"" comment[set, elt] "\") \\"; - else - print " ONE_KNOWN_DW_" set " (" elt ", DW_" set "_" elt ") \\"; + print " DWARF_ONE_KNOWN_DW_" set " (" elt ", DW_" set "_" elt ") \\"; } print " /* End of DW_" set "_*. */"; } diff --git a/config/libdw.pc.in b/config/libdw.pc.in new file mode 100644 index 0000000..b7dc002 --- /dev/null +++ b/config/libdw.pc.in @@ -0,0 +1,22 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libdw +Description: elfutils library for DWARF data and ELF file or process inspection +Version: @VERSION@ +URL: https://fedorahosted.org/elfutils/ + +Libs: -L${libdir} -ldw +Cflags: -I${includedir} + +# We need the exact matching elfutils libelf version since internal data +# structures are used. +Requires: libelf = @VERSION@ + +# We support various compressed ELF images, but don't export any of the +# data structures or functions. zlib (gz) is always required, bzip2 (bz2) +# and lzma (xz) are optional. But bzip2 doesn't have a pkg-config file. +Requires.private: zlib @LIBLZMA@ +Libs.private: @BZ2_LIB@ diff --git a/config/libelf.pc.in b/config/libelf.pc.in new file mode 100644 index 0000000..1fc7e4c --- /dev/null +++ b/config/libelf.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libelf +Description: elfutils libelf library to read and write ELF files +Version: @VERSION@ +URL: https://fedorahosted.org/elfutils/ + +Libs: -L${libdir} -lelf +Cflags: -I${includedir} + +Requires.private: zlib diff --git a/config/missing b/config/missing index cdea514..f62bbae 100755 --- a/config/missing +++ b/config/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff --git a/config/test-driver b/config/test-driver index 32bf39e..8e575b0 100755 --- a/config/test-driver +++ b/config/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,13 +44,12 @@ print_usage () Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ while test $# -gt 0; do --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='' # Red. @@ -94,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/config/ylwrap b/config/ylwrap index 1c4d776..7c2d927 100755 --- a/config/ylwrap +++ b/config/ylwrap @@ -1,9 +1,9 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2012-12-21.17; # UTC +scriptversion=2013-01-12.17; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # Written by Tom Tromey . # @@ -40,7 +40,7 @@ get_dirname () # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. -guard() +guard () { printf '%s\n' "$1" \ | sed \ @@ -96,17 +96,17 @@ esac # The input. -input="$1" +input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` -case "$input" in +case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. - input="`pwd`/$input" + input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` @@ -132,8 +132,8 @@ sed_fix_filenames= # guard in its implementation file. sed_fix_header_guards= -while test "$#" -ne 0; do - if test "$1" = "--"; then +while test $# -ne 0; do + if test x"$1" = x"--"; then shift break fi @@ -153,16 +153,14 @@ while test "$#" -ne 0; do done # The program to run. -prog="$1" +prog=$1 shift # Make any relative path in $prog absolute. -case "$prog" in +case $prog in [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog="`pwd`/$prog" ;; + *[\\/]*) prog=`pwd`/$prog ;; esac -# FIXME: add hostname here for parallel makes that run commands on -# other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -188,7 +186,7 @@ if test $ret -eq 0; then # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; - *) target="../$to";; + *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless @@ -197,7 +195,7 @@ if test $ret -eq 0; then # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then - realtarget="$target" + realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi diff --git a/configure b/configure index 447015e..562ab04 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for elfutils 0.160. +# Generated by GNU Autoconf 2.69 for elfutils 0.165. # # Report bugs to . # @@ -11,7 +11,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# Copyright (C) 1996-2014 Red Hat, Inc. +# Copyright (C) 1996-2016 Red Hat, Inc. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -582,8 +582,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='elfutils' PACKAGE_TARNAME='elfutils' -PACKAGE_VERSION='0.160' -PACKAGE_STRING='elfutils 0.160' +PACKAGE_VERSION='0.165' +PACKAGE_STRING='elfutils 0.165' PACKAGE_BUGREPORT='https://bugzilla.redhat.com/' PACKAGE_URL='' @@ -628,12 +628,16 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +HAVE_BUNZIP2 +HAVE_BISON +HAVE_FLEX CC_BIARCH BIARCH_FALSE BIARCH_TRUE EGREP GREP CPP +MODVERSION eu_version XGETTEXT_EXTRA_OPTIONS MSGMERGE @@ -649,11 +653,20 @@ STANDALONE_FALSE STANDALONE_TRUE HAVE_LIBASM_FALSE HAVE_LIBASM_TRUE +argp_LDADD +ADD_STACK_USAGE_WARNING_FALSE +ADD_STACK_USAGE_WARNING_TRUE +SYMBOL_VERSIONING_FALSE +SYMBOL_VERSIONING_TRUE +FATAL_TEXTREL_FALSE +FATAL_TEXTREL_TRUE DEMANGLE_FALSE DEMANGLE_TRUE zip_LIBS +LIBLZMA LZMA_FALSE LZMA_TRUE +BZ2_LIB BZLIB_FALSE BZLIB_TRUE ZLIB_FALSE @@ -713,7 +726,6 @@ build_os build_vendor build_cpu build -MODVERSION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -795,12 +807,15 @@ enable_generic enable_debugpred enable_gprof enable_gcov +enable_sanitize_undefined enable_valgrind enable_tests_rpath enable_libebl_subdir with_zlib with_bzlib with_lzma +enable_textrelcheck +enable_symbol_versioning enable_nls with_biarch ' @@ -1355,7 +1370,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures elfutils 0.160 to adapt to many kinds of systems. +\`configure' configures elfutils 0.165 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1425,7 +1440,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of elfutils 0.160:";; + short | recursive ) echo "Configuration of elfutils 0.165:";; esac cat <<\_ACEOF @@ -1451,10 +1466,15 @@ Optional Features: prediction --enable-gprof build binaries with gprof support --enable-gcov build binaries with gcov support + --enable-sanitize-undefined + Use gcc undefined behaviour sanitizer --enable-valgrind run all tests under valgrind --enable-tests-rpath build $ORIGIN-using rpath into tests --enable-libebl-subdir=DIR install libebl_CPU modules in $(libdir)/DIR + --disable-textrelcheck Disable textrelcheck being a fatal error + --disable-symbol-versioning + Disable symbol versioning in shared objects --disable-nls do not use Native Language Support Optional Packages: @@ -1547,14 +1567,14 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -elfutils configure 0.160 +elfutils configure 0.165 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (C) 1996-2014 Red Hat, Inc. +Copyright (C) 1996-2016 Red Hat, Inc. _ACEOF exit fi @@ -1997,7 +2017,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by elfutils $as_me 0.160, which was +It was created by elfutils $as_me 0.165, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2380,7 +2400,7 @@ ac_config_files="$ac_config_files config/Makefile" -am__api_version='1.13' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2552,8 +2572,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2572,7 +2592,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2866,7 +2886,7 @@ fi # Define the identity of the package. PACKAGE='elfutils' - VERSION='0.160' + VERSION='0.165' cat >>confdefs.h <<_ACEOF @@ -2900,8 +2920,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -2917,6 +2937,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @@ -2941,12 +3003,44 @@ fi -MODVERSION="Build on $(hostname) $(date +%FT%R:%S%z)" - -cat >>confdefs.h <<_ACEOF -#define MODVERSION "$MODVERSION" -_ACEOF +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' @@ -3867,6 +3961,65 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4465,7 +4618,13 @@ $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else - am_cv_ar_interface=ar + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; @@ -4496,6 +4655,11 @@ if ac_fn_c_try_compile "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 @@ -4703,8 +4867,17 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc with C99 support" >&5 -$as_echo_n "checking for gcc with C99 support... " >&6; } +# We use -std=gnu99 but have explicit checks for some language constructs +# and GNU extensions since some compilers claim GNU99 support, but don't +# really support all language extensions. In particular we need +# Mixed Declarations and Code +# https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html +# Nested Functions +# https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html +# Arrays of Variable Length +# https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc with GNU99 support" >&5 +$as_echo_n "checking for gcc with GNU99 support... " >&6; } if ${ac_cv_c99+:} false; then : $as_echo_n "(cached) " >&6 else @@ -4712,7 +4885,21 @@ else CFLAGS="$CFLAGS -std=gnu99" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; } +int foo (int a) +{ + for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s; +} + +double bar (double a, double b) +{ + double square (double z) { return z * z; } + return square (a) + square (b); +} + +void baz (int n) +{ + struct S { int x[n]; }; +} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c99=yes @@ -4725,7 +4912,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c99" >&5 $as_echo "$ac_cv_c99" >&6; } if test "x$ac_cv_c99" != xyes; then : - as_fn_error $? "gcc with C99 support required" "$LINENO" 5 + as_fn_error $? "gcc with GNU99 support required" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5 @@ -4737,10 +4924,11 @@ else # Some old compiler/linker/libc combinations fail some ways and not others. save_CFLAGS="$CFLAGS" save_LDFLAGS="$LDFLAGS" -CFLAGS="-fpic $CFLAGS" +CFLAGS="-fPIC $CFLAGS" LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #undef __thread static __thread int a; int foo (int b) { return a + b; } int @@ -5016,10 +5204,10 @@ else fi case $use_debugpred in - yes) use_debugpred=1 ;; - *) use_debugpred=0 ;; + yes) use_debugpred_val=1 ;; + *) use_debugpred_val=0 ;; esac -DEBUGPRED=$use_debugpred +DEBUGPRED=$use_debugpred_val # Check whether --enable-gprof was given. @@ -5063,6 +5251,47 @@ else fi +# Check whether --enable-sanitize-undefined was given. +if test "${enable_sanitize_undefined+set}" = set; then : + enableval=$enable_sanitize_undefined; use_undefined=$enableval +else + use_undefined=no +fi + +if test "$use_undefined" = yes; then + old_CFLAGS="$CFLAGS" + old_CXXFLAGS="$CXXFLAGS" + # We explicitly use unaligned access when possible (see ALLOW_UNALIGNED) + # We want to fail immediately on first error, don't try to recover. + CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover" + CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main (int argc, char **argv) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + use_undefined=yes +else + use_undefined=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "x$use_undefined" != xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc undefined behaviour sanitizer not available" >&5 +$as_echo "$as_me: WARNING: gcc undefined behaviour sanitizer not available" >&2;} + CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS" +fi +fi +case $use_undefined in + yes) check_undefined_val=1 ;; + *) check_undefined_val=0 ;; +esac + +cat >>confdefs.h <<_ACEOF +#define CHECK_UNDEFINED $check_undefined_val +_ACEOF + + # Check whether --enable-valgrind was given. if test "${enable_valgrind+set}" = set; then : enableval=$enable_valgrind; use_valgrind=$enableval @@ -5242,8 +5471,17 @@ fi if test $with_zlib = yes; then $as_echo "#define USE_ZLIB 1" >>confdefs.h +else + with_zlib=no fi +if test "x$with_zlib" = xno; then : + as_fn_error $? "\"zlib not found\"" "$LINENO" 5 +fi +LIBS="$save_LIBS" + +save_LIBS="$LIBS" +LIBS= # Check whether --with-bzlib was given. if test "${with_bzlib+set}" = set; then : @@ -5324,8 +5562,13 @@ fi if test $with_bzlib = yes; then $as_echo "#define USE_BZLIB 1" >>confdefs.h +else + with_bzlib=no fi +# We need this since bzip2 doesn't have a pkgconfig file. +BZ2_LIB="$LIBS" + # Check whether --with-lzma was given. if test "${with_lzma+set}" = set; then : @@ -5406,6 +5649,14 @@ fi if test $with_lzma = yes; then $as_echo "#define USE_LZMA 1" >>confdefs.h +else + with_lzma=no +fi + +if test "x$with_lzma" = xyes; then : + LIBLZMA="liblzma" +else + LIBLZMA="" fi zip_LIBS="$LIBS" @@ -5454,7 +5705,7 @@ $as_echo "#define USE_DEMANGLE 1" >>confdefs.h fi - if test "$ac_cv_lib_stdcpp___cxa_demangle" = yes; then + if test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes"; then DEMANGLE_TRUE= DEMANGLE_FALSE='#' else @@ -5462,6 +5713,158 @@ else DEMANGLE_FALSE= fi +if test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes"; then : + enable_demangler=yes +else + enable_demangler=no +fi + +# Check whether --enable-textrelcheck was given. +if test "${enable_textrelcheck+set}" = set; then : + enableval=$enable_textrelcheck; +fi + + if test "x$enable_textrelcheck" != "xno"; then + FATAL_TEXTREL_TRUE= + FATAL_TEXTREL_FALSE='#' +else + FATAL_TEXTREL_TRUE='#' + FATAL_TEXTREL_FALSE= +fi + +if test "x$enable_textrelcheck" != "xno"; then : + enable_textrelcheck=yes +else + enable_textrelcheck=no +fi + +# Check whether --enable-symbol-versioning was given. +if test "${enable_symbol_versioning+set}" = set; then : + enableval=$enable_symbol_versioning; +fi + + if test "x$enable_symbol_versioning" != "xno"; then + SYMBOL_VERSIONING_TRUE= + SYMBOL_VERSIONING_FALSE='#' +else + SYMBOL_VERSIONING_TRUE='#' + SYMBOL_VERSIONING_FALSE= +fi + +if test "x$enable_symbol_versioning" = "xno"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling symbol versioning breaks ABI compatibility." >&5 +$as_echo "$as_me: WARNING: Disabling symbol versioning breaks ABI compatibility." >&2;} + enable_symbol_versioning=no +else + enable_symbol_versioning=yes +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc accepts -Wstack-usage" >&5 +$as_echo_n "checking whether gcc accepts -Wstack-usage... " >&6; } +if ${ac_cv_stack_usage+:} false; then : + $as_echo_n "(cached) " >&6 +else + old_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wstack-usage=262144" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_stack_usage=yes +else + ac_cv_stack_usage=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$old_CFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stack_usage" >&5 +$as_echo "$ac_cv_stack_usage" >&6; } + if test "x$ac_cv_stack_usage" != "xno"; then + ADD_STACK_USAGE_WARNING_TRUE= + ADD_STACK_USAGE_WARNING_FALSE='#' +else + ADD_STACK_USAGE_WARNING_TRUE='#' + ADD_STACK_USAGE_WARNING_FALSE= +fi + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int argc=1; char *argv={"test"}; argp_parse(0,argc,argv,0,0,0); return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libc_has_argp="true" +else + libc_has_argp="false" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +if test "$libc_has_argp" = "false" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"libc does not have argp\"" >&5 +$as_echo "$as_me: WARNING: \"libc does not have argp\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for argp_parse in -largp" >&5 +$as_echo_n "checking for argp_parse in -largp... " >&6; } +if ${ac_cv_lib_argp_argp_parse+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-largp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char argp_parse (); +int +main () +{ +return argp_parse (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_argp_argp_parse=yes +else + ac_cv_lib_argp_argp_parse=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_argp_argp_parse" >&5 +$as_echo "$ac_cv_lib_argp_argp_parse" >&6; } +if test "x$ac_cv_lib_argp_argp_parse" = xyes; then : + have_argp="true" +else + have_argp="false" +fi + + + if test "$have_argp" = "false"; then + as_fn_error $? "\"no libargp found\"" "$LINENO" 5 + else + argp_LDADD="-largp" + fi +else + argp_LDADD="" +fi + @@ -5512,6 +5915,9 @@ fi ac_config_files="$ac_config_files tests/Makefile" +ac_config_files="$ac_config_files config/libelf.pc config/libdw.pc" + + # Get the definitions necessary to create the Makefiles in the po # subdirectories. This is a small subset of the gettext rules. USE_NLS=yes @@ -5856,6 +6262,14 @@ esac # Round up to the next release API (x.y) version. eu_version=$(( (eu_version + 999) / 1000 )) +MODVERSION="Build for ${LIBEBL_SUBDIR} ${eu_version} ${ac_cv_build}" + +cat >>confdefs.h <<_ACEOF +#define MODVERSION "$MODVERSION" +_ACEOF + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6435,6 +6849,141 @@ fi CC_BIARCH="$CC $utrace_biarch" +# In maintainer mode we really need flex and bison. +# Otherwise we really need a release dir with maintainer files generated. +if test "x$enable_maintainer_mode" = xyes; then + # Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_FLEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_FLEX"; then + ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_FLEX="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" +fi +fi +HAVE_FLEX=$ac_cv_prog_HAVE_FLEX +if test -n "$HAVE_FLEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_FLEX" >&5 +$as_echo "$HAVE_FLEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$HAVE_FLEX" = "no"; then + as_fn_error $? "flex needed in maintainer mode" "$LINENO" 5 + fi + # Extract the first word of "bison", so it can be a program name with args. +set dummy bison; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_BISON+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_BISON"; then + ac_cv_prog_HAVE_BISON="$HAVE_BISON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_BISON="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" +fi +fi +HAVE_BISON=$ac_cv_prog_HAVE_BISON +if test -n "$HAVE_BISON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_BISON" >&5 +$as_echo "$HAVE_BISON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$HAVE_BISON" = "no"; then + as_fn_error $? "bison needed in maintainer mode" "$LINENO" 5 + fi +else + if test ! -f ${srcdir}/libdw/known-dwarf.h; then + as_fn_error $? "No libdw/known-dwarf.h. configure --enable-maintainer-mode" "$LINENO" 5 + fi +fi + +# The testfiles are all compressed, we need bunzip2 when running make check +# Extract the first word of "bunzip2", so it can be a program name with args. +set dummy bunzip2; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAVE_BUNZIP2+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_BUNZIP2"; then + ac_cv_prog_HAVE_BUNZIP2="$HAVE_BUNZIP2" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_BUNZIP2="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_BUNZIP2" && ac_cv_prog_HAVE_BUNZIP2="no" +fi +fi +HAVE_BUNZIP2=$ac_cv_prog_HAVE_BUNZIP2 +if test -n "$HAVE_BUNZIP2"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_BUNZIP2" >&5 +$as_echo "$HAVE_BUNZIP2" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$HAVE_BUNZIP2" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No bunzip2, needed to run make check" >&5 +$as_echo "$as_me: WARNING: No bunzip2, needed to run make check" >&2;} +fi + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -6620,6 +7169,18 @@ if test -z "${DEMANGLE_TRUE}" && test -z "${DEMANGLE_FALSE}"; then as_fn_error $? "conditional \"DEMANGLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${FATAL_TEXTREL_TRUE}" && test -z "${FATAL_TEXTREL_FALSE}"; then + as_fn_error $? "conditional \"FATAL_TEXTREL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SYMBOL_VERSIONING_TRUE}" && test -z "${SYMBOL_VERSIONING_FALSE}"; then + as_fn_error $? "conditional \"SYMBOL_VERSIONING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ADD_STACK_USAGE_WARNING_TRUE}" && test -z "${ADD_STACK_USAGE_WARNING_FALSE}"; then + as_fn_error $? "conditional \"ADD_STACK_USAGE_WARNING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_LIBASM_TRUE}" && test -z "${HAVE_LIBASM_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -7029,7 +7590,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by elfutils $as_me 0.160, which was +This file was extended by elfutils $as_me 0.165, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7095,7 +7656,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -elfutils config.status 0.160 +elfutils config.status 0.165 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -7249,6 +7810,8 @@ do "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "config/libelf.pc") CONFIG_FILES="$CONFIG_FILES config/libelf.pc" ;; + "config/libdw.pc") CONFIG_FILES="$CONFIG_FILES config/libdw.pc" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "version.h") CONFIG_FILES="$CONFIG_FILES version.h:config/version.h.in" ;; @@ -8091,3 +8654,78 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: +===================================================================== + elfutils: ${PACKAGE_VERSION} (eu_version: ${eu_version}) +===================================================================== + + Prefix : ${prefix} + Program prefix (\"eu-\" recommended) : ${program_prefix} + Source code location : ${srcdir} + Maintainer mode : ${enable_maintainer_mode} + libebl modules subdirectory : ${LIBEBL_SUBDIR} + build arch : ${ac_cv_build} + + RECOMMENDED FEATURES (should all be yes) + gzip support : ${with_zlib} + bzip2 support : ${with_bzlib} + lzma/xz support : ${with_lzma} + libstdc++ demangle support : ${enable_demangler} + File textrel check : ${enable_textrelcheck} + Symbol versioning : ${enable_symbol_versioning} + + NOT RECOMMENDED FEATURES (should all be no) + Experimental thread safety : ${use_locks} + + OTHER FEATURES + Deterministic archives by default : ${default_ar_deterministic} + Native language support : ${USE_NLS} + + EXTRA TEST FEATURES (used with make check) + have bunzip2 installed (required) : ${HAVE_BUNZIP2} + debug branch prediction : ${use_debugpred} + gprof support : ${use_gprof} + gcov support : ${use_gcov} + run all tests under valgrind : ${use_valgrind} + gcc undefined behaviour sanitizer : ${use_undefined} + use rpath in tests : ${tests_use_rpath} + test biarch : ${utrace_cv_cc_biarch} +" >&5 +$as_echo "$as_me: +===================================================================== + elfutils: ${PACKAGE_VERSION} (eu_version: ${eu_version}) +===================================================================== + + Prefix : ${prefix} + Program prefix (\"eu-\" recommended) : ${program_prefix} + Source code location : ${srcdir} + Maintainer mode : ${enable_maintainer_mode} + libebl modules subdirectory : ${LIBEBL_SUBDIR} + build arch : ${ac_cv_build} + + RECOMMENDED FEATURES (should all be yes) + gzip support : ${with_zlib} + bzip2 support : ${with_bzlib} + lzma/xz support : ${with_lzma} + libstdc++ demangle support : ${enable_demangler} + File textrel check : ${enable_textrelcheck} + Symbol versioning : ${enable_symbol_versioning} + + NOT RECOMMENDED FEATURES (should all be no) + Experimental thread safety : ${use_locks} + + OTHER FEATURES + Deterministic archives by default : ${default_ar_deterministic} + Native language support : ${USE_NLS} + + EXTRA TEST FEATURES (used with make check) + have bunzip2 installed (required) : ${HAVE_BUNZIP2} + debug branch prediction : ${use_debugpred} + gprof support : ${use_gprof} + gcov support : ${use_gcov} + run all tests under valgrind : ${use_valgrind} + gcc undefined behaviour sanitizer : ${use_undefined} + use rpath in tests : ${tests_use_rpath} + test biarch : ${utrace_cv_cc_biarch} +" >&6;} diff --git a/configure.ac b/configure.ac index 76a172d..67062ce 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Configure input file for elfutils. -*-autoconf-*- dnl -dnl Copyright (C) 1996-2014 Red Hat, Inc. +dnl Copyright (C) 1996-2016 Red Hat, Inc. dnl dnl This file is part of elfutils. dnl @@ -17,23 +17,19 @@ dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . -AC_INIT([elfutils],[0.160],[https://bugzilla.redhat.com/],[elfutils]) +AC_INIT([elfutils],[0.165],[https://bugzilla.redhat.com/],[elfutils]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES([config/Makefile]) -AC_COPYRIGHT([Copyright (C) 1996-2014 Red Hat, Inc.]) +AC_COPYRIGHT([Copyright (C) 1996-2016 Red Hat, Inc.]) AC_PREREQ(2.63) dnl Minimum Autoconf version required. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests]) AM_MAINTAINER_MODE -dnl Unique ID for this build. -MODVERSION="Build on $(hostname) $(date +%FT%R:%S%z)" -AC_SUBST([MODVERSION]) -AC_DEFINE_UNQUOTED(MODVERSION, "$MODVERSION") -AH_TEMPLATE([MODVERSION], [Identifier for modules in the build.]) +AM_SILENT_RULES([yes]) AC_CONFIG_SRCDIR([libelf/libelf.h]) AC_CONFIG_FILES([Makefile]) @@ -79,25 +75,49 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_CHECK_TOOL([READELF], [readelf]) AC_CHECK_TOOL([NM], [nm]) -AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl +# We use -std=gnu99 but have explicit checks for some language constructs +# and GNU extensions since some compilers claim GNU99 support, but don't +# really support all language extensions. In particular we need +# Mixed Declarations and Code +# https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html +# Nested Functions +# https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html +# Arrays of Variable Length +# https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html +AC_CACHE_CHECK([for gcc with GNU99 support], ac_cv_c99, [dnl old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -std=gnu99" AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl -int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }])], +int foo (int a) +{ + for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s; +} + +double bar (double a, double b) +{ + double square (double z) { return z * z; } + return square (a) + square (b); +} + +void baz (int n) +{ + struct S { int x[[n]]; }; +}])], ac_cv_c99=yes, ac_cv_c99=no) CFLAGS="$old_CFLAGS"]) AS_IF([test "x$ac_cv_c99" != xyes], - AC_MSG_ERROR([gcc with C99 support required])) + AC_MSG_ERROR([gcc with GNU99 support required])) AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl # Use the same flags that we use for our DSOs, so the test is representative. # Some old compiler/linker/libc combinations fail some ways and not others. save_CFLAGS="$CFLAGS" save_LDFLAGS="$LDFLAGS" -CFLAGS="-fpic $CFLAGS" +CFLAGS="-fPIC $CFLAGS" LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS" AC_LINK_IFELSE([dnl -AC_LANG_PROGRAM([[#undef __thread +AC_LANG_PROGRAM([[#include +#undef __thread static __thread int a; int foo (int b) { return a + b; }]], [[exit (foo (0));]])], ac_cv_tls=yes, ac_cv_tls=no) @@ -146,10 +166,10 @@ AC_ARG_ENABLE([debugpred], AS_HELP_STRING([--enable-debugpred],[build binaries with support to debug branch prediction]), [use_debugpred=$enableval], [use_debugpred=no]) case $use_debugpred in - yes) use_debugpred=1 ;; - *) use_debugpred=0 ;; + yes) use_debugpred_val=1 ;; + *) use_debugpred_val=0 ;; esac -AC_SUBST([DEBUGPRED], $use_debugpred) +AC_SUBST([DEBUGPRED], $use_debugpred_val) dnl Enable gprof suport. AC_ARG_ENABLE([gprof], @@ -169,6 +189,29 @@ if test "$use_gcov" = yes; then fi AM_CONDITIONAL(GCOV, test "$use_gcov" = yes) +AC_ARG_ENABLE([sanitize-undefined], + AS_HELP_STRING([--enable-sanitize-undefined], + [Use gcc undefined behaviour sanitizer]), + [use_undefined=$enableval], [use_undefined=no]) +if test "$use_undefined" = yes; then + old_CFLAGS="$CFLAGS" + old_CXXFLAGS="$CXXFLAGS" + # We explicitly use unaligned access when possible (see ALLOW_UNALIGNED) + # We want to fail immediately on first error, don't try to recover. + CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover" + CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover" + AC_LINK_IFELSE([AC_LANG_SOURCE([int main (int argc, char **argv) { return 0; }])], use_undefined=yes, use_undefined=no) + AS_IF([test "x$use_undefined" != xyes], + AC_MSG_WARN([gcc undefined behaviour sanitizer not available]) + CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS") +fi +case $use_undefined in + yes) check_undefined_val=1 ;; + *) check_undefined_val=0 ;; +esac +AC_DEFINE_UNQUOTED(CHECK_UNDEFINED, $check_undefined_val, + [Building with -fsanitize=undefined or not]) + AC_ARG_ENABLE([valgrind], AS_HELP_STRING([--enable-valgrind],[run all tests under valgrind]), [use_valgrind=$enableval], [use_valgrind=no]) @@ -197,20 +240,81 @@ AC_SUBST([LIBEBL_SUBDIR]) AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR") AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.]) -dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am -dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. +dnl zlib is mandatory. save_LIBS="$LIBS" LIBS= eu_ZIPLIB(zlib,ZLIB,z,gzdirect,gzip) +AS_IF([test "x$with_zlib" = xno], [AC_MSG_ERROR("zlib not found")]) +LIBS="$save_LIBS" + +dnl Test for bzlib and xz/lzma, gives BZLIB/LZMALIB .am +dnl conditional and config.h USE_BZLIB/USE_LZMALIB #define. +save_LIBS="$LIBS" +LIBS= eu_ZIPLIB(bzlib,BZLIB,bz2,BZ2_bzdopen,bzip2) +# We need this since bzip2 doesn't have a pkgconfig file. +BZ2_LIB="$LIBS" +AC_SUBST([BZ2_LIB]) eu_ZIPLIB(lzma,LZMA,lzma,lzma_auto_decoder,[LZMA (xz)]) +AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""]) +AC_SUBST([LIBLZMA]) zip_LIBS="$LIBS" LIBS="$save_LIBS" AC_SUBST([zip_LIBS]) AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) -AM_CONDITIONAL(DEMANGLE, test "$ac_cv_lib_stdcpp___cxa_demangle" = yes) +AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes") +AS_IF([test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes"], + [enable_demangler=yes],[enable_demangler=no]) + +AC_ARG_ENABLE([textrelcheck], +AS_HELP_STRING([--disable-textrelcheck], + [Disable textrelcheck being a fatal error])) +AM_CONDITIONAL(FATAL_TEXTREL, [test "x$enable_textrelcheck" != "xno"]) +AS_IF([test "x$enable_textrelcheck" != "xno"], + [enable_textrelcheck=yes],[enable_textrelcheck=no]) + +AC_ARG_ENABLE([symbol-versioning], +AS_HELP_STRING([--disable-symbol-versioning], + [Disable symbol versioning in shared objects])) +AM_CONDITIONAL(SYMBOL_VERSIONING, [test "x$enable_symbol_versioning" != "xno"]) +AS_IF([test "x$enable_symbol_versioning" = "xno"], + [AC_MSG_WARN([Disabling symbol versioning breaks ABI compatibility.]) + enable_symbol_versioning=no],[enable_symbol_versioning=yes]) + +AC_CACHE_CHECK([whether gcc accepts -Wstack-usage], ac_cv_stack_usage, [dnl +old_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wstack-usage=262144" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], + ac_cv_stack_usage=yes, ac_cv_stack_usage=no) +CFLAGS="$old_CFLAGS"]) +AM_CONDITIONAL(ADD_STACK_USAGE_WARNING, [test "x$ac_cv_stack_usage" != "xno"]) + +dnl Check if we have argp available from our libc +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include ], + [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;] + )], + [libc_has_argp="true"], + [libc_has_argp="false"] +) + +dnl If our libc doesn't provide argp, then test for libargp +if test "$libc_has_argp" = "false" ; then + AC_MSG_WARN("libc does not have argp") + AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"]) + + if test "$have_argp" = "false"; then + AC_MSG_ERROR("no libargp found") + else + argp_LDADD="-largp" + fi +else + argp_LDADD="" +fi +AC_SUBST([argp_LDADD]) dnl The directories with content. @@ -253,6 +357,9 @@ dnl Test suite. AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see. AC_CONFIG_FILES([tests/Makefile]) +dnl pkgconfig files +AC_CONFIG_FILES([config/libelf.pc config/libdw.pc]) + # Get the definitions necessary to create the Makefiles in the po # subdirectories. This is a small subset of the gettext rules. AC_SUBST(USE_NLS, yes) @@ -299,6 +406,12 @@ esac # Round up to the next release API (x.y) version. eu_version=$(( (eu_version + 999) / 1000 )) +dnl Unique ID for this build. +MODVERSION="Build for ${LIBEBL_SUBDIR} ${eu_version} ${ac_cv_build}" +AC_SUBST([MODVERSION]) +AC_DEFINE_UNQUOTED(MODVERSION, "$MODVERSION") +AH_TEMPLATE([MODVERSION], [Identifier for modules in the build.]) + AC_CHECK_SIZEOF(long) # On aarch64 before glibc 2.20 we would get the kernel user_pt_regs instead @@ -321,4 +434,65 @@ utrace_BIARCH CC_BIARCH="$CC $utrace_biarch" AC_SUBST([CC_BIARCH]) +# In maintainer mode we really need flex and bison. +# Otherwise we really need a release dir with maintainer files generated. +if test "x$enable_maintainer_mode" = xyes; then + AC_CHECK_PROG(HAVE_FLEX, flex, yes, no) + if test "$HAVE_FLEX" = "no"; then + AC_MSG_ERROR([flex needed in maintainer mode]) + fi + AC_CHECK_PROG(HAVE_BISON, bison, yes, no) + if test "$HAVE_BISON" = "no"; then + AC_MSG_ERROR([bison needed in maintainer mode]) + fi +else + if test ! -f ${srcdir}/libdw/known-dwarf.h; then + AC_MSG_ERROR([No libdw/known-dwarf.h. configure --enable-maintainer-mode]) + fi +fi + +# The testfiles are all compressed, we need bunzip2 when running make check +AC_CHECK_PROG(HAVE_BUNZIP2, bunzip2, yes, no) +if test "$HAVE_BUNZIP2" = "no"; then + AC_MSG_WARN([No bunzip2, needed to run make check]) +fi + AC_OUTPUT + +AC_MSG_NOTICE([ +===================================================================== + elfutils: ${PACKAGE_VERSION} (eu_version: ${eu_version}) +===================================================================== + + Prefix : ${prefix} + Program prefix ("eu-" recommended) : ${program_prefix} + Source code location : ${srcdir} + Maintainer mode : ${enable_maintainer_mode} + libebl modules subdirectory : ${LIBEBL_SUBDIR} + build arch : ${ac_cv_build} + + RECOMMENDED FEATURES (should all be yes) + gzip support : ${with_zlib} + bzip2 support : ${with_bzlib} + lzma/xz support : ${with_lzma} + libstdc++ demangle support : ${enable_demangler} + File textrel check : ${enable_textrelcheck} + Symbol versioning : ${enable_symbol_versioning} + + NOT RECOMMENDED FEATURES (should all be no) + Experimental thread safety : ${use_locks} + + OTHER FEATURES + Deterministic archives by default : ${default_ar_deterministic} + Native language support : ${USE_NLS} + + EXTRA TEST FEATURES (used with make check) + have bunzip2 installed (required) : ${HAVE_BUNZIP2} + debug branch prediction : ${use_debugpred} + gprof support : ${use_gprof} + gcov support : ${use_gcov} + run all tests under valgrind : ${use_valgrind} + gcc undefined behaviour sanitizer : ${use_undefined} + use rpath in tests : ${tests_use_rpath} + test biarch : ${utrace_cv_cc_biarch} +]) diff --git a/elfutils.spec b/elfutils.spec index 79d7830..39e3924 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ # -*- rpm-spec-*- Summary: A collection of utilities and DSOs to handle compiled objects Name: elfutils -Version: 0.160 +Version: 0.165 Release: 1 License: GPLv3+ and (GPLv2+ or LGPLv3+) Group: Development/Tools @@ -10,6 +10,7 @@ Obsoletes: libelf libelf-devel Requires: elfutils-libelf = %{version}-%{release} Requires: glibc >= 2.7 Requires: libstdc++ +Requires: default-yama-scope # ExcludeArch: xxx @@ -30,13 +31,15 @@ BuildRequires: gcc-c++ %define _programprefix eu- %description -Elfutils is a collection of utilities, including ld (a linker), -nm (for listing symbols from object files), size (for listing the -section sizes of an object or archive file), strip (for discarding -symbols), readelf (to see the raw ELF file structures), and elflint -(to check for well-formed ELF files). Also included are numerous -helper libraries which implement DWARF, ELF, and machine-specific ELF -handling. + +Elfutils is a collection of utilities, including stack (to show +backtraces), nm (for listing symbols from object files), size +(for listing the section sizes of an object or archive file), +strip (for discarding symbols), readelf (to see the raw ELF file +structures), elflint (to check for well-formed ELF files) and +elfcompress (to compress or decompress ELF sections). +Also included are helper libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. %package devel Summary: Development libraries to handle compiled objects. @@ -97,6 +100,22 @@ Conflicts: libelf-devel The elfutils-libelf-static package contains the static archive for libelf. +%package default-yama-scope +Summary: Default yama attach scope sysctl setting +Group: Development/Tools +License: GPLv2+ or LGPLv3+ +Provides: default-yama-scope +BuildArch: noarch + +%description default-yama-scope +Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + %prep %setup -q @@ -121,6 +140,8 @@ chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/elfutils/lib*.so* rm -f .%{_libdir}/libasm.a } +install -Dm0644 config/10-default-yama-scope.conf ${RPM_BUILD_ROOT}%{_sysctldir}/10-default-yama-scope.conf + %check make check @@ -135,6 +156,9 @@ rm -rf ${RPM_BUILD_ROOT} %postun libelf -p /sbin/ldconfig +%post default-yama-scope +%sysctl_apply 10-default-yama-scope.conf + %files %defattr(-,root,root) %doc COPYING COPYING-GPLV2 COPYING-LGPLV3 README TODO CONTRIBUTING @@ -153,6 +177,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_bindir}/eu-unstrip %{_bindir}/eu-make-debug-archive #%{_bindir}/eu-ld +%{_bindir}/eu-elfcompress %{_libdir}/libasm-%{version}.so %{_libdir}/libdw-%{version}.so %{_libdir}/libasm.so.* @@ -165,14 +190,17 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/dwarf.h %dir %{_includedir}/elfutils %{_includedir}/elfutils/elf-knowledge.h +%{_includedir}/elfutils/known-dwarf.h #%{_includedir}/elfutils/libasm.h %{_includedir}/elfutils/libebl.h %{_includedir}/elfutils/libdw.h %{_includedir}/elfutils/libdwfl.h %{_includedir}/elfutils/libdwelf.h +%{_includedir}/elfutils/version.h %{_libdir}/libebl.a #%{_libdir}/libasm.so %{_libdir}/libdw.so +%{_libdir}/pkgconfig/libdw.pc %files devel-static %{_libdir}/libdw.a @@ -191,11 +219,67 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/nlist.h %{_includedir}/elfutils/version.h %{_libdir}/libelf.so +%{_libdir}/pkgconfig/libelf.pc %files libelf-devel-static %{_libdir}/libelf.a +%files default-yama-scope +%config(noreplace) %{_sysctldir}/10-default-yama-scope.conf + %changelog +* Fri Jan 8 2016 Mark Wielaard 0.165-1 +- elfcompress: New utility to compress or decompress ELF sections. +- readelf: Add -z,--decompress option. +- libelf: Add elf_compress, elf_compress_gnu, elf32_getchdr, + elf64_getchdr and gelf_getchdr. +- libdwelf: New function dwelf_scn_gnu_compressed_size. +- config: Add libelf and libdw pkg-config files. +- backends: sparc support for core and live backtraces. +- translations: Updated Polish translation. + +* Thu Oct 15 2015 Mark Wielaard 0.164-1 +- strip, unstrip: Handle ELF files with merged strtab/shstrtab + tables. Handle missing SHF_INFO_LINK section flags. +- libelf: Use int64_t for offsets in libelf.h instead of loff_t. +- libdw: dwarf.h Add preliminary DWARF5 DW_LANG_Haskell. +- libdwfl: dwfl_standard_find_debuginfo now searches any subdir of + the binary path under the debuginfo root when the separate + debug file couldn't be found by build-id. + dwfl_linux_proc_attach can now be called before any Dwfl_Modules + have been reported. +- backends: Better sparc and sparc64 support. +- translations: Updated Ukrainian translation. +- Provide default-yama-scope subpackage. + +* Fri Jun 19 2015 Mark Wielaard 0.163-1 +- Bug fixes only, no new features. + +* Wed Jun 10 2015 Mark Wielaard 0.162-1 +- libdw: Install new header elfutils/known-dwarf.h. + dwarf.h Add preliminary DWARF5 constants DW_TAG_atomic_type, + DW_LANG_Fortran03, DW_LANG_Fortran08. dwarf_peel_type now also + handles DW_TAG_atomic_type. +- addr2line: Input addresses are now always interpreted as + hexadecimal numbers, never as octal or decimal numbers. + New option -a, --addresses to print address before each entry. + New option -C, --demangle to show demangled symbols. + New option --pretty-print to print all information on one line. +- ar: CVE-2014-9447 Directory traversal vulnerability in ar + extraction. +- backends: x32 support. + +* Thu Dec 18 2014 Mark Wielaard 0.161-1 +- libdw: New function dwarf_peel_type. dwarf_aggregate_size now uses + dwarf_peel_type to also provide the sizes of qualified types. + dwarf_getmacros will now serve either of .debug_macro and + .debug_macinfo transparently. New interfaces dwarf_getmacros_off, + dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, and + dwarf_macro_param are available for more generalized inspection of + macros and their parameters. + dwarf.h: Add DW_AT_GNU_deleted, DW_AT_noreturn, DW_LANG_C11, + DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14. + * Mon Aug 25 2014 Mark Wielaard 0.160-1 - libdw: New functions dwarf_cu_getdwarf, dwarf_cu_die. dwarf.h remove non-existing DW_TAG_mutable_type. diff --git a/lib/ChangeLog b/lib/ChangeLog index 4415213..76b5753 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,25 @@ +2015-09-24 Jose E. Marchesi + + * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid relocation + overflows in some platforms. + +2015-09-22 Mark Wielaard + + * dynamicsizehash.c: Remove old-style function definitions. + * md5.c: Likewise. + * sha1.c: Likewise. + * xmalloc.c: Likewise. + * xstrdup.c: Likewise. + * xstrndup.c: Likewise. + +2015-05-31 Mark Wielaard + + * eu-config.h (ALLOW_UNALIGNED): Define when ! CHECK_UNDEFINED. + +2015-04-23 Max Filippov + + * eu-config.h: Use SYMBOL_VERSIONING as guard. + 2014-01-17 Lei Zhang * crc32_file.c: Include config.h. diff --git a/lib/Makefile.am b/lib/Makefile.am index 97f295e..2219eaa 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -28,7 +28,7 @@ ## not, see . ## include $(top_srcdir)/config/eu.am -AM_CFLAGS += -fpic +AM_CFLAGS += -fPIC AM_CPPFLAGS += -I$(srcdir)/../libelf noinst_LIBRARIES = libeu.a diff --git a/lib/Makefile.in b/lib/Makefile.in index 7e21563..5cd408e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,9 +89,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(noinst_HEADERS) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ @@ -90,12 +98,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -162,6 +171,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -171,6 +182,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -190,6 +202,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -201,6 +216,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -244,6 +260,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -289,12 +306,27 @@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(srcdir)/../libelf -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \ + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 +AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes $(if \ $($(*F)_no_Werror),,-Werror) $(if \ - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic + $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ + $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ + $($(*F)_CFLAGS) -fPIC COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi noinst_LIBRARIES = libeu.a libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \ crc32.c crc32_file.c md5.c sha1.c \ @@ -321,7 +353,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits lib/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -330,7 +361,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -370,14 +401,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -580,15 +611,20 @@ uninstall-am: mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/lib/dynamicsizehash.c b/lib/dynamicsizehash.c index 1fdff1b..f9406eb 100644 --- a/lib/dynamicsizehash.c +++ b/lib/dynamicsizehash.c @@ -44,10 +44,7 @@ static size_t -lookup (htab, hval, val) - NAME *htab; - HASHTYPE hval; - TYPE val __attribute__ ((unused)); +lookup (NAME *htab, HASHTYPE hval, TYPE val __attribute__ ((unused))) { /* First hash function: simply take the modul but prevent zero. Small values can skip the division, which helps performance when this is common. */ @@ -176,9 +173,7 @@ int #define INIT(name) _INIT (name) #define _INIT(name) \ name##_init -INIT(NAME) (htab, init_size) - NAME *htab; - size_t init_size; +INIT(NAME) (NAME *htab, size_t init_size) { /* We need the size to be a prime. */ init_size = next_prime (init_size); @@ -201,8 +196,7 @@ int #define FREE(name) _FREE (name) #define _FREE(name) \ name##_free -FREE(NAME) (htab) - NAME *htab; +FREE(NAME) (NAME *htab) { free (htab->table); return 0; @@ -213,10 +207,7 @@ int #define INSERT(name) _INSERT (name) #define _INSERT(name) \ name##_insert -INSERT(NAME) (htab, hval, data) - NAME *htab; - HASHTYPE hval; - TYPE data; +INSERT(NAME) (NAME *htab, HASHTYPE hval, TYPE data) { size_t idx; @@ -240,10 +231,7 @@ int #define INSERT(name) _INSERT (name) #define _INSERT(name) \ name##_overwrite -INSERT(NAME) (htab, hval, data) - NAME *htab; - HASHTYPE hval; - TYPE data; +INSERT(NAME) (NAME *htab, HASHTYPE hval, TYPE data) { size_t idx; @@ -263,10 +251,7 @@ TYPE #define FIND(name) _FIND (name) #define _FIND(name) \ name##_find -FIND(NAME) (htab, hval, val) - NAME *htab; - HASHTYPE hval; - TYPE val; +FIND(NAME) (NAME *htab, HASHTYPE hval, TYPE val) { size_t idx; @@ -287,9 +272,7 @@ FIND(NAME) (htab, hval, val) # define _ITERATEFCT(name) \ name##_iterate TYPE -ITERATEFCT(NAME) (htab, ptr) - NAME *htab; - void **ptr; +ITERATEFCT(NAME) (NAME *htab, void **ptr) { void *p = *ptr; diff --git a/lib/eu-config.h b/lib/eu-config.h index 3afff26..400cdc6 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -73,7 +73,8 @@ /* Define ALLOW_UNALIGNED if the architecture allows operations on unaligned memory locations. */ -#if defined __i386__ || defined __x86_64__ +#define SANITIZE_UNDEFINED 1 +#if (defined __i386__ || defined __x86_64__) && ! CHECK_UNDEFINED # define ALLOW_UNALIGNED 1 #else # define ALLOW_UNALIGNED 0 @@ -163,7 +164,7 @@ asm (".section predict_data, \"aw\"; .previous\n" #define ELFUTILS_HEADER(name) -#ifdef SHARED +#ifdef SYMBOL_VERSIONING # define OLD_VERSION(name, version) \ asm (".globl _compat." #version "." #name "\n" \ "_compat." #version "." #name " = " #name "\n" \ @@ -181,8 +182,8 @@ asm (".section predict_data, \"aw\"; .previous\n" # define OLD_VERSION(name, version) /* Nothing for static linking. */ # define NEW_VERSION(name, version) /* Nothing for static linking. */ # define COMPAT_VERSION_NEWPROTO(name, version, prefix) \ - error "should use #ifdef SHARED" -# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SHARED" + error "should use #ifdef SYMBOL_VERSIONING" +# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING" #endif diff --git a/lib/md5.c b/lib/md5.c index 1c27549..40f3044 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -1,6 +1,6 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-2011 Red Hat, Inc. + Copyright (C) 1995-2011, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1995. @@ -49,8 +49,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ void -md5_init_ctx (ctx) - struct md5_ctx *ctx; +md5_init_ctx (struct md5_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; @@ -67,9 +66,7 @@ md5_init_ctx (ctx) IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * -md5_read_ctx (ctx, resbuf) - const struct md5_ctx *ctx; - void *resbuf; +md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) { ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); @@ -95,9 +92,7 @@ le64_copy (char *dest, uint64_t x) IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * -md5_finish_ctx (ctx, resbuf) - struct md5_ctx *ctx; - void *resbuf; +md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ md5_uint32 bytes = ctx->buflen; @@ -129,9 +124,7 @@ md5_finish_ctx (ctx, resbuf) resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ int -md5_stream (stream, resblock) - FILE *stream; - void *resblock; +md5_stream (FILE *stream, void *resblock) { /* Important: BLOCKSIZE must be a multiple of 64. */ #define BLOCKSIZE 4096 @@ -189,10 +182,7 @@ md5_stream (stream, resblock) output yields to the wanted ASCII representation of the message digest. */ void * -md5_buffer (buffer, len, resblock) - const char *buffer; - size_t len; - void *resblock; +md5_buffer (const char *buffer, size_t len, void *resblock) { struct md5_ctx ctx; @@ -209,10 +199,7 @@ md5_buffer (buffer, len, resblock) void -md5_process_bytes (buffer, len, ctx) - const void *buffer; - size_t len; - struct md5_ctx *ctx; +md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ @@ -296,10 +283,7 @@ md5_process_bytes (buffer, len, ctx) It is assumed that LEN % 64 == 0. */ void -md5_process_block (buffer, len, ctx) - const void *buffer; - size_t len; - struct md5_ctx *ctx; +md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) { md5_uint32 correct_words[16]; const md5_uint32 *words = buffer; diff --git a/lib/sha1.c b/lib/sha1.c index 0e84562..6a9b61f 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,6 +1,6 @@ /* Functions to compute SHA1 message digest of files or memory blocks. according to the definition of SHA1 in FIPS 180-1 from April 1997. - Copyright (C) 2008-2011 Red Hat, Inc. + Copyright (C) 2008-2011, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2008. @@ -48,8 +48,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. */ void -sha1_init_ctx (ctx) - struct sha1_ctx *ctx; +sha1_init_ctx (struct sha1_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; @@ -67,9 +66,7 @@ sha1_init_ctx (ctx) IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * -sha1_read_ctx (ctx, resbuf) - const struct sha1_ctx *ctx; - void *resbuf; +sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf) { ((sha1_uint32 *) resbuf)[0] = SWAP (ctx->A); ((sha1_uint32 *) resbuf)[1] = SWAP (ctx->B); @@ -93,9 +90,7 @@ be64_copy (char *dest, uint64_t x) IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * -sha1_finish_ctx (ctx, resbuf) - struct sha1_ctx *ctx; - void *resbuf; +sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ sha1_uint32 bytes = ctx->buflen; @@ -123,10 +118,7 @@ sha1_finish_ctx (ctx, resbuf) void -sha1_process_bytes (buffer, len, ctx) - const void *buffer; - size_t len; - struct sha1_ctx *ctx; +sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ @@ -220,10 +212,7 @@ sha1_process_bytes (buffer, len, ctx) It is assumed that LEN % 64 == 0. */ void -sha1_process_block (buffer, len, ctx) - const void *buffer; - size_t len; - struct sha1_ctx *ctx; +sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) { sha1_uint32 computed_words[16]; #define W(i) computed_words[(i) % 16] diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 27ccab9..0cde384 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -1,5 +1,5 @@ /* Convenience functions for allocation. - Copyright (C) 2006 Red Hat, Inc. + Copyright (C) 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -44,8 +44,7 @@ /* Allocate N bytes of memory dynamically, with error checking. */ void * -xmalloc (n) - size_t n; +xmalloc (size_t n) { void *p; @@ -58,8 +57,7 @@ xmalloc (n) /* Allocate memory for N elements of S bytes, with error checking. */ void * -xcalloc (n, s) - size_t n, s; +xcalloc (size_t n, size_t s) { void *p; @@ -73,9 +71,7 @@ xcalloc (n, s) /* Change the size of an allocated block of memory P to N bytes, with error checking. */ void * -xrealloc (p, n) - void *p; - size_t n; +xrealloc (void *p, size_t n) { p = realloc (p, n); if (p == NULL) diff --git a/lib/xstrdup.c b/lib/xstrdup.c index d9d6010..aa10352 100644 --- a/lib/xstrdup.c +++ b/lib/xstrdup.c @@ -1,5 +1,5 @@ /* Convenience function for string allocation. - Copyright (C) 2006 Red Hat, Inc. + Copyright (C) 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -36,8 +36,7 @@ /* Return a newly allocated copy of STRING. */ char * -xstrdup (string) - const char *string; +xstrdup (const char *string) { return strcpy (xmalloc (strlen (string) + 1), string); } diff --git a/lib/xstrndup.c b/lib/xstrndup.c index 52304e6..92b79c1 100644 --- a/lib/xstrndup.c +++ b/lib/xstrndup.c @@ -1,5 +1,5 @@ /* Convenience function for string allocation. - Copyright (C) 2006 Red Hat, Inc. + Copyright (C) 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -36,9 +36,7 @@ /* Return a newly allocated copy of STRING. */ char * -xstrndup (string, n) - const char *string; - size_t n; +xstrndup (const char *string, size_t n) { char *res; size_t len = strnlen (string, n); diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 2613610..beb6211 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,33 @@ +2015-10-05 Josh Stone + + * Makefile.am (libasm.so): Add AM_V_CCLD and AM_V_at silencers. + +2015-09-23 Mark Wielaard + + * asm_align.c (__libasm_ensure_section_space): Mark as + internal_function. + * asm_end.c (__libasm_finictx): Likewise. + * asm_error.c (__libasm_seterrno): Likewise. + +2015-09-22 Mark Wielaard + + * asm_*.c: Remove old-style function definitions. + +2015-09-04 Chih-Hung Hsieh + + * asm_addint8.c (FCT): Replace K&R function definition + with ansi-C definitions. + * asm_adduint8.c (UFCT): Likewise. + * asm_begin.c (asm_begin): Likewise. + +2014-12-18 Ulrich Drepper + + * Makefile.am: Suppress output of textrel_check command. + +2014-11-27 Mark Wielaard + + * Makefile.am (libasm.so): Use textrel_check. + 2014-04-13 Mark Wielaard * Makefile.am: Remove !MUDFLAP conditions. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index 3d6a2e5..a4bf293 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -62,12 +62,12 @@ endif libasm_so_SOURCES = libasm.so$(EXEEXT): libasm_pic.a libasm.map - $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \ -Wl,--soname,$@.$(VERSION) \ ../libebl/libebl.a ../libelf/libelf.so $(libasm_so_LDLIBS) - if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libasm.so $(mkinstalldirs) $(DESTDIR)$(libdir) diff --git a/libasm/Makefile.in b/libasm/Makefile.in index 37dbd9c..b748b52 100644 --- a/libasm/Makefile.in +++ b/libasm/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,11 +90,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING noinst_PROGRAMS = $(am__EXEEXT_1) -@USE_LOCKS_TRUE@am__append_1 = -lpthread +@USE_LOCKS_TRUE@am__append_2 = -lpthread subdir = libasm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ @@ -93,6 +101,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -126,7 +136,6 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -213,6 +222,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -222,6 +233,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -241,6 +253,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -252,6 +267,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -295,6 +311,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -341,15 +358,29 @@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \ -I$(top_srcdir)/libdw + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda $(am_libasm_pic_a_OBJECTS) \ libasm.so.$(VERSION) -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) lib_LIBRARIES = libasm.a noinst_LIBRARIES = libasm_pic.a @@ -370,7 +401,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \ libasm_pic_a_SOURCES = am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os) -libasm_so_LDLIBS = $(am__append_1) +libasm_so_LDLIBS = $(am__append_2) libasm_so_SOURCES = noinst_HEADERS = libasmP.h symbolhash.h EXTRA_DIST = libasm.map @@ -390,7 +421,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libasm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libasm/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -399,7 +429,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -500,14 +530,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ @@ -735,22 +765,27 @@ uninstall-am: uninstall-libLIBRARIES uninstall-pkgincludeHEADERS ps ps-am tags tags-am uninstall uninstall-am \ uninstall-libLIBRARIES uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) libasm.so$(EXEEXT): libasm_pic.a libasm.map - $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \ -Wl,--soname,$@.$(VERSION) \ ../libebl/libebl.a ../libelf/libelf.so $(libasm_so_LDLIBS) - if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libasm.so $(mkinstalldirs) $(DESTDIR)$(libdir) diff --git a/libasm/asm_abort.c b/libasm/asm_abort.c index ef55ee9..12743dc 100644 --- a/libasm/asm_abort.c +++ b/libasm/asm_abort.c @@ -39,8 +39,7 @@ int -asm_abort (ctx) - AsmCtx_t *ctx; +asm_abort (AsmCtx_t *ctx) { if (ctx == NULL) /* Something went wrong earlier. */ diff --git a/libasm/asm_addint8.c b/libasm/asm_addint8.c index ec05b8d..bb7d40f 100644 --- a/libasm/asm_addint8.c +++ b/libasm/asm_addint8.c @@ -51,9 +51,7 @@ int -FCT(SIZE) (asmscn, num) - AsmScn_t *asmscn; - TYPE(SIZE) num; +FCT(SIZE) (AsmScn_t *asmscn, TYPE(SIZE) num) { if (asmscn == NULL) return -1; diff --git a/libasm/asm_addsleb128.c b/libasm/asm_addsleb128.c index 3692789..dc62c95 100644 --- a/libasm/asm_addsleb128.c +++ b/libasm/asm_addsleb128.c @@ -38,9 +38,7 @@ int -asm_addsleb128 (asmscn, num) - AsmScn_t *asmscn; - int32_t num; +asm_addsleb128 (AsmScn_t *asmscn, int32_t num) { if (asmscn == NULL) return -1; diff --git a/libasm/asm_addstrz.c b/libasm/asm_addstrz.c index 87663f3..26e06bb 100644 --- a/libasm/asm_addstrz.c +++ b/libasm/asm_addstrz.c @@ -40,10 +40,7 @@ /* Add zero terminated string STR of size LEN to (sub)section ASMSCN. */ int -asm_addstrz (asmscn, str, len) - AsmScn_t *asmscn; - const char *str; - size_t len; +asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len) { if (asmscn == NULL) return -1; diff --git a/libasm/asm_adduint8.c b/libasm/asm_adduint8.c index 30641b8..18b67dd 100644 --- a/libasm/asm_adduint8.c +++ b/libasm/asm_adduint8.c @@ -48,9 +48,7 @@ int -UFCT(SIZE) (asmscn, num) - AsmScn_t *asmscn; - UTYPE(SIZE) num; +UFCT(SIZE) (AsmScn_t *asmscn, UTYPE(SIZE) num) { return INTUSE(FCT(SIZE)) (asmscn, (TYPE(SIZE)) num); } diff --git a/libasm/asm_adduleb128.c b/libasm/asm_adduleb128.c index a3a8573..96438cc 100644 --- a/libasm/asm_adduleb128.c +++ b/libasm/asm_adduleb128.c @@ -38,9 +38,7 @@ int -asm_adduleb128 (asmscn, num) - AsmScn_t *asmscn; - uint32_t num; +asm_adduleb128 (AsmScn_t *asmscn, uint32_t num) { if (asmscn == NULL) return -1; diff --git a/libasm/asm_align.c b/libasm/asm_align.c index 2025b02..6631c4d 100644 --- a/libasm/asm_align.c +++ b/libasm/asm_align.c @@ -40,9 +40,7 @@ int -asm_align (asmscn, value) - AsmScn_t *asmscn; - GElf_Word value; +asm_align (AsmScn_t *asmscn, GElf_Word value) { if (asmscn == NULL) /* An earlier error. */ @@ -134,9 +132,8 @@ asm_align (asmscn, value) /* Ensure there are at least LEN bytes available in the output buffer for ASMSCN. */ int -__libasm_ensure_section_space (asmscn, len) - AsmScn_t *asmscn; - size_t len; +internal_function +__libasm_ensure_section_space (AsmScn_t *asmscn, size_t len) { /* The blocks with the section content are kept in a circular single-linked list. */ diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c index 48842d3..ff4d94c 100644 --- a/libasm/asm_begin.c +++ b/libasm/asm_begin.c @@ -127,10 +127,7 @@ prepare_binary_output (AsmCtx_t *result, Ebl *ebl) AsmCtx_t * -asm_begin (fname, ebl, textp) - const char *fname; - Ebl *ebl; - bool textp; +asm_begin (const char *fname, Ebl *ebl, bool textp) { if (fname == NULL && ! textp) return NULL; diff --git a/libasm/asm_end.c b/libasm/asm_end.c index f4145a7..d21a70a 100644 --- a/libasm/asm_end.c +++ b/libasm/asm_end.c @@ -498,8 +498,7 @@ binary_end (AsmCtx_t *ctx) int -asm_end (ctx) - AsmCtx_t *ctx; +asm_end (AsmCtx_t *ctx) { int result; @@ -555,8 +554,8 @@ free_section (AsmScn_t *scnp) void -__libasm_finictx (ctx) - AsmCtx_t *ctx; +internal_function +__libasm_finictx (AsmCtx_t *ctx) { /* Iterate through section table and free individual entries. */ AsmScn_t *scn = ctx->section_list; diff --git a/libasm/asm_error.c b/libasm/asm_error.c index 300a798..cc3e660 100644 --- a/libasm/asm_error.c +++ b/libasm/asm_error.c @@ -52,8 +52,8 @@ asm_errno (void) void -__libasm_seterrno (value) - int value; +internal_function +__libasm_seterrno (int value) { global_error = value; } @@ -75,8 +75,7 @@ static const char *msgs[ASM_E_NUM] = }; const char * -asm_errmsg (error) - int error; +asm_errmsg (int error) { int last_error = global_error; diff --git a/libasm/asm_fill.c b/libasm/asm_fill.c index 6b92bc3..62d9d73 100644 --- a/libasm/asm_fill.c +++ b/libasm/asm_fill.c @@ -39,10 +39,7 @@ int -asm_fill (asmscn, bytes, len) - AsmScn_t *asmscn; - void *bytes; - size_t len; +asm_fill (AsmScn_t *asmscn, void *bytes, size_t len) { struct FillPattern *pattern; struct FillPattern *old_pattern; diff --git a/libasm/asm_getelf.c b/libasm/asm_getelf.c index edeff13..2a5c37b 100644 --- a/libasm/asm_getelf.c +++ b/libasm/asm_getelf.c @@ -37,8 +37,7 @@ Elf * -asm_getelf (ctx) - AsmCtx_t *ctx; +asm_getelf (AsmCtx_t *ctx) { return ctx != NULL ? ctx->out.elf : NULL; } diff --git a/libasm/asm_newabssym.c b/libasm/asm_newabssym.c index 4e59901..c5b7bea 100644 --- a/libasm/asm_newabssym.c +++ b/libasm/asm_newabssym.c @@ -52,13 +52,8 @@ static const AsmScn_t __libasm_abs_scn = AsmSym_t * -asm_newabssym (ctx, name, size, value, type, binding) - AsmCtx_t *ctx; - const char *name; - GElf_Xword size; - GElf_Addr value; - int type; - int binding; +asm_newabssym (AsmCtx_t *ctx, const char *name, GElf_Xword size, + GElf_Addr value, int type, int binding) { AsmSym_t *result; diff --git a/libasm/asm_newcomsym.c b/libasm/asm_newcomsym.c index 7a578e0..ee5c140 100644 --- a/libasm/asm_newcomsym.c +++ b/libasm/asm_newcomsym.c @@ -52,11 +52,8 @@ static const AsmScn_t __libasm_com_scn = AsmSym_t * -asm_newcomsym (ctx, name, size, align) - AsmCtx_t *ctx; - const char *name; - GElf_Xword size; - GElf_Addr align; +asm_newcomsym (AsmCtx_t *ctx, const char *name, GElf_Xword size, + GElf_Addr align) { AsmSym_t *result; diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c index ece7f5c..e236769 100644 --- a/libasm/asm_newscn.c +++ b/libasm/asm_newscn.c @@ -158,11 +158,8 @@ binary_newscn (AsmScn_t *result, GElf_Word type, GElf_Xword flags, AsmScn_t * -asm_newscn (ctx, scnname, type, flags) - AsmCtx_t *ctx; - const char *scnname; - GElf_Word type; - GElf_Xword flags; +asm_newscn (AsmCtx_t *ctx, const char *scnname, GElf_Word type, + GElf_Xword flags) { size_t scnname_len = strlen (scnname) + 1; AsmScn_t *result; diff --git a/libasm/asm_newscn_ingrp.c b/libasm/asm_newscn_ingrp.c index 6ef7cb9..fd45be6 100644 --- a/libasm/asm_newscn_ingrp.c +++ b/libasm/asm_newscn_ingrp.c @@ -37,12 +37,8 @@ AsmScn_t * -asm_newscn_ingrp (ctx, scnname, type, flags, grp) - AsmCtx_t *ctx; - const char *scnname; - GElf_Word type; - GElf_Xword flags; - AsmScnGrp_t *grp; +asm_newscn_ingrp (AsmCtx_t *ctx, const char *scnname, GElf_Word type, + GElf_Xword flags, AsmScnGrp_t *grp) { AsmScn_t *result = INTUSE (asm_newscn) (ctx, scnname, type, flags); diff --git a/libasm/asm_newscngrp.c b/libasm/asm_newscngrp.c index 2808e69..c5968c1 100644 --- a/libasm/asm_newscngrp.c +++ b/libasm/asm_newscngrp.c @@ -41,11 +41,8 @@ AsmScnGrp_t * -asm_newscngrp (ctx, grpname, signature, flags) - AsmCtx_t *ctx; - const char *grpname; - AsmSym_t *signature; - Elf32_Word flags; +asm_newscngrp (AsmCtx_t *ctx, const char *grpname, AsmSym_t *signature, + Elf32_Word flags) { AsmScnGrp_t *result; size_t grpname_len = strlen (grpname) + 1; diff --git a/libasm/asm_newsubscn.c b/libasm/asm_newsubscn.c index a83607a..906240a 100644 --- a/libasm/asm_newsubscn.c +++ b/libasm/asm_newsubscn.c @@ -38,9 +38,7 @@ AsmScn_t * -asm_newsubscn (asmscn, nr) - AsmScn_t *asmscn; - unsigned int nr; +asm_newsubscn (AsmScn_t *asmscn, unsigned int nr) { AsmScn_t *runp; AsmScn_t *newp; diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c index deca08a..7f52291 100644 --- a/libasm/asm_newsym.c +++ b/libasm/asm_newsym.c @@ -41,12 +41,8 @@ AsmSym_t * -asm_newsym (asmscn, name, size, type, binding) - AsmScn_t *asmscn; - const char *name; - GElf_Xword size; - int type; - int binding; +asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, + int type, int binding) { #define TEMPSYMLEN 10 char tempsym[TEMPSYMLEN]; diff --git a/libasm/asm_scngrp_newsignature.c b/libasm/asm_scngrp_newsignature.c index d87f4a4..2fbb334 100644 --- a/libasm/asm_scngrp_newsignature.c +++ b/libasm/asm_scngrp_newsignature.c @@ -35,9 +35,7 @@ int -asm_scngrp_newsignature (grp, signature) - AsmScnGrp_t *grp; - AsmSym_t *signature; +asm_scngrp_newsignature (AsmScnGrp_t *grp, AsmSym_t *signature) { if (grp == NULL || signature == NULL) return 1; diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index a20f440..c953c7b 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,3 +1,14 @@ +2015-10-05 Josh Stone + + * Makefile.am (%_defs): Add AM_V_GEN and AM_V_at silencers. + ($(srcdir)/%_dis.h): Ditto. + (%.mnemonics): Add AM_V_GEN silencer. + +2014-10-29 Jose E. Marchesi + + * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid + relocation overflows in some platforms. + 2014-04-13 Mark Wielaard * Makefile.am (i386_gendis_LDADD): Remove libmudflap. diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index 3beccf3..f0caaea 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -30,7 +30,7 @@ include $(top_srcdir)/config/eu.am AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libasm -AM_CFLAGS += -fpic -fdollars-in-identifiers +AM_CFLAGS += -fPIC -fdollars-in-identifiers LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$( $@T - mv -f $@T $@ + $(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T + $(AM_V_at)mv -f $@T $@ if MAINTAINER_MODE noinst_HEADERS = memory-access.h i386_parse.h i386_data.h @@ -55,8 +55,8 @@ noinst_HEADERS = memory-access.h i386_parse.h i386_data.h noinst_PROGRAMS = i386_gendis $(srcdir)/%_dis.h: %_defs i386_gendis - ./i386_gendis $< > $@T - mv -f $@T $@ + $(AM_V_GEN)./i386_gendis $< > $@T + $(AM_V_at)mv -f $@T $@ else @@ -67,7 +67,7 @@ $(srcdir)/%_dis.h: endif %.mnemonics: %_defs - sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ + $(AM_V_GEN)sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ $< | sort -u > $@ i386_lex_no_Werror = yes diff --git a/libcpu/Makefile.in b/libcpu/Makefile.in index 1cd457b..9d83ce3 100644 --- a/libcpu/Makefile.in +++ b/libcpu/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,10 +90,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am i386_lex.c i386_parse.c \ - $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ - $(am__noinst_HEADERS_DIST) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) subdir = libcpu ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -93,12 +100,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -188,6 +196,9 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am $(top_srcdir)/config/ylwrap \ + ChangeLog i386_lex.c i386_parse.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -197,6 +208,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -216,6 +228,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -227,6 +242,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = lex.$(> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h %_defs: $(srcdir)/defs/i386 - m4 -D$* -DDISASSEMBLER $< > $@T - mv -f $@T $@ + $(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T + $(AM_V_at)mv -f $@T $@ @MAINTAINER_MODE_TRUE@$(srcdir)/%_dis.h: %_defs i386_gendis -@MAINTAINER_MODE_TRUE@ ./i386_gendis $< > $@T -@MAINTAINER_MODE_TRUE@ mv -f $@T $@ +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN)./i386_gendis $< > $@T +@MAINTAINER_MODE_TRUE@ $(AM_V_at)mv -f $@T $@ @MAINTAINER_MODE_FALSE@$(srcdir)/%_dis.h: @MAINTAINER_MODE_FALSE@ @echo '*** missing $@; configure with --enable-maintainer-mode' @MAINTAINER_MODE_FALSE@ @false %.mnemonics: %_defs - sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ + $(AM_V_GEN)sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ $< | sort -u > $@ i386_parse.o: i386_parse.c i386.mnemonics i386_lex.o: i386_parse.h diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c index d1a730d..e006a62 100644 --- a/libcpu/i386_lex.c +++ b/libcpu/i386_lex.c @@ -27,7 +27,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -199,6 +199,13 @@ extern FILE *i386_in, *i386_out; if ( i386_text[yyl] == '\n' )\ --i386_lineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --i386_lineno;\ + }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -537,8 +544,8 @@ int i386__flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *i386_text; -#line 1 "i386_lex.l" -#line 2 "i386_lex.l" +#line 1 "/home/mark/src/elfutils/libcpu/i386_lex.l" +#line 2 "/home/mark/src/elfutils/libcpu/i386_lex.l" /* Copyright (C) 2004, 2005, 2007, 2008 Red Hat, Inc. Written by Ulrich Drepper , 2004. @@ -581,7 +588,7 @@ char *i386_text; static void eat_to_eol (void); static void invalid_char (int ch); -#line 585 "i386_lex.c" +#line 592 "i386_lex.c" #define INITIAL 0 #define MAIN 1 @@ -767,11 +774,6 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 57 "i386_lex.l" - - -#line 774 "i386_lex.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -798,6 +800,12 @@ YY_DECL i386__load_buffer_state( ); } + { +#line 57 "/home/mark/src/elfutils/libcpu/i386_lex.l" + + +#line 808 "i386_lex.c" + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -815,7 +823,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -862,119 +870,119 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 59 "i386_lex.l" +#line 59 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kMASK; } YY_BREAK case 2: YY_RULE_SETUP -#line 61 "i386_lex.l" +#line 61 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kPREFIX; } YY_BREAK case 3: YY_RULE_SETUP -#line 62 "i386_lex.l" +#line 62 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kSUFFIX; } YY_BREAK case 4: YY_RULE_SETUP -#line 64 "i386_lex.l" +#line 64 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kSYNONYM; } YY_BREAK case 5: YY_RULE_SETUP -#line 66 "i386_lex.l" +#line 66 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.num = strtoul (i386_text, NULL, 10); return kNUMBER; } YY_BREAK case 6: YY_RULE_SETUP -#line 69 "i386_lex.l" +#line 69 "/home/mark/src/elfutils/libcpu/i386_lex.l" { BEGIN (MAIN); return kPERCPERC; } YY_BREAK case 7: YY_RULE_SETUP -#line 72 "i386_lex.l" +#line 72 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return '0'; } YY_BREAK case 8: YY_RULE_SETUP -#line 73 "i386_lex.l" +#line 73 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return '1'; } YY_BREAK case 9: YY_RULE_SETUP -#line 75 "i386_lex.l" +#line 75 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.str = xstrndup (i386_text + 1, i386_leng - 2); return kBITFIELD; } YY_BREAK case 10: YY_RULE_SETUP -#line 79 "i386_lex.l" +#line 79 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.str = (void *) -1l; return kID; } YY_BREAK case 11: YY_RULE_SETUP -#line 82 "i386_lex.l" +#line 82 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.str = xstrndup (i386_text, i386_leng); return kID; } YY_BREAK case 12: YY_RULE_SETUP -#line 85 "i386_lex.l" +#line 85 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return ','; } YY_BREAK case 13: YY_RULE_SETUP -#line 87 "i386_lex.l" +#line 87 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return ':'; } YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP -#line 89 "i386_lex.l" +#line 89 "/home/mark/src/elfutils/libcpu/i386_lex.l" { /* IGNORE */ } YY_BREAK case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 91 "i386_lex.l" +#line 91 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return '\n'; } YY_BREAK case 16: YY_RULE_SETUP -#line 93 "i386_lex.l" +#line 93 "/home/mark/src/elfutils/libcpu/i386_lex.l" { eat_to_eol (); } YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP -#line 95 "i386_lex.l" +#line 95 "/home/mark/src/elfutils/libcpu/i386_lex.l" { /* IGNORE */ } YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP -#line 97 "i386_lex.l" +#line 97 "/home/mark/src/elfutils/libcpu/i386_lex.l" { return kSPACE; } YY_BREAK case 19: YY_RULE_SETUP -#line 99 "i386_lex.l" +#line 99 "/home/mark/src/elfutils/libcpu/i386_lex.l" { i386_lval.ch = *i386_text; return kCHAR; } YY_BREAK case 20: YY_RULE_SETUP -#line 101 "i386_lex.l" +#line 101 "/home/mark/src/elfutils/libcpu/i386_lex.l" { invalid_char (*i386_text); } YY_BREAK case 21: YY_RULE_SETUP -#line 104 "i386_lex.l" +#line 104 "/home/mark/src/elfutils/libcpu/i386_lex.l" ECHO; YY_BREAK -#line 978 "i386_lex.c" +#line 986 "i386_lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(MAIN): yyterminate(); @@ -1107,6 +1115,7 @@ case YY_STATE_EOF(MAIN): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of i386_lex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1984,7 +1993,7 @@ void i386_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 104 "i386_lex.l" +#line 104 "/home/mark/src/elfutils/libcpu/i386_lex.l" diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c index d6bcf8d..3e9b5a0 100644 --- a/libcpu/i386_parse.c +++ b/libcpu/i386_parse.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -63,14 +63,14 @@ #define yyparse i386_parse #define yylex i386_lex #define yyerror i386_error -#define yylval i386_lval -#define yychar i386_char #define yydebug i386_debug #define yynerrs i386_nerrs +#define yylval i386_lval +#define yychar i386_char + /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 1 "i386_parse.y" +#line 1 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:339 */ /* Parser for i386 CPU description. Copyright (C) 2004, 2005, 2007, 2008, 2009 Red Hat, Inc. @@ -286,14 +286,13 @@ extern FILE *outfile; static size_t best_mnemonic_bits; #endif -/* Line 371 of yacc.c */ -#line 291 "i386_parse.c" +#line 290 "i386_parse.c" /* yacc.c:339 */ -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -309,7 +308,7 @@ static size_t best_mnemonic_bits; by #include "y.tab.h". */ #ifndef YY_I386_I_PARSE_H_INCLUDED # define YY_I386_I_PARSE_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -317,23 +316,22 @@ static size_t best_mnemonic_bits; extern int i386_debug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kMASK = 258, - kPREFIX = 259, - kSUFFIX = 260, - kSYNONYM = 261, - kID = 262, - kNUMBER = 263, - kPERCPERC = 264, - kBITFIELD = 265, - kCHAR = 266, - kSPACE = 267 - }; + enum yytokentype + { + kMASK = 258, + kPREFIX = 259, + kSUFFIX = 260, + kSYNONYM = 261, + kID = 262, + kNUMBER = 263, + kPERCPERC = 264, + kBITFIELD = 265, + kCHAR = 266, + kSPACE = 267 + }; #endif /* Tokens. */ #define kMASK 258 @@ -347,13 +345,12 @@ extern int i386_debug; #define kCHAR 266 #define kSPACE 267 - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE + +union YYSTYPE { -/* Line 387 of yacc.c */ -#line 217 "i386_parse.y" +#line 217 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:355 */ unsigned long int num; char *str; @@ -363,37 +360,24 @@ typedef union YYSTYPE struct argname *name; struct argument *arg; +#line 364 "i386_parse.c" /* yacc.c:355 */ +}; -/* Line 387 of yacc.c */ -#line 369 "i386_parse.c" -} YYSTYPE; +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE i386_lval; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int i386_parse (void *YYPARSE_PARAM); -#else -int i386_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int i386_parse (void); -#else -int i386_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_I386_I_PARSE_H_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 397 "i386_parse.c" +#line 381 "i386_parse.c" /* yacc.c:358 */ #ifdef short # undef short @@ -407,11 +391,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -431,8 +412,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -454,6 +434,33 @@ typedef short int yytype_int16; # endif #endif +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -461,23 +468,25 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -496,8 +505,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -509,8 +517,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -526,7 +534,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -534,15 +542,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -552,7 +558,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -577,16 +583,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -605,7 +611,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -621,17 +627,19 @@ union yyalloc #define YYNNTS 14 /* YYNRULES -- Number of rules. */ #define YYNRULES 32 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 49 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 267 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -664,31 +672,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 8, 12, 14, 18, 21, 24, 28, - 29, 33, 35, 42, 43, 45, 46, 50, 52, 55, - 57, 59, 61, 63, 66, 67, 71, 73, 76, 78, - 80, 82, 84 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 19, 0, -1, 20, 9, 13, 22, -1, 20, 13, - 21, -1, 21, -1, 3, 10, 8, -1, 4, 10, - -1, 5, 10, -1, 6, 10, 10, -1, -1, 22, - 13, 23, -1, 23, -1, 25, 14, 24, 7, 24, - 28, -1, -1, 10, -1, -1, 25, 15, 26, -1, - 26, -1, 26, 27, -1, 27, -1, 16, -1, 17, - -1, 10, -1, 12, 29, -1, -1, 29, 15, 30, - -1, 30, -1, 30, 31, -1, 31, -1, 10, -1, - 11, -1, 7, -1, 14, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 247, 247, 257, 258, 261, 263, 265, 267, 279, @@ -707,13 +691,13 @@ static const char *const yytname[] = "kSYNONYM", "kID", "kNUMBER", "kPERCPERC", "kBITFIELD", "kCHAR", "kSPACE", "'\\n'", "':'", "','", "'0'", "'1'", "$accept", "spec", "masks", "mask", "instrs", "instr", "bitfieldopt", "bytes", "byte", - "bit", "optargs", "args", "arg", "argcomp", YY_NULL + "bit", "optargs", "args", "arg", "argcomp", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -721,46 +705,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 18, 19, 20, 20, 21, 21, 21, 21, 21, - 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, - 27, 27, 27, 28, 28, 29, 29, 30, 30, 31, - 31, 31, 31 -}; +#define YYPACT_NINF -35 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 4, 3, 1, 3, 2, 2, 3, 0, - 3, 1, 6, 0, 1, 0, 3, 1, 2, 1, - 1, 1, 1, 2, 0, 3, 1, 2, 1, 1, - 1, 1, 1 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-35))) -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 9, 0, 0, 0, 0, 0, 0, 4, 0, 6, - 7, 0, 1, 0, 9, 5, 8, 13, 3, 22, - 20, 21, 2, 11, 0, 17, 19, 13, 15, 0, - 18, 10, 14, 0, 16, 15, 24, 0, 12, 31, - 29, 30, 32, 23, 26, 28, 0, 27, 25 -}; +#define YYTABLE_NINF -1 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 5, 6, 7, 22, 23, 33, 24, 25, 26, - 38, 43, 44, 45 -}; +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -35 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int8 yypact[] = { 12, 9, 10, 11, 13, 22, -2, -35, 16, -35, @@ -770,17 +726,35 @@ static const yytype_int8 yypact[] = -35, -35, -35, 21, -6, -35, -6, -35, -6 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 9, 0, 0, 0, 0, 0, 0, 4, 0, 6, + 7, 0, 1, 0, 9, 5, 8, 13, 3, 22, + 20, 21, 2, 11, 0, 17, 19, 13, 15, 0, + 18, 10, 14, 0, 16, 15, 24, 0, 12, 31, + 29, 30, 32, 23, 26, 28, 0, 27, 25 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -35, -35, -35, 23, -35, 2, -1, -35, 4, -25, -35, -35, -15, -34 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 5, 6, 7, 22, 23, 33, 24, 25, 26, + 38, 43, 44, 45 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 30, 39, 28, 29, 40, 41, 19, 13, 42, 30, @@ -789,12 +763,6 @@ static const yytype_uint8 yytable[] = 27, 48, 37, 34, 36, 0, 46, 18 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-35))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int8 yycheck[] = { 25, 7, 14, 15, 10, 11, 10, 9, 14, 34, @@ -803,8 +771,8 @@ static const yytype_int8 yycheck[] = 13, 46, 12, 29, 35, -1, 15, 14 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 5, 6, 19, 20, 21, 10, 10, @@ -814,30 +782,34 @@ static const yytype_uint8 yystos[] = 10, 11, 14, 29, 30, 31, 15, 31, 30 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 18, 19, 20, 20, 21, 21, 21, 21, 21, + 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, + 27, 27, 27, 28, 28, 29, 29, 30, 30, 31, + 31, 31, 31 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 4, 3, 1, 3, 2, 2, 3, 0, + 3, 1, 6, 0, 1, 0, 3, 1, 2, 1, + 1, 1, 1, 2, 0, 3, 1, 2, 1, 1, + 1, 1, 1 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -854,27 +826,15 @@ do \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +#define YYTERROR 1 +#define YYERRCODE 256 -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -884,40 +844,36 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); @@ -926,14 +882,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -941,22 +891,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -967,16 +906,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -987,49 +918,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1043,7 +967,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1066,15 +990,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1090,16 +1007,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1129,27 +1038,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1172,11 +1081,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1184,10 +1093,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1237,7 +1142,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1304,31 +1209,17 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1337,18 +1228,8 @@ yydestruct (yymsg, yytype, yyvaluep) /* The lookahead symbol. */ int yychar; - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - +YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; @@ -1357,35 +1238,16 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1453,23 +1315,23 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1477,22 +1339,22 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1501,10 +1363,10 @@ yyparse () yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1533,7 +1395,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1598,7 +1460,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1612,8 +1474,7 @@ yyreduce: switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 248 "i386_parse.y" +#line 248 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { if (error_message_count != 0) error (EXIT_FAILURE, 0, @@ -1621,105 +1482,105 @@ yyreduce: instrtable_out (); } +#line 1486 "i386_parse.c" /* yacc.c:1646 */ break; case 5: -/* Line 1792 of yacc.c */ -#line 262 "i386_parse.y" - { new_bitfield ((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].num)); } +#line 262 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ + { new_bitfield ((yyvsp[-1].str), (yyvsp[0].num)); } +#line 1492 "i386_parse.c" /* yacc.c:1646 */ break; case 6: -/* Line 1792 of yacc.c */ -#line 264 "i386_parse.y" - { new_bitfield ((yyvsp[(2) - (2)].str), -1); } +#line 264 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ + { new_bitfield ((yyvsp[0].str), -1); } +#line 1498 "i386_parse.c" /* yacc.c:1646 */ break; case 7: -/* Line 1792 of yacc.c */ -#line 266 "i386_parse.y" - { new_bitfield ((yyvsp[(2) - (2)].str), -2); } +#line 266 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ + { new_bitfield ((yyvsp[0].str), -2); } +#line 1504 "i386_parse.c" /* yacc.c:1646 */ break; case 8: -/* Line 1792 of yacc.c */ -#line 268 "i386_parse.y" +#line 268 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { struct synonym *newp = xmalloc (sizeof (*newp)); - newp->from = (yyvsp[(2) - (3)].str); - newp->to = (yyvsp[(3) - (3)].str); + newp->from = (yyvsp[-1].str); + newp->to = (yyvsp[0].str); if (tfind (newp, &synonyms, compare_syn) != NULL) error (0, 0, "%d: duplicate definition for synonym '%s'", - i386_lineno, (yyvsp[(2) - (3)].str)); + i386_lineno, (yyvsp[-1].str)); else if (tsearch ( newp, &synonyms, compare_syn) == NULL) error (EXIT_FAILURE, 0, "tsearch"); } +#line 1520 "i386_parse.c" /* yacc.c:1646 */ break; case 12: -/* Line 1792 of yacc.c */ -#line 287 "i386_parse.y" +#line 287 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { - if ((yyvsp[(3) - (6)].field) != NULL && strcmp ((yyvsp[(3) - (6)].field)->name, "RE") != 0 - && strcmp ((yyvsp[(3) - (6)].field)->name, "R") != 0) + if ((yyvsp[-3].field) != NULL && strcmp ((yyvsp[-3].field)->name, "RE") != 0 + && strcmp ((yyvsp[-3].field)->name, "R") != 0) { error (0, 0, "%d: only 'R' and 'RE' prefix allowed", i386_lineno - 1); } - if (check_duplicates ((yyvsp[(1) - (6)].bit)) == 0 - && check_argsdef ((yyvsp[(1) - (6)].bit), (yyvsp[(6) - (6)].arg)) == 0 - && check_bitsused ((yyvsp[(1) - (6)].bit), (yyvsp[(5) - (6)].field), (yyvsp[(6) - (6)].arg)) == 0) + if (check_duplicates ((yyvsp[-5].bit)) == 0 + && check_argsdef ((yyvsp[-5].bit), (yyvsp[0].arg)) == 0 + && check_bitsused ((yyvsp[-5].bit), (yyvsp[-1].field), (yyvsp[0].arg)) == 0) { struct instruction *newp = xcalloc (sizeof (*newp), 1); - if ((yyvsp[(3) - (6)].field) != NULL) + if ((yyvsp[-3].field) != NULL) { - if (strcmp ((yyvsp[(3) - (6)].field)->name, "RE") == 0) + if (strcmp ((yyvsp[-3].field)->name, "RE") == 0) newp->repe = 1; - else if (strcmp ((yyvsp[(3) - (6)].field)->name, "R") == 0) + else if (strcmp ((yyvsp[-3].field)->name, "R") == 0) newp->rep = 1; } - newp->bytes = (yyvsp[(1) - (6)].bit); - newp->mnemonic = (yyvsp[(4) - (6)].str); + newp->bytes = (yyvsp[-5].bit); + newp->mnemonic = (yyvsp[-2].str); if (newp->mnemonic != (void *) -1l - && tfind ((yyvsp[(4) - (6)].str), &mnemonics, + && tfind ((yyvsp[-2].str), &mnemonics, (comparison_fn_t) strcmp) == NULL) { - if (tsearch ((yyvsp[(4) - (6)].str), &mnemonics, + if (tsearch ((yyvsp[-2].str), &mnemonics, (comparison_fn_t) strcmp) == NULL) error (EXIT_FAILURE, errno, "tsearch"); ++nmnemonics; } - if ((yyvsp[(5) - (6)].field) != NULL) + if ((yyvsp[-1].field) != NULL) { - if (strcmp ((yyvsp[(5) - (6)].field)->name, "w") == 0) + if (strcmp ((yyvsp[-1].field)->name, "w") == 0) newp->suffix = suffix_w; - else if (strcmp ((yyvsp[(5) - (6)].field)->name, "w0") == 0) + else if (strcmp ((yyvsp[-1].field)->name, "w0") == 0) newp->suffix = suffix_w0; - else if (strcmp ((yyvsp[(5) - (6)].field)->name, "tttn") == 0) + else if (strcmp ((yyvsp[-1].field)->name, "tttn") == 0) newp->suffix = suffix_tttn; - else if (strcmp ((yyvsp[(5) - (6)].field)->name, "w1") == 0) + else if (strcmp ((yyvsp[-1].field)->name, "w1") == 0) newp->suffix = suffix_w1; - else if (strcmp ((yyvsp[(5) - (6)].field)->name, "W") == 0) + else if (strcmp ((yyvsp[-1].field)->name, "W") == 0) newp->suffix = suffix_W; - else if (strcmp ((yyvsp[(5) - (6)].field)->name, "W1") == 0) + else if (strcmp ((yyvsp[-1].field)->name, "W1") == 0) newp->suffix = suffix_W1; - else if (strcmp ((yyvsp[(5) - (6)].field)->name, "D") == 0) + else if (strcmp ((yyvsp[-1].field)->name, "D") == 0) newp->suffix = suffix_D; else error (EXIT_FAILURE, 0, "%s: %d: unknown suffix '%s'", - infname, i386_lineno - 1, (yyvsp[(5) - (6)].field)->name); + infname, i386_lineno - 1, (yyvsp[-1].field)->name); - struct suffix search = { .name = (yyvsp[(5) - (6)].field)->name }; + struct suffix search = { .name = (yyvsp[-1].field)->name }; if (tfind (&search, &suffixes, compare_suf) == NULL) { struct suffix *ns = xmalloc (sizeof (*ns)); - ns->name = (yyvsp[(5) - (6)].field)->name; + ns->name = (yyvsp[-1].field)->name; ns->idx = ++nsuffixes; if (tsearch (ns, &suffixes, compare_suf) == NULL) @@ -1727,11 +1588,11 @@ yyreduce: } } - struct argument *args = (yyvsp[(6) - (6)].arg); + struct argument *args = (yyvsp[0].arg); int n = 0; while (args != NULL) { - fillin_arg ((yyvsp[(1) - (6)].bit), args->name, newp, n); + fillin_arg ((yyvsp[-5].bit), args->name, newp, n); args = args->next; ++n; @@ -1742,14 +1603,14 @@ yyreduce: ++ninstructions; } } +#line 1607 "i386_parse.c" /* yacc.c:1646 */ break; case 14: -/* Line 1792 of yacc.c */ -#line 373 "i386_parse.y" +#line 373 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { struct known_bitfield search; - search.name = (yyvsp[(1) - (1)].str); + search.name = (yyvsp[0].str); struct known_bitfield **res; res = tfind (&search, &bitfields, bitfield_compare); if (res == NULL) @@ -1761,84 +1622,84 @@ yyreduce: else (yyval.field) = *res; } +#line 1626 "i386_parse.c" /* yacc.c:1646 */ break; case 15: -/* Line 1792 of yacc.c */ -#line 388 "i386_parse.y" +#line 388 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.field) = NULL; } +#line 1632 "i386_parse.c" /* yacc.c:1646 */ break; case 16: -/* Line 1792 of yacc.c */ -#line 392 "i386_parse.y" +#line 392 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { - check_bits ((yyvsp[(3) - (3)].bit)); + check_bits ((yyvsp[0].bit)); - struct bitvalue *runp = (yyvsp[(1) - (3)].bit); + struct bitvalue *runp = (yyvsp[-2].bit); while (runp->next != NULL) runp = runp->next; - runp->next = (yyvsp[(3) - (3)].bit); - (yyval.bit) = (yyvsp[(1) - (3)].bit); + runp->next = (yyvsp[0].bit); + (yyval.bit) = (yyvsp[-2].bit); } +#line 1646 "i386_parse.c" /* yacc.c:1646 */ break; case 17: -/* Line 1792 of yacc.c */ -#line 402 "i386_parse.y" +#line 402 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { - check_bits ((yyvsp[(1) - (1)].bit)); - (yyval.bit) = (yyvsp[(1) - (1)].bit); + check_bits ((yyvsp[0].bit)); + (yyval.bit) = (yyvsp[0].bit); } +#line 1655 "i386_parse.c" /* yacc.c:1646 */ break; case 18: -/* Line 1792 of yacc.c */ -#line 409 "i386_parse.y" +#line 409 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { - struct bitvalue *runp = (yyvsp[(1) - (2)].bit); + struct bitvalue *runp = (yyvsp[-1].bit); while (runp->next != NULL) runp = runp->next; - runp->next = (yyvsp[(2) - (2)].bit); - (yyval.bit) = (yyvsp[(1) - (2)].bit); + runp->next = (yyvsp[0].bit); + (yyval.bit) = (yyvsp[-1].bit); } +#line 1667 "i386_parse.c" /* yacc.c:1646 */ break; case 19: -/* Line 1792 of yacc.c */ -#line 417 "i386_parse.y" - { (yyval.bit) = (yyvsp[(1) - (1)].bit); } +#line 417 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ + { (yyval.bit) = (yyvsp[0].bit); } +#line 1673 "i386_parse.c" /* yacc.c:1646 */ break; case 20: -/* Line 1792 of yacc.c */ -#line 421 "i386_parse.y" +#line 421 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.bit) = xmalloc (sizeof (struct bitvalue)); (yyval.bit)->type = zeroone; (yyval.bit)->value = 0; (yyval.bit)->next = NULL; } +#line 1684 "i386_parse.c" /* yacc.c:1646 */ break; case 21: -/* Line 1792 of yacc.c */ -#line 428 "i386_parse.y" +#line 428 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.bit) = xmalloc (sizeof (struct bitvalue)); (yyval.bit)->type = zeroone; (yyval.bit)->value = 1; (yyval.bit)->next = NULL; } +#line 1695 "i386_parse.c" /* yacc.c:1646 */ break; case 22: -/* Line 1792 of yacc.c */ -#line 435 "i386_parse.y" +#line 435 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.bit) = xmalloc (sizeof (struct bitvalue)); struct known_bitfield search; - search.name = (yyvsp[(1) - (1)].str); + search.name = (yyvsp[0].str); struct known_bitfield **res; res = tfind (&search, &bitfields, bitfield_compare); if (res == NULL) @@ -1854,85 +1715,85 @@ yyreduce: } (yyval.bit)->next = NULL; } +#line 1719 "i386_parse.c" /* yacc.c:1646 */ break; case 23: -/* Line 1792 of yacc.c */ -#line 457 "i386_parse.y" - { (yyval.arg) = (yyvsp[(2) - (2)].arg); } +#line 457 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ + { (yyval.arg) = (yyvsp[0].arg); } +#line 1725 "i386_parse.c" /* yacc.c:1646 */ break; case 24: -/* Line 1792 of yacc.c */ -#line 459 "i386_parse.y" +#line 459 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.arg) = NULL; } +#line 1731 "i386_parse.c" /* yacc.c:1646 */ break; case 25: -/* Line 1792 of yacc.c */ -#line 463 "i386_parse.y" +#line 463 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { - struct argument *runp = (yyvsp[(1) - (3)].arg); + struct argument *runp = (yyvsp[-2].arg); while (runp->next != NULL) runp = runp->next; runp->next = xmalloc (sizeof (struct argument)); - runp->next->name = combine ((yyvsp[(3) - (3)].name)); + runp->next->name = combine ((yyvsp[0].name)); runp->next->next = NULL; - (yyval.arg) = (yyvsp[(1) - (3)].arg); + (yyval.arg) = (yyvsp[-2].arg); } +#line 1745 "i386_parse.c" /* yacc.c:1646 */ break; case 26: -/* Line 1792 of yacc.c */ -#line 473 "i386_parse.y" +#line 473 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.arg) = xmalloc (sizeof (struct argument)); - (yyval.arg)->name = combine ((yyvsp[(1) - (1)].name)); + (yyval.arg)->name = combine ((yyvsp[0].name)); (yyval.arg)->next = NULL; } +#line 1755 "i386_parse.c" /* yacc.c:1646 */ break; case 27: -/* Line 1792 of yacc.c */ -#line 481 "i386_parse.y" +#line 481 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { - struct argname *runp = (yyvsp[(1) - (2)].name); + struct argname *runp = (yyvsp[-1].name); while (runp->next != NULL) runp = runp->next; - runp->next = (yyvsp[(2) - (2)].name); - (yyval.name) = (yyvsp[(1) - (2)].name); + runp->next = (yyvsp[0].name); + (yyval.name) = (yyvsp[-1].name); } +#line 1767 "i386_parse.c" /* yacc.c:1646 */ break; case 28: -/* Line 1792 of yacc.c */ -#line 489 "i386_parse.y" - { (yyval.name) = (yyvsp[(1) - (1)].name); } +#line 489 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ + { (yyval.name) = (yyvsp[0].name); } +#line 1773 "i386_parse.c" /* yacc.c:1646 */ break; case 29: -/* Line 1792 of yacc.c */ -#line 492 "i386_parse.y" +#line 492 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = nfield; (yyval.name)->next = NULL; struct known_bitfield search; - search.name = (yyvsp[(1) - (1)].str); + search.name = (yyvsp[0].str); struct known_bitfield **res; res = tfind (&search, &bitfields, bitfield_compare); if (res == NULL) { - if (strcmp ((yyvsp[(1) - (1)].str), "ax") == 0) + if (strcmp ((yyvsp[0].str), "ax") == 0) (yyval.name)->field = &ax_reg; - else if (strcmp ((yyvsp[(1) - (1)].str), "dx") == 0) + else if (strcmp ((yyvsp[0].str), "dx") == 0) (yyval.name)->field = &dx_reg; - else if (strcmp ((yyvsp[(1) - (1)].str), "es_di") == 0) + else if (strcmp ((yyvsp[0].str), "es_di") == 0) (yyval.name)->field = &di_reg; - else if (strcmp ((yyvsp[(1) - (1)].str), "ds_si") == 0) + else if (strcmp ((yyvsp[0].str), "ds_si") == 0) (yyval.name)->field = &si_reg; - else if (strcmp ((yyvsp[(1) - (1)].str), "ds_bx") == 0) + else if (strcmp ((yyvsp[0].str), "ds_bx") == 0) (yyval.name)->field = &bx_reg; else { @@ -1944,35 +1805,35 @@ yyreduce: else (yyval.name)->field = *res; } +#line 1809 "i386_parse.c" /* yacc.c:1646 */ break; case 30: -/* Line 1792 of yacc.c */ -#line 524 "i386_parse.y" +#line 524 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = string; (yyval.name)->next = NULL; (yyval.name)->str = xmalloc (2); - (yyval.name)->str[0] = (yyvsp[(1) - (1)].ch); + (yyval.name)->str[0] = (yyvsp[0].ch); (yyval.name)->str[1] = '\0'; } +#line 1822 "i386_parse.c" /* yacc.c:1646 */ break; case 31: -/* Line 1792 of yacc.c */ -#line 533 "i386_parse.y" +#line 533 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = string; (yyval.name)->next = NULL; - (yyval.name)->str = (yyvsp[(1) - (1)].str); + (yyval.name)->str = (yyvsp[0].str); } +#line 1833 "i386_parse.c" /* yacc.c:1646 */ break; case 32: -/* Line 1792 of yacc.c */ -#line 540 "i386_parse.y" +#line 540 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1646 */ { (yyval.name) = xmalloc (sizeof (struct argname)); (yyval.name)->type = string; @@ -1981,11 +1842,11 @@ yyreduce: (yyval.name)->str[0] = ':'; (yyval.name)->str[1] = '\0'; } +#line 1846 "i386_parse.c" /* yacc.c:1646 */ break; -/* Line 1792 of yacc.c */ -#line 1989 "i386_parse.c" +#line 1850 "i386_parse.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2007,7 +1868,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2022,9 +1883,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2075,20 +1936,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2107,7 +1968,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2120,29 +1981,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2193,14 +2054,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2211,13 +2072,9 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -/* Line 2055 of yacc.c */ -#line 550 "i386_parse.y" +#line 550 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1906 */ static void diff --git a/libcpu/i386_parse.h b/libcpu/i386_parse.h index 9689c32..54bda4c 100644 --- a/libcpu/i386_parse.h +++ b/libcpu/i386_parse.h @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,13 +26,13 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_I386_I_PARSE_H_INCLUDED # define YY_I386_I_PARSE_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -40,23 +40,22 @@ extern int i386_debug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kMASK = 258, - kPREFIX = 259, - kSUFFIX = 260, - kSYNONYM = 261, - kID = 262, - kNUMBER = 263, - kPERCPERC = 264, - kBITFIELD = 265, - kCHAR = 266, - kSPACE = 267 - }; + enum yytokentype + { + kMASK = 258, + kPREFIX = 259, + kSUFFIX = 260, + kSYNONYM = 261, + kID = 262, + kNUMBER = 263, + kPERCPERC = 264, + kBITFIELD = 265, + kCHAR = 266, + kSPACE = 267 + }; #endif /* Tokens. */ #define kMASK 258 @@ -70,13 +69,12 @@ extern int i386_debug; #define kCHAR 266 #define kSPACE 267 - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE + +union YYSTYPE { -/* Line 2058 of yacc.c */ -#line 217 "i386_parse.y" +#line 217 "/home/mark/src/elfutils/libcpu/i386_parse.y" /* yacc.c:1909 */ unsigned long int num; char *str; @@ -86,29 +84,17 @@ typedef union YYSTYPE struct argname *name; struct argument *arg; +#line 88 "i386_parse.h" /* yacc.c:1909 */ +}; -/* Line 2058 of yacc.c */ -#line 92 "i386_parse.h" -} YYSTYPE; +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE i386_lval; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int i386_parse (void *YYPARSE_PARAM); -#else -int i386_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int i386_parse (void); -#else -int i386_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_I386_I_PARSE_H_INCLUDED */ diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 5f9b097..fc80e8d 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,591 @@ +2015-12-18 Mark Wielaard + + * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask. + (__libdw_free_zdata): Remove. + * dwarf_begin_elf.c (inflate_section): Remove. + (check_section): Remove __libdw_free_zdata calls. Use elf_compress + and elf_compress_gnu to decompress if necessary. + (valid_p): Remove __libdw_free_zdata calls. + (scngrp_read): Use elf_compress if section is compressed. Remove + __libdw_free_zdata calls. + * dwarf_end.c (__libdw_free_zdata): Remove. + (dwarf_end): Don't call __libdw_free_zdata. + +2015-10-28 Mark Wielaard + + * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size. + +2015-12-02 Mark Wielaard + + * fde.c (intern_fde): Don't leak duplicate FDEs. + +2015-12-01 Mark Wielaard + + * fde.c (intern_fde): Don't intern an fde that doesn't cover a + valid code range. + +2015-12-01 Mark Wielaard + + * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists. + +2015-10-14 Chih-Hung Hsieh + + * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive + functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope. + +2015-10-14 Chih-Hung Hsieh + + * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested + function 'walk_children' to file scope; inline 'recurse' at its call + site. + +2015-10-19 Mark Wielaard + + * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend + if necessary. + +2015-10-16 Dmitry V. Levin + + * dwarf_getsrclines.c (read_srclines): Initialize state early. + +2015-10-13 Chih-Hung Hsieh + + * dwarf_getsrclines.c (read_srclines): Move nested functions + 'advance_pc' and 'add_new_line' to file scope and keep many + local state variables within one structure. + +2015-10-13 Chih-Hung Hsieh + + * dwarf_getscopevar.c (dwarf_getscopevar): Move nested + function 'file_matches' to file scope. + +2015-10-16 Mark Wielaard + + * Makefile.am (libdw.so): Add -lz. + +2015-10-14 Chih-Hung Hsieh + + * cfi.c (execute_cfi): Move nested functions 'enough_registers' + and 'require_cfa_offset' to file scope. + +2015-10-09 Josh Stone + + * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat + and fstat. + +2015-10-05 Josh Stone + + * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers. + +2015-09-24 Jose E. Marchesi + + * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid + relocation overflows in some platforms. + +2015-09-23 Mark Wielaard + + * dwarf_error.c (__libdw_seterrno): Mark as internal_function. + * dwarf_formref.c (__libdw_formref): Likewise. + * libdw_findcu.c (__libdw_findcu): Likewise. + * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. + +2015-09-22 Mark Wielaard + + * *.c: Remove old-style function definitions. + +2015-09-15 Mark Wielaard + + * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer. + +2015-09-09 Chih-Hung Hsieh + + * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove + redundant NULL tests on parameters declared with __nonnull_attribute__. + * dwarf_siblingof.c (dwarf_siblingof): Likewise. + * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. + +2015-09-04 Chih-Hung Hsieh + Mark Wielaard + + * dwarf_getlocation.c (getlocations_addr): Replace K&R function + definition with ansi-C definition and add const qualifier to + locs argument. + +2015-09-04 Chih-Hung Hsieh + + * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function + definition with ansi-C definitions. + (__libdw_findcu): Likewise. + +2015-08-25 Mark Wielaard + + * dwarf.h: Add DW_LANG_Haskell. + +2015-06-18 Mark Wielaard + + * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough + to hold a Dwarf. + +2015-06-18 Mark Wielaard + + * dwarf_getpubnames.c (get_offsets): Always free mem on error. + +2015-06-18 Mark Wielaard + + * dwarf_getmacros.c (get_macinfo_table): Return NULL when + dwarf_formudata reports an error. + (get_table_for_offset): Likewise. + +2015-06-08 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Initialize dirarray early. + +2015-06-06 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Initialize filelist early. + +2015-05-27 Mark Wielaard + + * encoded-value.h (read_encoded_value): Check data d_size contains + at least enough data to hold a pointer for DW_EH_PE_indirect. + +2015-05-22 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines + with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with + MAX_STACK_DIRS. Calculate number of dirs needed first, then + create dirarray directly, without needing the next field. Free + not stack allocated lines and files at the end. + +2015-05-19 Mark Wielaard + + * dwarf_getlocation.c (__libdw_intern_expression): Create a stack + allocated array to hold locs. Allocate locs bigger than the array + with malloc and free them when done. + +2015-05-11 Jonathan Lebon + + * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator. + * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message. + * dwarf_begin_elf.c (inflate_section): New static function, lifted + from... + (check_section): ... here. Call inflate_section, set libdw errno to + DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated. + +2015-05-11 Jonathan Lebon + + * dwarf_begin_elf.c (check_section): Add compressed flag. Always + check for .zdebug sections. Only wrap decompression in #if USE_ZLIB. + +2015-05-06 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and + check the line number. + +2015-05-05 Mark Wielaard + + * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data + left before reading values. + +2015-05-04 Anthony G. Basile + + * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link + command. + +2015-04-22 Mark Wielaard + + * memory-access.h (__libdw_max_len_leb128): Take type_len as argument. + (__libdw_max_len_uleb128): New function. + (__libdw_max_len_sleb128): Likewise. + (__libdw_get_uleb128): Use __libdw_max_len_uleb128. + (__libdw_get_sleb128): Use __libdw_max_len_sleb128. + +2015-04-21 Mark Wielaard + + * dwarf_getmacros.c (read_macros): Allocate attributes dynamically + when there are more than 8. + +2015-04-01 Petr Machata + + * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator. + (is_cudie): New function. + * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE. + * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead + of white-listing valid tags. + * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. + +2015-03-18 Petr Machata + + * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h. + (EXTRA_DIST): Remove known-dwarf.h. + +2015-02-09 Mark Wielaard + + * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08. + * dwarf_aggregate_size.c (array_size): Recognize array lower bound + for new Fortran language codes is 1. + +2015-02-09 Mark Wielaard + + * dwarf.h: Add DW_TAG_atomic_type. + * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type. + * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type. + +2015-02-11 Josh Stone + + * encoded-value.h (read_encoded_value): Initialize value. + +2015-02-11 Petr Machata + + * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither + DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember + the fact in *BASEP and bail out later if it hasn't been updated by + __libdw_read_begin_end_pair_inc. + +2014-12-24 Mark Wielaard + + * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record + smaller than or equal to addr, rather than returning immediately on + a match. + +2015-01-07 Mark Wielaard + + * cfi.h (struct Dwarf_CFI_s): Add search_table_len. + * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough + room in the search table for all entries. Store search_table_len. + (getcfi_scn_eh_frame): Likewise. + * encoded-value.h (encoded_value_size): Don't abort, return zero. + (__libdw_cfi_read_address_inc): Check there is enough room to read + values. Pass other byte order to read functions. + (read_encoded_value): Check encoded_value_size. Don't abort, but + set libdw errno and report failure. Check there is enough room to + read values. + * fde.c (binary_search_fde): Check encoded value size. Add hdr + data buf and size to dummy_cfi. + +2015-01-04 Mark Wielaard + + * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute + is after current DIE. + +2015-01-04 Mark Wielaard + + * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof + (dwarf_frame_register). + +2015-01-02 Mark Wielaard + + * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check. + (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL. + (getcfi_scn_eh_frame): Check d_buf is not NULL. + +2015-01-02 Mark Wielaard + + * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not + NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For + DW_OP_addr if dbg is NULL then read argument directly. + +2015-01-14 Jason P. Leasure + + * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset + plus cu->start. + +2014-12-27 Mark Wielaard + + * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset + still falls inside CU data. + +2015-01-11 Mark Wielaard + + * dwarf_func_inline.c (dwarf_func_inline_instances): Call + __libdw_visit_scopes with NULL imports. + * dwarf_getfuncs.c (dwarf_getfuncs): Likewise. + * dwarf_getscopes.c (pc_record): Likewise. + (dwarf_getscopes): Likewise. + * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise. + * libdwP.h (__libdw_visit_scopes): Add imports argument. + * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new + function imports_contains. Push and pop imports around walk_children + when processing DW_TAG_imported_unit. + +2014-12-18 Ulrich Drepper + + * Makefile.am: Suppress output of textrel_check command. + +2014-12-16 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Check diridx is valid under + DW_LNE_define_file. + +2014-12-16 Mark Wielaard + + * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough + space to read die offset. + +2014-12-16 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Correct overflow check for + unit_length. + +2014-12-15 Mark Wielaard + + * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside + section data. Set error to DWARF_E_NO_ENTRY if cnt is zero. + (dwarf_getpubnames): Make sure section data contains string zero + terminator. + +2014-12-16 Mark Wielaard + + * memory-access.h (__libdw_get_sleb128): Unroll the first step to help + the compiler optimize for the common single-byte case. + +2014-12-15 Josh Stone + + * memory-access.h (__libdw_max_len_leb128): New. + (__libdw_get_uleb128): Use __libdw_max_len_leb128. + (__libdw_get_sleb128): Likewise. + +2014-12-14 Mark Wielaard + + * cfi.c (execute_cfi): Add program bounds checks. + * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks. + * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp. + * dwarf_formref.c (__libdw_formref): Add datap bounds checks. + * dwarf_formsdata.c (dwarf_formsdata): Likewise. + * dwarf_formudata.c (dwarf_formudata): Likewise. + * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128 + with end of data buf. + * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks. + * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128 + call gets enough data. + * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp. + * dwarf_getlocation.c (store_implicit_value): Call get_uleb128 + with enough data. + (__libdw_intern_expression): Call get_uleb128/get_sleb128 with + end_data. + * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check. + * dwarf_getsrclines.c (read_srclines): Bounds check linep and call + get_uleb128 with lineendp. + * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call + get_uleb128 with endp. + * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call + get_uleb128/get_sleb128 with limit. + * encoded-value.h (read_encoded_value): Assume get_uleb128 and + get_sleb128 get called with enough data. + * fde.c (intern_fde): Call get_uleb128 with instructions_end. + * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp. + * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with + endp. + * memory-access.h (__libdw_get_uleb128): Take an extra endp. + Don't call get_uleb128_step if out of data. + (__libdw_get_sleb128): Likewise for get_sleb128_step. + +2014-12-12 Mark Wielaard + + * libdwP.h (struct Dwarf): Add fake_loc_cu. + (cu_data): Removed. + (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx. + (__libdw_form_val_compute_len): Drop dbg and endp arguments. + (__libdw_form_val_len): Likewise. + * libdw_form.c (__libdw_form_val_compute_len): Likewise. + * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use + the already found data buffer directly. + * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu. + * dwarf_end.c (dwarf_end): Free fake_loc_cu. + * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with + just cu. + * dwarf_getattrs.c (dwarf_getattrs): Likewise. + * dwarf_formblock.c (dwarf_formblock): Add bounds checking. + * dwarf_getlocation_attr.c (attr_form_cu): New function. + (dwarf_getlocation_attr): Use attr_form_cu to set result->cu. + (getlocation): Handle empty blocks immediately. + * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var. + (__libdw_empty_loc_attr): Drop cu argument, use empty_cu. + (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with + one argument. + * dwarf_getmacros.c (read_macros): Also setup startp and endp for + fake_cu. Call __libdw_form_val_len with just fake_cu. + * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get + datap and size directly from cu startp and endp. + +2014-12-11 Mark Wielaard + + * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset. + +2014-12-13 Mark Wielaard + + * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr + difference doesn't wrap around before returning as int. + +2014-12-11 Josh Stone + + * dwarf_getsrclines.c (struct linelist): Add sequence. + (compare_lines): Take linelists, and break ties by sequence. + (read_srclines): Use linelists for sorting. + (read_srclines::add_new_line): Set sequence. + +2014-12-10 Josh Stone + + * libdwP.h (Dwarf_CU): Add startp and endp boundaries. + * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp. + * dwarf_child.c (dwarf_child): Use cu->endp. + * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp. + * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp. + * dwarf_siblingof.c (dwarf_siblingof): Use both. + +2014-12-10 Josh Stone + + * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence. + +2014-12-10 Josh Stone + + * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function. + * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it. + * dwarf_getattrs.c (dwarf_getattrs): Likewise. + * dwarf_haschildren.c (dwarf_haschildren): Likewise. + * dwarf_tag.c (dwarf_tag): Likewise. + +2014-12-04 Mark Wielaard + + * libdwP.h (__libdw_form_val_compute_len): Add endp argument. + (__libdw_form_val_len): Likewise and check len doesn't overflow. + * libdw_form.c (__libdw_form_val_compute_len): Likewise. + * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len + with endp. + * dwarf_getattrs.c (dwarf_getattrs): Likewise. + * dwarf_getmacros.c (read_macros): Likewise and check for errors. + +2014-12-02 Petr Machata + + * dwarf_getmacros.c (token_from_offset, offset_from_token): New + helper functions. + (do_dwarf_getmacros_die): Merge into dwarf_getmacros. + * libdw.h (DWARF_GETMACROS_START): New macro. + +2014-11-27 Mark Wielaard + + * Makefile.am (libdw.so): Use textrel_check. + +2014-11-27 Mark Wielaard + + * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize + search_table_entries and search_table_encoding. + +2014-11-24 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Check line_range is not zero + before usage. + +2014-11-23 Mark Wielaard + + * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value. + * dwarf_hasattr.c (dwarf_hasattr): Likewise. + * dwarf_siblingof.c (dwarf_siblingof): Likewise. + +2014-11-23 Mark Wielaard + + * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF. + Set libdw errno and return NULL. + +2014-11-24 Mark Wielaard + + * dwarf.h (DW_LANG_C_plus_plus_11): Added. + (DW_LANG_C11): Likewise. + (DW_LANG_C_plus_plus_14): Likewise. + * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11, + DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go + lower bound. + * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for + DW_LANG_C11. + +2014-11-26 Mark Wielaard + + * dwarf.h (DW_AT_noreturn): Added. + +2014-11-11 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Do address_size comparison + explicitly as uint8_t. + (__libdw_getsrclines): Add internal_function to declaration. + +2014-09-10 Petr Machata + + * dwarf_macro_getparamcnt.c: New file. + * dwarf_macro_param.c: New file. + * dwarf_macro_getsrcfiles.c: New file. + * Makefile.am (libdw_a_SOURCES): Add the new files. + * libdwP.h (struct files_lines_s): New structure. + (DWARF_E_INVALID_OPCODE): New enumerator. + (struct Dwarf): New fields macro_ops, files_lines. + (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for + keeping macro opcode prototypes in. + (Dwarf_Macro_s): Redefine from scratch. + (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New + internal interfaces. + * dwarf_error.c (errmsgs): Add a message for + DWARF_E_INVALID_OPCODE. + * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and + files_lines. + * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt) + (dwarf_macro_getsrcfiles, dwarf_macro_param): New public + interfaces. + * dwarf_getmacros.c (dwarf_getmacros_off): New function, + (get_offset_from, macro_op_compare, build_table) + (init_macinfo_table, get_macinfo_table, get_table_for_offset) + (cache_op_table, read_macros, gnu_macros_getmacros_off) + (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper + functions. + (dwarf_getmacros): Adjust to dispatch to the new interfaces. + * dwarf_getsrclines.c (read_srclines): New function with guts + taken from dwarf_getsrclines. + (__libdw_getsrclines): Likewise. + (__libdw_getcompdir, files_lines_compare): New functions. + (dwarf_getsrclines): Make it dispatch to the new interfaces. + * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to + the new interfaces. + * dwarf_macro_param2.c (dwarf_macro_param2): Likewise. + * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off, + dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param. + +2014-10-06 Mark Wielaard + + * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c. + * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type. + (aggregate_size): Likewise. Add old and new version. + * dwarf_peel_type.c: New file. + * libdw.h (dwarf_peel_type): New function declaration. + * libdwP.h (dwarf_peel_type): New internal declaration. + * libdw.map (ELFUTILS_0.161): New section. + +2014-10-15 Petr Machata + + * libdwP.h (struct Dwarf_Files_s.cu): Drop field. + * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it. + +2014-10-05 Mark Wielaard + + * dwarf.h: Add DW_AT_GNU_deleted. + +2014-10-02 Mark Wielaard + + * dwarf_aggregate_size.c (aggregate_size): Return CU address_size + for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or + DW_TAG_rvalue_reference_type. + +2014-09-12 Petr Machata + + * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and + 8-byte quantities. Consequently, rename to... + (read_addr_unaligned_inc): ... this. + (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop. + (read_sbyte_unaligned): Drop. + +2014-09-10 Petr Machata + + * dwarf_getlocation.c (attr_ok): Also accept + DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, + DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered. + 2014-08-15 Mark Wielaard * dwarf_cu_die.c: New file. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 2e42a37..082d96c 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -29,7 +29,7 @@ ## include $(top_srcdir)/config/eu.am if BUILD_STATIC -AM_CFLAGS += -fpic +AM_CFLAGS += -fPIC endif AM_CPPFLAGS += -I$(srcdir)/../libelf VERSION = 1 @@ -39,7 +39,7 @@ noinst_LIBRARIES = libdw_pic.a noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) include_HEADERS = dwarf.h -pkginclude_HEADERS = libdw.h +pkginclude_HEADERS = libdw.h known-dwarf.h libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \ @@ -71,9 +71,11 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_getlocation.c dwarf_getstring.c dwarf_offabbrev.c \ dwarf_getaranges.c dwarf_onearange.c dwarf_getarangeinfo.c \ dwarf_getarange_addr.c dwarf_getattrs.c dwarf_formflag.c \ - dwarf_getmacros.c dwarf_macro_opcode.c dwarf_macro_param1.c \ - dwarf_macro_param2.c dwarf_addrdie.c \ - dwarf_getfuncs.c \ + dwarf_getmacros.c dwarf_macro_getparamcnt.c \ + dwarf_macro_opcode.c dwarf_macro_param.c \ + dwarf_macro_param1.c dwarf_macro_param2.c \ + dwarf_macro_getsrcfiles.c \ + dwarf_addrdie.c dwarf_getfuncs.c \ dwarf_decl_file.c dwarf_decl_line.c dwarf_decl_column.c \ dwarf_func_inline.c dwarf_getsrc_file.c \ libdw_findcu.c libdw_form.c libdw_alloc.c \ @@ -87,7 +89,7 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_aggregate_size.c dwarf_getlocation_implicit_pointer.c \ dwarf_getlocation_die.c dwarf_getlocation_attr.c \ dwarf_getalt.c dwarf_setalt.c dwarf_cu_getdwarf.c \ - dwarf_cu_die.c + dwarf_cu_die.c dwarf_peel_type.c if MAINTAINER_MODE BUILT_SOURCES = $(srcdir)/known-dwarf.h @@ -106,13 +108,13 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ ../libelf/libelf.so # The rpath is necessary for libebl because its $ORIGIN use will # not fly in a setuid executable that links in libdw. - $(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ -Wl,--version-script,$<,--no-undefined \ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ - -ldl $(zip_LIBS) - if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) + -ldl -lz $(argp_LDADD) $(zip_LIBS) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libdw.so $(mkinstalldirs) $(DESTDIR)$(libdir) @@ -135,6 +137,6 @@ libdw_a_LIBADD += $(addprefix ../libdwelf/,$(libdwelf_objects)) noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \ dwarf_sig8_hash.h cfi.h encoded-value.h -EXTRA_DIST = libdw.map known-dwarf.h +EXTRA_DIST = libdw.map MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so.$(VERSION) diff --git a/libdw/Makefile.in b/libdw/Makefile.in index fdf02fb..c71cc4e 100644 --- a/libdw/Makefile.in +++ b/libdw/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,11 +90,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \ - ChangeLog -@BUILD_STATIC_TRUE@am__append_1 = -fpic +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING +@BUILD_STATIC_TRUE@am__append_2 = -fPIC noinst_PROGRAMS = $(am__EXEEXT_1) subdir = libdw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -94,6 +101,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ + $(noinst_HEADERS) $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -128,7 +137,6 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -176,16 +184,18 @@ am_libdw_a_OBJECTS = dwarf_begin.$(OBJEXT) dwarf_begin_elf.$(OBJEXT) \ dwarf_getaranges.$(OBJEXT) dwarf_onearange.$(OBJEXT) \ dwarf_getarangeinfo.$(OBJEXT) dwarf_getarange_addr.$(OBJEXT) \ dwarf_getattrs.$(OBJEXT) dwarf_formflag.$(OBJEXT) \ - dwarf_getmacros.$(OBJEXT) dwarf_macro_opcode.$(OBJEXT) \ + dwarf_getmacros.$(OBJEXT) dwarf_macro_getparamcnt.$(OBJEXT) \ + dwarf_macro_opcode.$(OBJEXT) dwarf_macro_param.$(OBJEXT) \ dwarf_macro_param1.$(OBJEXT) dwarf_macro_param2.$(OBJEXT) \ - dwarf_addrdie.$(OBJEXT) dwarf_getfuncs.$(OBJEXT) \ - dwarf_decl_file.$(OBJEXT) dwarf_decl_line.$(OBJEXT) \ - dwarf_decl_column.$(OBJEXT) dwarf_func_inline.$(OBJEXT) \ - dwarf_getsrc_file.$(OBJEXT) libdw_findcu.$(OBJEXT) \ - libdw_form.$(OBJEXT) libdw_alloc.$(OBJEXT) \ - libdw_visit_scopes.$(OBJEXT) dwarf_entry_breakpoints.$(OBJEXT) \ - dwarf_next_cfi.$(OBJEXT) cie.$(OBJEXT) fde.$(OBJEXT) \ - cfi.$(OBJEXT) frame-cache.$(OBJEXT) dwarf_frame_info.$(OBJEXT) \ + dwarf_macro_getsrcfiles.$(OBJEXT) dwarf_addrdie.$(OBJEXT) \ + dwarf_getfuncs.$(OBJEXT) dwarf_decl_file.$(OBJEXT) \ + dwarf_decl_line.$(OBJEXT) dwarf_decl_column.$(OBJEXT) \ + dwarf_func_inline.$(OBJEXT) dwarf_getsrc_file.$(OBJEXT) \ + libdw_findcu.$(OBJEXT) libdw_form.$(OBJEXT) \ + libdw_alloc.$(OBJEXT) libdw_visit_scopes.$(OBJEXT) \ + dwarf_entry_breakpoints.$(OBJEXT) dwarf_next_cfi.$(OBJEXT) \ + cie.$(OBJEXT) fde.$(OBJEXT) cfi.$(OBJEXT) \ + frame-cache.$(OBJEXT) dwarf_frame_info.$(OBJEXT) \ dwarf_frame_cfa.$(OBJEXT) dwarf_frame_register.$(OBJEXT) \ dwarf_cfi_addrframe.$(OBJEXT) dwarf_getcfi.$(OBJEXT) \ dwarf_getcfi_elf.$(OBJEXT) dwarf_cfi_end.$(OBJEXT) \ @@ -194,7 +204,7 @@ am_libdw_a_OBJECTS = dwarf_begin.$(OBJEXT) dwarf_begin_elf.$(OBJEXT) \ dwarf_getlocation_die.$(OBJEXT) \ dwarf_getlocation_attr.$(OBJEXT) dwarf_getalt.$(OBJEXT) \ dwarf_setalt.$(OBJEXT) dwarf_cu_getdwarf.$(OBJEXT) \ - dwarf_cu_die.$(OBJEXT) + dwarf_cu_die.$(OBJEXT) dwarf_peel_type.$(OBJEXT) libdw_a_OBJECTS = $(am_libdw_a_OBJECTS) libdw_pic_a_AR = $(AR) $(ARFLAGS) libdw_pic_a_LIBADD = @@ -261,6 +271,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -270,6 +282,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -289,6 +302,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -300,6 +316,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -343,6 +360,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -388,17 +406,31 @@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(srcdir)/../libelf -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \ + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 +AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes $(if \ $($(*F)_no_Werror),,-Werror) $(if \ - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) \ - $(am__append_1) + $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ + $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ + $($(*F)_CFLAGS) $(am__append_2) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi lib_LIBRARIES = libdw.a noinst_LIBRARIES = libdw_pic.a include_HEADERS = dwarf.h -pkginclude_HEADERS = libdw.h +pkginclude_HEADERS = libdw.h known-dwarf.h libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \ dwarf_error.c dwarf_nextcu.c dwarf_diename.c dwarf_offdie.c \ @@ -429,9 +461,11 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_getlocation.c dwarf_getstring.c dwarf_offabbrev.c \ dwarf_getaranges.c dwarf_onearange.c dwarf_getarangeinfo.c \ dwarf_getarange_addr.c dwarf_getattrs.c dwarf_formflag.c \ - dwarf_getmacros.c dwarf_macro_opcode.c dwarf_macro_param1.c \ - dwarf_macro_param2.c dwarf_addrdie.c \ - dwarf_getfuncs.c \ + dwarf_getmacros.c dwarf_macro_getparamcnt.c \ + dwarf_macro_opcode.c dwarf_macro_param.c \ + dwarf_macro_param1.c dwarf_macro_param2.c \ + dwarf_macro_getsrcfiles.c \ + dwarf_addrdie.c dwarf_getfuncs.c \ dwarf_decl_file.c dwarf_decl_line.c dwarf_decl_column.c \ dwarf_func_inline.c dwarf_getsrc_file.c \ libdw_findcu.c libdw_form.c libdw_alloc.c \ @@ -445,7 +479,7 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_aggregate_size.c dwarf_getlocation_implicit_pointer.c \ dwarf_getlocation_die.c dwarf_getlocation_attr.c \ dwarf_getalt.c dwarf_setalt.c dwarf_cu_getdwarf.c \ - dwarf_cu_die.c + dwarf_cu_die.c dwarf_peel_type.c @MAINTAINER_MODE_TRUE@BUILT_SOURCES = $(srcdir)/known-dwarf.h @MAINTAINER_MODE_TRUE@MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h @@ -459,7 +493,7 @@ libdwelf_objects = $(shell $(AR) t ../libdwelf/libdwelf.a) noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \ dwarf_sig8_hash.h cfi.h encoded-value.h -EXTRA_DIST = libdw.map known-dwarf.h +EXTRA_DIST = libdw.map MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so.$(VERSION) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -478,7 +512,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libdw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libdw/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -487,7 +520,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -642,7 +675,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_lineprologueend.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_linesrc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_lowpc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_macro_getparamcnt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_macro_getsrcfiles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_macro_opcode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_macro_param.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_macro_param1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_macro_param2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_next_cfi.Po@am__quote@ @@ -651,6 +687,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_offdie.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_onearange.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_onesrcline.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_peel_type.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_ranges.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_setalt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf_siblingof.Po@am__quote@ @@ -671,14 +708,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -933,15 +970,20 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLIBRARIES uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) @MAINTAINER_MODE_TRUE@$(srcdir)/known-dwarf.h: $(top_srcdir)/config/known-dwarf.awk $(srcdir)/dwarf.h @MAINTAINER_MODE_TRUE@ gawk -f $^ > $@.new @MAINTAINER_MODE_TRUE@ mv -f $@.new $@ @@ -950,13 +992,13 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ ../libelf/libelf.so # The rpath is necessary for libebl because its $ORIGIN use will # not fly in a setuid executable that links in libdw. - $(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ -Wl,--version-script,$<,--no-undefined \ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ - -ldl $(zip_LIBS) - if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) + -ldl -lz $(argp_LDADD) $(zip_LIBS) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libdw.so $(mkinstalldirs) $(DESTDIR)$(libdir) diff --git a/libdw/cfi.c b/libdw/cfi.c index a146f12..1fd668d 100644 --- a/libdw/cfi.c +++ b/libdw/cfi.c @@ -1,5 +1,5 @@ /* CFI program execution. - Copyright (C) 2009-2010 Red Hat, Inc. + Copyright (C) 2009-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -56,6 +56,46 @@ duplicate_frame_state (const Dwarf_Frame *original, return copy; } +static inline bool +enough_registers (Dwarf_Word reg, Dwarf_Frame **pfs, int *result) +{ + /* Don't allow insanely large register numbers. 268435456 registers + should be enough for anybody. And very large values might overflow + the array size and offsetof calculations below. */ + if (unlikely (reg >= INT32_MAX / sizeof ((*pfs)->regs[0]))) + { + *result = DWARF_E_INVALID_CFI; + return false; + } + + if ((*pfs)->nregs <= reg) + { + size_t size = offsetof (Dwarf_Frame, regs[reg + 1]); + Dwarf_Frame *bigger = realloc (*pfs, size); + if (unlikely (bigger == NULL)) + { + *result = DWARF_E_NOMEM; + return false; + } + else + { + eu_static_assert (reg_unspecified == 0); + memset (bigger->regs + bigger->nregs, 0, + (reg + 1 - bigger->nregs) * sizeof bigger->regs[0]); + bigger->nregs = reg + 1; + *pfs = bigger; + } + } + return true; +} + +static inline void +require_cfa_offset (Dwarf_Frame *fs) +{ + if (unlikely (fs->cfa_rule != cfa_offset)) + fs->cfa_rule = cfa_invalid; +} + /* Returns a DWARF_E_* error code, usually NOERROR or INVALID_CFI. Frees *STATE on failure. */ static int @@ -77,37 +117,9 @@ execute_cfi (Dwarf_CFI *cache, } while (0) Dwarf_Frame *fs = *state; - inline bool enough_registers (Dwarf_Word reg) - { - if (fs->nregs <= reg) - { - size_t size = offsetof (Dwarf_Frame, regs[reg + 1]); - Dwarf_Frame *bigger = realloc (fs, size); - if (unlikely (bigger == NULL)) - { - result = DWARF_E_NOMEM; - return false; - } - else - { - eu_static_assert (reg_unspecified == 0); - memset (bigger->regs + bigger->nregs, 0, - (reg + 1 - bigger->nregs) * sizeof bigger->regs[0]); - bigger->nregs = reg + 1; - fs = bigger; - } - } - return true; - } - - inline void require_cfa_offset (void) - { - if (unlikely (fs->cfa_rule != cfa_offset)) - fs->cfa_rule = cfa_invalid; - } #define register_rule(regno, r_rule, r_value) do { \ - if (unlikely (! enough_registers (regno))) \ + if (unlikely (! enough_registers (regno, &fs, &result))) \ goto out; \ fs->regs[regno].rule = reg_##r_rule; \ fs->regs[regno].value = (r_value); \ @@ -132,12 +144,15 @@ execute_cfi (Dwarf_CFI *cache, break; case DW_CFA_advance_loc2: + cfi_assert (program + 2 <= end); operand = read_2ubyte_unaligned_inc (cache, program); goto advance_loc; case DW_CFA_advance_loc4: + cfi_assert (program + 4 <= end); operand = read_4ubyte_unaligned_inc (cache, program); goto advance_loc; case DW_CFA_MIPS_advance_loc8: + cfi_assert (program + 8 <= end); operand = read_8ubyte_unaligned_inc (cache, program); goto advance_loc; @@ -153,8 +168,9 @@ execute_cfi (Dwarf_CFI *cache, switch block for the row-copying (LOC-moving) cases above. */ case DW_CFA_def_cfa: - get_uleb128 (operand, program); - get_uleb128 (offset, program); + get_uleb128 (operand, program, end); + cfi_assert (program < end); + get_uleb128 (offset, program, end); def_cfa: fs->cfa_rule = cfa_offset; fs->cfa_val_reg = operand; @@ -165,32 +181,33 @@ execute_cfi (Dwarf_CFI *cache, continue; case DW_CFA_def_cfa_register: - get_uleb128 (regno, program); - require_cfa_offset (); + get_uleb128 (regno, program, end); + require_cfa_offset (fs); fs->cfa_val_reg = regno; continue; case DW_CFA_def_cfa_sf: - get_uleb128 (operand, program); - get_sleb128 (sf_offset, program); + get_uleb128 (operand, program, end); + cfi_assert (program < end); + get_sleb128 (sf_offset, program, end); offset = sf_offset * cie->data_alignment_factor; goto def_cfa; case DW_CFA_def_cfa_offset: - get_uleb128 (offset, program); + get_uleb128 (offset, program, end); def_cfa_offset: - require_cfa_offset (); + require_cfa_offset (fs); fs->cfa_val_offset = offset; continue; case DW_CFA_def_cfa_offset_sf: - get_sleb128 (sf_offset, program); + get_sleb128 (sf_offset, program, end); offset = sf_offset * cie->data_alignment_factor; goto def_cfa_offset; case DW_CFA_def_cfa_expression: /* DW_FORM_block is a ULEB128 length followed by that many bytes. */ - get_uleb128 (operand, program); + get_uleb128 (operand, program, end); cfi_assert (operand <= (Dwarf_Word) (end - program)); fs->cfa_rule = cfa_expr; fs->cfa_data.expr.data = (unsigned char *) program; @@ -199,65 +216,71 @@ execute_cfi (Dwarf_CFI *cache, continue; case DW_CFA_undefined: - get_uleb128 (regno, program); + get_uleb128 (regno, program, end); register_rule (regno, undefined, 0); continue; case DW_CFA_same_value: - get_uleb128 (regno, program); + get_uleb128 (regno, program, end); register_rule (regno, same_value, 0); continue; case DW_CFA_offset_extended: - get_uleb128 (operand, program); + get_uleb128 (operand, program, end); + cfi_assert (program < end); case DW_CFA_offset + 0 ... DW_CFA_offset + CFI_PRIMARY_MAX: - get_uleb128 (offset, program); + get_uleb128 (offset, program, end); offset *= cie->data_alignment_factor; offset_extended: register_rule (operand, offset, offset); continue; case DW_CFA_offset_extended_sf: - get_uleb128 (operand, program); - get_sleb128 (sf_offset, program); + get_uleb128 (operand, program, end); + get_sleb128 (sf_offset, program, end); offset_extended_sf: offset = sf_offset * cie->data_alignment_factor; goto offset_extended; case DW_CFA_GNU_negative_offset_extended: /* GNU extension obsoleted by DW_CFA_offset_extended_sf. */ - get_uleb128 (operand, program); - get_uleb128 (offset, program); + get_uleb128 (operand, program, end); + cfi_assert (program < end); + get_uleb128 (offset, program, end); sf_offset = -offset; goto offset_extended_sf; case DW_CFA_val_offset: - get_uleb128 (operand, program); - get_uleb128 (offset, program); + get_uleb128 (operand, program, end); + cfi_assert (program < end); + get_uleb128 (offset, program, end); offset *= cie->data_alignment_factor; val_offset: register_rule (operand, val_offset, offset); continue; case DW_CFA_val_offset_sf: - get_uleb128 (operand, program); - get_sleb128 (sf_offset, program); + get_uleb128 (operand, program, end); + cfi_assert (program < end); + get_sleb128 (sf_offset, program, end); offset = sf_offset * cie->data_alignment_factor; goto val_offset; case DW_CFA_register: - get_uleb128 (regno, program); - get_uleb128 (operand, program); + get_uleb128 (regno, program, end); + cfi_assert (program < end); + get_uleb128 (operand, program, end); register_rule (regno, register, operand); continue; case DW_CFA_expression: /* Expression rule relies on section data, abi_cfi cannot use it. */ assert (! abi_cfi); - get_uleb128 (regno, program); + get_uleb128 (regno, program, end); offset = program - (const uint8_t *) cache->data->d.d_buf; /* DW_FORM_block is a ULEB128 length followed by that many bytes. */ - get_uleb128 (operand, program); + cfi_assert (program < end); + get_uleb128 (operand, program, end); cfi_assert (operand <= (Dwarf_Word) (end - program)); program += operand; register_rule (regno, expression, offset); @@ -266,17 +289,17 @@ execute_cfi (Dwarf_CFI *cache, case DW_CFA_val_expression: /* Expression rule relies on section data, abi_cfi cannot use it. */ assert (! abi_cfi); - get_uleb128 (regno, program); + get_uleb128 (regno, program, end); /* DW_FORM_block is a ULEB128 length followed by that many bytes. */ offset = program - (const uint8_t *) cache->data->d.d_buf; - get_uleb128 (operand, program); + get_uleb128 (operand, program, end); cfi_assert (operand <= (Dwarf_Word) (end - program)); program += operand; register_rule (regno, val_expression, offset); continue; case DW_CFA_restore_extended: - get_uleb128 (operand, program); + get_uleb128 (operand, program, end); case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX: if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore)) @@ -290,7 +313,7 @@ execute_cfi (Dwarf_CFI *cache, cfi_assert (cie->initial_state != NULL); /* Restore the CIE's initial rule for this register. */ - if (unlikely (! enough_registers (operand))) + if (unlikely (! enough_registers (operand, &fs, &result))) goto out; if (cie->initial_state->nregs > operand) fs->regs[operand] = cie->initial_state->regs[operand]; @@ -327,7 +350,7 @@ execute_cfi (Dwarf_CFI *cache, case DW_CFA_GNU_window_save: /* This is magic shorthand used only by SPARC. It's equivalent to a bunch of DW_CFA_register and DW_CFA_offset operations. */ - if (unlikely (! enough_registers (31))) + if (unlikely (! enough_registers (31, &fs, &result))) goto out; for (regno = 8; regno < 16; ++regno) { @@ -347,7 +370,7 @@ execute_cfi (Dwarf_CFI *cache, case DW_CFA_GNU_args_size: /* XXX is this useful for anything? */ - get_uleb128 (operand, program); + get_uleb128 (operand, program, end); continue; default: diff --git a/libdw/cfi.h b/libdw/cfi.h index 98ac6cf..1ebf2dc 100644 --- a/libdw/cfi.h +++ b/libdw/cfi.h @@ -1,5 +1,5 @@ /* Internal definitions for libdw CFI interpreter. - Copyright (C) 2009-2010, 2013 Red Hat, Inc. + Copyright (C) 2009-2010, 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -103,6 +103,7 @@ struct Dwarf_CFI_s /* Binary search table in .eh_frame_hdr section. */ const uint8_t *search_table; + size_t search_table_len; Dwarf_Addr search_table_vaddr; size_t search_table_entries; uint8_t search_table_encoding; diff --git a/libdw/dwarf.h b/libdw/dwarf.h index d98a4bd..b5c58d7 100644 --- a/libdw/dwarf.h +++ b/libdw/dwarf.h @@ -94,6 +94,9 @@ enum DW_TAG_rvalue_reference_type = 0x42, DW_TAG_template_alias = 0x43, + /* DWARF 5. */ + DW_TAG_atomic_type = 0x47, + DW_TAG_lo_user = 0x4080, DW_TAG_MIPS_loop = 0x4081, @@ -221,6 +224,9 @@ enum DW_AT_enum_class = 0x6d, DW_AT_linkage_name = 0x6e, + /* DWARF5 attribute values. */ + DW_AT_noreturn = 0x87, + DW_AT_lo_user = 0x2000, DW_AT_MIPS_fde = 0x2001, @@ -267,6 +273,7 @@ enum DW_AT_GNU_all_call_sites = 0x2117, DW_AT_GNU_all_source_call_sites = 0x2118, DW_AT_GNU_macros = 0x2119, + DW_AT_GNU_deleted = 0x211a, DW_AT_hi_user = 0x3fff }; @@ -582,6 +589,13 @@ enum DW_LANG_D = 0x0013, /* D */ DW_LANG_Python = 0x0014, /* Python */ DW_LANG_Go = 0x0016, /* Go */ + DW_LANG_Haskell = 0x0018, /* Haskell */ + DW_LANG_C_plus_plus_11 = 0x001a, /* ISO C++:2011 */ + DW_LANG_C11 = 0x001d, /* ISO C:2011 */ + DW_LANG_C_plus_plus_14 = 0x0021, /* ISO C++:2014 */ + DW_LANG_Fortran03 = 0x0022, /* ISO/IEC 1539-1:2004 */ + DW_LANG_Fortran08 = 0x0023, /* ISO/IEC 1539-1:2010 */ + DW_LANG_lo_user = 0x8000, DW_LANG_Mips_Assembler = 0x8001, /* Assembler */ diff --git a/libdw/dwarf_abbrevhaschildren.c b/libdw/dwarf_abbrevhaschildren.c index 4a83e31..0f17c7e 100644 --- a/libdw/dwarf_abbrevhaschildren.c +++ b/libdw/dwarf_abbrevhaschildren.c @@ -37,8 +37,7 @@ int -dwarf_abbrevhaschildren (abbrev) - Dwarf_Abbrev *abbrev; +dwarf_abbrevhaschildren (Dwarf_Abbrev *abbrev) { return abbrev == NULL ? -1 : abbrev->has_children; } diff --git a/libdw/dwarf_addrdie.c b/libdw/dwarf_addrdie.c index 94eb148..3a08ab7 100644 --- a/libdw/dwarf_addrdie.c +++ b/libdw/dwarf_addrdie.c @@ -35,10 +35,7 @@ Dwarf_Die * -dwarf_addrdie (dbg, addr, result) - Dwarf *dbg; - Dwarf_Addr addr; - Dwarf_Die *result; +dwarf_addrdie (Dwarf *dbg, Dwarf_Addr addr, Dwarf_Die *result) { Dwarf_Aranges *aranges; size_t naranges; diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c index 07c53a2..aaeb7ed 100644 --- a/libdw/dwarf_aggregate_size.c +++ b/libdw/dwarf_aggregate_size.c @@ -1,5 +1,5 @@ /* Compute size of an aggregate type from DWARF. - Copyright (C) 2010 Red Hat, Inc. + Copyright (C) 2010, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,8 +37,13 @@ static Dwarf_Die * get_type (Dwarf_Die *die, Dwarf_Attribute *attr_mem, Dwarf_Die *type_mem) { - return INTUSE(dwarf_formref_die) + Dwarf_Die *type = INTUSE(dwarf_formref_die) (INTUSE(dwarf_attr_integrate) (die, DW_AT_type, attr_mem), type_mem); + + if (INTUSE(dwarf_peel_type) (type, type) != 0) + return NULL; + + return type; } static int @@ -98,12 +103,16 @@ array_size (Dwarf_Die *die, Dwarf_Word *size, case DW_LANG_C: case DW_LANG_C89: case DW_LANG_C99: + case DW_LANG_C11: case DW_LANG_C_plus_plus: + case DW_LANG_C_plus_plus_11: + case DW_LANG_C_plus_plus_14: case DW_LANG_ObjC: case DW_LANG_ObjC_plus_plus: case DW_LANG_Java: case DW_LANG_D: case DW_LANG_UPC: + case DW_LANG_Go: lower = 0; break; @@ -114,6 +123,8 @@ array_size (Dwarf_Die *die, Dwarf_Word *size, case DW_LANG_Fortran77: case DW_LANG_Fortran90: case DW_LANG_Fortran95: + case DW_LANG_Fortran03: + case DW_LANG_Fortran08: case DW_LANG_Pascal83: case DW_LANG_Modula2: case DW_LANG_PL1: @@ -198,13 +209,20 @@ aggregate_size (Dwarf_Die *die, Dwarf_Word *size, Dwarf_Die *type_mem) switch (INTUSE(dwarf_tag) (die)) { - case DW_TAG_typedef: case DW_TAG_subrange_type: return aggregate_size (get_type (die, &attr_mem, type_mem), size, type_mem); /* Tail call. */ case DW_TAG_array_type: return array_size (die, size, &attr_mem, type_mem); + + /* Assume references and pointers have pointer size if not given an + explicit DW_AT_byte_size. */ + case DW_TAG_pointer_type: + case DW_TAG_reference_type: + case DW_TAG_rvalue_reference_type: + *size = die->cu->address_size; + return 0; } /* Most types must give their size directly. */ @@ -212,11 +230,15 @@ aggregate_size (Dwarf_Die *die, Dwarf_Word *size, Dwarf_Die *type_mem) } int -dwarf_aggregate_size (die, size) - Dwarf_Die *die; - Dwarf_Word *size; +dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size) { Dwarf_Die type_mem; + + if (INTUSE (dwarf_peel_type) (die, die) != 0) + return -1; + return aggregate_size (die, size, &type_mem); } INTDEF (dwarf_aggregate_size) +OLD_VERSION (dwarf_aggregate_size, ELFUTILS_0.144) +NEW_VERSION (dwarf_aggregate_size, ELFUTILS_0.161) diff --git a/libdw/dwarf_arrayorder.c b/libdw/dwarf_arrayorder.c index 759fa4d..da64f99 100644 --- a/libdw/dwarf_arrayorder.c +++ b/libdw/dwarf_arrayorder.c @@ -36,8 +36,7 @@ int -dwarf_arrayorder (die) - Dwarf_Die *die; +dwarf_arrayorder (Dwarf_Die *die) { Dwarf_Attribute attr_mem; Dwarf_Word value; diff --git a/libdw/dwarf_attr.c b/libdw/dwarf_attr.c index 97b0806..db8acfe 100644 --- a/libdw/dwarf_attr.c +++ b/libdw/dwarf_attr.c @@ -1,5 +1,5 @@ /* Return specific DWARF attribute of a DIE. - Copyright (C) 2003, 2005 Red Hat, Inc. + Copyright (C) 2003, 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -36,10 +36,7 @@ Dwarf_Attribute * -dwarf_attr (die, search_name, result) - Dwarf_Die *die; - unsigned int search_name; - Dwarf_Attribute *result; +dwarf_attr (Dwarf_Die *die, unsigned int search_name, Dwarf_Attribute *result) { if (die == NULL) return NULL; @@ -50,6 +47,6 @@ dwarf_attr (die, search_name, result) /* Always fill in the CU information. */ result->cu = die->cu; - return result->code == search_name ? result : NULL; + return result->valp != NULL && result->code == search_name ? result : NULL; } INTDEF(dwarf_attr) diff --git a/libdw/dwarf_begin.c b/libdw/dwarf_begin.c index 9f3050f..19d16e5 100644 --- a/libdw/dwarf_begin.c +++ b/libdw/dwarf_begin.c @@ -39,9 +39,7 @@ Dwarf * -dwarf_begin (fd, cmd) - int fd; - Dwarf_Cmd cmd; +dwarf_begin (int fd, Dwarf_Cmd cmd) { Elf *elf; Elf_Cmd elfcmd; @@ -75,9 +73,9 @@ dwarf_begin (fd, cmd) if (elf == NULL) { /* Test why the `elf_begin" call failed. */ - struct stat64 st; + struct stat st; - if (fstat64 (fd, &st) == 0 && ! S_ISREG (st.st_mode)) + if (fstat (fd, &st) == 0 && ! S_ISREG (st.st_mode)) __libdw_seterrno (DWARF_E_NO_REGFILE); else if (errno == EBADF) __libdw_seterrno (DWARF_E_INVALID_FILE); diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c index 4c6346a..6f25e42 100644 --- a/libdw/dwarf_begin_elf.c +++ b/libdw/dwarf_begin_elf.c @@ -1,5 +1,5 @@ /* Create descriptor from ELF descriptor for processing file. - Copyright (C) 2002-2011, 2014 Red Hat, Inc. + Copyright (C) 2002-2011, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -44,13 +44,6 @@ #include "libdwP.h" -#if USE_ZLIB -# include -# define crc32 loser_crc32 -# include -# undef crc32 -#endif - /* Section names. */ static const char dwarf_scnnames[IDX_last][18] = @@ -109,7 +102,6 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) /* The section name must be valid. Otherwise is the ELF file invalid. */ err: - __libdw_free_zdata (result); Dwarf_Sig8_Hash_free (&result->sig8_hash); __libdw_seterrno (DWARF_E_INVALID_ELF); free (result); @@ -118,98 +110,60 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) /* Recognize the various sections. Most names start with .debug_. */ size_t cnt; + bool gnu_compressed = false; for (cnt = 0; cnt < ndwarf_scnnames; ++cnt) if (strcmp (scnname, dwarf_scnnames[cnt]) == 0) - { - /* Found it. Remember where the data is. */ - if (unlikely (result->sectiondata[cnt] != NULL)) - /* A section appears twice. That's bad. We ignore the section. */ - break; - - /* Get the section data. */ - Elf_Data *data = elf_getdata (scn, NULL); - if (data != NULL && data->d_size != 0) - /* Yep, there is actually data available. */ - result->sectiondata[cnt] = data; - - break; - } -#if USE_ZLIB + break; else if (scnname[0] == '.' && scnname[1] == 'z' && strcmp (&scnname[2], &dwarf_scnnames[cnt][1]) == 0) { - /* A compressed section. */ - - if (unlikely (result->sectiondata[cnt] != NULL)) - /* A section appears twice. That's bad. We ignore the section. */ - break; - - /* Get the section data. */ - Elf_Data *data = elf_getdata (scn, NULL); - if (data != NULL && data->d_size != 0) - { - /* There is a 12-byte header of "ZLIB" followed by - an 8-byte big-endian size. */ - - if (unlikely (data->d_size < 4 + 8) - || unlikely (memcmp (data->d_buf, "ZLIB", 4) != 0)) - break; - - uint64_t size; - memcpy (&size, data->d_buf + 4, sizeof size); - size = be64toh (size); - - /* Check for unsigned overflow so malloc always allocated - enough memory for both the Elf_Data header and the - uncompressed section data. */ - if (unlikely (sizeof (Elf_Data) + size < size)) - break; - - Elf_Data *zdata = malloc (sizeof (Elf_Data) + size); - if (unlikely (zdata == NULL)) - break; - - zdata->d_buf = &zdata[1]; - zdata->d_type = ELF_T_BYTE; - zdata->d_version = EV_CURRENT; - zdata->d_size = size; - zdata->d_off = 0; - zdata->d_align = 1; - - z_stream z = - { - .next_in = data->d_buf + 4 + 8, - .avail_in = data->d_size - 4 - 8, - .next_out = zdata->d_buf, - .avail_out = zdata->d_size - }; - int zrc = inflateInit (&z); - while (z.avail_in > 0 && likely (zrc == Z_OK)) - { - z.next_out = zdata->d_buf + (zdata->d_size - z.avail_out); - zrc = inflate (&z, Z_FINISH); - if (unlikely (zrc != Z_STREAM_END)) - { - zrc = Z_DATA_ERROR; - break; - } - zrc = inflateReset (&z); - } - if (likely (zrc == Z_OK)) - zrc = inflateEnd (&z); - - if (unlikely (zrc != Z_OK) || unlikely (z.avail_out != 0)) - free (zdata); - else - { - result->sectiondata[cnt] = zdata; - result->sectiondata_gzip_mask |= 1U << cnt; - } - } - - break; + gnu_compressed = true; + break; } -#endif + + if (cnt >= ndwarf_scnnames) + /* Not a debug section; ignore it. */ + return result; + + if (unlikely (result->sectiondata[cnt] != NULL)) + /* A section appears twice. That's bad. We ignore the section. */ + return result; + + /* We cannot know whether or not a GNU compressed section has already + been uncompressed or not, so ignore any errors. */ + if (gnu_compressed) + elf_compress_gnu (scn, 0, 0); + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (elf_compress (scn, 0, 0) < 0) + { + /* If we failed to decompress the section and it's the + debug_info section, then fail with specific error rather + than the generic NO_DWARF. Without debug_info we can't do + anything (see also valid_p()). */ + if (cnt == IDX_debug_info) + { + Dwarf_Sig8_Hash_free (&result->sig8_hash); + __libdw_seterrno (DWARF_E_COMPRESSED_ERROR); + free (result); + return NULL; + } + return result; + } + } + + /* Get the section data. */ + Elf_Data *data = elf_getdata (scn, NULL); + if (data == NULL) + goto err; + + if (data->d_buf == NULL || data->d_size == 0) + /* No data actually available, ignore it. */ + return result; + + /* We can now read the section data into results. */ + result->sectiondata[cnt] = data; return result; } @@ -228,13 +182,33 @@ valid_p (Dwarf *result) if (likely (result != NULL) && unlikely (result->sectiondata[IDX_debug_info] == NULL)) { - __libdw_free_zdata (result); Dwarf_Sig8_Hash_free (&result->sig8_hash); __libdw_seterrno (DWARF_E_NO_DWARF); free (result); result = NULL; } + if (result != NULL && result->sectiondata[IDX_debug_loc] != NULL) + { + result->fake_loc_cu = (Dwarf_CU *) calloc (1, sizeof (Dwarf_CU)); + if (unlikely (result->fake_loc_cu == NULL)) + { + Dwarf_Sig8_Hash_free (&result->sig8_hash); + __libdw_seterrno (DWARF_E_NOMEM); + free (result); + result = NULL; + } + else + { + result->fake_loc_cu->dbg = result; + result->fake_loc_cu->startp + = result->sectiondata[IDX_debug_loc]->d_buf; + result->fake_loc_cu->endp + = (result->sectiondata[IDX_debug_loc]->d_buf + + result->sectiondata[IDX_debug_loc]->d_size); + } + } + return result; } @@ -254,13 +228,31 @@ global_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr) static Dwarf * scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp) { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scngrp, &shdr_mem); + if (shdr == NULL) + { + Dwarf_Sig8_Hash_free (&result->sig8_hash); + __libdw_seterrno (DWARF_E_INVALID_ELF); + free (result); + return NULL; + } + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0 + && elf_compress (scngrp, 0, 0) < 0) + { + Dwarf_Sig8_Hash_free (&result->sig8_hash); + __libdw_seterrno (DWARF_E_COMPRESSED_ERROR); + free (result); + return NULL; + } + /* SCNGRP is the section descriptor for a section group which might contain debug sections. */ Elf_Data *data = elf_getdata (scngrp, NULL); if (data == NULL) { /* We cannot read the section content. Fail! */ - __libdw_free_zdata (result); Dwarf_Sig8_Hash_free (&result->sig8_hash); free (result); return NULL; @@ -277,7 +269,6 @@ scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp) { /* A section group refers to a non-existing section. Should never happen. */ - __libdw_free_zdata (result); Dwarf_Sig8_Hash_free (&result->sig8_hash); __libdw_seterrno (DWARF_E_INVALID_ELF); free (result); @@ -294,10 +285,7 @@ scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp) Dwarf * -dwarf_begin_elf (elf, cmd, scngrp) - Elf *elf; - Dwarf_Cmd cmd; - Elf_Scn *scngrp; +dwarf_begin_elf (Elf *elf, Dwarf_Cmd cmd, Elf_Scn *scngrp) { GElf_Ehdr *ehdr; GElf_Ehdr ehdr_mem; @@ -318,6 +306,7 @@ dwarf_begin_elf (elf, cmd, scngrp) /* Default memory allocation size. */ size_t mem_default_size = sysconf (_SC_PAGESIZE) - 4 * sizeof (void *); + assert (sizeof (struct Dwarf) < mem_default_size); /* Allocate the data structure. */ Dwarf *result = (Dwarf *) calloc (1, sizeof (Dwarf) + mem_default_size); diff --git a/libdw/dwarf_bitoffset.c b/libdw/dwarf_bitoffset.c index 1648ecd..c1a3a34 100644 --- a/libdw/dwarf_bitoffset.c +++ b/libdw/dwarf_bitoffset.c @@ -36,8 +36,7 @@ int -dwarf_bitoffset (die) - Dwarf_Die *die; +dwarf_bitoffset (Dwarf_Die *die) { Dwarf_Attribute attr_mem; Dwarf_Word value; diff --git a/libdw/dwarf_bitsize.c b/libdw/dwarf_bitsize.c index ea9946b..0ed9b71 100644 --- a/libdw/dwarf_bitsize.c +++ b/libdw/dwarf_bitsize.c @@ -36,8 +36,7 @@ int -dwarf_bitsize (die) - Dwarf_Die *die; +dwarf_bitsize (Dwarf_Die *die) { Dwarf_Attribute attr_mem; Dwarf_Word value; diff --git a/libdw/dwarf_bytesize.c b/libdw/dwarf_bytesize.c index 6499a0a..116cd32 100644 --- a/libdw/dwarf_bytesize.c +++ b/libdw/dwarf_bytesize.c @@ -36,8 +36,7 @@ int -dwarf_bytesize (die) - Dwarf_Die *die; +dwarf_bytesize (Dwarf_Die *die) { Dwarf_Attribute attr_mem; Dwarf_Word value; diff --git a/libdw/dwarf_cfi_addrframe.c b/libdw/dwarf_cfi_addrframe.c index 1c0da03..4424027 100644 --- a/libdw/dwarf_cfi_addrframe.c +++ b/libdw/dwarf_cfi_addrframe.c @@ -33,10 +33,7 @@ #include "cfi.h" int -dwarf_cfi_addrframe (cache, address, frame) - Dwarf_CFI *cache; - Dwarf_Addr address; - Dwarf_Frame **frame; +dwarf_cfi_addrframe (Dwarf_CFI *cache, Dwarf_Addr address, Dwarf_Frame **frame) { /* Maybe there was a previous error. */ if (cache == NULL) diff --git a/libdw/dwarf_cfi_end.c b/libdw/dwarf_cfi_end.c index 6eb2ade..d68e2db 100644 --- a/libdw/dwarf_cfi_end.c +++ b/libdw/dwarf_cfi_end.c @@ -35,8 +35,7 @@ #include int -dwarf_cfi_end (cache) - Dwarf_CFI *cache; +dwarf_cfi_end (Dwarf_CFI *cache) { if (cache != NULL) { diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c index 1d3a337..cc95fb3 100644 --- a/libdw/dwarf_child.c +++ b/libdw/dwarf_child.c @@ -1,5 +1,5 @@ /* Return child of current DIE. - Copyright (C) 2003-2011 Red Hat, Inc. + Copyright (C) 2003-2011, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -44,21 +44,11 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, unsigned int *codep, unsigned int *formp) { Dwarf *dbg = die->cu->dbg; - const unsigned char *readp = (unsigned char *) die->addr; - - /* First we have to get the abbreviation code so that we can decode - the data in the DIE. */ - unsigned int abbrev_code; - get_uleb128 (abbrev_code, readp); + const unsigned char *readp; /* Find the abbreviation entry. */ - Dwarf_Abbrev *abbrevp = die->abbrev; - if (abbrevp == NULL) - { - abbrevp = __libdw_findabbrev (die->cu, abbrev_code); - die->abbrev = abbrevp ?: DWARF_END_ABBREV; - } - if (unlikely (die->abbrev == DWARF_END_ABBREV)) + Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, &readp); + if (unlikely (abbrevp == DWARF_END_ABBREV)) { invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); @@ -70,21 +60,19 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, = ((unsigned char *) dbg->sectiondata[IDX_debug_abbrev]->d_buf + dbg->sectiondata[IDX_debug_abbrev]->d_size); - const unsigned char *attrp = die->abbrev->attrp; + const unsigned char *attrp = abbrevp->attrp; while (1) { - /* Are we still in bounds? This test needs to be refined. */ - if (unlikely (attrp + 1 >= endp)) + /* Get attribute name and form. */ + if (unlikely (attrp >= endp)) goto invalid_dwarf; - - /* Get attribute name and form. - - XXX We don't check whether this reads beyond the end of the - section. */ unsigned int attr_name; - get_uleb128 (attr_name, attrp); + get_uleb128 (attr_name, attrp, endp); + + if (unlikely (attrp >= endp)) + goto invalid_dwarf; unsigned int attr_form; - get_uleb128 (attr_form, attrp); + get_uleb128 (attr_form, attrp, endp); /* We can stop if we found the attribute with value zero. */ if (attr_name == 0 && attr_form == 0) @@ -104,15 +92,14 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, /* Skip over the rest of this attribute (if there is any). */ if (attr_form != 0) { - size_t len = __libdw_form_val_len (dbg, die->cu, attr_form, readp); - + size_t len = __libdw_form_val_len (die->cu, attr_form, readp); if (unlikely (len == (size_t) -1l)) { readp = NULL; break; } - // XXX We need better boundary checks. + // __libdw_form_val_len will have done a bounds check. readp += len; } } @@ -128,41 +115,38 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, int -dwarf_child (die, result) - Dwarf_Die *die; - Dwarf_Die *result; +dwarf_child (Dwarf_Die *die, Dwarf_Die *result) { /* Ignore previous errors. */ if (die == NULL) return -1; - /* Skip past the last attribute. */ - void *addr = NULL; - - /* If we already know there are no children do not search. */ - if (die->abbrev != DWARF_END_ABBREV - && (die->abbrev == NULL || die->abbrev->has_children)) - addr = __libdw_find_attr (die, INVALID, NULL, NULL); - if (unlikely (die->abbrev == (Dwarf_Abbrev *) -1l)) - return -1; + /* Find the abbreviation entry. */ + Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL); + if (unlikely (abbrevp == DWARF_END_ABBREV)) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } - /* Make sure the DIE really has children. */ - if (! die->abbrev->has_children) - /* There cannot be any children. */ + /* If there are no children, do not search. */ + if (! abbrevp->has_children) return 1; + /* Skip past the last attribute. */ + void *addr = __libdw_find_attr (die, INVALID, NULL, NULL); + if (addr == NULL) return -1; /* RESULT can be the same as DIE. So preserve what we need. */ struct Dwarf_CU *cu = die->cu; - Elf_Data *cu_sec = cu_data (cu); /* It's kosher (just suboptimal) to have a null entry first thing (7.5.3). So if this starts with ULEB128 of 0 (even with silly encoding of 0), it is a kosher null entry and we do not really have any children. */ const unsigned char *code = addr; - const unsigned char *endp = (cu_sec->d_buf + cu_sec->d_size); + const unsigned char *endp = cu->endp; while (1) { if (unlikely (code >= endp)) /* Truncated section. */ diff --git a/libdw/dwarf_cu_die.c b/libdw/dwarf_cu_die.c index 48f4176..194da58 100644 --- a/libdw/dwarf_cu_die.c +++ b/libdw/dwarf_cu_die.c @@ -35,16 +35,10 @@ Dwarf_Die * -dwarf_cu_die (cu, result, versionp, abbrev_offsetp, address_sizep, - offset_sizep, type_signaturep, type_offsetp) - Dwarf_CU *cu; - Dwarf_Die *result; - Dwarf_Half *versionp; - Dwarf_Off *abbrev_offsetp; - uint8_t *address_sizep; - uint8_t *offset_sizep; - uint64_t *type_signaturep; - Dwarf_Off *type_offsetp; +dwarf_cu_die (Dwarf_CU *cu, Dwarf_Die *result, Dwarf_Half *versionp, + Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep, + uint8_t *offset_sizep, uint64_t *type_signaturep, + Dwarf_Off *type_offsetp) { if (cu == NULL) return NULL; diff --git a/libdw/dwarf_cu_getdwarf.c b/libdw/dwarf_cu_getdwarf.c index f8a2e9b..562460f 100644 --- a/libdw/dwarf_cu_getdwarf.c +++ b/libdw/dwarf_cu_getdwarf.c @@ -36,8 +36,7 @@ Dwarf * -dwarf_cu_getdwarf (cu) - Dwarf_CU *cu; +dwarf_cu_getdwarf (Dwarf_CU *cu) { if (cu == NULL) /* Some error occurred before. */ diff --git a/libdw/dwarf_cuoffset.c b/libdw/dwarf_cuoffset.c index 7aea3f9..ba37648 100644 --- a/libdw/dwarf_cuoffset.c +++ b/libdw/dwarf_cuoffset.c @@ -1,5 +1,5 @@ /* Return offset of DIE in CU. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -36,10 +36,9 @@ Dwarf_Off -dwarf_cuoffset (die) - Dwarf_Die *die; +dwarf_cuoffset (Dwarf_Die *die) { return (die == NULL ? (Dwarf_Off) -1l - : (die->addr - cu_data (die->cu)->d_buf - die->cu->start)); + : (Dwarf_Off) (die->addr - die->cu->startp)); } diff --git a/libdw/dwarf_diecu.c b/libdw/dwarf_diecu.c index bd9a37a..5281c35 100644 --- a/libdw/dwarf_diecu.c +++ b/libdw/dwarf_diecu.c @@ -35,11 +35,8 @@ Dwarf_Die * -dwarf_diecu (die, result, address_sizep, offset_sizep) - Dwarf_Die *die; - Dwarf_Die *result; - uint8_t *address_sizep; - uint8_t *offset_sizep; +dwarf_diecu (Dwarf_Die *die, Dwarf_Die *result, uint8_t *address_sizep, + uint8_t *offset_sizep) { if (die == NULL) return NULL; diff --git a/libdw/dwarf_diename.c b/libdw/dwarf_diename.c index 050d8f1..96450c1 100644 --- a/libdw/dwarf_diename.c +++ b/libdw/dwarf_diename.c @@ -36,8 +36,7 @@ const char * -dwarf_diename (die) - Dwarf_Die *die; +dwarf_diename (Dwarf_Die *die) { Dwarf_Attribute attr_mem; diff --git a/libdw/dwarf_dieoffset.c b/libdw/dwarf_dieoffset.c index c92123c..8028f6d 100644 --- a/libdw/dwarf_dieoffset.c +++ b/libdw/dwarf_dieoffset.c @@ -1,5 +1,5 @@ /* Return offset of DIE. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -36,11 +36,10 @@ Dwarf_Off -dwarf_dieoffset (die) - Dwarf_Die *die; +dwarf_dieoffset (Dwarf_Die *die) { return (die == NULL ? ~0ul - : (Dwarf_Off) (die->addr - cu_data (die->cu)->d_buf)); + : (Dwarf_Off) (die->addr - die->cu->startp + die->cu->start)); } INTDEF(dwarf_dieoffset) diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c index 241a257..6c6d985 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -57,27 +57,8 @@ cu_free (void *arg) } -#if USE_ZLIB -void -internal_function -__libdw_free_zdata (Dwarf *dwarf) -{ - unsigned int gzip_mask = dwarf->sectiondata_gzip_mask; - while (gzip_mask != 0) - { - int i = ffs (gzip_mask); - assert (i > 0); - --i; - assert (i < IDX_last); - free (dwarf->sectiondata[i]); - gzip_mask &= ~(1U << i); - } -} -#endif - int -dwarf_end (dwarf) - Dwarf *dwarf; +dwarf_end (Dwarf *dwarf) { if (dwarf != NULL) { @@ -93,6 +74,12 @@ dwarf_end (dwarf) tdestroy (dwarf->cu_tree, cu_free); tdestroy (dwarf->tu_tree, cu_free); + /* Search tree for macro opcode tables. */ + tdestroy (dwarf->macro_ops, noop_free); + + /* Search tree for decoded .debug_lines units. */ + tdestroy (dwarf->files_lines, noop_free); + struct libdw_memblock *memp = dwarf->mem_tail; /* The first block is allocated together with the Dwarf object. */ while (memp->prev != NULL) @@ -105,12 +92,17 @@ dwarf_end (dwarf) /* Free the pubnames helper structure. */ free (dwarf->pubnames_sets); - __libdw_free_zdata (dwarf); - /* Free the ELF descriptor if necessary. */ if (dwarf->free_elf) elf_end (dwarf->elf); + /* Free the fake location list CU. */ + if (dwarf->fake_loc_cu != NULL) + { + cu_free (dwarf->fake_loc_cu); + free (dwarf->fake_loc_cu); + } + /* Free the context descriptor. */ free (dwarf); } diff --git a/libdw/dwarf_entry_breakpoints.c b/libdw/dwarf_entry_breakpoints.c index ffd5169..c3c0f39 100644 --- a/libdw/dwarf_entry_breakpoints.c +++ b/libdw/dwarf_entry_breakpoints.c @@ -34,56 +34,40 @@ #include -int -dwarf_entry_breakpoints (die, bkpts) - Dwarf_Die *die; - Dwarf_Addr **bkpts; +/* Add one breakpoint location to the result vector. */ +static inline int +add_bkpt (Dwarf_Addr pc, Dwarf_Addr **bkpts, int *pnbkpts) { - int nbkpts = 0; - *bkpts = NULL; - - /* Add one breakpoint location to the result vector. */ - inline int add_bkpt (Dwarf_Addr pc) - { - Dwarf_Addr *newlist = realloc (*bkpts, ++nbkpts * sizeof newlist[0]); - if (newlist == NULL) - { - free (*bkpts); - *bkpts = NULL; - __libdw_seterrno (DWARF_E_NOMEM); - return -1; - } - newlist[nbkpts - 1] = pc; - *bkpts = newlist; - return nbkpts; - } - - /* Fallback result, break at the entrypc/lowpc value. */ - inline int entrypc_bkpt (void) - { - Dwarf_Addr pc; - return INTUSE(dwarf_entrypc) (die, &pc) < 0 ? -1 : add_bkpt (pc); - } - - /* Fetch the CU's line records to look for this DIE's addresses. */ - Dwarf_Die cudie = CUDIE (die->cu); - Dwarf_Lines *lines; - size_t nlines; - if (INTUSE(dwarf_getsrclines) (&cudie, &lines, &nlines) < 0) + Dwarf_Addr *newlist = realloc (*bkpts, ++(*pnbkpts) * sizeof newlist[0]); + if (newlist == NULL) { - int error = INTUSE (dwarf_errno) (); - if (error == 0) /* CU has no DW_AT_stmt_list. */ - return entrypc_bkpt (); - __libdw_seterrno (error); + free (*bkpts); + *bkpts = NULL; + __libdw_seterrno (DWARF_E_NOMEM); return -1; } + newlist[*pnbkpts - 1] = pc; + *bkpts = newlist; + return *pnbkpts; +} - /* Search a contiguous PC range for prologue-end markers. - If DWARF, look for proper markers. - Failing that, if ADHOC, look for the ad hoc convention. */ - inline int search_range (Dwarf_Addr low, Dwarf_Addr high, - bool dwarf, bool adhoc) - { +/* Fallback result, break at the entrypc/lowpc value. */ +static inline int +entrypc_bkpt (Dwarf_Die *die, Dwarf_Addr **bkpts, int *pnbkpts) +{ + Dwarf_Addr pc; + return INTUSE(dwarf_entrypc) (die, &pc) < 0 ? -1 : add_bkpt (pc, bkpts, pnbkpts); +} + +/* Search a contiguous PC range for prologue-end markers. + If DWARF, look for proper markers. + Failing that, if ADHOC, look for the ad hoc convention. */ +static inline int +search_range (Dwarf_Addr low, Dwarf_Addr high, + bool dwarf, bool adhoc, + Dwarf_Lines *lines, size_t nlines, + Dwarf_Addr **bkpts, int *pnbkpts) +{ size_t l = 0, u = nlines; while (l < u) { @@ -105,16 +89,35 @@ dwarf_entry_breakpoints (die, bkpts) if (dwarf) for (size_t i = l; i < u && lines->info[i].addr < high; ++i) if (lines->info[i].prologue_end - && add_bkpt (lines->info[i].addr) < 0) + && add_bkpt (lines->info[i].addr, bkpts, pnbkpts) < 0) return -1; - if (adhoc && nbkpts == 0) + if (adhoc && *pnbkpts == 0) while (++l < nlines && lines->info[l].addr < high) if (!lines->info[l].end_sequence) - return add_bkpt (lines->info[l].addr); - return nbkpts; + return add_bkpt (lines->info[l].addr, bkpts, pnbkpts); + return *pnbkpts; } __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1; +} + +int +dwarf_entry_breakpoints (Dwarf_Die *die, Dwarf_Addr **bkpts) +{ + int nbkpts = 0; + *bkpts = NULL; + + /* Fetch the CU's line records to look for this DIE's addresses. */ + Dwarf_Die cudie = CUDIE (die->cu); + Dwarf_Lines *lines; + size_t nlines; + if (INTUSE(dwarf_getsrclines) (&cudie, &lines, &nlines) < 0) + { + int error = INTUSE (dwarf_errno) (); + if (error == 0) /* CU has no DW_AT_stmt_list. */ + return entrypc_bkpt (die, bkpts, &nbkpts); + __libdw_seterrno (error); + return -1; } /* Search each contiguous address range for DWARF prologue_end markers. */ @@ -128,14 +131,16 @@ dwarf_entry_breakpoints (die, bkpts) /* Most often there is a single contiguous PC range for the DIE. */ if (offset == 1) - return search_range (begin, end, true, true) ?: entrypc_bkpt (); + return search_range (begin, end, true, true, lines, nlines, bkpts, &nbkpts) + ?: entrypc_bkpt (die, bkpts, &nbkpts); Dwarf_Addr lowpc = (Dwarf_Addr) -1l; Dwarf_Addr highpc = (Dwarf_Addr) -1l; while (offset > 0) { /* We have an address range entry. */ - if (search_range (begin, end, true, false) < 0) + if (search_range (begin, end, true, false, + lines, nlines, bkpts, &nbkpts) < 0) return -1; if (begin < lowpc) @@ -152,6 +157,7 @@ dwarf_entry_breakpoints (die, bkpts) fall back to just using the entrypc value. */ return (nbkpts ?: (lowpc == (Dwarf_Addr) -1l ? 0 - : search_range (lowpc, highpc, false, true)) - ?: entrypc_bkpt ()); + : search_range (lowpc, highpc, false, true, + lines, nlines, bkpts, &nbkpts)) + ?: entrypc_bkpt (die, bkpts, &nbkpts)); } diff --git a/libdw/dwarf_entrypc.c b/libdw/dwarf_entrypc.c index 8eb39db..0ef3b0e 100644 --- a/libdw/dwarf_entrypc.c +++ b/libdw/dwarf_entrypc.c @@ -35,9 +35,7 @@ int -dwarf_entrypc (die, return_addr) - Dwarf_Die *die; - Dwarf_Addr *return_addr; +dwarf_entrypc (Dwarf_Die *die, Dwarf_Addr *return_addr) { Dwarf_Attribute attr_mem; diff --git a/libdw/dwarf_error.c b/libdw/dwarf_error.c index 2292914..66fdc81 100644 --- a/libdw/dwarf_error.c +++ b/libdw/dwarf_error.c @@ -1,5 +1,5 @@ /* Retrieve ELF descriptor used for DWARF access. - Copyright (C) 2002, 2003, 2004, 2005, 2009 Red Hat, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -62,6 +62,7 @@ static const char *errmsgs[] = [DWARF_E_IO_ERROR] = N_("I/O error"), [DWARF_E_INVALID_ELF] = N_("invalid ELF file"), [DWARF_E_NO_DWARF] = N_("no DWARF information"), + [DWARF_E_COMPRESSED_ERROR] = N_("cannot decompress DWARF"), [DWARF_E_NOELF] = N_("no ELF file"), [DWARF_E_GETEHDR_ERROR] = N_("cannot get ELF header"), [DWARF_E_NOMEM] = N_("out of memory"), @@ -92,13 +93,15 @@ static const char *errmsgs[] = [DWARF_E_NO_DEBUG_RANGES] = N_(".debug_ranges section missing"), [DWARF_E_INVALID_CFI] = N_("invalid CFI section"), [DWARF_E_NO_ALT_DEBUGLINK] = N_("no alternative debug link found"), + [DWARF_E_INVALID_OPCODE] = N_("invalid opcode"), + [DWARF_E_NOT_CUDIE] = N_("not a CU (unit) DIE"), }; #define nerrmsgs (sizeof (errmsgs) / sizeof (errmsgs[0])) void -__libdw_seterrno (value) - int value; +internal_function +__libdw_seterrno (int value) { global_error = (value >= 0 && value < (int) nerrmsgs ? value : DWARF_E_UNKNOWN_ERROR); @@ -106,8 +109,7 @@ __libdw_seterrno (value) const char * -dwarf_errmsg (error) - int error; +dwarf_errmsg (int error) { int last_error = global_error; diff --git a/libdw/dwarf_formaddr.c b/libdw/dwarf_formaddr.c index 9d4a388..ddc4838 100644 --- a/libdw/dwarf_formaddr.c +++ b/libdw/dwarf_formaddr.c @@ -36,9 +36,7 @@ int -dwarf_formaddr (attr, return_addr) - Dwarf_Attribute *attr; - Dwarf_Addr *return_addr; +dwarf_formaddr (Dwarf_Attribute *attr, Dwarf_Addr *return_addr) { if (attr == NULL) return -1; diff --git a/libdw/dwarf_formblock.c b/libdw/dwarf_formblock.c index 799d877..13f9e72 100644 --- a/libdw/dwarf_formblock.c +++ b/libdw/dwarf_formblock.c @@ -1,5 +1,5 @@ /* Return block represented by attribute. - Copyright (C) 2004-2010 Red Hat, Inc. + Copyright (C) 2004-2010, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -36,36 +36,42 @@ int -dwarf_formblock (attr, return_block) - Dwarf_Attribute *attr; - Dwarf_Block *return_block; +dwarf_formblock (Dwarf_Attribute *attr, Dwarf_Block *return_block) { if (attr == NULL) return -1; - const unsigned char *datap; + const unsigned char *datap = attr->valp; + const unsigned char *endp = attr->cu->endp; switch (attr->form) { case DW_FORM_block1: + if (unlikely (endp - datap < 1)) + goto invalid; return_block->length = *(uint8_t *) attr->valp; return_block->data = attr->valp + 1; break; case DW_FORM_block2: + if (unlikely (endp - datap < 2)) + goto invalid; return_block->length = read_2ubyte_unaligned (attr->cu->dbg, attr->valp); return_block->data = attr->valp + 2; break; case DW_FORM_block4: + if (unlikely (endp - datap < 4)) + goto invalid; return_block->length = read_4ubyte_unaligned (attr->cu->dbg, attr->valp); return_block->data = attr->valp + 4; break; case DW_FORM_block: case DW_FORM_exprloc: - datap = attr->valp; - get_uleb128 (return_block->length, datap); + if (unlikely (endp - datap < 1)) + goto invalid; + get_uleb128 (return_block->length, datap, endp); return_block->data = (unsigned char *) datap; break; @@ -74,12 +80,10 @@ dwarf_formblock (attr, return_block) return -1; } - if (unlikely (cu_data (attr->cu)->d_size - - (return_block->data - - (unsigned char *) cu_data (attr->cu)->d_buf) - < return_block->length)) + if (unlikely (return_block->length > (size_t) (endp - return_block->data))) { /* Block does not fit. */ + invalid: __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1; } diff --git a/libdw/dwarf_formflag.c b/libdw/dwarf_formflag.c index bdc2267..b48ede4 100644 --- a/libdw/dwarf_formflag.c +++ b/libdw/dwarf_formflag.c @@ -36,9 +36,7 @@ int -dwarf_formflag (attr, return_bool) - Dwarf_Attribute *attr; - bool *return_bool; +dwarf_formflag (Dwarf_Attribute *attr, bool *return_bool) { if (attr == NULL) return -1; diff --git a/libdw/dwarf_formref.c b/libdw/dwarf_formref.c index 86da7ea..2240a25 100644 --- a/libdw/dwarf_formref.c +++ b/libdw/dwarf_formref.c @@ -1,5 +1,5 @@ /* Return reference offset represented by attribute. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -35,11 +35,11 @@ #include "libdwP.h" int -__libdw_formref (attr, return_offset) - Dwarf_Attribute *attr; - Dwarf_Off *return_offset; +internal_function +__libdw_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset) { - const unsigned char *datap; + const unsigned char *datap = attr->valp; + const unsigned char *endp = attr->cu->endp; if (attr->valp == NULL) { @@ -50,24 +50,37 @@ __libdw_formref (attr, return_offset) switch (attr->form) { case DW_FORM_ref1: + if (datap + 1 > endp) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } *return_offset = *attr->valp; break; case DW_FORM_ref2: + if (datap + 2 > endp) + goto invalid; *return_offset = read_2ubyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_ref4: + if (datap + 4 > endp) + goto invalid; *return_offset = read_4ubyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_ref8: + if (datap + 8 > endp) + goto invalid; *return_offset = read_8ubyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_ref_udata: - datap = attr->valp; - get_uleb128 (*return_offset, datap); + if (datap + 1 > endp) + goto invalid; + get_uleb128 (*return_offset, datap, endp); break; case DW_FORM_ref_addr: @@ -88,9 +101,7 @@ __libdw_formref (attr, return_offset) /* This is the old public entry point. It is now deprecated in favor of dwarf_formref_die. */ int -dwarf_formref (attr, return_offset) - Dwarf_Attribute *attr; - Dwarf_Off *return_offset; +dwarf_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset) { if (attr == NULL) return -1; diff --git a/libdw/dwarf_formref_die.c b/libdw/dwarf_formref_die.c index b54e216..7e2b11a 100644 --- a/libdw/dwarf_formref_die.c +++ b/libdw/dwarf_formref_die.c @@ -36,9 +36,7 @@ Dwarf_Die * -dwarf_formref_die (attr, result) - Dwarf_Attribute *attr; - Dwarf_Die *result; +dwarf_formref_die (Dwarf_Attribute *attr, Dwarf_Die *result) { if (attr == NULL) return NULL; @@ -70,7 +68,8 @@ dwarf_formref_die (attr, result) return INTUSE(dwarf_offdie) (dbg_ret, offset, result); } - Elf_Data *data; + const unsigned char *datap; + size_t size; if (attr->form == DW_FORM_ref_sig8) { /* This doesn't have an offset, but instead a value we @@ -92,8 +91,9 @@ dwarf_formref_die (attr, result) } while (cu->type_sig8 != sig); - data = cu->dbg->sectiondata[IDX_debug_types]; - offset = cu->type_offset; + datap = cu->dbg->sectiondata[IDX_debug_types]->d_buf; + size = cu->dbg->sectiondata[IDX_debug_types]->d_size; + offset = cu->start + cu->type_offset; } else { @@ -101,17 +101,18 @@ dwarf_formref_die (attr, result) if (unlikely (__libdw_formref (attr, &offset) != 0)) return NULL; - data = cu_data (cu); + datap = cu->startp; + size = cu->endp - cu->startp; } - if (unlikely (data->d_size - cu->start <= offset)) + if (unlikely (offset >= size)) { __libdw_seterrno (DWARF_E_INVALID_DWARF); return NULL; } memset (result, '\0', sizeof (Dwarf_Die)); - result->addr = (char *) data->d_buf + cu->start + offset; + result->addr = (char *) datap + offset; result->cu = cu; return result; } diff --git a/libdw/dwarf_formsdata.c b/libdw/dwarf_formsdata.c index 8562198..e7deaee 100644 --- a/libdw/dwarf_formsdata.c +++ b/libdw/dwarf_formsdata.c @@ -1,5 +1,5 @@ /* Return signed constant represented by attribute. - Copyright (C) 2003, 2005 Red Hat, Inc. + Copyright (C) 2003, 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -36,41 +36,54 @@ int -dwarf_formsdata (attr, return_sval) - Dwarf_Attribute *attr; - Dwarf_Sword *return_sval; +dwarf_formsdata (Dwarf_Attribute *attr, Dwarf_Sword *return_sval) { if (attr == NULL) return -1; - const unsigned char *datap; + const unsigned char *datap = attr->valp; + const unsigned char *endp = attr->cu->endp; switch (attr->form) { case DW_FORM_data1: + if (datap + 1 > endp) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } *return_sval = *attr->valp; break; case DW_FORM_data2: + if (datap + 2 > endp) + goto invalid; *return_sval = read_2ubyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_data4: + if (datap + 4 > endp) + goto invalid; *return_sval = read_4ubyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_data8: + if (datap + 8 > endp) + goto invalid; *return_sval = read_8ubyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_sdata: - datap = attr->valp; - get_sleb128 (*return_sval, datap); + if (datap + 1 > endp) + goto invalid; + get_sleb128 (*return_sval, datap, endp); break; case DW_FORM_udata: - datap = attr->valp; - get_uleb128 (*return_sval, datap); + if (datap + 1 > endp) + goto invalid; + get_uleb128 (*return_sval, datap, endp); break; default: diff --git a/libdw/dwarf_formstring.c b/libdw/dwarf_formstring.c index 02b56d4..83abd53 100644 --- a/libdw/dwarf_formstring.c +++ b/libdw/dwarf_formstring.c @@ -36,8 +36,7 @@ const char * -dwarf_formstring (attrp) - Dwarf_Attribute *attrp; +dwarf_formstring (Dwarf_Attribute *attrp) { /* Ignore earlier errors. */ if (attrp == NULL) diff --git a/libdw/dwarf_formudata.c b/libdw/dwarf_formudata.c index 41b09e1..e41981a 100644 --- a/libdw/dwarf_formudata.c +++ b/libdw/dwarf_formudata.c @@ -1,5 +1,5 @@ /* Return unsigned constant represented by attribute. - Copyright (C) 2003-2012 Red Hat, Inc. + Copyright (C) 2003-2012, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -94,22 +94,29 @@ __libdw_formptr (Dwarf_Attribute *attr, int sec_index, } int -dwarf_formudata (attr, return_uval) - Dwarf_Attribute *attr; - Dwarf_Word *return_uval; +dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) { if (attr == NULL) return -1; - const unsigned char *datap; + const unsigned char *datap = attr->valp; + const unsigned char *endp = attr->cu->endp; switch (attr->form) { case DW_FORM_data1: + if (datap + 1 > endp) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } *return_uval = *attr->valp; break; case DW_FORM_data2: + if (datap + 2 > endp) + goto invalid; *return_uval = read_2ubyte_unaligned (attr->cu->dbg, attr->valp); break; @@ -203,13 +210,15 @@ dwarf_formudata (attr, return_uval) break; case DW_FORM_sdata: - datap = attr->valp; - get_sleb128 (*return_uval, datap); + if (datap + 1 > endp) + goto invalid; + get_sleb128 (*return_uval, datap, endp); break; case DW_FORM_udata: - datap = attr->valp; - get_uleb128 (*return_uval, datap); + if (datap + 1 > endp) + goto invalid; + get_uleb128 (*return_uval, datap, endp); break; default: diff --git a/libdw/dwarf_frame_cfa.c b/libdw/dwarf_frame_cfa.c index a9ae7e7..07f998c 100644 --- a/libdw/dwarf_frame_cfa.c +++ b/libdw/dwarf_frame_cfa.c @@ -35,10 +35,7 @@ #include int -dwarf_frame_cfa (fs, ops, nops) - Dwarf_Frame *fs; - Dwarf_Op **ops; - size_t *nops; +dwarf_frame_cfa (Dwarf_Frame *fs, Dwarf_Op **ops, size_t *nops) { /* Maybe there was a previous error. */ if (fs == NULL) diff --git a/libdw/dwarf_frame_info.c b/libdw/dwarf_frame_info.c index 7da46fb..9ba560f 100644 --- a/libdw/dwarf_frame_info.c +++ b/libdw/dwarf_frame_info.c @@ -33,11 +33,8 @@ #include "cfi.h" int -dwarf_frame_info (fs, start, end, signalp) - Dwarf_Frame *fs; - Dwarf_Addr *start; - Dwarf_Addr *end; - bool *signalp; +dwarf_frame_info (Dwarf_Frame *fs, Dwarf_Addr *start, Dwarf_Addr *end, + bool *signalp) { /* Maybe there was a previous error. */ if (fs == NULL) diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c index 2bc5ff1..37e8e91 100644 --- a/libdw/dwarf_frame_register.c +++ b/libdw/dwarf_frame_register.c @@ -1,5 +1,5 @@ /* Get register location expression for frame. - Copyright (C) 2009-2010 Red Hat, Inc. + Copyright (C) 2009-2010, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -34,12 +34,8 @@ #include int -dwarf_frame_register (fs, regno, ops_mem, ops, nops) - Dwarf_Frame *fs; - int regno; - Dwarf_Op ops_mem[3]; - Dwarf_Op **ops; - size_t *nops; +dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem, + Dwarf_Op **ops, size_t *nops) { /* Maybe there was a previous error. */ if (fs == NULL) @@ -102,7 +98,9 @@ dwarf_frame_register (fs, regno, ops_mem, ops, nops) Dwarf_Block block; const uint8_t *p = fs->cache->data->d.d_buf + reg->value; - get_uleb128 (block.length, p); + const uint8_t *end = (fs->cache->data->d.d_buf + + fs->cache->data->d.d_size); + get_uleb128 (block.length, p, end); block.data = (void *) p; /* Parse the expression into internal form. */ diff --git a/libdw/dwarf_func_inline.c b/libdw/dwarf_func_inline.c index bc9db1c..1f04adf 100644 --- a/libdw/dwarf_func_inline.c +++ b/libdw/dwarf_func_inline.c @@ -1,5 +1,5 @@ /* Convenience functions for handling DWARF descriptions of inline functions. - Copyright (C) 2005,2006 Red Hat, Inc. + Copyright (C) 2005,2006,2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -97,5 +97,5 @@ dwarf_func_inline_instances (Dwarf_Die *func, { struct visitor_info v = { func->addr, callback, arg }; struct Dwarf_Die_Chain cu = { .die = CUDIE (func->cu), .parent = NULL }; - return __libdw_visit_scopes (0, &cu, &scope_visitor, NULL, &v); + return __libdw_visit_scopes (0, &cu, NULL, &scope_visitor, NULL, &v); } diff --git a/libdw/dwarf_getabbrev.c b/libdw/dwarf_getabbrev.c index 87d89c1..ef51b84 100644 --- a/libdw/dwarf_getabbrev.c +++ b/libdw/dwarf_getabbrev.c @@ -1,5 +1,5 @@ /* Get abbreviation at given offset. - Copyright (C) 2003, 2004, 2005, 2006 Red Hat, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -31,19 +31,14 @@ # include #endif -#include #include #include "libdwP.h" Dwarf_Abbrev * internal_function -__libdw_getabbrev (dbg, cu, offset, lengthp, result) - Dwarf *dbg; - struct Dwarf_CU *cu; - Dwarf_Off offset; - size_t *lengthp; - Dwarf_Abbrev *result; +__libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset, + size_t *lengthp, Dwarf_Abbrev *result) { /* Don't fail if there is not .debug_abbrev section. */ if (dbg->sectiondata[IDX_debug_abbrev] == NULL) @@ -78,9 +73,11 @@ __libdw_getabbrev (dbg, cu, offset, lengthp, result) consists of two parts. The first part is an unsigned LEB128 number representing the attribute's name. The second part is an unsigned LEB128 number representing the attribute's form. */ + const unsigned char *end = (dbg->sectiondata[IDX_debug_abbrev]->d_buf + + dbg->sectiondata[IDX_debug_abbrev]->d_size); const unsigned char *start_abbrevp = abbrevp; unsigned int code; - get_uleb128 (code, abbrevp); + get_uleb128 (code, abbrevp, end); /* Check whether this code is already in the hash table. */ bool foundit = false; @@ -97,7 +94,14 @@ __libdw_getabbrev (dbg, cu, offset, lengthp, result) { foundit = true; - assert (abb->offset == offset); + if (unlikely (abb->offset != offset)) + { + /* A duplicate abbrev code at a different offset, + that should never happen. */ + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return NULL; + } /* If the caller doesn't need the length we are done. */ if (lengthp == NULL) @@ -108,7 +112,11 @@ __libdw_getabbrev (dbg, cu, offset, lengthp, result) overwrite its content. This must not be a problem, since the content better be the same. */ abb->code = code; - get_uleb128 (abb->tag, abbrevp); + if (abbrevp >= end) + goto invalid; + get_uleb128 (abb->tag, abbrevp, end); + if (abbrevp + 1 >= end) + goto invalid; abb->has_children = *abbrevp++ == DW_CHILDREN_yes; abb->attrp = (unsigned char *) abbrevp; abb->offset = offset; @@ -119,8 +127,12 @@ __libdw_getabbrev (dbg, cu, offset, lengthp, result) unsigned int attrform; do { - get_uleb128 (attrname, abbrevp); - get_uleb128 (attrform, abbrevp); + if (abbrevp >= end) + goto invalid; + get_uleb128 (attrname, abbrevp, end); + if (abbrevp >= end) + goto invalid; + get_uleb128 (attrform, abbrevp, end); } while (attrname != 0 && attrform != 0 && ++abb->attrcnt); @@ -138,10 +150,7 @@ __libdw_getabbrev (dbg, cu, offset, lengthp, result) Dwarf_Abbrev * -dwarf_getabbrev (die, offset, lengthp) - Dwarf_Die *die; - Dwarf_Off offset; - size_t *lengthp; +dwarf_getabbrev (Dwarf_Die *die, Dwarf_Off offset, size_t *lengthp) { return __libdw_getabbrev (die->cu->dbg, die->cu, die->cu->orig_abbrev_offset + offset, lengthp, diff --git a/libdw/dwarf_getabbrevattr.c b/libdw/dwarf_getabbrevattr.c index 64668fe..3b4da99 100644 --- a/libdw/dwarf_getabbrevattr.c +++ b/libdw/dwarf_getabbrevattr.c @@ -1,5 +1,5 @@ /* Get specific attribute of abbreviation. - Copyright (C) 2003, 2004, 2005 Red Hat, Inc. + Copyright (C) 2003, 2004, 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -37,12 +37,8 @@ int -dwarf_getabbrevattr (abbrev, idx, namep, formp, offsetp) - Dwarf_Abbrev *abbrev; - size_t idx; - unsigned int *namep; - unsigned int *formp; - Dwarf_Off *offsetp; +dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, + unsigned int *formp, Dwarf_Off *offsetp) { if (abbrev == NULL) return -1; @@ -57,9 +53,10 @@ dwarf_getabbrevattr (abbrev, idx, namep, formp, offsetp) { start_attrp = attrp; - /* Attribute code and form are encoded as ULEB128 values. */ - get_uleb128 (name, attrp); - get_uleb128 (form, attrp); + /* Attribute code and form are encoded as ULEB128 values.i + XXX We have no way to bounds check. */ + get_uleb128 (name, attrp, attrp + len_leb128 (name)); + get_uleb128 (form, attrp, attrp + len_leb128 (form)); /* If both values are zero the index is out of range. */ if (name == 0 && form == 0) diff --git a/libdw/dwarf_getabbrevcode.c b/libdw/dwarf_getabbrevcode.c index 0df9064..8691708 100644 --- a/libdw/dwarf_getabbrevcode.c +++ b/libdw/dwarf_getabbrevcode.c @@ -37,8 +37,7 @@ unsigned int -dwarf_getabbrevcode (abbrev) - Dwarf_Abbrev *abbrev; +dwarf_getabbrevcode (Dwarf_Abbrev *abbrev) { return abbrev == NULL ? 0 : abbrev->code; } diff --git a/libdw/dwarf_getabbrevtag.c b/libdw/dwarf_getabbrevtag.c index 36a5262..52aaa3f 100644 --- a/libdw/dwarf_getabbrevtag.c +++ b/libdw/dwarf_getabbrevtag.c @@ -37,8 +37,7 @@ unsigned int -dwarf_getabbrevtag (abbrev) - Dwarf_Abbrev *abbrev; +dwarf_getabbrevtag (Dwarf_Abbrev *abbrev) { return abbrev == NULL ? 0 : abbrev->tag; } diff --git a/libdw/dwarf_getarange_addr.c b/libdw/dwarf_getarange_addr.c index fc143de..d383e22 100644 --- a/libdw/dwarf_getarange_addr.c +++ b/libdw/dwarf_getarange_addr.c @@ -35,9 +35,7 @@ Dwarf_Arange * -dwarf_getarange_addr (aranges, addr) - Dwarf_Aranges *aranges; - Dwarf_Addr addr; +dwarf_getarange_addr (Dwarf_Aranges *aranges, Dwarf_Addr addr) { if (aranges == NULL) return NULL; diff --git a/libdw/dwarf_getaranges.c b/libdw/dwarf_getaranges.c index 20ac7ec..4252746 100644 --- a/libdw/dwarf_getaranges.c +++ b/libdw/dwarf_getaranges.c @@ -48,14 +48,13 @@ compare_aranges (const void *a, const void *b) { struct arangelist *const *p1 = a, *const *p2 = b; struct arangelist *l1 = *p1, *l2 = *p2; - return l1->arange.addr - l2->arange.addr; + if (l1->arange.addr != l2->arange.addr) + return (l1->arange.addr < l2->arange.addr) ? -1 : 1; + return 0; } int -dwarf_getaranges (dbg, aranges, naranges) - Dwarf *dbg; - Dwarf_Aranges **aranges; - size_t *naranges; +dwarf_getaranges (Dwarf *dbg, Dwarf_Aranges **aranges, size_t *naranges) { if (dbg == NULL) return -1; @@ -108,10 +107,16 @@ dwarf_getaranges (dbg, aranges, naranges) 5. A 1-byte unsigned integer containing the size in bytes of a segment descriptor on the target system. */ + if (unlikely (readp + 4 > readendp)) + goto invalid; + Dwarf_Word length = read_4ubyte_unaligned_inc (dbg, readp); unsigned int length_bytes = 4; if (length == DWARF3_LENGTH_64_BIT) { + if (unlikely (readp + 8 > readendp)) + goto invalid; + length = read_8ubyte_unaligned_inc (dbg, readp); length_bytes = 8; } @@ -119,6 +124,9 @@ dwarf_getaranges (dbg, aranges, naranges) && length <= DWARF3_LENGTH_MAX_ESCAPE_CODE)) goto invalid; + if (unlikely (readp + 2 > readendp)) + goto invalid; + unsigned int version = read_2ubyte_unaligned_inc (dbg, readp); if (version != 2) { @@ -134,14 +142,14 @@ dwarf_getaranges (dbg, aranges, naranges) return -1; } - Dwarf_Word offset; + Dwarf_Word offset = 0; if (__libdw_read_offset_inc (dbg, IDX_debug_aranges, &readp, length_bytes, &offset, IDX_debug_info, 4)) goto fail; unsigned int address_size = *readp++; - if (address_size != 4 && address_size != 8) + if (unlikely (address_size != 4 && address_size != 8)) goto invalid; /* We don't actually support segment selectors. */ @@ -162,6 +170,9 @@ dwarf_getaranges (dbg, aranges, naranges) address_size, &range_address)) goto fail; + if (readp + address_size > readendp) + goto invalid; + if (address_size == 4) range_length = read_4ubyte_unaligned_inc (dbg, readp); else diff --git a/libdw/dwarf_getattrcnt.c b/libdw/dwarf_getattrcnt.c index 72be766..2bfb4ac 100644 --- a/libdw/dwarf_getattrcnt.c +++ b/libdw/dwarf_getattrcnt.c @@ -35,9 +35,7 @@ int -dwarf_getattrcnt (abbrev, attrcntp) - Dwarf_Abbrev *abbrev; - size_t *attrcntp; +dwarf_getattrcnt (Dwarf_Abbrev *abbrev, size_t *attrcntp) { if (abbrev == NULL) return -1; diff --git a/libdw/dwarf_getattrs.c b/libdw/dwarf_getattrs.c index 82eb3f8..0da8b5b 100644 --- a/libdw/dwarf_getattrs.c +++ b/libdw/dwarf_getattrs.c @@ -1,5 +1,5 @@ /* Get attributes of the DIE. - Copyright (C) 2004, 2005, 2008, 2009 Red Hat, Inc. + Copyright (C) 2004, 2005, 2008, 2009, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -44,17 +44,12 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), if (unlikely (offset == 1)) return 1; - const unsigned char *die_addr = die->addr; + const unsigned char *die_addr; - /* Get the abbreviation code. */ - unsigned int u128; - get_uleb128 (u128, die_addr); + /* Find the abbreviation entry. */ + Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, &die_addr); - if (die->abbrev == NULL) - /* Find the abbreviation. */ - die->abbrev = __libdw_findabbrev (die->cu, u128); - - if (unlikely (die->abbrev == DWARF_END_ABBREV)) + if (unlikely (abbrevp == DWARF_END_ABBREV)) { invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); @@ -62,26 +57,28 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), } /* This is where the attributes start. */ - const unsigned char *attrp = die->abbrev->attrp; - const unsigned char *const offset_attrp = die->abbrev->attrp + offset; + const unsigned char *attrp = abbrevp->attrp; + const unsigned char *const offset_attrp = abbrevp->attrp + offset; /* Go over the list of attributes. */ Dwarf *dbg = die->cu->dbg; + const unsigned char *endp; + endp = ((const unsigned char *) dbg->sectiondata[IDX_debug_abbrev]->d_buf + + dbg->sectiondata[IDX_debug_abbrev]->d_size); while (1) { /* Are we still in bounds? */ - if (unlikely (attrp - >= ((unsigned char *) dbg->sectiondata[IDX_debug_abbrev]->d_buf - + dbg->sectiondata[IDX_debug_abbrev]->d_size))) + if (unlikely (attrp >= endp)) goto invalid_dwarf; /* Get attribute name and form. */ Dwarf_Attribute attr; const unsigned char *remembered_attrp = attrp; - // XXX Fix bound checks - get_uleb128 (attr.code, attrp); - get_uleb128 (attr.form, attrp); + get_uleb128 (attr.code, attrp, endp); + if (unlikely (attrp >= endp)) + goto invalid_dwarf; + get_uleb128 (attr.form, attrp, endp); /* We can stop if we found the attribute with value zero. */ if (attr.code == 0 && attr.form == 0) @@ -104,20 +101,18 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), /* Return the offset of the start of the attribute, so that dwarf_getattrs() can be restarted from this point if the caller so desires. */ - return remembered_attrp - die->abbrev->attrp; + return remembered_attrp - abbrevp->attrp; } /* Skip over the rest of this attribute (if there is any). */ if (attr.form != 0) { - size_t len = __libdw_form_val_len (dbg, die->cu, attr.form, - die_addr); - + size_t len = __libdw_form_val_len (die->cu, attr.form, die_addr); if (unlikely (len == (size_t) -1l)) /* Something wrong with the file. */ return -1l; - // XXX We need better boundary checks. + // __libdw_form_val_len will have done a bounds check. die_addr += len; } } diff --git a/libdw/dwarf_getcfi.c b/libdw/dwarf_getcfi.c index a49a9f0..9aed403 100644 --- a/libdw/dwarf_getcfi.c +++ b/libdw/dwarf_getcfi.c @@ -35,8 +35,7 @@ #include Dwarf_CFI * -dwarf_getcfi (dbg) - Dwarf *dbg; +dwarf_getcfi (Dwarf *dbg) { if (dbg == NULL) return NULL; diff --git a/libdw/dwarf_getcfi_elf.c b/libdw/dwarf_getcfi_elf.c index a423ef3..315cc02 100644 --- a/libdw/dwarf_getcfi_elf.c +++ b/libdw/dwarf_getcfi_elf.c @@ -1,5 +1,5 @@ /* Get CFI from ELF file's exception-handling info. - Copyright (C) 2009-2010 Red Hat, Inc. + Copyright (C) 2009-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -76,7 +76,7 @@ parse_eh_frame_hdr (const uint8_t *hdr, size_t hdr_size, GElf_Addr hdr_vaddr, { const uint8_t *h = hdr; - if (*h++ != 1) /* version */ + if (hdr_size < 4 || *h++ != 1) /* version */ return (void *) -1l; uint8_t eh_frame_ptr_encoding = *h++; @@ -125,29 +125,34 @@ parse_eh_frame_hdr (const uint8_t *hdr, size_t hdr_size, GElf_Addr hdr_vaddr, static Dwarf_CFI * getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) { - if (unlikely (phdr->p_filesz < 4)) - goto invalid; - Elf_Data *data = elf_getdata_rawchunk (elf, phdr->p_offset, phdr->p_filesz, ELF_T_BYTE); - if (data == NULL) + if (data == NULL || data->d_buf == NULL) { invalid_hdr: - invalid: /* XXX might be read error or corrupt phdr */ __libdw_seterrno (DWARF_E_INVALID_CFI); return NULL; } + size_t vsize, dmax; Dwarf_Addr eh_frame_ptr; - size_t search_table_entries; - uint8_t search_table_encoding; + size_t search_table_entries = 0; + uint8_t search_table_encoding = 0; const uint8_t *search_table = parse_eh_frame_hdr (data->d_buf, phdr->p_filesz, phdr->p_vaddr, ehdr, &eh_frame_ptr, &search_table_entries, &search_table_encoding); - if (search_table == (void *) -1l) + + /* Make sure there is enough room for the entries in the table, + each entry consists of 2 encoded values. */ + vsize = encoded_value_size (data, ehdr->e_ident, search_table_encoding, + NULL); + dmax = phdr->p_filesz - (search_table - (const uint8_t *) data->d_buf); + if (unlikely (search_table == (void *) -1l + || vsize == 0 + || search_table_entries > (dmax / vsize) / 2)) goto invalid_hdr; Dwarf_Off eh_frame_offset = eh_frame_ptr - phdr->p_vaddr + phdr->p_offset; @@ -175,6 +180,7 @@ getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) if (search_table != NULL) { cfi->search_table = search_table; + cfi->search_table_len = phdr->p_filesz; cfi->search_table_vaddr = phdr->p_vaddr; cfi->search_table_encoding = search_table_encoding; cfi->search_table_entries = search_table_entries; @@ -211,7 +217,7 @@ getcfi_scn_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, Elf_Scn *hdr_scn, GElf_Addr hdr_vaddr) { Elf_Data *data = elf_rawdata (scn, NULL); - if (data == NULL) + if (data == NULL || data->d_buf == NULL) { __libdw_seterrno (DWARF_E_INVALID_ELF); return NULL; @@ -223,8 +229,9 @@ getcfi_scn_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, if (hdr_scn != NULL) { Elf_Data *hdr_data = elf_rawdata (hdr_scn, NULL); - if (hdr_data != NULL) + if (hdr_data != NULL && hdr_data->d_buf != NULL) { + size_t vsize, dmax; GElf_Addr eh_frame_vaddr; cfi->search_table_vaddr = hdr_vaddr; cfi->search_table @@ -232,7 +239,17 @@ getcfi_scn_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, hdr_vaddr, ehdr, &eh_frame_vaddr, &cfi->search_table_entries, &cfi->search_table_encoding); - if (cfi->search_table == (void *) -1l) + cfi->search_table_len = hdr_data->d_size; + + /* Make sure there is enough room for the entries in the table, + each entry consists of 2 encoded values. */ + vsize = encoded_value_size (hdr_data, ehdr->e_ident, + cfi->search_table_encoding, NULL); + dmax = hdr_data->d_size - (cfi->search_table + - (const uint8_t *) hdr_data->d_buf); + if (unlikely (cfi->search_table == (void *) -1l + || vsize == 0 + || cfi->search_table_entries > (dmax / vsize) / 2)) { free (cfi); /* XXX might be read error or corrupt phdr */ @@ -294,8 +311,7 @@ getcfi_shdr (Elf *elf, const GElf_Ehdr *ehdr) } Dwarf_CFI * -dwarf_getcfi_elf (elf) - Elf *elf; +dwarf_getcfi_elf (Elf *elf) { if (elf_kind (elf) != ELF_K_ELF) { diff --git a/libdw/dwarf_getelf.c b/libdw/dwarf_getelf.c index ecd1859..2d6268e 100644 --- a/libdw/dwarf_getelf.c +++ b/libdw/dwarf_getelf.c @@ -37,8 +37,7 @@ Elf * -dwarf_getelf (dwarf) - Dwarf *dwarf; +dwarf_getelf (Dwarf *dwarf) { if (dwarf == NULL) /* Some error occurred before. */ diff --git a/libdw/dwarf_getfuncs.c b/libdw/dwarf_getfuncs.c index 82894c9..b95f06f 100644 --- a/libdw/dwarf_getfuncs.c +++ b/libdw/dwarf_getfuncs.c @@ -1,5 +1,5 @@ /* Get function information. - Copyright (C) 2005, 2013 Red Hat, Inc. + Copyright (C) 2005, 2013, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -103,12 +103,13 @@ dwarf_getfuncs (Dwarf_Die *cudie, int (*callback) (Dwarf_Die *, void *), int lang = INTUSE(dwarf_srclang) (cudie); bool c_cu = (lang == DW_LANG_C89 || lang == DW_LANG_C - || lang == DW_LANG_C99); + || lang == DW_LANG_C99 + || lang == DW_LANG_C11); struct visitor_info v = { callback, arg, (void *) offset, NULL, c_cu }; struct Dwarf_Die_Chain chain = { .die = CUDIE (cudie->cu), .parent = NULL }; - int res = __libdw_visit_scopes (0, &chain, &tree_visitor, NULL, &v); + int res = __libdw_visit_scopes (0, &chain, NULL, &tree_visitor, NULL, &v); if (res == DWARF_CB_ABORT) return (ptrdiff_t) v.last_addr; diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c index 8dffb83..a4a2761 100644 --- a/libdw/dwarf_getlocation.c +++ b/libdw/dwarf_getlocation.c @@ -1,5 +1,5 @@ /* Return location expression list. - Copyright (C) 2000-2010, 2013 Red Hat, Inc. + Copyright (C) 2000-2010, 2013-2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -57,6 +57,10 @@ attr_ok (Dwarf_Attribute *attr) case DW_AT_return_addr: case DW_AT_static_link: case DW_AT_segment: + case DW_AT_GNU_call_site_value: + case DW_AT_GNU_call_site_data_value: + case DW_AT_GNU_call_site_target: + case DW_AT_GNU_call_site_target_clobbered: break; default: @@ -100,7 +104,8 @@ store_implicit_value (Dwarf *dbg, void **cache, Dwarf_Op *op) struct loc_block_s *block = libdw_alloc (dbg, struct loc_block_s, sizeof (struct loc_block_s), 1); const unsigned char *data = (const unsigned char *) (uintptr_t) op->number2; - (void) __libdw_get_uleb128 (&data); // Ignored, equal to op->number. + // Ignored, equal to op->number. And data length already checked. + (void) __libdw_get_uleb128 (&data, data + len_leb128 (Dwarf_Word)); block->addr = op; block->data = (unsigned char *) data; block->length = op->number; @@ -108,10 +113,8 @@ store_implicit_value (Dwarf *dbg, void **cache, Dwarf_Op *op) } int -dwarf_getlocation_implicit_value (attr, op, return_block) - Dwarf_Attribute *attr; - const Dwarf_Op *op; - Dwarf_Block *return_block; +dwarf_getlocation_implicit_value (Dwarf_Attribute *attr, const Dwarf_Op *op, + Dwarf_Block *return_block) { if (attr == NULL) return -1; @@ -234,18 +237,28 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, struct loclist *loclist = NULL; unsigned int n = 0; + /* Stack allocate at most this many locs. */ +#define MAX_STACK_LOCS 256 + struct loclist stack_locs[MAX_STACK_LOCS]; +#define NEW_LOC() ({ struct loclist *ll; \ + ll = (likely (n < MAX_STACK_LOCS) \ + ? &stack_locs[n] \ + : malloc (sizeof (struct loclist))); \ + if (unlikely (ll == NULL)) \ + goto nomem; \ + n++; \ + ll->next = loclist; \ + loclist = ll; \ + ll; }) + if (cfap) { /* Synthesize the operation to push the CFA before the expression. */ - struct loclist *newloc; - newloc = (struct loclist *) alloca (sizeof (struct loclist)); + struct loclist *newloc = NEW_LOC (); newloc->atom = DW_OP_call_frame_cfa; newloc->number = 0; newloc->number2 = 0; newloc->offset = -1; - newloc->next = loclist; - loclist = newloc; - ++n; } /* Decode the opcodes. It is possible in some situations to have a @@ -253,28 +266,45 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, while (data < end_data) { struct loclist *newloc; - newloc = (struct loclist *) alloca (sizeof (struct loclist)); + newloc = NEW_LOC (); newloc->number = 0; newloc->number2 = 0; newloc->offset = data - block->data; - newloc->next = loclist; - loclist = newloc; - ++n; switch ((newloc->atom = *data++)) { case DW_OP_addr: /* Address, depends on address size of CU. */ - if (__libdw_read_address_inc (dbg, sec_index, &data, - address_size, &newloc->number)) - return -1; + if (dbg == NULL) + { + // XXX relocation? + if (address_size == 4) + { + if (unlikely (data + 4 > end_data)) + goto invalid; + else + newloc->number = read_4ubyte_unaligned_inc (&bo, data); + } + else + { + if (unlikely (data + 8 > end_data)) + goto invalid; + else + newloc->number = read_8ubyte_unaligned_inc (&bo, data); + } + } + else if (__libdw_read_address_inc (dbg, sec_index, &data, + address_size, &newloc->number)) + goto invalid; break; case DW_OP_call_ref: /* DW_FORM_ref_addr, depends on offset size of CU. */ - if (__libdw_read_offset_inc (dbg, sec_index, &data, ref_size, - &newloc->number, IDX_debug_info, 0)) - return -1; + if (dbg == NULL || __libdw_read_offset_inc (dbg, sec_index, &data, + ref_size, + &newloc->number, + IDX_debug_info, 0)) + goto invalid; break; case DW_OP_deref: @@ -323,6 +353,15 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, { invalid: __libdw_seterrno (DWARF_E_INVALID_DWARF); + returnmem: + /* Free any dynamicly allocated loclists, if any. */ + while (n > MAX_STACK_LOCS) + { + struct loclist *loc = loclist; + loclist = loc->next; + free (loc); + n--; + } return -1; } @@ -390,28 +429,28 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, case DW_OP_piece: case DW_OP_GNU_convert: case DW_OP_GNU_reinterpret: - /* XXX Check size. */ - get_uleb128 (newloc->number, data); + get_uleb128 (newloc->number, data, end_data); break; case DW_OP_consts: case DW_OP_breg0 ... DW_OP_breg31: case DW_OP_fbreg: - /* XXX Check size. */ - get_sleb128 (newloc->number, data); + get_sleb128 (newloc->number, data, end_data); break; case DW_OP_bregx: - /* XXX Check size. */ - get_uleb128 (newloc->number, data); - get_sleb128 (newloc->number2, data); + get_uleb128 (newloc->number, data, end_data); + if (unlikely (data >= end_data)) + goto invalid; + get_sleb128 (newloc->number2, data, end_data); break; case DW_OP_bit_piece: case DW_OP_GNU_regval_type: - /* XXX Check size. */ - get_uleb128 (newloc->number, data); - get_uleb128 (newloc->number2, data); + get_uleb128 (newloc->number, data, end_data); + if (unlikely (data >= end_data)) + goto invalid; + get_uleb128 (newloc->number2, data, end_data); break; case DW_OP_implicit_value: @@ -422,8 +461,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, /* start of block inc. len. */ newloc->number2 = (Dwarf_Word) (uintptr_t) data; - /* XXX Check size. */ - get_uleb128 (newloc->number, data); /* Block length. */ + get_uleb128 (newloc->number, data, end_data); /* Block length. */ if (unlikely ((Dwarf_Word) (end_data - data) < newloc->number)) goto invalid; data += newloc->number; /* Skip the block. */ @@ -431,26 +469,27 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, case DW_OP_GNU_implicit_pointer: /* DW_FORM_ref_addr, depends on offset size of CU. */ - if (__libdw_read_offset_inc (dbg, sec_index, &data, ref_size, - &newloc->number, IDX_debug_info, 0)) - return -1; - /* XXX Check size. */ - get_uleb128 (newloc->number2, data); /* Byte offset. */ + if (dbg == NULL || __libdw_read_offset_inc (dbg, sec_index, &data, + ref_size, + &newloc->number, + IDX_debug_info, 0)) + goto invalid; + if (unlikely (data >= end_data)) + goto invalid; + get_uleb128 (newloc->number2, data, end_data); /* Byte offset. */ break; case DW_OP_GNU_deref_type: - if (unlikely (data >= end_data)) + if (unlikely (data + 1 >= end_data)) goto invalid; newloc->number = *data++; - get_uleb128 (newloc->number2, data); + get_uleb128 (newloc->number2, data, end_data); break; case DW_OP_GNU_const_type: { size_t size; - - /* XXX Check size. */ - get_uleb128 (newloc->number, data); + get_uleb128 (newloc->number, data, end_data); if (unlikely (data >= end_data)) goto invalid; @@ -478,15 +517,11 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, if (valuep) { - struct loclist *newloc; - newloc = (struct loclist *) alloca (sizeof (struct loclist)); + struct loclist *newloc = NEW_LOC (); newloc->atom = DW_OP_stack_value; newloc->number = 0; newloc->number2 = 0; newloc->offset = data - block->data; - newloc->next = loclist; - loclist = newloc; - ++n; } /* Allocate the array. */ @@ -500,7 +535,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, { nomem: __libdw_seterrno (DWARF_E_NOMEM); - return -1; + goto returnmem; } } @@ -520,7 +555,10 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, if (result[n].atom == DW_OP_implicit_value) store_implicit_value (dbg, cache, &result[n]); + struct loclist *loc = loclist; loclist = loclist->next; + if (unlikely (n + 1 > MAX_STACK_LOCS)) + free (loc); } while (n > 0); @@ -551,6 +589,14 @@ static int getlocation (struct Dwarf_CU *cu, const Dwarf_Block *block, Dwarf_Op **llbuf, size_t *listlen, int sec_index) { + /* Empty location expressions don't have any ops to intern. + Note that synthetic empty_cu doesn't have an associated DWARF dbg. */ + if (block->length == 0) + { + *listlen = 0; + return 0; + } + return __libdw_intern_expression (cu->dbg, cu->dbg->other_byte_order, cu->address_size, (cu->version == 2 ? cu->address_size @@ -561,10 +607,7 @@ getlocation (struct Dwarf_CU *cu, const Dwarf_Block *block, } int -dwarf_getlocation (attr, llbuf, listlen) - Dwarf_Attribute *attr; - Dwarf_Op **llbuf; - size_t *listlen; +dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen) { if (! attr_ok (attr)) return -1; @@ -582,9 +625,7 @@ dwarf_getlocation (attr, llbuf, listlen) } static int -attr_base_address (attr, basep) - Dwarf_Attribute *attr; - Dwarf_Addr *basep; +attr_base_address (Dwarf_Attribute *attr, Dwarf_Addr *basep) { /* Fetch the CU's base address. */ Dwarf_Die cudie = CUDIE (attr->cu); @@ -613,10 +654,8 @@ attr_base_address (attr, basep) } static int -initial_offset_base (attr, offset, basep) - Dwarf_Attribute *attr; - ptrdiff_t *offset; - Dwarf_Addr *basep; +initial_offset_base (Dwarf_Attribute *attr, ptrdiff_t *offset, + Dwarf_Addr *basep) { if (attr_base_address (attr, basep) != 0) return -1; @@ -632,17 +671,10 @@ initial_offset_base (attr, offset, basep) } static ptrdiff_t -getlocations_addr (attr, offset, basep, startp, endp, address, - locs, expr, exprlen) - Dwarf_Attribute *attr; - ptrdiff_t offset; - Dwarf_Addr *basep; - Dwarf_Addr *startp; - Dwarf_Addr *endp; - Dwarf_Addr address; - Elf_Data *locs; - Dwarf_Op **expr; - size_t *exprlen; +getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset, + Dwarf_Addr *basep, Dwarf_Addr *startp, Dwarf_Addr *endp, + Dwarf_Addr address, const Elf_Data *locs, Dwarf_Op **expr, + size_t *exprlen) { unsigned char *readp = locs->d_buf + offset; unsigned char *readendp = locs->d_buf + locs->d_size; @@ -697,12 +729,8 @@ getlocations_addr (attr, offset, basep, startp, endp, address, } int -dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs) - Dwarf_Attribute *attr; - Dwarf_Addr address; - Dwarf_Op **llbufs; - size_t *listlens; - size_t maxlocs; +dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address, + Dwarf_Op **llbufs, size_t *listlens, size_t maxlocs) { if (! attr_ok (attr)) return -1; @@ -772,14 +800,9 @@ dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs) } ptrdiff_t -dwarf_getlocations (attr, offset, basep, startp, endp, expr, exprlen) - Dwarf_Attribute *attr; - ptrdiff_t offset; - Dwarf_Addr *basep; - Dwarf_Addr *startp; - Dwarf_Addr *endp; - Dwarf_Op **expr; - size_t *exprlen; +dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep, + Dwarf_Addr *startp, Dwarf_Addr *endp, Dwarf_Op **expr, + size_t *exprlen) { if (! attr_ok (attr)) return -1; diff --git a/libdw/dwarf_getlocation_attr.c b/libdw/dwarf_getlocation_attr.c index cb29045..8b6a4af 100644 --- a/libdw/dwarf_getlocation_attr.c +++ b/libdw/dwarf_getlocation_attr.c @@ -1,5 +1,5 @@ /* Return DWARF attribute associated with a location expression op. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -33,36 +33,52 @@ #include #include +static Dwarf_CU * +attr_form_cu (Dwarf_Attribute *attr) +{ + /* If the attribute has block/expr form the data comes from the + .debug_info from the same cu as the attr. Otherwise it comes from + the .debug_loc data section. */ + switch (attr->form) + { + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + case DW_FORM_exprloc: + return attr->cu; + default: + return attr->cu->dbg->fake_loc_cu; + } +} int -dwarf_getlocation_attr (attr, op, result) - Dwarf_Attribute *attr; - const Dwarf_Op *op; - Dwarf_Attribute *result; +dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribute *result) { if (attr == NULL) return -1; - result->cu = attr->cu; - switch (op->atom) { case DW_OP_implicit_value: result->code = DW_AT_const_value; result->form = DW_FORM_block; result->valp = (unsigned char *) (uintptr_t) op->number2; + result->cu = attr_form_cu (attr); break; case DW_OP_GNU_entry_value: result->code = DW_AT_location; result->form = DW_FORM_exprloc; result->valp = (unsigned char *) (uintptr_t) op->number2; + result->cu = attr_form_cu (attr); break; case DW_OP_GNU_const_type: result->code = DW_AT_const_value; result->form = DW_FORM_block1; result->valp = (unsigned char *) (uintptr_t) op->number2; + result->cu = attr_form_cu (attr); break; case DW_OP_call2: @@ -74,7 +90,7 @@ dwarf_getlocation_attr (attr, op, result) return -1; if (INTUSE(dwarf_attr) (&die, DW_AT_location, result) == NULL) { - __libdw_empty_loc_attr (result, attr->cu); + __libdw_empty_loc_attr (result); return 0; } } @@ -88,7 +104,7 @@ dwarf_getlocation_attr (attr, op, result) if (INTUSE(dwarf_attr) (&die, DW_AT_location, result) == NULL && INTUSE(dwarf_attr) (&die, DW_AT_const_value, result) == NULL) { - __libdw_empty_loc_attr (result, attr->cu); + __libdw_empty_loc_attr (result); return 0; } } diff --git a/libdw/dwarf_getlocation_die.c b/libdw/dwarf_getlocation_die.c index fa03aac..b4908d2 100644 --- a/libdw/dwarf_getlocation_die.c +++ b/libdw/dwarf_getlocation_die.c @@ -34,10 +34,8 @@ #include int -dwarf_getlocation_die (attr, op, result) - Dwarf_Attribute *attr; - const Dwarf_Op *op; - Dwarf_Die *result; +dwarf_getlocation_die (Dwarf_Attribute *attr, const Dwarf_Op *op, + Dwarf_Die *result) { if (attr == NULL) return -1; diff --git a/libdw/dwarf_getlocation_implicit_pointer.c b/libdw/dwarf_getlocation_implicit_pointer.c index f93d17e..9505382 100644 --- a/libdw/dwarf_getlocation_implicit_pointer.c +++ b/libdw/dwarf_getlocation_implicit_pointer.c @@ -35,22 +35,22 @@ static unsigned char empty_exprloc = 0; +static Dwarf_CU empty_cu = { .startp = &empty_exprloc, + .endp = &empty_exprloc + 1 }; void internal_function -__libdw_empty_loc_attr (Dwarf_Attribute *attr, struct Dwarf_CU *cu ) +__libdw_empty_loc_attr (Dwarf_Attribute *attr) { attr->code = DW_AT_location; attr->form = DW_FORM_exprloc; attr->valp = &empty_exprloc; - attr->cu = cu; + attr->cu = &empty_cu; } int -dwarf_getlocation_implicit_pointer (attr, op, result) - Dwarf_Attribute *attr; - const Dwarf_Op *op; - Dwarf_Attribute *result; +dwarf_getlocation_implicit_pointer (Dwarf_Attribute *attr, const Dwarf_Op *op, + Dwarf_Attribute *result) { if (attr == NULL) return -1; @@ -69,7 +69,7 @@ dwarf_getlocation_implicit_pointer (attr, op, result) if (INTUSE(dwarf_attr) (&die, DW_AT_location, result) == NULL && INTUSE(dwarf_attr) (&die, DW_AT_const_value, result) == NULL) { - __libdw_empty_loc_attr (result, attr->cu); + __libdw_empty_loc_attr (result); return 0; } diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c index a3d2c81..eb50508 100644 --- a/libdw/dwarf_getmacros.c +++ b/libdw/dwarf_getmacros.c @@ -1,5 +1,5 @@ /* Get macro information. - Copyright (C) 2002-2009 Red Hat, Inc. + Copyright (C) 2002-2009, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -31,114 +31,539 @@ # include #endif +#include #include +#include +#include #include #include +static int +get_offset_from (Dwarf_Die *die, int name, Dwarf_Word *retp) +{ + /* Get the appropriate attribute. */ + Dwarf_Attribute attr; + if (INTUSE(dwarf_attr) (die, name, &attr) == NULL) + return -1; -ptrdiff_t -dwarf_getmacros (die, callback, arg, offset) - Dwarf_Die *die; - int (*callback) (Dwarf_Macro *, void *); - void *arg; - ptrdiff_t offset; + /* Offset into the corresponding section. */ + return INTUSE(dwarf_formudata) (&attr, retp); +} + +static int +macro_op_compare (const void *p1, const void *p2) { - if (die == NULL) + const Dwarf_Macro_Op_Table *t1 = (const Dwarf_Macro_Op_Table *) p1; + const Dwarf_Macro_Op_Table *t2 = (const Dwarf_Macro_Op_Table *) p2; + + if (t1->offset < t2->offset) + return -1; + if (t1->offset > t2->offset) + return 1; + + if (t1->sec_index < t2->sec_index) return -1; + if (t1->sec_index > t2->sec_index) + return 1; + + return 0; +} - Elf_Data *d = die->cu->dbg->sectiondata[IDX_debug_macinfo]; - if (unlikely (d == NULL) || unlikely (d->d_buf == NULL)) +static void +build_table (Dwarf_Macro_Op_Table *table, + Dwarf_Macro_Op_Proto op_protos[static 255]) +{ + unsigned ct = 0; + for (unsigned i = 1; i < 256; ++i) + if (op_protos[i - 1].forms != NULL) + table->table[table->opcodes[i - 1] = ct++] = op_protos[i - 1]; + else + table->opcodes[i - 1] = 0xff; +} + +#define MACRO_PROTO(NAME, ...) \ + Dwarf_Macro_Op_Proto NAME = ({ \ + static const uint8_t proto[] = {__VA_ARGS__}; \ + (Dwarf_Macro_Op_Proto) {sizeof proto, proto}; \ + }) + +enum { macinfo_data_size = offsetof (Dwarf_Macro_Op_Table, table[5]) }; +static unsigned char macinfo_data[macinfo_data_size] + __attribute__ ((aligned (__alignof (Dwarf_Macro_Op_Table)))); + +static __attribute__ ((constructor)) void +init_macinfo_table (void) +{ + MACRO_PROTO (p_udata_str, DW_FORM_udata, DW_FORM_string); + MACRO_PROTO (p_udata_udata, DW_FORM_udata, DW_FORM_udata); + MACRO_PROTO (p_none); + + Dwarf_Macro_Op_Proto op_protos[255] = { - __libdw_seterrno (DWARF_E_NO_ENTRY); - return -1; + [DW_MACINFO_define - 1] = p_udata_str, + [DW_MACINFO_undef - 1] = p_udata_str, + [DW_MACINFO_vendor_ext - 1] = p_udata_str, + [DW_MACINFO_start_file - 1] = p_udata_udata, + [DW_MACINFO_end_file - 1] = p_none, + /* If you are adding more elements to this array, increase + MACINFO_DATA_SIZE above. */ + }; + + Dwarf_Macro_Op_Table *macinfo_table = (void *) macinfo_data; + memset (macinfo_table, 0, sizeof macinfo_data); + build_table (macinfo_table, op_protos); + macinfo_table->sec_index = IDX_debug_macinfo; +} + +static Dwarf_Macro_Op_Table * +get_macinfo_table (Dwarf *dbg, Dwarf_Word macoff, Dwarf_Die *cudie) +{ + assert (cudie != NULL); + + Dwarf_Attribute attr_mem, *attr + = INTUSE(dwarf_attr) (cudie, DW_AT_stmt_list, &attr_mem); + Dwarf_Off line_offset = (Dwarf_Off) -1; + if (attr != NULL) + if (unlikely (INTUSE(dwarf_formudata) (attr, &line_offset) != 0)) + return NULL; + + Dwarf_Macro_Op_Table *table = libdw_alloc (dbg, Dwarf_Macro_Op_Table, + macinfo_data_size, 1); + memcpy (table, macinfo_data, macinfo_data_size); + + table->offset = macoff; + table->sec_index = IDX_debug_macinfo; + table->line_offset = line_offset; + table->is_64bit = cudie->cu->address_size == 8; + table->comp_dir = __libdw_getcompdir (cudie); + + return table; +} + +static Dwarf_Macro_Op_Table * +get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff, + const unsigned char *readp, + const unsigned char *const endp, + Dwarf_Die *cudie) +{ + const unsigned char *startp = readp; + + /* Request at least 3 bytes for header. */ + if (readp + 3 > endp) + { + invalid_dwarf: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return NULL; } - if (offset == 0) + uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); + if (version != 4) { - /* Get the appropriate attribute. */ - Dwarf_Attribute attr; - if (INTUSE(dwarf_attr) (die, DW_AT_macro_info, &attr) == NULL) - return -1; + __libdw_seterrno (DWARF_E_INVALID_VERSION); + return NULL; + } - /* Offset into the .debug_macinfo section. */ - Dwarf_Word macoff; - if (INTUSE(dwarf_formudata) (&attr, &macoff) != 0) - return -1; + uint8_t flags = *readp++; + bool is_64bit = (flags & 0x1) != 0; - offset = macoff; + Dwarf_Off line_offset = (Dwarf_Off) -1; + if ((flags & 0x2) != 0) + { + line_offset = read_addr_unaligned_inc (is_64bit ? 8 : 4, dbg, readp); + if (readp > endp) + goto invalid_dwarf; } - if (unlikely (offset > (ptrdiff_t) d->d_size)) - goto invalid; + else if (cudie != NULL) + { + Dwarf_Attribute attr_mem, *attr + = INTUSE(dwarf_attr) (cudie, DW_AT_stmt_list, &attr_mem); + if (attr != NULL) + if (unlikely (INTUSE(dwarf_formudata) (attr, &line_offset) != 0)) + return NULL; + } + + /* """The macinfo entry types defined in this standard may, but + might not, be described in the table""". - const unsigned char *readp = d->d_buf + offset; - const unsigned char *readendp = d->d_buf + d->d_size; + I.e. these may be present. It's tempting to simply skip them, + but it's probably more correct to tolerate that a producer tweaks + the way certain opcodes are encoded, for whatever reasons. */ - if (readp == readendp) - return 0; + MACRO_PROTO (p_udata_str, DW_FORM_udata, DW_FORM_string); + MACRO_PROTO (p_udata_strp, DW_FORM_udata, DW_FORM_strp); + MACRO_PROTO (p_udata_udata, DW_FORM_udata, DW_FORM_udata); + MACRO_PROTO (p_secoffset, DW_FORM_sec_offset); + MACRO_PROTO (p_none); - while (readp < readendp) + Dwarf_Macro_Op_Proto op_protos[255] = { - unsigned int opcode = *readp++; - unsigned int u128; - unsigned int u128_2 = 0; - const char *str = NULL; - const unsigned char *endp; + [DW_MACRO_GNU_define - 1] = p_udata_str, + [DW_MACRO_GNU_undef - 1] = p_udata_str, + [DW_MACRO_GNU_define_indirect - 1] = p_udata_strp, + [DW_MACRO_GNU_undef_indirect - 1] = p_udata_strp, + [DW_MACRO_GNU_start_file - 1] = p_udata_udata, + [DW_MACRO_GNU_end_file - 1] = p_none, + [DW_MACRO_GNU_transparent_include - 1] = p_secoffset, + /* N.B. DW_MACRO_undef_indirectx, DW_MACRO_define_indirectx + should be added when 130313.1 is supported. */ + }; - switch (opcode) + if ((flags & 0x4) != 0) + { + unsigned count = *readp++; + for (unsigned i = 0; i < count; ++i) { - case DW_MACINFO_define: - case DW_MACINFO_undef: - case DW_MACINFO_vendor_ext: - /* For the first two opcodes the parameters are - line, string - For the latter - number, string. - We can treat these cases together. */ - get_uleb128 (u128, readp); - - endp = memchr (readp, '\0', readendp - readp); - if (endp == NULL) + unsigned opcode = *readp++; + + Dwarf_Macro_Op_Proto e; + if (readp >= endp) goto invalid; + get_uleb128 (e.nforms, readp, endp); + e.forms = readp; + op_protos[opcode - 1] = e; + + readp += e.nforms; + if (readp > endp) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return NULL; + } + } + } + + size_t ct = 0; + for (unsigned i = 1; i < 256; ++i) + if (op_protos[i - 1].forms != NULL) + ++ct; + + /* We support at most 0xfe opcodes defined in the table, as 0xff is + a value that means that given opcode is not stored at all. But + that should be fine, as opcode 0 is not allocated. */ + assert (ct < 0xff); + + size_t macop_table_size = offsetof (Dwarf_Macro_Op_Table, table[ct]); + + Dwarf_Macro_Op_Table *table = libdw_alloc (dbg, Dwarf_Macro_Op_Table, + macop_table_size, 1); + + *table = (Dwarf_Macro_Op_Table) { + .offset = macoff, + .sec_index = IDX_debug_macro, + .line_offset = line_offset, + .header_len = readp - startp, + .version = version, + .is_64bit = is_64bit, + + /* NULL if CUDIE is NULL or DW_AT_comp_dir is absent. */ + .comp_dir = __libdw_getcompdir (cudie), + }; + build_table (table, op_protos); + + return table; +} + +static Dwarf_Macro_Op_Table * +cache_op_table (Dwarf *dbg, int sec_index, Dwarf_Off macoff, + const unsigned char *startp, + const unsigned char *const endp, + Dwarf_Die *cudie) +{ + Dwarf_Macro_Op_Table fake = { .offset = macoff, .sec_index = sec_index }; + Dwarf_Macro_Op_Table **found = tfind (&fake, &dbg->macro_ops, + macro_op_compare); + if (found != NULL) + return *found; + + Dwarf_Macro_Op_Table *table = sec_index == IDX_debug_macro + ? get_table_for_offset (dbg, macoff, startp, endp, cudie) + : get_macinfo_table (dbg, macoff, cudie); - str = (char *) readp; - readp = endp + 1; - break; + if (table == NULL) + return NULL; - case DW_MACINFO_start_file: - /* The two parameters are line and file index. */ - get_uleb128 (u128, readp); - get_uleb128 (u128_2, readp); - break; + Dwarf_Macro_Op_Table **ret = tsearch (table, &dbg->macro_ops, + macro_op_compare); + if (unlikely (ret == NULL)) + { + __libdw_seterrno (DWARF_E_NOMEM); + return NULL; + } - case DW_MACINFO_end_file: - /* No parameters for this one. */ - u128 = 0; - break; + return *ret; +} - case 0: - /* Nothing more to do. */ - return 0; +static ptrdiff_t +read_macros (Dwarf *dbg, int sec_index, + Dwarf_Off macoff, int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t offset, bool accept_0xff, + Dwarf_Die *cudie) +{ + Elf_Data *d = dbg->sectiondata[sec_index]; + if (unlikely (d == NULL || d->d_buf == NULL)) + { + __libdw_seterrno (DWARF_E_NO_ENTRY); + return -1; + } - default: - goto invalid; + if (unlikely (macoff >= d->d_size)) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + + const unsigned char *const startp = d->d_buf + macoff; + const unsigned char *const endp = d->d_buf + d->d_size; + + Dwarf_Macro_Op_Table *table = cache_op_table (dbg, sec_index, macoff, + startp, endp, cudie); + if (table == NULL) + return -1; + + if (offset == 0) + offset = table->header_len; + + assert (offset >= 0); + assert (offset < endp - startp); + const unsigned char *readp = startp + offset; + + while (readp < endp) + { + unsigned int opcode = *readp++; + if (opcode == 0) + /* Nothing more to do. */ + return 0; + + if (unlikely (opcode == 0xff && ! accept_0xff)) + { + /* See comment below at dwarf_getmacros for explanation of + why we are doing this. */ + __libdw_seterrno (DWARF_E_INVALID_OPCODE); + return -1; + } + + unsigned int idx = table->opcodes[opcode - 1]; + if (idx == 0xff) + { + __libdw_seterrno (DWARF_E_INVALID_OPCODE); + return -1; } - Dwarf_Macro mac; - mac.opcode = opcode; - mac.param1 = u128; - if (str == NULL) - mac.param2.u = u128_2; + Dwarf_Macro_Op_Proto *proto = &table->table[idx]; + + /* A fake CU with bare minimum data to fool dwarf_formX into + doing the right thing with the attributes that we put out. + We arbitrarily pretend it's version 4. */ + Dwarf_CU fake_cu = { + .dbg = dbg, + .version = 4, + .offset_size = table->is_64bit ? 8 : 4, + .startp = (void *) startp + offset, + .endp = (void *) endp, + }; + + Dwarf_Attribute *attributes; + Dwarf_Attribute *attributesp = NULL; + Dwarf_Attribute nattributes[8]; + if (unlikely (proto->nforms > 8)) + { + attributesp = malloc (sizeof (Dwarf_Attribute) * proto->nforms); + if (attributesp == NULL) + { + __libdw_seterrno (DWARF_E_NOMEM); + return -1; + } + attributes = attributesp; + } else - mac.param2.s = str; + attributes = &nattributes[0]; + + for (Dwarf_Word i = 0; i < proto->nforms; ++i) + { + /* We pretend this is a DW_AT_GNU_macros attribute so that + DW_FORM_sec_offset forms get correctly interpreted as + offset into .debug_macro. */ + attributes[i].code = DW_AT_GNU_macros; + attributes[i].form = proto->forms[i]; + attributes[i].valp = (void *) readp; + attributes[i].cu = &fake_cu; + + size_t len = __libdw_form_val_len (&fake_cu, proto->forms[i], readp); + if (unlikely (len == (size_t) -1)) + { + free (attributesp); + return -1; + } + + readp += len; + } + + Dwarf_Macro macro = { + .table = table, + .opcode = opcode, + .attributes = attributes, + }; + + int res = callback (¯o, arg); + if (unlikely (attributesp != NULL)) + free (attributesp); + + if (res != DWARF_CB_OK) + return readp - startp; + } + + return 0; +} + +/* Token layout: + + - The highest bit is used for distinguishing between callers that + know that opcode 0xff may have one of two incompatible meanings. + The mask that we use for selecting this bit is + DWARF_GETMACROS_START. + + - The rest of the token (31 or 63 bits) encodes address inside the + macro unit. + + Besides, token value of 0 signals end of iteration and -1 is + reserved for signaling errors. That means it's impossible to + represent maximum offset of a .debug_macro unit to new-style + callers (which in practice decreases the permissible macro unit + size by another 1 byte). */ + +static ptrdiff_t +token_from_offset (ptrdiff_t offset, bool accept_0xff) +{ + if (offset == -1 || offset == 0) + return offset; + + /* Make sure the offset didn't overflow into the flag bit. */ + if ((offset & DWARF_GETMACROS_START) != 0) + { + __libdw_seterrno (DWARF_E_TOO_BIG); + return -1; + } + + if (accept_0xff) + offset |= DWARF_GETMACROS_START; + + return offset; +} + +static ptrdiff_t +offset_from_token (ptrdiff_t token, bool *accept_0xffp) +{ + *accept_0xffp = (token & DWARF_GETMACROS_START) != 0; + token &= ~DWARF_GETMACROS_START; + + return token; +} - if (callback (&mac, arg) != DWARF_CB_OK) - return readp - (const unsigned char *) d->d_buf; +static ptrdiff_t +gnu_macros_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t offset, bool accept_0xff, + Dwarf_Die *cudie) +{ + assert (offset >= 0); + + if (macoff >= dbg->sectiondata[IDX_debug_macro]->d_size) + { + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return -1; + } + + return read_macros (dbg, IDX_debug_macro, macoff, + callback, arg, offset, accept_0xff, cudie); +} + +static ptrdiff_t +macro_info_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t offset, Dwarf_Die *cudie) +{ + assert (offset >= 0); + + return read_macros (dbg, IDX_debug_macinfo, macoff, + callback, arg, offset, true, cudie); +} + +ptrdiff_t +dwarf_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) +{ + if (dbg == NULL) + { + __libdw_seterrno (DWARF_E_NO_DWARF); + return -1; + } + + bool accept_0xff; + ptrdiff_t offset = offset_from_token (token, &accept_0xff); + assert (accept_0xff); + + offset = gnu_macros_getmacros_off (dbg, macoff, callback, arg, offset, + accept_0xff, NULL); + + return token_from_offset (offset, accept_0xff); +} + +ptrdiff_t +dwarf_getmacros (Dwarf_Die *cudie, int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) +{ + if (cudie == NULL) + { + __libdw_seterrno (DWARF_E_NO_DWARF); + return -1; + } + + /* This function might be called from a code that expects to see + DW_MACINFO_* opcodes, not DW_MACRO_{GNU_,}* ones. It is fine to + serve most DW_MACRO_{GNU_,}* opcodes to such code, because those + whose values are the same as DW_MACINFO_* ones also have the same + behavior. It is not very likely that a .debug_macro section + would only use the part of opcode space that it shares with + .debug_macinfo, but it is possible. Serving the opcodes that are + only valid in DW_MACRO_{GNU_,}* domain is OK as well, because + clients in general need to be ready that newer standards define + more opcodes, and have coping mechanisms for unfamiliar opcodes. + + The one exception to the above rule is opcode 0xff, which has + concrete semantics in .debug_macinfo, but falls into vendor block + in .debug_macro, and can be assigned to do whatever. There is + some small probability that the two opcodes would look + superficially similar enough that a client would be confused and + misbehave as a result. For this reason, we refuse to serve + through this interface 0xff's originating from .debug_macro + unless the TOKEN that we obtained indicates the call originates + from a new-style caller. See above for details on what + information is encoded into tokens. */ + + bool accept_0xff; + ptrdiff_t offset = offset_from_token (token, &accept_0xff); + + /* DW_AT_macro_info */ + if (dwarf_hasattr (cudie, DW_AT_macro_info)) + { + Dwarf_Word macoff; + if (get_offset_from (cudie, DW_AT_macro_info, &macoff) != 0) + return -1; + offset = macro_info_getmacros_off (cudie->cu->dbg, macoff, + callback, arg, offset, cudie); + } + else + { + /* DW_AT_GNU_macros, DW_AT_macros */ + Dwarf_Word macoff; + if (get_offset_from (cudie, DW_AT_GNU_macros, &macoff) != 0) + return -1; + offset = gnu_macros_getmacros_off (cudie->cu->dbg, macoff, + callback, arg, offset, accept_0xff, + cudie); } - /* If we come here the termination of the data for the CU is not - present. */ - invalid: - __libdw_seterrno (DWARF_E_INVALID_DWARF); - return -1; + return token_from_offset (offset, accept_0xff); } diff --git a/libdw/dwarf_getpubnames.c b/libdw/dwarf_getpubnames.c index 12728a3..462b6ff 100644 --- a/libdw/dwarf_getpubnames.c +++ b/libdw/dwarf_getpubnames.c @@ -88,9 +88,11 @@ get_offsets (Dwarf *dbg) /* Now we know the offset of the first offset/name pair. */ mem[cnt].set_start = readp + 2 + 2 * len_bytes - startp; mem[cnt].address_len = len_bytes; - if (mem[cnt].set_start >= dbg->sectiondata[IDX_debug_pubnames]->d_size) + size_t max_size = dbg->sectiondata[IDX_debug_pubnames]->d_size; + if (mem[cnt].set_start >= max_size + || len - (2 + 2 * len_bytes) > max_size - mem[cnt].set_start) /* Something wrong, the first entry is beyond the end of - the section. */ + the section. Or the length of the whole unit is too big. */ break; /* Read the version. It better be two for now. */ @@ -123,8 +125,9 @@ get_offsets (Dwarf *dbg) readp += len; } - if (mem == NULL) + if (mem == NULL || cnt == 0) { + free (mem); __libdw_seterrno (DWARF_E_NO_ENTRY); return -1; } @@ -137,11 +140,9 @@ get_offsets (Dwarf *dbg) ptrdiff_t -dwarf_getpubnames (dbg, callback, arg, offset) - Dwarf *dbg; - int (*callback) (Dwarf *, Dwarf_Global *, void *); - void *arg; - ptrdiff_t offset; +dwarf_getpubnames (Dwarf *dbg, + int (*callback) (Dwarf *, Dwarf_Global *, void *), + void *arg, ptrdiff_t offset) { if (dbg == NULL) return -1l; @@ -184,6 +185,8 @@ dwarf_getpubnames (dbg, callback, arg, offset) unsigned char *startp = (unsigned char *) dbg->sectiondata[IDX_debug_pubnames]->d_buf; + unsigned char *endp + = startp + dbg->sectiondata[IDX_debug_pubnames]->d_size; unsigned char *readp = startp + offset; while (1) { @@ -195,6 +198,8 @@ dwarf_getpubnames (dbg, callback, arg, offset) while (1) { /* READP points to the next offset/name pair. */ + if (readp + dbg->pubnames_sets[cnt].address_len > endp) + goto invalid_dwarf; if (dbg->pubnames_sets[cnt].address_len == 4) gl.die_offset = read_4ubyte_unaligned_inc (dbg, readp); else @@ -208,7 +213,14 @@ dwarf_getpubnames (dbg, callback, arg, offset) gl.die_offset += dbg->pubnames_sets[cnt].cu_offset; gl.name = (char *) readp; - readp = (unsigned char *) rawmemchr (gl.name, '\0') + 1; + readp = (unsigned char *) memchr (gl.name, '\0', endp - readp); + if (unlikely (readp == NULL)) + { + invalid_dwarf: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1l; + } + readp++; /* We found name and DIE offset. Report it. */ if (callback (dbg, &gl, arg) != DWARF_CB_OK) diff --git a/libdw/dwarf_getscopes.c b/libdw/dwarf_getscopes.c index 0ca6da0..df480d3 100644 --- a/libdw/dwarf_getscopes.c +++ b/libdw/dwarf_getscopes.c @@ -1,5 +1,5 @@ /* Return scope DIEs containing PC address. - Copyright (C) 2005, 2007 Red Hat, Inc. + Copyright (C) 2005, 2007, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -176,7 +176,7 @@ pc_record (unsigned int depth, struct Dwarf_Die_Chain *die, void *arg) If we don't find it, return to search the containing scope. If we do find it, the nonzero return value will bail us out of the postorder traversal. */ - return __libdw_visit_scopes (depth, die, &origin_match, NULL, a); + return __libdw_visit_scopes (depth, die, NULL, &origin_match, NULL, a); } @@ -189,10 +189,10 @@ dwarf_getscopes (Dwarf_Die *cudie, Dwarf_Addr pc, Dwarf_Die **scopes) struct Dwarf_Die_Chain cu = { .parent = NULL, .die = *cudie }; struct args a = { .pc = pc }; - int result = __libdw_visit_scopes (0, &cu, &pc_match, &pc_record, &a); + int result = __libdw_visit_scopes (0, &cu, NULL, &pc_match, &pc_record, &a); if (result == 0 && a.scopes != NULL) - result = __libdw_visit_scopes (0, &cu, &origin_match, NULL, &a); + result = __libdw_visit_scopes (0, &cu, NULL, &origin_match, NULL, &a); if (result > 0) *scopes = a.scopes; diff --git a/libdw/dwarf_getscopes_die.c b/libdw/dwarf_getscopes_die.c index d361585..8e2e41d 100644 --- a/libdw/dwarf_getscopes_die.c +++ b/libdw/dwarf_getscopes_die.c @@ -1,5 +1,5 @@ /* Return scope DIEs containing given DIE. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -67,7 +67,7 @@ dwarf_getscopes_die (Dwarf_Die *die, Dwarf_Die **scopes) struct Dwarf_Die_Chain cu = { .die = CUDIE (die->cu), .parent = NULL }; void *info = die->addr; - int result = __libdw_visit_scopes (1, &cu, &scope_visitor, NULL, &info); + int result = __libdw_visit_scopes (1, &cu, NULL, &scope_visitor, NULL, &info); if (result > 0) *scopes = info; return result; diff --git a/libdw/dwarf_getscopevar.c b/libdw/dwarf_getscopevar.c index eb50c0a..7b1416f 100644 --- a/libdw/dwarf_getscopevar.c +++ b/libdw/dwarf_getscopevar.c @@ -52,6 +52,26 @@ getattr (Dwarf_Die *die, int search_name, Dwarf_Word *value) &attr_mem), value); } +static inline int +file_matches (const char *lastfile, + size_t match_file_len, const char *match_file, + Dwarf_Files *files, size_t idx, + bool *lastfile_matches) +{ + if (idx >= files->nfiles) + return false; + const char *file = files->info[idx].name; + if (file != lastfile) + { + size_t len = strlen (file); + *lastfile_matches = (len >= match_file_len + && !memcmp (match_file, file, match_file_len) + && (len == match_file_len + || file[len - match_file_len - 1] == '/')); + } + return *lastfile_matches; +} + /* Search SCOPES[0..NSCOPES-1] for a variable called NAME. Ignore the first SKIP_SHADOWS scopes that match the name. If MATCH_FILE is not null, accept only declaration in that source file; @@ -72,22 +92,6 @@ dwarf_getscopevar (Dwarf_Die *scopes, int nscopes, size_t match_file_len = match_file == NULL ? 0 : strlen (match_file); bool lastfile_matches = false; const char *lastfile = NULL; - inline bool file_matches (Dwarf_Files *files, size_t idx) - { - if (idx >= files->nfiles) - return false; - - const char *file = files->info[idx].name; - if (file != lastfile) - { - size_t len = strlen (file); - lastfile_matches = (len >= match_file_len - && !memcmp (match_file, file, match_file_len) - && (len == match_file_len - || file[len - match_file_len - 1] == '/')); - } - return lastfile_matches; - } /* Start with the innermost scope and move out. */ for (int out = 0; out < nscopes; ++out) @@ -130,7 +134,8 @@ dwarf_getscopevar (Dwarf_Die *scopes, int nscopes, || getfiles (&scopes[out], &files) != 0) break; - if (!file_matches (files, i)) + if (!file_matches (lastfile, match_file_len, match_file, + files, i, &lastfile_matches)) break; if (match_lineno > 0 diff --git a/libdw/dwarf_getsrc_die.c b/libdw/dwarf_getsrc_die.c index 1914cdf..a95179f 100644 --- a/libdw/dwarf_getsrc_die.c +++ b/libdw/dwarf_getsrc_die.c @@ -1,5 +1,5 @@ /* Find line information for address. - Copyright (C) 2004, 2005 Red Hat, Inc. + Copyright (C) 2004, 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -45,32 +45,28 @@ dwarf_getsrc_die (Dwarf_Die *cudie, Dwarf_Addr addr) return NULL; /* The lines are sorted by address, so we can use binary search. */ - size_t l = 0, u = nlines; - while (l < u) - { - size_t idx = (l + u) / 2; - if (addr < lines->info[idx].addr) - u = idx; - else if (addr > lines->info[idx].addr || lines->info[idx].end_sequence) - l = idx + 1; - else - return &lines->info[idx]; - } - if (nlines > 0) - assert (lines->info[nlines - 1].end_sequence); - - /* If none were equal, the closest one below is what we want. We - never want the last one, because it's the end-sequence marker - with an address at the high bound of the CU's code. If the debug - information is faulty and no end-sequence marker is present, we - still ignore it. */ - if (u > 0 && u < nlines && addr > lines->info[u - 1].addr) { - while (lines->info[u - 1].end_sequence && u > 0) - --u; - if (u > 0) - return &lines->info[u - 1]; + size_t l = 0, u = nlines - 1; + while (l < u) + { + size_t idx = u - (u - l) / 2; + Dwarf_Line *line = &lines->info[idx]; + if (addr < line->addr) + u = idx - 1; + else + l = idx; + } + + /* This is guaranteed for us by libdw read_srclines. */ + assert (lines->info[nlines - 1].end_sequence); + + /* The last line which is less than or equal to addr is what we + want, unless it is the end_sequence which is after the + current line sequence. */ + Dwarf_Line *line = &lines->info[l]; + if (! line->end_sequence && line->addr <= addr) + return &lines->info[l]; } __libdw_seterrno (DWARF_E_ADDR_OUTOFRANGE); diff --git a/libdw/dwarf_getsrcdirs.c b/libdw/dwarf_getsrcdirs.c index 47283ec..8160ed3 100644 --- a/libdw/dwarf_getsrcdirs.c +++ b/libdw/dwarf_getsrcdirs.c @@ -34,10 +34,7 @@ int -dwarf_getsrcdirs (files, result, ndirs) - Dwarf_Files *files; - const char *const **result; - size_t *ndirs; +dwarf_getsrcdirs (Dwarf_Files *files, const char *const **result, size_t *ndirs) { if (files == NULL) return -1; diff --git a/libdw/dwarf_getsrcfiles.c b/libdw/dwarf_getsrcfiles.c index 4bfc34b..5af6f68 100644 --- a/libdw/dwarf_getsrcfiles.c +++ b/libdw/dwarf_getsrcfiles.c @@ -1,5 +1,5 @@ /* Return source file information of CU. - Copyright (C) 2004, 2005, 2013 Red Hat, Inc. + Copyright (C) 2004, 2005, 2013, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -39,10 +39,13 @@ int dwarf_getsrcfiles (Dwarf_Die *cudie, Dwarf_Files **files, size_t *nfiles) { - if (unlikely (cudie == NULL - || (INTUSE(dwarf_tag) (cudie) != DW_TAG_compile_unit - && INTUSE(dwarf_tag) (cudie) != DW_TAG_partial_unit))) + if (cudie == NULL) return -1; + if (! is_cudie (cudie)) + { + __libdw_seterrno (DWARF_E_NOT_CUDIE); + return -1; + } int res = -1; diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index 7b174cf..dd1b3c1 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -1,5 +1,5 @@ /* Return line number information of CU. - Copyright (C) 2004-2010, 2013 Red Hat, Inc. + Copyright (C) 2004-2010, 2013, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -34,6 +34,8 @@ #include #include #include +#include + #include "dwarf.h" #include "libdwP.h" @@ -48,6 +50,7 @@ struct linelist { Dwarf_Line line; struct linelist *next; + size_t sequence; }; @@ -55,704 +58,893 @@ struct linelist static int compare_lines (const void *a, const void *b) { - Dwarf_Line *const *p1 = a; - Dwarf_Line *const *p2 = b; + struct linelist *const *p1 = a; + struct linelist *const *p2 = b; + struct linelist *list1 = *p1; + struct linelist *list2 = *p2; + Dwarf_Line *line1 = &list1->line; + Dwarf_Line *line2 = &list2->line; + + if (line1->addr != line2->addr) + return (line1->addr < line2->addr) ? -1 : 1; + + /* An end_sequence marker precedes a normal record at the same address. */ + if (line1->end_sequence != line2->end_sequence) + return line2->end_sequence - line1->end_sequence; + + /* Otherwise, the linelist sequence maintains a stable sort. */ + return (list1->sequence < list2->sequence) ? -1 + : (list1->sequence > list2->sequence) ? 1 + : 0; +} - if ((*p1)->addr == (*p2)->addr) - /* An end_sequence marker precedes a normal record at the same address. */ - return (*p2)->end_sequence - (*p1)->end_sequence; +struct line_state +{ + Dwarf_Word addr; + unsigned int op_index; + unsigned int file; + int64_t line; + unsigned int column; + uint_fast8_t is_stmt; + bool basic_block; + bool prologue_end; + bool epilogue_begin; + unsigned int isa; + unsigned int discriminator; + struct linelist *linelist; + size_t nlinelist; + unsigned int end_sequence; +}; - return (*p1)->addr - (*p2)->addr; +static inline void +run_advance_pc (struct line_state *state, unsigned int op_advance, + uint_fast8_t minimum_instr_len, uint_fast8_t max_ops_per_instr) +{ + state->addr += minimum_instr_len * ((state->op_index + op_advance) + / max_ops_per_instr); + state->op_index = (state->op_index + op_advance) % max_ops_per_instr; } -int -dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) +static inline bool +add_new_line (struct line_state *state, struct linelist *new_line) { - if (unlikely (cudie == NULL - || (INTUSE(dwarf_tag) (cudie) != DW_TAG_compile_unit - && INTUSE(dwarf_tag) (cudie) != DW_TAG_partial_unit))) - return -1; + /* Set the line information. For some fields we use bitfields, + so we would lose information if the encoded values are too large. + Check just for paranoia, and call the data "invalid" if it + violates our assumptions on reasonable limits for the values. */ + new_line->next = state->linelist; + new_line->sequence = state->nlinelist; + state->linelist = new_line; + ++(state->nlinelist); + + /* Set the line information. For some fields we use bitfields, + so we would lose information if the encoded values are too large. + Check just for paranoia, and call the data "invalid" if it + violates our assumptions on reasonable limits for the values. */ +#define SET(field) \ + do { \ + new_line->line.field = state->field; \ + if (unlikely (new_line->line.field != state->field)) \ + return true; \ + } while (0) + + SET (addr); + SET (op_index); + SET (file); + SET (line); + SET (column); + SET (is_stmt); + SET (basic_block); + SET (end_sequence); + SET (prologue_end); + SET (epilogue_begin); + SET (isa); + SET (discriminator); +#undef SET + + return false; +} + +static int +read_srclines (Dwarf *dbg, + const unsigned char *linep, const unsigned char *lineendp, + const char *comp_dir, unsigned address_size, + Dwarf_Lines **linesp, Dwarf_Files **filesp) +{ int res = -1; - struct linelist *linelist = NULL; - unsigned int nlinelist = 0; + size_t nfilelist = 0; + unsigned int ndirlist = 0; - /* If there are a large number of lines don't blow up the stack. - Keep track of the last malloced linelist record and free them - through the next pointer at the end. */ + struct filelist null_file = + { + .info = + { + .name = "???", + .mtime = 0, + .length = 0 + }, + .next = NULL + }; + struct filelist *filelist = &null_file; + + /* If there are a large number of lines, files or dirs don't blow up + the stack. Stack allocate some entries, only dynamically malloc + when more than MAX. */ #define MAX_STACK_ALLOC 4096 - struct linelist *malloc_linelist = NULL; - - /* Get the information if it is not already known. */ - struct Dwarf_CU *const cu = cudie->cu; - if (cu->lines == NULL) +#define MAX_STACK_LINES MAX_STACK_ALLOC +#define MAX_STACK_FILES (MAX_STACK_ALLOC / 4) +#define MAX_STACK_DIRS (MAX_STACK_ALLOC / 16) + + struct dirlist + { + const char *dir; + size_t len; + }; + struct dirlist dirstack[MAX_STACK_DIRS]; + struct dirlist *dirarray = dirstack; + + /* We are about to process the statement program. Initialize the + state machine registers (see 6.2.2 in the v2.1 specification). */ + struct line_state state = { - /* Failsafe mode: no data found. */ - cu->lines = (void *) -1l; - cu->files = (void *) -1l; - - /* The die must have a statement list associated. */ - Dwarf_Attribute stmt_list_mem; - Dwarf_Attribute *stmt_list = INTUSE(dwarf_attr) (cudie, DW_AT_stmt_list, - &stmt_list_mem); + .linelist = NULL, + .nlinelist = 0, + .addr = 0, + .op_index = 0, + .file = 1, + /* We only store int but want to check for overflow (see SET above). */ + .line = 1, + .column = 0, + .basic_block = false, + .prologue_end = false, + .epilogue_begin = false, + .isa = 0, + .discriminator = 0 + }; + + if (unlikely (linep + 4 > lineendp)) + { + invalid_data: + __libdw_seterrno (DWARF_E_INVALID_DEBUG_LINE); + goto out; + } - /* Get the offset into the .debug_line section. NB: this call - also checks whether the previous dwarf_attr call failed. */ - const unsigned char *lineendp; - const unsigned char *linep - = __libdw_formptr (stmt_list, IDX_debug_line, DWARF_E_NO_DEBUG_LINE, - (unsigned char **) &lineendp, NULL); - if (linep == NULL) - goto out; - - /* Get the compilation directory. */ - Dwarf_Attribute compdir_attr_mem; - Dwarf_Attribute *compdir_attr = INTUSE(dwarf_attr) (cudie, - DW_AT_comp_dir, - &compdir_attr_mem); - const char *comp_dir = INTUSE(dwarf_formstring) (compdir_attr); - - if (unlikely (linep + 4 > lineendp)) - { - invalid_data: - __libdw_seterrno (DWARF_E_INVALID_DEBUG_LINE); - goto out; - } + Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, linep); + unsigned int length = 4; + if (unlikely (unit_length == DWARF3_LENGTH_64_BIT)) + { + if (unlikely (linep + 8 > lineendp)) + goto invalid_data; + unit_length = read_8ubyte_unaligned_inc (dbg, linep); + length = 8; + } - Dwarf *dbg = cu->dbg; - Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, linep); - unsigned int length = 4; - if (unlikely (unit_length == DWARF3_LENGTH_64_BIT)) - { - if (unlikely (linep + 8 > lineendp)) - goto invalid_data; - unit_length = read_8ubyte_unaligned_inc (dbg, linep); - length = 8; - } + /* Check whether we have enough room in the section. */ + if (unlikely (unit_length > (size_t) (lineendp - linep) + || unit_length < 2 + length + 5 * 1)) + goto invalid_data; + lineendp = linep + unit_length; - /* Check whether we have enough room in the section. */ - if (unit_length < 2 + length + 5 * 1 - || unlikely (linep + unit_length > lineendp)) - goto invalid_data; - lineendp = linep + unit_length; + /* The next element of the header is the version identifier. */ + uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep); + if (unlikely (version < 2) || unlikely (version > 4)) + { + __libdw_seterrno (DWARF_E_VERSION); + goto out; + } - /* The next element of the header is the version identifier. */ - uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep); - if (unlikely (version < 2) || unlikely (version > 4)) - { - __libdw_seterrno (DWARF_E_VERSION); - goto out; - } + /* Next comes the header length. */ + Dwarf_Word header_length; + if (length == 4) + header_length = read_4ubyte_unaligned_inc (dbg, linep); + else + header_length = read_8ubyte_unaligned_inc (dbg, linep); + const unsigned char *header_start = linep; - /* Next comes the header length. */ - Dwarf_Word header_length; - if (length == 4) - header_length = read_4ubyte_unaligned_inc (dbg, linep); - else - header_length = read_8ubyte_unaligned_inc (dbg, linep); - const unsigned char *header_start = linep; + /* Next the minimum instruction length. */ + uint_fast8_t minimum_instr_len = *linep++; - /* Next the minimum instruction length. */ - uint_fast8_t minimum_instr_len = *linep++; + /* Next the maximum operations per instruction, in version 4 format. */ + uint_fast8_t max_ops_per_instr = 1; + if (version >= 4) + { + if (unlikely (lineendp - linep < 5)) + goto invalid_data; + max_ops_per_instr = *linep++; + if (unlikely (max_ops_per_instr == 0)) + goto invalid_data; + } - /* Next the maximum operations per instruction, in version 4 format. */ - uint_fast8_t max_ops_per_instr = 1; - if (version >= 4) - { - if (unlikely (lineendp - linep < 5)) - goto invalid_data; - max_ops_per_instr = *linep++; - if (unlikely (max_ops_per_instr == 0)) - goto invalid_data; - } + /* Then the flag determining the default value of the is_stmt + register. */ + uint_fast8_t default_is_stmt = *linep++; - /* Then the flag determining the default value of the is_stmt - register. */ - uint_fast8_t default_is_stmt = *linep++; + /* Now the line base. */ + int_fast8_t line_base = (int8_t) *linep++; - /* Now the line base. */ - int_fast8_t line_base = (int8_t) *linep++; + /* And the line range. */ + uint_fast8_t line_range = *linep++; - /* And the line range. */ - uint_fast8_t line_range = *linep++; + /* The opcode base. */ + uint_fast8_t opcode_base = *linep++; - /* The opcode base. */ - uint_fast8_t opcode_base = *linep++; + /* Remember array with the standard opcode length (-1 to account for + the opcode with value zero not being mentioned). */ + const uint8_t *standard_opcode_lengths = linep - 1; + if (unlikely (lineendp - linep < opcode_base - 1)) + goto invalid_data; + linep += opcode_base - 1; - /* Remember array with the standard opcode length (-1 to account for - the opcode with value zero not being mentioned). */ - const uint8_t *standard_opcode_lengths = linep - 1; - if (unlikely (lineendp - linep < opcode_base - 1)) + /* First comes the list of directories. Add the compilation + directory first since the index zero is used for it. */ + struct dirlist comp_dir_elem = + { + .dir = comp_dir, + .len = comp_dir ? strlen (comp_dir) : 0, + }; + ndirlist = 1; + + /* First count the entries. */ + const unsigned char *dirp = linep; + while (*dirp != 0) + { + uint8_t *endp = memchr (dirp, '\0', lineendp - dirp); + if (endp == NULL) goto invalid_data; - linep += opcode_base - 1; + ++ndirlist; + dirp = endp + 1; + } - /* First comes the list of directories. Add the compilation - directory first since the index zero is used for it. */ - struct dirlist - { - const char *dir; - size_t len; - struct dirlist *next; - } comp_dir_elem = - { - .dir = comp_dir, - .len = comp_dir ? strlen (comp_dir) : 0, - .next = NULL - }; - struct dirlist *dirlist = &comp_dir_elem; - unsigned int ndirlist = 1; - - // XXX Directly construct array to conserve memory? - while (*linep != 0) + /* Arrange the list in array form. */ + if (ndirlist >= MAX_STACK_DIRS) + { + dirarray = (struct dirlist *) malloc (ndirlist * sizeof (*dirarray)); + if (unlikely (dirarray == NULL)) { - struct dirlist *new_dir = - (struct dirlist *) alloca (sizeof (*new_dir)); - - new_dir->dir = (char *) linep; - uint8_t *endp = memchr (linep, '\0', lineendp - linep); - if (endp == NULL) - goto invalid_data; - new_dir->len = endp - linep; - new_dir->next = dirlist; - dirlist = new_dir; - ++ndirlist; - linep = endp + 1; + no_mem: + __libdw_seterrno (DWARF_E_NOMEM); + goto out; } - /* Skip the final NUL byte. */ - ++linep; - - /* Rearrange the list in array form. */ - struct dirlist **dirarray - = (struct dirlist **) alloca (ndirlist * sizeof (*dirarray)); - for (unsigned int n = ndirlist; n-- > 0; dirlist = dirlist->next) - dirarray[n] = dirlist; + } + dirarray[0] = comp_dir_elem; + for (unsigned int n = 1; n < ndirlist; n++) + { + dirarray[n].dir = (char *) linep; + uint8_t *endp = memchr (linep, '\0', lineendp - linep); + assert (endp != NULL); + dirarray[n].len = endp - linep; + linep = endp + 1; + } + /* Skip the final NUL byte. */ + ++linep; + + /* Allocate memory for a new file. For the first MAX_STACK_FILES + entries just return a slot in the preallocated stack array. */ + struct filelist flstack[MAX_STACK_FILES]; +#define NEW_FILE() ({ \ + struct filelist *fl = (nfilelist < MAX_STACK_FILES \ + ? &flstack[nfilelist] \ + : malloc (sizeof (struct filelist))); \ + if (unlikely (fl == NULL)) \ + goto no_mem; \ + ++nfilelist; \ + fl->next = filelist; \ + filelist = fl; \ + fl; }) + + /* Now read the files. */ + nfilelist = 1; + + if (unlikely (linep >= lineendp)) + goto invalid_data; + while (*linep != 0) + { + struct filelist *new_file = NEW_FILE (); - /* Now read the files. */ - struct filelist null_file = - { - .info = - { - .name = "???", - .mtime = 0, - .length = 0 - }, - .next = NULL - }; - struct filelist *filelist = &null_file; - unsigned int nfilelist = 1; + /* First comes the file name. */ + char *fname = (char *) linep; + uint8_t *endp = memchr (fname, '\0', lineendp - linep); + if (endp == NULL) + goto invalid_data; + size_t fnamelen = endp - (uint8_t *) fname; + linep = endp + 1; + /* Then the index. */ + Dwarf_Word diridx; if (unlikely (linep >= lineendp)) goto invalid_data; - while (*linep != 0) + get_uleb128 (diridx, linep, lineendp); + if (unlikely (diridx >= ndirlist)) { - struct filelist *new_file = - (struct filelist *) alloca (sizeof (*new_file)); + __libdw_seterrno (DWARF_E_INVALID_DIR_IDX); + goto out; + } - /* First comes the file name. */ - char *fname = (char *) linep; - uint8_t *endp = memchr (fname, '\0', lineendp - linep); - if (endp == NULL) - goto invalid_data; - size_t fnamelen = endp - (uint8_t *) fname; - linep = endp + 1; + if (*fname == '/') + /* It's an absolute path. */ + new_file->info.name = fname; + else + { + new_file->info.name = libdw_alloc (dbg, char, 1, + dirarray[diridx].len + 1 + + fnamelen + 1); + char *cp = new_file->info.name; - /* Then the index. */ - Dwarf_Word diridx; - get_uleb128 (diridx, linep); - if (unlikely (diridx >= ndirlist)) + if (dirarray[diridx].dir != NULL) { - __libdw_seterrno (DWARF_E_INVALID_DIR_IDX); - goto out; + /* This value could be NULL in case the DW_AT_comp_dir + was not present. We cannot do much in this case. + The easiest thing is to convert the path in an + absolute path. */ + cp = stpcpy (cp, dirarray[diridx].dir); } - - if (*fname == '/') - /* It's an absolute path. */ - new_file->info.name = fname; - else - { - new_file->info.name = libdw_alloc (dbg, char, 1, - dirarray[diridx]->len + 1 - + fnamelen + 1); - char *cp = new_file->info.name; - - if (dirarray[diridx]->dir != NULL) - { - /* This value could be NULL in case the DW_AT_comp_dir - was not present. We cannot do much in this case. - The easiest thing is to convert the path in an - absolute path. */ - cp = stpcpy (cp, dirarray[diridx]->dir); - } - *cp++ = '/'; - strcpy (cp, fname); - assert (strlen (new_file->info.name) - < dirarray[diridx]->len + 1 + fnamelen + 1); - } - - /* Next comes the modification time. */ - get_uleb128 (new_file->info.mtime, linep); - - /* Finally the length of the file. */ - get_uleb128 (new_file->info.length, linep); - - new_file->next = filelist; - filelist = new_file; - ++nfilelist; + *cp++ = '/'; + strcpy (cp, fname); + assert (strlen (new_file->info.name) + < dirarray[diridx].len + 1 + fnamelen + 1); } - /* Skip the final NUL byte. */ - ++linep; - /* Consistency check. */ - if (unlikely (linep != header_start + header_length)) - { - __libdw_seterrno (DWARF_E_INVALID_DWARF); - goto out; - } + /* Next comes the modification time. */ + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (new_file->info.mtime, linep, lineendp); - /* We are about to process the statement program. Initialize the - state machine registers (see 6.2.2 in the v2.1 specification). */ - Dwarf_Word addr = 0; - unsigned int op_index = 0; - unsigned int file = 1; - int line = 1; - unsigned int column = 0; - uint_fast8_t is_stmt = default_is_stmt; - bool basic_block = false; - bool prologue_end = false; - bool epilogue_begin = false; - unsigned int isa = 0; - unsigned int discriminator = 0; - - /* Apply the "operation advance" from a special opcode - or DW_LNS_advance_pc (as per DWARF4 6.2.5.1). */ - inline void advance_pc (unsigned int op_advance) - { - addr += minimum_instr_len * ((op_index + op_advance) - / max_ops_per_instr); - op_index = (op_index + op_advance) % max_ops_per_instr; - } + /* Finally the length of the file. */ + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (new_file->info.length, linep, lineendp); + } + /* Skip the final NUL byte. */ + ++linep; + + /* Consistency check. */ + if (unlikely (linep != header_start + header_length)) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + goto out; + } - /* Process the instructions. */ + state.is_stmt = default_is_stmt; - /* Adds a new line to the matrix. - We cannot simply define a function because we want to use alloca. */ + /* Apply the "operation advance" from a special opcode or + DW_LNS_advance_pc (as per DWARF4 6.2.5.1). */ +#define advance_pc(op_advance) \ + run_advance_pc (&state, op_advance, minimum_instr_len, max_ops_per_instr) + + /* Process the instructions. */ + + /* Adds a new line to the matrix. For the first MAX_STACK_LINES + entries just return a slot in the preallocated stack array. */ + struct linelist llstack[MAX_STACK_LINES]; #define NEW_LINE(end_seq) \ - do { \ - struct linelist *ll = (nlinelist < MAX_STACK_ALLOC \ - ? alloca (sizeof (struct linelist)) \ - : malloc (sizeof (struct linelist))); \ - if (nlinelist >= MAX_STACK_ALLOC) \ - malloc_linelist = ll; \ - if (unlikely (add_new_line (ll, end_seq))) \ - goto invalid_data; \ - } while (0) - - inline bool add_new_line (struct linelist *new_line, bool end_sequence) - { - new_line->next = linelist; - linelist = new_line; - ++nlinelist; - - /* Set the line information. For some fields we use bitfields, - so we would lose information if the encoded values are too large. - Check just for paranoia, and call the data "invalid" if it - violates our assumptions on reasonable limits for the values. */ -#define SET(field) \ - do { \ - new_line->line.field = field; \ - if (unlikely (new_line->line.field != field)) \ - return true; \ - } while (0) - - SET (addr); - SET (op_index); - SET (file); - SET (line); - SET (column); - SET (is_stmt); - SET (basic_block); - SET (end_sequence); - SET (prologue_end); - SET (epilogue_begin); - SET (isa); - SET (discriminator); + do { \ + struct linelist *ll = (state.nlinelist < MAX_STACK_LINES \ + ? &llstack[state.nlinelist] \ + : malloc (sizeof (struct linelist))); \ + if (unlikely (ll == NULL)) \ + goto no_mem; \ + state.end_sequence = end_seq; \ + if (unlikely (add_new_line (&state, ll))) \ + goto invalid_data; \ + } while (0) + + while (linep < lineendp) + { + unsigned int opcode; + unsigned int u128; + int s128; -#undef SET + /* Read the opcode. */ + opcode = *linep++; + + /* Is this a special opcode? */ + if (likely (opcode >= opcode_base)) + { + if (unlikely (line_range == 0)) + goto invalid_data; + + /* Yes. Handling this is quite easy since the opcode value + is computed with + + opcode = (desired line increment - line_base) + + (line_range * address advance) + opcode_base + */ + int line_increment = (line_base + + (opcode - opcode_base) % line_range); + + /* Perform the increments. */ + state.line += line_increment; + advance_pc ((opcode - opcode_base) / line_range); - return false; - } + /* Add a new line with the current state machine values. */ + NEW_LINE (0); - while (linep < lineendp) + /* Reset the flags. */ + state.basic_block = false; + state.prologue_end = false; + state.epilogue_begin = false; + state.discriminator = 0; + } + else if (opcode == 0) { - unsigned int opcode; - unsigned int u128; - int s128; + /* This an extended opcode. */ + if (unlikely (lineendp - linep < 2)) + goto invalid_data; - /* Read the opcode. */ + /* The length. */ + uint_fast8_t len = *linep++; + + if (unlikely ((size_t) (lineendp - linep) < len)) + goto invalid_data; + + /* The sub-opcode. */ opcode = *linep++; - /* Is this a special opcode? */ - if (likely (opcode >= opcode_base)) + switch (opcode) { - /* Yes. Handling this is quite easy since the opcode value - is computed with + case DW_LNE_end_sequence: + /* Add a new line with the current state machine values. + The is the end of the sequence. */ + NEW_LINE (1); + + /* Reset the registers. */ + state.addr = 0; + state.op_index = 0; + state.file = 1; + state.line = 1; + state.column = 0; + state.is_stmt = default_is_stmt; + state.basic_block = false; + state.prologue_end = false; + state.epilogue_begin = false; + state.isa = 0; + state.discriminator = 0; + break; + + case DW_LNE_set_address: + /* The value is an address. The size is defined as + apporiate for the target machine. We use the + address size field from the CU header. */ + state.op_index = 0; + if (unlikely (lineendp - linep < (uint8_t) address_size)) + goto invalid_data; + if (__libdw_read_address_inc (dbg, IDX_debug_line, &linep, + address_size, &state.addr)) + goto out; + break; + + case DW_LNE_define_file: + { + char *fname = (char *) linep; + uint8_t *endp = memchr (linep, '\0', lineendp - linep); + if (endp == NULL) + goto invalid_data; + size_t fnamelen = endp - linep; + linep = endp + 1; + + unsigned int diridx; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (diridx, linep, lineendp); + if (unlikely (diridx >= ndirlist)) + { + __libdw_seterrno (DWARF_E_INVALID_DIR_IDX); + goto invalid_data; + } + Dwarf_Word mtime; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (mtime, linep, lineendp); + Dwarf_Word filelength; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (filelength, linep, lineendp); + + struct filelist *new_file = NEW_FILE (); + if (fname[0] == '/') + new_file->info.name = fname; + else + { + new_file->info.name = + libdw_alloc (dbg, char, 1, (dirarray[diridx].len + 1 + + fnamelen + 1)); + char *cp = new_file->info.name; + + if (dirarray[diridx].dir != NULL) + /* This value could be NULL in case the + DW_AT_comp_dir was not present. We + cannot do much in this case. The easiest + thing is to convert the path in an + absolute path. */ + cp = stpcpy (cp, dirarray[diridx].dir); + *cp++ = '/'; + strcpy (cp, fname); + } - opcode = (desired line increment - line_base) - + (line_range * address advance) + opcode_base - */ - int line_increment = (line_base - + (opcode - opcode_base) % line_range); + new_file->info.mtime = mtime; + new_file->info.length = filelength; + } + break; - /* Perform the increments. */ - line += line_increment; - advance_pc ((opcode - opcode_base) / line_range); + case DW_LNE_set_discriminator: + /* Takes one ULEB128 parameter, the discriminator. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) + goto invalid_data; + + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (state.discriminator, linep, lineendp); + break; + + default: + /* Unknown, ignore it. */ + if (unlikely ((size_t) (lineendp - (linep - 1)) < len)) + goto invalid_data; + linep += len - 1; + break; + } + } + else if (opcode <= DW_LNS_set_isa) + { + /* This is a known standard opcode. */ + switch (opcode) + { + case DW_LNS_copy: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; /* Add a new line with the current state machine values. */ NEW_LINE (0); /* Reset the flags. */ - basic_block = false; - prologue_end = false; - epilogue_begin = false; - discriminator = 0; - } - else if (opcode == 0) - { - /* This an extended opcode. */ - if (unlikely (lineendp - linep < 2)) + state.basic_block = false; + state.prologue_end = false; + state.epilogue_begin = false; + state.discriminator = 0; + break; + + case DW_LNS_advance_pc: + /* Takes one uleb128 parameter which is added to the + address. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) goto invalid_data; - /* The length. */ - uint_fast8_t len = *linep++; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (u128, linep, lineendp); + advance_pc (u128); + break; + + case DW_LNS_advance_line: + /* Takes one sleb128 parameter which is added to the + line. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) + goto invalid_data; - if (unlikely ((size_t) (lineendp - linep) < len)) + if (unlikely (linep >= lineendp)) goto invalid_data; + get_sleb128 (s128, linep, lineendp); + state.line += s128; + break; - /* The sub-opcode. */ - opcode = *linep++; - - switch (opcode) - { - case DW_LNE_end_sequence: - /* Add a new line with the current state machine values. - The is the end of the sequence. */ - NEW_LINE (1); - - /* Reset the registers. */ - addr = 0; - op_index = 0; - file = 1; - line = 1; - column = 0; - is_stmt = default_is_stmt; - basic_block = false; - prologue_end = false; - epilogue_begin = false; - isa = 0; - discriminator = 0; - break; - - case DW_LNE_set_address: - /* The value is an address. The size is defined as - apporiate for the target machine. We use the - address size field from the CU header. */ - op_index = 0; - if (unlikely (lineendp - linep < cu->address_size)) - goto invalid_data; - if (__libdw_read_address_inc (dbg, IDX_debug_line, &linep, - cu->address_size, &addr)) - goto out; - break; + case DW_LNS_set_file: + /* Takes one uleb128 parameter which is stored in file. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) + goto invalid_data; - case DW_LNE_define_file: - { - char *fname = (char *) linep; - uint8_t *endp = memchr (linep, '\0', lineendp - linep); - if (endp == NULL) - goto invalid_data; - size_t fnamelen = endp - linep; - linep = endp + 1; - - unsigned int diridx; - get_uleb128 (diridx, linep); - Dwarf_Word mtime; - get_uleb128 (mtime, linep); - Dwarf_Word filelength; - get_uleb128 (filelength, linep); - - struct filelist *new_file = - (struct filelist *) alloca (sizeof (*new_file)); - if (fname[0] == '/') - new_file->info.name = fname; - else - { - new_file->info.name = - libdw_alloc (dbg, char, 1, (dirarray[diridx]->len + 1 - + fnamelen + 1)); - char *cp = new_file->info.name; - - if (dirarray[diridx]->dir != NULL) - /* This value could be NULL in case the - DW_AT_comp_dir was not present. We - cannot do much in this case. The easiest - thing is to convert the path in an - absolute path. */ - cp = stpcpy (cp, dirarray[diridx]->dir); - *cp++ = '/'; - strcpy (cp, fname); - } - - new_file->info.mtime = mtime; - new_file->info.length = filelength; - new_file->next = filelist; - filelist = new_file; - ++nfilelist; - } - break; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (u128, linep, lineendp); + state.file = u128; + break; - case DW_LNE_set_discriminator: - /* Takes one ULEB128 parameter, the discriminator. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + case DW_LNS_set_column: + /* Takes one uleb128 parameter which is stored in column. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) + goto invalid_data; - get_uleb128 (discriminator, linep); - break; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (u128, linep, lineendp); + state.column = u128; + break; - default: - /* Unknown, ignore it. */ - if (unlikely ((size_t) (lineendp - (linep - 1)) < len)) - goto invalid_data; - linep += len - 1; - break; - } - } - else if (opcode <= DW_LNS_set_isa) - { - /* This is a known standard opcode. */ - switch (opcode) - { - case DW_LNS_copy: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + case DW_LNS_negate_stmt: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - /* Add a new line with the current state machine values. */ - NEW_LINE (0); + state.is_stmt = 1 - state.is_stmt; + break; - /* Reset the flags. */ - basic_block = false; - prologue_end = false; - epilogue_begin = false; - discriminator = 0; - break; + case DW_LNS_set_basic_block: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - case DW_LNS_advance_pc: - /* Takes one uleb128 parameter which is added to the - address. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + state.basic_block = true; + break; - get_uleb128 (u128, linep); - advance_pc (u128); - break; + case DW_LNS_const_add_pc: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - case DW_LNS_advance_line: - /* Takes one sleb128 parameter which is added to the - line. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + if (unlikely (line_range == 0)) + goto invalid_data; - get_sleb128 (s128, linep); - line += s128; - break; + advance_pc ((255 - opcode_base) / line_range); + break; - case DW_LNS_set_file: - /* Takes one uleb128 parameter which is stored in file. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + case DW_LNS_fixed_advance_pc: + /* Takes one 16 bit parameter which is added to the + address. */ + if (unlikely (standard_opcode_lengths[opcode] != 1) + || unlikely (lineendp - linep < 2)) + goto invalid_data; - get_uleb128 (u128, linep); - file = u128; - break; + state.addr += read_2ubyte_unaligned_inc (dbg, linep); + state.op_index = 0; + break; - case DW_LNS_set_column: - /* Takes one uleb128 parameter which is stored in column. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + case DW_LNS_set_prologue_end: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - get_uleb128 (u128, linep); - column = u128; - break; + state.prologue_end = true; + break; - case DW_LNS_negate_stmt: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + case DW_LNS_set_epilogue_begin: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - is_stmt = 1 - is_stmt; - break; + state.epilogue_begin = true; + break; - case DW_LNS_set_basic_block: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + case DW_LNS_set_isa: + /* Takes one uleb128 parameter which is stored in isa. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) + goto invalid_data; - basic_block = true; - break; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (state.isa, linep, lineendp); + break; + } + } + else + { + /* This is a new opcode the generator but not we know about. + Read the parameters associated with it but then discard + everything. Read all the parameters for this opcode. */ + for (int n = standard_opcode_lengths[opcode]; n > 0; --n) + { + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (u128, linep, lineendp); + } - case DW_LNS_const_add_pc: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + /* Next round, ignore this opcode. */ + continue; + } + } - advance_pc ((255 - opcode_base) / line_range); - break; + /* Put all the files in an array. */ + Dwarf_Files *files = libdw_alloc (dbg, Dwarf_Files, + sizeof (Dwarf_Files) + + nfilelist * sizeof (Dwarf_Fileinfo) + + (ndirlist + 1) * sizeof (char *), + 1); + const char **dirs = (void *) &files->info[nfilelist]; + + struct filelist *fileslist = filelist; + files->nfiles = nfilelist; + for (size_t n = nfilelist; n > 0; n--) + { + files->info[n - 1] = fileslist->info; + fileslist = fileslist->next; + } + assert (fileslist == NULL); + + /* Put all the directory strings in an array. */ + files->ndirs = ndirlist; + for (unsigned int i = 0; i < ndirlist; ++i) + dirs[i] = dirarray[i].dir; + dirs[ndirlist] = NULL; + + /* Pass the file data structure to the caller. */ + if (filesp != NULL) + *filesp = files; + + size_t buf_size = (sizeof (Dwarf_Lines) + + (sizeof (Dwarf_Line) * state.nlinelist)); + void *buf = libdw_alloc (dbg, Dwarf_Lines, buf_size, 1); + + /* First use the buffer for the pointers, and sort the entries. + We'll write the pointers in the end of the buffer, and then + copy into the buffer from the beginning so the overlap works. */ + assert (sizeof (Dwarf_Line) >= sizeof (struct linelist *)); + struct linelist **sortlines = (buf + buf_size + - sizeof (struct linelist **) * state.nlinelist); + + /* The list is in LIFO order and usually they come in clumps with + ascending addresses. So fill from the back to probably start with + runs already in order before we sort. */ + struct linelist *lineslist = state.linelist; + for (size_t i = state.nlinelist; i-- > 0; ) + { + sortlines[i] = lineslist; + lineslist = lineslist->next; + } + assert (lineslist == NULL); - case DW_LNS_fixed_advance_pc: - /* Takes one 16 bit parameter which is added to the - address. */ - if (unlikely (standard_opcode_lengths[opcode] != 1) - || unlikely (lineendp - linep < 2)) - goto invalid_data; + /* Sort by ascending address. */ + qsort (sortlines, state.nlinelist, sizeof sortlines[0], &compare_lines); - addr += read_2ubyte_unaligned_inc (dbg, linep); - op_index = 0; - break; + /* Now that they are sorted, put them in the final array. + The buffers overlap, so we've clobbered the early elements + of SORTLINES by the time we're reading the later ones. */ + Dwarf_Lines *lines = buf; + lines->nlines = state.nlinelist; + for (size_t i = 0; i < state.nlinelist; ++i) + { + lines->info[i] = sortlines[i]->line; + lines->info[i].files = files; + } - case DW_LNS_set_prologue_end: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + /* Make sure the highest address for the CU is marked as end_sequence. + This is required by the DWARF spec, but some compilers forget and + dwfl_module_getsrc depends on it. */ + if (state.nlinelist > 0) + lines->info[state.nlinelist - 1].end_sequence = 1; - prologue_end = true; - break; + /* Pass the line structure back to the caller. */ + if (linesp != NULL) + *linesp = lines; - case DW_LNS_set_epilogue_begin: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + /* Success. */ + res = 0; - epilogue_begin = true; - break; + out: + /* Free malloced line records, if any. */ + for (size_t i = MAX_STACK_LINES; i < state.nlinelist; i++) + { + struct linelist *ll = state.linelist->next; + free (state.linelist); + state.linelist = ll; + } + if (ndirlist >= MAX_STACK_DIRS) + free (dirarray); + for (size_t i = MAX_STACK_FILES; i < nfilelist; i++) + { + struct filelist *fl = filelist->next; + free (filelist); + filelist = fl; + } - case DW_LNS_set_isa: - /* Takes one uleb128 parameter which is stored in isa. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + return res; +} - get_uleb128 (isa, linep); - break; - } - } - else - { - /* This is a new opcode the generator but not we know about. - Read the parameters associated with it but then discard - everything. Read all the parameters for this opcode. */ - for (int n = standard_opcode_lengths[opcode]; n > 0; --n) - get_uleb128 (u128, linep); - - /* Next round, ignore this opcode. */ - continue; - } - } +static int +files_lines_compare (const void *p1, const void *p2) +{ + const struct files_lines_s *t1 = p1; + const struct files_lines_s *t2 = p2; - /* Put all the files in an array. */ - Dwarf_Files *files = libdw_alloc (dbg, Dwarf_Files, - sizeof (Dwarf_Files) - + nfilelist * sizeof (Dwarf_Fileinfo) - + (ndirlist + 1) * sizeof (char *), - 1); - const char **dirs = (void *) &files->info[nfilelist]; + if (t1->debug_line_offset < t2->debug_line_offset) + return -1; + if (t1->debug_line_offset > t2->debug_line_offset) + return 1; - files->nfiles = nfilelist; - while (nfilelist-- > 0) - { - files->info[nfilelist] = filelist->info; - filelist = filelist->next; - } - assert (filelist == NULL); - - /* Put all the directory strings in an array. */ - files->ndirs = ndirlist; - for (unsigned int i = 0; i < ndirlist; ++i) - dirs[i] = dirarray[i]->dir; - dirs[ndirlist] = NULL; - - /* Remember the referring CU. */ - files->cu = cu; - - /* Make the file data structure available through the CU. */ - cu->files = files; - - void *buf = libdw_alloc (dbg, Dwarf_Lines, (sizeof (Dwarf_Lines) - + (sizeof (Dwarf_Line) - * nlinelist)), 1); - - /* First use the buffer for the pointers, and sort the entries. - We'll write the pointers in the end of the buffer, and then - copy into the buffer from the beginning so the overlap works. */ - assert (sizeof (Dwarf_Line) >= sizeof (Dwarf_Line *)); - Dwarf_Line **sortlines = (buf + sizeof (Dwarf_Lines) - + ((sizeof (Dwarf_Line) - - sizeof (Dwarf_Line *)) * nlinelist)); - - /* The list is in LIFO order and usually they come in clumps with - ascending addresses. So fill from the back to probably start with - runs already in order before we sort. */ - unsigned int i = nlinelist; - while (i-- > 0) - { - sortlines[i] = &linelist->line; - linelist = linelist->next; - } - assert (linelist == NULL); + return 0; +} + +int +internal_function +__libdw_getsrclines (Dwarf *dbg, Dwarf_Off debug_line_offset, + const char *comp_dir, unsigned address_size, + Dwarf_Lines **linesp, Dwarf_Files **filesp) +{ + struct files_lines_s fake = { .debug_line_offset = debug_line_offset }; + struct files_lines_s **found = tfind (&fake, &dbg->files_lines, + files_lines_compare); + if (found == NULL) + { + Elf_Data *data = __libdw_checked_get_data (dbg, IDX_debug_line); + if (data == NULL + || __libdw_offset_in_section (dbg, IDX_debug_line, + debug_line_offset, 1) != 0) + return -1; + + const unsigned char *linep = data->d_buf + debug_line_offset; + const unsigned char *lineendp = data->d_buf + data->d_size; + + struct files_lines_s *node = libdw_alloc (dbg, struct files_lines_s, + sizeof *node, 1); - /* Sort by ascending address. */ - qsort (sortlines, nlinelist, sizeof sortlines[0], &compare_lines); + if (read_srclines (dbg, linep, lineendp, comp_dir, address_size, + &node->lines, &node->files) != 0) + return -1; - /* Now that they are sorted, put them in the final array. - The buffers overlap, so we've clobbered the early elements - of SORTLINES by the time we're reading the later ones. */ - cu->lines = buf; - cu->lines->nlines = nlinelist; - for (i = 0; i < nlinelist; ++i) + node->debug_line_offset = debug_line_offset; + + found = tsearch (node, &dbg->files_lines, files_lines_compare); + if (found == NULL) { - cu->lines->info[i] = *sortlines[i]; - cu->lines->info[i].files = files; + __libdw_seterrno (DWARF_E_NOMEM); + return -1; } + } - /* Make sure the highest address for the CU is marked as end_sequence. - This is required by the DWARF spec, but some compilers forget and - dwfl_module_getsrc depends on it. */ - if (nlinelist > 0) - cu->lines->info[nlinelist - 1].end_sequence = 1; + if (linesp != NULL) + *linesp = (*found)->lines; - /* Success. */ - res = 0; - } - else if (cu->lines != (void *) -1l) - /* We already have the information. */ - res = 0; + if (filesp != NULL) + *filesp = (*found)->files; - if (likely (res == 0)) + return 0; +} + +/* Get the compilation directory, if any is set. */ +const char * +__libdw_getcompdir (Dwarf_Die *cudie) +{ + Dwarf_Attribute compdir_attr_mem; + Dwarf_Attribute *compdir_attr = INTUSE(dwarf_attr) (cudie, + DW_AT_comp_dir, + &compdir_attr_mem); + return INTUSE(dwarf_formstring) (compdir_attr); +} + +int +dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) +{ + if (cudie == NULL) + return -1; + if (! is_cudie (cudie)) { - *lines = cu->lines; - *nlines = cu->lines->nlines; + __libdw_seterrno (DWARF_E_NOT_CUDIE); + return -1; } - out: - /* Free malloced line records, if any. */ - for (unsigned int i = MAX_STACK_ALLOC; i < nlinelist; i++) + /* Get the information if it is not already known. */ + struct Dwarf_CU *const cu = cudie->cu; + if (cu->lines == NULL) { - struct linelist *ll = malloc_linelist->next; - free (malloc_linelist); - malloc_linelist = ll; + /* Failsafe mode: no data found. */ + cu->lines = (void *) -1l; + cu->files = (void *) -1l; + + /* The die must have a statement list associated. */ + Dwarf_Attribute stmt_list_mem; + Dwarf_Attribute *stmt_list = INTUSE(dwarf_attr) (cudie, DW_AT_stmt_list, + &stmt_list_mem); + + /* Get the offset into the .debug_line section. NB: this call + also checks whether the previous dwarf_attr call failed. */ + Dwarf_Off debug_line_offset; + if (__libdw_formptr (stmt_list, IDX_debug_line, DWARF_E_NO_DEBUG_LINE, + NULL, &debug_line_offset) == NULL) + return -1; + + if (__libdw_getsrclines (cu->dbg, debug_line_offset, + __libdw_getcompdir (cudie), + cu->address_size, &cu->lines, &cu->files) < 0) + return -1; } + else if (cu->lines == (void *) -1l) + return -1; + + *lines = cu->lines; + *nlines = cu->lines->nlines; // XXX Eventually: unlocking here. - return res; + return 0; } INTDEF(dwarf_getsrclines) diff --git a/libdw/dwarf_getstring.c b/libdw/dwarf_getstring.c index 672bb27..5620cb0 100644 --- a/libdw/dwarf_getstring.c +++ b/libdw/dwarf_getstring.c @@ -36,10 +36,7 @@ const char * -dwarf_getstring (dbg, offset, lenp) - Dwarf *dbg; - Dwarf_Off offset; - size_t *lenp; +dwarf_getstring (Dwarf *dbg, Dwarf_Off offset, size_t *lenp) { if (dbg == NULL) return NULL; diff --git a/libdw/dwarf_hasattr.c b/libdw/dwarf_hasattr.c index 7933c1c..2bb8dc8 100644 --- a/libdw/dwarf_hasattr.c +++ b/libdw/dwarf_hasattr.c @@ -1,5 +1,5 @@ /* Check whether given DIE has specific attribute. - Copyright (C) 2003, 2005 Red Hat, Inc. + Copyright (C) 2003, 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -36,17 +36,48 @@ int -dwarf_hasattr (die, search_name) - Dwarf_Die *die; - unsigned int search_name; +dwarf_hasattr (Dwarf_Die *die, unsigned int search_name) { if (die == NULL) return 0; - /* Search for the attribute with the given name. */ - unsigned int code; - (void) __libdw_find_attr (die, search_name, &code, NULL); + /* Find the abbreviation entry. */ + Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL); + if (unlikely (abbrevp == DWARF_END_ABBREV)) + { + invalid_dwarf: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return 0; + } - return code == search_name; + Dwarf *dbg = die->cu->dbg; + + /* Search the name attribute. */ + unsigned char *const endp + = ((unsigned char *) dbg->sectiondata[IDX_debug_abbrev]->d_buf + + dbg->sectiondata[IDX_debug_abbrev]->d_size); + + const unsigned char *attrp = abbrevp->attrp; + while (1) + { + /* Are we still in bounds? This test needs to be refined. */ + if (unlikely (attrp >= endp)) + goto invalid_dwarf; + + /* Get attribute name and form. */ + unsigned int attr_name; + get_uleb128 (attr_name, attrp, endp); + unsigned int attr_form; + if (unlikely (attrp >= endp)) + goto invalid_dwarf; + get_uleb128 (attr_form, attrp, endp); + + /* We can stop if we found the attribute with value zero. */ + if (attr_name == 0 || attr_form == 0) + return 0; + + if (attr_name == search_name) + return 1; + } } INTDEF (dwarf_hasattr) diff --git a/libdw/dwarf_haschildren.c b/libdw/dwarf_haschildren.c index b227398..03a8173 100644 --- a/libdw/dwarf_haschildren.c +++ b/libdw/dwarf_haschildren.c @@ -1,5 +1,5 @@ /* Return string associated with given attribute. - Copyright (C) 2003, 2005, 2008 Red Hat, Inc. + Copyright (C) 2003, 2005, 2008, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -36,29 +36,16 @@ int -dwarf_haschildren (die) - Dwarf_Die *die; +dwarf_haschildren (Dwarf_Die *die) { /* Find the abbreviation entry. */ - Dwarf_Abbrev *abbrevp = die->abbrev; - if (abbrevp != DWARF_END_ABBREV) - { - const unsigned char *readp = (unsigned char *) die->addr; - - /* First we have to get the abbreviation code so that we can decode - the data in the DIE. */ - unsigned int abbrev_code; - get_uleb128 (abbrev_code, readp); - - abbrevp = __libdw_findabbrev (die->cu, abbrev_code); - die->abbrev = abbrevp ?: DWARF_END_ABBREV; - } - if (unlikely (die->abbrev == DWARF_END_ABBREV)) + Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL); + if (unlikely (abbrevp == DWARF_END_ABBREV)) { __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1; } - return die->abbrev->has_children; + return abbrevp->has_children; } INTDEF (dwarf_haschildren) diff --git a/libdw/dwarf_hasform.c b/libdw/dwarf_hasform.c index a95ca9e..a0c3229 100644 --- a/libdw/dwarf_hasform.c +++ b/libdw/dwarf_hasform.c @@ -36,9 +36,7 @@ int -dwarf_hasform (attr, search_form) - Dwarf_Attribute *attr; - unsigned int search_form; +dwarf_hasform (Dwarf_Attribute *attr, unsigned int search_form) { if (attr == NULL) return 0; diff --git a/libdw/dwarf_highpc.c b/libdw/dwarf_highpc.c index 8bf93f0..2070254 100644 --- a/libdw/dwarf_highpc.c +++ b/libdw/dwarf_highpc.c @@ -36,9 +36,7 @@ int -dwarf_highpc (die, return_addr) - Dwarf_Die *die; - Dwarf_Addr *return_addr; +dwarf_highpc (Dwarf_Die *die, Dwarf_Addr *return_addr) { Dwarf_Attribute attr_high_mem; Dwarf_Attribute *attr_high = INTUSE(dwarf_attr) (die, DW_AT_high_pc, diff --git a/libdw/dwarf_lowpc.c b/libdw/dwarf_lowpc.c index 4677aed..b3be2b0 100644 --- a/libdw/dwarf_lowpc.c +++ b/libdw/dwarf_lowpc.c @@ -36,9 +36,7 @@ int -dwarf_lowpc (die, return_addr) - Dwarf_Die *die; - Dwarf_Addr *return_addr; +dwarf_lowpc (Dwarf_Die *die, Dwarf_Addr *return_addr) { Dwarf_Attribute attr_mem; diff --git a/libdw/dwarf_macro_getparamcnt.c b/libdw/dwarf_macro_getparamcnt.c new file mode 100644 index 0000000..e218eb1 --- /dev/null +++ b/libdw/dwarf_macro_getparamcnt.c @@ -0,0 +1,43 @@ +/* Return number of parameters of a macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwP.h" + +int +dwarf_macro_getparamcnt (Dwarf_Macro *macro, size_t *paramcntp) +{ + if (macro == NULL) + return -1; + + *paramcntp = libdw_macro_nforms (macro); + return 0; +} diff --git a/libdw/dwarf_macro_getsrcfiles.c b/libdw/dwarf_macro_getsrcfiles.c new file mode 100644 index 0000000..3b1794b --- /dev/null +++ b/libdw/dwarf_macro_getsrcfiles.c @@ -0,0 +1,86 @@ +/* Find line information for a given macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwP.h" + +int +dwarf_macro_getsrcfiles (Dwarf *dbg, Dwarf_Macro *macro, + Dwarf_Files **files, size_t *nfiles) +{ + /* macro is declared NN */ + Dwarf_Macro_Op_Table *const table = macro->table; + if (table->files == NULL) + { + Dwarf_Off line_offset = table->line_offset; + if (line_offset == (Dwarf_Off) -1) + { + *files = NULL; + *nfiles = 0; + return 0; + } + + /* If TABLE->comp_dir is NULL that could mean any of the + following: + + - The macro unit is not bound to a CU. It's an auxiliary + unit used purely for import from other units. In that case + there's actually no COMP_DIR value that we could use. + + - The macro unit is bound to a CU, but there's no + DW_AT_comp_dir attribute at the CU DIE. + + - The macro unit is bound to a CU, but we don't know that, + likely because its iteration was requested through + dwarf_getmacros_off interface. This might be legitimate if + one macro unit imports another CU's macro unit, but that is + unlikely to happen in practice. Most probably this is not + legitimate use of the interfaces. + + So when the interfaces are used correctly, COMP_DIR value is + always right. That means that we can cache the parsed + .debug_line unit without fear that later on someone requests + the same unit through dwarf_getsrcfiles, and the file names + will be broken. */ + + if (__libdw_getsrclines (dbg, line_offset, table->comp_dir, + table->is_64bit ? 8 : 4, + NULL, &table->files) < 0) + table->files = (void *) -1; + } + + if (table->files == (void *) -1) + return -1; + + *files = table->files; + *nfiles = table->files->nfiles; + return 0; +} diff --git a/libdw/dwarf_macro_param.c b/libdw/dwarf_macro_param.c new file mode 100644 index 0000000..bd846a7 --- /dev/null +++ b/libdw/dwarf_macro_param.c @@ -0,0 +1,46 @@ +/* Return a given parameter of a macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwP.h" + +int +dwarf_macro_param (Dwarf_Macro *macro, size_t idx, Dwarf_Attribute *ret) +{ + if (macro == NULL) + return -1; + + if (idx >= libdw_macro_nforms (macro)) + return -1; + + *ret = macro->attributes[idx]; + return 0; +} diff --git a/libdw/dwarf_macro_param1.c b/libdw/dwarf_macro_param1.c index 35d4a71..87ce003 100644 --- a/libdw/dwarf_macro_param1.c +++ b/libdw/dwarf_macro_param1.c @@ -1,5 +1,5 @@ /* Return first macro parameter. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -40,7 +40,9 @@ dwarf_macro_param1 (Dwarf_Macro *macro, Dwarf_Word *paramp) if (macro == NULL) return -1; - *paramp = macro->param1; + Dwarf_Attribute param; + if (dwarf_macro_param (macro, 0, ¶m) != 0) + return -1; - return 0; + return dwarf_formudata (¶m, paramp); } diff --git a/libdw/dwarf_macro_param2.c b/libdw/dwarf_macro_param2.c index b49e60e..cc902c9 100644 --- a/libdw/dwarf_macro_param2.c +++ b/libdw/dwarf_macro_param2.c @@ -1,5 +1,5 @@ /* Return second macro parameter. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -40,10 +40,16 @@ dwarf_macro_param2 (Dwarf_Macro *macro, Dwarf_Word *paramp, const char **strp) if (macro == NULL) return -1; - if (paramp != NULL) - *paramp = macro->param2.u; - if (strp != NULL) - *strp = macro->param2.s; + Dwarf_Attribute param; + if (dwarf_macro_param (macro, 1, ¶m) != 0) + return -1; - return 0; + if (param.form == DW_FORM_string + || param.form == DW_FORM_strp) + { + *strp = dwarf_formstring (¶m); + return 0; + } + else + return dwarf_formudata (¶m, paramp); } diff --git a/libdw/dwarf_next_cfi.c b/libdw/dwarf_next_cfi.c index 80b7dfa..53fc369 100644 --- a/libdw/dwarf_next_cfi.c +++ b/libdw/dwarf_next_cfi.c @@ -1,5 +1,5 @@ /* Advance to next CFI entry. - Copyright (C) 2009-2010 Red Hat, Inc. + Copyright (C) 2009-2010, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,13 +37,12 @@ int -dwarf_next_cfi (e_ident, data, eh_frame_p, off, next_off, entry) - const unsigned char e_ident[]; - Elf_Data *data; - bool eh_frame_p; - Dwarf_Off off; - Dwarf_Off *next_off; - Dwarf_CFI_Entry *entry; +dwarf_next_cfi (const unsigned char e_ident[], + Elf_Data *data, + bool eh_frame_p, + Dwarf_Off off, + Dwarf_Off *next_off, + Dwarf_CFI_Entry *entry) { /* Dummy struct for memory-access.h macros. */ BYTE_ORDER_DUMMY (dw, e_ident); @@ -170,11 +169,19 @@ dwarf_next_cfi (e_ident, data, eh_frame_p, off, next_off, entry) bytes += address_size; } - get_uleb128 (entry->cie.code_alignment_factor, bytes); - get_sleb128 (entry->cie.data_alignment_factor, bytes); + if (bytes >= limit) + goto invalid; + get_uleb128 (entry->cie.code_alignment_factor, bytes, limit); + + if (bytes >= limit) + goto invalid; + get_sleb128 (entry->cie.data_alignment_factor, bytes, limit); + + if (bytes >= limit) + goto invalid; if (version >= 3) /* DWARF 3+ */ - get_uleb128 (entry->cie.return_address_register, bytes); + get_uleb128 (entry->cie.return_address_register, bytes, limit); else /* DWARF 2 */ entry->cie.return_address_register = *bytes++; @@ -184,7 +191,9 @@ dwarf_next_cfi (e_ident, data, eh_frame_p, off, next_off, entry) bool sized_augmentation = *ap == 'z'; if (sized_augmentation) { - get_uleb128 (entry->cie.augmentation_data_size, bytes); + if (bytes >= limit) + goto invalid; + get_uleb128 (entry->cie.augmentation_data_size, bytes, limit); if ((Dwarf_Word) (limit - bytes) < entry->cie.augmentation_data_size) goto invalid; entry->cie.augmentation_data = bytes; diff --git a/libdw/dwarf_nextcu.c b/libdw/dwarf_nextcu.c index 875d869..fa9b0af 100644 --- a/libdw/dwarf_nextcu.c +++ b/libdw/dwarf_nextcu.c @@ -36,18 +36,11 @@ int -dwarf_next_unit (dwarf, off, next_off, header_sizep, versionp, abbrev_offsetp, - address_sizep, offset_sizep, type_signaturep, type_offsetp) - Dwarf *dwarf; - Dwarf_Off off; - Dwarf_Off *next_off; - size_t *header_sizep; - Dwarf_Half *versionp; - Dwarf_Off *abbrev_offsetp; - uint8_t *address_sizep; - uint8_t *offset_sizep; - uint64_t *type_signaturep; - Dwarf_Off *type_offsetp; +dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, + size_t *header_sizep, Dwarf_Half *versionp, + Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep, + uint8_t *offset_sizep, uint64_t *type_signaturep, + Dwarf_Off *type_offsetp) { const bool debug_types = type_signaturep != NULL; const size_t sec_idx = debug_types ? IDX_debug_types : IDX_debug_info; @@ -182,15 +175,9 @@ dwarf_next_unit (dwarf, off, next_off, header_sizep, versionp, abbrev_offsetp, INTDEF(dwarf_next_unit) int -dwarf_nextcu (dwarf, off, next_off, header_sizep, abbrev_offsetp, - address_sizep, offset_sizep) - Dwarf *dwarf; - Dwarf_Off off; - Dwarf_Off *next_off; - size_t *header_sizep; - Dwarf_Off *abbrev_offsetp; - uint8_t *address_sizep; - uint8_t *offset_sizep; +dwarf_nextcu (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, + size_t *header_sizep, Dwarf_Off *abbrev_offsetp, + uint8_t *address_sizep, uint8_t *offset_sizep) { return INTUSE(dwarf_next_unit) (dwarf, off, next_off, header_sizep, NULL, abbrev_offsetp, address_sizep, offset_sizep, diff --git a/libdw/dwarf_offdie.c b/libdw/dwarf_offdie.c index b5dd405..15f55c2 100644 --- a/libdw/dwarf_offdie.c +++ b/libdw/dwarf_offdie.c @@ -71,20 +71,14 @@ __libdw_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result, Dwarf_Die * -dwarf_offdie (dbg, offset, result) - Dwarf *dbg; - Dwarf_Off offset; - Dwarf_Die *result; +dwarf_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result) { return __libdw_offdie (dbg, offset, result, false); } INTDEF(dwarf_offdie) Dwarf_Die * -dwarf_offdie_types (dbg, offset, result) - Dwarf *dbg; - Dwarf_Off offset; - Dwarf_Die *result; +dwarf_offdie_types (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result) { return __libdw_offdie (dbg, offset, result, true); } diff --git a/libdw/dwarf_peel_type.c b/libdw/dwarf_peel_type.c new file mode 100644 index 0000000..5dca8f8 --- /dev/null +++ b/libdw/dwarf_peel_type.c @@ -0,0 +1,72 @@ +/* Peel type aliases and qualifier tags from a type DIE. + Copyright (C) 2014, 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwP.h" +#include +#include + + +int +dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result) +{ + int tag; + + /* Ignore previous errors. */ + if (die == NULL) + return -1; + + *result = *die; + tag = INTUSE (dwarf_tag) (result); + while (tag == DW_TAG_typedef + || tag == DW_TAG_const_type + || tag == DW_TAG_volatile_type + || tag == DW_TAG_restrict_type + || tag == DW_TAG_atomic_type) + { + Dwarf_Attribute attr_mem; + Dwarf_Attribute *attr = INTUSE (dwarf_attr_integrate) (die, DW_AT_type, + &attr_mem); + if (attr == NULL) + return 1; + + if (INTUSE (dwarf_formref_die) (attr, result) == NULL) + return -1; + + tag = INTUSE (dwarf_tag) (result); + } + + if (tag == DW_TAG_invalid) + return -1; + + return 0; +} +INTDEF(dwarf_peel_type) diff --git a/libdw/dwarf_ranges.c b/libdw/dwarf_ranges.c index d9b7293..4b6853d 100644 --- a/libdw/dwarf_ranges.c +++ b/libdw/dwarf_ranges.c @@ -142,14 +142,7 @@ dwarf_ranges (Dwarf_Die *die, ptrdiff_t offset, Dwarf_Addr *basep, DW_AT_entry_pc, &attr_mem), basep) != 0) - { - if (INTUSE(dwarf_errno) () == 0) - { - invalid: - __libdw_seterrno (DWARF_E_INVALID_DWARF); - } - return -1; - } + *basep = (Dwarf_Addr) -1; } else { @@ -182,7 +175,17 @@ dwarf_ranges (Dwarf_Die *die, ptrdiff_t offset, Dwarf_Addr *basep, return -1l; } - /* We have an address range entry. */ + /* We have an address range entry. Check that we have a base. */ + if (*basep == (Dwarf_Addr) -1) + { + if (INTUSE(dwarf_errno) () == 0) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + } + return -1; + } + *startp = *basep + begin; *endp = *basep + end; return readp - (unsigned char *) d->d_buf; diff --git a/libdw/dwarf_siblingof.c b/libdw/dwarf_siblingof.c index c54b6c8..df39c1c 100644 --- a/libdw/dwarf_siblingof.c +++ b/libdw/dwarf_siblingof.c @@ -1,5 +1,5 @@ /* Return sibling of given DIE. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -37,16 +37,13 @@ int -dwarf_siblingof (die, result) - Dwarf_Die *die; - Dwarf_Die *result; +dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result) { /* Ignore previous errors. */ if (die == NULL) return -1; - if (result == NULL) - return -1; + /* result is declared NN */ if (result != die) result->addr = NULL; @@ -62,8 +59,7 @@ dwarf_siblingof (die, result) /* That's the address we start looking. */ unsigned char *addr = this_die.addr; /* End of the buffer. */ - unsigned char *endp - = ((unsigned char *) cu_data (sibattr.cu)->d_buf + sibattr.cu->end); + unsigned char *endp = sibattr.cu->endp; /* Search for the beginning of the next die on this level. We must not return the dies for children of the given die. */ @@ -72,7 +68,7 @@ dwarf_siblingof (die, result) /* Find the end of the DIE or the sibling attribute. */ addr = __libdw_find_attr (&this_die, DW_AT_sibling, &sibattr.code, &sibattr.form); - if (sibattr.code == DW_AT_sibling) + if (addr != NULL && sibattr.code == DW_AT_sibling) { Dwarf_Off offset; sibattr.valp = addr; @@ -80,9 +76,18 @@ dwarf_siblingof (die, result) /* Something went wrong. */ return -1; + /* The sibling attribute should point after this DIE in the CU. + But not after the end of the CU. */ + size_t size = sibattr.cu->endp - sibattr.cu->startp; + size_t die_off = this_die.addr - this_die.cu->startp; + if (unlikely (offset >= size || offset <= die_off)) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + /* Compute the next address. */ - addr = ((unsigned char *) cu_data (sibattr.cu)->d_buf - + sibattr.cu->start + offset); + addr = sibattr.cu->startp + offset; } else if (unlikely (addr == NULL) || unlikely (this_die.abbrev == DWARF_END_ABBREV)) diff --git a/libdw/dwarf_srclang.c b/libdw/dwarf_srclang.c index 6cc06ff..f10e764 100644 --- a/libdw/dwarf_srclang.c +++ b/libdw/dwarf_srclang.c @@ -36,8 +36,7 @@ int -dwarf_srclang (die) - Dwarf_Die *die; +dwarf_srclang (Dwarf_Die *die) { Dwarf_Attribute attr_mem; Dwarf_Word value; diff --git a/libdw/dwarf_tag.c b/libdw/dwarf_tag.c index ff012cf..331eaa0 100644 --- a/libdw/dwarf_tag.c +++ b/libdw/dwarf_tag.c @@ -1,5 +1,5 @@ /* Return tag of given DIE. - Copyright (C) 2003-2011 Red Hat, Inc. + Copyright (C) 2003-2011, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -79,27 +79,16 @@ __libdw_findabbrev (struct Dwarf_CU *cu, unsigned int code) int -dwarf_tag (die) - Dwarf_Die *die; +dwarf_tag (Dwarf_Die *die) { - /* Do we already know the abbreviation? */ - if (die->abbrev == NULL) - { - /* Get the abbreviation code. */ - unsigned int u128; - const unsigned char *addr = die->addr; - get_uleb128 (u128, addr); - - /* Find the abbreviation. */ - die->abbrev = __libdw_findabbrev (die->cu, u128); - } - - if (unlikely (die->abbrev == DWARF_END_ABBREV)) + /* Find the abbreviation entry. */ + Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL); + if (unlikely (abbrevp == DWARF_END_ABBREV)) { __libdw_seterrno (DWARF_E_INVALID_DWARF); return DW_TAG_invalid; } - return die->abbrev->tag; + return abbrevp->tag; } INTDEF(dwarf_tag) diff --git a/libdw/dwarf_whatattr.c b/libdw/dwarf_whatattr.c index 8fe5535..d664b02 100644 --- a/libdw/dwarf_whatattr.c +++ b/libdw/dwarf_whatattr.c @@ -36,8 +36,7 @@ unsigned int -dwarf_whatattr (attr) - Dwarf_Attribute *attr; +dwarf_whatattr (Dwarf_Attribute *attr) { return attr == NULL ? 0 : attr->code; } diff --git a/libdw/dwarf_whatform.c b/libdw/dwarf_whatform.c index 1d0d14b..dee29a9 100644 --- a/libdw/dwarf_whatform.c +++ b/libdw/dwarf_whatform.c @@ -36,8 +36,7 @@ unsigned int -dwarf_whatform (attr) - Dwarf_Attribute *attr; +dwarf_whatform (Dwarf_Attribute *attr) { return attr == NULL ? 0 : attr->form; } diff --git a/libdw/encoded-value.h b/libdw/encoded-value.h index 4b59f62..48d868f 100644 --- a/libdw/encoded-value.h +++ b/libdw/encoded-value.h @@ -1,5 +1,5 @@ /* DW_EH_PE_* support for libdw unwinder. - Copyright (C) 2009-2010 Red Hat, Inc. + Copyright (C) 2009-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -32,8 +32,11 @@ #include #include #include "libdwP.h" +#include "../libelf/common.h" +/* Returns zero if the value is omitted, the encoding is unknown or + the (leb128) size cannot be determined. */ static size_t __attribute__ ((unused)) encoded_value_size (const Elf_Data *data, const unsigned char e_ident[], uint8_t encoding, const uint8_t *p) @@ -63,11 +66,11 @@ encoded_value_size (const Elf_Data *data, const unsigned char e_ident[], } default: - abort (); return 0; } } +/* Returns zero when value was read successfully, minus one otherwise. */ static inline int __attribute__ ((unused)) __libdw_cfi_read_address_inc (const Dwarf_CFI *cache, const unsigned char **addrp, @@ -82,16 +85,32 @@ __libdw_cfi_read_address_inc (const Dwarf_CFI *cache, /* Only .debug_frame might have relocation to consider. Read plain values from .eh_frame data. */ + const unsigned char *endp = cache->data->d.d_buf + cache->data->d.d_size; + Dwarf eh_dbg = { .other_byte_order = MY_ELFDATA != cache->e_ident[EI_DATA] }; + if (width == 4) - *ret = read_4ubyte_unaligned_inc (cache, *addrp); + { + if (unlikely (*addrp + 4 > endp)) + { + invalid_data: + __libdw_seterrno (DWARF_E_INVALID_CFI); + return -1; + } + *ret = read_4ubyte_unaligned_inc (&eh_dbg, *addrp); + } else - *ret = read_8ubyte_unaligned_inc (cache, *addrp); + { + if (unlikely (*addrp + 8 > endp)) + goto invalid_data; + *ret = read_8ubyte_unaligned_inc (&eh_dbg, *addrp); + } return 0; } +/* Returns true on error, false otherwise. */ static bool __attribute__ ((unused)) -read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, const uint8_t **p, - Dwarf_Addr *result) +read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, + const uint8_t **p, Dwarf_Addr *result) { *result = 0; switch (encoding & 0x70) @@ -115,8 +134,11 @@ read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, const uint8_t **p, break; case DW_EH_PE_aligned: { - const size_t size = encoded_value_size (&cache->data->d, cache->e_ident, + const size_t size = encoded_value_size (&cache->data->d, + cache->e_ident, encoding, *p); + if (unlikely (size == 0)) + return true; size_t align = ((cache->frame_vaddr + (*p - (const uint8_t *) cache->data->d.d_buf)) & (size - 1)); @@ -126,52 +148,63 @@ read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, const uint8_t **p, } default: - abort (); + __libdw_seterrno (DWARF_E_INVALID_CFI); + return true; } - Dwarf_Addr value; + Dwarf_Addr value = 0; + const unsigned char *endp = cache->data->d.d_buf + cache->data->d.d_size; switch (encoding & 0x0f) { case DW_EH_PE_udata2: + if (unlikely (*p + 2 > endp)) + { + invalid_data: + __libdw_seterrno (DWARF_E_INVALID_CFI); + return true; + } value = read_2ubyte_unaligned_inc (cache, *p); break; case DW_EH_PE_sdata2: + if (unlikely (*p + 2 > endp)) + goto invalid_data; value = read_2sbyte_unaligned_inc (cache, *p); break; case DW_EH_PE_udata4: - if (__libdw_cfi_read_address_inc (cache, p, 4, &value)) + if (unlikely (__libdw_cfi_read_address_inc (cache, p, 4, &value) != 0)) return true; break; case DW_EH_PE_sdata4: - if (__libdw_cfi_read_address_inc (cache, p, 4, &value)) + if (unlikely (__libdw_cfi_read_address_inc (cache, p, 4, &value) != 0)) return true; value = (Dwarf_Sword) (Elf32_Sword) value; /* Sign-extend. */ break; case DW_EH_PE_udata8: case DW_EH_PE_sdata8: - if (__libdw_cfi_read_address_inc (cache, p, 8, &value)) + if (unlikely (__libdw_cfi_read_address_inc (cache, p, 8, &value) != 0)) return true; break; case DW_EH_PE_absptr: - if (__libdw_cfi_read_address_inc (cache, p, 0, &value)) + if (unlikely (__libdw_cfi_read_address_inc (cache, p, 0, &value) != 0)) return true; break; case DW_EH_PE_uleb128: - get_uleb128 (value, *p); + get_uleb128 (value, *p, endp); break; case DW_EH_PE_sleb128: - get_sleb128 (value, *p); + get_sleb128 (value, *p, endp); break; default: - abort (); + __libdw_seterrno (DWARF_E_INVALID_CFI); + return true; } *result += value; @@ -181,12 +214,15 @@ read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, const uint8_t **p, if (unlikely (*result < cache->frame_vaddr)) return true; *result -= cache->frame_vaddr; - if (unlikely (*result > (cache->data->d.d_size - - encoded_value_size (NULL, cache->e_ident, - DW_EH_PE_absptr, NULL)))) + size_t ptrsize = encoded_value_size (NULL, cache->e_ident, + DW_EH_PE_absptr, NULL); + if (unlikely (cache->data->d.d_size < ptrsize + || *result > (cache->data->d.d_size - ptrsize))) return true; const uint8_t *ptr = cache->data->d.d_buf + *result; - return __libdw_cfi_read_address_inc (cache, &ptr, 0, result); + if (unlikely (__libdw_cfi_read_address_inc (cache, &ptr, 0, result) + != 0)) + return true; } return false; diff --git a/libdw/fde.c b/libdw/fde.c index 91ce732..f5f6fbe 100644 --- a/libdw/fde.c +++ b/libdw/fde.c @@ -1,5 +1,5 @@ /* FDE reading. - Copyright (C) 2009-2010 Red Hat, Inc. + Copyright (C) 2009-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -90,6 +90,13 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry) } fde->end += fde->start; + /* Make sure the fde actually covers a real code range. */ + if (fde->start >= fde->end) + { + free (fde); + return (void *) -1; + } + fde->cie = cie; if (cie->sized_augmentation_data) @@ -97,7 +104,7 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry) /* The CIE augmentation says the FDE has a DW_FORM_block before its actual instruction stream. */ Dwarf_Word len; - get_uleb128 (len, fde->instructions); + get_uleb128 (len, fde->instructions, fde->instructions_end); if ((Dwarf_Word) (fde->instructions_end - fde->instructions) < len) { free (fde); @@ -112,12 +119,21 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry) fde->instructions += cie->fde_augmentation_data_size; /* Add the new entry to the search tree. */ - if (tsearch (fde, &cache->fde_tree, &compare_fde) == NULL) + struct dwarf_fde **tres = tsearch (fde, &cache->fde_tree, &compare_fde); + if (tres == NULL) { free (fde); __libdw_seterrno (DWARF_E_NOMEM); return NULL; } + else if (*tres != fde) + { + /* There is already an FDE in the cache that covers the same + address range. That is odd. Ignore this FDE. And just use + the one in the cache for consistency. */ + free (fde); + return *tres; + } return fde; } @@ -161,13 +177,22 @@ binary_search_fde (Dwarf_CFI *cache, Dwarf_Addr address) const size_t size = 2 * encoded_value_size (&cache->data->d, cache->e_ident, cache->search_table_encoding, NULL); + if (unlikely (size == 0)) + return (Dwarf_Off) -1l; /* Dummy used by read_encoded_value. */ + Elf_Data_Scn dummy_cfi_hdr_data = + { + .d = { .d_buf = (void *) cache->search_table, + .d_size = cache->search_table_len } + }; + Dwarf_CFI dummy_cfi = { .e_ident = cache->e_ident, .datarel = cache->search_table_vaddr, .frame_vaddr = cache->search_table_vaddr, + .data = &dummy_cfi_hdr_data }; size_t l = 0, u = cache->search_table_entries; @@ -175,6 +200,8 @@ binary_search_fde (Dwarf_CFI *cache, Dwarf_Addr address) { size_t idx = (l + u) / 2; + /* Max idx * size is checked against search_table len when + loading eh_frame_hdr. */ const uint8_t *p = &cache->search_table[idx * size]; Dwarf_Addr start; if (unlikely (read_encoded_value (&dummy_cfi, diff --git a/libdw/frame-cache.c b/libdw/frame-cache.c index 54a1cc9..5b6afb5 100644 --- a/libdw/frame-cache.c +++ b/libdw/frame-cache.c @@ -1,5 +1,5 @@ /* Frame cache handling. - Copyright (C) 2009 Red Hat, Inc. + Copyright (C) 2009, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -30,6 +30,7 @@ # include #endif +#include "../libebl/libebl.h" #include "cfi.h" #include #include @@ -63,4 +64,7 @@ __libdw_destroy_frame_cache (Dwarf_CFI *cache) tdestroy (cache->fde_tree, free_fde); tdestroy (cache->cie_tree, free_cie); tdestroy (cache->expr_tree, free_expr); + + if (cache->ebl != NULL && cache->ebl != (void *) -1l) + ebl_closebackend (cache->ebl); } diff --git a/libdw/known-dwarf.h b/libdw/known-dwarf.h index 6228de6..364d7ca 100644 --- a/libdw/known-dwarf.h +++ b/libdw/known-dwarf.h @@ -1,624 +1,633 @@ /* Generated by config/known-dwarf.awk from libdw/dwarf.h contents. */ -#define ALL_KNOWN_DW_ACCESS \ - ONE_KNOWN_DW_ACCESS (private, DW_ACCESS_private) \ - ONE_KNOWN_DW_ACCESS (protected, DW_ACCESS_protected) \ - ONE_KNOWN_DW_ACCESS (public, DW_ACCESS_public) \ +#define DWARF_ALL_KNOWN_DW_ACCESS \ + DWARF_ONE_KNOWN_DW_ACCESS (private, DW_ACCESS_private) \ + DWARF_ONE_KNOWN_DW_ACCESS (protected, DW_ACCESS_protected) \ + DWARF_ONE_KNOWN_DW_ACCESS (public, DW_ACCESS_public) \ /* End of DW_ACCESS_*. */ -#define ALL_KNOWN_DW_AT \ - ONE_KNOWN_DW_AT (GNU_all_call_sites, DW_AT_GNU_all_call_sites) \ - ONE_KNOWN_DW_AT (GNU_all_source_call_sites, DW_AT_GNU_all_source_call_sites) \ - ONE_KNOWN_DW_AT (GNU_all_tail_call_sites, DW_AT_GNU_all_tail_call_sites) \ - ONE_KNOWN_DW_AT (GNU_call_site_data_value, DW_AT_GNU_call_site_data_value) \ - ONE_KNOWN_DW_AT (GNU_call_site_target, DW_AT_GNU_call_site_target) \ - ONE_KNOWN_DW_AT (GNU_call_site_target_clobbered, DW_AT_GNU_call_site_target_clobbered) \ - ONE_KNOWN_DW_AT (GNU_call_site_value, DW_AT_GNU_call_site_value) \ - ONE_KNOWN_DW_AT (GNU_exclusive_locks_required, DW_AT_GNU_exclusive_locks_required) \ - ONE_KNOWN_DW_AT (GNU_guarded, DW_AT_GNU_guarded) \ - ONE_KNOWN_DW_AT (GNU_guarded_by, DW_AT_GNU_guarded_by) \ - ONE_KNOWN_DW_AT (GNU_locks_excluded, DW_AT_GNU_locks_excluded) \ - ONE_KNOWN_DW_AT (GNU_macros, DW_AT_GNU_macros) \ - ONE_KNOWN_DW_AT (GNU_odr_signature, DW_AT_GNU_odr_signature) \ - ONE_KNOWN_DW_AT (GNU_pt_guarded, DW_AT_GNU_pt_guarded) \ - ONE_KNOWN_DW_AT (GNU_pt_guarded_by, DW_AT_GNU_pt_guarded_by) \ - ONE_KNOWN_DW_AT (GNU_shared_locks_required, DW_AT_GNU_shared_locks_required) \ - ONE_KNOWN_DW_AT (GNU_tail_call, DW_AT_GNU_tail_call) \ - ONE_KNOWN_DW_AT (GNU_template_name, DW_AT_GNU_template_name) \ - ONE_KNOWN_DW_AT (GNU_vector, DW_AT_GNU_vector) \ - ONE_KNOWN_DW_AT (MIPS_abstract_name, DW_AT_MIPS_abstract_name) \ - ONE_KNOWN_DW_AT (MIPS_allocatable_dopetype, DW_AT_MIPS_allocatable_dopetype) \ - ONE_KNOWN_DW_AT (MIPS_assumed_shape_dopetype, DW_AT_MIPS_assumed_shape_dopetype) \ - ONE_KNOWN_DW_AT (MIPS_assumed_size, DW_AT_MIPS_assumed_size) \ - ONE_KNOWN_DW_AT (MIPS_clone_origin, DW_AT_MIPS_clone_origin) \ - ONE_KNOWN_DW_AT (MIPS_epilog_begin, DW_AT_MIPS_epilog_begin) \ - ONE_KNOWN_DW_AT (MIPS_fde, DW_AT_MIPS_fde) \ - ONE_KNOWN_DW_AT (MIPS_has_inlines, DW_AT_MIPS_has_inlines) \ - ONE_KNOWN_DW_AT (MIPS_linkage_name, DW_AT_MIPS_linkage_name) \ - ONE_KNOWN_DW_AT (MIPS_loop_begin, DW_AT_MIPS_loop_begin) \ - ONE_KNOWN_DW_AT (MIPS_loop_unroll_factor, DW_AT_MIPS_loop_unroll_factor) \ - ONE_KNOWN_DW_AT (MIPS_ptr_dopetype, DW_AT_MIPS_ptr_dopetype) \ - ONE_KNOWN_DW_AT (MIPS_software_pipeline_depth, DW_AT_MIPS_software_pipeline_depth) \ - ONE_KNOWN_DW_AT (MIPS_stride, DW_AT_MIPS_stride) \ - ONE_KNOWN_DW_AT (MIPS_stride_byte, DW_AT_MIPS_stride_byte) \ - ONE_KNOWN_DW_AT (MIPS_stride_elem, DW_AT_MIPS_stride_elem) \ - ONE_KNOWN_DW_AT (MIPS_tail_loop_begin, DW_AT_MIPS_tail_loop_begin) \ - ONE_KNOWN_DW_AT (abstract_origin, DW_AT_abstract_origin) \ - ONE_KNOWN_DW_AT (accessibility, DW_AT_accessibility) \ - ONE_KNOWN_DW_AT (address_class, DW_AT_address_class) \ - ONE_KNOWN_DW_AT (allocated, DW_AT_allocated) \ - ONE_KNOWN_DW_AT (artificial, DW_AT_artificial) \ - ONE_KNOWN_DW_AT (associated, DW_AT_associated) \ - ONE_KNOWN_DW_AT (base_types, DW_AT_base_types) \ - ONE_KNOWN_DW_AT (binary_scale, DW_AT_binary_scale) \ - ONE_KNOWN_DW_AT (bit_offset, DW_AT_bit_offset) \ - ONE_KNOWN_DW_AT (bit_size, DW_AT_bit_size) \ - ONE_KNOWN_DW_AT (bit_stride, DW_AT_bit_stride) \ - ONE_KNOWN_DW_AT (body_begin, DW_AT_body_begin) \ - ONE_KNOWN_DW_AT (body_end, DW_AT_body_end) \ - ONE_KNOWN_DW_AT (byte_size, DW_AT_byte_size) \ - ONE_KNOWN_DW_AT (byte_stride, DW_AT_byte_stride) \ - ONE_KNOWN_DW_AT (call_column, DW_AT_call_column) \ - ONE_KNOWN_DW_AT (call_file, DW_AT_call_file) \ - ONE_KNOWN_DW_AT (call_line, DW_AT_call_line) \ - ONE_KNOWN_DW_AT (calling_convention, DW_AT_calling_convention) \ - ONE_KNOWN_DW_AT (common_reference, DW_AT_common_reference) \ - ONE_KNOWN_DW_AT (comp_dir, DW_AT_comp_dir) \ - ONE_KNOWN_DW_AT (const_expr, DW_AT_const_expr) \ - ONE_KNOWN_DW_AT (const_value, DW_AT_const_value) \ - ONE_KNOWN_DW_AT (containing_type, DW_AT_containing_type) \ - ONE_KNOWN_DW_AT (count, DW_AT_count) \ - ONE_KNOWN_DW_AT (data_bit_offset, DW_AT_data_bit_offset) \ - ONE_KNOWN_DW_AT (data_location, DW_AT_data_location) \ - ONE_KNOWN_DW_AT (data_member_location, DW_AT_data_member_location) \ - ONE_KNOWN_DW_AT (decimal_scale, DW_AT_decimal_scale) \ - ONE_KNOWN_DW_AT (decimal_sign, DW_AT_decimal_sign) \ - ONE_KNOWN_DW_AT (decl_column, DW_AT_decl_column) \ - ONE_KNOWN_DW_AT (decl_file, DW_AT_decl_file) \ - ONE_KNOWN_DW_AT (decl_line, DW_AT_decl_line) \ - ONE_KNOWN_DW_AT (declaration, DW_AT_declaration) \ - ONE_KNOWN_DW_AT (default_value, DW_AT_default_value) \ - ONE_KNOWN_DW_AT (description, DW_AT_description) \ - ONE_KNOWN_DW_AT (digit_count, DW_AT_digit_count) \ - ONE_KNOWN_DW_AT (discr, DW_AT_discr) \ - ONE_KNOWN_DW_AT (discr_list, DW_AT_discr_list) \ - ONE_KNOWN_DW_AT (discr_value, DW_AT_discr_value) \ - ONE_KNOWN_DW_AT (element_list, DW_AT_element_list) \ - ONE_KNOWN_DW_AT (elemental, DW_AT_elemental) \ - ONE_KNOWN_DW_AT (encoding, DW_AT_encoding) \ - ONE_KNOWN_DW_AT (endianity, DW_AT_endianity) \ - ONE_KNOWN_DW_AT (entry_pc, DW_AT_entry_pc) \ - ONE_KNOWN_DW_AT (enum_class, DW_AT_enum_class) \ - ONE_KNOWN_DW_AT (explicit, DW_AT_explicit) \ - ONE_KNOWN_DW_AT (extension, DW_AT_extension) \ - ONE_KNOWN_DW_AT (external, DW_AT_external) \ - ONE_KNOWN_DW_AT (frame_base, DW_AT_frame_base) \ - ONE_KNOWN_DW_AT (friend, DW_AT_friend) \ - ONE_KNOWN_DW_AT (high_pc, DW_AT_high_pc) \ - ONE_KNOWN_DW_AT (identifier_case, DW_AT_identifier_case) \ - ONE_KNOWN_DW_AT (import, DW_AT_import) \ - ONE_KNOWN_DW_AT (inline, DW_AT_inline) \ - ONE_KNOWN_DW_AT (is_optional, DW_AT_is_optional) \ - ONE_KNOWN_DW_AT (language, DW_AT_language) \ - ONE_KNOWN_DW_AT (linkage_name, DW_AT_linkage_name) \ - ONE_KNOWN_DW_AT (location, DW_AT_location) \ - ONE_KNOWN_DW_AT (low_pc, DW_AT_low_pc) \ - ONE_KNOWN_DW_AT (lower_bound, DW_AT_lower_bound) \ - ONE_KNOWN_DW_AT (mac_info, DW_AT_mac_info) \ - ONE_KNOWN_DW_AT (macro_info, DW_AT_macro_info) \ - ONE_KNOWN_DW_AT (main_subprogram, DW_AT_main_subprogram) \ - ONE_KNOWN_DW_AT (member, DW_AT_member) \ - ONE_KNOWN_DW_AT (mutable, DW_AT_mutable) \ - ONE_KNOWN_DW_AT (name, DW_AT_name) \ - ONE_KNOWN_DW_AT (namelist_item, DW_AT_namelist_item) \ - ONE_KNOWN_DW_AT (object_pointer, DW_AT_object_pointer) \ - ONE_KNOWN_DW_AT (ordering, DW_AT_ordering) \ - ONE_KNOWN_DW_AT (picture_string, DW_AT_picture_string) \ - ONE_KNOWN_DW_AT (priority, DW_AT_priority) \ - ONE_KNOWN_DW_AT (producer, DW_AT_producer) \ - ONE_KNOWN_DW_AT (prototyped, DW_AT_prototyped) \ - ONE_KNOWN_DW_AT (pure, DW_AT_pure) \ - ONE_KNOWN_DW_AT (ranges, DW_AT_ranges) \ - ONE_KNOWN_DW_AT (recursive, DW_AT_recursive) \ - ONE_KNOWN_DW_AT (return_addr, DW_AT_return_addr) \ - ONE_KNOWN_DW_AT (segment, DW_AT_segment) \ - ONE_KNOWN_DW_AT (sf_names, DW_AT_sf_names) \ - ONE_KNOWN_DW_AT (sibling, DW_AT_sibling) \ - ONE_KNOWN_DW_AT (signature, DW_AT_signature) \ - ONE_KNOWN_DW_AT (small, DW_AT_small) \ - ONE_KNOWN_DW_AT (specification, DW_AT_specification) \ - ONE_KNOWN_DW_AT (src_coords, DW_AT_src_coords) \ - ONE_KNOWN_DW_AT (src_info, DW_AT_src_info) \ - ONE_KNOWN_DW_AT (start_scope, DW_AT_start_scope) \ - ONE_KNOWN_DW_AT (static_link, DW_AT_static_link) \ - ONE_KNOWN_DW_AT (stmt_list, DW_AT_stmt_list) \ - ONE_KNOWN_DW_AT (string_length, DW_AT_string_length) \ - ONE_KNOWN_DW_AT (subscr_data, DW_AT_subscr_data) \ - ONE_KNOWN_DW_AT (threads_scaled, DW_AT_threads_scaled) \ - ONE_KNOWN_DW_AT (trampoline, DW_AT_trampoline) \ - ONE_KNOWN_DW_AT (type, DW_AT_type) \ - ONE_KNOWN_DW_AT (upper_bound, DW_AT_upper_bound) \ - ONE_KNOWN_DW_AT (use_UTF8, DW_AT_use_UTF8) \ - ONE_KNOWN_DW_AT (use_location, DW_AT_use_location) \ - ONE_KNOWN_DW_AT (variable_parameter, DW_AT_variable_parameter) \ - ONE_KNOWN_DW_AT (virtuality, DW_AT_virtuality) \ - ONE_KNOWN_DW_AT (visibility, DW_AT_visibility) \ - ONE_KNOWN_DW_AT (vtable_elem_location, DW_AT_vtable_elem_location) \ +#define DWARF_ALL_KNOWN_DW_AT \ + DWARF_ONE_KNOWN_DW_AT (GNU_all_call_sites, DW_AT_GNU_all_call_sites) \ + DWARF_ONE_KNOWN_DW_AT (GNU_all_source_call_sites, DW_AT_GNU_all_source_call_sites) \ + DWARF_ONE_KNOWN_DW_AT (GNU_all_tail_call_sites, DW_AT_GNU_all_tail_call_sites) \ + DWARF_ONE_KNOWN_DW_AT (GNU_call_site_data_value, DW_AT_GNU_call_site_data_value) \ + DWARF_ONE_KNOWN_DW_AT (GNU_call_site_target, DW_AT_GNU_call_site_target) \ + DWARF_ONE_KNOWN_DW_AT (GNU_call_site_target_clobbered, DW_AT_GNU_call_site_target_clobbered) \ + DWARF_ONE_KNOWN_DW_AT (GNU_call_site_value, DW_AT_GNU_call_site_value) \ + DWARF_ONE_KNOWN_DW_AT (GNU_deleted, DW_AT_GNU_deleted) \ + DWARF_ONE_KNOWN_DW_AT (GNU_exclusive_locks_required, DW_AT_GNU_exclusive_locks_required) \ + DWARF_ONE_KNOWN_DW_AT (GNU_guarded, DW_AT_GNU_guarded) \ + DWARF_ONE_KNOWN_DW_AT (GNU_guarded_by, DW_AT_GNU_guarded_by) \ + DWARF_ONE_KNOWN_DW_AT (GNU_locks_excluded, DW_AT_GNU_locks_excluded) \ + DWARF_ONE_KNOWN_DW_AT (GNU_macros, DW_AT_GNU_macros) \ + DWARF_ONE_KNOWN_DW_AT (GNU_odr_signature, DW_AT_GNU_odr_signature) \ + DWARF_ONE_KNOWN_DW_AT (GNU_pt_guarded, DW_AT_GNU_pt_guarded) \ + DWARF_ONE_KNOWN_DW_AT (GNU_pt_guarded_by, DW_AT_GNU_pt_guarded_by) \ + DWARF_ONE_KNOWN_DW_AT (GNU_shared_locks_required, DW_AT_GNU_shared_locks_required) \ + DWARF_ONE_KNOWN_DW_AT (GNU_tail_call, DW_AT_GNU_tail_call) \ + DWARF_ONE_KNOWN_DW_AT (GNU_template_name, DW_AT_GNU_template_name) \ + DWARF_ONE_KNOWN_DW_AT (GNU_vector, DW_AT_GNU_vector) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_abstract_name, DW_AT_MIPS_abstract_name) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_allocatable_dopetype, DW_AT_MIPS_allocatable_dopetype) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_assumed_shape_dopetype, DW_AT_MIPS_assumed_shape_dopetype) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_assumed_size, DW_AT_MIPS_assumed_size) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_clone_origin, DW_AT_MIPS_clone_origin) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_epilog_begin, DW_AT_MIPS_epilog_begin) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_fde, DW_AT_MIPS_fde) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_has_inlines, DW_AT_MIPS_has_inlines) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_linkage_name, DW_AT_MIPS_linkage_name) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_loop_begin, DW_AT_MIPS_loop_begin) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_loop_unroll_factor, DW_AT_MIPS_loop_unroll_factor) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_ptr_dopetype, DW_AT_MIPS_ptr_dopetype) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_software_pipeline_depth, DW_AT_MIPS_software_pipeline_depth) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_stride, DW_AT_MIPS_stride) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_stride_byte, DW_AT_MIPS_stride_byte) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_stride_elem, DW_AT_MIPS_stride_elem) \ + DWARF_ONE_KNOWN_DW_AT (MIPS_tail_loop_begin, DW_AT_MIPS_tail_loop_begin) \ + DWARF_ONE_KNOWN_DW_AT (abstract_origin, DW_AT_abstract_origin) \ + DWARF_ONE_KNOWN_DW_AT (accessibility, DW_AT_accessibility) \ + DWARF_ONE_KNOWN_DW_AT (address_class, DW_AT_address_class) \ + DWARF_ONE_KNOWN_DW_AT (allocated, DW_AT_allocated) \ + DWARF_ONE_KNOWN_DW_AT (artificial, DW_AT_artificial) \ + DWARF_ONE_KNOWN_DW_AT (associated, DW_AT_associated) \ + DWARF_ONE_KNOWN_DW_AT (base_types, DW_AT_base_types) \ + DWARF_ONE_KNOWN_DW_AT (binary_scale, DW_AT_binary_scale) \ + DWARF_ONE_KNOWN_DW_AT (bit_offset, DW_AT_bit_offset) \ + DWARF_ONE_KNOWN_DW_AT (bit_size, DW_AT_bit_size) \ + DWARF_ONE_KNOWN_DW_AT (bit_stride, DW_AT_bit_stride) \ + DWARF_ONE_KNOWN_DW_AT (body_begin, DW_AT_body_begin) \ + DWARF_ONE_KNOWN_DW_AT (body_end, DW_AT_body_end) \ + DWARF_ONE_KNOWN_DW_AT (byte_size, DW_AT_byte_size) \ + DWARF_ONE_KNOWN_DW_AT (byte_stride, DW_AT_byte_stride) \ + DWARF_ONE_KNOWN_DW_AT (call_column, DW_AT_call_column) \ + DWARF_ONE_KNOWN_DW_AT (call_file, DW_AT_call_file) \ + DWARF_ONE_KNOWN_DW_AT (call_line, DW_AT_call_line) \ + DWARF_ONE_KNOWN_DW_AT (calling_convention, DW_AT_calling_convention) \ + DWARF_ONE_KNOWN_DW_AT (common_reference, DW_AT_common_reference) \ + DWARF_ONE_KNOWN_DW_AT (comp_dir, DW_AT_comp_dir) \ + DWARF_ONE_KNOWN_DW_AT (const_expr, DW_AT_const_expr) \ + DWARF_ONE_KNOWN_DW_AT (const_value, DW_AT_const_value) \ + DWARF_ONE_KNOWN_DW_AT (containing_type, DW_AT_containing_type) \ + DWARF_ONE_KNOWN_DW_AT (count, DW_AT_count) \ + DWARF_ONE_KNOWN_DW_AT (data_bit_offset, DW_AT_data_bit_offset) \ + DWARF_ONE_KNOWN_DW_AT (data_location, DW_AT_data_location) \ + DWARF_ONE_KNOWN_DW_AT (data_member_location, DW_AT_data_member_location) \ + DWARF_ONE_KNOWN_DW_AT (decimal_scale, DW_AT_decimal_scale) \ + DWARF_ONE_KNOWN_DW_AT (decimal_sign, DW_AT_decimal_sign) \ + DWARF_ONE_KNOWN_DW_AT (decl_column, DW_AT_decl_column) \ + DWARF_ONE_KNOWN_DW_AT (decl_file, DW_AT_decl_file) \ + DWARF_ONE_KNOWN_DW_AT (decl_line, DW_AT_decl_line) \ + DWARF_ONE_KNOWN_DW_AT (declaration, DW_AT_declaration) \ + DWARF_ONE_KNOWN_DW_AT (default_value, DW_AT_default_value) \ + DWARF_ONE_KNOWN_DW_AT (description, DW_AT_description) \ + DWARF_ONE_KNOWN_DW_AT (digit_count, DW_AT_digit_count) \ + DWARF_ONE_KNOWN_DW_AT (discr, DW_AT_discr) \ + DWARF_ONE_KNOWN_DW_AT (discr_list, DW_AT_discr_list) \ + DWARF_ONE_KNOWN_DW_AT (discr_value, DW_AT_discr_value) \ + DWARF_ONE_KNOWN_DW_AT (element_list, DW_AT_element_list) \ + DWARF_ONE_KNOWN_DW_AT (elemental, DW_AT_elemental) \ + DWARF_ONE_KNOWN_DW_AT (encoding, DW_AT_encoding) \ + DWARF_ONE_KNOWN_DW_AT (endianity, DW_AT_endianity) \ + DWARF_ONE_KNOWN_DW_AT (entry_pc, DW_AT_entry_pc) \ + DWARF_ONE_KNOWN_DW_AT (enum_class, DW_AT_enum_class) \ + DWARF_ONE_KNOWN_DW_AT (explicit, DW_AT_explicit) \ + DWARF_ONE_KNOWN_DW_AT (extension, DW_AT_extension) \ + DWARF_ONE_KNOWN_DW_AT (external, DW_AT_external) \ + DWARF_ONE_KNOWN_DW_AT (frame_base, DW_AT_frame_base) \ + DWARF_ONE_KNOWN_DW_AT (friend, DW_AT_friend) \ + DWARF_ONE_KNOWN_DW_AT (high_pc, DW_AT_high_pc) \ + DWARF_ONE_KNOWN_DW_AT (identifier_case, DW_AT_identifier_case) \ + DWARF_ONE_KNOWN_DW_AT (import, DW_AT_import) \ + DWARF_ONE_KNOWN_DW_AT (inline, DW_AT_inline) \ + DWARF_ONE_KNOWN_DW_AT (is_optional, DW_AT_is_optional) \ + DWARF_ONE_KNOWN_DW_AT (language, DW_AT_language) \ + DWARF_ONE_KNOWN_DW_AT (linkage_name, DW_AT_linkage_name) \ + DWARF_ONE_KNOWN_DW_AT (location, DW_AT_location) \ + DWARF_ONE_KNOWN_DW_AT (low_pc, DW_AT_low_pc) \ + DWARF_ONE_KNOWN_DW_AT (lower_bound, DW_AT_lower_bound) \ + DWARF_ONE_KNOWN_DW_AT (mac_info, DW_AT_mac_info) \ + DWARF_ONE_KNOWN_DW_AT (macro_info, DW_AT_macro_info) \ + DWARF_ONE_KNOWN_DW_AT (main_subprogram, DW_AT_main_subprogram) \ + DWARF_ONE_KNOWN_DW_AT (member, DW_AT_member) \ + DWARF_ONE_KNOWN_DW_AT (mutable, DW_AT_mutable) \ + DWARF_ONE_KNOWN_DW_AT (name, DW_AT_name) \ + DWARF_ONE_KNOWN_DW_AT (namelist_item, DW_AT_namelist_item) \ + DWARF_ONE_KNOWN_DW_AT (noreturn, DW_AT_noreturn) \ + DWARF_ONE_KNOWN_DW_AT (object_pointer, DW_AT_object_pointer) \ + DWARF_ONE_KNOWN_DW_AT (ordering, DW_AT_ordering) \ + DWARF_ONE_KNOWN_DW_AT (picture_string, DW_AT_picture_string) \ + DWARF_ONE_KNOWN_DW_AT (priority, DW_AT_priority) \ + DWARF_ONE_KNOWN_DW_AT (producer, DW_AT_producer) \ + DWARF_ONE_KNOWN_DW_AT (prototyped, DW_AT_prototyped) \ + DWARF_ONE_KNOWN_DW_AT (pure, DW_AT_pure) \ + DWARF_ONE_KNOWN_DW_AT (ranges, DW_AT_ranges) \ + DWARF_ONE_KNOWN_DW_AT (recursive, DW_AT_recursive) \ + DWARF_ONE_KNOWN_DW_AT (return_addr, DW_AT_return_addr) \ + DWARF_ONE_KNOWN_DW_AT (segment, DW_AT_segment) \ + DWARF_ONE_KNOWN_DW_AT (sf_names, DW_AT_sf_names) \ + DWARF_ONE_KNOWN_DW_AT (sibling, DW_AT_sibling) \ + DWARF_ONE_KNOWN_DW_AT (signature, DW_AT_signature) \ + DWARF_ONE_KNOWN_DW_AT (small, DW_AT_small) \ + DWARF_ONE_KNOWN_DW_AT (specification, DW_AT_specification) \ + DWARF_ONE_KNOWN_DW_AT (src_coords, DW_AT_src_coords) \ + DWARF_ONE_KNOWN_DW_AT (src_info, DW_AT_src_info) \ + DWARF_ONE_KNOWN_DW_AT (start_scope, DW_AT_start_scope) \ + DWARF_ONE_KNOWN_DW_AT (static_link, DW_AT_static_link) \ + DWARF_ONE_KNOWN_DW_AT (stmt_list, DW_AT_stmt_list) \ + DWARF_ONE_KNOWN_DW_AT (string_length, DW_AT_string_length) \ + DWARF_ONE_KNOWN_DW_AT (subscr_data, DW_AT_subscr_data) \ + DWARF_ONE_KNOWN_DW_AT (threads_scaled, DW_AT_threads_scaled) \ + DWARF_ONE_KNOWN_DW_AT (trampoline, DW_AT_trampoline) \ + DWARF_ONE_KNOWN_DW_AT (type, DW_AT_type) \ + DWARF_ONE_KNOWN_DW_AT (upper_bound, DW_AT_upper_bound) \ + DWARF_ONE_KNOWN_DW_AT (use_UTF8, DW_AT_use_UTF8) \ + DWARF_ONE_KNOWN_DW_AT (use_location, DW_AT_use_location) \ + DWARF_ONE_KNOWN_DW_AT (variable_parameter, DW_AT_variable_parameter) \ + DWARF_ONE_KNOWN_DW_AT (virtuality, DW_AT_virtuality) \ + DWARF_ONE_KNOWN_DW_AT (visibility, DW_AT_visibility) \ + DWARF_ONE_KNOWN_DW_AT (vtable_elem_location, DW_AT_vtable_elem_location) \ /* End of DW_AT_*. */ -#define ALL_KNOWN_DW_ATE \ - ONE_KNOWN_DW_ATE (UTF, DW_ATE_UTF) \ - ONE_KNOWN_DW_ATE (address, DW_ATE_address) \ - ONE_KNOWN_DW_ATE (boolean, DW_ATE_boolean) \ - ONE_KNOWN_DW_ATE (complex_float, DW_ATE_complex_float) \ - ONE_KNOWN_DW_ATE (decimal_float, DW_ATE_decimal_float) \ - ONE_KNOWN_DW_ATE (edited, DW_ATE_edited) \ - ONE_KNOWN_DW_ATE (float, DW_ATE_float) \ - ONE_KNOWN_DW_ATE (imaginary_float, DW_ATE_imaginary_float) \ - ONE_KNOWN_DW_ATE (numeric_string, DW_ATE_numeric_string) \ - ONE_KNOWN_DW_ATE (packed_decimal, DW_ATE_packed_decimal) \ - ONE_KNOWN_DW_ATE (signed, DW_ATE_signed) \ - ONE_KNOWN_DW_ATE (signed_char, DW_ATE_signed_char) \ - ONE_KNOWN_DW_ATE (signed_fixed, DW_ATE_signed_fixed) \ - ONE_KNOWN_DW_ATE (unsigned, DW_ATE_unsigned) \ - ONE_KNOWN_DW_ATE (unsigned_char, DW_ATE_unsigned_char) \ - ONE_KNOWN_DW_ATE (unsigned_fixed, DW_ATE_unsigned_fixed) \ - ONE_KNOWN_DW_ATE (void, DW_ATE_void) \ +#define DWARF_ALL_KNOWN_DW_ATE \ + DWARF_ONE_KNOWN_DW_ATE (UTF, DW_ATE_UTF) \ + DWARF_ONE_KNOWN_DW_ATE (address, DW_ATE_address) \ + DWARF_ONE_KNOWN_DW_ATE (boolean, DW_ATE_boolean) \ + DWARF_ONE_KNOWN_DW_ATE (complex_float, DW_ATE_complex_float) \ + DWARF_ONE_KNOWN_DW_ATE (decimal_float, DW_ATE_decimal_float) \ + DWARF_ONE_KNOWN_DW_ATE (edited, DW_ATE_edited) \ + DWARF_ONE_KNOWN_DW_ATE (float, DW_ATE_float) \ + DWARF_ONE_KNOWN_DW_ATE (imaginary_float, DW_ATE_imaginary_float) \ + DWARF_ONE_KNOWN_DW_ATE (numeric_string, DW_ATE_numeric_string) \ + DWARF_ONE_KNOWN_DW_ATE (packed_decimal, DW_ATE_packed_decimal) \ + DWARF_ONE_KNOWN_DW_ATE (signed, DW_ATE_signed) \ + DWARF_ONE_KNOWN_DW_ATE (signed_char, DW_ATE_signed_char) \ + DWARF_ONE_KNOWN_DW_ATE (signed_fixed, DW_ATE_signed_fixed) \ + DWARF_ONE_KNOWN_DW_ATE (unsigned, DW_ATE_unsigned) \ + DWARF_ONE_KNOWN_DW_ATE (unsigned_char, DW_ATE_unsigned_char) \ + DWARF_ONE_KNOWN_DW_ATE (unsigned_fixed, DW_ATE_unsigned_fixed) \ + DWARF_ONE_KNOWN_DW_ATE (void, DW_ATE_void) \ /* End of DW_ATE_*. */ -#define ALL_KNOWN_DW_CC \ - ONE_KNOWN_DW_CC (nocall, DW_CC_nocall) \ - ONE_KNOWN_DW_CC (normal, DW_CC_normal) \ - ONE_KNOWN_DW_CC (program, DW_CC_program) \ +#define DWARF_ALL_KNOWN_DW_CC \ + DWARF_ONE_KNOWN_DW_CC (nocall, DW_CC_nocall) \ + DWARF_ONE_KNOWN_DW_CC (normal, DW_CC_normal) \ + DWARF_ONE_KNOWN_DW_CC (program, DW_CC_program) \ /* End of DW_CC_*. */ -#define ALL_KNOWN_DW_CFA \ - ONE_KNOWN_DW_CFA (GNU_args_size, DW_CFA_GNU_args_size) \ - ONE_KNOWN_DW_CFA (GNU_negative_offset_extended, DW_CFA_GNU_negative_offset_extended) \ - ONE_KNOWN_DW_CFA (GNU_window_save, DW_CFA_GNU_window_save) \ - ONE_KNOWN_DW_CFA (MIPS_advance_loc8, DW_CFA_MIPS_advance_loc8) \ - ONE_KNOWN_DW_CFA (advance_loc, DW_CFA_advance_loc) \ - ONE_KNOWN_DW_CFA (advance_loc1, DW_CFA_advance_loc1) \ - ONE_KNOWN_DW_CFA (advance_loc2, DW_CFA_advance_loc2) \ - ONE_KNOWN_DW_CFA (advance_loc4, DW_CFA_advance_loc4) \ - ONE_KNOWN_DW_CFA (def_cfa, DW_CFA_def_cfa) \ - ONE_KNOWN_DW_CFA (def_cfa_expression, DW_CFA_def_cfa_expression) \ - ONE_KNOWN_DW_CFA (def_cfa_offset, DW_CFA_def_cfa_offset) \ - ONE_KNOWN_DW_CFA (def_cfa_offset_sf, DW_CFA_def_cfa_offset_sf) \ - ONE_KNOWN_DW_CFA (def_cfa_register, DW_CFA_def_cfa_register) \ - ONE_KNOWN_DW_CFA (def_cfa_sf, DW_CFA_def_cfa_sf) \ - ONE_KNOWN_DW_CFA (expression, DW_CFA_expression) \ - ONE_KNOWN_DW_CFA (extended, DW_CFA_extended) \ - ONE_KNOWN_DW_CFA (nop, DW_CFA_nop) \ - ONE_KNOWN_DW_CFA (offset, DW_CFA_offset) \ - ONE_KNOWN_DW_CFA (offset_extended, DW_CFA_offset_extended) \ - ONE_KNOWN_DW_CFA (offset_extended_sf, DW_CFA_offset_extended_sf) \ - ONE_KNOWN_DW_CFA (register, DW_CFA_register) \ - ONE_KNOWN_DW_CFA (remember_state, DW_CFA_remember_state) \ - ONE_KNOWN_DW_CFA (restore, DW_CFA_restore) \ - ONE_KNOWN_DW_CFA (restore_extended, DW_CFA_restore_extended) \ - ONE_KNOWN_DW_CFA (restore_state, DW_CFA_restore_state) \ - ONE_KNOWN_DW_CFA (same_value, DW_CFA_same_value) \ - ONE_KNOWN_DW_CFA (set_loc, DW_CFA_set_loc) \ - ONE_KNOWN_DW_CFA (undefined, DW_CFA_undefined) \ - ONE_KNOWN_DW_CFA (val_expression, DW_CFA_val_expression) \ - ONE_KNOWN_DW_CFA (val_offset, DW_CFA_val_offset) \ - ONE_KNOWN_DW_CFA (val_offset_sf, DW_CFA_val_offset_sf) \ +#define DWARF_ALL_KNOWN_DW_CFA \ + DWARF_ONE_KNOWN_DW_CFA (GNU_args_size, DW_CFA_GNU_args_size) \ + DWARF_ONE_KNOWN_DW_CFA (GNU_negative_offset_extended, DW_CFA_GNU_negative_offset_extended) \ + DWARF_ONE_KNOWN_DW_CFA (GNU_window_save, DW_CFA_GNU_window_save) \ + DWARF_ONE_KNOWN_DW_CFA (MIPS_advance_loc8, DW_CFA_MIPS_advance_loc8) \ + DWARF_ONE_KNOWN_DW_CFA (advance_loc, DW_CFA_advance_loc) \ + DWARF_ONE_KNOWN_DW_CFA (advance_loc1, DW_CFA_advance_loc1) \ + DWARF_ONE_KNOWN_DW_CFA (advance_loc2, DW_CFA_advance_loc2) \ + DWARF_ONE_KNOWN_DW_CFA (advance_loc4, DW_CFA_advance_loc4) \ + DWARF_ONE_KNOWN_DW_CFA (def_cfa, DW_CFA_def_cfa) \ + DWARF_ONE_KNOWN_DW_CFA (def_cfa_expression, DW_CFA_def_cfa_expression) \ + DWARF_ONE_KNOWN_DW_CFA (def_cfa_offset, DW_CFA_def_cfa_offset) \ + DWARF_ONE_KNOWN_DW_CFA (def_cfa_offset_sf, DW_CFA_def_cfa_offset_sf) \ + DWARF_ONE_KNOWN_DW_CFA (def_cfa_register, DW_CFA_def_cfa_register) \ + DWARF_ONE_KNOWN_DW_CFA (def_cfa_sf, DW_CFA_def_cfa_sf) \ + DWARF_ONE_KNOWN_DW_CFA (expression, DW_CFA_expression) \ + DWARF_ONE_KNOWN_DW_CFA (extended, DW_CFA_extended) \ + DWARF_ONE_KNOWN_DW_CFA (nop, DW_CFA_nop) \ + DWARF_ONE_KNOWN_DW_CFA (offset, DW_CFA_offset) \ + DWARF_ONE_KNOWN_DW_CFA (offset_extended, DW_CFA_offset_extended) \ + DWARF_ONE_KNOWN_DW_CFA (offset_extended_sf, DW_CFA_offset_extended_sf) \ + DWARF_ONE_KNOWN_DW_CFA (register, DW_CFA_register) \ + DWARF_ONE_KNOWN_DW_CFA (remember_state, DW_CFA_remember_state) \ + DWARF_ONE_KNOWN_DW_CFA (restore, DW_CFA_restore) \ + DWARF_ONE_KNOWN_DW_CFA (restore_extended, DW_CFA_restore_extended) \ + DWARF_ONE_KNOWN_DW_CFA (restore_state, DW_CFA_restore_state) \ + DWARF_ONE_KNOWN_DW_CFA (same_value, DW_CFA_same_value) \ + DWARF_ONE_KNOWN_DW_CFA (set_loc, DW_CFA_set_loc) \ + DWARF_ONE_KNOWN_DW_CFA (undefined, DW_CFA_undefined) \ + DWARF_ONE_KNOWN_DW_CFA (val_expression, DW_CFA_val_expression) \ + DWARF_ONE_KNOWN_DW_CFA (val_offset, DW_CFA_val_offset) \ + DWARF_ONE_KNOWN_DW_CFA (val_offset_sf, DW_CFA_val_offset_sf) \ /* End of DW_CFA_*. */ -#define ALL_KNOWN_DW_CHILDREN \ - ONE_KNOWN_DW_CHILDREN (no, DW_CHILDREN_no) \ - ONE_KNOWN_DW_CHILDREN (yes, DW_CHILDREN_yes) \ +#define DWARF_ALL_KNOWN_DW_CHILDREN \ + DWARF_ONE_KNOWN_DW_CHILDREN (no, DW_CHILDREN_no) \ + DWARF_ONE_KNOWN_DW_CHILDREN (yes, DW_CHILDREN_yes) \ /* End of DW_CHILDREN_*. */ -#define ALL_KNOWN_DW_CIE_ID \ - ONE_KNOWN_DW_CIE_ID_DESC (32, DW_CIE_ID_32, "In 32-bit format CIE header.") \ - ONE_KNOWN_DW_CIE_ID_DESC (64, DW_CIE_ID_64, "In 64-bit format CIE header.") \ +#define DWARF_ALL_KNOWN_DW_CIE_ID \ + DWARF_ONE_KNOWN_DW_CIE_ID (32, DW_CIE_ID_32) \ + DWARF_ONE_KNOWN_DW_CIE_ID (64, DW_CIE_ID_64) \ /* End of DW_CIE_ID_*. */ -#define ALL_KNOWN_DW_DS \ - ONE_KNOWN_DW_DS (leading_overpunch, DW_DS_leading_overpunch) \ - ONE_KNOWN_DW_DS (leading_separate, DW_DS_leading_separate) \ - ONE_KNOWN_DW_DS (trailing_overpunch, DW_DS_trailing_overpunch) \ - ONE_KNOWN_DW_DS (trailing_separate, DW_DS_trailing_separate) \ - ONE_KNOWN_DW_DS (unsigned, DW_DS_unsigned) \ +#define DWARF_ALL_KNOWN_DW_DS \ + DWARF_ONE_KNOWN_DW_DS (leading_overpunch, DW_DS_leading_overpunch) \ + DWARF_ONE_KNOWN_DW_DS (leading_separate, DW_DS_leading_separate) \ + DWARF_ONE_KNOWN_DW_DS (trailing_overpunch, DW_DS_trailing_overpunch) \ + DWARF_ONE_KNOWN_DW_DS (trailing_separate, DW_DS_trailing_separate) \ + DWARF_ONE_KNOWN_DW_DS (unsigned, DW_DS_unsigned) \ /* End of DW_DS_*. */ -#define ALL_KNOWN_DW_DSC \ - ONE_KNOWN_DW_DSC (label, DW_DSC_label) \ - ONE_KNOWN_DW_DSC (range, DW_DSC_range) \ +#define DWARF_ALL_KNOWN_DW_DSC \ + DWARF_ONE_KNOWN_DW_DSC (label, DW_DSC_label) \ + DWARF_ONE_KNOWN_DW_DSC (range, DW_DSC_range) \ /* End of DW_DSC_*. */ -#define ALL_KNOWN_DW_EH_PE \ - ONE_KNOWN_DW_EH_PE (absptr, DW_EH_PE_absptr) \ - ONE_KNOWN_DW_EH_PE (aligned, DW_EH_PE_aligned) \ - ONE_KNOWN_DW_EH_PE (datarel, DW_EH_PE_datarel) \ - ONE_KNOWN_DW_EH_PE (funcrel, DW_EH_PE_funcrel) \ - ONE_KNOWN_DW_EH_PE (indirect, DW_EH_PE_indirect) \ - ONE_KNOWN_DW_EH_PE (omit, DW_EH_PE_omit) \ - ONE_KNOWN_DW_EH_PE (pcrel, DW_EH_PE_pcrel) \ - ONE_KNOWN_DW_EH_PE (sdata2, DW_EH_PE_sdata2) \ - ONE_KNOWN_DW_EH_PE (sdata4, DW_EH_PE_sdata4) \ - ONE_KNOWN_DW_EH_PE (sdata8, DW_EH_PE_sdata8) \ - ONE_KNOWN_DW_EH_PE (signed, DW_EH_PE_signed) \ - ONE_KNOWN_DW_EH_PE (sleb128, DW_EH_PE_sleb128) \ - ONE_KNOWN_DW_EH_PE (textrel, DW_EH_PE_textrel) \ - ONE_KNOWN_DW_EH_PE (udata2, DW_EH_PE_udata2) \ - ONE_KNOWN_DW_EH_PE (udata4, DW_EH_PE_udata4) \ - ONE_KNOWN_DW_EH_PE (udata8, DW_EH_PE_udata8) \ - ONE_KNOWN_DW_EH_PE (uleb128, DW_EH_PE_uleb128) \ +#define DWARF_ALL_KNOWN_DW_EH_PE \ + DWARF_ONE_KNOWN_DW_EH_PE (absptr, DW_EH_PE_absptr) \ + DWARF_ONE_KNOWN_DW_EH_PE (aligned, DW_EH_PE_aligned) \ + DWARF_ONE_KNOWN_DW_EH_PE (datarel, DW_EH_PE_datarel) \ + DWARF_ONE_KNOWN_DW_EH_PE (funcrel, DW_EH_PE_funcrel) \ + DWARF_ONE_KNOWN_DW_EH_PE (indirect, DW_EH_PE_indirect) \ + DWARF_ONE_KNOWN_DW_EH_PE (omit, DW_EH_PE_omit) \ + DWARF_ONE_KNOWN_DW_EH_PE (pcrel, DW_EH_PE_pcrel) \ + DWARF_ONE_KNOWN_DW_EH_PE (sdata2, DW_EH_PE_sdata2) \ + DWARF_ONE_KNOWN_DW_EH_PE (sdata4, DW_EH_PE_sdata4) \ + DWARF_ONE_KNOWN_DW_EH_PE (sdata8, DW_EH_PE_sdata8) \ + DWARF_ONE_KNOWN_DW_EH_PE (signed, DW_EH_PE_signed) \ + DWARF_ONE_KNOWN_DW_EH_PE (sleb128, DW_EH_PE_sleb128) \ + DWARF_ONE_KNOWN_DW_EH_PE (textrel, DW_EH_PE_textrel) \ + DWARF_ONE_KNOWN_DW_EH_PE (udata2, DW_EH_PE_udata2) \ + DWARF_ONE_KNOWN_DW_EH_PE (udata4, DW_EH_PE_udata4) \ + DWARF_ONE_KNOWN_DW_EH_PE (udata8, DW_EH_PE_udata8) \ + DWARF_ONE_KNOWN_DW_EH_PE (uleb128, DW_EH_PE_uleb128) \ /* End of DW_EH_PE_*. */ -#define ALL_KNOWN_DW_END \ - ONE_KNOWN_DW_END (big, DW_END_big) \ - ONE_KNOWN_DW_END (default, DW_END_default) \ - ONE_KNOWN_DW_END (little, DW_END_little) \ +#define DWARF_ALL_KNOWN_DW_END \ + DWARF_ONE_KNOWN_DW_END (big, DW_END_big) \ + DWARF_ONE_KNOWN_DW_END (default, DW_END_default) \ + DWARF_ONE_KNOWN_DW_END (little, DW_END_little) \ /* End of DW_END_*. */ -#define ALL_KNOWN_DW_FORM \ - ONE_KNOWN_DW_FORM_DESC (GNU_ref_alt, DW_FORM_GNU_ref_alt, "offset in alternate .debuginfo.") \ - ONE_KNOWN_DW_FORM_DESC (GNU_strp_alt, DW_FORM_GNU_strp_alt, "offset in alternate .debug_str.") \ - ONE_KNOWN_DW_FORM (addr, DW_FORM_addr) \ - ONE_KNOWN_DW_FORM (block, DW_FORM_block) \ - ONE_KNOWN_DW_FORM (block1, DW_FORM_block1) \ - ONE_KNOWN_DW_FORM (block2, DW_FORM_block2) \ - ONE_KNOWN_DW_FORM (block4, DW_FORM_block4) \ - ONE_KNOWN_DW_FORM (data1, DW_FORM_data1) \ - ONE_KNOWN_DW_FORM (data2, DW_FORM_data2) \ - ONE_KNOWN_DW_FORM (data4, DW_FORM_data4) \ - ONE_KNOWN_DW_FORM (data8, DW_FORM_data8) \ - ONE_KNOWN_DW_FORM (exprloc, DW_FORM_exprloc) \ - ONE_KNOWN_DW_FORM (flag, DW_FORM_flag) \ - ONE_KNOWN_DW_FORM (flag_present, DW_FORM_flag_present) \ - ONE_KNOWN_DW_FORM (indirect, DW_FORM_indirect) \ - ONE_KNOWN_DW_FORM (ref1, DW_FORM_ref1) \ - ONE_KNOWN_DW_FORM (ref2, DW_FORM_ref2) \ - ONE_KNOWN_DW_FORM (ref4, DW_FORM_ref4) \ - ONE_KNOWN_DW_FORM (ref8, DW_FORM_ref8) \ - ONE_KNOWN_DW_FORM (ref_addr, DW_FORM_ref_addr) \ - ONE_KNOWN_DW_FORM (ref_sig8, DW_FORM_ref_sig8) \ - ONE_KNOWN_DW_FORM (ref_udata, DW_FORM_ref_udata) \ - ONE_KNOWN_DW_FORM (sdata, DW_FORM_sdata) \ - ONE_KNOWN_DW_FORM (sec_offset, DW_FORM_sec_offset) \ - ONE_KNOWN_DW_FORM (string, DW_FORM_string) \ - ONE_KNOWN_DW_FORM (strp, DW_FORM_strp) \ - ONE_KNOWN_DW_FORM (udata, DW_FORM_udata) \ +#define DWARF_ALL_KNOWN_DW_FORM \ + DWARF_ONE_KNOWN_DW_FORM (GNU_ref_alt, DW_FORM_GNU_ref_alt) \ + DWARF_ONE_KNOWN_DW_FORM (GNU_strp_alt, DW_FORM_GNU_strp_alt) \ + DWARF_ONE_KNOWN_DW_FORM (addr, DW_FORM_addr) \ + DWARF_ONE_KNOWN_DW_FORM (block, DW_FORM_block) \ + DWARF_ONE_KNOWN_DW_FORM (block1, DW_FORM_block1) \ + DWARF_ONE_KNOWN_DW_FORM (block2, DW_FORM_block2) \ + DWARF_ONE_KNOWN_DW_FORM (block4, DW_FORM_block4) \ + DWARF_ONE_KNOWN_DW_FORM (data1, DW_FORM_data1) \ + DWARF_ONE_KNOWN_DW_FORM (data2, DW_FORM_data2) \ + DWARF_ONE_KNOWN_DW_FORM (data4, DW_FORM_data4) \ + DWARF_ONE_KNOWN_DW_FORM (data8, DW_FORM_data8) \ + DWARF_ONE_KNOWN_DW_FORM (exprloc, DW_FORM_exprloc) \ + DWARF_ONE_KNOWN_DW_FORM (flag, DW_FORM_flag) \ + DWARF_ONE_KNOWN_DW_FORM (flag_present, DW_FORM_flag_present) \ + DWARF_ONE_KNOWN_DW_FORM (indirect, DW_FORM_indirect) \ + DWARF_ONE_KNOWN_DW_FORM (ref1, DW_FORM_ref1) \ + DWARF_ONE_KNOWN_DW_FORM (ref2, DW_FORM_ref2) \ + DWARF_ONE_KNOWN_DW_FORM (ref4, DW_FORM_ref4) \ + DWARF_ONE_KNOWN_DW_FORM (ref8, DW_FORM_ref8) \ + DWARF_ONE_KNOWN_DW_FORM (ref_addr, DW_FORM_ref_addr) \ + DWARF_ONE_KNOWN_DW_FORM (ref_sig8, DW_FORM_ref_sig8) \ + DWARF_ONE_KNOWN_DW_FORM (ref_udata, DW_FORM_ref_udata) \ + DWARF_ONE_KNOWN_DW_FORM (sdata, DW_FORM_sdata) \ + DWARF_ONE_KNOWN_DW_FORM (sec_offset, DW_FORM_sec_offset) \ + DWARF_ONE_KNOWN_DW_FORM (string, DW_FORM_string) \ + DWARF_ONE_KNOWN_DW_FORM (strp, DW_FORM_strp) \ + DWARF_ONE_KNOWN_DW_FORM (udata, DW_FORM_udata) \ /* End of DW_FORM_*. */ -#define ALL_KNOWN_DW_ID \ - ONE_KNOWN_DW_ID (case_insensitive, DW_ID_case_insensitive) \ - ONE_KNOWN_DW_ID (case_sensitive, DW_ID_case_sensitive) \ - ONE_KNOWN_DW_ID (down_case, DW_ID_down_case) \ - ONE_KNOWN_DW_ID (up_case, DW_ID_up_case) \ +#define DWARF_ALL_KNOWN_DW_ID \ + DWARF_ONE_KNOWN_DW_ID (case_insensitive, DW_ID_case_insensitive) \ + DWARF_ONE_KNOWN_DW_ID (case_sensitive, DW_ID_case_sensitive) \ + DWARF_ONE_KNOWN_DW_ID (down_case, DW_ID_down_case) \ + DWARF_ONE_KNOWN_DW_ID (up_case, DW_ID_up_case) \ /* End of DW_ID_*. */ -#define ALL_KNOWN_DW_INL \ - ONE_KNOWN_DW_INL (declared_inlined, DW_INL_declared_inlined) \ - ONE_KNOWN_DW_INL (declared_not_inlined, DW_INL_declared_not_inlined) \ - ONE_KNOWN_DW_INL (inlined, DW_INL_inlined) \ - ONE_KNOWN_DW_INL (not_inlined, DW_INL_not_inlined) \ +#define DWARF_ALL_KNOWN_DW_INL \ + DWARF_ONE_KNOWN_DW_INL (declared_inlined, DW_INL_declared_inlined) \ + DWARF_ONE_KNOWN_DW_INL (declared_not_inlined, DW_INL_declared_not_inlined) \ + DWARF_ONE_KNOWN_DW_INL (inlined, DW_INL_inlined) \ + DWARF_ONE_KNOWN_DW_INL (not_inlined, DW_INL_not_inlined) \ /* End of DW_INL_*. */ -#define ALL_KNOWN_DW_LANG \ - ONE_KNOWN_DW_LANG_DESC (Ada83, DW_LANG_Ada83, "ISO Ada:1983") \ - ONE_KNOWN_DW_LANG_DESC (Ada95, DW_LANG_Ada95, "ISO Ada:1995") \ - ONE_KNOWN_DW_LANG_DESC (C, DW_LANG_C, "C") \ - ONE_KNOWN_DW_LANG_DESC (C89, DW_LANG_C89, "ISO C:1989") \ - ONE_KNOWN_DW_LANG_DESC (C99, DW_LANG_C99, "ISO C:1999") \ - ONE_KNOWN_DW_LANG_DESC (C_plus_plus, DW_LANG_C_plus_plus, "ISO C++:1998") \ - ONE_KNOWN_DW_LANG_DESC (Cobol74, DW_LANG_Cobol74, "ISO Cobol:1974") \ - ONE_KNOWN_DW_LANG_DESC (Cobol85, DW_LANG_Cobol85, "ISO Cobol:1985") \ - ONE_KNOWN_DW_LANG_DESC (D, DW_LANG_D, "D") \ - ONE_KNOWN_DW_LANG_DESC (Fortran77, DW_LANG_Fortran77, "ISO FORTRAN 77") \ - ONE_KNOWN_DW_LANG_DESC (Fortran90, DW_LANG_Fortran90, "ISO Fortran 90") \ - ONE_KNOWN_DW_LANG_DESC (Fortran95, DW_LANG_Fortran95, "ISO Fortran 95") \ - ONE_KNOWN_DW_LANG_DESC (Go, DW_LANG_Go, "Go") \ - ONE_KNOWN_DW_LANG_DESC (Java, DW_LANG_Java, "Java") \ - ONE_KNOWN_DW_LANG_DESC (Mips_Assembler, DW_LANG_Mips_Assembler, "Assembler") \ - ONE_KNOWN_DW_LANG_DESC (Modula2, DW_LANG_Modula2, "ISO Modula-2:1996") \ - ONE_KNOWN_DW_LANG_DESC (ObjC, DW_LANG_ObjC, "Objective-C") \ - ONE_KNOWN_DW_LANG_DESC (ObjC_plus_plus, DW_LANG_ObjC_plus_plus, "Objective-C++") \ - ONE_KNOWN_DW_LANG_DESC (PL1, DW_LANG_PL1, "ISO PL/1:1976") \ - ONE_KNOWN_DW_LANG_DESC (Pascal83, DW_LANG_Pascal83, "ISO Pascal:1983") \ - ONE_KNOWN_DW_LANG_DESC (Python, DW_LANG_Python, "Python") \ - ONE_KNOWN_DW_LANG_DESC (UPC, DW_LANG_UPC, "Unified Parallel C") \ +#define DWARF_ALL_KNOWN_DW_LANG \ + DWARF_ONE_KNOWN_DW_LANG (Ada83, DW_LANG_Ada83) \ + DWARF_ONE_KNOWN_DW_LANG (Ada95, DW_LANG_Ada95) \ + DWARF_ONE_KNOWN_DW_LANG (C, DW_LANG_C) \ + DWARF_ONE_KNOWN_DW_LANG (C11, DW_LANG_C11) \ + DWARF_ONE_KNOWN_DW_LANG (C89, DW_LANG_C89) \ + DWARF_ONE_KNOWN_DW_LANG (C99, DW_LANG_C99) \ + DWARF_ONE_KNOWN_DW_LANG (C_plus_plus, DW_LANG_C_plus_plus) \ + DWARF_ONE_KNOWN_DW_LANG (C_plus_plus_11, DW_LANG_C_plus_plus_11) \ + DWARF_ONE_KNOWN_DW_LANG (C_plus_plus_14, DW_LANG_C_plus_plus_14) \ + DWARF_ONE_KNOWN_DW_LANG (Cobol74, DW_LANG_Cobol74) \ + DWARF_ONE_KNOWN_DW_LANG (Cobol85, DW_LANG_Cobol85) \ + DWARF_ONE_KNOWN_DW_LANG (D, DW_LANG_D) \ + DWARF_ONE_KNOWN_DW_LANG (Fortran03, DW_LANG_Fortran03) \ + DWARF_ONE_KNOWN_DW_LANG (Fortran08, DW_LANG_Fortran08) \ + DWARF_ONE_KNOWN_DW_LANG (Fortran77, DW_LANG_Fortran77) \ + DWARF_ONE_KNOWN_DW_LANG (Fortran90, DW_LANG_Fortran90) \ + DWARF_ONE_KNOWN_DW_LANG (Fortran95, DW_LANG_Fortran95) \ + DWARF_ONE_KNOWN_DW_LANG (Go, DW_LANG_Go) \ + DWARF_ONE_KNOWN_DW_LANG (Haskell, DW_LANG_Haskell) \ + DWARF_ONE_KNOWN_DW_LANG (Java, DW_LANG_Java) \ + DWARF_ONE_KNOWN_DW_LANG (Mips_Assembler, DW_LANG_Mips_Assembler) \ + DWARF_ONE_KNOWN_DW_LANG (Modula2, DW_LANG_Modula2) \ + DWARF_ONE_KNOWN_DW_LANG (ObjC, DW_LANG_ObjC) \ + DWARF_ONE_KNOWN_DW_LANG (ObjC_plus_plus, DW_LANG_ObjC_plus_plus) \ + DWARF_ONE_KNOWN_DW_LANG (PL1, DW_LANG_PL1) \ + DWARF_ONE_KNOWN_DW_LANG (Pascal83, DW_LANG_Pascal83) \ + DWARF_ONE_KNOWN_DW_LANG (Python, DW_LANG_Python) \ + DWARF_ONE_KNOWN_DW_LANG (UPC, DW_LANG_UPC) \ /* End of DW_LANG_*. */ -#define ALL_KNOWN_DW_LNE \ - ONE_KNOWN_DW_LNE (define_file, DW_LNE_define_file) \ - ONE_KNOWN_DW_LNE (end_sequence, DW_LNE_end_sequence) \ - ONE_KNOWN_DW_LNE (set_address, DW_LNE_set_address) \ - ONE_KNOWN_DW_LNE (set_discriminator, DW_LNE_set_discriminator) \ +#define DWARF_ALL_KNOWN_DW_LNE \ + DWARF_ONE_KNOWN_DW_LNE (define_file, DW_LNE_define_file) \ + DWARF_ONE_KNOWN_DW_LNE (end_sequence, DW_LNE_end_sequence) \ + DWARF_ONE_KNOWN_DW_LNE (set_address, DW_LNE_set_address) \ + DWARF_ONE_KNOWN_DW_LNE (set_discriminator, DW_LNE_set_discriminator) \ /* End of DW_LNE_*. */ -#define ALL_KNOWN_DW_LNS \ - ONE_KNOWN_DW_LNS (advance_line, DW_LNS_advance_line) \ - ONE_KNOWN_DW_LNS (advance_pc, DW_LNS_advance_pc) \ - ONE_KNOWN_DW_LNS (const_add_pc, DW_LNS_const_add_pc) \ - ONE_KNOWN_DW_LNS (copy, DW_LNS_copy) \ - ONE_KNOWN_DW_LNS (fixed_advance_pc, DW_LNS_fixed_advance_pc) \ - ONE_KNOWN_DW_LNS (negate_stmt, DW_LNS_negate_stmt) \ - ONE_KNOWN_DW_LNS (set_basic_block, DW_LNS_set_basic_block) \ - ONE_KNOWN_DW_LNS (set_column, DW_LNS_set_column) \ - ONE_KNOWN_DW_LNS (set_epilogue_begin, DW_LNS_set_epilogue_begin) \ - ONE_KNOWN_DW_LNS (set_file, DW_LNS_set_file) \ - ONE_KNOWN_DW_LNS (set_isa, DW_LNS_set_isa) \ - ONE_KNOWN_DW_LNS (set_prologue_end, DW_LNS_set_prologue_end) \ +#define DWARF_ALL_KNOWN_DW_LNS \ + DWARF_ONE_KNOWN_DW_LNS (advance_line, DW_LNS_advance_line) \ + DWARF_ONE_KNOWN_DW_LNS (advance_pc, DW_LNS_advance_pc) \ + DWARF_ONE_KNOWN_DW_LNS (const_add_pc, DW_LNS_const_add_pc) \ + DWARF_ONE_KNOWN_DW_LNS (copy, DW_LNS_copy) \ + DWARF_ONE_KNOWN_DW_LNS (fixed_advance_pc, DW_LNS_fixed_advance_pc) \ + DWARF_ONE_KNOWN_DW_LNS (negate_stmt, DW_LNS_negate_stmt) \ + DWARF_ONE_KNOWN_DW_LNS (set_basic_block, DW_LNS_set_basic_block) \ + DWARF_ONE_KNOWN_DW_LNS (set_column, DW_LNS_set_column) \ + DWARF_ONE_KNOWN_DW_LNS (set_epilogue_begin, DW_LNS_set_epilogue_begin) \ + DWARF_ONE_KNOWN_DW_LNS (set_file, DW_LNS_set_file) \ + DWARF_ONE_KNOWN_DW_LNS (set_isa, DW_LNS_set_isa) \ + DWARF_ONE_KNOWN_DW_LNS (set_prologue_end, DW_LNS_set_prologue_end) \ /* End of DW_LNS_*. */ -#define ALL_KNOWN_DW_MACINFO \ - ONE_KNOWN_DW_MACINFO (define, DW_MACINFO_define) \ - ONE_KNOWN_DW_MACINFO (end_file, DW_MACINFO_end_file) \ - ONE_KNOWN_DW_MACINFO (start_file, DW_MACINFO_start_file) \ - ONE_KNOWN_DW_MACINFO (undef, DW_MACINFO_undef) \ - ONE_KNOWN_DW_MACINFO (vendor_ext, DW_MACINFO_vendor_ext) \ +#define DWARF_ALL_KNOWN_DW_MACINFO \ + DWARF_ONE_KNOWN_DW_MACINFO (define, DW_MACINFO_define) \ + DWARF_ONE_KNOWN_DW_MACINFO (end_file, DW_MACINFO_end_file) \ + DWARF_ONE_KNOWN_DW_MACINFO (start_file, DW_MACINFO_start_file) \ + DWARF_ONE_KNOWN_DW_MACINFO (undef, DW_MACINFO_undef) \ + DWARF_ONE_KNOWN_DW_MACINFO (vendor_ext, DW_MACINFO_vendor_ext) \ /* End of DW_MACINFO_*. */ -#define ALL_KNOWN_DW_MACRO_GNU \ - ONE_KNOWN_DW_MACRO_GNU (define, DW_MACRO_GNU_define) \ - ONE_KNOWN_DW_MACRO_GNU (define_indirect, DW_MACRO_GNU_define_indirect) \ - ONE_KNOWN_DW_MACRO_GNU (end_file, DW_MACRO_GNU_end_file) \ - ONE_KNOWN_DW_MACRO_GNU (start_file, DW_MACRO_GNU_start_file) \ - ONE_KNOWN_DW_MACRO_GNU (transparent_include, DW_MACRO_GNU_transparent_include) \ - ONE_KNOWN_DW_MACRO_GNU (undef, DW_MACRO_GNU_undef) \ - ONE_KNOWN_DW_MACRO_GNU (undef_indirect, DW_MACRO_GNU_undef_indirect) \ +#define DWARF_ALL_KNOWN_DW_MACRO_GNU \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (define, DW_MACRO_GNU_define) \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (define_indirect, DW_MACRO_GNU_define_indirect) \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (end_file, DW_MACRO_GNU_end_file) \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (start_file, DW_MACRO_GNU_start_file) \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (transparent_include, DW_MACRO_GNU_transparent_include) \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (undef, DW_MACRO_GNU_undef) \ + DWARF_ONE_KNOWN_DW_MACRO_GNU (undef_indirect, DW_MACRO_GNU_undef_indirect) \ /* End of DW_MACRO_GNU_*. */ -#define ALL_KNOWN_DW_OP \ - ONE_KNOWN_DW_OP (GNU_const_type, DW_OP_GNU_const_type) \ - ONE_KNOWN_DW_OP (GNU_convert, DW_OP_GNU_convert) \ - ONE_KNOWN_DW_OP (GNU_deref_type, DW_OP_GNU_deref_type) \ - ONE_KNOWN_DW_OP (GNU_encoded_addr, DW_OP_GNU_encoded_addr) \ - ONE_KNOWN_DW_OP (GNU_entry_value, DW_OP_GNU_entry_value) \ - ONE_KNOWN_DW_OP (GNU_implicit_pointer, DW_OP_GNU_implicit_pointer) \ - ONE_KNOWN_DW_OP (GNU_parameter_ref, DW_OP_GNU_parameter_ref) \ - ONE_KNOWN_DW_OP (GNU_push_tls_address, DW_OP_GNU_push_tls_address) \ - ONE_KNOWN_DW_OP (GNU_regval_type, DW_OP_GNU_regval_type) \ - ONE_KNOWN_DW_OP (GNU_reinterpret, DW_OP_GNU_reinterpret) \ - ONE_KNOWN_DW_OP (GNU_uninit, DW_OP_GNU_uninit) \ - ONE_KNOWN_DW_OP (abs, DW_OP_abs) \ - ONE_KNOWN_DW_OP_DESC (addr, DW_OP_addr, "Constant address.") \ - ONE_KNOWN_DW_OP (and, DW_OP_and) \ - ONE_KNOWN_DW_OP_DESC (bit_piece, DW_OP_bit_piece, "ULEB128 size and ULEB128 offset in bits.") \ - ONE_KNOWN_DW_OP_DESC (bra, DW_OP_bra, "Signed 2-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (breg0, DW_OP_breg0, "Base register 0.") \ - ONE_KNOWN_DW_OP_DESC (breg1, DW_OP_breg1, "Base register 1.") \ - ONE_KNOWN_DW_OP_DESC (breg10, DW_OP_breg10, "Base register 10.") \ - ONE_KNOWN_DW_OP_DESC (breg11, DW_OP_breg11, "Base register 11.") \ - ONE_KNOWN_DW_OP_DESC (breg12, DW_OP_breg12, "Base register 12.") \ - ONE_KNOWN_DW_OP_DESC (breg13, DW_OP_breg13, "Base register 13.") \ - ONE_KNOWN_DW_OP_DESC (breg14, DW_OP_breg14, "Base register 14.") \ - ONE_KNOWN_DW_OP_DESC (breg15, DW_OP_breg15, "Base register 15.") \ - ONE_KNOWN_DW_OP_DESC (breg16, DW_OP_breg16, "Base register 16.") \ - ONE_KNOWN_DW_OP_DESC (breg17, DW_OP_breg17, "Base register 17.") \ - ONE_KNOWN_DW_OP_DESC (breg18, DW_OP_breg18, "Base register 18.") \ - ONE_KNOWN_DW_OP_DESC (breg19, DW_OP_breg19, "Base register 19.") \ - ONE_KNOWN_DW_OP_DESC (breg2, DW_OP_breg2, "Base register 2.") \ - ONE_KNOWN_DW_OP_DESC (breg20, DW_OP_breg20, "Base register 20.") \ - ONE_KNOWN_DW_OP_DESC (breg21, DW_OP_breg21, "Base register 21.") \ - ONE_KNOWN_DW_OP_DESC (breg22, DW_OP_breg22, "Base register 22.") \ - ONE_KNOWN_DW_OP_DESC (breg23, DW_OP_breg23, "Base register 23.") \ - ONE_KNOWN_DW_OP_DESC (breg24, DW_OP_breg24, "Base register 24.") \ - ONE_KNOWN_DW_OP_DESC (breg25, DW_OP_breg25, "Base register 25.") \ - ONE_KNOWN_DW_OP_DESC (breg26, DW_OP_breg26, "Base register 26.") \ - ONE_KNOWN_DW_OP_DESC (breg27, DW_OP_breg27, "Base register 27.") \ - ONE_KNOWN_DW_OP_DESC (breg28, DW_OP_breg28, "Base register 28.") \ - ONE_KNOWN_DW_OP_DESC (breg29, DW_OP_breg29, "Base register 29.") \ - ONE_KNOWN_DW_OP_DESC (breg3, DW_OP_breg3, "Base register 3.") \ - ONE_KNOWN_DW_OP_DESC (breg30, DW_OP_breg30, "Base register 30.") \ - ONE_KNOWN_DW_OP_DESC (breg31, DW_OP_breg31, "Base register 31.") \ - ONE_KNOWN_DW_OP_DESC (breg4, DW_OP_breg4, "Base register 4.") \ - ONE_KNOWN_DW_OP_DESC (breg5, DW_OP_breg5, "Base register 5.") \ - ONE_KNOWN_DW_OP_DESC (breg6, DW_OP_breg6, "Base register 6.") \ - ONE_KNOWN_DW_OP_DESC (breg7, DW_OP_breg7, "Base register 7.") \ - ONE_KNOWN_DW_OP_DESC (breg8, DW_OP_breg8, "Base register 8.") \ - ONE_KNOWN_DW_OP_DESC (breg9, DW_OP_breg9, "Base register 9.") \ - ONE_KNOWN_DW_OP_DESC (bregx, DW_OP_bregx, "ULEB128 register followed by SLEB128 off.") \ - ONE_KNOWN_DW_OP (call2, DW_OP_call2) \ - ONE_KNOWN_DW_OP (call4, DW_OP_call4) \ - ONE_KNOWN_DW_OP (call_frame_cfa, DW_OP_call_frame_cfa) \ - ONE_KNOWN_DW_OP (call_ref, DW_OP_call_ref) \ - ONE_KNOWN_DW_OP_DESC (const1s, DW_OP_const1s, "Signed 1-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const1u, DW_OP_const1u, "Unsigned 1-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const2s, DW_OP_const2s, "Signed 2-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const2u, DW_OP_const2u, "Unsigned 2-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const4s, DW_OP_const4s, "Signed 4-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const4u, DW_OP_const4u, "Unsigned 4-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const8s, DW_OP_const8s, "Signed 8-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (const8u, DW_OP_const8u, "Unsigned 8-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (consts, DW_OP_consts, "Signed LEB128 constant.") \ - ONE_KNOWN_DW_OP_DESC (constu, DW_OP_constu, "Unsigned LEB128 constant.") \ - ONE_KNOWN_DW_OP (deref, DW_OP_deref) \ - ONE_KNOWN_DW_OP_DESC (deref_size, DW_OP_deref_size, "1-byte size of data retrieved.") \ - ONE_KNOWN_DW_OP (div, DW_OP_div) \ - ONE_KNOWN_DW_OP (drop, DW_OP_drop) \ - ONE_KNOWN_DW_OP (dup, DW_OP_dup) \ - ONE_KNOWN_DW_OP (eq, DW_OP_eq) \ - ONE_KNOWN_DW_OP_DESC (fbreg, DW_OP_fbreg, "Signed LEB128 offset.") \ - ONE_KNOWN_DW_OP (form_tls_address, DW_OP_form_tls_address) \ - ONE_KNOWN_DW_OP (ge, DW_OP_ge) \ - ONE_KNOWN_DW_OP (gt, DW_OP_gt) \ - ONE_KNOWN_DW_OP_DESC (implicit_value, DW_OP_implicit_value, "DW_FORM_block follows opcode.") \ - ONE_KNOWN_DW_OP (le, DW_OP_le) \ - ONE_KNOWN_DW_OP_DESC (lit0, DW_OP_lit0, "Literal 0.") \ - ONE_KNOWN_DW_OP_DESC (lit1, DW_OP_lit1, "Literal 1.") \ - ONE_KNOWN_DW_OP_DESC (lit10, DW_OP_lit10, "Literal 10.") \ - ONE_KNOWN_DW_OP_DESC (lit11, DW_OP_lit11, "Literal 11.") \ - ONE_KNOWN_DW_OP_DESC (lit12, DW_OP_lit12, "Literal 12.") \ - ONE_KNOWN_DW_OP_DESC (lit13, DW_OP_lit13, "Literal 13.") \ - ONE_KNOWN_DW_OP_DESC (lit14, DW_OP_lit14, "Literal 14.") \ - ONE_KNOWN_DW_OP_DESC (lit15, DW_OP_lit15, "Literal 15.") \ - ONE_KNOWN_DW_OP_DESC (lit16, DW_OP_lit16, "Literal 16.") \ - ONE_KNOWN_DW_OP_DESC (lit17, DW_OP_lit17, "Literal 17.") \ - ONE_KNOWN_DW_OP_DESC (lit18, DW_OP_lit18, "Literal 18.") \ - ONE_KNOWN_DW_OP_DESC (lit19, DW_OP_lit19, "Literal 19.") \ - ONE_KNOWN_DW_OP_DESC (lit2, DW_OP_lit2, "Literal 2.") \ - ONE_KNOWN_DW_OP_DESC (lit20, DW_OP_lit20, "Literal 20.") \ - ONE_KNOWN_DW_OP_DESC (lit21, DW_OP_lit21, "Literal 21.") \ - ONE_KNOWN_DW_OP_DESC (lit22, DW_OP_lit22, "Literal 22.") \ - ONE_KNOWN_DW_OP_DESC (lit23, DW_OP_lit23, "Literal 23.") \ - ONE_KNOWN_DW_OP_DESC (lit24, DW_OP_lit24, "Literal 24.") \ - ONE_KNOWN_DW_OP_DESC (lit25, DW_OP_lit25, "Literal 25.") \ - ONE_KNOWN_DW_OP_DESC (lit26, DW_OP_lit26, "Literal 26.") \ - ONE_KNOWN_DW_OP_DESC (lit27, DW_OP_lit27, "Literal 27.") \ - ONE_KNOWN_DW_OP_DESC (lit28, DW_OP_lit28, "Literal 28.") \ - ONE_KNOWN_DW_OP_DESC (lit29, DW_OP_lit29, "Literal 29.") \ - ONE_KNOWN_DW_OP_DESC (lit3, DW_OP_lit3, "Literal 3.") \ - ONE_KNOWN_DW_OP_DESC (lit30, DW_OP_lit30, "Literal 30.") \ - ONE_KNOWN_DW_OP_DESC (lit31, DW_OP_lit31, "Literal 31.") \ - ONE_KNOWN_DW_OP_DESC (lit4, DW_OP_lit4, "Literal 4.") \ - ONE_KNOWN_DW_OP_DESC (lit5, DW_OP_lit5, "Literal 5.") \ - ONE_KNOWN_DW_OP_DESC (lit6, DW_OP_lit6, "Literal 6.") \ - ONE_KNOWN_DW_OP_DESC (lit7, DW_OP_lit7, "Literal 7.") \ - ONE_KNOWN_DW_OP_DESC (lit8, DW_OP_lit8, "Literal 8.") \ - ONE_KNOWN_DW_OP_DESC (lit9, DW_OP_lit9, "Literal 9.") \ - ONE_KNOWN_DW_OP (lt, DW_OP_lt) \ - ONE_KNOWN_DW_OP (minus, DW_OP_minus) \ - ONE_KNOWN_DW_OP (mod, DW_OP_mod) \ - ONE_KNOWN_DW_OP (mul, DW_OP_mul) \ - ONE_KNOWN_DW_OP (ne, DW_OP_ne) \ - ONE_KNOWN_DW_OP (neg, DW_OP_neg) \ - ONE_KNOWN_DW_OP (nop, DW_OP_nop) \ - ONE_KNOWN_DW_OP (not, DW_OP_not) \ - ONE_KNOWN_DW_OP (or, DW_OP_or) \ - ONE_KNOWN_DW_OP (over, DW_OP_over) \ - ONE_KNOWN_DW_OP_DESC (pick, DW_OP_pick, "1-byte stack index.") \ - ONE_KNOWN_DW_OP_DESC (piece, DW_OP_piece, "ULEB128 size of piece addressed.") \ - ONE_KNOWN_DW_OP (plus, DW_OP_plus) \ - ONE_KNOWN_DW_OP_DESC (plus_uconst, DW_OP_plus_uconst, "Unsigned LEB128 addend.") \ - ONE_KNOWN_DW_OP (push_object_address, DW_OP_push_object_address) \ - ONE_KNOWN_DW_OP_DESC (reg0, DW_OP_reg0, "Register 0.") \ - ONE_KNOWN_DW_OP_DESC (reg1, DW_OP_reg1, "Register 1.") \ - ONE_KNOWN_DW_OP_DESC (reg10, DW_OP_reg10, "Register 10.") \ - ONE_KNOWN_DW_OP_DESC (reg11, DW_OP_reg11, "Register 11.") \ - ONE_KNOWN_DW_OP_DESC (reg12, DW_OP_reg12, "Register 12.") \ - ONE_KNOWN_DW_OP_DESC (reg13, DW_OP_reg13, "Register 13.") \ - ONE_KNOWN_DW_OP_DESC (reg14, DW_OP_reg14, "Register 14.") \ - ONE_KNOWN_DW_OP_DESC (reg15, DW_OP_reg15, "Register 15.") \ - ONE_KNOWN_DW_OP_DESC (reg16, DW_OP_reg16, "Register 16.") \ - ONE_KNOWN_DW_OP_DESC (reg17, DW_OP_reg17, "Register 17.") \ - ONE_KNOWN_DW_OP_DESC (reg18, DW_OP_reg18, "Register 18.") \ - ONE_KNOWN_DW_OP_DESC (reg19, DW_OP_reg19, "Register 19.") \ - ONE_KNOWN_DW_OP_DESC (reg2, DW_OP_reg2, "Register 2.") \ - ONE_KNOWN_DW_OP_DESC (reg20, DW_OP_reg20, "Register 20.") \ - ONE_KNOWN_DW_OP_DESC (reg21, DW_OP_reg21, "Register 21.") \ - ONE_KNOWN_DW_OP_DESC (reg22, DW_OP_reg22, "Register 22.") \ - ONE_KNOWN_DW_OP_DESC (reg23, DW_OP_reg23, "Register 24.") \ - ONE_KNOWN_DW_OP_DESC (reg24, DW_OP_reg24, "Register 24.") \ - ONE_KNOWN_DW_OP_DESC (reg25, DW_OP_reg25, "Register 25.") \ - ONE_KNOWN_DW_OP_DESC (reg26, DW_OP_reg26, "Register 26.") \ - ONE_KNOWN_DW_OP_DESC (reg27, DW_OP_reg27, "Register 27.") \ - ONE_KNOWN_DW_OP_DESC (reg28, DW_OP_reg28, "Register 28.") \ - ONE_KNOWN_DW_OP_DESC (reg29, DW_OP_reg29, "Register 29.") \ - ONE_KNOWN_DW_OP_DESC (reg3, DW_OP_reg3, "Register 3.") \ - ONE_KNOWN_DW_OP_DESC (reg30, DW_OP_reg30, "Register 30.") \ - ONE_KNOWN_DW_OP_DESC (reg31, DW_OP_reg31, "Register 31.") \ - ONE_KNOWN_DW_OP_DESC (reg4, DW_OP_reg4, "Register 4.") \ - ONE_KNOWN_DW_OP_DESC (reg5, DW_OP_reg5, "Register 5.") \ - ONE_KNOWN_DW_OP_DESC (reg6, DW_OP_reg6, "Register 6.") \ - ONE_KNOWN_DW_OP_DESC (reg7, DW_OP_reg7, "Register 7.") \ - ONE_KNOWN_DW_OP_DESC (reg8, DW_OP_reg8, "Register 8.") \ - ONE_KNOWN_DW_OP_DESC (reg9, DW_OP_reg9, "Register 9.") \ - ONE_KNOWN_DW_OP_DESC (regx, DW_OP_regx, "Unsigned LEB128 register.") \ - ONE_KNOWN_DW_OP (rot, DW_OP_rot) \ - ONE_KNOWN_DW_OP (shl, DW_OP_shl) \ - ONE_KNOWN_DW_OP (shr, DW_OP_shr) \ - ONE_KNOWN_DW_OP (shra, DW_OP_shra) \ - ONE_KNOWN_DW_OP_DESC (skip, DW_OP_skip, "Signed 2-byte constant.") \ - ONE_KNOWN_DW_OP_DESC (stack_value, DW_OP_stack_value, "No operands, special like DW_OP_piece.") \ - ONE_KNOWN_DW_OP (swap, DW_OP_swap) \ - ONE_KNOWN_DW_OP (xderef, DW_OP_xderef) \ - ONE_KNOWN_DW_OP_DESC (xderef_size, DW_OP_xderef_size, "1-byte size of data retrieved.") \ - ONE_KNOWN_DW_OP (xor, DW_OP_xor) \ +#define DWARF_ALL_KNOWN_DW_OP \ + DWARF_ONE_KNOWN_DW_OP (GNU_const_type, DW_OP_GNU_const_type) \ + DWARF_ONE_KNOWN_DW_OP (GNU_convert, DW_OP_GNU_convert) \ + DWARF_ONE_KNOWN_DW_OP (GNU_deref_type, DW_OP_GNU_deref_type) \ + DWARF_ONE_KNOWN_DW_OP (GNU_encoded_addr, DW_OP_GNU_encoded_addr) \ + DWARF_ONE_KNOWN_DW_OP (GNU_entry_value, DW_OP_GNU_entry_value) \ + DWARF_ONE_KNOWN_DW_OP (GNU_implicit_pointer, DW_OP_GNU_implicit_pointer) \ + DWARF_ONE_KNOWN_DW_OP (GNU_parameter_ref, DW_OP_GNU_parameter_ref) \ + DWARF_ONE_KNOWN_DW_OP (GNU_push_tls_address, DW_OP_GNU_push_tls_address) \ + DWARF_ONE_KNOWN_DW_OP (GNU_regval_type, DW_OP_GNU_regval_type) \ + DWARF_ONE_KNOWN_DW_OP (GNU_reinterpret, DW_OP_GNU_reinterpret) \ + DWARF_ONE_KNOWN_DW_OP (GNU_uninit, DW_OP_GNU_uninit) \ + DWARF_ONE_KNOWN_DW_OP (abs, DW_OP_abs) \ + DWARF_ONE_KNOWN_DW_OP (addr, DW_OP_addr) \ + DWARF_ONE_KNOWN_DW_OP (and, DW_OP_and) \ + DWARF_ONE_KNOWN_DW_OP (bit_piece, DW_OP_bit_piece) \ + DWARF_ONE_KNOWN_DW_OP (bra, DW_OP_bra) \ + DWARF_ONE_KNOWN_DW_OP (breg0, DW_OP_breg0) \ + DWARF_ONE_KNOWN_DW_OP (breg1, DW_OP_breg1) \ + DWARF_ONE_KNOWN_DW_OP (breg10, DW_OP_breg10) \ + DWARF_ONE_KNOWN_DW_OP (breg11, DW_OP_breg11) \ + DWARF_ONE_KNOWN_DW_OP (breg12, DW_OP_breg12) \ + DWARF_ONE_KNOWN_DW_OP (breg13, DW_OP_breg13) \ + DWARF_ONE_KNOWN_DW_OP (breg14, DW_OP_breg14) \ + DWARF_ONE_KNOWN_DW_OP (breg15, DW_OP_breg15) \ + DWARF_ONE_KNOWN_DW_OP (breg16, DW_OP_breg16) \ + DWARF_ONE_KNOWN_DW_OP (breg17, DW_OP_breg17) \ + DWARF_ONE_KNOWN_DW_OP (breg18, DW_OP_breg18) \ + DWARF_ONE_KNOWN_DW_OP (breg19, DW_OP_breg19) \ + DWARF_ONE_KNOWN_DW_OP (breg2, DW_OP_breg2) \ + DWARF_ONE_KNOWN_DW_OP (breg20, DW_OP_breg20) \ + DWARF_ONE_KNOWN_DW_OP (breg21, DW_OP_breg21) \ + DWARF_ONE_KNOWN_DW_OP (breg22, DW_OP_breg22) \ + DWARF_ONE_KNOWN_DW_OP (breg23, DW_OP_breg23) \ + DWARF_ONE_KNOWN_DW_OP (breg24, DW_OP_breg24) \ + DWARF_ONE_KNOWN_DW_OP (breg25, DW_OP_breg25) \ + DWARF_ONE_KNOWN_DW_OP (breg26, DW_OP_breg26) \ + DWARF_ONE_KNOWN_DW_OP (breg27, DW_OP_breg27) \ + DWARF_ONE_KNOWN_DW_OP (breg28, DW_OP_breg28) \ + DWARF_ONE_KNOWN_DW_OP (breg29, DW_OP_breg29) \ + DWARF_ONE_KNOWN_DW_OP (breg3, DW_OP_breg3) \ + DWARF_ONE_KNOWN_DW_OP (breg30, DW_OP_breg30) \ + DWARF_ONE_KNOWN_DW_OP (breg31, DW_OP_breg31) \ + DWARF_ONE_KNOWN_DW_OP (breg4, DW_OP_breg4) \ + DWARF_ONE_KNOWN_DW_OP (breg5, DW_OP_breg5) \ + DWARF_ONE_KNOWN_DW_OP (breg6, DW_OP_breg6) \ + DWARF_ONE_KNOWN_DW_OP (breg7, DW_OP_breg7) \ + DWARF_ONE_KNOWN_DW_OP (breg8, DW_OP_breg8) \ + DWARF_ONE_KNOWN_DW_OP (breg9, DW_OP_breg9) \ + DWARF_ONE_KNOWN_DW_OP (bregx, DW_OP_bregx) \ + DWARF_ONE_KNOWN_DW_OP (call2, DW_OP_call2) \ + DWARF_ONE_KNOWN_DW_OP (call4, DW_OP_call4) \ + DWARF_ONE_KNOWN_DW_OP (call_frame_cfa, DW_OP_call_frame_cfa) \ + DWARF_ONE_KNOWN_DW_OP (call_ref, DW_OP_call_ref) \ + DWARF_ONE_KNOWN_DW_OP (const1s, DW_OP_const1s) \ + DWARF_ONE_KNOWN_DW_OP (const1u, DW_OP_const1u) \ + DWARF_ONE_KNOWN_DW_OP (const2s, DW_OP_const2s) \ + DWARF_ONE_KNOWN_DW_OP (const2u, DW_OP_const2u) \ + DWARF_ONE_KNOWN_DW_OP (const4s, DW_OP_const4s) \ + DWARF_ONE_KNOWN_DW_OP (const4u, DW_OP_const4u) \ + DWARF_ONE_KNOWN_DW_OP (const8s, DW_OP_const8s) \ + DWARF_ONE_KNOWN_DW_OP (const8u, DW_OP_const8u) \ + DWARF_ONE_KNOWN_DW_OP (consts, DW_OP_consts) \ + DWARF_ONE_KNOWN_DW_OP (constu, DW_OP_constu) \ + DWARF_ONE_KNOWN_DW_OP (deref, DW_OP_deref) \ + DWARF_ONE_KNOWN_DW_OP (deref_size, DW_OP_deref_size) \ + DWARF_ONE_KNOWN_DW_OP (div, DW_OP_div) \ + DWARF_ONE_KNOWN_DW_OP (drop, DW_OP_drop) \ + DWARF_ONE_KNOWN_DW_OP (dup, DW_OP_dup) \ + DWARF_ONE_KNOWN_DW_OP (eq, DW_OP_eq) \ + DWARF_ONE_KNOWN_DW_OP (fbreg, DW_OP_fbreg) \ + DWARF_ONE_KNOWN_DW_OP (form_tls_address, DW_OP_form_tls_address) \ + DWARF_ONE_KNOWN_DW_OP (ge, DW_OP_ge) \ + DWARF_ONE_KNOWN_DW_OP (gt, DW_OP_gt) \ + DWARF_ONE_KNOWN_DW_OP (implicit_value, DW_OP_implicit_value) \ + DWARF_ONE_KNOWN_DW_OP (le, DW_OP_le) \ + DWARF_ONE_KNOWN_DW_OP (lit0, DW_OP_lit0) \ + DWARF_ONE_KNOWN_DW_OP (lit1, DW_OP_lit1) \ + DWARF_ONE_KNOWN_DW_OP (lit10, DW_OP_lit10) \ + DWARF_ONE_KNOWN_DW_OP (lit11, DW_OP_lit11) \ + DWARF_ONE_KNOWN_DW_OP (lit12, DW_OP_lit12) \ + DWARF_ONE_KNOWN_DW_OP (lit13, DW_OP_lit13) \ + DWARF_ONE_KNOWN_DW_OP (lit14, DW_OP_lit14) \ + DWARF_ONE_KNOWN_DW_OP (lit15, DW_OP_lit15) \ + DWARF_ONE_KNOWN_DW_OP (lit16, DW_OP_lit16) \ + DWARF_ONE_KNOWN_DW_OP (lit17, DW_OP_lit17) \ + DWARF_ONE_KNOWN_DW_OP (lit18, DW_OP_lit18) \ + DWARF_ONE_KNOWN_DW_OP (lit19, DW_OP_lit19) \ + DWARF_ONE_KNOWN_DW_OP (lit2, DW_OP_lit2) \ + DWARF_ONE_KNOWN_DW_OP (lit20, DW_OP_lit20) \ + DWARF_ONE_KNOWN_DW_OP (lit21, DW_OP_lit21) \ + DWARF_ONE_KNOWN_DW_OP (lit22, DW_OP_lit22) \ + DWARF_ONE_KNOWN_DW_OP (lit23, DW_OP_lit23) \ + DWARF_ONE_KNOWN_DW_OP (lit24, DW_OP_lit24) \ + DWARF_ONE_KNOWN_DW_OP (lit25, DW_OP_lit25) \ + DWARF_ONE_KNOWN_DW_OP (lit26, DW_OP_lit26) \ + DWARF_ONE_KNOWN_DW_OP (lit27, DW_OP_lit27) \ + DWARF_ONE_KNOWN_DW_OP (lit28, DW_OP_lit28) \ + DWARF_ONE_KNOWN_DW_OP (lit29, DW_OP_lit29) \ + DWARF_ONE_KNOWN_DW_OP (lit3, DW_OP_lit3) \ + DWARF_ONE_KNOWN_DW_OP (lit30, DW_OP_lit30) \ + DWARF_ONE_KNOWN_DW_OP (lit31, DW_OP_lit31) \ + DWARF_ONE_KNOWN_DW_OP (lit4, DW_OP_lit4) \ + DWARF_ONE_KNOWN_DW_OP (lit5, DW_OP_lit5) \ + DWARF_ONE_KNOWN_DW_OP (lit6, DW_OP_lit6) \ + DWARF_ONE_KNOWN_DW_OP (lit7, DW_OP_lit7) \ + DWARF_ONE_KNOWN_DW_OP (lit8, DW_OP_lit8) \ + DWARF_ONE_KNOWN_DW_OP (lit9, DW_OP_lit9) \ + DWARF_ONE_KNOWN_DW_OP (lt, DW_OP_lt) \ + DWARF_ONE_KNOWN_DW_OP (minus, DW_OP_minus) \ + DWARF_ONE_KNOWN_DW_OP (mod, DW_OP_mod) \ + DWARF_ONE_KNOWN_DW_OP (mul, DW_OP_mul) \ + DWARF_ONE_KNOWN_DW_OP (ne, DW_OP_ne) \ + DWARF_ONE_KNOWN_DW_OP (neg, DW_OP_neg) \ + DWARF_ONE_KNOWN_DW_OP (nop, DW_OP_nop) \ + DWARF_ONE_KNOWN_DW_OP (not, DW_OP_not) \ + DWARF_ONE_KNOWN_DW_OP (or, DW_OP_or) \ + DWARF_ONE_KNOWN_DW_OP (over, DW_OP_over) \ + DWARF_ONE_KNOWN_DW_OP (pick, DW_OP_pick) \ + DWARF_ONE_KNOWN_DW_OP (piece, DW_OP_piece) \ + DWARF_ONE_KNOWN_DW_OP (plus, DW_OP_plus) \ + DWARF_ONE_KNOWN_DW_OP (plus_uconst, DW_OP_plus_uconst) \ + DWARF_ONE_KNOWN_DW_OP (push_object_address, DW_OP_push_object_address) \ + DWARF_ONE_KNOWN_DW_OP (reg0, DW_OP_reg0) \ + DWARF_ONE_KNOWN_DW_OP (reg1, DW_OP_reg1) \ + DWARF_ONE_KNOWN_DW_OP (reg10, DW_OP_reg10) \ + DWARF_ONE_KNOWN_DW_OP (reg11, DW_OP_reg11) \ + DWARF_ONE_KNOWN_DW_OP (reg12, DW_OP_reg12) \ + DWARF_ONE_KNOWN_DW_OP (reg13, DW_OP_reg13) \ + DWARF_ONE_KNOWN_DW_OP (reg14, DW_OP_reg14) \ + DWARF_ONE_KNOWN_DW_OP (reg15, DW_OP_reg15) \ + DWARF_ONE_KNOWN_DW_OP (reg16, DW_OP_reg16) \ + DWARF_ONE_KNOWN_DW_OP (reg17, DW_OP_reg17) \ + DWARF_ONE_KNOWN_DW_OP (reg18, DW_OP_reg18) \ + DWARF_ONE_KNOWN_DW_OP (reg19, DW_OP_reg19) \ + DWARF_ONE_KNOWN_DW_OP (reg2, DW_OP_reg2) \ + DWARF_ONE_KNOWN_DW_OP (reg20, DW_OP_reg20) \ + DWARF_ONE_KNOWN_DW_OP (reg21, DW_OP_reg21) \ + DWARF_ONE_KNOWN_DW_OP (reg22, DW_OP_reg22) \ + DWARF_ONE_KNOWN_DW_OP (reg23, DW_OP_reg23) \ + DWARF_ONE_KNOWN_DW_OP (reg24, DW_OP_reg24) \ + DWARF_ONE_KNOWN_DW_OP (reg25, DW_OP_reg25) \ + DWARF_ONE_KNOWN_DW_OP (reg26, DW_OP_reg26) \ + DWARF_ONE_KNOWN_DW_OP (reg27, DW_OP_reg27) \ + DWARF_ONE_KNOWN_DW_OP (reg28, DW_OP_reg28) \ + DWARF_ONE_KNOWN_DW_OP (reg29, DW_OP_reg29) \ + DWARF_ONE_KNOWN_DW_OP (reg3, DW_OP_reg3) \ + DWARF_ONE_KNOWN_DW_OP (reg30, DW_OP_reg30) \ + DWARF_ONE_KNOWN_DW_OP (reg31, DW_OP_reg31) \ + DWARF_ONE_KNOWN_DW_OP (reg4, DW_OP_reg4) \ + DWARF_ONE_KNOWN_DW_OP (reg5, DW_OP_reg5) \ + DWARF_ONE_KNOWN_DW_OP (reg6, DW_OP_reg6) \ + DWARF_ONE_KNOWN_DW_OP (reg7, DW_OP_reg7) \ + DWARF_ONE_KNOWN_DW_OP (reg8, DW_OP_reg8) \ + DWARF_ONE_KNOWN_DW_OP (reg9, DW_OP_reg9) \ + DWARF_ONE_KNOWN_DW_OP (regx, DW_OP_regx) \ + DWARF_ONE_KNOWN_DW_OP (rot, DW_OP_rot) \ + DWARF_ONE_KNOWN_DW_OP (shl, DW_OP_shl) \ + DWARF_ONE_KNOWN_DW_OP (shr, DW_OP_shr) \ + DWARF_ONE_KNOWN_DW_OP (shra, DW_OP_shra) \ + DWARF_ONE_KNOWN_DW_OP (skip, DW_OP_skip) \ + DWARF_ONE_KNOWN_DW_OP (stack_value, DW_OP_stack_value) \ + DWARF_ONE_KNOWN_DW_OP (swap, DW_OP_swap) \ + DWARF_ONE_KNOWN_DW_OP (xderef, DW_OP_xderef) \ + DWARF_ONE_KNOWN_DW_OP (xderef_size, DW_OP_xderef_size) \ + DWARF_ONE_KNOWN_DW_OP (xor, DW_OP_xor) \ /* End of DW_OP_*. */ -#define ALL_KNOWN_DW_ORD \ - ONE_KNOWN_DW_ORD (col_major, DW_ORD_col_major) \ - ONE_KNOWN_DW_ORD (row_major, DW_ORD_row_major) \ +#define DWARF_ALL_KNOWN_DW_ORD \ + DWARF_ONE_KNOWN_DW_ORD (col_major, DW_ORD_col_major) \ + DWARF_ONE_KNOWN_DW_ORD (row_major, DW_ORD_row_major) \ /* End of DW_ORD_*. */ -#define ALL_KNOWN_DW_TAG \ - ONE_KNOWN_DW_TAG (GNU_BINCL, DW_TAG_GNU_BINCL) \ - ONE_KNOWN_DW_TAG (GNU_EINCL, DW_TAG_GNU_EINCL) \ - ONE_KNOWN_DW_TAG (GNU_call_site, DW_TAG_GNU_call_site) \ - ONE_KNOWN_DW_TAG (GNU_call_site_parameter, DW_TAG_GNU_call_site_parameter) \ - ONE_KNOWN_DW_TAG (GNU_formal_parameter_pack, DW_TAG_GNU_formal_parameter_pack) \ - ONE_KNOWN_DW_TAG (GNU_template_parameter_pack, DW_TAG_GNU_template_parameter_pack) \ - ONE_KNOWN_DW_TAG (GNU_template_template_param, DW_TAG_GNU_template_template_param) \ - ONE_KNOWN_DW_TAG (MIPS_loop, DW_TAG_MIPS_loop) \ - ONE_KNOWN_DW_TAG (access_declaration, DW_TAG_access_declaration) \ - ONE_KNOWN_DW_TAG (array_type, DW_TAG_array_type) \ - ONE_KNOWN_DW_TAG (base_type, DW_TAG_base_type) \ - ONE_KNOWN_DW_TAG (catch_block, DW_TAG_catch_block) \ - ONE_KNOWN_DW_TAG (class_template, DW_TAG_class_template) \ - ONE_KNOWN_DW_TAG (class_type, DW_TAG_class_type) \ - ONE_KNOWN_DW_TAG (common_block, DW_TAG_common_block) \ - ONE_KNOWN_DW_TAG (common_inclusion, DW_TAG_common_inclusion) \ - ONE_KNOWN_DW_TAG (compile_unit, DW_TAG_compile_unit) \ - ONE_KNOWN_DW_TAG (condition, DW_TAG_condition) \ - ONE_KNOWN_DW_TAG (const_type, DW_TAG_const_type) \ - ONE_KNOWN_DW_TAG (constant, DW_TAG_constant) \ - ONE_KNOWN_DW_TAG (dwarf_procedure, DW_TAG_dwarf_procedure) \ - ONE_KNOWN_DW_TAG (entry_point, DW_TAG_entry_point) \ - ONE_KNOWN_DW_TAG (enumeration_type, DW_TAG_enumeration_type) \ - ONE_KNOWN_DW_TAG (enumerator, DW_TAG_enumerator) \ - ONE_KNOWN_DW_TAG (file_type, DW_TAG_file_type) \ - ONE_KNOWN_DW_TAG (formal_parameter, DW_TAG_formal_parameter) \ - ONE_KNOWN_DW_TAG (format_label, DW_TAG_format_label) \ - ONE_KNOWN_DW_TAG (friend, DW_TAG_friend) \ - ONE_KNOWN_DW_TAG (function_template, DW_TAG_function_template) \ - ONE_KNOWN_DW_TAG (imported_declaration, DW_TAG_imported_declaration) \ - ONE_KNOWN_DW_TAG (imported_module, DW_TAG_imported_module) \ - ONE_KNOWN_DW_TAG (imported_unit, DW_TAG_imported_unit) \ - ONE_KNOWN_DW_TAG (inheritance, DW_TAG_inheritance) \ - ONE_KNOWN_DW_TAG (inlined_subroutine, DW_TAG_inlined_subroutine) \ - ONE_KNOWN_DW_TAG (interface_type, DW_TAG_interface_type) \ - ONE_KNOWN_DW_TAG (label, DW_TAG_label) \ - ONE_KNOWN_DW_TAG (lexical_block, DW_TAG_lexical_block) \ - ONE_KNOWN_DW_TAG (member, DW_TAG_member) \ - ONE_KNOWN_DW_TAG (module, DW_TAG_module) \ - ONE_KNOWN_DW_TAG (namelist, DW_TAG_namelist) \ - ONE_KNOWN_DW_TAG (namelist_item, DW_TAG_namelist_item) \ - ONE_KNOWN_DW_TAG (namespace, DW_TAG_namespace) \ - ONE_KNOWN_DW_TAG (packed_type, DW_TAG_packed_type) \ - ONE_KNOWN_DW_TAG (partial_unit, DW_TAG_partial_unit) \ - ONE_KNOWN_DW_TAG (pointer_type, DW_TAG_pointer_type) \ - ONE_KNOWN_DW_TAG (ptr_to_member_type, DW_TAG_ptr_to_member_type) \ - ONE_KNOWN_DW_TAG (reference_type, DW_TAG_reference_type) \ - ONE_KNOWN_DW_TAG (restrict_type, DW_TAG_restrict_type) \ - ONE_KNOWN_DW_TAG (rvalue_reference_type, DW_TAG_rvalue_reference_type) \ - ONE_KNOWN_DW_TAG (set_type, DW_TAG_set_type) \ - ONE_KNOWN_DW_TAG (shared_type, DW_TAG_shared_type) \ - ONE_KNOWN_DW_TAG (string_type, DW_TAG_string_type) \ - ONE_KNOWN_DW_TAG (structure_type, DW_TAG_structure_type) \ - ONE_KNOWN_DW_TAG (subprogram, DW_TAG_subprogram) \ - ONE_KNOWN_DW_TAG (subrange_type, DW_TAG_subrange_type) \ - ONE_KNOWN_DW_TAG (subroutine_type, DW_TAG_subroutine_type) \ - ONE_KNOWN_DW_TAG (template_alias, DW_TAG_template_alias) \ - ONE_KNOWN_DW_TAG (template_type_parameter, DW_TAG_template_type_parameter) \ - ONE_KNOWN_DW_TAG (template_value_parameter, DW_TAG_template_value_parameter) \ - ONE_KNOWN_DW_TAG (thrown_type, DW_TAG_thrown_type) \ - ONE_KNOWN_DW_TAG (try_block, DW_TAG_try_block) \ - ONE_KNOWN_DW_TAG (type_unit, DW_TAG_type_unit) \ - ONE_KNOWN_DW_TAG (typedef, DW_TAG_typedef) \ - ONE_KNOWN_DW_TAG (union_type, DW_TAG_union_type) \ - ONE_KNOWN_DW_TAG (unspecified_parameters, DW_TAG_unspecified_parameters) \ - ONE_KNOWN_DW_TAG (unspecified_type, DW_TAG_unspecified_type) \ - ONE_KNOWN_DW_TAG (variable, DW_TAG_variable) \ - ONE_KNOWN_DW_TAG (variant, DW_TAG_variant) \ - ONE_KNOWN_DW_TAG (variant_part, DW_TAG_variant_part) \ - ONE_KNOWN_DW_TAG (volatile_type, DW_TAG_volatile_type) \ - ONE_KNOWN_DW_TAG (with_stmt, DW_TAG_with_stmt) \ +#define DWARF_ALL_KNOWN_DW_TAG \ + DWARF_ONE_KNOWN_DW_TAG (GNU_BINCL, DW_TAG_GNU_BINCL) \ + DWARF_ONE_KNOWN_DW_TAG (GNU_EINCL, DW_TAG_GNU_EINCL) \ + DWARF_ONE_KNOWN_DW_TAG (GNU_call_site, DW_TAG_GNU_call_site) \ + DWARF_ONE_KNOWN_DW_TAG (GNU_call_site_parameter, DW_TAG_GNU_call_site_parameter) \ + DWARF_ONE_KNOWN_DW_TAG (GNU_formal_parameter_pack, DW_TAG_GNU_formal_parameter_pack) \ + DWARF_ONE_KNOWN_DW_TAG (GNU_template_parameter_pack, DW_TAG_GNU_template_parameter_pack) \ + DWARF_ONE_KNOWN_DW_TAG (GNU_template_template_param, DW_TAG_GNU_template_template_param) \ + DWARF_ONE_KNOWN_DW_TAG (MIPS_loop, DW_TAG_MIPS_loop) \ + DWARF_ONE_KNOWN_DW_TAG (access_declaration, DW_TAG_access_declaration) \ + DWARF_ONE_KNOWN_DW_TAG (array_type, DW_TAG_array_type) \ + DWARF_ONE_KNOWN_DW_TAG (atomic_type, DW_TAG_atomic_type) \ + DWARF_ONE_KNOWN_DW_TAG (base_type, DW_TAG_base_type) \ + DWARF_ONE_KNOWN_DW_TAG (catch_block, DW_TAG_catch_block) \ + DWARF_ONE_KNOWN_DW_TAG (class_template, DW_TAG_class_template) \ + DWARF_ONE_KNOWN_DW_TAG (class_type, DW_TAG_class_type) \ + DWARF_ONE_KNOWN_DW_TAG (common_block, DW_TAG_common_block) \ + DWARF_ONE_KNOWN_DW_TAG (common_inclusion, DW_TAG_common_inclusion) \ + DWARF_ONE_KNOWN_DW_TAG (compile_unit, DW_TAG_compile_unit) \ + DWARF_ONE_KNOWN_DW_TAG (condition, DW_TAG_condition) \ + DWARF_ONE_KNOWN_DW_TAG (const_type, DW_TAG_const_type) \ + DWARF_ONE_KNOWN_DW_TAG (constant, DW_TAG_constant) \ + DWARF_ONE_KNOWN_DW_TAG (dwarf_procedure, DW_TAG_dwarf_procedure) \ + DWARF_ONE_KNOWN_DW_TAG (entry_point, DW_TAG_entry_point) \ + DWARF_ONE_KNOWN_DW_TAG (enumeration_type, DW_TAG_enumeration_type) \ + DWARF_ONE_KNOWN_DW_TAG (enumerator, DW_TAG_enumerator) \ + DWARF_ONE_KNOWN_DW_TAG (file_type, DW_TAG_file_type) \ + DWARF_ONE_KNOWN_DW_TAG (formal_parameter, DW_TAG_formal_parameter) \ + DWARF_ONE_KNOWN_DW_TAG (format_label, DW_TAG_format_label) \ + DWARF_ONE_KNOWN_DW_TAG (friend, DW_TAG_friend) \ + DWARF_ONE_KNOWN_DW_TAG (function_template, DW_TAG_function_template) \ + DWARF_ONE_KNOWN_DW_TAG (imported_declaration, DW_TAG_imported_declaration) \ + DWARF_ONE_KNOWN_DW_TAG (imported_module, DW_TAG_imported_module) \ + DWARF_ONE_KNOWN_DW_TAG (imported_unit, DW_TAG_imported_unit) \ + DWARF_ONE_KNOWN_DW_TAG (inheritance, DW_TAG_inheritance) \ + DWARF_ONE_KNOWN_DW_TAG (inlined_subroutine, DW_TAG_inlined_subroutine) \ + DWARF_ONE_KNOWN_DW_TAG (interface_type, DW_TAG_interface_type) \ + DWARF_ONE_KNOWN_DW_TAG (label, DW_TAG_label) \ + DWARF_ONE_KNOWN_DW_TAG (lexical_block, DW_TAG_lexical_block) \ + DWARF_ONE_KNOWN_DW_TAG (member, DW_TAG_member) \ + DWARF_ONE_KNOWN_DW_TAG (module, DW_TAG_module) \ + DWARF_ONE_KNOWN_DW_TAG (namelist, DW_TAG_namelist) \ + DWARF_ONE_KNOWN_DW_TAG (namelist_item, DW_TAG_namelist_item) \ + DWARF_ONE_KNOWN_DW_TAG (namespace, DW_TAG_namespace) \ + DWARF_ONE_KNOWN_DW_TAG (packed_type, DW_TAG_packed_type) \ + DWARF_ONE_KNOWN_DW_TAG (partial_unit, DW_TAG_partial_unit) \ + DWARF_ONE_KNOWN_DW_TAG (pointer_type, DW_TAG_pointer_type) \ + DWARF_ONE_KNOWN_DW_TAG (ptr_to_member_type, DW_TAG_ptr_to_member_type) \ + DWARF_ONE_KNOWN_DW_TAG (reference_type, DW_TAG_reference_type) \ + DWARF_ONE_KNOWN_DW_TAG (restrict_type, DW_TAG_restrict_type) \ + DWARF_ONE_KNOWN_DW_TAG (rvalue_reference_type, DW_TAG_rvalue_reference_type) \ + DWARF_ONE_KNOWN_DW_TAG (set_type, DW_TAG_set_type) \ + DWARF_ONE_KNOWN_DW_TAG (shared_type, DW_TAG_shared_type) \ + DWARF_ONE_KNOWN_DW_TAG (string_type, DW_TAG_string_type) \ + DWARF_ONE_KNOWN_DW_TAG (structure_type, DW_TAG_structure_type) \ + DWARF_ONE_KNOWN_DW_TAG (subprogram, DW_TAG_subprogram) \ + DWARF_ONE_KNOWN_DW_TAG (subrange_type, DW_TAG_subrange_type) \ + DWARF_ONE_KNOWN_DW_TAG (subroutine_type, DW_TAG_subroutine_type) \ + DWARF_ONE_KNOWN_DW_TAG (template_alias, DW_TAG_template_alias) \ + DWARF_ONE_KNOWN_DW_TAG (template_type_parameter, DW_TAG_template_type_parameter) \ + DWARF_ONE_KNOWN_DW_TAG (template_value_parameter, DW_TAG_template_value_parameter) \ + DWARF_ONE_KNOWN_DW_TAG (thrown_type, DW_TAG_thrown_type) \ + DWARF_ONE_KNOWN_DW_TAG (try_block, DW_TAG_try_block) \ + DWARF_ONE_KNOWN_DW_TAG (type_unit, DW_TAG_type_unit) \ + DWARF_ONE_KNOWN_DW_TAG (typedef, DW_TAG_typedef) \ + DWARF_ONE_KNOWN_DW_TAG (union_type, DW_TAG_union_type) \ + DWARF_ONE_KNOWN_DW_TAG (unspecified_parameters, DW_TAG_unspecified_parameters) \ + DWARF_ONE_KNOWN_DW_TAG (unspecified_type, DW_TAG_unspecified_type) \ + DWARF_ONE_KNOWN_DW_TAG (variable, DW_TAG_variable) \ + DWARF_ONE_KNOWN_DW_TAG (variant, DW_TAG_variant) \ + DWARF_ONE_KNOWN_DW_TAG (variant_part, DW_TAG_variant_part) \ + DWARF_ONE_KNOWN_DW_TAG (volatile_type, DW_TAG_volatile_type) \ + DWARF_ONE_KNOWN_DW_TAG (with_stmt, DW_TAG_with_stmt) \ /* End of DW_TAG_*. */ -#define ALL_KNOWN_DW_VIRTUALITY \ - ONE_KNOWN_DW_VIRTUALITY (none, DW_VIRTUALITY_none) \ - ONE_KNOWN_DW_VIRTUALITY (pure_virtual, DW_VIRTUALITY_pure_virtual) \ - ONE_KNOWN_DW_VIRTUALITY (virtual, DW_VIRTUALITY_virtual) \ +#define DWARF_ALL_KNOWN_DW_VIRTUALITY \ + DWARF_ONE_KNOWN_DW_VIRTUALITY (none, DW_VIRTUALITY_none) \ + DWARF_ONE_KNOWN_DW_VIRTUALITY (pure_virtual, DW_VIRTUALITY_pure_virtual) \ + DWARF_ONE_KNOWN_DW_VIRTUALITY (virtual, DW_VIRTUALITY_virtual) \ /* End of DW_VIRTUALITY_*. */ -#define ALL_KNOWN_DW_VIS \ - ONE_KNOWN_DW_VIS (exported, DW_VIS_exported) \ - ONE_KNOWN_DW_VIS (local, DW_VIS_local) \ - ONE_KNOWN_DW_VIS (qualified, DW_VIS_qualified) \ +#define DWARF_ALL_KNOWN_DW_VIS \ + DWARF_ONE_KNOWN_DW_VIS (exported, DW_VIS_exported) \ + DWARF_ONE_KNOWN_DW_VIS (local, DW_VIS_local) \ + DWARF_ONE_KNOWN_DW_VIS (qualified, DW_VIS_qualified) \ /* End of DW_VIS_*. */ diff --git a/libdw/libdw.h b/libdw/libdw.h index 196d54a..473e1a2 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -32,6 +32,7 @@ #include #include #include +#include #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) @@ -398,6 +399,25 @@ extern int dwarf_child (Dwarf_Die *die, Dwarf_Die *result) extern int dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result) __nonnull_attribute__ (2); +/* For type aliases and qualifier type DIEs follow the DW_AT_type + attribute (recursively) and return the underlying type Dwarf_Die. + Returns 0 when RESULT contains a Dwarf_Die (possibly equal to the + given DIE) that isn't a type alias or qualifier type. Returns 1 + when RESULT contains a type alias or qualifier Dwarf_Die that + couldn't be peeled further (it doesn't have a DW_TAG_type + attribute). Returns -1 when an error occured. + + The current DWARF specification defines one type alias tag + (DW_TAG_typedef) and three qualifier type tags (DW_TAG_const_type, + DW_TAG_volatile_type, DW_TAG_restrict_type). DWARF5 defines one + other qualifier type tag (DW_TAG_atomic_type). A future version of + this function might peel other alias or qualifier type tags if a + future DWARF version or GNU extension defines other type aliases or + qualifier type tags that don't modify or change the structural + layout of the underlying type. */ +extern int dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result) + __nonnull_attribute__ (2); + /* Check whether the DIE has children. */ extern int dwarf_haschildren (Dwarf_Die *die) __nonnull_attribute__ (1); @@ -826,26 +846,95 @@ extern int dwarf_func_inline_instances (Dwarf_Die *func, extern int dwarf_entry_breakpoints (Dwarf_Die *die, Dwarf_Addr **bkpts); -/* Call callback function for each of the macro information entry for - the CU. */ +/* Iterate through the macro unit referenced by CUDIE and call + CALLBACK for each macro information entry. To start the iteration, + one would pass DWARF_GETMACROS_START for TOKEN. + + The iteration continues while CALLBACK returns DWARF_CB_OK. If the + callback returns DWARF_CB_ABORT, the iteration stops and a + continuation token is returned, which can be used to restart the + iteration at the point where it ended. Returns -1 for errors or 0 + if there are no more macro entries. + + Note that the Dwarf_Macro pointer passed to the callback is only + valid for the duration of the callback invocation. + + For backward compatibility, a token of 0 is accepted for starting + the iteration as well, but in that case this interface will refuse + to serve opcode 0xff from .debug_macro sections. Such opcode would + be considered invalid and would cause dwarf_getmacros to return + with error. */ +#define DWARF_GETMACROS_START PTRDIFF_MIN extern ptrdiff_t dwarf_getmacros (Dwarf_Die *cudie, int (*callback) (Dwarf_Macro *, void *), - void *arg, ptrdiff_t offset) + void *arg, ptrdiff_t token) __nonnull_attribute__ (2); -/* Return macro opcode. */ +/* This is similar in operation to dwarf_getmacros, but selects the + unit to iterate through by offset instead of by CU, and always + iterates .debug_macro. This can be used for handling + DW_MACRO_GNU_transparent_include's or similar opcodes. + + TOKEN value of DWARF_GETMACROS_START can be used to start the + iteration. + + It is not appropriate to obtain macro unit offset by hand from a CU + DIE and then request iteration through this interface. The reason + for this is that if a dwarf_macro_getsrcfiles is later called, + there would be no way to figure out what DW_AT_comp_dir was present + on the CU DIE, and file names referenced in either the macro unit + itself, or the .debug_line unit that it references, might be wrong. + Use dwarf_getmacros. */ +extern ptrdiff_t dwarf_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) + __nonnull_attribute__ (3); + +/* Get the source files used by the macro entry. You shouldn't assume + that Dwarf_Files references will remain valid after MACRO becomes + invalid. (Which is to say it's only valid within the + dwarf_getmacros* callback.) Returns 0 for success or a negative + value in case of an error. */ +extern int dwarf_macro_getsrcfiles (Dwarf *dbg, Dwarf_Macro *macro, + Dwarf_Files **files, size_t *nfiles) + __nonnull_attribute__ (2, 3, 4); + +/* Return macro opcode. That's a constant that can be either from + DW_MACINFO_* domain or DW_MACRO_GNU_* domain. The two domains have + compatible values, so it's OK to use either of them for + comparisons. The only differences is 0xff, which could be either + DW_MACINFO_vendor_ext or a vendor-defined DW_MACRO_* constant. One + would need to look if the CU DIE which the iteration was requested + for has attribute DW_AT_macro_info, or either of DW_AT_GNU_macros + or DW_AT_macros to differentiate the two interpretations. */ extern int dwarf_macro_opcode (Dwarf_Macro *macro, unsigned int *opcodep) __nonnull_attribute__ (2); -/* Return first macro parameter. */ +/* Get number of parameters of MACRO and store it to *PARAMCNTP. */ +extern int dwarf_macro_getparamcnt (Dwarf_Macro *macro, size_t *paramcntp); + +/* Get IDX-th parameter of MACRO (numbered from zero), and stores it + to *ATTRIBUTE. Returns 0 on success or -1 for errors. + + After a successful call, you can query ATTRIBUTE by dwarf_whatform + to determine which of the dwarf_formX calls to make to get actual + value out of ATTRIBUTE. Note that calling dwarf_whatattr is not + meaningful for pseudo-attributes formed this way. */ +extern int dwarf_macro_param (Dwarf_Macro *macro, size_t idx, + Dwarf_Attribute *attribute); + +/* Return macro parameter with index 0. This will return -1 if the + parameter is not an integral value. Use dwarf_macro_param for more + general access. */ extern int dwarf_macro_param1 (Dwarf_Macro *macro, Dwarf_Word *paramp) __nonnull_attribute__ (2); -/* Return second macro parameter. */ +/* Return macro parameter with index 1. This will return -1 if the + parameter is not an integral or string value. Use + dwarf_macro_param for more general access. */ extern int dwarf_macro_param2 (Dwarf_Macro *macro, Dwarf_Word *paramp, const char **strp); - /* Compute what's known about a call frame when the PC is at ADDRESS. Returns 0 for success or -1 for errors. On success, *FRAME is a malloc'd pointer. */ diff --git a/libdw/libdw.map b/libdw/libdw.map index 55bc537..1681b6b 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -306,4 +306,24 @@ ELFUTILS_0.160 { global: dwarf_cu_getdwarf; dwarf_cu_die; -} ELFUTILS_0.159; \ No newline at end of file +} ELFUTILS_0.159; + +ELFUTILS_0.161 { + global: + dwarf_peel_type; + + # Replaced ELFUTILS_0.144 version. Both versions point to the + # same implementation, but users of the new symbol version can + # presume that it uses dwarf_peel_type. + dwarf_aggregate_size; + + dwarf_getmacros_off; + dwarf_macro_getsrcfiles; + dwarf_macro_getparamcnt; + dwarf_macro_param; +} ELFUTILS_0.160; + +ELFUTILS_0.165 { + global: + dwelf_scn_gnu_compressed_size; +} ELFUTILS_0.161; diff --git a/libdw/libdwP.h b/libdw/libdwP.h index ce8a83d..5d095a7 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -1,5 +1,5 @@ /* Internal definitions for libdwarf. - Copyright (C) 2002-2011, 2013, 2014 Red Hat, Inc. + Copyright (C) 2002-2011, 2013-2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -59,6 +59,14 @@ struct loc_block_s size_t length; }; +/* Already decoded .debug_line units. */ +struct files_lines_s +{ + Dwarf_Off debug_line_offset; + Dwarf_Files *files; + Dwarf_Lines *lines; +}; + /* Valid indeces for the section data. */ enum { @@ -89,6 +97,7 @@ enum DWARF_E_IO_ERROR, DWARF_E_INVALID_ELF, DWARF_E_NO_DWARF, + DWARF_E_COMPRESSED_ERROR, DWARF_E_NOELF, DWARF_E_GETEHDR_ERROR, DWARF_E_NOMEM, @@ -118,7 +127,9 @@ enum DWARF_E_INVALID_OFFSET, DWARF_E_NO_DEBUG_RANGES, DWARF_E_INVALID_CFI, - DWARF_E_NO_ALT_DEBUGLINK + DWARF_E_NO_ALT_DEBUGLINK, + DWARF_E_INVALID_OPCODE, + DWARF_E_NOT_CUDIE, }; @@ -136,11 +147,6 @@ struct Dwarf /* The section data. */ Elf_Data *sectiondata[IDX_last]; -#if USE_ZLIB - /* The 1 << N bit is set if sectiondata[N] is malloc'd decompressed data. */ - unsigned int sectiondata_gzip_mask:IDX_last; -#endif - /* True if the file has a byte order different from the host. */ bool other_byte_order; @@ -167,12 +173,22 @@ struct Dwarf Dwarf_Off next_tu_offset; Dwarf_Sig8_Hash sig8_hash; + /* Search tree for .debug_macro operator tables. */ + void *macro_ops; + + /* Search tree for decoded .debug_line units. */ + void *files_lines; + /* Address ranges. */ Dwarf_Aranges *aranges; /* Cached info from the CFI section. */ struct Dwarf_CFI_s *cfi; + /* Fake loc CU. Used when synthesizing attributes for Dwarf_Ops that + came from a location list entry in dwarf_getlocation_attr. */ + struct Dwarf_CU *fake_loc_cu; + /* Internal memory handling. This is basically a simplified reimplementation of obstacks. Unfortunately the standard obstack implementation is not usable in libraries. */ @@ -209,7 +225,6 @@ struct Dwarf_Abbrev /* Files in line information records. */ struct Dwarf_Files_s { - struct Dwarf_CU *cu; unsigned int ndirs; unsigned int nfiles; struct Dwarf_Fileinfo_s @@ -296,6 +311,10 @@ struct Dwarf_CU /* Known location lists. */ void *locs; + + /* Memory boundaries of this CU. */ + void *startp; + void *endp; }; /* Compute the offset of a CU's first DIE from its offset. This @@ -319,25 +338,65 @@ struct Dwarf_CU ((Dwarf_Die) \ { \ .cu = (fromcu), \ - .addr = ((char *) cu_data (fromcu)->d_buf \ + .addr = ((char *) fromcu->dbg->sectiondata[cu_sec_idx (fromcu)]->d_buf \ + DIE_OFFSET_FROM_CU_OFFSET ((fromcu)->start, \ (fromcu)->offset_size, \ (fromcu)->type_offset != 0)) \ }) \ -/* Macro information. */ +/* Prototype of a single .debug_macro operator. */ +typedef struct +{ + Dwarf_Word nforms; + unsigned char const *forms; +} Dwarf_Macro_Op_Proto; + +/* Prototype table. */ +typedef struct +{ + /* Offset of .debug_macro section. */ + Dwarf_Off offset; + + /* Offset of associated .debug_line section. */ + Dwarf_Off line_offset; + + /* The source file information. */ + Dwarf_Files *files; + + /* If this macro unit was opened through dwarf_getmacros or + dwarf_getmacros_die, this caches value of DW_AT_comp_dir, if + present. */ + const char *comp_dir; + + /* Header length. */ + Dwarf_Half header_len; + + uint16_t version; + bool is_64bit; + uint8_t sec_index; /* IDX_debug_macro or IDX_debug_macinfo. */ + + /* Shows where in TABLE each opcode is defined. Since opcode 0 is + never used, it stores index of opcode X in X-1'th element. The + value of 0xff means not stored at all. */ + unsigned char opcodes[255]; + + /* Individual opcode prototypes. */ + Dwarf_Macro_Op_Proto table[]; +} Dwarf_Macro_Op_Table; + struct Dwarf_Macro_s { - unsigned int opcode; - Dwarf_Word param1; - union - { - Dwarf_Word u; - const char *s; - } param2; + Dwarf_Macro_Op_Table *table; + Dwarf_Attribute *attributes; + uint8_t opcode; }; +static inline Dwarf_Word +libdw_macro_nforms (Dwarf_Macro *macro) +{ + return macro->table->table[macro->table->opcodes[macro->opcode - 1]].nforms; +} /* We have to include the file at this point because the inline functions access internals of the Dwarf structure. */ @@ -376,12 +435,6 @@ extern void *__libdw_allocate (Dwarf *dbg, size_t minsize, size_t align) /* Default OOM handler. */ extern void __libdw_oom (void) __attribute ((noreturn, visibility ("hidden"))); -#if USE_ZLIB -extern void __libdw_free_zdata (Dwarf *dwarf) internal_function; -#else -# define __libdw_free_zdata(dwarf) ((void) (dwarf)) -#endif - /* Allocate the internal data for a unit not seen before. */ extern struct Dwarf_CU *__libdw_intern_next_unit (Dwarf *dbg, bool debug_types) __nonnull_attribute__ (1) internal_function; @@ -390,7 +443,7 @@ extern struct Dwarf_CU *__libdw_intern_next_unit (Dwarf *dbg, bool debug_types) extern struct Dwarf_CU *__libdw_findcu (Dwarf *dbg, Dwarf_Off offset, bool tu) __nonnull_attribute__ (1) internal_function; -/* Return tag of given DIE. */ +/* Get abbreviation with given code. */ extern Dwarf_Abbrev *__libdw_findabbrev (struct Dwarf_CU *cu, unsigned int code) __nonnull_attribute__ (1) internal_function; @@ -401,17 +454,40 @@ extern Dwarf_Abbrev *__libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Abbrev *result) __nonnull_attribute__ (1) internal_function; +/* Get abbreviation of given DIE, and optionally set *READP to the DIE memory + just past the abbreviation code. */ +static inline Dwarf_Abbrev * +__nonnull_attribute__ (1) +__libdw_dieabbrev (Dwarf_Die *die, const unsigned char **readp) +{ + /* Do we need to get the abbreviation, or need to read after the code? */ + if (die->abbrev == NULL || readp != NULL) + { + /* Get the abbreviation code. */ + unsigned int code; + const unsigned char *addr = die->addr; + get_uleb128 (code, addr, die->cu->endp); + if (readp != NULL) + *readp = addr; + + /* Find the abbreviation. */ + if (die->abbrev == NULL) + die->abbrev = __libdw_findabbrev (die->cu, code); + } + return die->abbrev; +} + /* Helper functions for form handling. */ -extern size_t __libdw_form_val_compute_len (Dwarf *dbg, struct Dwarf_CU *cu, +extern size_t __libdw_form_val_compute_len (struct Dwarf_CU *cu, unsigned int form, const unsigned char *valp) - __nonnull_attribute__ (1, 2, 4) internal_function; + __nonnull_attribute__ (1, 3) internal_function; /* Find the length of a form attribute. */ static inline size_t -__nonnull_attribute__ (1, 2, 4) -__libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, - unsigned int form, const unsigned char *valp) +__nonnull_attribute__ (1, 3) +__libdw_form_val_len (struct Dwarf_CU *cu, unsigned int form, + const unsigned char *valp) { /* Small lookup table of forms with fixed lengths. Absent indexes are initialized 0, so any truly desired 0 is set to 0x80 and masked. */ @@ -429,11 +505,20 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, { uint8_t len = form_lengths[form]; if (len != 0) - return len & 0x7f; /* Mask to allow 0x80 -> 0. */ + { + const unsigned char *endp = cu->endp; + len &= 0x7f; /* Mask to allow 0x80 -> 0. */ + if (unlikely (len > (size_t) (endp - valp))) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + return len; + } } /* Other forms require some computation. */ - return __libdw_form_val_compute_len (dbg, cu, form, valp); + return __libdw_form_val_compute_len (cu, form, valp); } /* Helper function for DW_FORM_ref* handling. */ @@ -461,6 +546,7 @@ struct Dwarf_Die_Chain }; extern int __libdw_visit_scopes (unsigned int depth, struct Dwarf_Die_Chain *root, + struct Dwarf_Die_Chain *imports, int (*previsit) (unsigned int depth, struct Dwarf_Die_Chain *, void *arg), @@ -468,7 +554,7 @@ extern int __libdw_visit_scopes (unsigned int depth, struct Dwarf_Die_Chain *, void *arg), void *arg) - __nonnull_attribute__ (2, 3) internal_function; + __nonnull_attribute__ (2, 4) internal_function; /* Parse a DWARF Dwarf_Block into an array of Dwarf_Op's, and cache the result (via tsearch). */ @@ -630,10 +716,10 @@ cu_sec_idx (struct Dwarf_CU *cu) return cu->type_offset == 0 ? IDX_debug_info : IDX_debug_types; } -static inline Elf_Data * -cu_data (struct Dwarf_CU *cu) +static inline bool +is_cudie (Dwarf_Die *cudie) { - return cu->dbg->sectiondata[cu_sec_idx (cu)]; + return CUDIE (cudie->cu).addr == cudie->addr; } /* Read up begin/end pair and increment read pointer. @@ -653,9 +739,23 @@ unsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index, internal_function; /* Fills in the given attribute to point at an empty location expression. */ -void __libdw_empty_loc_attr (Dwarf_Attribute *attr, struct Dwarf_CU *cu) +void __libdw_empty_loc_attr (Dwarf_Attribute *attr) internal_function; +/* Load .debug_line unit at DEBUG_LINE_OFFSET. COMP_DIR is a value of + DW_AT_comp_dir or NULL if that attribute is not available. Caches + the loaded unit and optionally set *LINESP and/or *FILESP (if not + NULL) with loaded information. Returns 0 for success or a negative + value for failure. */ +int __libdw_getsrclines (Dwarf *dbg, Dwarf_Off debug_line_offset, + const char *comp_dir, unsigned address_size, + Dwarf_Lines **linesp, Dwarf_Files **filesp) + internal_function + __nonnull_attribute__ (1); + +/* Load and return value of DW_AT_comp_dir from CUDIE. */ +const char *__libdw_getcompdir (Dwarf_Die *cudie); + /* Aliases to avoid PLTs. */ INTDECL (dwarf_aggregate_size) @@ -690,6 +790,7 @@ INTDECL (dwarf_lowpc) INTDECL (dwarf_nextcu) INTDECL (dwarf_next_unit) INTDECL (dwarf_offdie) +INTDECL (dwarf_peel_type) INTDECL (dwarf_ranges) INTDECL (dwarf_setalt) INTDECL (dwarf_siblingof) diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c index c0bff2a..082307b 100644 --- a/libdw/libdw_findcu.c +++ b/libdw/libdw_findcu.c @@ -1,5 +1,5 @@ /* Find CU for given offset. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -63,9 +63,7 @@ findcu_cb (const void *arg1, const void *arg2) struct Dwarf_CU * internal_function -__libdw_intern_next_unit (dbg, debug_types) - Dwarf *dbg; - bool debug_types; +__libdw_intern_next_unit (Dwarf *dbg, bool debug_types) { Dwarf_Off *const offsetp = debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset; @@ -94,6 +92,12 @@ __libdw_intern_next_unit (dbg, debug_types) return NULL; } + /* Invalid or truncated debug section data? */ + Elf_Data *data = dbg->sectiondata[debug_types + ? IDX_debug_types : IDX_debug_info]; + if (unlikely (*offsetp > data->d_size)) + *offsetp = data->d_size; + /* Create an entry for this CU. */ struct Dwarf_CU *newp = libdw_typed_alloc (dbg, struct Dwarf_CU); @@ -113,6 +117,9 @@ __libdw_intern_next_unit (dbg, debug_types) if (debug_types) Dwarf_Sig8_Hash_insert (&dbg->sig8_hash, type_sig8, newp); + newp->startp = data->d_buf + newp->start; + newp->endp = data->d_buf + newp->end; + /* Add the new entry to the search tree. */ if (tsearch (newp, tree, findcu_cb) == NULL) { @@ -126,10 +133,8 @@ __libdw_intern_next_unit (dbg, debug_types) } struct Dwarf_CU * -__libdw_findcu (dbg, start, debug_types) - Dwarf *dbg; - Dwarf_Off start; - bool debug_types; +internal_function +__libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool debug_types) { void **tree = debug_types ? &dbg->tu_tree : &dbg->cu_tree; Dwarf_Off *next_offset diff --git a/libdw/libdw_form.c b/libdw/libdw_form.c index 5350556..72e2390 100644 --- a/libdw/libdw_form.c +++ b/libdw/libdw_form.c @@ -1,5 +1,5 @@ /* Helper functions for form handling. - Copyright (C) 2003-2009 Red Hat, Inc. + Copyright (C) 2003-2009, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -39,10 +39,11 @@ size_t internal_function -__libdw_form_val_compute_len (Dwarf *dbg, struct Dwarf_CU *cu, - unsigned int form, const unsigned char *valp) +__libdw_form_val_compute_len (struct Dwarf_CU *cu, unsigned int form, + const unsigned char *valp) { - const unsigned char *saved; + const unsigned char *startp = valp; + const unsigned char *endp = cu->endp; Dwarf_Word u128; size_t result; @@ -66,49 +67,65 @@ __libdw_form_val_compute_len (Dwarf *dbg, struct Dwarf_CU *cu, break; case DW_FORM_block1: + if (unlikely ((size_t) (endp - startp) < 1)) + goto invalid; result = *valp + 1; break; case DW_FORM_block2: - result = read_2ubyte_unaligned (dbg, valp) + 2; + if (unlikely ((size_t) (endp - startp) < 2)) + goto invalid; + result = read_2ubyte_unaligned (cu->dbg, valp) + 2; break; case DW_FORM_block4: - result = read_4ubyte_unaligned (dbg, valp) + 4; + if (unlikely ((size_t) (endp - startp) < 4)) + goto invalid; + result = read_4ubyte_unaligned (cu->dbg, valp) + 4; break; case DW_FORM_block: case DW_FORM_exprloc: - saved = valp; - get_uleb128 (u128, valp); - result = u128 + (valp - saved); + get_uleb128 (u128, valp, endp); + result = u128 + (valp - startp); break; case DW_FORM_string: - result = strlen ((char *) valp) + 1; - break; + { + const unsigned char *endstrp = memchr (valp, '\0', + (size_t) (endp - startp)); + if (unlikely (endstrp == NULL)) + goto invalid; + result = (size_t) (endstrp - startp) + 1; + break; + } case DW_FORM_sdata: case DW_FORM_udata: case DW_FORM_ref_udata: - saved = valp; - get_uleb128 (u128, valp); - result = valp - saved; + get_uleb128 (u128, valp, endp); + result = valp - startp; break; case DW_FORM_indirect: - saved = valp; - get_uleb128 (u128, valp); + get_uleb128 (u128, valp, endp); // XXX Is this really correct? - result = __libdw_form_val_len (dbg, cu, u128, valp); + result = __libdw_form_val_len (cu, u128, valp); if (result != (size_t) -1) - result += valp - saved; + result += valp - startp; + else + return (size_t) -1; break; default: + goto invalid; + } + + if (unlikely (result > (size_t) (endp - startp))) + { + invalid: __libdw_seterrno (DWARF_E_INVALID_DWARF); - result = (size_t) -1l; - break; + result = (size_t) -1; } return result; diff --git a/libdw/libdw_visit_scopes.c b/libdw/libdw_visit_scopes.c index 487375d..eb892e1 100644 --- a/libdw/libdw_visit_scopes.c +++ b/libdw/libdw_visit_scopes.c @@ -1,5 +1,5 @@ /* Helper functions to descend DWARF scope trees. - Copyright (C) 2005,2006,2007 Red Hat, Inc. + Copyright (C) 2005,2006,2007,2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -64,84 +64,125 @@ may_have_scopes (Dwarf_Die *die) return false; } -int -__libdw_visit_scopes (depth, root, previsit, postvisit, arg) - unsigned int depth; - struct Dwarf_Die_Chain *root; - int (*previsit) (unsigned int depth, struct Dwarf_Die_Chain *, void *); - int (*postvisit) (unsigned int depth, struct Dwarf_Die_Chain *, void *); - void *arg; +struct walk_children_state { + /* Parameters of __libdw_visit_scopes. */ + unsigned int depth; + struct Dwarf_Die_Chain *imports; + int (*previsit) (unsigned int depth, struct Dwarf_Die_Chain *, void *); + int (*postvisit) (unsigned int depth, struct Dwarf_Die_Chain *, void *); + void *arg; + /* Extra local variables for the walker. */ struct Dwarf_Die_Chain child; - int ret; +}; - child.parent = root; - if ((ret = INTUSE(dwarf_child) (&root->die, &child.die)) != 0) - return ret < 0 ? -1 : 0; // Having zero children is legal. +static inline int +walk_children (struct walk_children_state *state); - inline int recurse (void) +int +internal_function +__libdw_visit_scopes (unsigned int depth, struct Dwarf_Die_Chain *root, + struct Dwarf_Die_Chain *imports, + int (*previsit) (unsigned int, + struct Dwarf_Die_Chain *, + void *), + int (*postvisit) (unsigned int, + struct Dwarf_Die_Chain *, + void *), + void *arg) +{ + struct walk_children_state state = { - return __libdw_visit_scopes (depth + 1, &child, - previsit, postvisit, arg); - } + .depth = depth, + .imports = imports, + .previsit = previsit, + .postvisit = postvisit, + .arg = arg + }; + + state.child.parent = root; + int ret; + if ((ret = INTUSE(dwarf_child) (&root->die, &state.child.die)) != 0) + return ret < 0 ? -1 : 0; // Having zero children is legal. - inline int walk_children () - { - do - { - /* For an imported unit, it is logically as if the children of - that unit are siblings of the other children. So don't do - a full recursion into the imported unit, but just walk the - children in place before moving to the next real child. */ - while (INTUSE(dwarf_tag) (&child.die) == DW_TAG_imported_unit) - { - Dwarf_Die orig_child_die = child.die; - Dwarf_Attribute attr_mem; - Dwarf_Attribute *attr = INTUSE(dwarf_attr) (&child.die, - DW_AT_import, - &attr_mem); - if (INTUSE(dwarf_formref_die) (attr, &child.die) != NULL - && INTUSE(dwarf_child) (&child.die, &child.die) == 0) - { - int result = walk_children (); - if (result != DWARF_CB_OK) - return result; - } - - /* Any "real" children left? */ - if ((ret = INTUSE(dwarf_siblingof) (&orig_child_die, - &child.die)) != 0) - return ret < 0 ? -1 : 0; - }; - - child.prune = false; - - if (previsit != NULL) - { - int result = (*previsit) (depth + 1, &child, arg); - if (result != DWARF_CB_OK) - return result; - } + return walk_children (&state); +} - if (!child.prune && may_have_scopes (&child.die) - && INTUSE(dwarf_haschildren) (&child.die)) +static inline int +walk_children (struct walk_children_state *state) +{ + int ret; + do + { + /* For an imported unit, it is logically as if the children of + that unit are siblings of the other children. So don't do + a full recursion into the imported unit, but just walk the + children in place before moving to the next real child. */ + while (INTUSE(dwarf_tag) (&state->child.die) == DW_TAG_imported_unit) + { + Dwarf_Die orig_child_die = state->child.die; + Dwarf_Attribute attr_mem; + Dwarf_Attribute *attr = INTUSE(dwarf_attr) (&state->child.die, + DW_AT_import, + &attr_mem); + if (INTUSE(dwarf_formref_die) (attr, &state->child.die) != NULL + && INTUSE(dwarf_child) (&state->child.die, &state->child.die) == 0) + { + /* Checks the given DIE hasn't been imported yet + to prevent cycles. */ + bool imported = false; + for (struct Dwarf_Die_Chain *import = state->imports; import != NULL; + import = import->parent) + if (import->die.addr == orig_child_die.addr) + { + imported = true; + break; + } + if (imported) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + struct Dwarf_Die_Chain *orig_imports = state->imports; + struct Dwarf_Die_Chain import = { .die = orig_child_die, + .parent = orig_imports }; + state->imports = &import; + int result = walk_children (state); + state->imports = orig_imports; + if (result != DWARF_CB_OK) + return result; + } + + /* Any "real" children left? */ + if ((ret = INTUSE(dwarf_siblingof) (&orig_child_die, + &state->child.die)) != 0) + return ret < 0 ? -1 : 0; + }; + + state->child.prune = false; + + /* previsit is declared NN */ + int result = (*state->previsit) (state->depth + 1, &state->child, state->arg); + if (result != DWARF_CB_OK) + return result; + + if (!state->child.prune && may_have_scopes (&state->child.die) + && INTUSE(dwarf_haschildren) (&state->child.die)) { - int result = recurse (); + result = __libdw_visit_scopes (state->depth + 1, &state->child, state->imports, + state->previsit, state->postvisit, state->arg); if (result != DWARF_CB_OK) return result; } - if (postvisit != NULL) + if (state->postvisit != NULL) { - int result = (*postvisit) (depth + 1, &child, arg); + result = (*state->postvisit) (state->depth + 1, &state->child, state->arg); if (result != DWARF_CB_OK) return result; } - } - while ((ret = INTUSE(dwarf_siblingof) (&child.die, &child.die)) == 0); - - return ret < 0 ? -1 : 0; - } + } + while ((ret = INTUSE(dwarf_siblingof) (&state->child.die, &state->child.die)) == 0); - return walk_children (); + return ret < 0 ? -1 : 0; } diff --git a/libdw/memory-access.h b/libdw/memory-access.h index f41f783..a749b5a 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -39,6 +39,29 @@ #define len_leb128(var) ((8 * sizeof (var) + 6) / 7) +static inline size_t +__libdw_max_len_leb128 (const size_t type_len, + const unsigned char *addr, const unsigned char *end) +{ + const size_t pointer_len = likely (addr < end) ? end - addr : 0; + return likely (type_len <= pointer_len) ? type_len : pointer_len; +} + +static inline size_t +__libdw_max_len_uleb128 (const unsigned char *addr, const unsigned char *end) +{ + const size_t type_len = len_leb128 (uint64_t); + return __libdw_max_len_leb128 (type_len, addr, end); +} + +static inline size_t +__libdw_max_len_sleb128 (const unsigned char *addr, const unsigned char *end) +{ + /* Subtract one step, so we don't shift into sign bit. */ + const size_t type_len = len_leb128 (int64_t) - 1; + return __libdw_max_len_leb128 (type_len, addr, end); +} + #define get_uleb128_step(var, addr, nth) \ do { \ unsigned char __b = *(addr)++; \ @@ -48,20 +71,24 @@ } while (0) static inline uint64_t -__libdw_get_uleb128 (const unsigned char **addrp) +__libdw_get_uleb128 (const unsigned char **addrp, const unsigned char *end) { uint64_t acc = 0; + /* Unroll the first step to help the compiler optimize for the common single-byte case. */ get_uleb128_step (acc, *addrp, 0); - for (unsigned int i = 1; i < len_leb128 (acc); ++i) + + const size_t max = __libdw_max_len_uleb128 (*addrp - 1, end); + for (size_t i = 1; i < max; ++i) get_uleb128_step (acc, *addrp, i); /* Other implementations set VALUE to UINT_MAX in this case. So we better do this as well. */ return UINT64_MAX; } -#define get_uleb128(var, addr) ((var) = __libdw_get_uleb128 (&(addr))) +/* Note, addr needs to me smaller than end. */ +#define get_uleb128(var, addr, end) ((var) = __libdw_get_uleb128 (&(addr), end)) /* The signed case is similar, but we sign-extend the result. */ @@ -78,18 +105,23 @@ __libdw_get_uleb128 (const unsigned char **addrp) } while (0) static inline int64_t -__libdw_get_sleb128 (const unsigned char **addrp) +__libdw_get_sleb128 (const unsigned char **addrp, const unsigned char *end) { int64_t acc = 0; - /* Unrolling 0 like uleb128 didn't prove to benefit optimization. */ - for (unsigned int i = 0; i < len_leb128 (acc); ++i) + + /* Unroll the first step to help the compiler optimize + for the common single-byte case. */ + get_sleb128_step (acc, *addrp, 0); + + const size_t max = __libdw_max_len_sleb128 (*addrp - 1, end); + for (size_t i = 1; i < max; ++i) get_sleb128_step (acc, *addrp, i); /* Other implementations set VALUE to INT_MAX in this case. So we better do this as well. */ return INT64_MAX; } -#define get_sleb128(var, addr) ((var) = __libdw_get_sleb128 (&(addr))) +#define get_sleb128(var, addr, end) ((var) = __libdw_get_sleb128 (&(addr), end)) /* We use simple memory access functions in case the hardware allows it. @@ -219,17 +251,6 @@ read_8sbyte_unaligned_1 (bool other_byte_order, const void *p) #endif /* allow unaligned */ -#define read_ubyte_unaligned(Nbytes, Dbg, Addr) \ - ((Nbytes) == 2 ? read_2ubyte_unaligned (Dbg, Addr) \ - : (Nbytes) == 4 ? read_4ubyte_unaligned (Dbg, Addr) \ - : read_8ubyte_unaligned (Dbg, Addr)) - -#define read_sbyte_unaligned(Nbytes, Dbg, Addr) \ - ((Nbytes) == 2 ? read_2sbyte_unaligned (Dbg, Addr) \ - : (Nbytes) == 4 ? read_4sbyte_unaligned (Dbg, Addr) \ - : read_8sbyte_unaligned (Dbg, Addr)) - - #define read_2ubyte_unaligned_inc(Dbg, Addr) \ ({ uint16_t t_ = read_2ubyte_unaligned (Dbg, Addr); \ Addr = (__typeof (Addr)) (((uintptr_t) (Addr)) + 2); \ @@ -258,14 +279,9 @@ read_8sbyte_unaligned_1 (bool other_byte_order, const void *p) t_; }) -#define read_ubyte_unaligned_inc(Nbytes, Dbg, Addr) \ - ((Nbytes) == 2 ? read_2ubyte_unaligned_inc (Dbg, Addr) \ - : (Nbytes) == 4 ? read_4ubyte_unaligned_inc (Dbg, Addr) \ - : read_8ubyte_unaligned_inc (Dbg, Addr)) - -#define read_sbyte_unaligned_inc(Nbytes, Dbg, Addr) \ - ((Nbytes) == 2 ? read_2sbyte_unaligned_inc (Dbg, Addr) \ - : (Nbytes) == 4 ? read_4sbyte_unaligned_inc (Dbg, Addr) \ - : read_8sbyte_unaligned_inc (Dbg, Addr)) +#define read_addr_unaligned_inc(Nbytes, Dbg, Addr) \ + (assert ((Nbytes) == 4 || (Nbytes) == 8), \ + ((Nbytes) == 4 ? read_4ubyte_unaligned_inc (Dbg, Addr) \ + : read_8ubyte_unaligned_inc (Dbg, Addr))) #endif /* memory-access.h */ diff --git a/libdwelf/ChangeLog b/libdwelf/ChangeLog index 9f95ea8..fe8af1b 100644 --- a/libdwelf/ChangeLog +++ b/libdwelf/ChangeLog @@ -1,3 +1,20 @@ +2015-10-28 Mark Wielaard + + * Makefile.am (libdwelf_a_SOURCES): Add + dwelf_scn_gnu_compressed_size.c. + * dwelf_scn_gnu_compressed_size.c: Likewise. + * libdwelf.h (dwelf_scn_gnu_compressed_size): New declaration. + +2015-10-14 Chih-Hung Hsieh + + * dwelf_elf_gnu_build_id.c (find_elf_build_id): Move nested function + 'check_notes' to file scope. + +2014-11-14 Mark Wielaard + + * dwelf_elf_gnu_debuglink.c (dwelf_elf_gnu_debuglink): Check d_buf + is not NULL. + 2014-04-30 Mark Wielaard * Makefile.am (AM_CPPFLAGS): Add libdwfl and libebl include dirs. diff --git a/libdwelf/Makefile.am b/libdwelf/Makefile.am index cd4b7dd..4de4b2e 100644 --- a/libdwelf/Makefile.am +++ b/libdwelf/Makefile.am @@ -2,7 +2,7 @@ ## ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2014 Red Hat, Inc. +## Copyright (C) 2014, 2015 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -40,7 +40,7 @@ pkginclude_HEADERS = libdwelf.h noinst_HEADERS = libdwelfP.h libdwelf_a_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \ - dwelf_elf_gnu_build_id.c + dwelf_elf_gnu_build_id.c dwelf_scn_gnu_compressed_size.c libdwelf = $(libdw) diff --git a/libdwelf/Makefile.in b/libdwelf/Makefile.in index 45ff600..87f0dec 100644 --- a/libdwelf/Makefile.in +++ b/libdwelf/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,9 +89,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING subdir = libdwelf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ @@ -90,12 +98,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -104,7 +113,8 @@ libdwelf_a_AR = $(AR) $(ARFLAGS) libdwelf_a_LIBADD = am_libdwelf_a_OBJECTS = dwelf_elf_gnu_debuglink.$(OBJEXT) \ dwelf_dwarf_gnu_debugaltlink.$(OBJEXT) \ - dwelf_elf_gnu_build_id.$(OBJEXT) + dwelf_elf_gnu_build_id.$(OBJEXT) \ + dwelf_scn_gnu_compressed_size.$(OBJEXT) libdwelf_a_OBJECTS = $(am_libdwelf_a_OBJECTS) libdwelf_pic_a_AR = $(AR) $(ARFLAGS) libdwelf_pic_a_LIBADD = @@ -192,6 +202,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -201,6 +213,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -220,6 +233,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -231,6 +247,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -274,6 +291,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -320,19 +338,33 @@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(srcdir)/../libelf -I$(srcdir)/../libdw \ -I$(srcdir)/../libdwfl -I$(srcdir)/../libebl + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda $(am_libdwelf_pic_a_OBJECTS) -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi noinst_LIBRARIES = libdwelf.a libdwelf_pic.a pkginclude_HEADERS = libdwelf.h noinst_HEADERS = libdwelfP.h libdwelf_a_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \ - dwelf_elf_gnu_build_id.c + dwelf_elf_gnu_build_id.c dwelf_scn_gnu_compressed_size.c libdwelf = $(libdw) libdw = ../libdw/libdw.so @@ -357,7 +389,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libdwelf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libdwelf/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -366,7 +397,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -399,20 +430,21 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwelf_dwarf_gnu_debugaltlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwelf_elf_gnu_build_id.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwelf_elf_gnu_debuglink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwelf_scn_gnu_compressed_size.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ @@ -640,15 +672,20 @@ uninstall-am: uninstall-pkgincludeHEADERS ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libdwelf/dwelf_elf_gnu_build_id.c b/libdwelf/dwelf_elf_gnu_build_id.c index 1ed501d..8c78c70 100644 --- a/libdwelf/dwelf_elf_gnu_build_id.c +++ b/libdwelf/dwelf_elf_gnu_build_id.c @@ -35,33 +35,36 @@ #define NO_VADDR ((GElf_Addr) -1l) -/* Defined here for reuse. The dwelf interface doesn't care about the - address of the note, but libdwfl does. */ static int -find_elf_build_id (Dwfl_Module *mod, int e_type, Elf *elf, - const void **build_id_bits, GElf_Addr *build_id_elfaddr, - int *build_id_len) +check_notes (Elf_Data *data, GElf_Addr data_elfaddr, + const void **build_id_bits, GElf_Addr *build_id_elfaddr, + int *build_id_len) { - int check_notes (Elf_Data *data, GElf_Addr data_elfaddr) - { - size_t pos = 0; - GElf_Nhdr nhdr; - size_t name_pos; - size_t desc_pos; - while ((pos = gelf_getnote (data, pos, &nhdr, &name_pos, &desc_pos)) > 0) - if (nhdr.n_type == NT_GNU_BUILD_ID - && nhdr.n_namesz == sizeof "GNU" && !memcmp (data->d_buf + name_pos, - "GNU", sizeof "GNU")) + size_t pos = 0; + GElf_Nhdr nhdr; + size_t name_pos; + size_t desc_pos; + while ((pos = gelf_getnote (data, pos, &nhdr, &name_pos, &desc_pos)) > 0) + if (nhdr.n_type == NT_GNU_BUILD_ID + && nhdr.n_namesz == sizeof "GNU" + && !memcmp (data->d_buf + name_pos, "GNU", sizeof "GNU")) { *build_id_bits = data->d_buf + desc_pos; *build_id_elfaddr = (data_elfaddr == NO_VADDR - ? 0 : data_elfaddr + desc_pos); + ? 0 : data_elfaddr + desc_pos); *build_id_len = nhdr.n_descsz; return 1; } - return 0; - } + return 0; +} +/* Defined here for reuse. The dwelf interface doesn't care about the + address of the note, but libdwfl does. */ +static int +find_elf_build_id (Dwfl_Module *mod, int e_type, Elf *elf, + const void **build_id_bits, GElf_Addr *build_id_elfaddr, + int *build_id_len) +{ size_t shstrndx = SHN_UNDEF; int result = 0; @@ -86,7 +89,10 @@ find_elf_build_id (Dwfl_Module *mod, int e_type, Elf *elf, phdr->p_offset, phdr->p_filesz, ELF_T_NHDR), - phdr->p_vaddr); + phdr->p_vaddr, + build_id_bits, + build_id_elfaddr, + build_id_len); } } else @@ -105,7 +111,10 @@ find_elf_build_id (Dwfl_Module *mod, int e_type, Elf *elf, else if (__libdwfl_relocate_value (mod, elf, &shstrndx, elf_ndxscn (scn), &vaddr)) vaddr = NO_VADDR; - result = check_notes (elf_getdata (scn, NULL), vaddr); + result = check_notes (elf_getdata (scn, NULL), vaddr, + build_id_bits, + build_id_elfaddr, + build_id_len); } } while (result == 0 && (scn = elf_nextscn (elf, scn)) != NULL); diff --git a/libdwelf/dwelf_elf_gnu_debuglink.c b/libdwelf/dwelf_elf_gnu_debuglink.c index 7b5fc93..6e22cf6 100644 --- a/libdwelf/dwelf_elf_gnu_debuglink.c +++ b/libdwelf/dwelf_elf_gnu_debuglink.c @@ -60,7 +60,7 @@ dwelf_elf_gnu_debuglink (Elf *elf, GElf_Word *crc) /* Found the .gnu_debuglink section. Extract its contents. */ Elf_Data *rawdata = elf_rawdata (scn, NULL); - if (rawdata == NULL) + if (rawdata == NULL || rawdata->d_buf == NULL) return NULL; /* The CRC comes after the zero-terminated file name, diff --git a/libdwelf/dwelf_scn_gnu_compressed_size.c b/libdwelf/dwelf_scn_gnu_compressed_size.c new file mode 100644 index 0000000..d39b702 --- /dev/null +++ b/libdwelf/dwelf_scn_gnu_compressed_size.c @@ -0,0 +1,77 @@ +/* Return size of GNU compressed section. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwelfP.h" +#include "libelfP.h" + +ssize_t +dwelf_scn_gnu_compressed_size (Elf_Scn *scn) +{ + if (scn == NULL) + return -1; + + GElf_Shdr shdr; + if (gelf_getshdr (scn, &shdr) == NULL) + return -1; + + /* Allocated or no bits sections can never be compressed. */ + if ((shdr.sh_flags & SHF_ALLOC) != 0 + || shdr.sh_type == SHT_NULL + || shdr.sh_type == SHT_NOBITS) + return -1; + + Elf_Data *d = elf_rawdata (scn, NULL); + if (d == NULL) + return -1; + + if (d->d_size >= 4 + 8 + && memcmp (d->d_buf, "ZLIB", 4) == 0) + { + /* There is a 12-byte header of "ZLIB" followed by + an 8-byte big-endian size. There is only one type and + alignment isn't preserved separately. */ + uint64_t size; + memcpy (&size, d->d_buf + 4, sizeof size); + size = be64toh (size); + + /* One more sanity check, size should be bigger than original + data size plus some overhead (4 chars ZLIB + 8 bytes size + 6 + bytes zlib stream overhead + 5 bytes overhead max for one 16K + block) and should fit into a size_t. */ + if (size + 4 + 8 + 6 + 5 < d->d_size || size > SIZE_MAX) + return -1; + + return size; + } + + return -1; +} diff --git a/libdwelf/libdwelf.h b/libdwelf/libdwelf.h index e16dc0f..7f7f679 100644 --- a/libdwelf/libdwelf.h +++ b/libdwelf/libdwelf.h @@ -1,5 +1,5 @@ /* Interfaces for libdwelf. DWARF ELF Low-level Functions. - Copyright (C) 2014 Red Hat, Inc. + Copyright (C) 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -65,6 +65,13 @@ extern ssize_t dwelf_dwarf_gnu_debugaltlink (Dwarf *dwarf, note. Returns -1 in case of malformed data or other errors. */ extern ssize_t dwelf_elf_gnu_build_id (Elf *elf, const void **build_idp); +/* Returns the size of the uncompressed data of a GNU compressed + section. The section name should start with .zdebug (but this + isn't checked by this function). If the section isn't compressed + (the section data doesn't start with ZLIB) -1 is returned. If an + error occured -1 is returned and elf_errno is set. */ +extern ssize_t dwelf_scn_gnu_compressed_size (Elf_Scn *scn); + #ifdef __cplusplus } #endif diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index c644ffe..94c58d9 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,456 @@ +2016-01-08 Mark Wielaard + + * libdwfl_a_SOURCES: Unconditionally add gzip.c. + * linux-kernel-modules.c (vmlinux_suffixes): We always have at least + .gz support. + (try_kernel_name): Likewise. + (check_suffix): Likewise. + * open.c (decompress): Likewise. + +2015-12-18 Mark Wielaard + + * dwfl_module_getdwarf.c (find_symtab): Uncompress symstr, xndx, sym + sections and aux_str, aux_xndx and aux_sym sections if necessary. + * relocate.c (relocate_getsym): Uncompress symtab and symtab_shndx + if necessary. + (resolve_symbol): Uncompress strtab section if necessary. + (relocate_section): Uncompress the section the relocations apply to + if necessary. + +2015-11-18 Chih-Hung Hsieh + + * linux-proc-maps.c (proc_maps_report): Move nested function + 'report' to file scope. + +2015-11-18 Chih-Hung Hsieh + + * core-file.c (elf_begin_rand): Move nested function 'fail' to file + scope. + * core-file.c (dwfl_elf_phdr_memory_callback): Move nested functions + 'update_end' and 'more' to file scope. + +2015-11-17 Chih-Hung Hsieh + + * link_map.c (auxv_format_probe): Move nested functions + check64 and check32 to file scope. + +2015-12-08 Jose E. Marchesi + + * dwfl_frame.c (state_fetch_pc): Add a backend-defined offset to + the value of the return address register as defined by the CFI + abi. + * frame_unwind.c (handle_cfi): Likewise. + +2015-12-01 Mark Wielaard + + * link_map.c (dwfl_link_map_report): Track whether in.d_buf comes + from exec or memory_callback, free as appropriate. + +2015-12-01 Mark Wielaard + + * libdwflP.h (struct Dwfl_User_Core): New. + (struct DWfl): Replace executable_for_core with user_core. + * argp-std.c (parse_opt): Store core and fd in Dwfl user_core. + * core-file.c (dwfl_core_file_report): Check and store + executable_for_core in Dwfl user_core. + * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Check and use + executable_for_core in Dwfl user_core. + * dwfl_end.c (dwfl_end): Release resources held in Dwfl user_core. + * link-map.c (report_r_debug): Check executable_for_core in Dwfl + user_core. + (dwfl_link_map_report): Likewise. + +2015-11-16 Chih-Hung Hsieh + + * dwfl_module_getdwarf.c (find_prelink_address_sync): Move nested + function 'consider_shdr' to file scope. + * dwfl_module_getdwarf.c (find_dynsym): Move nested function + 'translate_offs' to file scope. + +2015-11-16 Chih-Hung Hsieh + + * dwfl_module_addrsym.c (__libdwfl_addrsym): Move nested functions + 'same_section', 'binding_value', 'try_sym_value', and 'search_table' + to file scope. + +2015-11-19 Mark Wielaard + + * dwfl_module.c (__libdwfl_module_free): Remove Dwfl_Module Ebl from + eh_cfi and dwarf_cfi cache if necessary before calling dwarf_end and + dwarf_cfi_end. + +2015-11-13 Chih-Hung Hsieh + + * gzip.c (unzip): Move nested functions to file scope. + +2015-10-21 Chih-Hung Hsieh + Mark Wielaard + + * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Move nested + functions 'dwarf_line_file', 'dwfl_line', and 'dwfl_line_file' to + file scope. Rename dwarf_line_file to dwfl_dwarf_line_file. Don't + use INTUSE. + +2015-10-21 Chih-Hung Hsieh + + * frame_unwind.c (expr_eval): Move nested function 'push' and 'pop' + to file scope. Pass used local variables in struct eval_stack. + +2015-10-21 Chih-Hung Hsieh + + * dwfl_module.c (dwfl_report_module): Move nested function 'use' to + file scope. + +2015-10-09 Josh Stone + + * core-file.c (elf_begin_rand): Replace loff_t with off_t. + * open.c (decompress): Replace off64_t with off_t. + * gzip.c (unzip): Likewise. + * image-header.c (__libdw_image_header): Likewise. + * libdwflP.h: Likewise in function declarations. + * argp-std.c (parse_opt): Replace open64 with open. + * dwfl_build_id_find_elf.c (__libdwfl_open_mod_by_build_id, + dwfl_build_id_find_elf): Likewise. + * dwfl_module_getdwarf.c (open_elf_file): Likewise. + * dwfl_report_elf.c (dwfl_report_elf): Likewise. + * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise. + * link_map.c (report_r_debug): Likewise. + * offline.c (dwfl_report_offline): Likewise. + * linux-proc-maps.c (grovel_auxv, get_pid_class, + dwfl_linux_proc_find_elf): Likewise. + (read_proc_memory): Replace off64_t with off_t. + * find-debuginfo.c (find_debuginfo_in_path): Replace stat64 and + fstat64 with stat and fstat. + (try_open): Likewise, and replace open64 with open. + * linux-kernel-modules.c: Manually define open and fopen to open64 and + fopen64 when needed, since the early fts.h include breaks that. + (try_kernel_name): Replace open64 with open. + (check_notes): Likewise. + +2015-10-09 Jose E. Marchesi + + * linux-proc-maps.c (read_proc_memory): Use seek+read instead of + pread, as the later doesn't accept negative offsets. + +2015-10-07 Mark Wielaard + + * dwfl_module_getdwarf.c (MAX): Removed. + (find_prelink_address_sync): Allocate exact amount of bytes for + phdrs and shdrs. + * dwfl_segment_report_module.c (dwfl_segment_report_module): + Likewise for phdrs. + * elf-from-memory.c (MAX): Removed. + (elf_from_remote_memory): Allocate exact amount of bytes for phdrs. + +2015-10-05 Chih-Hung Hsieh + + * dwfl_module_getdwarf.c (find_prelink_address_sync): Do not use + union of variable length arrays. + * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise. + * elf-from-memory.c (elf_from_remote_memory): Likewise. + * link_map.c (auxv_format_probe): Likewise. + * link_map.c (report_r_debug): Likewise. + * link_map.c (dwfl_link_map_report): Likewise. + +2015-09-18 Chih-Hung Hsieh + + * relocate.c (relocate_section): Move nested function "relocate" + to file scope, pass all used local variables as constants. + Move nested "check_badreltype" to file scope, pass addresses of + updated used local variables. + * linux-kernel-modules.c (intuit_kernel_bounds): Move nested function + "read_address" to file scope, pass all updated local variables in + a state structure. + * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Move nested + function "subst_name" to file scope, pass all used local variables + as constants. + * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Replace + simple nested function "report" with a macro. Work around gcc static + analysis error -Werror=maybe-uninitialized. + +2015-09-22 Mark Wielaard + + * core-file.c: Remove old-style function definitions. + * dwfl_error.c: Likewise. + * dwfl_module_dwarf_cfi.c: Likewise. + * dwfl_module_eh_cfi.c: Likewise. + * dwfl_module_register_names.c: Likewise. + * dwfl_module_return_value_location.c: Likewise. + * dwfl_version.c: Likewise. + +2015-09-09 Chih-Hung Hsieh + Mark Wielaard + + * dwfl_frame.c (dwfl_attach_state): Remove redundant NULL tests + on parameters declared with __nonnull_attribute__. + * libdwfl.h (dwfl_module_getelf): Don't mark first argument as + nonnull. + +2015-09-08 Mark Wielaard + + * libdwflP.h (struct __libdwfl_pid_arg): Add elf and elf_fd. + * linux-pid-attach.c (pid_detach): Call elf_end and close. + (dwfl_linux_proc_attach): Open and save /proc/PID/exe. + +2015-09-04 Chih-Hung Hsieh + + * find-debuginfo.c (find_debuginfo_in_path): Try to locate the + debug info file named debuglink_file under + mod->dwfl->callbacks->debuginfo_path, by looking at + the set of sub-trees under mod->dwfl->callbacks->debuginfo_path + which is common to the set of non-absolute parent trees of + file_name. + +2015-06-18 Mark Wielaard + + * find-debuginfo.c (try_open): Free fname on all failure paths. + +2015-06-18 Mark Wielaard + + * dwfl_module_getdwarf.c (find_symtab): Check shdr is not NULL and + sh_entsize is not zero. + +2015-06-06 Mark Wielaard + + * find-debuginfo.c (find_debuginfo_in_path): Always free localpath, + localname and file_dirname. + +2015-06-06 Mark Wielaard + + * derelocate.c (cache_sections): Free sortrefs. + +2015-06-05 Mark Wielaard + + * dwfl_segment_report_module.c (dwfl_segment_report_module): + If the note_file exists, but the build_id doesn't match discard + the file and continue reporting. + +2015-06-01 Mark Wielaard + + * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Copy path + pointer before passing to strsep. + +2015-05-30 Mark Wielaard + + * link_map.c (check32): Use read_4ubyte_unaligned_noncvt to read + type and value. + (read_addrs): Use read_(4|8)ubyte_unaligned_noncvt or to read + adresses. + +2015-05-30 Mark Wielaard + + * find-debuginfo.c (dwfl_standard_find_debuginfo): Check file_name is + not NULL before calling canonicalize_file_name. + +2015-05-24 Mark Wielaard + + * derelocate.c (check_module): Check mod is not NULL. + +2015-05-22 Mark Wielaard + + * link_map.c (dwfl_link_map_report): Allocate phdrs and dyn with + malloc instead of stack allocating. Call free when done with data. + +2015-05-22 Mark Wielaard + + * dwfl_segment_report_module.c (dwfl_segment_report_module): + Allocate phdrs with malloc, not on stack. free in finish. + Allocate dyn with malloc, not on stack, free after use. + +2015-05-22 Mark Wielaard + + * find-debuginfo.c (find_debuginfo_in_path): malloc or strdup, + instead of alloca or strdupa, local strings of unknown size. + Call free before return. + +2015-05-22 Mark Wielaard + + * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Return + error when id_len too small or too large. strdup, not strdupa, + and free path when done. + +2015-05-19 Mark Wielaard + + * elf-from-memory.c (elf_from_remote_memory): Don't allocate all + phdrs on the stack. Allocate with malloc and free when done. + +2015-05-19 Mark Wielaard + + * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): malloc and + free alternate_name. + +2015-05-19 Mark Wielaard + + * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't + stack allocate name. Only change chars up to suffix. + +2015-05-18 Mark Wielaard + + * dwfl_module_getdwarf.c (find_prelink_address_sync): Allocate + phdrs and shdrs unions with malloc, not alloca. Free after use. + +2015-05-18 Mark Wielaard + + * derelocate.c (cache_sections): Allocate temporary newrefs and + sortrefs with malloc, not alloca. Always free them on return. + +2015-05-07 Mark Wielaard + + * cu.c (intern_cu): Check for EOF and check cuoff points to a real + Dwarf_Die before interning. Explicitly check EOF is expected. + +2015-05-05 Mark Wielaard + + * dwfl_lineinfo.c (dwfl_lineinfo): Check info->file is valid. + +2015-05-06 Roland McGrath + + * dwfl_error.c (struct msgtable): Break type definition out of + the 'msgtable' initializer. + (msgtable): Make it a union of struct msgtable and a char array. + (msgstr): Use the full-table char array rather than the msg_0 entry. + +2015-04-23 Max Filippov + + * core-file.c (_compat_without_executable_dwfl_core_file_report): + Guard with SYMBOL_VERSIONING. + * dwfl_module_build_id.c (_compat_vaddr_at_end_dwfl_module_build_id): + Likewise. + * dwfl_report_elf.c (_compat_without_add_p_vaddr_dwfl_report_elf): + Likewise. + +2015-04-02 Mark Wielaard + + * segment.c (insert): Check correct number of lookup_elts. + +2015-03-31 Mark Wielaard + + * core-file.c (core_file_read_eagerly): Special case small images. + +2015-01-26 Mark Wielaard + + * dwfl_module_getdwarf.c (find_symtab): Explicitly clear symdata, + syments and first_global on elferr before calling find_dynsym. + +2014-12-27 Mark Wielaard + + * dwfl_module_getsrc.c (dwfl_module_getsrc): Never match a line that + has end_sequence set. + +2015-01-04 Mark Wielaard + + * cu.c (intern_cu): Store result and return directly when finding + EOF marker. + (__libdwfl_nextcu): Check *nextp as returned by intern_cu isn't -1. + +2014-12-19 Mark Wielaard + + * dwfl_module_getdwarf.c (find_symtab): Always try find_dynsym last. + +2014-12-19 Mark Wielaard + + * elf-from-memory.c (handle_segment): Remove palign sanity check. + +2014-12-18 Mark Wielaard + + * relocate.c (resolve_symbol): Make sure symstrdata->d_buf != NULL. + +2014-12-13 Mark Wielaard + + * dwfl_module_getdwarf.c (find_dynsym): elf_getdata_rawchunk takes + a size_t, make sure it doesn't overflow. + +2014-12-13 Mark Wielaard + + * cu.c (cudie_offset): Make sure Dwarf_Off difference doesn't + wrap around before returning as int. + +2014-12-11 Josh Stone + + * dwfl_module_getsrc.c (dwfl_module_getsrc): Return the *last* line + record <= addr, rather than returning immediately on matches. + +2014-12-09 Mark Wielaard + + * dwfl_segment_report_module.c (handle_file_note): Check count doesn't + overflow. + +2014-12-07 Mark Wielaard + + * relocate.c (relocate_section): Sanity check section overlap against + actually used ehsize, shentsize and phentsize. + +2014-12-07 Mark Wielaard + + * offline.c (dwfl_offline_section_address): Assert shndx is not zero. + * relocate.c (__libdwfl_relocate_value): Don't relocate against + section zero. + +2014-11-29 Mark Wielaard + + * relocate.c (relocate_section): Check relocation section and target + section data don't overlap any of the ELF headers. + (relocate): Check for offset + size overflow. + +2014-11-22 Mark Wielaard + + * link_map.c (consider_executable): Use elf_getphdrnum. + (dwfl_link_map_report): Likewise. + +2014-11-18 Mark Wielaard + + * dwfl_module_getdwarf.c (find_symtab): Sanity check the data buffer, + number of symbols and first_global before use. + +2014-11-14 Mark Wielaard + + * dwfl_module_getdwarf.c (load_symtab): Don't use tables which have + a zero sh_entsize. + +2014-11-10 Mark Wielaard + + * dwfl_module_getdwarf.c (find_dynsym): New inner function + translate_offs that takes an adjust argument. Try finding + the symbol table with and without adjusting to main_bias. + +2014-09-26 Jan Kratochvil + + Support NT_FILE for locating files. + * core-file.c (dwfl_core_file_report): New variables note_file and + note_file_size, set them and pass them to dwfl_segment_report_module. + * dwfl_segment_report_module.c: Include common.h and fcntl.h. + (buf_has_data, buf_read_ulong, handle_file_note): New functions. + (invalid_elf): New function from code of dwfl_segment_report_module. + (dwfl_segment_report_module): Add parameters note_file and + note_file_size. New variables elf and fd, clean them up in finish. + Move some code to invalid_elf. Call handle_file_note, if it found + a name verify the file by invalid_elf. Protect elf and fd against + cleanup by finish if we found the file for new Dwfl_Module. + * libdwflP.h (dwfl_segment_report_module): Add parameters note_file and + note_file_size. + +2014-09-23 Mark Wielaard + + * dwfl_segment_report_module.c (dwfl_segment_report_module): + Extract ei_class, ei_data and e_type early and use the result. + +2014-09-18 Jan Kratochvil + + * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE. + * dwfl_segment_report_module.c (dwfl_segment_report_module): Set + IS_EXECUTABLE. + * libdwflP.h (struct Dwfl_Module): New field is_executable. + +2014-08-28 Jan Kratochvil + + * dwfl_module_getdwarf.c (find_offsets): Add parameter main_bias, use + it. + (find_dynsym): Pass the new parameter main_bias. + 2014-08-14 Mark Wielaard * linux-kernel-modules.c (check-suffix): Also TRY .ko.xz. diff --git a/libdwfl/Makefile.am b/libdwfl/Makefile.am index 72c980b..89ca92e 100644 --- a/libdwfl/Makefile.am +++ b/libdwfl/Makefile.am @@ -68,11 +68,9 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \ dwfl_segment_report_module.c \ link_map.c core-file.c open.c image-header.c \ dwfl_frame.c frame_unwind.c dwfl_frame_pc.c \ - linux-pid-attach.c linux-core-attach.c dwfl_frame_regs.c + linux-pid-attach.c linux-core-attach.c dwfl_frame_regs.c \ + gzip.c -if ZLIB -libdwfl_a_SOURCES += gzip.c -endif if BZLIB libdwfl_a_SOURCES += bzip2.c endif diff --git a/libdwfl/Makefile.in b/libdwfl/Makefile.in index 37ea652..e7eebdf 100644 --- a/libdwfl/Makefile.in +++ b/libdwfl/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,10 +89,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog -@ZLIB_TRUE@am__append_1 = gzip.c +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING @BZLIB_TRUE@am__append_2 = bzip2.c @LZMA_TRUE@am__append_3 = lzma.c subdir = libdwfl @@ -93,12 +100,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -127,9 +135,8 @@ am__libdwfl_a_SOURCES_DIST = dwfl_begin.c dwfl_end.c dwfl_error.c \ link_map.c core-file.c open.c image-header.c dwfl_frame.c \ frame_unwind.c dwfl_frame_pc.c linux-pid-attach.c \ linux-core-attach.c dwfl_frame_regs.c gzip.c bzip2.c lzma.c -@ZLIB_TRUE@am__objects_1 = gzip.$(OBJEXT) -@BZLIB_TRUE@am__objects_2 = bzip2.$(OBJEXT) -@LZMA_TRUE@am__objects_3 = lzma.$(OBJEXT) +@BZLIB_TRUE@am__objects_1 = bzip2.$(OBJEXT) +@LZMA_TRUE@am__objects_2 = lzma.$(OBJEXT) am_libdwfl_a_OBJECTS = dwfl_begin.$(OBJEXT) dwfl_end.$(OBJEXT) \ dwfl_error.$(OBJEXT) dwfl_version.$(OBJEXT) \ dwfl_module.$(OBJEXT) dwfl_report_elf.$(OBJEXT) \ @@ -163,7 +170,7 @@ am_libdwfl_a_OBJECTS = dwfl_begin.$(OBJEXT) dwfl_end.$(OBJEXT) \ dwfl_frame.$(OBJEXT) frame_unwind.$(OBJEXT) \ dwfl_frame_pc.$(OBJEXT) linux-pid-attach.$(OBJEXT) \ linux-core-attach.$(OBJEXT) dwfl_frame_regs.$(OBJEXT) \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) + gzip.$(OBJEXT) $(am__objects_1) $(am__objects_2) libdwfl_a_OBJECTS = $(am_libdwfl_a_OBJECTS) libdwfl_pic_a_AR = $(AR) $(ARFLAGS) libdwfl_pic_a_LIBADD = @@ -251,6 +258,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -260,6 +269,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -279,6 +289,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -290,6 +303,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -333,6 +347,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -379,14 +394,28 @@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. -I$(srcdir) \ -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS) -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi noinst_LIBRARIES = libdwfl.a libdwfl_pic.a pkginclude_HEADERS = libdwfl.h libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \ @@ -410,8 +439,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \ dwfl_module_register_names.c dwfl_segment_report_module.c \ link_map.c core-file.c open.c image-header.c dwfl_frame.c \ frame_unwind.c dwfl_frame_pc.c linux-pid-attach.c \ - linux-core-attach.c dwfl_frame_regs.c $(am__append_1) \ - $(am__append_2) $(am__append_3) + linux-core-attach.c dwfl_frame_regs.c gzip.c $(am__append_2) \ + $(am__append_3) libdwfl = $(libdw) libdw = ../libdw/libdw.so libelf = ../libelf/libelf.so @@ -436,7 +465,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libdwfl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libdwfl/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -445,7 +473,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -548,14 +576,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ @@ -783,15 +811,20 @@ uninstall-am: uninstall-pkgincludeHEADERS ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index 42b7e78..501530a 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -1,5 +1,5 @@ /* Standard argp argument parsers for tools using libdwfl. - Copyright (C) 2005-2010, 2012 Red Hat, Inc. + Copyright (C) 2005-2010, 2012, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -273,7 +273,7 @@ parse_opt (int key, char *arg, struct argp_state *state) if (opt->core) { - int fd = open64 (opt->core, O_RDONLY); + int fd = open (opt->core, O_RDONLY); if (fd < 0) { int code = errno; @@ -303,7 +303,19 @@ parse_opt (int key, char *arg, struct argp_state *state) /* Non-fatal to not be able to attach to core, ignore error. */ INTUSE(dwfl_core_file_attach) (dwfl, core); - /* From now we leak FD and CORE. */ + /* Store core Elf and fd in Dwfl to expose with dwfl_end. */ + if (dwfl->user_core == NULL) + { + dwfl->user_core = calloc (1, sizeof (struct Dwfl_User_Core)); + if (dwfl->user_core == NULL) + { + argp_failure (state, EXIT_FAILURE, 0, + _("Not enough memory")); + return ENOMEM; + } + } + dwfl->user_core->core = core; + dwfl->user_core->fd = fd; if (result == 0) { diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c index 4ce63c4..67684c9 100644 --- a/libdwfl/core-file.c +++ b/libdwfl/core-file.c @@ -1,5 +1,5 @@ /* Core file handling. - Copyright (C) 2008-2010, 2013 Red Hat, Inc. + Copyright (C) 2008-2010, 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -39,33 +39,36 @@ #include "system.h" +/* On failure return, we update *NEXT to point back at OFFSET. */ +static inline Elf * +do_fail (int error, off_t *next, off_t offset) +{ + if (next != NULL) + *next = offset; + //__libelf_seterrno (error); + __libdwfl_seterrno (DWFL_E (LIBELF, error)); + return NULL; +} + +#define fail(error) do_fail (error, next, offset) + /* This is a prototype of what a new libelf interface might be. This implementation is pessimal for non-mmap cases and should be replaced by more diddling inside libelf internals. */ static Elf * -elf_begin_rand (Elf *parent, loff_t offset, loff_t size, loff_t *next) +elf_begin_rand (Elf *parent, off_t offset, off_t size, off_t *next) { if (parent == NULL) return NULL; - /* On failure return, we update *NEXT to point back at OFFSET. */ - inline Elf *fail (int error) - { - if (next != NULL) - *next = offset; - //__libelf_seterrno (error); - __libdwfl_seterrno (DWFL_E (LIBELF, error)); - return NULL; - } - - loff_t min = (parent->kind == ELF_K_ELF ? + off_t min = (parent->kind == ELF_K_ELF ? (parent->class == ELFCLASS32 ? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr)) : parent->kind == ELF_K_AR ? SARMAG : 0); if (unlikely (offset < min) - || unlikely (offset >= (loff_t) parent->maximum_size)) + || unlikely (offset >= (off_t) parent->maximum_size)) return fail (ELF_E_RANGE); /* For an archive, fetch just the size field @@ -92,11 +95,11 @@ elf_begin_rand (Elf *parent, loff_t offset, loff_t size, loff_t *next) char *endp; size = strtoll (h.ar_size, &endp, 10); if (unlikely (endp == h.ar_size) - || unlikely ((loff_t) parent->maximum_size - offset < size)) + || unlikely ((off_t) parent->maximum_size - offset < size)) return fail (ELF_E_INVALID_ARCHIVE); } - if (unlikely ((loff_t) parent->maximum_size - offset < size)) + if (unlikely ((off_t) parent->maximum_size - offset < size)) return fail (ELF_E_RANGE); /* Even if we fail at this point, update *NEXT to point past the file. */ @@ -104,7 +107,7 @@ elf_begin_rand (Elf *parent, loff_t offset, loff_t size, loff_t *next) *next = offset + size; if (unlikely (offset == 0) - && unlikely (size == (loff_t) parent->maximum_size)) + && unlikely (size == (off_t) parent->maximum_size)) return elf_clone (parent, parent->cmd); /* Note the image is guaranteed live only as long as PARENT @@ -114,7 +117,7 @@ elf_begin_rand (Elf *parent, loff_t offset, loff_t size, loff_t *next) Elf_Data *data = elf_getdata_rawchunk (parent, offset, size, ELF_T_BYTE); if (data == NULL) return NULL; - assert ((loff_t) data->d_size == size); + assert ((off_t) data->d_size == size); return elf_memory (data->d_buf, size); } @@ -161,6 +164,9 @@ dwfl_report_core_segments (Dwfl *dwfl, Elf *elf, size_t phnum, GElf_Phdr *notes) /* Never read more than this much without mmap. */ #define MAX_EAGER_COST 8192 +/* Dwfl_Module_Callback passed to and called by dwfl_segment_report_module + to read in a segment as ELF image directly if possible or indicate an + attempt must be made to read in the while segment right now. */ static bool core_file_read_eagerly (Dwfl_Module *mod, void **userdata __attribute__ ((unused)), @@ -174,6 +180,10 @@ core_file_read_eagerly (Dwfl_Module *mod, { Elf *core = arg; + /* The available buffer is often the whole segment when the core file + was mmap'd if used together with the dwfl_elf_phdr_memory_callback. + Which means that if it is complete we can just construct the whole + ELF image right now without having to read in anything more. */ if (whole <= *buffer_available) { /* All there ever was, we already have on hand. */ @@ -198,8 +208,9 @@ core_file_read_eagerly (Dwfl_Module *mod, return *elfp != NULL; } - /* We don't have the whole file. - Figure out if this is better than nothing. */ + /* We don't have the whole file. Which either means the core file + wasn't mmap'd, but needs to still be read in, or that the segment + is truncated. Figure out if this is better than nothing. */ if (worthwhile == 0) /* Caller doesn't think so. */ @@ -212,12 +223,16 @@ core_file_read_eagerly (Dwfl_Module *mod, requires find_elf hook re-doing the magic to fall back if no file found */ - if (mod->build_id_len > 0) - /* There is a build ID that could help us find the whole file, - which might be more useful than what we have. - We'll just rely on that. */ + if (whole > MAX_EAGER_COST && mod->build_id_len > 0) + /* We can't cheaply read the whole file here, so we'd + be using a partial file. But there is a build ID that could + help us find the whole file, which might be more useful than + what we have. We'll just rely on that. */ return false; + /* The file is either small (most likely the vdso) or big and incomplete, + but we don't have a build-id. */ + if (core->map_address != NULL) /* It's cheap to get, so get it. */ return true; @@ -226,6 +241,44 @@ core_file_read_eagerly (Dwfl_Module *mod, return cost <= MAX_EAGER_COST; } +static inline void +update_end (GElf_Phdr *pphdr, const GElf_Off align, + GElf_Off *pend, GElf_Addr *pend_vaddr) +{ + *pend = (pphdr->p_offset + pphdr->p_filesz + align - 1) & -align; + *pend_vaddr = (pphdr->p_vaddr + pphdr->p_memsz + align - 1) & -align; +} + +/* Use following contiguous segments to get towards SIZE. */ +static inline bool +do_more (size_t size, GElf_Phdr *pphdr, const GElf_Off align, + Elf *elf, GElf_Off start, int *pndx, + GElf_Off *pend, GElf_Addr *pend_vaddr) +{ + while (*pend <= start || *pend - start < size) + { + if (pphdr->p_filesz < pphdr->p_memsz) + /* This segment is truncated, so no following one helps us. */ + return false; + + if (unlikely (gelf_getphdr (elf, (*pndx)++, pphdr) == NULL)) + return false; + + if (pphdr->p_type == PT_LOAD) + { + if (pphdr->p_offset > *pend + || pphdr->p_vaddr > *pend_vaddr) + /* It's discontiguous! */ + return false; + + update_end (pphdr, align, pend, pend_vaddr); + } + } + return true; +} + +#define more(size) do_more (size, &phdr, align, elf, start, &ndx, &end, &end_vaddr) + bool dwfl_elf_phdr_memory_callback (Dwfl *dwfl, int ndx, void **buffer, size_t *buffer_available, @@ -258,38 +311,7 @@ dwfl_elf_phdr_memory_callback (Dwfl *dwfl, int ndx, GElf_Off end; GElf_Addr end_vaddr; - inline void update_end () - { - end = (phdr.p_offset + phdr.p_filesz + align - 1) & -align; - end_vaddr = (phdr.p_vaddr + phdr.p_memsz + align - 1) & -align; - } - - update_end (); - - /* Use following contiguous segments to get towards SIZE. */ - inline bool more (size_t size) - { - while (end <= start || end - start < size) - { - if (phdr.p_filesz < phdr.p_memsz) - /* This segment is truncated, so no following one helps us. */ - return false; - - if (unlikely (gelf_getphdr (elf, ndx++, &phdr) == NULL)) - return false; - - if (phdr.p_type == PT_LOAD) - { - if (phdr.p_offset > end - || phdr.p_vaddr > end_vaddr) - /* It's discontiguous! */ - return false; - - update_end (); - } - } - return true; - } + update_end (&phdr, align, &end, &end_vaddr); /* We need at least this much. */ if (! more (minread)) @@ -429,13 +451,27 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) return -1; } - free (dwfl->executable_for_core); + if (dwfl->user_core != NULL) + free (dwfl->user_core->executable_for_core); if (executable == NULL) - dwfl->executable_for_core = NULL; + { + if (dwfl->user_core != NULL) + dwfl->user_core->executable_for_core = NULL; + } else { - dwfl->executable_for_core = strdup (executable); - if (dwfl->executable_for_core == NULL) + if (dwfl->user_core == NULL) + { + dwfl->user_core = calloc (1, sizeof (struct Dwfl_User_Core)); + if (dwfl->user_core == NULL) + { + __libdwfl_seterrno (DWFL_E_NOMEM); + return -1; + } + dwfl->user_core->fd = -1; + } + dwfl->user_core->executable_for_core = strdup (executable); + if (dwfl->user_core->executable_for_core == NULL) { __libdwfl_seterrno (DWFL_E_NOMEM); return -1; @@ -451,7 +487,9 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) /* Next, we should follow the chain from DT_DEBUG. */ const void *auxv = NULL; + const void *note_file = NULL; size_t auxv_size = 0; + size_t note_file_size = 0; if (likely (notes_phdr.p_type == PT_NOTE)) { /* PT_NOTE -> NT_AUXV -> AT_PHDR -> PT_DYNAMIC -> DT_DEBUG */ @@ -468,13 +506,19 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) size_t desc_pos; while ((pos = gelf_getnote (notes, pos, &nhdr, &name_pos, &desc_pos)) > 0) - if (nhdr.n_type == NT_AUXV - && nhdr.n_namesz == sizeof "CORE" + if (nhdr.n_namesz == sizeof "CORE" && !memcmp (notes->d_buf + name_pos, "CORE", sizeof "CORE")) { - auxv = notes->d_buf + desc_pos; - auxv_size = nhdr.n_descsz; - break; + if (nhdr.n_type == NT_AUXV) + { + auxv = notes->d_buf + desc_pos; + auxv_size = nhdr.n_descsz; + } + if (nhdr.n_type == NT_FILE) + { + note_file = notes->d_buf + desc_pos; + note_file_size = nhdr.n_descsz; + } } } } @@ -498,6 +542,7 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) int seg = dwfl_segment_report_module (dwfl, ndx, NULL, &dwfl_elf_phdr_memory_callback, elf, core_file_read_eagerly, elf, + note_file, note_file_size, &r_debug_info); if (unlikely (seg < 0)) { @@ -567,7 +612,7 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) INTDEF (dwfl_core_file_report) NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158) -#ifdef SHARED +#ifdef SYMBOL_VERSIONING int _compat_without_executable_dwfl_core_file_report (Dwfl *dwfl, Elf *elf); COMPAT_VERSION_NEWPROTO (dwfl_core_file_report, ELFUTILS_0.146, without_executable) diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 40b0201..5182054 100644 --- a/libdwfl/cu.c +++ b/libdwfl/cu.c @@ -1,5 +1,5 @@ /* Keeping track of DWARF compilation units in libdwfl. - Copyright (C) 2005-2010 Red Hat, Inc. + Copyright (C) 2005-2010, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -162,13 +162,38 @@ cudie_offset (const struct dwfl_cu *cu) static int compare_cukey (const void *a, const void *b) { - return cudie_offset (a) - cudie_offset (b); + Dwarf_Off a_off = cudie_offset (a); + Dwarf_Off b_off = cudie_offset (b); + return (a_off < b_off) ? -1 : ((a_off > b_off) ? 1 : 0); } /* Intern the CU if necessary. */ static Dwfl_Error intern_cu (Dwfl_Module *mod, Dwarf_Off cuoff, struct dwfl_cu **result) { + if (unlikely (cuoff + 4 >= mod->dw->sectiondata[IDX_debug_info]->d_size)) + { + if (likely (mod->lazycu == 1)) + { + /* This is the EOF marker. Now we have interned all the CUs. + One increment in MOD->lazycu counts not having hit EOF yet. */ + *result = (void *) -1; + less_lazy (mod); + return DWFL_E_NOERROR; + } + else + { + /* Unexpected EOF, most likely a bogus aranges. */ + return (DWFL_E (LIBDW, DWARF_E_INVALID_DWARF)); + } + } + + /* Make sure the cuoff points to a real DIE. */ + Dwarf_Die cudie; + Dwarf_Die *die = INTUSE(dwarf_offdie) (mod->dw, cuoff, &cudie); + if (die == NULL) + return DWFL_E_LIBDW; + struct Dwarf_CU dwkey; struct dwfl_cu key; key.die.cu = &dwkey; @@ -180,51 +205,33 @@ intern_cu (Dwfl_Module *mod, Dwarf_Off cuoff, struct dwfl_cu **result) if (*found == &key || *found == NULL) { - if (unlikely (cuoff + 4 >= mod->dw->sectiondata[IDX_debug_info]->d_size)) - { - /* This is the EOF marker. Now we have interned all the CUs. - One increment in MOD->lazycu counts not having hit EOF yet. */ - *found = (void *) -1l; - less_lazy (mod); - } - else - { - /* This is a new entry, meaning we haven't looked at this CU. */ - - *found = NULL; + /* This is a new entry, meaning we haven't looked at this CU. */ - struct dwfl_cu *cu = malloc (sizeof *cu); - if (unlikely (cu == NULL)) - return DWFL_E_NOMEM; + *found = NULL; - cu->mod = mod; - cu->next = NULL; - cu->lines = NULL; + struct dwfl_cu *cu = malloc (sizeof *cu); + if (unlikely (cu == NULL)) + return DWFL_E_NOMEM; - /* XXX use non-searching lookup */ - Dwarf_Die *die = INTUSE(dwarf_offdie) (mod->dw, cuoff, &cu->die); - if (die == NULL) - { - free (cu); - return DWFL_E_LIBDW; - } - assert (die == &cu->die); + cu->mod = mod; + cu->next = NULL; + cu->lines = NULL; + cu->die = cudie; - struct dwfl_cu **newvec = realloc (mod->cu, ((mod->ncu + 1) - * sizeof (mod->cu[0]))); - if (newvec == NULL) - { - free (cu); - return DWFL_E_NOMEM; - } - mod->cu = newvec; + struct dwfl_cu **newvec = realloc (mod->cu, ((mod->ncu + 1) + * sizeof (mod->cu[0]))); + if (newvec == NULL) + { + free (cu); + return DWFL_E_NOMEM; + } + mod->cu = newvec; - mod->cu[mod->ncu++] = cu; - if (cu->die.cu->start == 0) - mod->first_cu = cu; + mod->cu[mod->ncu++] = cu; + if (cu->die.cu->start == 0) + mod->first_cu = cu; - *found = cu; - } + *found = cu; } *result = *found; @@ -273,7 +280,8 @@ __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu, if (result != DWFL_E_NOERROR) return result; - if ((*nextp)->next == NULL && nextoff == (Dwarf_Off) -1l) + if (*nextp != (void *) -1 + && (*nextp)->next == NULL && nextoff == (Dwarf_Off) -1l) (*nextp)->next = (void *) -1l; } diff --git a/libdwfl/derelocate.c b/libdwfl/derelocate.c index da67908..439a24e 100644 --- a/libdwfl/derelocate.c +++ b/libdwfl/derelocate.c @@ -1,5 +1,5 @@ /* Recover relocatibility for addresses computed from debug information. - Copyright (C) 2005-2010, 2013 Red Hat, Inc. + Copyright (C) 2005-2010, 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -80,7 +80,8 @@ cache_sections (Dwfl_Module *mod) { elf_error: __libdwfl_seterrno (DWFL_E_LIBELF); - return -1; + nrefs = -1; + goto free_refs; } bool check_reloc_sections = false; @@ -112,7 +113,15 @@ cache_sections (Dwfl_Module *mod) if (unlikely (name == NULL)) goto elf_error; - struct secref *newref = alloca (sizeof *newref); + struct secref *newref = malloc (sizeof *newref); + if (unlikely (newref == NULL)) + { + nomem: + __libdwfl_seterrno (DWFL_E_NOMEM); + nrefs = -1; + goto free_refs; + } + newref->scn = scn; newref->relocs = NULL; newref->name = name; @@ -147,13 +156,13 @@ cache_sections (Dwfl_Module *mod) } mod->reloc_info = malloc (offsetof (struct dwfl_relocation, refs[nrefs])); - if (mod->reloc_info == NULL) - { - __libdwfl_seterrno (DWFL_E_NOMEM); - return -1; - } + if (unlikely (mod->reloc_info == NULL)) + goto nomem; + + struct secref **sortrefs = malloc (nrefs * sizeof sortrefs[0]); + if (unlikely (sortrefs == NULL)) + goto nomem; - struct secref **sortrefs = alloca (nrefs * sizeof sortrefs[0]); for (size_t i = nrefs; i-- > 0; refs = refs->next) sortrefs[i] = refs; assert (refs == NULL); @@ -168,8 +177,11 @@ cache_sections (Dwfl_Module *mod) mod->reloc_info->refs[i].relocs = sortrefs[i]->relocs; mod->reloc_info->refs[i].start = sortrefs[i]->start; mod->reloc_info->refs[i].end = sortrefs[i]->end; + free (sortrefs[i]); } + free (sortrefs); + if (unlikely (check_reloc_sections)) { /* There was a reloc section that preceded its target section. @@ -199,6 +211,14 @@ cache_sections (Dwfl_Module *mod) } } +free_refs: + while (refs != NULL) + { + struct secref *ref = refs; + refs = ref->next; + free (ref); + } + return nrefs; } @@ -266,6 +286,9 @@ dwfl_module_relocation_info (Dwfl_Module *mod, unsigned int idx, static bool check_module (Dwfl_Module *mod) { + if (mod == NULL) + return true; + if (INTUSE(dwfl_module_getsymtab) (mod) < 0) { Dwfl_Error error = dwfl_errno (); diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c index 1555008..903e193 100644 --- a/libdwfl/dwfl_build_id_find_elf.c +++ b/libdwfl/dwfl_build_id_find_elf.c @@ -1,5 +1,5 @@ /* Find an ELF file for a module from its build ID. - Copyright (C) 2007-2010, 2014 Red Hat, Inc. + Copyright (C) 2007-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,9 +37,20 @@ internal_function __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, const size_t id_len, const uint8_t *id) { + /* We don't handle very short or really large build-ids. We need at + at least 3 and allow for up to 64 (normally ids are 20 long). */ +#define MIN_BUILD_ID_BYTES 3 +#define MAX_BUILD_ID_BYTES 64 + if (id_len < MIN_BUILD_ID_BYTES || id_len > MAX_BUILD_ID_BYTES) + { + __libdwfl_seterrno (DWFL_E_WRONG_ID_ELF); + return -1; + } + /* Search debuginfo_path directories' .build-id/ subdirectories. */ - char id_name[sizeof "/.build-id/" + 1 + id_len * 2 + sizeof ".debug" - 1]; + char id_name[sizeof "/.build-id/" + 1 + MAX_BUILD_ID_BYTES * 2 + + sizeof ".debug" - 1]; strcpy (id_name, "/.build-id/"); int n = snprintf (&id_name[sizeof "/.build-id/" - 1], 4, "%02" PRIx8 "/", (uint8_t) id[0]); @@ -55,12 +66,15 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, ".debug"); const Dwfl_Callbacks *const cb = mod->dwfl->callbacks; - char *path = strdupa ((cb->debuginfo_path ? *cb->debuginfo_path : NULL) - ?: DEFAULT_DEBUGINFO_PATH); + char *path = strdup ((cb->debuginfo_path ? *cb->debuginfo_path : NULL) + ?: DEFAULT_DEBUGINFO_PATH); + if (path == NULL) + return -1; int fd = -1; char *dir; - while (fd < 0 && (dir = strsep (&path, ":")) != NULL) + char *paths = path; + while (fd < 0 && (dir = strsep (&paths, ":")) != NULL) { if (dir[0] == '+' || dir[0] == '-') ++dir; @@ -75,7 +89,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, break; memcpy (mempcpy (name, dir, dirlen), id_name, sizeof id_name); - fd = TEMP_FAILURE_RETRY (open64 (name, O_RDONLY)); + fd = TEMP_FAILURE_RETRY (open (name, O_RDONLY)); if (fd >= 0) { if (*file_name != NULL) @@ -90,6 +104,8 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, free (name); } + free (path); + /* If we simply found nothing, clear errno. If we had some other error with the file, report that. Possibly this should treat other errors like ENOENT too. But ignoring all errors could mask some that should @@ -124,17 +140,19 @@ dwfl_build_id_find_elf (Dwfl_Module *mod, char **file_name, Elf **elfp) { *elfp = NULL; - if (modname != NULL && mod->dwfl->executable_for_core != NULL - && (strcmp (modname, "[exe]") == 0 || strcmp (modname, "[pie]") == 0)) + if (mod->is_executable + && mod->dwfl->user_core != NULL + && mod->dwfl->user_core->executable_for_core != NULL) { /* When dwfl_core_file_report was called with a non-NULL executable file name this callback will replace the Dwfl_Module main.name with the - recorded executable file when the modname is [exe] or [pie] (which - then triggers opening and reporting of the executable). */ - int fd = open64 (mod->dwfl->executable_for_core, O_RDONLY); + recorded executable file when MOD was identified as main executable + (which then triggers opening and reporting of the executable). */ + const char *executable = mod->dwfl->user_core->executable_for_core; + int fd = open (executable, O_RDONLY); if (fd >= 0) { - *file_name = strdup (mod->dwfl->executable_for_core); + *file_name = strdup (executable); if (*file_name != NULL) return fd; else diff --git a/libdwfl/dwfl_end.c b/libdwfl/dwfl_end.c index 33cae48..0b35bd2 100644 --- a/libdwfl/dwfl_end.c +++ b/libdwfl/dwfl_end.c @@ -1,5 +1,5 @@ /* Finish a session using libdwfl. - Copyright (C) 2005, 2008, 2012-2013 Red Hat, Inc. + Copyright (C) 2005, 2008, 2012-2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ not, see . */ #include "libdwflP.h" +#include void dwfl_end (Dwfl *dwfl) @@ -49,6 +50,13 @@ dwfl_end (Dwfl *dwfl) __libdwfl_module_free (dead); } - free (dwfl->executable_for_core); + if (dwfl->user_core != NULL) + { + free (dwfl->user_core->executable_for_core); + elf_end (dwfl->user_core->core); + if (dwfl->user_core->fd != -1) + close (dwfl->user_core->fd); + free (dwfl->user_core); + } free (dwfl); } diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c index d9ca9e7..7bcf61c 100644 --- a/libdwfl/dwfl_error.c +++ b/libdwfl/dwfl_error.c @@ -1,5 +1,5 @@ /* Error handling in libdwfl. - Copyright (C) 2005-2010 Red Hat, Inc. + Copyright (C) 2005-2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -54,18 +54,31 @@ dwfl_errno (void) INTDEF (dwfl_errno) -static const struct msgtable +struct msgtable { #define DWFL_ERROR(name, text) char msg_##name[sizeof text]; DWFL_ERRORS #undef DWFL_ERROR +}; + +static const union +{ + struct msgtable table; + char strings[ +#define DWFL_ERROR(name, text) + sizeof text + DWFL_ERRORS +#undef DWFL_ERROR + ]; } msgtable = { + .table = + { #define DWFL_ERROR(name, text) text, - DWFL_ERRORS + DWFL_ERRORS #undef DWFL_ERROR + } }; -#define msgstr (&msgtable.msg_NOERROR[0]) +#define msgstr (msgtable.strings) static const uint_fast16_t msgidx[] = { @@ -125,8 +138,7 @@ __libdwfl_seterrno (Dwfl_Error error) const char * -dwfl_errmsg (error) - int error; +dwfl_errmsg (int error) { if (error == 0 || error == -1) { diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c index f6f86c0..d639939 100644 --- a/libdwfl/dwfl_frame.c +++ b/libdwfl/dwfl_frame.c @@ -57,7 +57,7 @@ state_fetch_pc (Dwfl_Frame *state) __libdwfl_seterrno (DWFL_E_LIBEBL_BAD); return false; } - state->pc = state->regs[ra]; + state->pc = state->regs[ra] + ebl_ra_offset (ebl); state->pc_state = DWFL_FRAME_STATE_PC_SET; } return true; @@ -143,7 +143,8 @@ dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid, /* Reset any previous error, we are just going to try again. */ dwfl->attacherr = DWFL_E_NOERROR; - if (thread_callbacks == NULL || thread_callbacks->next_thread == NULL + /* thread_callbacks is declared NN */ + if (thread_callbacks->next_thread == NULL || thread_callbacks->set_initial_registers == NULL) { dwfl->attacherr = DWFL_E_INVALID_ARGUMENT; diff --git a/libdwfl/dwfl_lineinfo.c b/libdwfl/dwfl_lineinfo.c index dfb27d8..7ddbfb0 100644 --- a/libdwfl/dwfl_lineinfo.c +++ b/libdwfl/dwfl_lineinfo.c @@ -1,5 +1,5 @@ /* Get information from a source line record returned by libdwfl. - Copyright (C) 2005-2010 Red Hat, Inc. + Copyright (C) 2005-2010, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -46,6 +46,12 @@ dwfl_lineinfo (Dwfl_Line *line, Dwarf_Addr *addr, int *linep, int *colp, if (colp != NULL) *colp = info->column; + if (unlikely (info->file >= info->files->nfiles)) + { + __libdwfl_seterrno (DWFL_E (LIBDW, DWARF_E_INVALID_DWARF)); + return NULL; + } + struct Dwarf_Fileinfo_s *file = &info->files->info[info->file]; if (mtime != NULL) *mtime = file->mtime; diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index 8efcfaa..515092f 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -1,5 +1,5 @@ /* Maintenance of module list in libdwfl. - Copyright (C) 2005, 2006, 2007, 2008, 2014 Red Hat, Inc. + Copyright (C) 2005, 2006, 2007, 2008, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ not, see . */ #include "libdwflP.h" +#include "../libdw/cfi.h" #include #include @@ -70,6 +71,23 @@ __libdwfl_module_free (Dwfl_Module *mod) free (mod->cu); } + /* We might have primed the Dwarf_CFI ebl cache with our own ebl + in __libdwfl_set_cfi. Make sure we don't free it twice. */ + if (mod->eh_cfi != NULL) + { + if (mod->eh_cfi->ebl != NULL && mod->eh_cfi->ebl == mod->ebl) + mod->eh_cfi->ebl = NULL; + dwarf_cfi_end (mod->eh_cfi); + } + + if (mod->dwarf_cfi != NULL) + { + if (mod->dwarf_cfi->ebl != NULL && mod->dwarf_cfi->ebl == mod->ebl) + mod->dwarf_cfi->ebl = NULL; + /* We don't need to explicitly destroy the dwarf_cfi. + That will be done by dwarf_end. */ + } + if (mod->dw != NULL) { INTUSE(dwarf_end) (mod->dw); @@ -97,9 +115,6 @@ __libdwfl_module_free (Dwfl_Module *mod) if (mod->reloc_info != NULL) free (mod->reloc_info); - if (mod->eh_cfi != NULL) - dwarf_cfi_end (mod->eh_cfi); - free (mod->name); free (mod); } @@ -125,6 +140,21 @@ dwfl_report_begin (Dwfl *dwfl) } INTDEF (dwfl_report_begin) +static inline Dwfl_Module * +use (Dwfl_Module *mod, Dwfl_Module **tailp, Dwfl *dwfl) +{ + mod->next = *tailp; + *tailp = mod; + + if (unlikely (dwfl->lookup_module != NULL)) + { + free (dwfl->lookup_module); + dwfl->lookup_module = NULL; + } + + return mod; +} + /* Report that a module called NAME spans addresses [START, END). Returns the module handle, either existing or newly allocated, or returns a null pointer for an allocation error. */ @@ -134,20 +164,6 @@ dwfl_report_module (Dwfl *dwfl, const char *name, { Dwfl_Module **tailp = &dwfl->modulelist, **prevp = tailp; - inline Dwfl_Module *use (Dwfl_Module *mod) - { - mod->next = *tailp; - *tailp = mod; - - if (unlikely (dwfl->lookup_module != NULL)) - { - free (dwfl->lookup_module); - dwfl->lookup_module = NULL; - } - - return mod; - } - for (Dwfl_Module *m = *prevp; m != NULL; m = *(prevp = &m->next)) { if (m->low_addr == start && m->high_addr == end @@ -157,7 +173,7 @@ dwfl_report_module (Dwfl *dwfl, const char *name, after the last module already reported. */ *prevp = m->next; m->gc = false; - return use (m); + return use (m, tailp, dwfl); } if (! m->gc) @@ -181,7 +197,7 @@ dwfl_report_module (Dwfl *dwfl, const char *name, mod->high_addr = end; mod->dwfl = dwfl; - return use (mod); + return use (mod, tailp, dwfl); } INTDEF (dwfl_report_module) diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c index d205832..5a7bf71 100644 --- a/libdwfl/dwfl_module_addrsym.c +++ b/libdwfl/dwfl_module_addrsym.c @@ -28,141 +28,144 @@ #include "libdwflP.h" -/* Returns the name of the symbol "closest" to ADDR. - Never returns symbols at addresses above ADDR. */ - -const char * -internal_function -__libdwfl_addrsym (Dwfl_Module *mod, GElf_Addr addr, GElf_Off *off, - GElf_Sym *closest_sym, GElf_Word *shndxp, - Elf **elfp, Dwarf_Addr *biasp, bool adjust_st_value) +struct search_state { - int syments = INTUSE(dwfl_module_getsymtab) (mod); - if (syments < 0) - return NULL; + Dwfl_Module *mod; + GElf_Addr addr; - /* Return true iff we consider ADDR to lie in the same section as SYM. */ - GElf_Word addr_shndx = SHN_UNDEF; - Elf *addr_symelf = NULL; - inline bool same_section (GElf_Addr value, Elf *symelf, GElf_Word shndx) - { - /* For absolute symbols and the like, only match exactly. */ - if (shndx >= SHN_LORESERVE) - return value == addr; + GElf_Sym *closest_sym; + bool adjust_st_value; + GElf_Word addr_shndx; + Elf *addr_symelf; - /* If value might not be st_value, the shndx of the symbol might - not match the section of the value. Explicitly look both up. */ - if (! adjust_st_value) - { - Dwarf_Addr v; - if (addr_shndx == SHN_UNDEF) - { - v = addr; - addr_shndx = __libdwfl_find_section_ndx (mod, &v); - } + /* Keep track of the closest symbol we have seen so far. + Here we store only symbols with nonzero st_size. */ + const char *closest_name; + GElf_Addr closest_value; + GElf_Word closest_shndx; + Elf *closest_elf; - v = value; - return addr_shndx == __libdwfl_find_section_ndx (mod, &v); - } + /* Keep track of an eligible symbol with st_size == 0 as a fallback. */ + const char *sizeless_name; + GElf_Sym sizeless_sym; + GElf_Addr sizeless_value; + GElf_Word sizeless_shndx; + Elf *sizeless_elf; - /* Figure out what section ADDR lies in. */ - if (addr_shndx == SHN_UNDEF || addr_symelf != symelf) - { - GElf_Addr mod_addr = dwfl_deadjust_st_value (mod, symelf, addr); - Elf_Scn *scn = NULL; - addr_shndx = SHN_ABS; - addr_symelf = symelf; - while ((scn = elf_nextscn (symelf, scn)) != NULL) - { - GElf_Shdr shdr_mem; - GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); - if (likely (shdr != NULL) - && mod_addr >= shdr->sh_addr - && mod_addr < shdr->sh_addr + shdr->sh_size) - { - addr_shndx = elf_ndxscn (scn); - break; - } - } - } + /* Keep track of the lowest address a relevant sizeless symbol could have. */ + GElf_Addr min_label; +}; - return shndx == addr_shndx && addr_symelf == symelf; +/* Return true iff we consider ADDR to lie in the same section as SYM. */ +static inline bool +same_section (struct search_state *state, + GElf_Addr value, Elf *symelf, GElf_Word shndx) +{ + /* For absolute symbols and the like, only match exactly. */ + if (shndx >= SHN_LORESERVE) + return value == state->addr; + + /* If value might not be st_value, the shndx of the symbol might + not match the section of the value. Explicitly look both up. */ + if (! state->adjust_st_value) + { + Dwarf_Addr v; + if (state->addr_shndx == SHN_UNDEF) + { + v = state->addr; + state->addr_shndx = __libdwfl_find_section_ndx (state->mod, &v); + } + + v = value; + return state->addr_shndx == __libdwfl_find_section_ndx (state->mod, &v); } - /* Keep track of the closest symbol we have seen so far. - Here we store only symbols with nonzero st_size. */ - const char *closest_name = NULL; - GElf_Addr closest_value = 0; - GElf_Word closest_shndx = SHN_UNDEF; - Elf *closest_elf = NULL; + /* Figure out what section ADDR lies in. */ + if (state->addr_shndx == SHN_UNDEF || state->addr_symelf != symelf) + { + GElf_Addr mod_addr = dwfl_deadjust_st_value (state->mod, symelf, + state->addr); + Elf_Scn *scn = NULL; + state->addr_shndx = SHN_ABS; + state->addr_symelf = symelf; + while ((scn = elf_nextscn (symelf, scn)) != NULL) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (likely (shdr != NULL) + && mod_addr >= shdr->sh_addr + && mod_addr < shdr->sh_addr + shdr->sh_size) + { + state->addr_shndx = elf_ndxscn (scn); + break; + } + } + } - /* Keep track of an eligible symbol with st_size == 0 as a fallback. */ - const char *sizeless_name = NULL; - GElf_Sym sizeless_sym = { 0, 0, 0, 0, 0, SHN_UNDEF }; - GElf_Addr sizeless_value = 0; - GElf_Word sizeless_shndx = SHN_UNDEF; - Elf *sizeless_elf = NULL; + return shndx == state->addr_shndx && state->addr_symelf == symelf; +} - /* Keep track of the lowest address a relevant sizeless symbol could have. */ - GElf_Addr min_label = 0; +/* Return GELF_ST_BIND as higher-is-better integer. */ +static inline int +binding_value (const GElf_Sym *symp) +{ + switch (GELF_ST_BIND (symp->st_info)) + { + case STB_GLOBAL: + return 3; + case STB_WEAK: + return 2; + case STB_LOCAL: + return 1; + default: + return 0; + } +} - /* Try one symbol and associated value from the search table. */ - inline void try_sym_value (GElf_Addr value, GElf_Sym *sym, - const char *name, GElf_Word shndx, - Elf *elf, bool resolved) - { +/* Try one symbol and associated value from the search table. */ +static inline void +try_sym_value (struct search_state *state, + GElf_Addr value, GElf_Sym *sym, + const char *name, GElf_Word shndx, + Elf *elf, bool resolved) +{ /* Even if we don't choose this symbol, its existence excludes any sizeless symbol (assembly label) that is below its upper bound. */ - if (value + sym->st_size > min_label) - min_label = value + sym->st_size; + if (value + sym->st_size > state->min_label) + state->min_label = value + sym->st_size; - if (sym->st_size == 0 || addr - value < sym->st_size) + if (sym->st_size == 0 || state->addr - value < sym->st_size) { - /* Return GELF_ST_BIND as higher-is-better integer. */ - inline int binding_value (const GElf_Sym *symp) - { - switch (GELF_ST_BIND (symp->st_info)) - { - case STB_GLOBAL: - return 3; - case STB_WEAK: - return 2; - case STB_LOCAL: - return 1; - default: - return 0; - } - } - /* This symbol is a better candidate than the current one if it's closer to ADDR or is global when it was local. */ - if (closest_name == NULL - || closest_value < value - || binding_value (closest_sym) < binding_value (sym)) + if (state->closest_name == NULL + || state->closest_value < value + || binding_value (state->closest_sym) < binding_value (sym)) { if (sym->st_size != 0) { - *closest_sym = *sym; - closest_value = value; - closest_shndx = shndx; - closest_elf = elf; - closest_name = name; + *state->closest_sym = *sym; + state->closest_value = value; + state->closest_shndx = shndx; + state->closest_elf = elf; + state->closest_name = name; } - else if (closest_name == NULL - && value >= min_label - && same_section (value, - resolved ? mod->main.elf : elf, shndx)) + else if (state->closest_name == NULL + && value >= state->min_label + && same_section (state, value, + resolved ? state->mod->main.elf : elf, + shndx)) { /* Handwritten assembly symbols sometimes have no st_size. If no symbol with proper size includes the address, we'll use the closest one that is in the same section as ADDR. */ - sizeless_sym = *sym; - sizeless_value = value; - sizeless_shndx = shndx; - sizeless_elf = elf; - sizeless_name = name; + state->sizeless_sym = *sym; + state->sizeless_value = value; + state->sizeless_shndx = shndx; + state->sizeless_elf = elf; + state->sizeless_name = name; } } /* When the beginning of its range is no closer, @@ -170,26 +173,27 @@ __libdwfl_addrsym (Dwfl_Module *mod, GElf_Addr addr, GElf_Off *off, GELF_ST_BIND preference. If all are equal prefer the first symbol found. */ else if (sym->st_size != 0 - && closest_value == value - && ((closest_sym->st_size > sym->st_size - && (binding_value (closest_sym) + && state->closest_value == value + && ((state->closest_sym->st_size > sym->st_size + && (binding_value (state->closest_sym) <= binding_value (sym))) - || (closest_sym->st_size >= sym->st_size - && (binding_value (closest_sym) + || (state->closest_sym->st_size >= sym->st_size + && (binding_value (state->closest_sym) < binding_value (sym))))) { - *closest_sym = *sym; - closest_value = value; - closest_shndx = shndx; - closest_elf = elf; - closest_name = name; + *state->closest_sym = *sym; + state->closest_value = value; + state->closest_shndx = shndx; + state->closest_elf = elf; + state->closest_name = name; } } - } +} - /* Look through the symbol table for a matching symbol. */ - inline void search_table (int start, int end) - { +/* Look through the symbol table for a matching symbol. */ +static inline void +search_table (struct search_state *state, int start, int end) +{ for (int i = start; i < end; ++i) { GElf_Sym sym; @@ -197,32 +201,66 @@ __libdwfl_addrsym (Dwfl_Module *mod, GElf_Addr addr, GElf_Off *off, GElf_Word shndx; Elf *elf; bool resolved; - const char *name = __libdwfl_getsym (mod, i, &sym, &value, + const char *name = __libdwfl_getsym (state->mod, i, &sym, &value, &shndx, &elf, NULL, - &resolved, adjust_st_value); + &resolved, + state->adjust_st_value); if (name != NULL && name[0] != '\0' && sym.st_shndx != SHN_UNDEF - && value <= addr + && value <= state->addr && GELF_ST_TYPE (sym.st_info) != STT_SECTION && GELF_ST_TYPE (sym.st_info) != STT_FILE && GELF_ST_TYPE (sym.st_info) != STT_TLS) { - try_sym_value (value, &sym, name, shndx, elf, resolved); + try_sym_value (state, value, &sym, name, shndx, elf, resolved); /* If this is an addrinfo variant and the value could be resolved then also try matching the (adjusted) st_value. */ - if (resolved && mod->e_type != ET_REL) + if (resolved && state->mod->e_type != ET_REL) { GElf_Addr adjusted_st_value; - adjusted_st_value = dwfl_adjusted_st_value (mod, elf, + adjusted_st_value = dwfl_adjusted_st_value (state->mod, elf, sym.st_value); - if (value != adjusted_st_value && adjusted_st_value <= addr) - try_sym_value (adjusted_st_value, &sym, name, shndx, + if (value != adjusted_st_value + && adjusted_st_value <= state->addr) + try_sym_value (state, adjusted_st_value, &sym, name, shndx, elf, false); } } } - } +} + +/* Returns the name of the symbol "closest" to ADDR. + Never returns symbols at addresses above ADDR. */ +const char * +internal_function +__libdwfl_addrsym (Dwfl_Module *_mod, GElf_Addr _addr, GElf_Off *off, + GElf_Sym *_closest_sym, GElf_Word *shndxp, + Elf **elfp, Dwarf_Addr *biasp, bool _adjust_st_value) +{ + int syments = INTUSE(dwfl_module_getsymtab) (_mod); + if (syments < 0) + return NULL; + + struct search_state state = + { + .addr = _addr, + .mod = _mod, + .closest_sym = _closest_sym, + .adjust_st_value = _adjust_st_value, + .addr_shndx = SHN_UNDEF, + .addr_symelf = NULL, + .closest_name = NULL, + .closest_value = 0, + .closest_shndx = SHN_UNDEF, + .closest_elf = NULL, + .sizeless_name = NULL, + .sizeless_sym = { 0, 0, 0, 0, 0, SHN_UNDEF }, + .sizeless_value = 0, + .sizeless_shndx = SHN_UNDEF, + .sizeless_elf = NULL, + .min_label = 0 + }; /* First go through global symbols. mod->first_global and mod->aux_first_global are setup by dwfl_module_getsymtab to the @@ -233,38 +271,39 @@ __libdwfl_addrsym (Dwfl_Module *mod, GElf_Addr addr, GElf_Off *off, come first in the symbol table, then all globals. The zeroth, null entry, in the auxiliary table is skipped if there is a main table. */ - int first_global = INTUSE (dwfl_module_getsymtab_first_global) (mod); + int first_global = INTUSE (dwfl_module_getsymtab_first_global) (state.mod); if (first_global < 0) return NULL; - search_table (first_global == 0 ? 1 : first_global, syments); + search_table (&state, first_global == 0 ? 1 : first_global, syments); /* If we found nothing searching the global symbols, then try the locals. Unless we have a global sizeless symbol that matches exactly. */ - if (closest_name == NULL && first_global > 1 - && (sizeless_name == NULL || sizeless_value != addr)) - search_table (1, first_global); + if (state.closest_name == NULL && first_global > 1 + && (state.sizeless_name == NULL || state.sizeless_value != state.addr)) + search_table (&state, 1, first_global); /* If we found no proper sized symbol to use, fall back to the best candidate sizeless symbol we found, if any. */ - if (closest_name == NULL - && sizeless_name != NULL && sizeless_value >= min_label) + if (state.closest_name == NULL + && state.sizeless_name != NULL + && state.sizeless_value >= state.min_label) { - *closest_sym = sizeless_sym; - closest_value = sizeless_value; - closest_shndx = sizeless_shndx; - closest_elf = sizeless_elf; - closest_name = sizeless_name; + *state.closest_sym = state.sizeless_sym; + state.closest_value = state.sizeless_value; + state.closest_shndx = state.sizeless_shndx; + state.closest_elf = state.sizeless_elf; + state.closest_name = state.sizeless_name; } - *off = addr - closest_value; + *off = state.addr - state.closest_value; if (shndxp != NULL) - *shndxp = closest_shndx; + *shndxp = state.closest_shndx; if (elfp != NULL) - *elfp = closest_elf; + *elfp = state.closest_elf; if (biasp != NULL) - *biasp = dwfl_adjusted_st_value (mod, closest_elf, 0); - return closest_name; + *biasp = dwfl_adjusted_st_value (state.mod, state.closest_elf, 0); + return state.closest_name; } diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c index 350bbf8..c9a42ca 100644 --- a/libdwfl/dwfl_module_build_id.c +++ b/libdwfl/dwfl_module_build_id.c @@ -101,7 +101,7 @@ dwfl_module_build_id (Dwfl_Module *mod, INTDEF (dwfl_module_build_id) NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138) -#ifdef SHARED +#ifdef SYMBOL_VERSIONING COMPAT_VERSION (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end) int diff --git a/libdwfl/dwfl_module_dwarf_cfi.c b/libdwfl/dwfl_module_dwarf_cfi.c index 5182d6a..1dac26d 100644 --- a/libdwfl/dwfl_module_dwarf_cfi.c +++ b/libdwfl/dwfl_module_dwarf_cfi.c @@ -51,9 +51,7 @@ __libdwfl_set_cfi (Dwfl_Module *mod, Dwarf_CFI **slot, Dwarf_CFI *cfi) } Dwarf_CFI * -dwfl_module_dwarf_cfi (mod, bias) - Dwfl_Module *mod; - Dwarf_Addr *bias; +dwfl_module_dwarf_cfi (Dwfl_Module *mod, Dwarf_Addr *bias) { if (mod == NULL) return NULL; diff --git a/libdwfl/dwfl_module_eh_cfi.c b/libdwfl/dwfl_module_eh_cfi.c index da10d9f..dbe43b0 100644 --- a/libdwfl/dwfl_module_eh_cfi.c +++ b/libdwfl/dwfl_module_eh_cfi.c @@ -30,9 +30,7 @@ #include "../libdw/cfi.h" Dwarf_CFI * -dwfl_module_eh_cfi (mod, bias) - Dwfl_Module *mod; - Dwarf_Addr *bias; +dwfl_module_eh_cfi (Dwfl_Module *mod, Dwarf_Addr *bias) { if (mod == NULL) return NULL; diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index 7259984..0e8810b 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -1,5 +1,5 @@ /* Find debugging and symbol information for a module in libdwfl. - Copyright (C) 2005-2012, 2014 Red Hat, Inc. + Copyright (C) 2005-2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -46,7 +46,7 @@ open_elf_file (Elf **elf, int *fd, char **name) /* If there was a pre-primed file name left that the callback left behind, try to open that file name. */ if (*fd < 0 && *name != NULL) - *fd = TEMP_FAILURE_RETRY (open64 (*name, O_RDONLY)); + *fd = TEMP_FAILURE_RETRY (open (*name, O_RDONLY)); if (*fd < 0) return CBFAIL; @@ -231,6 +231,24 @@ __libdwfl_getelf (Dwfl_Module *mod) mod->main_bias = mod->e_type == ET_REL ? 0 : mod->low_addr - mod->main.vaddr; } +static inline void +consider_shdr (GElf_Addr interp, + GElf_Word sh_type, + GElf_Xword sh_flags, + GElf_Addr sh_addr, + GElf_Xword sh_size, + GElf_Addr *phighest) +{ + if ((sh_flags & SHF_ALLOC) + && ((sh_type == SHT_PROGBITS && sh_addr != interp) + || sh_type == SHT_NOBITS)) + { + const GElf_Addr sh_end = sh_addr + sh_size; + if (sh_end > *phighest) + *phighest = sh_end; + } +} + /* If the main file might have been prelinked, then we need to discover the correct synchronization address between the main and debug files. Because of prelink's section juggling, we cannot rely @@ -367,35 +385,44 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) src.d_size = phnum * phentsize; GElf_Addr undo_interp = 0; + bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; { - union - { - Elf32_Phdr p32[phnum]; - Elf64_Phdr p64[phnum]; - } phdr; - dst.d_buf = &phdr; - dst.d_size = sizeof phdr; + size_t phdr_size = class32 ? sizeof (Elf32_Phdr) : sizeof (Elf64_Phdr); + if (unlikely (phnum > SIZE_MAX / phdr_size)) + return DWFL_E_NOMEM; + const size_t phdrs_bytes = phnum * phdr_size; + void *phdrs = malloc (phdrs_bytes); + if (unlikely (phdrs == NULL)) + return DWFL_E_NOMEM; + dst.d_buf = phdrs; + dst.d_size = phdrs_bytes; if (unlikely (gelf_xlatetom (mod->main.elf, &dst, &src, ehdr.e32.e_ident[EI_DATA]) == NULL)) - return DWFL_E_LIBELF; - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) { + free (phdrs); + return DWFL_E_LIBELF; + } + if (class32) + { + Elf32_Phdr (*p32)[phnum] = phdrs; for (uint_fast16_t i = 0; i < phnum; ++i) - if (phdr.p32[i].p_type == PT_INTERP) + if ((*p32)[i].p_type == PT_INTERP) { - undo_interp = phdr.p32[i].p_vaddr; + undo_interp = (*p32)[i].p_vaddr; break; } } else { + Elf64_Phdr (*p64)[phnum] = phdrs; for (uint_fast16_t i = 0; i < phnum; ++i) - if (phdr.p64[i].p_type == PT_INTERP) + if ((*p64)[i].p_type == PT_INTERP) { - undo_interp = phdr.p64[i].p_vaddr; + undo_interp = (*p64)[i].p_vaddr; break; } } + free (phdrs); } if (unlikely ((main_interp == 0) != (undo_interp == 0))) @@ -405,16 +432,21 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) src.d_type = ELF_T_SHDR; src.d_size = gelf_fsize (mod->main.elf, ELF_T_SHDR, shnum - 1, EV_CURRENT); - union - { - Elf32_Shdr s32[shnum - 1]; - Elf64_Shdr s64[shnum - 1]; - } shdr; - dst.d_buf = &shdr; - dst.d_size = sizeof shdr; + size_t shdr_size = class32 ? sizeof (Elf32_Shdr) : sizeof (Elf64_Shdr); + if (unlikely (shnum - 1 > SIZE_MAX / shdr_size)) + return DWFL_E_NOMEM; + const size_t shdrs_bytes = (shnum - 1) * shdr_size; + void *shdrs = malloc (shdrs_bytes); + if (unlikely (shdrs == NULL)) + return DWFL_E_NOMEM; + dst.d_buf = shdrs; + dst.d_size = shdrs_bytes; if (unlikely (gelf_xlatetom (mod->main.elf, &dst, &src, ehdr.e32.e_ident[EI_DATA]) == NULL)) - return DWFL_E_LIBELF; + { + free (shdrs); + return DWFL_E_LIBELF; + } /* Now we can look at the original section headers of the main file before it was prelinked. First we'll apply our method to the main @@ -434,22 +466,6 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) GElf_Addr highest; - inline void consider_shdr (GElf_Addr interp, - GElf_Word sh_type, - GElf_Xword sh_flags, - GElf_Addr sh_addr, - GElf_Xword sh_size) - { - if ((sh_flags & SHF_ALLOC) - && ((sh_type == SHT_PROGBITS && sh_addr != interp) - || sh_type == SHT_NOBITS)) - { - const GElf_Addr sh_end = sh_addr + sh_size; - if (sh_end > highest) - highest = sh_end; - } - } - highest = 0; scn = NULL; while ((scn = elf_nextscn (mod->main.elf, scn)) != NULL) @@ -457,30 +473,46 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) GElf_Shdr sh_mem; GElf_Shdr *sh = gelf_getshdr (scn, &sh_mem); if (unlikely (sh == NULL)) - return DWFL_E_LIBELF; + { + free (shdrs); + return DWFL_E_LIBELF; + } consider_shdr (main_interp, sh->sh_type, sh->sh_flags, - sh->sh_addr, sh->sh_size); + sh->sh_addr, sh->sh_size, &highest); } if (highest > mod->main.vaddr) { mod->main.address_sync = highest; highest = 0; - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) - for (size_t i = 0; i < shnum - 1; ++i) - consider_shdr (undo_interp, shdr.s32[i].sh_type, shdr.s32[i].sh_flags, - shdr.s32[i].sh_addr, shdr.s32[i].sh_size); + if (class32) + { + Elf32_Shdr (*s32)[shnum - 1] = shdrs; + for (size_t i = 0; i < shnum - 1; ++i) + consider_shdr (undo_interp, (*s32)[i].sh_type, + (*s32)[i].sh_flags, (*s32)[i].sh_addr, + (*s32)[i].sh_size, &highest); + } else - for (size_t i = 0; i < shnum - 1; ++i) - consider_shdr (undo_interp, shdr.s64[i].sh_type, shdr.s64[i].sh_flags, - shdr.s64[i].sh_addr, shdr.s64[i].sh_size); + { + Elf64_Shdr (*s64)[shnum - 1] = shdrs; + for (size_t i = 0; i < shnum - 1; ++i) + consider_shdr (undo_interp, (*s64)[i].sh_type, + (*s64)[i].sh_flags, (*s64)[i].sh_addr, + (*s64)[i].sh_size, &highest); + } if (highest > file->vaddr) file->address_sync = highest; else - return DWFL_E_BAD_PRELINK; + { + free (shdrs); + return DWFL_E_BAD_PRELINK; + } } + free (shdrs); + return DWFL_E_NOERROR; } @@ -575,6 +607,8 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile, switch (shdr->sh_type) { case SHT_SYMTAB: + if (shdr->sh_entsize == 0) + break; symtab = true; *symscn = scn; *symfile = file; @@ -589,6 +623,8 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile, if (symtab) break; /* Use this if need be, but keep looking for SHT_SYMTAB. */ + if (shdr->sh_entsize == 0) + break; *symscn = scn; *symfile = file; *strshndx = shdr->sh_link; @@ -621,7 +657,7 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile, /* Translate addresses into file offsets. OFFS[*] start out zero and remain zero if unresolved. */ static void -find_offsets (Elf *elf, size_t phnum, size_t n, +find_offsets (Elf *elf, GElf_Addr main_bias, size_t phnum, size_t n, GElf_Addr addrs[n], GElf_Off offs[n]) { size_t unsolved = n; @@ -632,16 +668,151 @@ find_offsets (Elf *elf, size_t phnum, size_t n, if (phdr != NULL && phdr->p_type == PT_LOAD && phdr->p_memsz > 0) for (size_t j = 0; j < n; ++j) if (offs[j] == 0 - && addrs[j] >= phdr->p_vaddr - && addrs[j] - phdr->p_vaddr < phdr->p_filesz) + && addrs[j] >= phdr->p_vaddr + main_bias + && addrs[j] - (phdr->p_vaddr + main_bias) < phdr->p_filesz) { - offs[j] = addrs[j] - phdr->p_vaddr + phdr->p_offset; + offs[j] = addrs[j] - (phdr->p_vaddr + main_bias) + phdr->p_offset; if (--unsolved == 0) break; } } } +/* Various addresses we might want to pull from the dynamic segment. */ +enum +{ + i_symtab, + i_strtab, + i_hash, + i_gnu_hash, + i_max +}; + +/* Translate pointers into file offsets. ADJUST is either zero + in case the dynamic segment wasn't adjusted or mod->main_bias. + Will set mod->symfile if the translated offsets can be used as + symbol table. */ +static void +translate_offs (GElf_Addr adjust, + Dwfl_Module *mod, size_t phnum, + GElf_Addr addrs[i_max], GElf_Xword strsz, + GElf_Ehdr *ehdr) +{ + GElf_Off offs[i_max] = { 0, }; + find_offsets (mod->main.elf, adjust, phnum, i_max, addrs, offs); + + /* Figure out the size of the symbol table. */ + if (offs[i_hash] != 0) + { + /* In the original format, .hash says the size of .dynsym. */ + + size_t entsz = SH_ENTSIZE_HASH (ehdr); + Elf_Data *data = elf_getdata_rawchunk (mod->main.elf, + offs[i_hash] + entsz, entsz, + (entsz == 4 + ? ELF_T_WORD : ELF_T_XWORD)); + if (data != NULL) + mod->syments = (entsz == 4 + ? *(const GElf_Word *) data->d_buf + : *(const GElf_Xword *) data->d_buf); + } + if (offs[i_gnu_hash] != 0 && mod->syments == 0) + { + /* In the new format, we can derive it with some work. */ + + const struct + { + Elf32_Word nbuckets; + Elf32_Word symndx; + Elf32_Word maskwords; + Elf32_Word shift2; + } *header; + + Elf_Data *data = elf_getdata_rawchunk (mod->main.elf, offs[i_gnu_hash], + sizeof *header, ELF_T_WORD); + if (data != NULL) + { + header = data->d_buf; + Elf32_Word nbuckets = header->nbuckets; + Elf32_Word symndx = header->symndx; + GElf_Off buckets_at = (offs[i_gnu_hash] + sizeof *header + + (gelf_getclass (mod->main.elf) + * sizeof (Elf32_Word) + * header->maskwords)); + + // elf_getdata_rawchunk takes a size_t, make sure it + // doesn't overflow. +#if SIZE_MAX <= UINT32_MAX + if (nbuckets > SIZE_MAX / sizeof (Elf32_Word)) + data = NULL; + else +#endif + data = elf_getdata_rawchunk (mod->main.elf, buckets_at, + nbuckets * sizeof (Elf32_Word), + ELF_T_WORD); + if (data != NULL && symndx < nbuckets) + { + const Elf32_Word *const buckets = data->d_buf; + Elf32_Word maxndx = symndx; + for (Elf32_Word bucket = 0; bucket < nbuckets; ++bucket) + if (buckets[bucket] > maxndx) + maxndx = buckets[bucket]; + + GElf_Off hasharr_at = (buckets_at + + nbuckets * sizeof (Elf32_Word)); + hasharr_at += (maxndx - symndx) * sizeof (Elf32_Word); + do + { + data = elf_getdata_rawchunk (mod->main.elf, + hasharr_at, + sizeof (Elf32_Word), + ELF_T_WORD); + if (data != NULL + && (*(const Elf32_Word *) data->d_buf & 1u)) + { + mod->syments = maxndx + 1; + break; + } + ++maxndx; + hasharr_at += sizeof (Elf32_Word); + } + while (data != NULL); + } + } + } + if (offs[i_strtab] > offs[i_symtab] && mod->syments == 0) + mod->syments = ((offs[i_strtab] - offs[i_symtab]) + / gelf_fsize (mod->main.elf, + ELF_T_SYM, 1, EV_CURRENT)); + + if (mod->syments > 0) + { + mod->symdata = elf_getdata_rawchunk (mod->main.elf, + offs[i_symtab], + gelf_fsize (mod->main.elf, + ELF_T_SYM, + mod->syments, + EV_CURRENT), + ELF_T_SYM); + if (mod->symdata != NULL) + { + mod->symstrdata = elf_getdata_rawchunk (mod->main.elf, + offs[i_strtab], + strsz, + ELF_T_BYTE); + if (mod->symstrdata == NULL) + mod->symdata = NULL; + } + if (mod->symdata == NULL) + mod->symerr = DWFL_E (LIBELF, elf_errno ()); + else + { + mod->symfile = &mod->main; + mod->symerr = DWFL_E_NOERROR; + } + } +} + /* Try to find a dynamic symbol table via phdrs. */ static void find_dynsym (Dwfl_Module *mod) @@ -670,14 +841,6 @@ find_dynsym (Dwfl_Module *mod) if (data == NULL) continue; - enum - { - i_symtab, - i_strtab, - i_hash, - i_gnu_hash, - i_max - }; GElf_Addr addrs[i_max] = { 0, }; GElf_Xword strsz = 0; size_t n = data->d_size / gelf_fsize (mod->main.elf, @@ -718,113 +881,14 @@ find_dynsym (Dwfl_Module *mod) break; } - /* Translate pointers into file offsets. */ - GElf_Off offs[i_max] = { 0, }; - find_offsets (mod->main.elf, phnum, i_max, addrs, offs); - - /* Figure out the size of the symbol table. */ - if (offs[i_hash] != 0) - { - /* In the original format, .hash says the size of .dynsym. */ - - size_t entsz = SH_ENTSIZE_HASH (ehdr); - data = elf_getdata_rawchunk (mod->main.elf, - offs[i_hash] + entsz, entsz, - entsz == 4 ? ELF_T_WORD - : ELF_T_XWORD); - if (data != NULL) - mod->syments = (entsz == 4 - ? *(const GElf_Word *) data->d_buf - : *(const GElf_Xword *) data->d_buf); - } - if (offs[i_gnu_hash] != 0 && mod->syments == 0) - { - /* In the new format, we can derive it with some work. */ - - const struct - { - Elf32_Word nbuckets; - Elf32_Word symndx; - Elf32_Word maskwords; - Elf32_Word shift2; - } *header; - - data = elf_getdata_rawchunk (mod->main.elf, offs[i_gnu_hash], - sizeof *header, ELF_T_WORD); - if (data != NULL) - { - header = data->d_buf; - Elf32_Word nbuckets = header->nbuckets; - Elf32_Word symndx = header->symndx; - GElf_Off buckets_at = (offs[i_gnu_hash] + sizeof *header - + (gelf_getclass (mod->main.elf) - * sizeof (Elf32_Word) - * header->maskwords)); - - data = elf_getdata_rawchunk (mod->main.elf, buckets_at, - nbuckets * sizeof (Elf32_Word), - ELF_T_WORD); - if (data != NULL && symndx < nbuckets) - { - const Elf32_Word *const buckets = data->d_buf; - Elf32_Word maxndx = symndx; - for (Elf32_Word bucket = 0; bucket < nbuckets; ++bucket) - if (buckets[bucket] > maxndx) - maxndx = buckets[bucket]; - - GElf_Off hasharr_at = (buckets_at - + nbuckets * sizeof (Elf32_Word)); - hasharr_at += (maxndx - symndx) * sizeof (Elf32_Word); - do - { - data = elf_getdata_rawchunk (mod->main.elf, - hasharr_at, - sizeof (Elf32_Word), - ELF_T_WORD); - if (data != NULL - && (*(const Elf32_Word *) data->d_buf & 1u)) - { - mod->syments = maxndx + 1; - break; - } - ++maxndx; - hasharr_at += sizeof (Elf32_Word); - } while (data != NULL); - } - } - } - if (offs[i_strtab] > offs[i_symtab] && mod->syments == 0) - mod->syments = ((offs[i_strtab] - offs[i_symtab]) - / gelf_fsize (mod->main.elf, - ELF_T_SYM, 1, EV_CURRENT)); + /* First try unadjusted, like ELF files from disk, vdso. + Then try for already adjusted dynamic section, like ELF + from remote memory. */ + translate_offs (0, mod, phnum, addrs, strsz, ehdr); + if (mod->symfile == NULL) + translate_offs (mod->main_bias, mod, phnum, addrs, strsz, ehdr); - if (mod->syments > 0) - { - mod->symdata = elf_getdata_rawchunk (mod->main.elf, - offs[i_symtab], - gelf_fsize (mod->main.elf, - ELF_T_SYM, - mod->syments, - EV_CURRENT), - ELF_T_SYM); - if (mod->symdata != NULL) - { - mod->symstrdata = elf_getdata_rawchunk (mod->main.elf, - offs[i_strtab], - strsz, - ELF_T_BYTE); - if (mod->symstrdata == NULL) - mod->symdata = NULL; - } - if (mod->symdata == NULL) - mod->symerr = DWFL_E (LIBELF, elf_errno ()); - else - { - mod->symfile = &mod->main; - mod->symerr = DWFL_E_NOERROR; - } - return; - } + return; } } } @@ -1059,28 +1123,83 @@ find_symtab (Dwfl_Module *mod) if (elf_strptr (mod->symfile->elf, strshndx, 0) == NULL) { elferr: + mod->symdata = NULL; + mod->syments = 0; + mod->first_global = 0; mod->symerr = DWFL_E (LIBELF, elf_errno ()); - goto aux_cleanup; + goto aux_cleanup; /* This cleans up some more and tries find_dynsym. */ } - /* Cache the data; MOD->syments and MOD->first_global were set above. */ + /* Cache the data; MOD->syments and MOD->first_global were set + above. If any of the sections is compressed, uncompress it + first. Only the string data setion could theoretically be + compressed GNU style (as .zdebug_str). Everything else only ELF + gabi style (SHF_COMPRESSED). */ + + Elf_Scn *symstrscn = elf_getscn (mod->symfile->elf, strshndx); + if (symstrscn == NULL) + goto elferr; - mod->symstrdata = elf_getdata (elf_getscn (mod->symfile->elf, strshndx), - NULL); - if (mod->symstrdata == NULL) + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (symstrscn, &shdr_mem); + if (shdr == NULL) + goto elferr; + + size_t shstrndx; + if (elf_getshdrstrndx (mod->symfile->elf, &shstrndx) < 0) + goto elferr; + + const char *sname = elf_strptr (mod->symfile->elf, shstrndx, shdr->sh_name); + if (sname == NULL) + goto elferr; + + if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + /* Try to uncompress, but it might already have been, an error + might just indicate, already uncompressed. */ + elf_compress_gnu (symstrscn, 0, 0); + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (symstrscn, 0, 0) < 0) + goto elferr; + + mod->symstrdata = elf_getdata (symstrscn, NULL); + if (mod->symstrdata == NULL || mod->symstrdata->d_buf == NULL) goto elferr; if (xndxscn == NULL) mod->symxndxdata = NULL; else { + shdr = gelf_getshdr (xndxscn, &shdr_mem); + if (shdr == NULL) + goto elferr; + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (xndxscn, 0, 0) < 0) + goto elferr; + mod->symxndxdata = elf_getdata (xndxscn, NULL); - if (mod->symxndxdata == NULL) + if (mod->symxndxdata == NULL || mod->symxndxdata->d_buf == NULL) goto elferr; } + shdr = gelf_getshdr (symscn, &shdr_mem); + if (shdr == NULL) + goto elferr; + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (symscn, 0, 0) < 0) + goto elferr; + mod->symdata = elf_getdata (symscn, NULL); - if (mod->symdata == NULL) + if (mod->symdata == NULL || mod->symdata->d_buf == NULL) + goto elferr; + + // Sanity check number of symbols. + shdr = gelf_getshdr (symscn, &shdr_mem); + if (shdr == NULL || shdr->sh_entsize == 0 + || mod->syments > mod->symdata->d_size / shdr->sh_entsize + || (size_t) mod->first_global > mod->syments) goto elferr; /* Cache any auxiliary symbol info, when it fails, just ignore aux_sym. */ @@ -1094,26 +1213,76 @@ find_symtab (Dwfl_Module *mod) mod->aux_syments = 0; elf_end (mod->aux_sym.elf); mod->aux_sym.elf = NULL; + /* We thought we had something through shdrs, but it failed... + Last ditch, look for dynamic symbols without section headers. */ + find_dynsym (mod); return; } - mod->aux_symstrdata = elf_getdata (elf_getscn (mod->aux_sym.elf, - aux_strshndx), - NULL); - if (mod->aux_symstrdata == NULL) + Elf_Scn *aux_strscn = elf_getscn (mod->aux_sym.elf, aux_strshndx); + if (aux_strscn == NULL) + goto elferr; + + shdr = gelf_getshdr (aux_strscn, &shdr_mem); + if (shdr == NULL) + goto elferr; + + size_t aux_shstrndx; + if (elf_getshdrstrndx (mod->aux_sym.elf, &aux_shstrndx) < 0) + goto elferr; + + sname = elf_strptr (mod->aux_sym.elf, aux_shstrndx, + shdr->sh_name); + if (sname == NULL) + goto elferr; + + if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + /* Try to uncompress, but it might already have been, an error + might just indicate, already uncompressed. */ + elf_compress_gnu (aux_strscn, 0, 0); + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (aux_strscn, 0, 0) < 0) + goto elferr; + + mod->aux_symstrdata = elf_getdata (aux_strscn, NULL); + if (mod->aux_symstrdata == NULL || mod->aux_symstrdata->d_buf == NULL) goto aux_cleanup; if (aux_xndxscn == NULL) mod->aux_symxndxdata = NULL; else { + shdr = gelf_getshdr (aux_xndxscn, &shdr_mem); + if (shdr == NULL) + goto elferr; + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (aux_xndxscn, 0, 0) < 0) + goto elferr; + mod->aux_symxndxdata = elf_getdata (aux_xndxscn, NULL); - if (mod->aux_symxndxdata == NULL) + if (mod->aux_symxndxdata == NULL + || mod->aux_symxndxdata->d_buf == NULL) goto aux_cleanup; } + shdr = gelf_getshdr (aux_symscn, &shdr_mem); + if (shdr == NULL) + goto elferr; + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (aux_symscn, 0, 0) < 0) + goto elferr; + mod->aux_symdata = elf_getdata (aux_symscn, NULL); - if (mod->aux_symdata == NULL) + if (mod->aux_symdata == NULL || mod->aux_symdata->d_buf == NULL) + goto aux_cleanup; + + // Sanity check number of aux symbols. + shdr = gelf_getshdr (aux_symscn, &shdr_mem); + if (mod->aux_syments > mod->aux_symdata->d_size / shdr->sh_entsize + || (size_t) mod->aux_first_global > mod->aux_syments) goto aux_cleanup; } } diff --git a/libdwfl/dwfl_module_getsrc.c b/libdwfl/dwfl_module_getsrc.c index cf8dc0f..f7e340b 100644 --- a/libdwfl/dwfl_module_getsrc.c +++ b/libdwfl/dwfl_module_getsrc.c @@ -1,5 +1,5 @@ /* Find source location for PC address in module. - Copyright (C) 2005, 2008 Red Hat, Inc. + Copyright (C) 2005, 2008, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -42,32 +42,35 @@ dwfl_module_getsrc (Dwfl_Module *mod, Dwarf_Addr addr) error = __libdwfl_cu_getsrclines (cu); if (likely (error == DWFL_E_NOERROR)) { - /* Now we look at the module-relative address. */ - addr -= bias; - - /* The lines are sorted by address, so we can use binary search. */ - size_t l = 0, u = cu->die.cu->lines->nlines; - while (l < u) + Dwarf_Lines *lines = cu->die.cu->lines; + size_t nlines = lines->nlines; + if (nlines > 0) { - size_t idx = (l + u) / 2; - if (addr < cu->die.cu->lines->info[idx].addr) - u = idx; - else if (addr > cu->die.cu->lines->info[idx].addr) - l = idx + 1; - else - return &cu->lines->idx[idx]; - } + /* This is guaranteed for us by libdw read_srclines. */ + assert(lines->info[nlines - 1].end_sequence); - if (cu->die.cu->lines->nlines > 0) - assert (cu->die.cu->lines->info - [cu->die.cu->lines->nlines - 1].end_sequence); + /* Now we look at the module-relative address. */ + addr -= bias; - /* If none were equal, the closest one below is what we want. - We never want the last one, because it's the end-sequence - marker with an address at the high bound of the CU's code. */ - if (u > 0 && u < cu->die.cu->lines->nlines - && addr > cu->die.cu->lines->info[u - 1].addr) - return &cu->lines->idx[u - 1]; + /* The lines are sorted by address, so we can use binary search. */ + size_t l = 0, u = nlines - 1; + while (l < u) + { + size_t idx = u - (u - l) / 2; + Dwarf_Line *line = &lines->info[idx]; + if (addr < line->addr) + u = idx - 1; + else + l = idx; + } + + /* The last line which is less than or equal to addr is what + we want, unless it is the end_sequence which is after the + current line sequence. */ + Dwarf_Line *line = &lines->info[l]; + if (! line->end_sequence && line->addr <= addr) + return &cu->lines->idx[l]; + } error = DWFL_E_ADDR_OUTOFRANGE; } diff --git a/libdwfl/dwfl_module_getsrc_file.c b/libdwfl/dwfl_module_getsrc_file.c index 20aa8a5..21a5915 100644 --- a/libdwfl/dwfl_module_getsrc_file.c +++ b/libdwfl/dwfl_module_getsrc_file.c @@ -30,6 +30,24 @@ #include "../libdw/libdwP.h" +static inline const char * +dwfl_dwarf_line_file (const Dwarf_Line *line) +{ + return line->files->info[line->file].name; +} + +static inline Dwarf_Line * +dwfl_line (const Dwfl_Line *line) +{ + return &dwfl_linecu (line)->die.cu->lines->info[line->idx]; +} + +static inline const char * +dwfl_line_file (const Dwfl_Line *line) +{ + return dwfl_dwarf_line_file (dwfl_line (line)); +} + int dwfl_module_getsrc_file (Dwfl_Module *mod, const char *fname, int lineno, int column, @@ -58,19 +76,6 @@ dwfl_module_getsrc_file (Dwfl_Module *mod, && cu != NULL && (error = __libdwfl_cu_getsrclines (cu)) == DWFL_E_NOERROR) { - inline const char *INTUSE(dwarf_line_file) (const Dwarf_Line *line) - { - return line->files->info[line->file].name; - } - inline Dwarf_Line *dwfl_line (const Dwfl_Line *line) - { - return &dwfl_linecu (line)->die.cu->lines->info[line->idx]; - } - inline const char *dwfl_line_file (const Dwfl_Line *line) - { - return INTUSE(dwarf_line_file) (dwfl_line (line)); - } - /* Search through all the line number records for a matching file and line/column number. If any of the numbers is zero, no match is performed. */ @@ -87,7 +92,7 @@ dwfl_module_getsrc_file (Dwfl_Module *mod, } else { - const char *file = INTUSE(dwarf_line_file) (line); + const char *file = dwfl_dwarf_line_file (line); if (file != lastfile) { /* Match the name with the name the user provided. */ @@ -110,7 +115,7 @@ dwfl_module_getsrc_file (Dwfl_Module *mod, size_t inner; for (inner = 0; inner < cur_match; ++inner) if (dwfl_line_file (match[inner]) - == INTUSE(dwarf_line_file) (line)) + == dwfl_dwarf_line_file (line)) break; if (inner < cur_match && (dwfl_line (match[inner])->line != line->line diff --git a/libdwfl/dwfl_module_register_names.c b/libdwfl/dwfl_module_register_names.c index 2da4b53..18fed37 100644 --- a/libdwfl/dwfl_module_register_names.c +++ b/libdwfl/dwfl_module_register_names.c @@ -30,12 +30,11 @@ int -dwfl_module_register_names (mod, func, arg) - Dwfl_Module *mod; - int (*func) (void *, int regno, const char *setname, - const char *prefix, const char *regname, - int bits, int type); - void *arg; +dwfl_module_register_names (Dwfl_Module *mod, + int (*func) (void *, int, const char *, + const char *, const char *, + int, int), + void *arg) { if (unlikely (mod == NULL)) return -1; diff --git a/libdwfl/dwfl_module_return_value_location.c b/libdwfl/dwfl_module_return_value_location.c index ad83cbf..29da61f 100644 --- a/libdwfl/dwfl_module_return_value_location.c +++ b/libdwfl/dwfl_module_return_value_location.c @@ -30,10 +30,8 @@ int -dwfl_module_return_value_location (mod, functypedie, locops) - Dwfl_Module *mod; - Dwarf_Die *functypedie; - const Dwarf_Op **locops; +dwfl_module_return_value_location (Dwfl_Module *mod, Dwarf_Die *functypedie, + const Dwarf_Op **locops) { if (mod == NULL) return -1; diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index 3a4ae2e..1c6e401 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -291,7 +291,7 @@ dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, if (fd < 0) { closefd = true; - fd = open64 (file_name, O_RDONLY); + fd = open (file_name, O_RDONLY); if (fd < 0) { __libdwfl_seterrno (DWFL_E_ERRNO); @@ -321,7 +321,7 @@ dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, INTDEF (dwfl_report_elf) NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156) -#ifdef SHARED +#ifdef SYMBOL_VERSIONING Dwfl_Module * _compat_without_add_p_vaddr_dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c index dfecb51..40553c9 100644 --- a/libdwfl/dwfl_segment_report_module.c +++ b/libdwfl/dwfl_segment_report_module.c @@ -1,5 +1,5 @@ /* Sniff out modules from ELF headers visible in memory segments. - Copyright (C) 2008-2012 Red Hat, Inc. + Copyright (C) 2008-2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -30,14 +30,15 @@ #include "../libelf/libelfP.h" /* For NOTE_ALIGN. */ #undef _ #include "libdwflP.h" +#include "common.h" #include #include #include #include -#include #include #include +#include /* A good size for the initial read from memory, if it's not too costly. @@ -52,6 +53,10 @@ # define MY_ELFDATA ELFDATA2MSB #endif +#ifndef MAX +# define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + /* Return user segment index closest to ADDR but not above it. If NEXT, return the closest to ADDR but not below it. */ @@ -79,12 +84,164 @@ addr_segndx (Dwfl *dwfl, size_t segment, GElf_Addr addr, bool next) return ndx; } +/* Return whether there is SZ bytes available at PTR till END. */ + +static bool +buf_has_data (const void *ptr, const void *end, size_t sz) +{ + return ptr < end && (size_t) (end - ptr) >= sz; +} + +/* Read SZ bytes into *RETP from *PTRP (limited by END) in format EI_DATA. + Function comes from src/readelf.c . */ + +static bool +buf_read_ulong (unsigned char ei_data, size_t sz, + const void **ptrp, const void *end, uint64_t *retp) +{ + if (! buf_has_data (*ptrp, end, sz)) + return false; + + union + { + uint64_t u64; + uint32_t u32; + } u; + + memcpy (&u, *ptrp, sz); + (*ptrp) += sz; + + if (retp == NULL) + return true; + + if (MY_ELFDATA != ei_data) + { + if (sz == 4) + CONVERT (u.u32); + else + CONVERT (u.u64); + } + if (sz == 4) + *retp = u.u32; + else + *retp = u.u64; + return true; +} + +/* Try to find matching entry for module from address MODULE_START to + MODULE_END in NT_FILE note located at NOTE_FILE of NOTE_FILE_SIZE + bytes in format EI_CLASS and EI_DATA. */ + +static const char * +handle_file_note (GElf_Addr module_start, GElf_Addr module_end, + unsigned char ei_class, unsigned char ei_data, + const void *note_file, size_t note_file_size) +{ + if (note_file == NULL) + return NULL; + + size_t sz; + switch (ei_class) + { + case ELFCLASS32: + sz = 4; + break; + case ELFCLASS64: + sz = 8; + break; + default: + return NULL; + } + + const void *ptr = note_file; + const void *end = note_file + note_file_size; + uint64_t count; + if (! buf_read_ulong (ei_data, sz, &ptr, end, &count)) + return NULL; + if (! buf_read_ulong (ei_data, sz, &ptr, end, NULL)) // page_size + return NULL; + + uint64_t maxcount = (size_t) (end - ptr) / (3 * sz); + if (count > maxcount) + return NULL; + + /* Where file names are stored. */ + const char *fptr = ptr + 3 * count * sz; + + ssize_t firstix = -1; + ssize_t lastix = -1; + for (size_t mix = 0; mix < count; mix++) + { + uint64_t mstart, mend, moffset; + if (! buf_read_ulong (ei_data, sz, &ptr, fptr, &mstart) + || ! buf_read_ulong (ei_data, sz, &ptr, fptr, &mend) + || ! buf_read_ulong (ei_data, sz, &ptr, fptr, &moffset)) + return NULL; + if (mstart == module_start && moffset == 0) + firstix = lastix = mix; + if (firstix != -1 && mstart < module_end) + lastix = mix; + if (mend >= module_end) + break; + } + if (firstix == -1) + return NULL; + + const char *retval = NULL; + for (ssize_t mix = 0; mix <= lastix; mix++) + { + const char *fnext = memchr (fptr, 0, (const char *) end - fptr); + if (fnext == NULL) + return NULL; + if (mix == firstix) + retval = fptr; + if (firstix < mix && mix <= lastix && strcmp (fptr, retval) != 0) + return NULL; + fptr = fnext + 1; + } + return retval; +} + +/* Return true iff we are certain ELF cannot match BUILD_ID of + BUILD_ID_LEN bytes. Pass DISK_FILE_HAS_BUILD_ID as false if it is + certain ELF does not contain build-id (it is only a performance hit + to pass it always as true). */ + +static bool +invalid_elf (Elf *elf, bool disk_file_has_build_id, + const void *build_id, size_t build_id_len) +{ + if (! disk_file_has_build_id && build_id_len > 0) + { + /* Module found in segments with build-id is more reliable + than a module found via DT_DEBUG on disk without any + build-id. */ + return true; + } + if (disk_file_has_build_id && build_id_len > 0) + { + const void *elf_build_id; + ssize_t elf_build_id_len; + + /* If there is a build id in the elf file, check it. */ + elf_build_id_len = INTUSE(dwelf_elf_gnu_build_id) (elf, &elf_build_id); + if (elf_build_id_len > 0) + { + if (build_id_len != (size_t) elf_build_id_len + || memcmp (build_id, elf_build_id, build_id_len) != 0) + return true; + } + } + return false; +} + int dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, Dwfl_Memory_Callback *memory_callback, void *memory_callback_arg, Dwfl_Module_Callback *read_eagerly, void *read_eagerly_arg, + const void *note_file, size_t note_file_size, const struct r_debug_info *r_debug_info) { size_t segment = ndx; @@ -121,10 +278,21 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, void *buffer = NULL; size_t buffer_available = INITIAL_READ; + Elf *elf = NULL; + int fd = -1; + + /* We might have to reserve some memory for the phdrs. Set to NULL + here so we can always safely free it. */ + void *phdrsp = NULL; inline int finish (void) { + free (phdrsp); release_buffer (&buffer, &buffer_available); + if (elf != NULL) + elf_end (elf); + if (fd != -1) + close (fd); return ndx; } @@ -161,6 +329,10 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, } /* Extract the information we need from the file header. */ + const unsigned char *e_ident; + unsigned char ei_class; + unsigned char ei_data; + uint16_t e_type; union { Elf32_Ehdr e32; @@ -183,13 +355,16 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, .d_size = sizeof ehdr, .d_version = EV_CURRENT, }; - switch (((const unsigned char *) buffer)[EI_CLASS]) + e_ident = ((const unsigned char *) buffer); + ei_class = e_ident[EI_CLASS]; + ei_data = e_ident[EI_DATA]; + switch (ei_class) { case ELFCLASS32: xlatefrom.d_size = sizeof (Elf32_Ehdr); - if (elf32_xlatetom (&xlateto, &xlatefrom, - ((const unsigned char *) buffer)[EI_DATA]) == NULL) + if (elf32_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL) return finish (); + e_type = ehdr.e32.e_type; phoff = ehdr.e32.e_phoff; phnum = ehdr.e32.e_phnum; phentsize = ehdr.e32.e_phentsize; @@ -200,9 +375,9 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, case ELFCLASS64: xlatefrom.d_size = sizeof (Elf64_Ehdr); - if (elf64_xlatetom (&xlateto, &xlatefrom, - ((const unsigned char *) buffer)[EI_DATA]) == NULL) + if (elf64_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL) return finish (); + e_type = ehdr.e64.e_type; phoff = ehdr.e64.e_phoff; phnum = ehdr.e64.e_phnum; phentsize = ehdr.e64.e_phentsize; @@ -233,14 +408,17 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, xlatefrom.d_buf = ph_buffer; - union - { - Elf32_Phdr p32[phnum]; - Elf64_Phdr p64[phnum]; - } phdrs; + bool class32 = ei_class == ELFCLASS32; + size_t phdr_size = class32 ? sizeof (Elf32_Phdr) : sizeof (Elf64_Phdr); + if (unlikely (phnum > SIZE_MAX / phdr_size)) + return finish (); + const size_t phdrsp_bytes = phnum * phdr_size; + phdrsp = malloc (phdrsp_bytes); + if (unlikely (phdrsp == NULL)) + return finish (); - xlateto.d_buf = &phdrs; - xlateto.d_size = sizeof phdrs; + xlateto.d_buf = phdrsp; + xlateto.d_size = phdrsp_bytes; /* Track the bounds of the file visible in memory. */ GElf_Off file_trimmed_end = 0; /* Proper p_vaddr + p_filesz end. */ @@ -281,7 +459,7 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr)); void *notes; - if (ehdr.e32.e_ident[EI_DATA] == MY_ELFDATA) + if (ei_data == MY_ELFDATA) notes = data; else { @@ -397,29 +575,30 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, break; } } - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) + + Elf32_Phdr (*p32)[phnum] = phdrsp; + Elf64_Phdr (*p64)[phnum] = phdrsp; + if (ei_class == ELFCLASS32) { - if (elf32_xlatetom (&xlateto, &xlatefrom, - ehdr.e32.e_ident[EI_DATA]) == NULL) + if (elf32_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL) found_bias = false; /* Trigger error check. */ else for (uint_fast16_t i = 0; i < phnum; ++i) - consider_phdr (phdrs.p32[i].p_type, - phdrs.p32[i].p_vaddr, phdrs.p32[i].p_memsz, - phdrs.p32[i].p_offset, phdrs.p32[i].p_filesz, - phdrs.p32[i].p_align); + consider_phdr ((*p32)[i].p_type, + (*p32)[i].p_vaddr, (*p32)[i].p_memsz, + (*p32)[i].p_offset, (*p32)[i].p_filesz, + (*p32)[i].p_align); } else { - if (elf64_xlatetom (&xlateto, &xlatefrom, - ehdr.e32.e_ident[EI_DATA]) == NULL) + if (elf64_xlatetom (&xlateto, &xlatefrom, ei_data) == NULL) found_bias = false; /* Trigger error check. */ else for (uint_fast16_t i = 0; i < phnum; ++i) - consider_phdr (phdrs.p64[i].p_type, - phdrs.p64[i].p_vaddr, phdrs.p64[i].p_memsz, - phdrs.p64[i].p_offset, phdrs.p64[i].p_filesz, - phdrs.p64[i].p_align); + consider_phdr ((*p64)[i].p_type, + (*p64)[i].p_vaddr, (*p64)[i].p_memsz, + (*p64)[i].p_offset, (*p64)[i].p_filesz, + (*p64)[i].p_align); } finish_portion (&ph_buffer, &ph_buffer_size); @@ -481,32 +660,9 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, if ((module_end > module->start && module_start < module->end) || dyn_vaddr == module->l_ld) { - bool close_elf = false; - if (! module->disk_file_has_build_id && build_id_len > 0) - { - /* Module found in segments with build-id is more reliable - than a module found via DT_DEBUG on disk without any - build-id. */ - if (module->elf != NULL) - close_elf = true; - } if (module->elf != NULL - && module->disk_file_has_build_id && build_id_len > 0) - { - const void *elf_build_id; - ssize_t elf_build_id_len; - - /* If there is a build id in the elf file, check it. */ - elf_build_id_len = INTUSE(dwelf_elf_gnu_build_id) (module->elf, - &elf_build_id); - if (elf_build_id_len > 0) - { - if (build_id_len != (size_t) elf_build_id_len - || memcmp (build_id, elf_build_id, build_id_len) != 0) - close_elf = true; - } - } - if (close_elf) + && invalid_elf (module->elf, module->disk_file_has_build_id, + build_id, build_id_len)) { elf_end (module->elf); close (module->fd); @@ -527,6 +683,34 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, } } + const char *file_note_name = handle_file_note (module_start, module_end, + ei_class, ei_data, + note_file, note_file_size); + if (file_note_name) + { + name = file_note_name; + name_is_final = true; + bool invalid = false; + fd = open (name, O_RDONLY); + if (fd >= 0) + { + Dwfl_Error error = __libdw_open_file (&fd, &elf, true, false); + if (error == DWFL_E_NOERROR) + invalid = invalid_elf (elf, true /* disk_file_has_build_id */, + build_id, build_id_len); + } + if (invalid) + { + /* The file was there, but the build_id didn't match. We + still want to report the module, but need to get the ELF + some other way if possible. */ + close (fd); + fd = -1; + elf_end (elf); + elf = NULL; + } + } + /* Our return value now says to skip the segments contained within the module. */ ndx = addr_segndx (dwfl, segment, module_end, true); @@ -568,47 +752,46 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, return soname_stroff != 0 && dynstr_vaddr != 0 && dynstrsz != 0; } - const size_t dyn_entsize = (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32 + const size_t dyn_entsize = (ei_class == ELFCLASS32 ? sizeof (Elf32_Dyn) : sizeof (Elf64_Dyn)); void *dyn_data = NULL; size_t dyn_data_size = 0; if (dyn_filesz != 0 && dyn_filesz % dyn_entsize == 0 && ! read_portion (&dyn_data, &dyn_data_size, dyn_vaddr, dyn_filesz)) { - union - { - Elf32_Dyn d32[dyn_filesz / sizeof (Elf32_Dyn)]; - Elf64_Dyn d64[dyn_filesz / sizeof (Elf64_Dyn)]; - } dyn; + void *dyns = malloc (dyn_filesz); + Elf32_Dyn (*d32)[dyn_filesz / sizeof (Elf32_Dyn)] = dyns; + Elf64_Dyn (*d64)[dyn_filesz / sizeof (Elf64_Dyn)] = dyns; + if (unlikely (dyns == NULL)) + return finish (); xlatefrom.d_type = xlateto.d_type = ELF_T_DYN; xlatefrom.d_buf = (void *) dyn_data; xlatefrom.d_size = dyn_filesz; - xlateto.d_buf = &dyn; - xlateto.d_size = sizeof dyn; + xlateto.d_buf = dyns; + xlateto.d_size = dyn_filesz; - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) + if (ei_class == ELFCLASS32) { - if (elf32_xlatetom (&xlateto, &xlatefrom, - ehdr.e32.e_ident[EI_DATA]) != NULL) - for (size_t i = 0; i < dyn_filesz / sizeof dyn.d32[0]; ++i) - if (consider_dyn (dyn.d32[i].d_tag, dyn.d32[i].d_un.d_val)) + if (elf32_xlatetom (&xlateto, &xlatefrom, ei_data) != NULL) + for (size_t i = 0; i < dyn_filesz / sizeof (Elf32_Dyn); ++i) + if (consider_dyn ((*d32)[i].d_tag, (*d32)[i].d_un.d_val)) break; } else { - if (elf64_xlatetom (&xlateto, &xlatefrom, - ehdr.e32.e_ident[EI_DATA]) != NULL) - for (size_t i = 0; i < dyn_filesz / sizeof dyn.d64[0]; ++i) - if (consider_dyn (dyn.d64[i].d_tag, dyn.d64[i].d_un.d_val)) + if (elf64_xlatetom (&xlateto, &xlatefrom, ei_data) != NULL) + for (size_t i = 0; i < dyn_filesz / sizeof (Elf64_Dyn); ++i) + if (consider_dyn ((*d64)[i].d_tag, (*d64)[i].d_un.d_val)) break; } + free (dyns); } finish_portion (&dyn_data, &dyn_data_size); /* We'll use the name passed in or a stupid default if not DT_SONAME. */ if (name == NULL) - name = ehdr.e32.e_type == ET_EXEC ? "[exe]" : execlike ? "[pie]" : "[dso]"; + name = e_type == ET_EXEC ? "[exe]" : execlike ? "[pie]" : "[dso]"; void *soname = NULL; size_t soname_size = 0; @@ -646,6 +829,12 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, Dwfl_Module *mod = INTUSE(dwfl_report_module) (dwfl, name, module_start, module_end); + + // !execlike && ET_EXEC is PIE. + // execlike && !ET_EXEC is a static executable. + if (mod != NULL && (execlike || ehdr.e32.e_type == ET_EXEC)) + mod->is_executable = true; + if (likely (mod != NULL) && build_id != NULL && unlikely (INTUSE(dwfl_module_report_build_id) (mod, build_id, @@ -677,10 +866,10 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, : dynstr_vaddr + dynstrsz - start); const GElf_Off whole = MAX (file_trimmed_end, shdrs_end); - Elf *elf = NULL; - if ((*read_eagerly) (MODCB_ARGS (mod), &buffer, &buffer_available, - cost, worthwhile, whole, contiguous, - read_eagerly_arg, &elf) + if (elf == NULL + && (*read_eagerly) (MODCB_ARGS (mod), &buffer, &buffer_available, + cost, worthwhile, whole, contiguous, + read_eagerly_arg, &elf) && elf == NULL) { /* The caller wants to read the whole file in right now, but hasn't @@ -710,14 +899,14 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, final_read (offset, vaddr + bias, filesz); } - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) + if (ei_class == ELFCLASS32) for (uint_fast16_t i = 0; i < phnum; ++i) - read_phdr (phdrs.p32[i].p_type, phdrs.p32[i].p_vaddr, - phdrs.p32[i].p_offset, phdrs.p32[i].p_filesz); + read_phdr ((*p32)[i].p_type, (*p32)[i].p_vaddr, + (*p32)[i].p_offset, (*p32)[i].p_filesz); else for (uint_fast16_t i = 0; i < phnum; ++i) - read_phdr (phdrs.p64[i].p_type, phdrs.p64[i].p_vaddr, - phdrs.p64[i].p_offset, phdrs.p64[i].p_filesz); + read_phdr ((*p64)[i].p_type, (*p64)[i].p_vaddr, + (*p64)[i].p_offset, (*p64)[i].p_filesz); } else { @@ -742,6 +931,8 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, { /* Install the file in the module. */ mod->main.elf = elf; + elf = NULL; + fd = -1; mod->main.vaddr = module_start - bias; mod->main.address_sync = module_address_sync; mod->main_bias = bias; diff --git a/libdwfl/dwfl_version.c b/libdwfl/dwfl_version.c index 9673a53..d1c5d91 100644 --- a/libdwfl/dwfl_version.c +++ b/libdwfl/dwfl_version.c @@ -29,8 +29,7 @@ #include "libdwflP.h" const char * -dwfl_version (dwfl) - Dwfl *dwfl __attribute__ ((unused)); +dwfl_version (Dwfl *dwfl __attribute__ ((unused))) { return PACKAGE_VERSION; } diff --git a/libdwfl/elf-from-memory.c b/libdwfl/elf-from-memory.c index df9fbe6..dd42e95 100644 --- a/libdwfl/elf-from-memory.c +++ b/libdwfl/elf-from-memory.c @@ -1,5 +1,5 @@ /* Reconstruct an ELF file by reading the segments out of remote memory. - Copyright (C) 2005-2011, 2014 Red Hat, Inc. + Copyright (C) 2005-2011, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -63,11 +63,15 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, size_t maxread), void *arg) { + /* We might have to reserve some memory for the phdrs. Set to NULL + here so we can always safely free it. */ + void *phdrsp = NULL; + /* First read in the file header and check its sanity. */ const size_t initial_bufsize = 256; unsigned char *buffer = malloc (initial_bufsize); - if (buffer == NULL) + if (unlikely (buffer == NULL)) { no_memory: __libdwfl_seterrno (DWFL_E_NOMEM); @@ -80,6 +84,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, { read_error: free (buffer); + free (phdrsp); __libdwfl_seterrno (nread < 0 ? DWFL_E_ERRNO : DWFL_E_TRUNCATED); return NULL; } @@ -88,6 +93,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, { bad_elf: free (buffer); + free (phdrsp); __libdwfl_seterrno (DWFL_E_BADELF); return NULL; } @@ -172,6 +178,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, if (newbuf == NULL) { free (buffer); + free (phdrsp); goto no_memory; } buffer = newbuf; @@ -184,14 +191,23 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, xlatefrom.d_buf = buffer; } - union - { - Elf32_Phdr p32[phnum]; - Elf64_Phdr p64[phnum]; - } phdrs; + bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; + size_t phdr_size = class32 ? sizeof (Elf32_Phdr) : sizeof (Elf64_Phdr); + if (unlikely (phnum > SIZE_MAX / phdr_size)) + { + free (buffer); + goto no_memory; + } + const size_t phdrsp_bytes = phnum * phdr_size; + phdrsp = malloc (phdrsp_bytes); + if (unlikely (phdrsp == NULL)) + { + free (buffer); + goto no_memory; + } - xlateto.d_buf = &phdrs; - xlateto.d_size = sizeof phdrs; + xlateto.d_buf = phdrsp; + xlateto.d_size = phdrsp_bytes; /* Scan for PT_LOAD segments to find the total size of the file image. */ size_t contents_size = 0; @@ -199,6 +215,8 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, GElf_Off segments_end_mem = 0; GElf_Addr loadbase = ehdr_vma; bool found_base = false; + Elf32_Phdr (*p32)[phnum] = phdrsp; + Elf64_Phdr (*p64)[phnum] = phdrsp; switch (ehdr.e32.e_ident[EI_CLASS]) { /* Sanity checks segments and calculates segment_end, @@ -206,12 +224,10 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, found_base yet). Returns true if sanity checking failed, false otherwise. */ inline bool handle_segment (GElf_Addr vaddr, GElf_Off offset, - GElf_Xword filesz, GElf_Xword memsz, - GElf_Xword palign) + GElf_Xword filesz, GElf_Xword memsz) { - /* Sanity check the alignment requirements. */ - if ((palign & (pagesize - 1)) != 0 - || ((vaddr - offset) & (palign - 1)) != 0) + /* Sanity check the segment load aligns with the pagesize. */ + if (((vaddr - offset) & (pagesize - 1)) != 0) return true; GElf_Off segment_end = ((offset + filesz + pagesize - 1) @@ -236,10 +252,9 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, ehdr.e32.e_ident[EI_DATA]) == NULL) goto libelf_error; for (uint_fast16_t i = 0; i < phnum; ++i) - if (phdrs.p32[i].p_type == PT_LOAD) - if (handle_segment (phdrs.p32[i].p_vaddr, phdrs.p32[i].p_offset, - phdrs.p32[i].p_filesz, phdrs.p32[i].p_memsz, - phdrs.p32[i].p_align)) + if ((*p32)[i].p_type == PT_LOAD) + if (handle_segment ((*p32)[i].p_vaddr, (*p32)[i].p_offset, + (*p32)[i].p_filesz, (*p32)[i].p_memsz)) goto bad_elf; break; @@ -248,10 +263,9 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, ehdr.e64.e_ident[EI_DATA]) == NULL) goto libelf_error; for (uint_fast16_t i = 0; i < phnum; ++i) - if (phdrs.p64[i].p_type == PT_LOAD) - if (handle_segment (phdrs.p64[i].p_vaddr, phdrs.p64[i].p_offset, - phdrs.p64[i].p_filesz, phdrs.p64[i].p_memsz, - phdrs.p64[i].p_align)) + if ((*p64)[i].p_type == PT_LOAD) + if (handle_segment ((*p64)[i].p_vaddr, (*p64)[i].p_offset, + (*p64)[i].p_filesz, (*p64)[i].p_memsz)) goto bad_elf; break; @@ -280,7 +294,10 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, /* Now we know the size of the whole image we want read in. */ buffer = calloc (1, contents_size); if (buffer == NULL) - goto no_memory; + { + free (phdrsp); + goto no_memory; + } switch (ehdr.e32.e_ident[EI_CLASS]) { @@ -301,9 +318,9 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, case ELFCLASS32: for (uint_fast16_t i = 0; i < phnum; ++i) - if (phdrs.p32[i].p_type == PT_LOAD) - if (handle_segment (phdrs.p32[i].p_vaddr, phdrs.p32[i].p_offset, - phdrs.p32[i].p_filesz)) + if ((*p32)[i].p_type == PT_LOAD) + if (handle_segment ((*p32)[i].p_vaddr, (*p32)[i].p_offset, + (*p32)[i].p_filesz)) goto read_error; /* If the segments visible in memory didn't include the section @@ -328,9 +345,9 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, case ELFCLASS64: for (uint_fast16_t i = 0; i < phnum; ++i) - if (phdrs.p64[i].p_type == PT_LOAD) - if (handle_segment (phdrs.p64[i].p_vaddr, phdrs.p64[i].p_offset, - phdrs.p64[i].p_filesz)) + if ((*p64)[i].p_type == PT_LOAD) + if (handle_segment ((*p64)[i].p_vaddr, (*p64)[i].p_offset, + (*p64)[i].p_filesz)) goto read_error; /* If the segments visible in memory didn't include the section @@ -358,6 +375,9 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, break; } + free (phdrsp); + phdrsp = NULL; + /* Now we have the image. Open libelf on it. */ Elf *elf = elf_memory ((char *) buffer, contents_size); diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c index 3f5314a..72461bc 100644 --- a/libdwfl/find-debuginfo.c +++ b/libdwfl/find-debuginfo.c @@ -1,5 +1,5 @@ /* Standard find_debuginfo callback for libdwfl. - Copyright (C) 2005-2010, 2014 Red Hat, Inc. + Copyright (C) 2005-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -34,10 +34,10 @@ #include "system.h" -/* Try to open64 [DIR/][SUBDIR/]DEBUGLINK, return file descriptor or -1. +/* Try to open [DIR/][SUBDIR/]DEBUGLINK, return file descriptor or -1. On success, *DEBUGINFO_FILE_NAME has the malloc'd name of the open file. */ static int -try_open (const struct stat64 *main_stat, +try_open (const struct stat *main_stat, const char *dir, const char *subdir, const char *debuglink, char **debuginfo_file_name) { @@ -45,7 +45,7 @@ try_open (const struct stat64 *main_stat, if (dir == NULL && subdir == NULL) { fname = strdup (debuglink); - if (fname == NULL) + if (unlikely (fname == NULL)) return -1; } else if ((subdir == NULL ? asprintf (&fname, "%s/%s", dir, debuglink) @@ -53,15 +53,16 @@ try_open (const struct stat64 *main_stat, : asprintf (&fname, "%s/%s/%s", dir, subdir, debuglink)) < 0) return -1; - struct stat64 st; - int fd = TEMP_FAILURE_RETRY (open64 (fname, O_RDONLY)); + struct stat st; + int fd = TEMP_FAILURE_RETRY (open (fname, O_RDONLY)); if (fd < 0) free (fname); - else if (fstat64 (fd, &st) == 0 + else if (fstat (fd, &st) == 0 && st.st_ino == main_stat->st_ino && st.st_dev == main_stat->st_dev) { /* This is the main file by another name. Don't look at it again. */ + free (fname); close (fd); errno = ENOENT; fd = -1; @@ -161,6 +162,7 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, bool cancheck = debuglink_crc != (GElf_Word) 0; const char *file_basename = file_name == NULL ? NULL : basename (file_name); + char *localname = NULL; if (debuglink_file == NULL) { /* For a alt debug multi file we need a name, for a separate debug @@ -172,7 +174,9 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, } size_t len = strlen (file_basename); - char *localname = alloca (len + sizeof ".debug"); + localname = malloc (len + sizeof ".debug"); + if (unlikely (localname == NULL)) + return -1; memcpy (localname, file_basename, len); memcpy (&localname[len], ".debug", sizeof ".debug"); debuglink_file = localname; @@ -183,11 +187,17 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, indicated by the debug directory path setting. */ const Dwfl_Callbacks *const cb = mod->dwfl->callbacks; - char *path = strdupa ((cb->debuginfo_path ? *cb->debuginfo_path : NULL) - ?: DEFAULT_DEBUGINFO_PATH); + char *localpath = strdup ((cb->debuginfo_path ? *cb->debuginfo_path : NULL) + ?: DEFAULT_DEBUGINFO_PATH); + if (unlikely (localpath == NULL)) + { + free (localname); + return -1; + } /* A leading - or + in the whole path sets whether to check file CRCs. */ bool defcheck = true; + char *path = localpath; if (path[0] == '-' || path[0] == '+') { defcheck = path[0] == '+'; @@ -195,9 +205,9 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, } /* XXX dev/ino should be cached in struct dwfl_file. */ - struct stat64 main_stat; - if (unlikely ((mod->main.fd != -1 ? fstat64 (mod->main.fd, &main_stat) - : file_name != NULL ? stat64 (file_name, &main_stat) + struct stat main_stat; + if (unlikely ((mod->main.fd != -1 ? fstat (mod->main.fd, &main_stat) + : file_name != NULL ? stat (file_name, &main_stat) : -1) < 0)) { main_stat.st_dev = 0; @@ -205,7 +215,13 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, } char *file_dirname = (file_basename == file_name ? NULL - : strndupa (file_name, file_basename - 1 - file_name)); + : strndup (file_name, file_basename - 1 - file_name)); + if (file_basename != file_name && file_dirname == NULL) + { + free (localpath); + free (localname); + return -1; + } char *p; while ((p = strsep (&path, ":")) != NULL) { @@ -236,7 +252,15 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, dir = p; if (mod->dw == NULL) { - subdir = file_dirname + 1; + subdir = file_dirname; + /* We want to explore all sub-subdirs. Chop off one slash + at a time. */ + explore_dir: + subdir = strchr (subdir, '/'); + if (subdir != NULL) + subdir = subdir + 1; + if (subdir && *subdir == 0) + continue; file = debuglink_file; } else @@ -270,18 +294,24 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, if (fd < 0) { if (errno != ENOENT && errno != ENOTDIR) - return -1; + goto fail_free; else continue; } break; } + /* If possible try again with a sub-subdir. */ + if (mod->dw == NULL && subdir) + goto explore_dir; continue; default: - return -1; + goto fail_free; } if (validate (mod, fd, check, debuglink_crc)) { + free (localpath); + free (localname); + free (file_dirname); *debuginfo_file_name = fname; return fd; } @@ -291,6 +321,10 @@ find_debuginfo_in_path (Dwfl_Module *mod, const char *file_name, /* No dice. */ errno = 0; +fail_free: + free (localpath); + free (localname); + free (file_dirname); return -1; } @@ -333,7 +367,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, debuglink_file, debuglink_crc, debuginfo_file_name); - if (fd < 0 && errno == 0) + if (fd < 0 && errno == 0 && file_name != NULL) { /* If FILE_NAME is a symlink, the debug file might be associated with the symlink target name instead. */ diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c index 16cebd0..0e470b9 100644 --- a/libdwfl/frame_unwind.c +++ b/libdwfl/frame_unwind.c @@ -101,6 +101,49 @@ bra_compar (const void *key_voidp, const void *elem_voidp) return (offset > op->offset) - (offset < op->offset); } +struct eval_stack { + Dwarf_Addr *addrs; + size_t used; + size_t allocated; +}; + +static bool +do_push (struct eval_stack *stack, Dwarf_Addr val) +{ + if (stack->used >= DWARF_EXPR_STACK_MAX) + { + __libdwfl_seterrno (DWFL_E_INVALID_DWARF); + return false; + } + if (stack->used == stack->allocated) + { + stack->allocated = MAX (stack->allocated * 2, 32); + Dwarf_Addr *new_addrs; + new_addrs = realloc (stack->addrs, + stack->allocated * sizeof (*stack->addrs)); + if (new_addrs == NULL) + { + __libdwfl_seterrno (DWFL_E_NOMEM); + return false; + } + stack->addrs = new_addrs; + } + stack->addrs[stack->used++] = val; + return true; +} + +static bool +do_pop (struct eval_stack *stack, Dwarf_Addr *val) +{ + if (stack->used == 0) + { + __libdwfl_seterrno (DWFL_E_INVALID_DWARF); + return false; + } + *val = stack->addrs[--stack->used]; + return true; +} + /* If FRAME is NULL is are computing CFI frame base. In such case another DW_OP_call_frame_cfa is no longer permitted. */ @@ -114,43 +157,15 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, __libdwfl_seterrno (DWFL_E_INVALID_DWARF); return false; } - Dwarf_Addr *stack = NULL; - size_t stack_used = 0, stack_allocated = 0; + struct eval_stack stack = + { + .addrs = NULL, + .used = 0, + .allocated = 0 + }; - bool - push (Dwarf_Addr val) - { - if (stack_used >= DWARF_EXPR_STACK_MAX) - { - __libdwfl_seterrno (DWFL_E_INVALID_DWARF); - return false; - } - if (stack_used == stack_allocated) - { - stack_allocated = MAX (stack_allocated * 2, 32); - Dwarf_Addr *stack_new = realloc (stack, stack_allocated * sizeof (*stack)); - if (stack_new == NULL) - { - __libdwfl_seterrno (DWFL_E_NOMEM); - return false; - } - stack = stack_new; - } - stack[stack_used++] = val; - return true; - } - - bool - pop (Dwarf_Addr *val) - { - if (stack_used == 0) - { - __libdwfl_seterrno (DWFL_E_INVALID_DWARF); - return false; - } - *val = stack[--stack_used]; - return true; - } +#define pop(x) do_pop(&stack, x) +#define push(x) do_push(&stack, x) Dwarf_Addr val1, val2; bool is_location = false; @@ -168,14 +183,14 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case DW_OP_lit0 ... DW_OP_lit31: if (! push (op->atom - DW_OP_lit0)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_addr: if (! push (op->number + bias)) { - free (stack); + free (stack.addrs); return false; } break; @@ -195,7 +210,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case DW_OP_consts: if (! push (op->number)) { - free (stack); + free (stack.addrs); return false; } break; @@ -203,67 +218,67 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, if (! state_get_reg (state, op->atom - DW_OP_reg0, &val1) || ! push (val1)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_regx: if (! state_get_reg (state, op->number, &val1) || ! push (val1)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_breg0 ... DW_OP_breg31: if (! state_get_reg (state, op->atom - DW_OP_breg0, &val1)) { - free (stack); + free (stack.addrs); return false; } val1 += op->number; if (! push (val1)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_bregx: if (! state_get_reg (state, op->number, &val1)) { - free (stack); + free (stack.addrs); return false; } val1 += op->number2; if (! push (val1)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_dup: if (! pop (&val1) || ! push (val1) || ! push (val1)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_drop: if (! pop (&val1)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_pick: - if (stack_used <= op->number) + if (stack.used <= op->number) { - free (stack); + free (stack.addrs); __libdwfl_seterrno (DWFL_E_INVALID_DWARF); return false; } - if (! push (stack[stack_used - 1 - op->number])) + if (! push (stack.addrs[stack.used - 1 - op->number])) { - free (stack); + free (stack.addrs); return false; } break; @@ -271,14 +286,14 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, if (! pop (&val1) || ! pop (&val2) || ! push (val2) || ! push (val1) || ! push (val2)) { - free (stack); + free (stack.addrs); return false; } break; case DW_OP_swap: if (! pop (&val1) || ! pop (&val2) || ! push (val1) || ! push (val2)) { - free (stack); + free (stack.addrs); return false; } break; @@ -288,7 +303,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, if (! pop (&val1) || ! pop (&val2) || ! pop (&val3) || ! push (val1) || ! push (val3) || ! push (val2)) { - free (stack); + free (stack.addrs); return false; } } @@ -297,7 +312,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case DW_OP_deref_size: if (process->callbacks->memory_read == NULL) { - free (stack); + free (stack.addrs); __libdwfl_seterrno (DWFL_E_INVALID_ARGUMENT); return false; } @@ -305,7 +320,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, || ! process->callbacks->memory_read (process->dwfl, val1, &val1, process->callbacks_arg)) { - free (stack); + free (stack.addrs); return false; } if (op->atom == DW_OP_deref_size) @@ -314,7 +329,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, const unsigned addr_bytes = elfclass == ELFCLASS32 ? 4 : 8; if (op->number > addr_bytes) { - free (stack); + free (stack.addrs); __libdwfl_seterrno (DWFL_E_INVALID_DWARF); return false; } @@ -330,7 +345,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, } if (! push (val1)) { - free (stack); + free (stack.addrs); return false; } break; @@ -338,18 +353,18 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case atom: \ if (! pop (&val1) || ! push (expr)) \ { \ - free (stack); \ + free (stack.addrs); \ return false; \ } \ break; - UNOP (DW_OP_abs, abs ((int64_t) val1)) + UNOP (DW_OP_abs, llabs ((int64_t) val1)) UNOP (DW_OP_neg, -(int64_t) val1) UNOP (DW_OP_not, ~val1) #undef UNOP case DW_OP_plus_uconst: if (! pop (&val1) || ! push (val1 + op->number)) { - free (stack); + free (stack.addrs); return false; } break; @@ -357,7 +372,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case atom: \ if (! pop (&val2) || ! pop (&val1) || ! push (val1 op val2)) \ { \ - free (stack); \ + free (stack.addrs); \ return false; \ } \ break; @@ -366,7 +381,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, if (! pop (&val2) || ! pop (&val1) \ || ! push ((int64_t) val1 op (int64_t) val2)) \ { \ - free (stack); \ + free (stack.addrs); \ return false; \ } \ break; @@ -374,18 +389,18 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case DW_OP_div: if (! pop (&val2) || ! pop (&val1)) { - free (stack); + free (stack.addrs); return false; } if (val2 == 0) { - free (stack); + free (stack.addrs); __libdwfl_seterrno (DWFL_E_INVALID_DWARF); return false; } if (! push ((int64_t) val1 / (int64_t) val2)) { - free (stack); + free (stack.addrs); return false; } break; @@ -393,18 +408,18 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case DW_OP_mod: if (! pop (&val2) || ! pop (&val1)) { - free (stack); + free (stack.addrs); return false; } if (val2 == 0) { - free (stack); + free (stack.addrs); __libdwfl_seterrno (DWFL_E_INVALID_DWARF); return false; } if (! push (val1 % val2)) { - free (stack); + free (stack.addrs); return false; } break; @@ -426,7 +441,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, case DW_OP_bra: if (! pop (&val1)) { - free (stack); + free (stack.addrs); return false; } if (val1 == 0) @@ -438,7 +453,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, sizeof (*ops), bra_compar); if (found == NULL) { - free (stack); + free (stack.addrs); /* PPC32 vDSO has such invalid operations. */ __libdwfl_seterrno (DWFL_E_INVALID_DWARF); return false; @@ -460,7 +475,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, || ! push (cfa)) { __libdwfl_seterrno (DWFL_E_LIBDW); - free (stack); + free (stack.addrs); return false; } is_location = true; @@ -476,10 +491,10 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, } if (! pop (result)) { - free (stack); + free (stack.addrs); return false; } - free (stack); + free (stack.addrs); if (is_location) { if (process->callbacks->memory_read == NULL) @@ -492,6 +507,8 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, return false; } return true; +#undef push +#undef pop } static void @@ -620,7 +637,14 @@ handle_cfi (Dwfl_Frame *state, Dwarf_Addr pc, Dwarf_CFI *cfi, Dwarf_Addr bias) if (unwound->pc == 0) unwound->pc_state = DWFL_FRAME_STATE_PC_UNDEFINED; else - unwound->pc_state = DWFL_FRAME_STATE_PC_SET; + { + unwound->pc_state = DWFL_FRAME_STATE_PC_SET; + /* In SPARC the return address register actually contains + the address of the call instruction instead of the return + address. Therefore we add here an offset defined by the + backend. Most likely 0. */ + unwound->pc += ebl_ra_offset (ebl); + } } free (frame); } diff --git a/libdwfl/gzip.c b/libdwfl/gzip.c index b7dde5d..078e1da 100644 --- a/libdwfl/gzip.c +++ b/libdwfl/gzip.c @@ -67,6 +67,97 @@ #define READ_SIZE (1 << 20) +struct unzip_state { +#if !USE_INFLATE + gzFile zf; +#endif + size_t mapped_size; + void **whole; + void *buffer; + size_t size; + void *input_buffer; + off_t input_pos; +}; + +static inline bool +bigger_buffer (struct unzip_state *state, size_t start) +{ + size_t more = state->size ? state->size * 2 : start; + char *b = realloc (state->buffer, more); + while (unlikely (b == NULL) && more >= state->size + 1024) + b = realloc (state->buffer, more -= 1024); + if (unlikely (b == NULL)) + return false; + state->buffer = b; + state->size = more; + return true; +} + +static inline void +smaller_buffer (struct unzip_state *state, size_t end) +{ + state->buffer = + realloc (state->buffer, end) ?: end == 0 ? NULL : state->buffer; + state->size = end; +} + +static inline Dwfl_Error +fail (struct unzip_state *state, Dwfl_Error failure) +{ + if (state->input_pos == (off_t) state->mapped_size) + *state->whole = state->input_buffer; + else + { + free (state->input_buffer); + *state->whole = NULL; + } + free (state->buffer); + return failure; +} + +static inline Dwfl_Error +zlib_fail (struct unzip_state *state, int result) +{ + switch (result) + { + case Z (MEM_ERROR): + return fail (state, DWFL_E_NOMEM); + case Z (ERRNO): + return fail (state, DWFL_E_ERRNO); + default: + return fail (state, DWFL_E_ZLIB); + } +} + +#if !USE_INFLATE +static Dwfl_Error +open_stream (int fd, off_t start_offset, struct unzip_state *state) +{ + int d = dup (fd); + if (unlikely (d < 0)) + return DWFL_E_BADELF; + if (start_offset != 0) + { + off_t off = lseek (d, start_offset, SEEK_SET); + if (off != start_offset) + { + close (d); + return DWFL_E_BADELF; + } + } + state->zf = gzdopen (d, "r"); + if (unlikely (state->zf == NULL)) + { + close (d); + return zlib_fail (state, Z (MEM_ERROR)); + } + + /* From here on, zlib will close D. */ + + return DWFL_E_NOERROR; +} +#endif + /* If this is not a compressed image, return DWFL_E_BADELF. If we uncompressed it into *WHOLE, *WHOLE_SIZE, return DWFL_E_NOERROR. Otherwise return an error for bad compressed data or I/O failure. @@ -75,84 +166,49 @@ is not null on entry, we'll use it in lieu of repeating a read. */ Dwfl_Error internal_function -unzip (int fd, off64_t start_offset, - void *mapped, size_t mapped_size, - void **whole, size_t *whole_size) +unzip (int fd, off_t start_offset, + void *mapped, size_t _mapped_size, + void **_whole, size_t *whole_size) { - void *buffer = NULL; - size_t size = 0; - inline bool bigger_buffer (size_t start) - { - size_t more = size ? size * 2 : start; - char *b = realloc (buffer, more); - while (unlikely (b == NULL) && more >= size + 1024) - b = realloc (buffer, more -= 1024); - if (unlikely (b == NULL)) - return false; - buffer = b; - size = more; - return true; - } - inline void smaller_buffer (size_t end) - { - buffer = realloc (buffer, end) ?: end == 0 ? NULL : buffer; - size = end; - } - - void *input_buffer = NULL; - off_t input_pos = 0; - - inline Dwfl_Error fail (Dwfl_Error failure) - { - if (input_pos == (off_t) mapped_size) - *whole = input_buffer; - else - { - free (input_buffer); - *whole = NULL; - } - free (buffer); - return failure; - } - - inline Dwfl_Error zlib_fail (int result) - { - switch (result) - { - case Z (MEM_ERROR): - return fail (DWFL_E_NOMEM); - case Z (ERRNO): - return fail (DWFL_E_ERRNO); - default: - return fail (DWFL_E_ZLIB); - } - } + struct unzip_state state = + { +#if !USE_INFLATE + .zf = NULL, +#endif + .mapped_size = _mapped_size, + .whole = _whole, + .buffer = NULL, + .size = 0, + .input_buffer = NULL, + .input_pos = 0 + }; if (mapped == NULL) { - if (*whole == NULL) + if (*state.whole == NULL) { - input_buffer = malloc (READ_SIZE); - if (unlikely (input_buffer == NULL)) + state.input_buffer = malloc (READ_SIZE); + if (unlikely (state.input_buffer == NULL)) return DWFL_E_NOMEM; - ssize_t n = pread_retry (fd, input_buffer, READ_SIZE, start_offset); + ssize_t n = pread_retry (fd, state.input_buffer, READ_SIZE, start_offset); if (unlikely (n < 0)) - return zlib_fail (Z (ERRNO)); + return zlib_fail (&state, Z (ERRNO)); - input_pos = n; - mapped = input_buffer; - mapped_size = n; + state.input_pos = n; + mapped = state.input_buffer; + state.mapped_size = n; } else { - input_buffer = *whole; - input_pos = mapped_size = *whole_size; + state.input_buffer = *state.whole; + state.input_pos = state.mapped_size = *whole_size; } } #define NOMAGIC(magic) \ - (mapped_size <= sizeof magic || memcmp (mapped, magic, sizeof magic - 1)) + (state.mapped_size <= sizeof magic || \ + memcmp (mapped, magic, sizeof magic - 1)) /* First, look at the header. */ if (NOMAGIC (MAGIC) @@ -169,39 +225,39 @@ unzip (int fd, off64_t start_offset, The stupid zlib interface has nothing to grok the gzip file headers except the slow gzFile interface. */ - z_stream z = { .next_in = mapped, .avail_in = mapped_size }; + z_stream z = { .next_in = mapped, .avail_in = state.mapped_size }; int result = inflateInit (&z); if (result != Z (OK)) { inflateEnd (&z); - return zlib_fail (result); + return zlib_fail (&state, result); } do { - if (z.avail_in == 0 && input_buffer != NULL) + if (z.avail_in == 0 && state.input_buffer != NULL) { - ssize_t n = pread_retry (fd, input_buffer, READ_SIZE, - start_offset + input_pos); + ssize_t n = pread_retry (fd, state.input_buffer, READ_SIZE, + start_offset + state.input_pos); if (unlikely (n < 0)) { inflateEnd (&z); - return zlib_fail (Z (ERRNO)); + return zlib_fail (&state, Z (ERRNO)); } - z.next_in = input_buffer; + z.next_in = state.input_buffer; z.avail_in = n; - input_pos += n; + state.input_pos += n; } if (z.avail_out == 0) { - ptrdiff_t pos = (void *) z.next_out - buffer; - if (!bigger_buffer (z.avail_in)) + ptrdiff_t pos = (void *) z.next_out - state.buffer; + if (!bigger_buffer (&state, z.avail_in)) { result = Z (MEM_ERROR); break; } - z.next_out = buffer + pos; - z.avail_out = size - pos; + z.next_out = state.buffer + pos; + z.avail_out = state.size - pos; } } while ((result = do_inflate (&z)) == Z (OK)); @@ -209,87 +265,60 @@ unzip (int fd, off64_t start_offset, #ifdef BZLIB uint64_t total_out = (((uint64_t) z.total_out_hi32 << 32) | z.total_out_lo32); - smaller_buffer (total_out); + smaller_buffer (&state, total_out); #else - smaller_buffer (z.total_out); + smaller_buffer (&state, z.total_out); #endif inflateEnd (&z); if (result != Z (STREAM_END)) - return zlib_fail (result); + return zlib_fail (&state, result); #else /* gzip only. */ /* Let the decompression library read the file directly. */ - gzFile zf; - Dwfl_Error open_stream (void) - { - int d = dup (fd); - if (unlikely (d < 0)) - return DWFL_E_BADELF; - if (start_offset != 0) - { - off64_t off = lseek (d, start_offset, SEEK_SET); - if (off != start_offset) - { - close (d); - return DWFL_E_BADELF; - } - } - zf = gzdopen (d, "r"); - if (unlikely (zf == NULL)) - { - close (d); - return zlib_fail (Z (MEM_ERROR)); - } - - /* From here on, zlib will close D. */ - - return DWFL_E_NOERROR; - } - - Dwfl_Error result = open_stream (); + Dwfl_Error result = open_stream (fd, start_offset, &state); - if (result == DWFL_E_NOERROR && gzdirect (zf)) + if (result == DWFL_E_NOERROR && gzdirect (state.zf)) { - gzclose (zf); - return fail (DWFL_E_BADELF); + gzclose (state.zf); + return fail (&state, DWFL_E_BADELF); } if (result != DWFL_E_NOERROR) - return fail (result); + return fail (&state, result); ptrdiff_t pos = 0; while (1) { - if (!bigger_buffer (1024)) + if (!bigger_buffer (&state, 1024)) { - gzclose (zf); - return zlib_fail (Z (MEM_ERROR)); + gzclose (state.zf); + return zlib_fail (&state, Z (MEM_ERROR)); } - int n = gzread (zf, buffer + pos, size - pos); + int n = gzread (state.zf, state.buffer + pos, state.size - pos); if (n < 0) { int code; - gzerror (zf, &code); - gzclose (zf); - return zlib_fail (code); + gzerror (state.zf, &code); + gzclose (state.zf); + return zlib_fail (&state, code); } if (n == 0) break; pos += n; } - gzclose (zf); - smaller_buffer (pos); + gzclose (state.zf); + smaller_buffer (&state, pos); #endif - free (input_buffer); + free (state.input_buffer); - *whole = buffer; - *whole_size = size; + *state.whole = state.buffer; + *whole_size = state.size; return DWFL_E_NOERROR; } diff --git a/libdwfl/image-header.c b/libdwfl/image-header.c index a4f6799..62ccc3e 100644 --- a/libdwfl/image-header.c +++ b/libdwfl/image-header.c @@ -57,7 +57,7 @@ Dwfl_Error internal_function -__libdw_image_header (int fd, off64_t *start_offset, +__libdw_image_header (int fd, off_t *start_offset, void *mapped, size_t mapped_size) { if (likely (mapped_size > H_END)) diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h index 2bb4f45..aea8b99 100644 --- a/libdwfl/libdwfl.h +++ b/libdwfl/libdwfl.h @@ -275,12 +275,14 @@ extern int dwfl_module_build_id (Dwfl_Module *mod, In searches for debuginfo by name, if the remainder of the element is empty, the directory containing the main file is tried; if it's an absolute path name, the absolute directory path - containing the main file is taken as a subdirectory of this path; - a relative path name is taken as a subdirectory of the directory - containing the main file. Hence for /bin/ls, the default string - ":.debug:/usr/lib/debug" says to look in /bin, then /bin/.debug, - then /usr/lib/debug/bin, for the file name in the .gnu_debuglink - section (or "ls.debug" if none was found). */ + (and any subdirectory of that path) containing the main file is + taken as a subdirectory of this path; a relative path name is taken + as a subdirectory of the directory containing the main file. + Hence for /usr/bin/ls, the default string ":.debug:/usr/lib/debug" + says to look in /usr/bin, then /usr/bin/.debug, then the path subdirs + under /usr/lib/debug, in the order /usr/lib/debug/usr/bin, then + /usr/lib/debug/bin, and finally /usr/lib/debug, for the file name in + the .gnu_debuglink section (or "ls.debug" if none was found). */ /* Standard find_elf callback function working solely on build ID. This can be tried first by any find_elf callback, to use the @@ -421,7 +423,7 @@ extern int dwfl_validate_address (Dwfl *dwfl, with the difference between addresses within the loaded module and those in symbol tables or Dwarf information referring to it. */ extern Elf *dwfl_module_getelf (Dwfl_Module *, GElf_Addr *bias) - __nonnull_attribute__ (1, 2); + __nonnull_attribute__ (2); /* Return the number of symbols in the module's symbol table, or -1 for errors. */ diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h index 30c0f8a..2a83646 100644 --- a/libdwfl/libdwflP.h +++ b/libdwfl/libdwflP.h @@ -1,5 +1,5 @@ /* Internal definitions for libdwfl. - Copyright (C) 2005-2014 Red Hat, Inc. + Copyright (C) 2005-2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -104,6 +104,16 @@ typedef enum { DWFL_ERRORS DWFL_E_NUM } Dwfl_Error; extern int __libdwfl_canon_error (Dwfl_Error) internal_function; extern void __libdwfl_seterrno (Dwfl_Error) internal_function; +/* Resources we might keep for the user about the core file that the + Dwfl might have been created from. Can currently only be set + through std-argp. */ +struct Dwfl_User_Core +{ + char *executable_for_core; /* --executable if --core was specified. */ + Elf *core; /* non-NULL if we need to free it. */ + int fd; /* close if >= 0. */ +}; + struct Dwfl { const Dwfl_Callbacks *callbacks; @@ -130,7 +140,7 @@ struct Dwfl GElf_Off lookup_tail_offset; int lookup_tail_ndx; - char *executable_for_core; /* --executable if --core was specified. */ + struct Dwfl_User_Core *user_core; }; #define OFFLINE_REDZONE 0x10000 @@ -211,6 +221,7 @@ struct Dwfl_Module int segment; /* Index of first segment table entry. */ bool gc; /* Mark/sweep flag. */ + bool is_executable; /* Use Dwfl::executable_for_core? */ }; /* This holds information common for all the threads/tasks/TIDs of one process @@ -399,7 +410,12 @@ struct dwfl_arange then get the instance through __libdwfl_get_pid_arg. */ struct __libdwfl_pid_arg { + /* /proc/PID/task/. */ DIR *dir; + /* Elf for /proc/PID/exe. Set to NULL if it couldn't be opened. */ + Elf *elf; + /* fd for /proc/PID/exe. Set to -1 if it couldn't be opened. */ + int elf_fd; /* It is 0 if not used. */ pid_t tid_attached; /* Valid only if TID_ATTACHED is not zero. */ @@ -582,21 +598,21 @@ extern GElf_Addr __libdwfl_segment_end (Dwfl *dwfl, GElf_Addr end) internal_function; /* Decompression wrappers: decompress whole file into memory. */ -extern Dwfl_Error __libdw_gunzip (int fd, off64_t start_offset, +extern Dwfl_Error __libdw_gunzip (int fd, off_t start_offset, void *mapped, size_t mapped_size, void **whole, size_t *whole_size) internal_function; -extern Dwfl_Error __libdw_bunzip2 (int fd, off64_t start_offset, +extern Dwfl_Error __libdw_bunzip2 (int fd, off_t start_offset, void *mapped, size_t mapped_size, void **whole, size_t *whole_size) internal_function; -extern Dwfl_Error __libdw_unlzma (int fd, off64_t start_offset, +extern Dwfl_Error __libdw_unlzma (int fd, off_t start_offset, void *mapped, size_t mapped_size, void **whole, size_t *whole_size) internal_function; /* Skip the image header before a file image: updates *START_OFFSET. */ -extern Dwfl_Error __libdw_image_header (int fd, off64_t *start_offset, +extern Dwfl_Error __libdw_image_header (int fd, off_t *start_offset, void *mapped, size_t mapped_size) internal_function; @@ -659,6 +675,8 @@ extern int dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, void *memory_callback_arg, Dwfl_Module_Callback *read_eagerly, void *read_eagerly_arg, + const void *note_file, + size_t note_file_size, const struct r_debug_info *r_debug_info); /* Report a module for entry in the dynamic linker's struct link_map list. diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index 272f89b..28d7382 100644 --- a/libdwfl/link_map.c +++ b/libdwfl/link_map.c @@ -1,5 +1,5 @@ /* Report modules by examining dynamic linker data structures. - Copyright (C) 2008-2013 Red Hat, Inc. + Copyright (C) 2008-2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -42,63 +42,70 @@ #define PROBE_VAL64 sizeof (Elf64_Phdr) -/* Examine an auxv data block and determine its format. - Return true iff we figured it out. */ -static bool -auxv_format_probe (const void *auxv, size_t size, - uint_fast8_t *elfclass, uint_fast8_t *elfdata) +static inline bool +do_check64 (size_t i, const Elf64_auxv_t (*a64)[], uint_fast8_t *elfdata) { - const union - { - char buf[size]; - Elf32_auxv_t a32[size / sizeof (Elf32_auxv_t)]; - Elf64_auxv_t a64[size / sizeof (Elf64_auxv_t)]; - } *u = auxv; + /* The AUXV pointer might not even be naturally aligned for 64-bit + data, because note payloads in a core file are not aligned. */ - inline bool check64 (size_t i) - { - /* The AUXV pointer might not even be naturally aligned for 64-bit - data, because note payloads in a core file are not aligned. - But we assume the data is 32-bit aligned. */ + uint64_t type = read_8ubyte_unaligned_noncvt (&(*a64)[i].a_type); + uint64_t val = read_8ubyte_unaligned_noncvt (&(*a64)[i].a_un.a_val); - uint64_t type = read_8ubyte_unaligned_noncvt (&u->a64[i].a_type); - uint64_t val = read_8ubyte_unaligned_noncvt (&u->a64[i].a_un.a_val); + if (type == BE64 (PROBE_TYPE) + && val == BE64 (PROBE_VAL64)) + { + *elfdata = ELFDATA2MSB; + return true; + } - if (type == BE64 (PROBE_TYPE) - && val == BE64 (PROBE_VAL64)) - { - *elfdata = ELFDATA2MSB; - return true; - } + if (type == LE64 (PROBE_TYPE) + && val == LE64 (PROBE_VAL64)) + { + *elfdata = ELFDATA2LSB; + return true; + } - if (type == LE64 (PROBE_TYPE) - && val == LE64 (PROBE_VAL64)) - { - *elfdata = ELFDATA2LSB; - return true; - } + return false; +} - return false; - } +#define check64(n) do_check64 (n, a64, elfdata) - inline bool check32 (size_t i) - { - if (u->a32[i].a_type == BE32 (PROBE_TYPE) - && u->a32[i].a_un.a_val == BE32 (PROBE_VAL32)) - { - *elfdata = ELFDATA2MSB; - return true; - } +static inline bool +do_check32 (size_t i, const Elf32_auxv_t (*a32)[], uint_fast8_t *elfdata) +{ + /* The AUXV pointer might not even be naturally aligned for 32-bit + data, because note payloads in a core file are not aligned. */ - if (u->a32[i].a_type == LE32 (PROBE_TYPE) - && u->a32[i].a_un.a_val == LE32 (PROBE_VAL32)) - { - *elfdata = ELFDATA2LSB; - return true; - } + uint32_t type = read_4ubyte_unaligned_noncvt (&(*a32)[i].a_type); + uint32_t val = read_4ubyte_unaligned_noncvt (&(*a32)[i].a_un.a_val); - return false; - } + if (type == BE32 (PROBE_TYPE) + && val == BE32 (PROBE_VAL32)) + { + *elfdata = ELFDATA2MSB; + return true; + } + + if (type == LE32 (PROBE_TYPE) + && val == LE32 (PROBE_VAL32)) + { + *elfdata = ELFDATA2LSB; + return true; + } + + return false; +} + +#define check32(n) do_check32 (n, a32, elfdata) + +/* Examine an auxv data block and determine its format. + Return true iff we figured it out. */ +static bool +auxv_format_probe (const void *auxv, size_t size, + uint_fast8_t *elfclass, uint_fast8_t *elfdata) +{ + const Elf32_auxv_t (*a32)[size / sizeof (Elf32_auxv_t)] = (void *) auxv; + const Elf64_auxv_t (*a64)[size / sizeof (Elf64_auxv_t)] = (void *) auxv; for (size_t i = 0; i < size / sizeof (Elf64_auxv_t); ++i) { @@ -275,29 +282,26 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata, return true; } - const union - { - Elf32_Addr a32[n]; - Elf64_Addr a64[n]; - } *in = vaddr - read_vaddr + buffer; + Elf32_Addr (*a32)[n] = vaddr - read_vaddr + buffer; + Elf64_Addr (*a64)[n] = (void *) a32; if (elfclass == ELFCLASS32) { if (elfdata == ELFDATA2MSB) for (size_t i = 0; i < n; ++i) - addrs[i] = BE32 (in->a32[i]); + addrs[i] = BE32 (read_4ubyte_unaligned_noncvt (&(*a32)[i])); else for (size_t i = 0; i < n; ++i) - addrs[i] = LE32 (in->a32[i]); + addrs[i] = LE32 (read_4ubyte_unaligned_noncvt (&(*a32)[i])); } else { if (elfdata == ELFDATA2MSB) for (size_t i = 0; i < n; ++i) - addrs[i] = BE64 (in->a64[i]); + addrs[i] = BE64 (read_8ubyte_unaligned_noncvt (&(*a64)[i])); else for (size_t i = 0; i < n; ++i) - addrs[i] = LE64 (in->a64[i]); + addrs[i] = LE64 (read_8ubyte_unaligned_noncvt (&(*a64)[i])); } return false; @@ -358,8 +362,10 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata, if (name != NULL && name[0] == '\0') name = NULL; - if (iterations == 1 && dwfl->executable_for_core != NULL) - name = dwfl->executable_for_core; + if (iterations == 1 + && dwfl->user_core != NULL + && dwfl->user_core->executable_for_core != NULL) + name = dwfl->user_core->executable_for_core; struct r_debug_info_module *r_debug_info_module = NULL; if (r_debug_info != NULL) @@ -369,7 +375,7 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata, const char *name1 = name == NULL ? "" : name; r_debug_info_module = malloc (sizeof (*r_debug_info_module) + strlen (name1) + 1); - if (r_debug_info_module == NULL) + if (unlikely (r_debug_info_module == NULL)) return release_buffer (result); r_debug_info_module->fd = -1; r_debug_info_module->elf = NULL; @@ -387,7 +393,7 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata, { /* This code is mostly inlined dwfl_report_elf. */ // XXX hook for sysroot - int fd = open64 (name, O_RDONLY); + int fd = open (name, O_RDONLY); if (fd >= 0) { Elf *elf; @@ -533,7 +539,11 @@ consider_executable (Dwfl_Module *mod, GElf_Addr at_phdr, GElf_Addr at_entry, address where &r_debug was written at runtime. */ GElf_Xword align = mod->dwfl->segment_align; GElf_Addr d_val_vaddr = 0; - for (uint_fast16_t i = 0; i < ehdr.e_phnum; ++i) + size_t phnum; + if (elf_getphdrnum (mod->main.elf, &phnum) != 0) + return 0; + + for (size_t i = 0; i < phnum; ++i) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (mod->main.elf, i, &phdr_mem); @@ -787,7 +797,10 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, bool in_ok = (*memory_callback) (dwfl, phdr_segndx, &in.d_buf, &in.d_size, phdr, phnum * phent, memory_callback_arg); - if (! in_ok && dwfl->executable_for_core != NULL) + bool in_from_exec = false; + if (! in_ok + && dwfl->user_core != NULL + && dwfl->user_core->executable_for_core != NULL) { /* AUXV -> PHDR -> DYNAMIC Both AUXV and DYNAMIC should be always present in a core file. @@ -795,7 +808,7 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, EXECUTABLE_FOR_CORE to find where DYNAMIC is located in the core file. */ - int fd = open (dwfl->executable_for_core, O_RDONLY); + int fd = open (dwfl->user_core->executable_for_core, O_RDONLY); Elf *elf; Dwfl_Error error = DWFL_E_ERRNO; if (fd != -1) @@ -813,7 +826,15 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, __libdwfl_seterrno (DWFL_E_LIBELF); return false; } - if (ehdr->e_phnum != phnum || ehdr->e_phentsize != phent) + size_t e_phnum; + if (elf_getphdrnum (elf, &e_phnum) != 0) + { + elf_end (elf); + close (fd); + __libdwfl_seterrno (DWFL_E_LIBELF); + return false; + } + if (e_phnum != phnum || ehdr->e_phentsize != phent) { elf_end (elf); close (fd); @@ -841,21 +862,30 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, return false; } in_ok = true; + in_from_exec = true; } if (in_ok) { - union - { - Elf32_Phdr p32; - Elf64_Phdr p64; - char data[phnum * phent]; - } buf; + if (unlikely (phnum > SIZE_MAX / phent)) + { + __libdwfl_seterrno (DWFL_E_NOMEM); + return false; + } + size_t nbytes = phnum * phent; + void *buf = malloc (nbytes); + Elf32_Phdr (*p32)[phnum] = buf; + Elf64_Phdr (*p64)[phnum] = buf; + if (unlikely (buf == NULL)) + { + __libdwfl_seterrno (DWFL_E_NOMEM); + return false; + } Elf_Data out = { .d_type = ELF_T_PHDR, .d_version = EV_CURRENT, .d_size = phnum * phent, - .d_buf = &buf + .d_buf = buf }; in.d_size = out.d_size; if (likely ((elfclass == ELFCLASS32 @@ -863,31 +893,30 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, (&out, &in, elfdata) != NULL)) { /* We are looking for PT_DYNAMIC. */ - const union - { - Elf32_Phdr p32[phnum]; - Elf64_Phdr p64[phnum]; - } *u = (void *) &buf; if (elfclass == ELFCLASS32) { for (size_t i = 0; i < phnum; ++i) - if (consider_phdr (u->p32[i].p_type, - u->p32[i].p_vaddr, - u->p32[i].p_filesz)) + if (consider_phdr ((*p32)[i].p_type, + (*p32)[i].p_vaddr, + (*p32)[i].p_filesz)) break; } else { for (size_t i = 0; i < phnum; ++i) - if (consider_phdr (u->p64[i].p_type, - u->p64[i].p_vaddr, - u->p64[i].p_filesz)) + if (consider_phdr ((*p64)[i].p_type, + (*p64)[i].p_vaddr, + (*p64)[i].p_filesz)) break; } } - (*memory_callback) (dwfl, -1, &in.d_buf, &in.d_size, 0, 0, - memory_callback_arg); + if (in_from_exec) + free (in.d_buf); + else + (*memory_callback) (dwfl, -1, &in.d_buf, &in.d_size, 0, 0, + memory_callback_arg); + free (buf); } else /* We could not read the executable's phdrs from the @@ -931,18 +960,20 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, if ((*memory_callback) (dwfl, dyn_segndx, &in.d_buf, &in.d_size, dyn_vaddr, dyn_filesz, memory_callback_arg)) { - union - { - Elf32_Dyn d32; - Elf64_Dyn d64; - char data[dyn_filesz]; - } buf; + void *buf = malloc (dyn_filesz); + Elf32_Dyn (*d32)[dyn_filesz / sizeof (Elf32_Dyn)] = buf; + Elf64_Dyn (*d64)[dyn_filesz / sizeof (Elf64_Dyn)] = buf; + if (unlikely (buf == NULL)) + { + __libdwfl_seterrno (DWFL_E_NOMEM); + return false; + } Elf_Data out = { .d_type = ELF_T_DYN, .d_version = EV_CURRENT, .d_size = dyn_filesz, - .d_buf = &buf + .d_buf = buf }; in.d_size = out.d_size; if (likely ((elfclass == ELFCLASS32 @@ -950,18 +981,13 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, (&out, &in, elfdata) != NULL)) { /* We are looking for DT_DEBUG. */ - const union - { - Elf32_Dyn d32[dyn_filesz / sizeof (Elf32_Dyn)]; - Elf64_Dyn d64[dyn_filesz / sizeof (Elf64_Dyn)]; - } *u = (void *) &buf; if (elfclass == ELFCLASS32) { size_t n = dyn_filesz / sizeof (Elf32_Dyn); for (size_t i = 0; i < n; ++i) - if (u->d32[i].d_tag == DT_DEBUG) + if ((*d32)[i].d_tag == DT_DEBUG) { - r_debug_vaddr = u->d32[i].d_un.d_val; + r_debug_vaddr = (*d32)[i].d_un.d_val; break; } } @@ -969,9 +995,9 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, { size_t n = dyn_filesz / sizeof (Elf64_Dyn); for (size_t i = 0; i < n; ++i) - if (u->d64[i].d_tag == DT_DEBUG) + if ((*d64)[i].d_tag == DT_DEBUG) { - r_debug_vaddr = u->d64[i].d_un.d_val; + r_debug_vaddr = (*d64)[i].d_un.d_val; break; } } @@ -979,6 +1005,7 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, (*memory_callback) (dwfl, -1, &in.d_buf, &in.d_size, 0, 0, memory_callback_arg); + free (buf); } } } diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index e4065d8..79faf99 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -1,5 +1,5 @@ /* Standard libdwfl callbacks for debugging the running Linux kernel. - Copyright (C) 2005-2011, 2013, 2014 Red Hat, Inc. + Copyright (C) 2005-2011, 2013, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -44,6 +44,13 @@ #include #include +/* Since fts.h is included before config.h, its indirect inclusions may not + give us the right LFS aliases of these functions, so map them manually. */ +#ifdef _FILE_OFFSET_BITS +#define open open64 +#define fopen fopen64 +#endif + #define KERNEL_MODNAME "kernel" @@ -57,12 +64,9 @@ #define MODULE_SECT_NAME_LEN 32 /* Minimum any linux/module.h has had. */ -#if defined (USE_ZLIB) || defined (USE_BZLIB) || defined (USE_LZMA) static const char *vmlinux_suffixes[] = { -#ifdef USE_ZLIB ".gz", -#endif #ifdef USE_BZLIB ".bz2", #endif @@ -70,7 +74,6 @@ static const char *vmlinux_suffixes[] = ".xz", #endif }; -#endif /* Try to open the given file as it is or under the debuginfo directory. */ static int @@ -84,7 +87,7 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) int fd = ((((dwfl->callbacks->debuginfo_path ? *dwfl->callbacks->debuginfo_path : NULL) ?: DEFAULT_DEBUGINFO_PATH)[0] == ':') ? -1 - : TEMP_FAILURE_RETRY (open64 (*fname, O_RDONLY))); + : TEMP_FAILURE_RETRY (open (*fname, O_RDONLY))); if (fd < 0) { @@ -107,7 +110,6 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) } } -#if defined (USE_ZLIB) || defined (USE_BZLIB) || defined (USE_LZMA) if (fd < 0) for (size_t i = 0; i < sizeof vmlinux_suffixes / sizeof vmlinux_suffixes[0]; @@ -116,7 +118,7 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) char *zname; if (asprintf (&zname, "%s%s", *fname, vmlinux_suffixes[i]) > 0) { - fd = TEMP_FAILURE_RETRY (open64 (zname, O_RDONLY)); + fd = TEMP_FAILURE_RETRY (open (zname, O_RDONLY)); if (fd < 0) free (zname); else @@ -126,7 +128,6 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) } } } -#endif if (fd < 0) { @@ -296,9 +297,7 @@ check_suffix (const FTSENT *f, size_t namelen) return sizeof sfx - 1 TRY (".ko"); -#if USE_ZLIB TRY (".ko.gz"); -#endif #if USE_BZLIB TRY (".ko.bz2"); #endif @@ -379,13 +378,16 @@ dwfl_linux_kernel_report_offline (Dwfl *dwfl, const char *release, names. To handle that, we would have to look at the __this_module.name contents in the module's text. */ - char name[f->fts_namelen - suffix + 1]; - for (size_t i = 0; i < f->fts_namelen - 3U; ++i) - if (f->fts_name[i] == '-' || f->fts_name[i] == ',') + char *name = strndup (f->fts_name, f->fts_namelen - suffix); + if (unlikely (name == NULL)) + { + __libdwfl_seterrno (DWFL_E_NOMEM); + result = -1; + break; + } + for (size_t i = 0; i < f->fts_namelen - suffix; ++i) + if (name[i] == '-' || name[i] == ',') name[i] = '_'; - else - name[i] = f->fts_name[i]; - name[f->fts_namelen - suffix] = '\0'; if (predicate != NULL) { @@ -394,17 +396,23 @@ dwfl_linux_kernel_report_offline (Dwfl *dwfl, const char *release, if (want < 0) { result = -1; + free (name); break; } if (!want) - continue; + { + free (name); + continue; + } } if (dwfl_report_offline (dwfl, name, f->fts_path, -1) == NULL) { + free (name); result = -1; break; } + free (name); } continue; @@ -431,46 +439,55 @@ dwfl_linux_kernel_report_offline (Dwfl *dwfl, const char *release, INTDEF (dwfl_linux_kernel_report_offline) +/* State of read_address used by intuit_kernel_bounds. */ +struct read_address_state { + FILE *f; + char *line; + size_t linesz; + size_t n; + char *p; + const char *type; +}; + +static inline bool +read_address (struct read_address_state *state, Dwarf_Addr *addr) +{ + if ((state->n = getline (&state->line, &state->linesz, state->f)) < 1 || + state->line[state->n - 2] == ']') + return false; + *addr = strtoull (state->line, &state->p, 16); + state->p += strspn (state->p, " \t"); + state->type = strsep (&state->p, " \t\n"); + if (state->type == NULL) + return false; + return state->p != NULL && state->p != state->line; +} + + /* Grovel around to guess the bounds of the runtime kernel image. */ static int intuit_kernel_bounds (Dwarf_Addr *start, Dwarf_Addr *end, Dwarf_Addr *notes) { - FILE *f = fopen (KSYMSFILE, "r"); - if (f == NULL) + struct read_address_state state = { NULL, NULL, 0, 0, NULL, NULL }; + + state.f = fopen (KSYMSFILE, "r"); + if (state.f == NULL) return errno; - (void) __fsetlocking (f, FSETLOCKING_BYCALLER); + (void) __fsetlocking (state.f, FSETLOCKING_BYCALLER); *notes = 0; - char *line = NULL; - size_t linesz = 0; - size_t n; - char *p = NULL; - const char *type; - - inline bool read_address (Dwarf_Addr *addr) - { - if ((n = getline (&line, &linesz, f)) < 1 || line[n - 2] == ']') - return false; - *addr = strtoull (line, &p, 16); - p += strspn (p, " \t"); - type = strsep (&p, " \t\n"); - if (type == NULL) - return false; - return p != NULL && p != line; - } - int result; do - result = read_address (start) ? 0 : -1; - while (result == 0 && strchr ("TtRr", *type) == NULL); + result = read_address (&state, start) ? 0 : -1; + while (result == 0 && strchr ("TtRr", *state.type) == NULL); if (result == 0) { *end = *start; - while (read_address (end)) - if (*notes == 0 && !strcmp (p, "__start_notes\n")) + while (read_address (&state, end)) + if (*notes == 0 && !strcmp (state.p, "__start_notes\n")) *notes = *end; Dwarf_Addr round_kernel = sysconf (_SC_PAGE_SIZE); @@ -480,12 +497,12 @@ intuit_kernel_bounds (Dwarf_Addr *start, Dwarf_Addr *end, Dwarf_Addr *notes) if (*start >= *end || *end - *start < round_kernel) result = -1; } - free (line); + free (state.line); if (result == -1) - result = ferror_unlocked (f) ? errno : ENOEXEC; + result = ferror_unlocked (state.f) ? errno : ENOEXEC; - fclose (f); + fclose (state.f); return result; } @@ -496,7 +513,7 @@ static int check_notes (Dwfl_Module *mod, const char *notesfile, Dwarf_Addr vaddr, const char *secname) { - int fd = open64 (notesfile, O_RDONLY); + int fd = open (notesfile, O_RDONLY); if (fd < 0) return 1; @@ -610,12 +627,11 @@ check_module_notes (Dwfl_Module *mod) int dwfl_linux_kernel_report_kernel (Dwfl *dwfl) { - Dwarf_Addr start; - Dwarf_Addr end; - inline Dwfl_Module *report (void) - { - return INTUSE(dwfl_report_module) (dwfl, KERNEL_MODNAME, start, end); - } + Dwarf_Addr start = 0; + Dwarf_Addr end = 0; + + #define report() \ + (INTUSE(dwfl_report_module) (dwfl, KERNEL_MODNAME, start, end)) /* This is a bit of a kludge. If we already reported the kernel, don't bother figuring it out again--it never changes. */ @@ -648,6 +664,29 @@ dwfl_linux_kernel_report_kernel (Dwfl *dwfl) INTDEF (dwfl_linux_kernel_report_kernel) +static inline bool +subst_name (char from, char to, + const char * const module_name, + char * const alternate_name, + const size_t namelen) +{ + const char *n = memchr (module_name, from, namelen); + if (n == NULL) + return false; + char *a = mempcpy (alternate_name, module_name, n - module_name); + *a++ = to; + ++n; + const char *p; + while ((p = memchr (n, from, namelen - (n - module_name))) != NULL) + { + a = mempcpy (a, n, p - n); + *a++ = to; + n = p + 1; + } + memcpy (a, n, namelen - (n - module_name) + 1); + return true; +} + /* Dwfl_Callbacks.find_elf for the running Linux kernel and its modules. */ int @@ -698,26 +737,14 @@ dwfl_linux_kernel_find_elf (Dwfl_Module *mod, two files when either a '_' or '-' appears in a module name, one using only '_' and one only using '-'. */ - char alternate_name[namelen + 1]; - inline bool subst_name (char from, char to) + char *alternate_name = malloc (namelen + 1); + if (unlikely (alternate_name == NULL)) { - const char *n = memchr (module_name, from, namelen); - if (n == NULL) - return false; - char *a = mempcpy (alternate_name, module_name, n - module_name); - *a++ = to; - ++n; - const char *p; - while ((p = memchr (n, from, namelen - (n - module_name))) != NULL) - { - a = mempcpy (a, n, p - n); - *a++ = to; - n = p + 1; - } - memcpy (a, n, namelen - (n - module_name) + 1); - return true; + free (modulesdir[0]); + return ENOMEM; } - if (!subst_name ('-', '_') && !subst_name ('_', '-')) + if (!subst_name ('-', '_', module_name, alternate_name, namelen) && + !subst_name ('_', '-', module_name, alternate_name, namelen)) alternate_name[0] = '\0'; FTSENT *f; @@ -744,10 +771,11 @@ dwfl_linux_kernel_find_elf (Dwfl_Module *mod, && (!memcmp (f->fts_name, module_name, namelen) || !memcmp (f->fts_name, alternate_name, namelen))) { - int fd = open64 (f->fts_accpath, O_RDONLY); + int fd = open (f->fts_accpath, O_RDONLY); *file_name = strdup (f->fts_path); fts_close (fts); free (modulesdir[0]); + free (alternate_name); if (fd < 0) free (*file_name); else if (*file_name == NULL) @@ -773,6 +801,7 @@ dwfl_linux_kernel_find_elf (Dwfl_Module *mod, fts_close (fts); free (modulesdir[0]); + free (alternate_name); errno = error; return -1; } diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index ae71702..4c0f42d 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -1,5 +1,5 @@ /* Get Dwarf Frame state for target live PID process. - Copyright (C) 2013, 2014 Red Hat, Inc. + Copyright (C) 2013, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -26,7 +26,11 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#include "libelfP.h" #include "libdwflP.h" +#include +#include +#include #include #include #include @@ -247,6 +251,8 @@ static void pid_detach (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg) { struct __libdwfl_pid_arg *pid_arg = dwfl_arg; + elf_end (pid_arg->elf); + close (pid_arg->elf_fd); closedir (pid_arg->dir); free (pid_arg); } @@ -332,28 +338,53 @@ dwfl_linux_proc_attach (Dwfl *dwfl, pid_t pid, bool assume_ptrace_stopped) goto fail; } - char dirname[64]; - int i = snprintf (dirname, sizeof (dirname), "/proc/%ld/task", (long) pid); - assert (i > 0 && i < (ssize_t) sizeof (dirname) - 1); - DIR *dir = opendir (dirname); + char name[64]; + int i = snprintf (name, sizeof (name), "/proc/%ld/task", (long) pid); + assert (i > 0 && i < (ssize_t) sizeof (name) - 1); + DIR *dir = opendir (name); if (dir == NULL) { err = errno; goto fail; } + + Elf *elf; + i = snprintf (name, sizeof (name), "/proc/%ld/exe", (long) pid); + assert (i > 0 && i < (ssize_t) sizeof (name) - 1); + int elf_fd = open (name, O_RDONLY); + if (elf_fd >= 0) + { + elf = elf_begin (elf_fd, ELF_C_READ_MMAP, NULL); + if (elf == NULL) + { + /* Just ignore, dwfl_attach_state will fall back to trying + to associate the Dwfl with one of the existing DWfl_Module + ELF images (to know the machine/class backend to use). */ + close (elf_fd); + elf_fd = -1; + } + } + else + elf = NULL; struct __libdwfl_pid_arg *pid_arg = malloc (sizeof *pid_arg); if (pid_arg == NULL) { + elf_end (elf); + close (elf_fd); closedir (dir); err = ENOMEM; goto fail; } pid_arg->dir = dir; + pid_arg->elf = elf; + pid_arg->elf_fd = elf_fd; pid_arg->tid_attached = 0; pid_arg->assume_ptrace_stopped = assume_ptrace_stopped; - if (! INTUSE(dwfl_attach_state) (dwfl, NULL, pid, &pid_thread_callbacks, + if (! INTUSE(dwfl_attach_state) (dwfl, elf, pid, &pid_thread_callbacks, pid_arg)) { + elf_end (elf); + close (elf_fd); closedir (dir); free (pid_arg); return -1; diff --git a/libdwfl/linux-proc-maps.c b/libdwfl/linux-proc-maps.c index d085834..9e7b2a2 100644 --- a/libdwfl/linux-proc-maps.c +++ b/libdwfl/linux-proc-maps.c @@ -59,7 +59,7 @@ get_pid_class (pid_t pid) if (asprintf (&fname, PROCEXEFMT, pid) < 0) return ELFCLASSNONE; - int fd = open64 (fname, O_RDONLY); + int fd = open (fname, O_RDONLY); free (fname); if (fd < 0) return ELFCLASSNONE; @@ -95,7 +95,7 @@ grovel_auxv (pid_t pid, Dwfl *dwfl, GElf_Addr *sysinfo_ehdr) if (asprintf (&fname, PROCAUXVFMT, pid) < 0) return ENOMEM; - int fd = open64 (fname, O_RDONLY); + int fd = open (fname, O_RDONLY); free (fname); if (fd < 0) return errno == ENOENT ? 0 : errno; @@ -175,6 +175,23 @@ grovel_auxv (pid_t pid, Dwfl *dwfl, GElf_Addr *sysinfo_ehdr) return ENOEXEC; } +static inline bool +do_report (Dwfl *dwfl, char **plast_file, Dwarf_Addr low, Dwarf_Addr high) +{ + if (*plast_file != NULL) + { + Dwfl_Module *mod = INTUSE(dwfl_report_module) (dwfl, *plast_file, + low, high); + free (*plast_file); + *plast_file = NULL; + if (unlikely (mod == NULL)) + return true; + } + return false; +} + +#define report() do_report(dwfl, &last_file, low, high) + static int proc_maps_report (Dwfl *dwfl, FILE *f, GElf_Addr sysinfo_ehdr, pid_t pid) { @@ -183,20 +200,6 @@ proc_maps_report (Dwfl *dwfl, FILE *f, GElf_Addr sysinfo_ehdr, pid_t pid) char *last_file = NULL; Dwarf_Addr low = 0, high = 0; - inline bool report (void) - { - if (last_file != NULL) - { - Dwfl_Module *mod = INTUSE(dwfl_report_module) (dwfl, last_file, - low, high); - free (last_file); - last_file = NULL; - if (unlikely (mod == NULL)) - return true; - } - return false; - } - char *line = NULL; size_t linesz; ssize_t len; @@ -315,10 +318,17 @@ read_proc_memory (void *arg, void *data, GElf_Addr address, size_t minread, size_t maxread) { const int fd = *(const int *) arg; - ssize_t nread = pread64 (fd, data, maxread, (off64_t) address); - /* Some kernels don't actually let us do this read, ignore those errors. */ - if (nread < 0 && (errno == EINVAL || errno == EPERM)) - return 0; + + /* This code relies on the fact the Linux kernel accepts negative + offsets when seeking /dev/$$/mem files, as a special case. In + particular pread cannot be used here, because it will always + return EINVAL when passed a negative offset. */ + + if (lseek (fd, (off_t) address, SEEK_SET) == -1) + return -1; + + ssize_t nread = read (fd, data, maxread); + if (nread > 0 && (size_t) nread < minread) nread = 0; return nread; @@ -362,7 +372,7 @@ dwfl_linux_proc_find_elf (Dwfl_Module *mod __attribute__ ((unused)), if (pid == -1) { - int fd = open64 (module_name, O_RDONLY); + int fd = open (module_name, O_RDONLY); if (fd >= 0) { *file_name = strdup (module_name); @@ -399,7 +409,7 @@ dwfl_linux_proc_find_elf (Dwfl_Module *mod __attribute__ ((unused)), if (asprintf (&fname, PROCMEMFMT, pid) < 0) goto detach; - int fd = open64 (fname, O_RDONLY); + int fd = open (fname, O_RDONLY); free (fname); if (fd < 0) goto detach; diff --git a/libdwfl/offline.c b/libdwfl/offline.c index 28d2782..c0a2599 100644 --- a/libdwfl/offline.c +++ b/libdwfl/offline.c @@ -48,6 +48,7 @@ dwfl_offline_section_address (Dwfl_Module *mod, assert (mod->e_type == ET_REL); assert (shdr->sh_addr == 0); assert (shdr->sh_flags & SHF_ALLOC); + assert (shndx != 0); if (mod->debug.elf == NULL) /* We are only here because sh_addr is zero even though layout is complete. @@ -297,7 +298,7 @@ dwfl_report_offline (Dwfl *dwfl, const char *name, if (fd < 0) { closefd = true; - fd = open64 (file_name, O_RDONLY); + fd = open (file_name, O_RDONLY); if (fd < 0) { __libdwfl_seterrno (DWFL_E_ERRNO); diff --git a/libdwfl/open.c b/libdwfl/open.c index 40aac38..92f2798 100644 --- a/libdwfl/open.c +++ b/libdwfl/open.c @@ -1,5 +1,5 @@ -/* Decompression support for libdwfl: zlib (gzip) and/or bzlib (bzip2). - Copyright (C) 2009 Red Hat, Inc. +/* Decompression support for libdwfl: zlib (gzip), bzlib (bzip2) or lzma (xz). + Copyright (C) 2009, 2016 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -32,10 +32,6 @@ #include -#if !USE_ZLIB -# define __libdw_gunzip(...) DWFL_E_BADELF -#endif - #if !USE_BZLIB # define __libdw_bunzip2(...) DWFL_E_BADELF #endif @@ -52,8 +48,7 @@ decompress (int fd __attribute__ ((unused)), Elf **elf) void *buffer = NULL; size_t size = 0; -#if USE_ZLIB || USE_BZLIB || USE_LZMA - const off64_t offset = (*elf)->start_offset; + const off_t offset = (*elf)->start_offset; void *const mapped = ((*elf)->map_address == NULL ? NULL : (*elf)->map_address + offset); const size_t mapped_size = (*elf)->maximum_size; @@ -65,7 +60,6 @@ decompress (int fd __attribute__ ((unused)), Elf **elf) error = __libdw_bunzip2 (fd, offset, mapped, mapped_size, &buffer, &size); if (error == DWFL_E_BADELF) error = __libdw_unlzma (fd, offset, mapped, mapped_size, &buffer, &size); -#endif if (error == DWFL_E_NOERROR) { @@ -132,7 +126,7 @@ __libdw_open_file (int *fdp, Elf **elfp, bool close_on_fail, bool archive_ok) /* It's not an ELF file or a compressed file. See if it's an image with a header preceding the real file. */ - off64_t offset = elf->start_offset; + off_t offset = elf->start_offset; error = __libdw_image_header (*fdp, &offset, (elf->map_address == NULL ? NULL : elf->map_address + offset), diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index 52b7b5e..fc88df3 100644 --- a/libdwfl/relocate.c +++ b/libdwfl/relocate.c @@ -38,6 +38,12 @@ internal_function __libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf, size_t *shstrndx, Elf32_Word shndx, GElf_Addr *value) { + /* No adjustment needed for section zero, it is never loaded. + Handle it first, just in case the ELF file has strange section + zero flags set. */ + if (shndx == 0) + return DWFL_E_NOERROR; + Elf_Scn *refscn = elf_getscn (elf, shndx); GElf_Shdr refshdr_mem, *refshdr = gelf_getshdr (refscn, &refshdr_mem); if (refshdr == NULL) @@ -117,23 +123,32 @@ relocate_getsym (Dwfl_Module *mod, { GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem); if (shdr != NULL) - switch (shdr->sh_type) - { - default: - continue; - case SHT_SYMTAB: - cache->symelf = relocated; - cache->symdata = elf_getdata (scn, NULL); - cache->strtabndx = shdr->sh_link; - if (unlikely (cache->symdata == NULL)) + { + /* We need uncompressed data. */ + if ((shdr->sh_type == SHT_SYMTAB + || shdr->sh_type == SHT_SYMTAB_SHNDX) + && (shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (scn, 0, 0) < 0) return DWFL_E_LIBELF; - break; - case SHT_SYMTAB_SHNDX: - cache->symxndxdata = elf_getdata (scn, NULL); - if (unlikely (cache->symxndxdata == NULL)) - return DWFL_E_LIBELF; - break; - } + + switch (shdr->sh_type) + { + default: + continue; + case SHT_SYMTAB: + cache->symelf = relocated; + cache->symdata = elf_getdata (scn, NULL); + cache->strtabndx = shdr->sh_link; + if (unlikely (cache->symdata == NULL)) + return DWFL_E_LIBELF; + break; + case SHT_SYMTAB_SHNDX: + cache->symxndxdata = elf_getdata (scn, NULL); + if (unlikely (cache->symxndxdata == NULL)) + return DWFL_E_LIBELF; + break; + } + } if (cache->symdata != NULL && cache->symxndxdata != NULL) break; } @@ -197,10 +212,36 @@ resolve_symbol (Dwfl_Module *referer, struct reloc_symtab_cache *symtab, /* Cache the strtab for this symtab. */ assert (referer->symfile == NULL || referer->symfile->elf != symtab->symelf); - symtab->symstrdata = elf_getdata (elf_getscn (symtab->symelf, - symtab->strtabndx), - NULL); - if (unlikely (symtab->symstrdata == NULL)) + + Elf_Scn *scn = elf_getscn (symtab->symelf, symtab->strtabndx); + if (scn == NULL) + return DWFL_E_LIBELF; + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + return DWFL_E_LIBELF; + + if (symtab->symshstrndx == SHN_UNDEF + && elf_getshdrstrndx (symtab->symelf, &symtab->symshstrndx) < 0) + return DWFL_E_LIBELF; + + const char *sname = elf_strptr (symtab->symelf, symtab->symshstrndx, + shdr->sh_name); + if (sname == NULL) + return DWFL_E_LIBELF; + + /* If the section is already decompressed, that isn't an error. */ + if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + elf_compress_gnu (scn, 0, 0); + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (scn, 0, 0) < 0) + return DWFL_E_LIBELF; + + symtab->symstrdata = elf_getdata (scn, NULL); + if (unlikely (symtab->symstrdata == NULL + || symtab->symstrdata->d_buf == NULL)) return DWFL_E_LIBELF; } if (unlikely (sym->st_name >= symtab->symstrdata->d_size)) @@ -270,37 +311,18 @@ resolve_symbol (Dwfl_Module *referer, struct reloc_symtab_cache *symtab, return DWFL_E_RELUNDEF; } +/* Apply one relocation. Returns true for any invalid data. */ static Dwfl_Error -relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, - size_t shstrndx, struct reloc_symtab_cache *reloc_symtab, - Elf_Scn *scn, GElf_Shdr *shdr, - Elf_Scn *tscn, bool debugscn, bool partial) +relocate (Dwfl_Module * const mod, + Elf * const relocated, + struct reloc_symtab_cache * const reloc_symtab, + Elf_Data * const tdata, + const GElf_Ehdr * const ehdr, + GElf_Addr offset, + const GElf_Sxword *addend, + int rtype, + int symndx) { - /* First, fetch the name of the section these relocations apply to. */ - GElf_Shdr tshdr_mem; - GElf_Shdr *tshdr = gelf_getshdr (tscn, &tshdr_mem); - const char *tname = elf_strptr (relocated, shstrndx, tshdr->sh_name); - if (tname == NULL) - return DWFL_E_LIBELF; - - if (unlikely (tshdr->sh_type == SHT_NOBITS) || unlikely (tshdr->sh_size == 0)) - /* No contents to relocate. */ - return DWFL_E_NOERROR; - - if (debugscn && ! ebl_debugscn_p (mod->ebl, tname)) - /* This relocation section is not for a debugging section. - Nothing to do here. */ - return DWFL_E_NOERROR; - - /* Fetch the section data that needs the relocations applied. */ - Elf_Data *tdata = elf_rawdata (tscn, NULL); - if (tdata == NULL) - return DWFL_E_LIBELF; - - /* Apply one relocation. Returns true for any invalid data. */ - Dwfl_Error relocate (GElf_Addr offset, const GElf_Sxword *addend, - int rtype, int symndx) - { /* First see if this is a reloc we can handle. If we are skipping it, don't bother resolving the symbol. */ @@ -365,7 +387,7 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, return DWFL_E_BADRELTYPE; } - if (offset + size > tdata->d_size) + if (offset > tdata->d_size || tdata->d_size - offset < size) return DWFL_E_BADRELOFF; #define DO_TYPE(NAME, Name) GElf_##Name Name; @@ -435,7 +457,123 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, /* We have applied this relocation! */ return DWFL_E_NOERROR; - } +} + +static inline void +check_badreltype (bool *first_badreltype, + Dwfl_Module *mod, + Dwfl_Error *result) +{ + if (*first_badreltype) + { + *first_badreltype = false; + if (ebl_get_elfmachine (mod->ebl) == EM_NONE) + /* This might be because ebl_openbackend failed to find + any libebl_CPU.so library. Diagnose that clearly. */ + *result = DWFL_E_UNKNOWN_MACHINE; + } +} + +static Dwfl_Error +relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, + size_t shstrndx, struct reloc_symtab_cache *reloc_symtab, + Elf_Scn *scn, GElf_Shdr *shdr, + Elf_Scn *tscn, bool debugscn, bool partial) +{ + /* First, fetch the name of the section these relocations apply to. + Then try to decompress both relocation and target section. */ + GElf_Shdr tshdr_mem; + GElf_Shdr *tshdr = gelf_getshdr (tscn, &tshdr_mem); + if (tshdr == NULL) + return DWFL_E_LIBELF; + + const char *tname = elf_strptr (relocated, shstrndx, tshdr->sh_name); + if (tname == NULL) + return DWFL_E_LIBELF; + + if (debugscn && ! ebl_debugscn_p (mod->ebl, tname)) + /* This relocation section is not for a debugging section. + Nothing to do here. */ + return DWFL_E_NOERROR; + + if (strncmp (tname, ".zdebug", strlen ("zdebug")) == 0) + elf_compress_gnu (tscn, 0, 0); + + if ((tshdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (tscn, 0, 0) < 0) + return DWFL_E_LIBELF; + + /* Reload Shdr in case section was just decompressed. */ + tshdr = gelf_getshdr (tscn, &tshdr_mem); + if (tshdr == NULL) + return DWFL_E_LIBELF; + + if (unlikely (tshdr->sh_type == SHT_NOBITS) + || unlikely (tshdr->sh_size == 0)) + /* No contents to relocate. */ + return DWFL_E_NOERROR; + + const char *sname = elf_strptr (relocated, shstrndx, shdr->sh_name); + if (sname == NULL) + return DWFL_E_LIBELF; + + if (strncmp (sname, ".zdebug", strlen ("zdebug")) == 0) + elf_compress_gnu (scn, 0, 0); + + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + if (elf_compress (scn, 0, 0) < 0) + return DWFL_E_LIBELF; + + /* Reload Shdr in case section was just decompressed. */ + GElf_Shdr shdr_mem; + shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + return DWFL_E_LIBELF; + + /* Fetch the section data that needs the relocations applied. */ + Elf_Data *tdata = elf_rawdata (tscn, NULL); + if (tdata == NULL) + return DWFL_E_LIBELF; + + /* If either the section that needs the relocation applied, or the + section that the relocations come from overlap one of the ehdrs, + shdrs or phdrs data then we refuse to do the relocations. It + isn't illegal for ELF section data to overlap the header data, + but updating the (relocation) data might corrupt the in-memory + libelf headers causing strange corruptions or errors. */ + size_t ehsize = gelf_fsize (relocated, ELF_T_EHDR, 1, EV_CURRENT); + if (unlikely (shdr->sh_offset < ehsize + || tshdr->sh_offset < ehsize)) + return DWFL_E_BADELF; + + GElf_Off shdrs_start = ehdr->e_shoff; + size_t shnums; + if (elf_getshdrnum (relocated, &shnums) < 0) + return DWFL_E_LIBELF; + /* Overflows will have been checked by elf_getshdrnum/get|rawdata. */ + size_t shentsize = gelf_fsize (relocated, ELF_T_SHDR, 1, EV_CURRENT); + GElf_Off shdrs_end = shdrs_start + shnums * shentsize; + if (unlikely ((shdrs_start < shdr->sh_offset + shdr->sh_size + && shdr->sh_offset < shdrs_end) + || (shdrs_start < tshdr->sh_offset + tshdr->sh_size + && tshdr->sh_offset < shdrs_end))) + return DWFL_E_BADELF; + + GElf_Off phdrs_start = ehdr->e_phoff; + size_t phnums; + if (elf_getphdrnum (relocated, &phnums) < 0) + return DWFL_E_LIBELF; + if (phdrs_start != 0 && phnums != 0) + { + /* Overflows will have been checked by elf_getphdrnum/get|rawdata. */ + size_t phentsize = gelf_fsize (relocated, ELF_T_PHDR, 1, EV_CURRENT); + GElf_Off phdrs_end = phdrs_start + phnums * phentsize; + if (unlikely ((phdrs_start < shdr->sh_offset + shdr->sh_size + && shdr->sh_offset < phdrs_end) + || (phdrs_start < tshdr->sh_offset + tshdr->sh_size + && tshdr->sh_offset < phdrs_end))) + return DWFL_E_BADELF; + } /* Fetch the relocation section and apply each reloc in it. */ Elf_Data *reldata = elf_getdata (scn, NULL); @@ -444,17 +582,6 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, Dwfl_Error result = DWFL_E_NOERROR; bool first_badreltype = true; - inline void check_badreltype (void) - { - if (first_badreltype) - { - first_badreltype = false; - if (ebl_get_elfmachine (mod->ebl) == EM_NONE) - /* This might be because ebl_openbackend failed to find - any libebl_CPU.so library. Diagnose that clearly. */ - result = DWFL_E_UNKNOWN_MACHINE; - } - } size_t sh_entsize = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : ELF_T_RELA, @@ -467,10 +594,11 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, GElf_Rel rel_mem, *r = gelf_getrel (reldata, relidx, &rel_mem); if (r == NULL) return DWFL_E_LIBELF; - result = relocate (r->r_offset, NULL, + result = relocate (mod, relocated, reloc_symtab, tdata, ehdr, + r->r_offset, NULL, GELF_R_TYPE (r->r_info), GELF_R_SYM (r->r_info)); - check_badreltype (); + check_badreltype (&first_badreltype, mod, &result); if (partial) switch (result) { @@ -496,10 +624,11 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, &rela_mem); if (r == NULL) return DWFL_E_LIBELF; - result = relocate (r->r_offset, &r->r_addend, + result = relocate (mod, relocated, reloc_symtab, tdata, ehdr, + r->r_offset, &r->r_addend, GELF_R_TYPE (r->r_info), GELF_R_SYM (r->r_info)); - check_badreltype (); + check_badreltype (&first_badreltype, mod, &result); if (partial) switch (result) { diff --git a/libdwfl/segment.c b/libdwfl/segment.c index 9276917..2983cf2 100644 --- a/libdwfl/segment.c +++ b/libdwfl/segment.c @@ -1,5 +1,5 @@ /* Manage address space lookup table for libdwfl. - Copyright (C) 2008, 2009, 2010, 2013 Red Hat, Inc. + Copyright (C) 2008, 2009, 2010, 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -50,7 +50,8 @@ static bool insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx) { bool need_start = (i == 0 || dwfl->lookup_addr[i - 1] != start); - bool need_end = (i >= dwfl->lookup_elts || dwfl->lookup_addr[i + 1] != end); + bool need_end = (i + 1 >= dwfl->lookup_elts + || dwfl->lookup_addr[i + 1] != end); size_t need = need_start + need_end; if (need == 0) return false; diff --git a/libebl/ChangeLog b/libebl/ChangeLog index 5ec7101..aa3d686 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,72 @@ +2016-01-09 Mark Wielaard + + * eblobjnote.c (ebl_object_note): Add brackets around if statement + body. + +2015-12-18 Mark Wielaard + + * eblopenbackend.c (default_debugscn_p): Also match .zdebug sections. + +2015-12-08 Jose E. Marchesi + + * libebl.h: Prototype for ebl_ra_offset. + * eblabicfi.c (ebl_ra_offset): New function. + * libeblP.h (struct ebl): new field ra_offset; + +2015-09-24 Jose E. Marchesi + + * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid + relocation overflows in some platforms. + +2015-09-22 Mark Wielaard + + * *.c: Remove old-style function definitions. + +2015-09-09 Chih-Hung Hsieh + + * ebldwarftoregno.c (ebl_dwarf_to_regno): Remove redundant NULL tests + on parameters declared with __nonnull_attribute__. + * eblinitreg.c (ebl_frame_nregs): Likewise. + * eblnormalizepc.c (ebl_normalize_pc): Likewise. + * eblunwind.c (ebl_unwind): Likewise. + +2015-09-04 Chih-Hung Hsieh + + * eblopenbackend.c (ebl_openbackend_machine): Replace K&R function + definition with ansi-C definitions. + * eblstother.c (ebl_check_st_other_bits): Likewise. + +2015-06-12 Mark Wielaard + + * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Allow + SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY. + +2015-05-17 Mark Wielaard + + * eblobjnote.c (ebl_object_note): If allocation buf is large, then + allocate it with malloc. + +2015-05-17 Mark Wielaard + + * eblopenbackend.c (MAX_PREFIX_LEN): New define (16). + (openbackend): Stack allocate symname array using MAX_PREFIX_LEN. + +2015-01-27 Mark Wielaard + + * libebl.h: Add comment from README that this is completely + UNSUPPORTED. + +2014-11-22 Mark Wielaard + + * ebl-hooks.h (bss_plt_p): Remove ehdr argument. + * eblbsspltp.c (ebl_bss_plt_p): Likewise. + * eblopenbackend.c (default_bss_plt_p): Likewise. + * libebl.h (ebl_bss_plt_p): Likewise. + +2014-11-17 Mark Wielaard + + * ebldebugscnp.c (ebl_debugscn_p): Check name is not NULL. + 2014-06-17 Mark Wielaard * eblinitreg.c (ebl_func_addr_mask): New function. diff --git a/libebl/Makefile.am b/libebl/Makefile.am index ec4477b..6b41a3e 100644 --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@ -28,7 +28,7 @@ ## not, see . ## include $(top_srcdir)/config/eu.am -AM_CFLAGS += -fpic +AM_CFLAGS += -fPIC AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm VERSION = 1 LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ diff --git a/libebl/Makefile.in b/libebl/Makefile.in index 9340618..e43c497 100644 --- a/libebl/Makefile.in +++ b/libebl/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,9 +89,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING subdir = libebl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ @@ -90,6 +98,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -123,7 +133,6 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LIBRARIES = $(lib_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -214,6 +223,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -223,6 +234,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -242,6 +254,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -253,6 +268,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -296,6 +312,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -342,12 +359,27 @@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(srcdir)/../libelf -I$(srcdir)/../libdw \ -I$(srcdir)/../libasm -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \ + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 +AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes $(if \ $($(*F)_no_Werror),,-Werror) $(if \ - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic + $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ + $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ + $($(*F)_CFLAGS) -fPIC COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda $(am_libebl_pic_a_OBJECTS) -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi lib_LIBRARIES = libebl.a pkginclude_HEADERS = libebl.h gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \ @@ -388,7 +420,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libebl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libebl/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -397,7 +428,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -509,14 +540,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ @@ -745,15 +776,20 @@ uninstall-am: uninstall-libLIBRARIES uninstall-pkgincludeHEADERS uninstall-am uninstall-libLIBRARIES \ uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h index e1186f8..2e31446 100644 --- a/libebl/ebl-hooks.h +++ b/libebl/ebl-hooks.h @@ -132,7 +132,7 @@ bool EBLHOOK(check_special_symbol) (Elf *, GElf_Ehdr *, const GElf_Sym *, bool EBLHOOK(check_st_other_bits) (unsigned char st_other); /* Check if backend uses a bss PLT in this file. */ -bool EBLHOOK(bss_plt_p) (Elf *, GElf_Ehdr *); +bool EBLHOOK(bss_plt_p) (Elf *); /* Return location expression to find return value given the DW_AT_type DIE of a DW_TAG_subprogram DIE. */ diff --git a/libebl/ebl_check_special_section.c b/libebl/ebl_check_special_section.c index aabe44e..903b69d 100644 --- a/libebl/ebl_check_special_section.c +++ b/libebl/ebl_check_special_section.c @@ -34,11 +34,8 @@ bool -ebl_check_special_section (ebl, ndx, shdr, sname) - Ebl *ebl; - int ndx; - const GElf_Shdr *shdr; - const char *sname; +ebl_check_special_section (Ebl *ebl, int ndx, const GElf_Shdr *shdr, + const char *sname) { return ebl != NULL && ebl->check_special_section (ebl, ndx, shdr, sname); } diff --git a/libebl/ebl_check_special_symbol.c b/libebl/ebl_check_special_symbol.c index 8e702ba..bdcb026 100644 --- a/libebl/ebl_check_special_symbol.c +++ b/libebl/ebl_check_special_symbol.c @@ -35,12 +35,8 @@ bool -ebl_check_special_symbol (ebl, ehdr, sym, name, destshdr) - Ebl *ebl; - GElf_Ehdr *ehdr; - const GElf_Sym *sym; - const char *name; - const GElf_Shdr *destshdr; +ebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym, + const char *name, const GElf_Shdr *destshdr) { if (ebl == NULL) return false; diff --git a/libebl/ebl_syscall_abi.c b/libebl/ebl_syscall_abi.c index de73703..a25369d 100644 --- a/libebl/ebl_syscall_abi.c +++ b/libebl/ebl_syscall_abi.c @@ -34,12 +34,7 @@ int -ebl_syscall_abi (ebl, sp, pc, callno, args) - Ebl *ebl; - int *sp; - int *pc; - int *callno; - int args[6]; +ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, int *callno, int *args) { return ebl != NULL ? ebl->syscall_abi (ebl, sp, pc, callno, args) : -1; } diff --git a/libebl/eblabicfi.c b/libebl/eblabicfi.c index 20a29ea..8bf189f 100644 --- a/libebl/eblabicfi.c +++ b/libebl/eblabicfi.c @@ -34,9 +34,13 @@ int -ebl_abi_cfi (ebl, abi_info) - Ebl *ebl; - Dwarf_CIE *abi_info; +ebl_abi_cfi (Ebl *ebl, Dwarf_CIE *abi_info) { return ebl == NULL ? -1 : ebl->abi_cfi (ebl, abi_info); } + +int +ebl_ra_offset (Ebl *ebl) +{ + return ebl->ra_offset; +} diff --git a/libebl/eblauxvinfo.c b/libebl/eblauxvinfo.c index 5c310b2..ce1141b 100644 --- a/libebl/eblauxvinfo.c +++ b/libebl/eblauxvinfo.c @@ -85,11 +85,8 @@ static const struct #define nauxv_types (sizeof auxv_types / sizeof auxv_types[0]) int -ebl_auxv_info (ebl, a_type, name, format) - Ebl *ebl; - GElf_Xword a_type; - const char **name; - const char **format; +ebl_auxv_info (Ebl *ebl, GElf_Xword a_type, const char **name, + const char **format) { int result = ebl->auxv_info (a_type, name, format); if (result == 0 && a_type < nauxv_types && auxv_types[a_type].name != NULL) diff --git a/libebl/eblbackendname.c b/libebl/eblbackendname.c index 92e576e..a2b2df6 100644 --- a/libebl/eblbackendname.c +++ b/libebl/eblbackendname.c @@ -36,8 +36,7 @@ const char * -ebl_backend_name (ebl) - Ebl *ebl; +ebl_backend_name (Ebl *ebl) { return ebl != NULL ? ebl->emulation : gettext ("No backend"); } diff --git a/libebl/eblbsspltp.c b/libebl/eblbsspltp.c index 080e7c5..24c4a08 100644 --- a/libebl/eblbsspltp.c +++ b/libebl/eblbsspltp.c @@ -1,5 +1,5 @@ /* Check if backend uses a bss PLT. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -35,9 +35,7 @@ bool -ebl_bss_plt_p (ebl, ehdr) - Ebl *ebl; - GElf_Ehdr *ehdr; +ebl_bss_plt_p (Ebl *ebl) { - return ebl == NULL ? false : ebl->bss_plt_p (ebl->elf, ehdr); + return ebl == NULL ? false : ebl->bss_plt_p (ebl->elf); } diff --git a/libebl/eblcheckobjattr.c b/libebl/eblcheckobjattr.c index b0481d2..b590a03 100644 --- a/libebl/eblcheckobjattr.c +++ b/libebl/eblcheckobjattr.c @@ -35,13 +35,9 @@ bool -ebl_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name) - Ebl *ebl; - const char *vendor; - int tag; - uint64_t value; - const char **tag_name; - const char **value_name; +ebl_check_object_attribute (Ebl *ebl, const char *vendor, int tag, + uint64_t value, const char **tag_name, + const char **value_name) { if (ebl->check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)) diff --git a/libebl/eblcheckreloctargettype.c b/libebl/eblcheckreloctargettype.c index e135f8a..e0d57c1 100644 --- a/libebl/eblcheckreloctargettype.c +++ b/libebl/eblcheckreloctargettype.c @@ -1,5 +1,5 @@ /* Check whether a section type is a valid target for relocation. - Copyright (C) 2014 Red Hat, Inc. + Copyright (C) 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -39,8 +39,16 @@ ebl_check_reloc_target_type (Ebl *ebl, Elf64_Word sh_type) if (ebl->check_reloc_target_type (ebl, sh_type)) return true; - if (sh_type == SHT_PROGBITS || sh_type == SHT_NOBITS) - return true; - - return false; + switch (sh_type) + { + case SHT_PROGBITS: + case SHT_NOBITS: + case SHT_INIT_ARRAY: + case SHT_FINI_ARRAY: + case SHT_PREINIT_ARRAY: + return true; + + default: + return false; + } } diff --git a/libebl/eblcopyrelocp.c b/libebl/eblcopyrelocp.c index 702f8c7..0458c4f 100644 --- a/libebl/eblcopyrelocp.c +++ b/libebl/eblcopyrelocp.c @@ -35,9 +35,7 @@ bool -ebl_copy_reloc_p (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_copy_reloc_p (Ebl *ebl, int reloc) { return ebl->copy_reloc_p (reloc); } diff --git a/libebl/eblcorenote.c b/libebl/eblcorenote.c index 2a79278..783f981 100644 --- a/libebl/eblcorenote.c +++ b/libebl/eblcorenote.c @@ -40,16 +40,10 @@ int -ebl_core_note (ebl, nhdr, name, - regs_offset, nregloc, reglocs, nitems, items) - Ebl *ebl; - const GElf_Nhdr *nhdr; - const char *name; - GElf_Word *regs_offset; - size_t *nregloc; - const Ebl_Register_Location **reglocs; - size_t *nitems; - const Ebl_Core_Item **items; +ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name, + GElf_Word *regs_offset, size_t *nregloc, + const Ebl_Register_Location **reglocs, size_t *nitems, + const Ebl_Core_Item **items) { int result = ebl->core_note (nhdr, name, regs_offset, nregloc, reglocs, nitems, items); diff --git a/libebl/eblcorenotetypename.c b/libebl/eblcorenotetypename.c index b6db6cd..826f9a1 100644 --- a/libebl/eblcorenotetypename.c +++ b/libebl/eblcorenotetypename.c @@ -36,11 +36,7 @@ #include const char * -ebl_core_note_type_name (ebl, type, buf, len) - Ebl *ebl; - uint32_t type; - char *buf; - size_t len; +ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len) { const char *res = ebl->core_note_type_name (type, buf, len); diff --git a/libebl/ebldebugscnp.c b/libebl/ebldebugscnp.c index f2351e2..2964fdb 100644 --- a/libebl/ebldebugscnp.c +++ b/libebl/ebldebugscnp.c @@ -1,5 +1,5 @@ /* Check section name for being that of a debug informatino section. - Copyright (C) 2002 Red Hat, Inc. + Copyright (C) 2002, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -36,9 +36,7 @@ bool -ebl_debugscn_p (ebl, name) - Ebl *ebl; - const char *name; +ebl_debugscn_p (Ebl *ebl, const char *name) { - return ebl->debugscn_p (name); + return name != NULL && ebl->debugscn_p (name); } diff --git a/libebl/ebldwarftoregno.c b/libebl/ebldwarftoregno.c index 8fb8540..c664496 100644 --- a/libebl/ebldwarftoregno.c +++ b/libebl/ebldwarftoregno.c @@ -35,7 +35,6 @@ bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno) { - if (ebl == NULL) - return false; + /* ebl is declared NN */ return ebl->dwarf_to_regno == NULL ? true : ebl->dwarf_to_regno (ebl, regno); } diff --git a/libebl/ebldynamictagcheck.c b/libebl/ebldynamictagcheck.c index 17acee0..c2311cc 100644 --- a/libebl/ebldynamictagcheck.c +++ b/libebl/ebldynamictagcheck.c @@ -36,9 +36,7 @@ bool -ebl_dynamic_tag_check (ebl, tag) - Ebl *ebl; - int64_t tag; +ebl_dynamic_tag_check (Ebl *ebl, int64_t tag) { bool res = ebl != NULL ? ebl->dynamic_tag_check (tag) : false; diff --git a/libebl/ebldynamictagname.c b/libebl/ebldynamictagname.c index 6b09ee6..3aaccd0 100644 --- a/libebl/ebldynamictagname.c +++ b/libebl/ebldynamictagname.c @@ -37,11 +37,7 @@ const char * -ebl_dynamic_tag_name (ebl, tag, buf, len) - Ebl *ebl; - int64_t tag; - char *buf; - size_t len; +ebl_dynamic_tag_name (Ebl *ebl, int64_t tag, char *buf, size_t len) { const char *res = ebl != NULL ? ebl->dynamic_tag_name (tag, buf, len) : NULL; diff --git a/libebl/eblelfclass.c b/libebl/eblelfclass.c index 62d1283..2ffef30 100644 --- a/libebl/eblelfclass.c +++ b/libebl/eblelfclass.c @@ -35,8 +35,7 @@ int -ebl_get_elfclass (ebl) - Ebl *ebl; +ebl_get_elfclass (Ebl *ebl) { return ebl->class; } diff --git a/libebl/eblelfdata.c b/libebl/eblelfdata.c index b09dbb5..072924b 100644 --- a/libebl/eblelfdata.c +++ b/libebl/eblelfdata.c @@ -35,8 +35,7 @@ int -ebl_get_elfdata (ebl) - Ebl *ebl; +ebl_get_elfdata (Ebl *ebl) { return ebl->data; } diff --git a/libebl/eblelfmachine.c b/libebl/eblelfmachine.c index cd961e7..c2c8627 100644 --- a/libebl/eblelfmachine.c +++ b/libebl/eblelfmachine.c @@ -35,8 +35,7 @@ int -ebl_get_elfmachine (ebl) - Ebl *ebl; +ebl_get_elfmachine (Ebl *ebl) { return ebl->machine; } diff --git a/libebl/eblgotpcreloccheck.c b/libebl/eblgotpcreloccheck.c index 55625de..7c9c079 100644 --- a/libebl/eblgotpcreloccheck.c +++ b/libebl/eblgotpcreloccheck.c @@ -36,9 +36,7 @@ bool -ebl_gotpc_reloc_check (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_gotpc_reloc_check (Ebl *ebl, int reloc) { return ebl != NULL ? ebl->gotpc_reloc_check (ebl->elf, reloc) : false; } diff --git a/libebl/eblinitreg.c b/libebl/eblinitreg.c index 5729b3c..8a3fb18 100644 --- a/libebl/eblinitreg.c +++ b/libebl/eblinitreg.c @@ -47,7 +47,8 @@ ebl_set_initial_registers_tid (Ebl *ebl, pid_t tid, size_t ebl_frame_nregs (Ebl *ebl) { - return ebl == NULL ? 0 : ebl->frame_nregs; + /* ebl is declared NN */ + return ebl->frame_nregs; } GElf_Addr diff --git a/libebl/eblmachineflagcheck.c b/libebl/eblmachineflagcheck.c index d6d7931..e98b600 100644 --- a/libebl/eblmachineflagcheck.c +++ b/libebl/eblmachineflagcheck.c @@ -35,9 +35,7 @@ bool -ebl_machine_flag_check (ebl, flags) - Ebl *ebl; - Elf64_Word flags; +ebl_machine_flag_check (Ebl *ebl, Elf64_Word flags) { return ebl != NULL ? ebl->machine_flag_check (flags) : (flags == 0); } diff --git a/libebl/eblmachineflagname.c b/libebl/eblmachineflagname.c index e392f5a..6079a61 100644 --- a/libebl/eblmachineflagname.c +++ b/libebl/eblmachineflagname.c @@ -37,11 +37,7 @@ const char * -ebl_machine_flag_name (ebl, flags, buf, len) - Ebl *ebl; - Elf64_Word flags; - char *buf; - size_t len; +ebl_machine_flag_name (Ebl *ebl, Elf64_Word flags, char *buf, size_t len) { const char *res; diff --git a/libebl/eblmachinesectionflagcheck.c b/libebl/eblmachinesectionflagcheck.c index 671eb8c..a73b230 100644 --- a/libebl/eblmachinesectionflagcheck.c +++ b/libebl/eblmachinesectionflagcheck.c @@ -34,9 +34,7 @@ bool -ebl_machine_section_flag_check (ebl, flags) - Ebl *ebl; - GElf_Xword flags; +ebl_machine_section_flag_check (Ebl *ebl, GElf_Xword flags) { return ebl != NULL ? ebl->machine_section_flag_check (flags) : (flags == 0); } diff --git a/libebl/eblnonerelocp.c b/libebl/eblnonerelocp.c index 07c6b0e..e51a3b0 100644 --- a/libebl/eblnonerelocp.c +++ b/libebl/eblnonerelocp.c @@ -35,9 +35,7 @@ bool -ebl_none_reloc_p (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_none_reloc_p (Ebl *ebl, int reloc) { return ebl->none_reloc_p (reloc); } diff --git a/libebl/eblnormalizepc.c b/libebl/eblnormalizepc.c index a5fea77..1629353 100644 --- a/libebl/eblnormalizepc.c +++ b/libebl/eblnormalizepc.c @@ -35,6 +35,7 @@ void ebl_normalize_pc (Ebl *ebl, Dwarf_Addr *pc) { - if (ebl != NULL && ebl->normalize_pc != NULL) + /* ebl is declared NN */ + if (ebl->normalize_pc != NULL) ebl->normalize_pc (ebl, pc); } diff --git a/libebl/eblobjecttypename.c b/libebl/eblobjecttypename.c index 1a2c8e8..b0fd372 100644 --- a/libebl/eblobjecttypename.c +++ b/libebl/eblobjecttypename.c @@ -36,11 +36,7 @@ const char * -ebl_object_type_name (ebl, object, buf, len) - Ebl *ebl; - int object; - char *buf; - size_t len; +ebl_object_type_name (Ebl *ebl, int object, char *buf, size_t len) { const char *res; diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c index d1fe821..f80a1a5 100644 --- a/libebl/eblobjnote.c +++ b/libebl/eblobjnote.c @@ -1,5 +1,5 @@ /* Print contents of object file note. - Copyright (C) 2002, 2007, 2009, 2011 Red Hat, Inc. + Copyright (C) 2002, 2007, 2009, 2011, 2015, 2016 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -33,188 +33,201 @@ #include #include +#include #include #include void -ebl_object_note (ebl, name, type, descsz, desc) - Ebl *ebl; - const char *name; - uint32_t type; - uint32_t descsz; - const char *desc; +ebl_object_note (Ebl *ebl, const char *name, uint32_t type, + uint32_t descsz, const char *desc) { if (! ebl->object_note (name, type, descsz, desc)) - /* The machine specific function did not know this type. */ + { + /* The machine specific function did not know this type. */ - if (strcmp ("stapsdt", name) == 0) - { - if (type != 3) - { - printf (gettext ("unknown SDT version %u\n"), type); - return; - } - - /* Descriptor starts with three addresses, pc, base ref and - semaphore. Then three zero terminated strings provider, - name and arguments. */ - - union + if (strcmp ("stapsdt", name) == 0) { - Elf64_Addr a64[3]; - Elf32_Addr a32[3]; - } addrs; + if (type != 3) + { + printf (gettext ("unknown SDT version %u\n"), type); + return; + } - size_t addrs_size = gelf_fsize (ebl->elf, ELF_T_ADDR, 3, EV_CURRENT); - if (descsz < addrs_size + 3) - { - invalid_sdt: - printf (gettext ("invalid SDT probe descriptor\n")); - return; - } + /* Descriptor starts with three addresses, pc, base ref and + semaphore. Then three zero terminated strings provider, + name and arguments. */ - Elf_Data src = + union { - .d_type = ELF_T_ADDR, .d_version = EV_CURRENT, - .d_buf = (void *) desc, .d_size = addrs_size - }; - - Elf_Data dst = - { - .d_type = ELF_T_ADDR, .d_version = EV_CURRENT, - .d_buf = &addrs, .d_size = addrs_size - }; - - if (gelf_xlatetom (ebl->elf, &dst, &src, - elf_getident (ebl->elf, NULL)[EI_DATA]) == NULL) - { - printf ("%s\n", elf_errmsg (-1)); - return; - } - - const char *provider = desc + addrs_size; - const char *pname = memchr (provider, '\0', desc + descsz - provider); - if (pname == NULL) - goto invalid_sdt; - - ++pname; - const char *args = memchr (pname, '\0', desc + descsz - pname); - if (args == NULL || - memchr (++args, '\0', desc + descsz - pname) != desc + descsz - 1) - goto invalid_sdt; - - GElf_Addr pc; - GElf_Addr base; - GElf_Addr sem; - if (gelf_getclass (ebl->elf) == ELFCLASS32) - { - pc = addrs.a32[0]; - base = addrs.a32[1]; - sem = addrs.a32[2]; - } - else - { - pc = addrs.a64[0]; - base = addrs.a64[1]; - sem = addrs.a64[2]; - } - - printf (gettext (" PC: ")); - printf ("%#" PRIx64 ",", pc); - printf (gettext (" Base: ")); - printf ("%#" PRIx64 ",", base); - printf (gettext (" Semaphore: ")); - printf ("%#" PRIx64 "\n", sem); - printf (gettext (" Provider: ")); - printf ("%s,", provider); - printf (gettext (" Name: ")); - printf ("%s,", pname); - printf (gettext (" Args: ")); - printf ("'%s'\n", args); - return; - } - - switch (type) - { - case NT_GNU_BUILD_ID: - if (strcmp (name, "GNU") == 0 && descsz > 0) - { - printf (gettext (" Build ID: ")); - uint_fast32_t i; - for (i = 0; i < descsz - 1; ++i) - printf ("%02" PRIx8, (uint8_t) desc[i]); - printf ("%02" PRIx8 "\n", (uint8_t) desc[i]); - } - break; - - case NT_GNU_GOLD_VERSION: - if (strcmp (name, "GNU") == 0 && descsz > 0) - /* A non-null terminated version string. */ - printf (gettext (" Linker version: %.*s\n"), - (int) descsz, desc); - break; - - case NT_GNU_ABI_TAG: - if (strcmp (name, "GNU") == 0 && descsz >= 8 && descsz % 4 == 0) - { - Elf_Data in = - { - .d_version = EV_CURRENT, - .d_type = ELF_T_WORD, - .d_size = descsz, - .d_buf = (void *) desc - }; - uint32_t buf[descsz / 4]; - Elf_Data out = - { - .d_version = EV_CURRENT, - .d_type = ELF_T_WORD, - .d_size = descsz, - .d_buf = buf - }; - - if (elf32_xlatetom (&out, &in, ebl->data) != NULL) - { - const char *os; - switch (buf[0]) - { - case ELF_NOTE_OS_LINUX: - os = "Linux"; - break; - - case ELF_NOTE_OS_GNU: - os = "GNU"; - break; - - case ELF_NOTE_OS_SOLARIS2: - os = "Solaris"; - break; - - case ELF_NOTE_OS_FREEBSD: - os = "FreeBSD"; - break; - - default: - os = "???"; - break; - } - - printf (gettext (" OS: %s, ABI: "), os); - for (size_t cnt = 1; cnt < descsz / 4; ++cnt) - { - if (cnt > 1) - putchar_unlocked ('.'); - printf ("%" PRIu32, buf[cnt]); - } - putchar_unlocked ('\n'); - } - break; - } - /* FALLTHROUGH */ - - default: - /* Unknown type. */ - break; - } + Elf64_Addr a64[3]; + Elf32_Addr a32[3]; + } addrs; + + size_t addrs_size = gelf_fsize (ebl->elf, ELF_T_ADDR, 3, EV_CURRENT); + if (descsz < addrs_size + 3) + { + invalid_sdt: + printf (gettext ("invalid SDT probe descriptor\n")); + return; + } + + Elf_Data src = + { + .d_type = ELF_T_ADDR, .d_version = EV_CURRENT, + .d_buf = (void *) desc, .d_size = addrs_size + }; + + Elf_Data dst = + { + .d_type = ELF_T_ADDR, .d_version = EV_CURRENT, + .d_buf = &addrs, .d_size = addrs_size + }; + + if (gelf_xlatetom (ebl->elf, &dst, &src, + elf_getident (ebl->elf, NULL)[EI_DATA]) == NULL) + { + printf ("%s\n", elf_errmsg (-1)); + return; + } + + const char *provider = desc + addrs_size; + const char *pname = memchr (provider, '\0', desc + descsz - provider); + if (pname == NULL) + goto invalid_sdt; + + ++pname; + const char *args = memchr (pname, '\0', desc + descsz - pname); + if (args == NULL || + memchr (++args, '\0', desc + descsz - pname) != desc + descsz - 1) + goto invalid_sdt; + + GElf_Addr pc; + GElf_Addr base; + GElf_Addr sem; + if (gelf_getclass (ebl->elf) == ELFCLASS32) + { + pc = addrs.a32[0]; + base = addrs.a32[1]; + sem = addrs.a32[2]; + } + else + { + pc = addrs.a64[0]; + base = addrs.a64[1]; + sem = addrs.a64[2]; + } + + printf (gettext (" PC: ")); + printf ("%#" PRIx64 ",", pc); + printf (gettext (" Base: ")); + printf ("%#" PRIx64 ",", base); + printf (gettext (" Semaphore: ")); + printf ("%#" PRIx64 "\n", sem); + printf (gettext (" Provider: ")); + printf ("%s,", provider); + printf (gettext (" Name: ")); + printf ("%s,", pname); + printf (gettext (" Args: ")); + printf ("'%s'\n", args); + return; + } + + switch (type) + { + case NT_GNU_BUILD_ID: + if (strcmp (name, "GNU") == 0 && descsz > 0) + { + printf (gettext (" Build ID: ")); + uint_fast32_t i; + for (i = 0; i < descsz - 1; ++i) + printf ("%02" PRIx8, (uint8_t) desc[i]); + printf ("%02" PRIx8 "\n", (uint8_t) desc[i]); + } + break; + + case NT_GNU_GOLD_VERSION: + if (strcmp (name, "GNU") == 0 && descsz > 0) + /* A non-null terminated version string. */ + printf (gettext (" Linker version: %.*s\n"), + (int) descsz, desc); + break; + + case NT_GNU_ABI_TAG: + if (strcmp (name, "GNU") == 0 && descsz >= 8 && descsz % 4 == 0) + { + Elf_Data in = + { + .d_version = EV_CURRENT, + .d_type = ELF_T_WORD, + .d_size = descsz, + .d_buf = (void *) desc + }; + /* Normally NT_GNU_ABI_TAG is just 4 words (16 bytes). If it + is much (4*) larger dynamically allocate memory to convert. */ +#define FIXED_TAG_BYTES 16 + uint32_t sbuf[FIXED_TAG_BYTES]; + uint32_t *buf; + if (unlikely (descsz / 4 > FIXED_TAG_BYTES)) + { + buf = malloc (descsz); + if (unlikely (buf == NULL)) + return; + } + else + buf = sbuf; + Elf_Data out = + { + .d_version = EV_CURRENT, + .d_type = ELF_T_WORD, + .d_size = descsz, + .d_buf = buf + }; + + if (elf32_xlatetom (&out, &in, ebl->data) != NULL) + { + const char *os; + switch (buf[0]) + { + case ELF_NOTE_OS_LINUX: + os = "Linux"; + break; + + case ELF_NOTE_OS_GNU: + os = "GNU"; + break; + + case ELF_NOTE_OS_SOLARIS2: + os = "Solaris"; + break; + + case ELF_NOTE_OS_FREEBSD: + os = "FreeBSD"; + break; + + default: + os = "???"; + break; + } + + printf (gettext (" OS: %s, ABI: "), os); + for (size_t cnt = 1; cnt < descsz / 4; ++cnt) + { + if (cnt > 1) + putchar_unlocked ('.'); + printf ("%" PRIu32, buf[cnt]); + } + putchar_unlocked ('\n'); + } + if (descsz / 4 > FIXED_TAG_BYTES) + free (buf); + break; + } + /* FALLTHROUGH */ + + default: + /* Unknown type. */ + break; + } + } } diff --git a/libebl/eblobjnotetypename.c b/libebl/eblobjnotetypename.c index 8a70e61..8e2e329 100644 --- a/libebl/eblobjnotetypename.c +++ b/libebl/eblobjnotetypename.c @@ -38,12 +38,8 @@ const char * -ebl_object_note_type_name (ebl, name, type, buf, len) - Ebl *ebl; - const char *name; - uint32_t type; - char *buf; - size_t len; +ebl_object_note_type_name (Ebl *ebl, const char *name, uint32_t type, + char *buf, size_t len) { const char *res = ebl->object_note_type_name (name, type, buf, len); diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index bd94759..372ef2a 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -1,5 +1,5 @@ /* Generate ELF backend handle. - Copyright (C) 2000-2014 Red Hat, Inc. + Copyright (C) 2000-2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -135,6 +135,8 @@ static const struct }; #define nmachines (sizeof (machines) / sizeof (machines[0])) +/* No machine prefix should be larger than this. */ +#define MAX_PREFIX_LEN 16 /* Default callbacks. Mostly they just return the error value. */ static const char *default_object_type_name (int ignore, char *buf, @@ -186,7 +188,7 @@ static bool default_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, static bool default_check_st_other_bits (unsigned char st_other); static bool default_check_special_section (Ebl *, int, const GElf_Shdr *, const char *); -static bool default_bss_plt_p (Elf *elf, GElf_Ehdr *ehdr); +static bool default_bss_plt_p (Elf *elf); static int default_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locops); static ssize_t default_register_info (Ebl *ebl, @@ -252,10 +254,7 @@ fill_defaults (Ebl *result) /* Find an appropriate backend for the file associated with ELF. */ static Ebl * -openbackend (elf, emulation, machine) - Elf *elf; - const char *emulation; - GElf_Half machine; +openbackend (Elf *elf, const char *emulation, GElf_Half machine) { Ebl *result; size_t cnt; @@ -343,7 +342,11 @@ openbackend (elf, emulation, machine) static const char version[] = MODVERSION; const char *modversion; ebl_bhinit_t initp; - char symname[machines[cnt].prefix_len + sizeof "_init"]; + + // We use a static number to help the compiler see we don't + // overflow the stack with an arbitrary number. + assert (machines[cnt].prefix_len <= MAX_PREFIX_LEN); + char symname[MAX_PREFIX_LEN + sizeof "_init"]; strcpy (mempcpy (symname, machines[cnt].prefix, machines[cnt].prefix_len), "_init"); @@ -391,8 +394,7 @@ openbackend (elf, emulation, machine) /* Find an appropriate backend for the file associated with ELF. */ Ebl * -ebl_openbackend (elf) - Elf *elf; +ebl_openbackend (Elf *elf) { GElf_Ehdr ehdr_mem; GElf_Ehdr *ehdr; @@ -412,8 +414,7 @@ ebl_openbackend (elf) /* Find backend without underlying ELF file. */ Ebl * -ebl_openbackend_machine (machine) - GElf_Half machine; +ebl_openbackend_machine (GElf_Half machine) { return openbackend (NULL, NULL, machine); } @@ -661,7 +662,9 @@ default_debugscn_p (const char *name) const size_t ndwarf_scn_names = (sizeof (dwarf_scn_names) / sizeof (dwarf_scn_names[0])); for (size_t cnt = 0; cnt < ndwarf_scn_names; ++cnt) - if (strcmp (name, dwarf_scn_names[cnt]) == 0) + if (strcmp (name, dwarf_scn_names[cnt]) == 0 + || (strncmp (name, ".zdebug", strlen (".zdebug")) == 0 + && strcmp (&name[2], &dwarf_scn_names[cnt][1]) == 0)) return true; return false; @@ -693,8 +696,7 @@ default_check_st_other_bits (unsigned char st_other __attribute__ ((unused))) static bool -default_bss_plt_p (Elf *elf __attribute__ ((unused)), - GElf_Ehdr *ehdr __attribute__ ((unused))) +default_bss_plt_p (Elf *elf __attribute__ ((unused))) { return false; } diff --git a/libebl/eblosabiname.c b/libebl/eblosabiname.c index 3ea6f56..b60f2af 100644 --- a/libebl/eblosabiname.c +++ b/libebl/eblosabiname.c @@ -36,11 +36,7 @@ const char * -ebl_osabi_name (ebl, osabi, buf, len) - Ebl *ebl; - int osabi; - char *buf; - size_t len; +ebl_osabi_name (Ebl *ebl, int osabi, char *buf, size_t len) { const char *res = ebl != NULL ? ebl->osabi_name (osabi, buf, len) : NULL; diff --git a/libebl/eblreginfo.c b/libebl/eblreginfo.c index f213b4a..acc4849 100644 --- a/libebl/eblreginfo.c +++ b/libebl/eblreginfo.c @@ -35,15 +35,9 @@ ssize_t -ebl_register_info (ebl, regno, name, namelen, prefix, setname, bits, type) - Ebl *ebl; - int regno; - char *name; - size_t namelen; - const char **prefix; - const char **setname; - int *bits; - int *type; +ebl_register_info (Ebl *ebl, int regno, char *name, size_t namelen, + const char **prefix, const char **setname, + int *bits, int *type) { return ebl == NULL ? -1 : ebl->register_info (ebl, regno, name, namelen, prefix, setname, bits, type); diff --git a/libebl/eblrelativerelocp.c b/libebl/eblrelativerelocp.c index 297caec..51f5dce 100644 --- a/libebl/eblrelativerelocp.c +++ b/libebl/eblrelativerelocp.c @@ -35,9 +35,7 @@ bool -ebl_relative_reloc_p (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_relative_reloc_p (Ebl *ebl, int reloc) { return ebl->relative_reloc_p (reloc); } diff --git a/libebl/eblrelocsimpletype.c b/libebl/eblrelocsimpletype.c index 085fc93..9bd2928 100644 --- a/libebl/eblrelocsimpletype.c +++ b/libebl/eblrelocsimpletype.c @@ -34,9 +34,7 @@ Elf_Type -ebl_reloc_simple_type (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_reloc_simple_type (Ebl *ebl, int reloc) { return ebl != NULL ? ebl->reloc_simple_type (ebl, reloc) : ELF_T_NUM; } diff --git a/libebl/eblreloctypecheck.c b/libebl/eblreloctypecheck.c index e322ace..80e67ef 100644 --- a/libebl/eblreloctypecheck.c +++ b/libebl/eblreloctypecheck.c @@ -35,9 +35,7 @@ bool -ebl_reloc_type_check (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_reloc_type_check (Ebl *ebl, int reloc) { return ebl != NULL ? ebl->reloc_type_check (reloc) : false; } diff --git a/libebl/eblreloctypename.c b/libebl/eblreloctypename.c index fb39101..e53ec0c 100644 --- a/libebl/eblreloctypename.c +++ b/libebl/eblreloctypename.c @@ -36,11 +36,7 @@ const char * -ebl_reloc_type_name (ebl, reloc, buf, len) - Ebl *ebl; - int reloc; - char *buf; - size_t len; +ebl_reloc_type_name (Ebl *ebl, int reloc, char *buf, size_t len) { const char *res; diff --git a/libebl/eblrelocvaliduse.c b/libebl/eblrelocvaliduse.c index 62c4ae7..f0bed34 100644 --- a/libebl/eblrelocvaliduse.c +++ b/libebl/eblrelocvaliduse.c @@ -35,9 +35,7 @@ bool -ebl_reloc_valid_use (ebl, reloc) - Ebl *ebl; - int reloc; +ebl_reloc_valid_use (Ebl *ebl, int reloc) { return ebl != NULL ? ebl->reloc_valid_use (ebl->elf, reloc) : false; } diff --git a/libebl/eblretval.c b/libebl/eblretval.c index 056a549..7c03982 100644 --- a/libebl/eblretval.c +++ b/libebl/eblretval.c @@ -35,10 +35,8 @@ int -ebl_return_value_location (ebl, functypedie, locops) - Ebl *ebl; - Dwarf_Die *functypedie; - const Dwarf_Op **locops; +ebl_return_value_location (Ebl *ebl, Dwarf_Die *functypedie, + const Dwarf_Op **locops) { return ebl == NULL ? -1 : ebl->return_value_location (functypedie, locops); } diff --git a/libebl/eblsectionname.c b/libebl/eblsectionname.c index 81c7add..21c537f 100644 --- a/libebl/eblsectionname.c +++ b/libebl/eblsectionname.c @@ -36,14 +36,8 @@ const char * -ebl_section_name (ebl, section, xsection, buf, len, scnnames, shnum) - Ebl *ebl; - int section; - int xsection; - char *buf; - size_t len; - const char *scnnames[]; - size_t shnum; +ebl_section_name (Ebl *ebl, int section, int xsection, char *buf, size_t len, + const char *scnnames[], size_t shnum) { const char *res = ebl != NULL ? ebl->section_name (section, xsection, buf, len) : NULL; diff --git a/libebl/eblsectiontypename.c b/libebl/eblsectiontypename.c index 3a30cd6..5dc1ec6 100644 --- a/libebl/eblsectiontypename.c +++ b/libebl/eblsectiontypename.c @@ -36,11 +36,7 @@ const char * -ebl_section_type_name (ebl, section, buf, len) - Ebl *ebl; - int section; - char *buf; - size_t len; +ebl_section_type_name (Ebl *ebl, int section, char *buf, size_t len) { const char *res = ebl->section_type_name (section, buf, len); diff --git a/libebl/eblsegmenttypename.c b/libebl/eblsegmenttypename.c index 3cad66e..14eda76 100644 --- a/libebl/eblsegmenttypename.c +++ b/libebl/eblsegmenttypename.c @@ -36,11 +36,7 @@ const char * -ebl_segment_type_name (ebl, segment, buf, len) - Ebl *ebl; - int segment; - char *buf; - size_t len; +ebl_segment_type_name (Ebl *ebl, int segment, char *buf, size_t len) { const char *res; diff --git a/libebl/eblshflagscombine.c b/libebl/eblshflagscombine.c index 87625f8..4deaaaa 100644 --- a/libebl/eblshflagscombine.c +++ b/libebl/eblshflagscombine.c @@ -35,10 +35,7 @@ GElf_Word -ebl_sh_flags_combine (ebl, flags1, flags2) - Ebl *ebl; - GElf_Word flags1; - GElf_Word flags2; +ebl_sh_flags_combine (Ebl *ebl, GElf_Word flags1, GElf_Word flags2) { return ebl->sh_flags_combine (flags1, flags2); } diff --git a/libebl/eblstother.c b/libebl/eblstother.c index ccbf138..273f6fc 100644 --- a/libebl/eblstother.c +++ b/libebl/eblstother.c @@ -34,9 +34,7 @@ bool -ebl_check_st_other_bits (ebl, st_other) - Ebl *ebl; - unsigned char st_other; +ebl_check_st_other_bits (Ebl *ebl, unsigned char st_other) { return ((st_other ^ GELF_ST_VISIBILITY (st_other)) == 0 || ebl->check_st_other_bits (st_other ^ GELF_ST_VISIBILITY (st_other))); diff --git a/libebl/eblsymbolbindingname.c b/libebl/eblsymbolbindingname.c index fd5bfda..9797425 100644 --- a/libebl/eblsymbolbindingname.c +++ b/libebl/eblsymbolbindingname.c @@ -36,11 +36,7 @@ const char * -ebl_symbol_binding_name (ebl, binding, buf, len) - Ebl *ebl; - int binding; - char *buf; - size_t len; +ebl_symbol_binding_name (Ebl *ebl, int binding, char *buf, size_t len) { const char *res; diff --git a/libebl/eblsymboltypename.c b/libebl/eblsymboltypename.c index 4e653d2..09fa874 100644 --- a/libebl/eblsymboltypename.c +++ b/libebl/eblsymboltypename.c @@ -36,11 +36,7 @@ const char * -ebl_symbol_type_name (ebl, symbol, buf, len) - Ebl *ebl; - int symbol; - char *buf; - size_t len; +ebl_symbol_type_name (Ebl *ebl, int symbol, char *buf, size_t len) { const char *res; diff --git a/libebl/eblsysvhashentrysize.c b/libebl/eblsysvhashentrysize.c index f966646..2049431 100644 --- a/libebl/eblsysvhashentrysize.c +++ b/libebl/eblsysvhashentrysize.c @@ -35,8 +35,7 @@ int -ebl_sysvhash_entrysize (ebl) - Ebl *ebl; +ebl_sysvhash_entrysize (Ebl *ebl) { return ebl->sysvhash_entrysize; } diff --git a/libebl/eblunwind.c b/libebl/eblunwind.c index 1251c1b..2970d03 100644 --- a/libebl/eblunwind.c +++ b/libebl/eblunwind.c @@ -37,7 +37,8 @@ ebl_unwind (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc, ebl_tid_registers_get_t *getfunc, ebl_pid_memory_read_t *readfunc, void *arg, bool *signal_framep) { - if (ebl == NULL || ebl->unwind == NULL) + /* ebl is declared NN */ + if (ebl->unwind == NULL) return false; return ebl->unwind (ebl, pc, setfunc, getfunc, readfunc, arg, signal_framep); } diff --git a/libebl/libebl.h b/libebl/libebl.h index bb993bf..efcb6d6 100644 --- a/libebl/libebl.h +++ b/libebl/libebl.h @@ -1,5 +1,5 @@ /* Interface for libebl. - Copyright (C) 2000-2010, 2013, 2014 Red Hat, Inc. + Copyright (C) 2000-2010, 2013, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -26,6 +26,19 @@ the GNU Lesser General Public License along with this program. If not, see . */ + +/* This is the interface for the Elfutils Backend Library. + It is a completely UNSUPPORTED interface. Don't use any libebl + function directly. These are only for internal elfutils backends + and tools. There is NO source or binary compatible guarantee. + + The ABI of the backend modules is not guaranteed. Really, no guarantee + whatsoever. We are enforcing this in the code. The modules and their + users must match. No third-party EBL module are supported or allowed. + The only reason there are separate modules is to not have the code for + all architectures in all the binaries. */ + + #ifndef _LIBEBL_H #define _LIBEBL_H 1 @@ -201,7 +214,7 @@ extern bool ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, bool remove_comment, bool only_remove_debug); /* Check if backend uses a bss PLT in this file. */ -extern bool ebl_bss_plt_p (Ebl *ebl, GElf_Ehdr *ehdr); +extern bool ebl_bss_plt_p (Ebl *ebl); /* Return size of entry in SysV-style hash table. */ extern int ebl_sysvhash_entrysize (Ebl *ebl); @@ -409,6 +422,12 @@ extern bool ebl_set_initial_registers_tid (Ebl *ebl, extern size_t ebl_frame_nregs (Ebl *ebl) __nonnull_attribute__ (1); +/* Offset to apply to the value of the return_address_register, as + fetched from a Dwarf CFI. This is used by some backends, where the + return_address_register actually contains the call address. */ +extern int ebl_ra_offset (Ebl *ebl) + __nonnull_attribute__ (1); + /* Mask to use for function symbol or unwind return addresses in case the architecture adds some extra non-address bits to it. This is different from ebl_resolve_sym_value which only works for actual diff --git a/libebl/libeblP.h b/libebl/libeblP.h index dbd67f3..5b339b3 100644 --- a/libebl/libeblP.h +++ b/libebl/libeblP.h @@ -64,6 +64,12 @@ struct ebl Ebl architecture can unwind iff FRAME_NREGS > 0. */ size_t frame_nregs; + /* Offset to apply to the value of the return_address_register, as + fetched from a Dwarf CFI. This is used by some backends, where + the return_address_register actually contains the call + address. */ + int ra_offset; + /* Mask to use to turn a function value into a real function address in case the architecture adds some extra non-address bits to it. If not initialized (0) then ebl_func_addr_mask will return ~0, diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 4bc8f56..3a1fe91 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,420 @@ +2015-11-26 Mark Wielaard + + * elf_compress.c (__libelf_decompress_elf): New function, extracted + from... + (elf_compress): here. Check zdata_base use __libelf_decompress_elf. + * elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and + use zdata. + * libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align. + (__libelf_decompress_elf): New internal function definition. + +2015-10-21 Mark Wielaard + + * Makefile.am (libelf_a_SOURCES): Add elf_compress.c and + elf_compress_gnu.c. + * elf_compress.c: New file. + * elf_compress_gnu.c: Likewise. + * elf_begin.c (file_read_elf): Make a writable copy of the shdrs + for ELF_C_READ_MMAP. + * elf_end.c (elf_end): Free zdata_base. + * elf_error.c: Add ELF_E_ALREADY_COMPRESSED, + ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and + ELF_E_DECOMPRESS_ERROR. + * elf_data.c (__libelf_data_type): New internal function extracted + from convert_data. + (convert_data): Handle SHF_COMPRESSED. + * elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against + uncompressed section data size if SHF_COMPRESSED. + * elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for + ELF_C_READ_MMAP. + * libelf.h: Define elf_compress and elf_compress_gnu. + * libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu. + * libelfP.h: Add ELF_E_ALREADY_COMPRESSED, + ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and + ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type. + (__libelf_compress): New internal function definition. + (__libelf_decompress): Likewise. + (__libelf_reset_rawdata): Likewise. + (__libelf_data_type): Likewise. + (struct Elf_Scn): Add zdata_base. + +2015-11-19 Mark Wielaard + + * Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c, + elf64_getchdr.c and gelf_getchdr.c. + (noinst_HEADERS): Add chdr_xlate.h. + * abstract.h: Define Chdr32 and Chdr64. + * chdr_xlate.h: New file. + * elf32_getchdr.c: New file. + * elf64_getchdr.c: New file. + * elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE + and ELF_E_INVALID_SECTION_FLAGS. + * elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to + ELF_T_CHDR for SHF_COMPRESSED sections. + * exttypes.h: Add Chdr32 and Chdr64. + * gelf.h (GElf_Chdr): New typedef. + (gelf_getchdr): New function definition. + * gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR. + * gelf_getchdr.c: New file. + * gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr. + * gelf_xlate.h: Add Chdr. + * libelf.h (Elf_Type): Add ELF_T_CHDR. + (elf32_getchdr): New function definition. + (elf64_getchdr): Likewise. + * libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr, + elf64_getchdr and gelf_getchdr. + * libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE + and ELF_E_INVALID_SECTION_FLAGS. + +2015-10-16 Mark Wielaard + + * Makefile.am (libelf_so_LDLIBS): Add -lz. + +2015-10-14 Mark Wielaard + + * elf.h: Update from glibc. Add section compression constants and + structures. + +2015-10-20 Jose E. Marchesi + + * elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword. + Fix the size argument to pread_retry. + +2015-10-13 Chih-Hung Hsieh + + * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested + function 'fill_mmap' to file scope. + * elf_begin.c (elf_begin): Move nested function 'lock_dup_elf' + to file scope. + +2015-10-09 Josh Stone + + * libelf.h: Replace loff_t with int64_t throughout. + +2015-10-05 Mark Wielaard + + * elf_update.c (write_file): Only use posix_fallocate when using + mmap. Only report failure when errno is ENOSPC. + +2015-10-09 Josh Stone + + * libelfP.h (struct Elf): Replace off64_t with off_t. + * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise. + +2015-10-05 Chih-Hung Hsieh + + * elf_getarsym.c (elf_getarsym): Do not use + union of variable length arrays. + +2015-10-05 Josh Stone + + * Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers. + +2015-09-24 Jose E. Marchesi + + * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid + relocation overflows in some platforms. + +2015-09-29 Mark Wielaard + + * elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE. + (updatenull_wrlock): Always set e_shentsize. + +2015-09-23 Mark Wielaard + + * elf32_getehdr.c (getehdr_wrlock): Mark as internal_function. + * elf32_getshdr.c (getshdr_rdlock): Likewise. + (getshdr_wrlock): Likewise. + * elf_error.c (__libelf_seterrno): Likewise. + * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise. + (__elf_getphdrnum_chk_rdlock): Likewise. + * elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise. + (__elf_getphdrnum_chk_rdlock): Likewise. + * elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise. + * elf_readall.c (__libelf_readall): Likewise. + * gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise. + +2015-09-22 Mark Wielaard + + * *.c: Remove old-style function definitions. + +2015-06-22 Mark Wielaard + + * dl-hash.h: Update from glibc. + +2015-06-18 Mark Wielaard + + * elf32_updatefile.c (updatefile): Always free shdr_data and scns + when allocated on failure paths. + +2015-06-18 Mark Wielaard + + * nlist.c (nlist): Check symscn shdr exists before use. + +2015-06-16 Mark Wielaard + + * elf_update.c (write_file): Always also use ftruncate before + posix_fallocate to make sure file has the right size. + +2015-06-04 Mark Wielaard + + * elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR, + ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD, + ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV. + * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment + of rawdata against requested type. + +2015-06-02 Mark Wielaard + + * elf_getdata.c (convert_data): Make sure source data is properly + aligned for type before calling actual conversion function. + +2015-06-04 Mark Wielaard + + * elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before + direct access. + +2015-06-02 Mark Wielaard + + * elf_begin.c (file_read_elf): Split checks for ehdr and shdr + alignment, drop phdr alignment check. + +2015-05-31 Mark Wielaard + + * elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc, + not alloca and free after conversion when a copy needs to be made. + +2015-05-31 Mark Wielaard + + * elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not + alloca and free after conversion when a copy needs to be made. + +2015-05-31 Mark Wielaard + + * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with + malloc, not alloca also in !ALLOW_UNALIGNED case. + +2015-05-30 Mark Wielaard + + * gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size. + +2015-05-30 Mark Wielaard + + * elf32_updatefile.c (updatemmap): Only call mempcpy and update + last_position when d_size is non-zero. + +2015-05-17 Mark Wielaard + + * elf32_updatefile.c (updatefile): Allocate shdr_data and scns + with malloc, not alloca. Free after writing section headers. + +2015-05-16 Mark Wielaard + + * elf32_updatefile.c (updatemmap): Allocate temporary shdr storage + with malloc, not alloca. Free after writing section header. + +2015-05-16 Mark Wielaard + + * elf_getarsym.c (elf_getarsym): Allocate temporary file_date with + malloc, not alloca. Call free after out. + +2015-05-14 Mark Wielaard + + * elf_update.c (write_file): Use posix_fallocate instead of + ftruncate to extend file if necessary. + +2015-05-13 Mark Wielaard + + * elf32_updatenull.c (default_ehdr): If e_phnum is zero then set + e_phoff also to zero. + +2015-05-12 Mark Wielaard + + * elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign + is a powerof2. + * elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns + to the elf image offset. + +2015-05-12 Mark Wielaard + + * elf32_newphdr.c (newphdr): Call __libelf_seterrno with + ELF_E_INVALID_INDEX before failing. Check whether section zero shdr + actually exists if we need to put extended phnum in section zero. + +2015-05-08 Mark Wielaard + + * nlist.c (nlist): Call gelf_fsize with EV_CURRENT. + +2015-01-03 Mark Wielaard + + * version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest. + (elf_cvt_Verneed): Likewise. + +2015-03-28 Mark Wielaard + + * elf.h: Update from glibc. + +2015-03-23 Mark Wielaard + + * elf32_updatenull.c (updatenull_wrlock): Don't extend size with + SHT_NOBITS sh_offset. + +2015-02-18 Mark Wielaard + + * libelfP.h (__libelf_set_data_list_rdlock): Make internal_function. + +2015-02-07 Jan Kratochvil + + * elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider + sh_addralign 0 as 1. + +2015-01-22 Mark Wielaard + + * elf_strptr (elf_strptr): Make sure returned string is NUL + terminated. + +2015-01-21 Mark Wielaard + + * elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead + of rawdata_base != NULL before using rawdata directly. + +2015-01-20 Mark Wielaard + + * libelfP.h (__elf_strptr_internal): New function declaration. + * elf_getdata.c (__libelf_set_data_list_rdlock): New internal + function extracted from... + (__elf_getdata_rdlock): ... here. + * elf_newdata.c (elf_newdata): Check scn->rawdata_base and update + datalist if necessary. + +2015-01-20 Mark Wielaard + + * elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if + necessary. + +2014-12-30 Mark Wielaard + + * elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function. + (elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock. + * gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock + and always check ndx against phnum. + * libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function. + +2014-12-25 Mark Wielaard + + * elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be + negative. Include start_offset in maxsize. + +2014-12-28 Alexander Cherepanov + + * elf_begin.c (read_long_names): Don't miss '/' right after + another '/'. Fixes a dir traversal vuln in ar extraction. + +2014-12-18 Ulrich Drepper + + * Makefile.am: Suppress output of textrel_check command. + +2014-12-16 Mark Wielaard + + * elf_begin.c (read_long_names): Make sure long_names len fits + in mapped ELF file. + +2014-12-15 Mark Wielaard + + * elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow. + +2014-12-15 Mark Wielaard + + * elf_begin.c (read_long_names): Clear any garbage left in the + name table. + +2014-12-11 Mark Wielaard + + * elf_begin.c (file_read_elf): Correct ELF64 section offset check. + +2014-12-11 Mark Wielaard + + * elf_begin.c (read_long_names): Check for offset overflow. + (__libelf_next_arhdr_wrlock): Likewise. Sanity check the ar_size. + Don't allow it to go beyond end of file. + +2014-12-09 Mark Wielaard + + * elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow. + +2014-11-27 Mark Wielaard + + * Makefile.am (libelf.so): Use textrel_check. + +2014-11-23 Mark Wielaard + + * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed + overflow check to unsigned. + +2014-11-23 Mark Wielaard + + * note_xlate.h (elf_cvt_note): Copy over any leftover data if + src != dest. The data is probably part of truncated name/desc. + +2014-11-22 Mark Wielaard + + * elf_getphdrnum.c (elf_getphdrnum): Sanity check the + __elf_getphdrnum_rdlock result. + +2014-11-18 Mark Wielaard + + * version_xlate.h (elf_cvt_Verdef): Check for overflow. + (elf_cvt_Verneed): Likewise. + +2014-11-17 Mark Wielaard + + * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL. + +2014-11-16 Mark Wielaard + + * elf_getshdrstrndx.c: Check there are section headers before + handling SHN_XINDEX. + +2014-11-16 Mark Wielaard + + * elf32_getphdr.c (getphdr_wrlock): Check e_phoff isn't zero. + Check for too many pheaders. + * elf_getphdrnum.c (__elf_getphdrnum_rdlock): Check section zero + actually exists before handling PN_XNUM. + +2014-11-16 Mark Wielaard + + * gelf_getnote.c (gelf_getnote): Check padding overflow. + +2014-11-16 Mark Wielaard + + * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size + and align as Elf64_Off and Elf64_Xword not size_t. + +2014-11-14 Mark Wielaard + + * gelf_getnote.c (gelf_getnote): Check offset overflow. + +2014-11-13 Mark Wielaard + + * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow + check. + +2014-11-08 Mark Wielaard + + * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy. + +2014-11-07 Mark Wielaard + + * elf_begin.c (file_read_elf): Correct sh_size check. + * elf_getdata.c (__libelf_set_rawdata_wrlock): Check for unsigned + overflow. + +2014-09-10 Petr Machata + + * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the + file is unreadable. + 2014-07-07 Mark Wielaard * elf.h: Update from glibc. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 493e4ec..167a832 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2010 Red Hat, Inc. +## Copyright (C) 1996-2010, 2015 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ ## include $(top_srcdir)/config/eu.am if BUILD_STATIC -AM_CFLAGS += -fpic +AM_CFLAGS += -fPIC endif GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) VERSION = 1 @@ -88,23 +88,25 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ elf32_offscn.c elf64_offscn.c gelf_offscn.c \ elf_getaroff.c \ elf_gnu_hash.c \ - elf_scnshndx.c + elf_scnshndx.c \ + elf32_getchdr.c elf64_getchdr.c gelf_getchdr.c \ + elf_compress.c elf_compress_gnu.c libelf_pic_a_SOURCES = am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) -libelf_so_LDLIBS = +libelf_so_LDLIBS = -lz if USE_LOCKS libelf_so_LDLIBS += -lpthread endif libelf_so_SOURCES = libelf.so$(EXEEXT): libelf_pic.a libelf.map - $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS) - if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libelf.so $(mkinstalldirs) $(DESTDIR)$(libdir) @@ -118,7 +120,8 @@ uninstall: uninstall-am rm -f $(DESTDIR)$(libdir)/libelf.so noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ - version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h + version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \ + chdr_xlate.h EXTRA_DIST = libelf.map CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so.$(VERSION) diff --git a/libelf/Makefile.in b/libelf/Makefile.in index 8a99ae0..461405d 100644 --- a/libelf/Makefile.in +++ b/libelf/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,13 +90,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \ - ChangeLog -@BUILD_STATIC_TRUE@am__append_1 = -fpic +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING +@BUILD_STATIC_TRUE@am__append_2 = -fPIC noinst_PROGRAMS = $(am__EXEEXT_1) -@USE_LOCKS_TRUE@am__append_2 = -lpthread +@USE_LOCKS_TRUE@am__append_3 = -lpthread subdir = libelf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ @@ -95,6 +102,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ + $(noinst_HEADERS) $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -129,7 +138,6 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -189,7 +197,10 @@ am_libelf_a_OBJECTS = elf_version.$(OBJEXT) elf_hash.$(OBJEXT) \ gelf_getlib.$(OBJEXT) gelf_update_lib.$(OBJEXT) \ elf32_offscn.$(OBJEXT) elf64_offscn.$(OBJEXT) \ gelf_offscn.$(OBJEXT) elf_getaroff.$(OBJEXT) \ - elf_gnu_hash.$(OBJEXT) elf_scnshndx.$(OBJEXT) + elf_gnu_hash.$(OBJEXT) elf_scnshndx.$(OBJEXT) \ + elf32_getchdr.$(OBJEXT) elf64_getchdr.$(OBJEXT) \ + gelf_getchdr.$(OBJEXT) elf_compress.$(OBJEXT) \ + elf_compress_gnu.$(OBJEXT) libelf_a_OBJECTS = $(am_libelf_a_OBJECTS) libelf_pic_a_AR = $(AR) $(ARFLAGS) libelf_pic_a_LIBADD = @@ -256,6 +267,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -265,6 +278,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -284,6 +298,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -295,6 +312,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -338,6 +356,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -382,14 +401,28 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \ + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 +AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes $(if \ $($(*F)_no_Werror),,-Werror) $(if \ - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) \ - $(am__append_1) + $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ + $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ + $($(*F)_CFLAGS) $(am__append_2) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda $(am_libelf_pic_a_OBJECTS) \ libelf.so.$(VERSION) -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) lib_LIBRARIES = libelf.a noinst_LIBRARIES = libelf_pic.a @@ -442,14 +475,17 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ elf32_offscn.c elf64_offscn.c gelf_offscn.c \ elf_getaroff.c \ elf_gnu_hash.c \ - elf_scnshndx.c + elf_scnshndx.c \ + elf32_getchdr.c elf64_getchdr.c gelf_getchdr.c \ + elf_compress.c elf_compress_gnu.c libelf_pic_a_SOURCES = am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) -libelf_so_LDLIBS = $(am__append_2) +libelf_so_LDLIBS = -lz $(am__append_3) libelf_so_SOURCES = noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ - version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h + version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \ + chdr_xlate.h EXTRA_DIST = libelf.map all: all-am @@ -468,7 +504,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libelf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libelf/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -477,7 +512,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -543,6 +578,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_checksum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_fsize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_getchdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_getehdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_getphdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_getshdr.Po@am__quote@ @@ -555,6 +591,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32_xlatetom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64_checksum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64_fsize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64_getchdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64_getehdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64_getphdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64_getshdr.Po@am__quote@ @@ -568,6 +605,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_begin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_clone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_cntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_compress.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_compress_gnu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_end.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf_fill.Po@am__quote@ @@ -608,6 +647,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_checksum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_fsize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_getauxv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_getchdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_getclass.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_getdyn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gelf_getehdr.Po@am__quote@ @@ -658,14 +698,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -916,21 +956,26 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLIBRARIES uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) libelf.so$(EXEEXT): libelf_pic.a libelf.map - $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS) - if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) install: install-am libelf.so $(mkinstalldirs) $(DESTDIR)$(libdir) diff --git a/libelf/abstract.h b/libelf/abstract.h index 53713ee..d4515f2 100644 --- a/libelf/abstract.h +++ b/libelf/abstract.h @@ -1,5 +1,5 @@ /* Abstract description of component ELF types. - Copyright (C) 1998, 1999, 2000, 2002, 2004, 2007 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2004, 2007, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -310,3 +310,21 @@ START (64, auxv_t, Ext##auxv_t) \ TYPE_XLATE (Elf64_cvt_Addr1 (&tdest->a_un.a_val, &tsrc->a_un.a_val);) \ TYPE_EXTRA (} a_un;) \ END (64, Ext##auxv_t) + +/* Note that there is actual compression data right after the Chdr. + So we also have a separate conversion function for the whole + section. */ +#define Chdr32(Ext) \ +START (32, Chdr, Ext##Chdr) \ + TYPE_NAME (ElfW2(32, Ext##Word), ch_type) \ + TYPE_NAME (ElfW2(32, Ext##Word), ch_size) \ + TYPE_NAME (ElfW2(32, Ext##Word), ch_addralign) \ +END (32, Ext##Chdr) + +#define Chdr64(Ext) \ +START (64, Chdr, Ext##Chdr) \ + TYPE_NAME (ElfW2(64, Ext##Word), ch_type) \ + TYPE_NAME (ElfW2(64, Ext##Word), ch_reserved) \ + TYPE_NAME (ElfW2(64, Ext##Xword), ch_size) \ + TYPE_NAME (ElfW2(64, Ext##Xword), ch_addralign) \ +END (64, Ext##Chdr) diff --git a/libelf/chdr_xlate.h b/libelf/chdr_xlate.h new file mode 100644 index 0000000..70782b4 --- /dev/null +++ b/libelf/chdr_xlate.h @@ -0,0 +1,33 @@ +#include "common.h" + +/* These functions convert a while section, one Chdr plus compression data. */ + +static void +Elf32_cvt_chdr (void *dest, const void *src, size_t len, int encode) +{ + if (len == 0) + return; + + /* Move everything over, if necessary, we only need to xlate the + header, not the compressed data following it. */ + if (dest != src) + memmove (dest, src, len); + + if (len >= sizeof (Elf32_Chdr)) + Elf32_cvt_Chdr (dest, src, sizeof (Elf32_Chdr), encode); +} + +static void +Elf64_cvt_chdr (void *dest, const void *src, size_t len, int encode) +{ + if (len == 0) + return; + + /* Move everything over, if necessary, we only need to xlate the + header, not the compressed data following it. */ + if (dest != src) + memmove (dest, src, len); + + if (len >= sizeof (Elf64_Chdr)) + Elf64_cvt_Chdr (dest, src, sizeof (Elf64_Chdr), encode); +} diff --git a/libelf/dl-hash.h b/libelf/dl-hash.h index e286d2e..6ee5d1a 100644 --- a/libelf/dl-hash.h +++ b/libelf/dl-hash.h @@ -1,31 +1,20 @@ /* Compute hash value for given string according to ELF standard. - Copyright (C) 2006 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 1995. + Copyright (C) 1995-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. - This file is free software; you can redistribute it and/or modify - it under the terms of either + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at - your option) any later version - - or - - * the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at - your option) any later version - - or both in parallel, as here. - - elfutils is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received copies of the GNU General Public License and - the GNU Lesser General Public License along with this program. If - not, see . */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ #ifndef _DL_HASH_H #define _DL_HASH_H 1 @@ -34,44 +23,48 @@ /* This is the hashing function specified by the ELF ABI. In the first five operations no overflow is possible so we optimized it a bit. */ -static inline unsigned int -__attribute__ ((__pure__)) -_dl_elf_hash (const char *name) +static unsigned int +__attribute__ ((unused)) +_dl_elf_hash (const char *name_arg) { - const unsigned char *iname = (const unsigned char *) name; - unsigned int hash = (unsigned int) *iname++; - if (*iname != '\0') + const unsigned char *name = (const unsigned char *) name_arg; + unsigned long int hash = *name; + if (hash != 0 && name[1] != '\0') { - hash = (hash << 4) + (unsigned int) *iname++; - if (*iname != '\0') + hash = (hash << 4) + name[1]; + if (name[2] != '\0') { - hash = (hash << 4) + (unsigned int) *iname++; - if (*iname != '\0') + hash = (hash << 4) + name[2]; + if (name[3] != '\0') { - hash = (hash << 4) + (unsigned int) *iname++; - if (*iname != '\0') + hash = (hash << 4) + name[3]; + if (name[4] != '\0') { - hash = (hash << 4) + (unsigned int) *iname++; - while (*iname != '\0') + hash = (hash << 4) + name[4]; + name += 5; + while (*name != '\0') { - unsigned int hi; - hash = (hash << 4) + (unsigned int) *iname++; + unsigned long int hi; + hash = (hash << 4) + *name++; hi = hash & 0xf0000000; /* The algorithm specified in the ELF ABI is as follows: if (hi != 0) - hash ^= hi >> 24; + hash ^= hi >> 24; hash &= ~hi; But the following is equivalent and a lot faster, especially on modern processors. */ - hash ^= hi; hash ^= hi >> 24; } + + /* Second part of the modified formula. This + operation can be lifted outside the loop. */ + hash &= 0x0fffffff; } } } diff --git a/libelf/elf-knowledge.h b/libelf/elf-knowledge.h index 99fb910..24534b3 100644 --- a/libelf/elf-knowledge.h +++ b/libelf/elf-knowledge.h @@ -1,5 +1,5 @@ /* Accumulation of various pieces of knowledge about ELF. - Copyright (C) 2000-2012 Red Hat, Inc. + Copyright (C) 2000-2012, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -41,7 +41,8 @@ && (shdr)->sh_type != SHT_NOTE \ && (((shdr)->sh_type) != SHT_PROGBITS \ /* Never remove .gnu.warning.* sections. */ \ - || (strncmp (name, ".gnu.warning.", sizeof ".gnu.warning." - 1) != 0 \ + || (name != NULL \ + && strncmp (name, ".gnu.warning.", sizeof ".gnu.warning." - 1) != 0\ /* We remove .comment sections only if explicitly told to do so. */\ && (remove_comment \ || strcmp (name, ".comment") != 0)))) diff --git a/libelf/elf.h b/libelf/elf.h index 40e87b2..12feb91 100644 --- a/libelf/elf.h +++ b/libelf/elf.h @@ -1,5 +1,5 @@ /* This file defines standard ELF types, structures, and macros. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -249,6 +249,7 @@ typedef struct #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ +#define EM_ALTERA_NIOS2 113 /* Altera Nios II */ #define EM_AARCH64 183 /* ARM AARCH64 */ #define EM_TILEPRO 188 /* Tilera TILEPro */ #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ @@ -366,13 +367,38 @@ typedef struct required */ #define SHF_GROUP (1 << 9) /* Section is member of a group. */ #define SHF_TLS (1 << 10) /* Section hold thread-local data. */ +#define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ #define SHF_MASKOS 0x0ff00000 /* OS-specific. */ #define SHF_MASKPROC 0xf0000000 /* Processor-specific */ #define SHF_ORDERED (1 << 30) /* Special ordering requirement (Solaris). */ -#define SHF_EXCLUDE (1 << 31) /* Section is excluded unless +#define SHF_EXCLUDE (1U << 31) /* Section is excluded unless referenced or allocated (Solaris).*/ +/* Section compression header. Used when SHF_COMPRESSED is set. */ + +typedef struct +{ + Elf32_Word ch_type; /* Compression format. */ + Elf32_Word ch_size; /* Uncompressed data size. */ + Elf32_Word ch_addralign; /* Uncompressed data alignment. */ +} Elf32_Chdr; + +typedef struct +{ + Elf64_Word ch_type; /* Compression format. */ + Elf64_Word ch_reserved; + Elf64_Xword ch_size; /* Uncompressed data size. */ + Elf64_Xword ch_addralign; /* Uncompressed data alignment. */ +} Elf64_Chdr; + +/* Legal values for ch_type (compression algorithm). */ +#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */ +#define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */ +#define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */ +#define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */ +#define ELFCOMPRESS_HIPROC 0x7fffffff /* End of processor-specific. */ + /* Section group handling. */ #define GRP_COMDAT 0x1 /* Mark group as COMDAT. */ @@ -1383,6 +1409,7 @@ typedef struct #define EF_MIPS_64BIT_WHIRL 16 #define EF_MIPS_ABI2 32 #define EF_MIPS_ABI_ON32 64 +#define EF_MIPS_FP64 512 /* Uses FP64 (12 callee-saved). */ #define EF_MIPS_NAN2008 1024 /* Uses IEEE 754-2008 NaN encoding. */ #define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level. */ @@ -1631,9 +1658,10 @@ typedef struct /* Legal values for p_type field of Elf32_Phdr. */ -#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ -#define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */ -#define PT_MIPS_OPTIONS 0x70000002 +#define PT_MIPS_REGINFO 0x70000000 /* Register usage information. */ +#define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */ +#define PT_MIPS_OPTIONS 0x70000002 +#define PT_MIPS_ABIFLAGS 0x70000003 /* FP mode requirement. */ /* Special program header types. */ @@ -1755,6 +1783,101 @@ typedef struct typedef Elf32_Addr Elf32_Conflict; +typedef struct +{ + /* Version of flags structure. */ + Elf32_Half version; + /* The level of the ISA: 1-5, 32, 64. */ + unsigned char isa_level; + /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise. */ + unsigned char isa_rev; + /* The size of general purpose registers. */ + unsigned char gpr_size; + /* The size of co-processor 1 registers. */ + unsigned char cpr1_size; + /* The size of co-processor 2 registers. */ + unsigned char cpr2_size; + /* The floating-point ABI. */ + unsigned char fp_abi; + /* Processor-specific extension. */ + Elf32_Word isa_ext; + /* Mask of ASEs used. */ + Elf32_Word ases; + /* Mask of general flags. */ + Elf32_Word flags1; + Elf32_Word flags2; +} Elf_MIPS_ABIFlags_v0; + +/* Values for the register size bytes of an abi flags structure. */ + +#define MIPS_AFL_REG_NONE 0x00 /* No registers. */ +#define MIPS_AFL_REG_32 0x01 /* 32-bit registers. */ +#define MIPS_AFL_REG_64 0x02 /* 64-bit registers. */ +#define MIPS_AFL_REG_128 0x03 /* 128-bit registers. */ + +/* Masks for the ases word of an ABI flags structure. */ + +#define MIPS_AFL_ASE_DSP 0x00000001 /* DSP ASE. */ +#define MIPS_AFL_ASE_DSPR2 0x00000002 /* DSP R2 ASE. */ +#define MIPS_AFL_ASE_EVA 0x00000004 /* Enhanced VA Scheme. */ +#define MIPS_AFL_ASE_MCU 0x00000008 /* MCU (MicroController) ASE. */ +#define MIPS_AFL_ASE_MDMX 0x00000010 /* MDMX ASE. */ +#define MIPS_AFL_ASE_MIPS3D 0x00000020 /* MIPS-3D ASE. */ +#define MIPS_AFL_ASE_MT 0x00000040 /* MT ASE. */ +#define MIPS_AFL_ASE_SMARTMIPS 0x00000080 /* SmartMIPS ASE. */ +#define MIPS_AFL_ASE_VIRT 0x00000100 /* VZ ASE. */ +#define MIPS_AFL_ASE_MSA 0x00000200 /* MSA ASE. */ +#define MIPS_AFL_ASE_MIPS16 0x00000400 /* MIPS16 ASE. */ +#define MIPS_AFL_ASE_MICROMIPS 0x00000800 /* MICROMIPS ASE. */ +#define MIPS_AFL_ASE_XPA 0x00001000 /* XPA ASE. */ +#define MIPS_AFL_ASE_MASK 0x00001fff /* All ASEs. */ + +/* Values for the isa_ext word of an ABI flags structure. */ + +#define MIPS_AFL_EXT_XLR 1 /* RMI Xlr instruction. */ +#define MIPS_AFL_EXT_OCTEON2 2 /* Cavium Networks Octeon2. */ +#define MIPS_AFL_EXT_OCTEONP 3 /* Cavium Networks OcteonP. */ +#define MIPS_AFL_EXT_LOONGSON_3A 4 /* Loongson 3A. */ +#define MIPS_AFL_EXT_OCTEON 5 /* Cavium Networks Octeon. */ +#define MIPS_AFL_EXT_5900 6 /* MIPS R5900 instruction. */ +#define MIPS_AFL_EXT_4650 7 /* MIPS R4650 instruction. */ +#define MIPS_AFL_EXT_4010 8 /* LSI R4010 instruction. */ +#define MIPS_AFL_EXT_4100 9 /* NEC VR4100 instruction. */ +#define MIPS_AFL_EXT_3900 10 /* Toshiba R3900 instruction. */ +#define MIPS_AFL_EXT_10000 11 /* MIPS R10000 instruction. */ +#define MIPS_AFL_EXT_SB1 12 /* Broadcom SB-1 instruction. */ +#define MIPS_AFL_EXT_4111 13 /* NEC VR4111/VR4181 instruction. */ +#define MIPS_AFL_EXT_4120 14 /* NEC VR4120 instruction. */ +#define MIPS_AFL_EXT_5400 15 /* NEC VR5400 instruction. */ +#define MIPS_AFL_EXT_5500 16 /* NEC VR5500 instruction. */ +#define MIPS_AFL_EXT_LOONGSON_2E 17 /* ST Microelectronics Loongson 2E. */ +#define MIPS_AFL_EXT_LOONGSON_2F 18 /* ST Microelectronics Loongson 2F. */ + +/* Masks for the flags1 word of an ABI flags structure. */ +#define MIPS_AFL_FLAGS1_ODDSPREG 1 /* Uses odd single-precision registers. */ + +/* Object attribute values. */ +enum +{ + /* Not tagged or not using any ABIs affected by the differences. */ + Val_GNU_MIPS_ABI_FP_ANY = 0, + /* Using hard-float -mdouble-float. */ + Val_GNU_MIPS_ABI_FP_DOUBLE = 1, + /* Using hard-float -msingle-float. */ + Val_GNU_MIPS_ABI_FP_SINGLE = 2, + /* Using soft-float. */ + Val_GNU_MIPS_ABI_FP_SOFT = 3, + /* Using -mips32r2 -mfp64. */ + Val_GNU_MIPS_ABI_FP_OLD_64 = 4, + /* Using -mfpxx. */ + Val_GNU_MIPS_ABI_FP_XX = 5, + /* Using -mips32r2 -mfp64. */ + Val_GNU_MIPS_ABI_FP_64 = 6, + /* Using -mips32r2 -mfp64 -mno-odd-spreg. */ + Val_GNU_MIPS_ABI_FP_64A = 7, + /* Maximum allocated FP ABI value. */ + Val_GNU_MIPS_ABI_FP_MAX = 7 +}; /* HPPA specific definitions. */ @@ -2096,6 +2219,8 @@ typedef Elf32_Addr Elf32_Conflict; #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ +#define R_PPC_TLSGD 95 /* none (sym+add)@tlsgd */ +#define R_PPC_TLSLD 96 /* none (sym+add)@tlsld */ /* The remaining relocs are from the Embedded ELF ABI, and are not in the SVR4 ELF ABI. */ @@ -2139,7 +2264,11 @@ typedef Elf32_Addr Elf32_Conflict; /* PowerPC specific values for the Dyn d_tag field. */ #define DT_PPC_GOT (DT_LOPROC + 0) -#define DT_PPC_NUM 1 +#define DT_PPC_OPT (DT_LOPROC + 1) +#define DT_PPC_NUM 2 + +/* PowerPC specific values for the DT_PPC_OPT Dyn entry. */ +#define PPC_OPT_TLS 1 /* PowerPC64 relocations defined by the ABIs */ #define R_PPC64_NONE R_PPC_NONE @@ -2283,7 +2412,7 @@ typedef Elf32_Addr Elf32_Conflict; #define DT_PPC64_OPD (DT_LOPROC + 1) #define DT_PPC64_OPDSZ (DT_LOPROC + 2) #define DT_PPC64_OPT (DT_LOPROC + 3) -#define DT_PPC64_NUM 3 +#define DT_PPC64_NUM 4 /* PowerPC64 specific values for the DT_PPC64_OPT Dyn entry. */ #define PPC64_OPT_TLS 1 @@ -2362,6 +2491,20 @@ typedef Elf32_Addr Elf32_Conflict; /* AArch64 relocs. */ #define R_AARCH64_NONE 0 /* No relocation. */ + +/* ILP32 AArch64 relocs. */ +#define R_AARCH64_P32_ABS32 1 /* Direct 32 bit. */ +#define R_AARCH64_P32_COPY 180 /* Copy symbol at runtime. */ +#define R_AARCH64_P32_GLOB_DAT 181 /* Create GOT entry. */ +#define R_AARCH64_P32_JUMP_SLOT 182 /* Create PLT entry. */ +#define R_AARCH64_P32_RELATIVE 183 /* Adjust by program base. */ +#define R_AARCH64_P32_TLS_DTPMOD 184 /* Module number, 32 bit. */ +#define R_AARCH64_P32_TLS_DTPREL 185 /* Module-relative offset, 32 bit. */ +#define R_AARCH64_P32_TLS_TPREL 186 /* TP-relative offset, 32 bit. */ +#define R_AARCH64_P32_TLSDESC 187 /* TLS Descriptor. */ +#define R_AARCH64_P32_IRELATIVE 188 /* STT_GNU_IFUNC relocation. */ + +/* LP64 AArch64 relocs. */ #define R_AARCH64_ABS64 257 /* Direct 64 bit. */ #define R_AARCH64_ABS32 258 /* Direct 32 bit. */ #define R_AARCH64_ABS16 259 /* Direct 16-bit. */ @@ -2479,9 +2622,9 @@ typedef Elf32_Addr Elf32_Conflict; #define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */ #define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */ #define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */ -#define R_AARCH64_TLS_DTPMOD64 1028 /* Module number, 64 bit. */ -#define R_AARCH64_TLS_DTPREL64 1029 /* Module-relative offset, 64 bit. */ -#define R_AARCH64_TLS_TPREL64 1030 /* TP-relative offset, 64 bit. */ +#define R_AARCH64_TLS_DTPMOD 1028 /* Module number, 64 bit. */ +#define R_AARCH64_TLS_DTPREL 1029 /* Module-relative offset, 64 bit. */ +#define R_AARCH64_TLS_TPREL 1030 /* TP-relative offset, 64 bit. */ #define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */ #define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */ @@ -3132,6 +3275,58 @@ typedef Elf32_Addr Elf32_Conflict; #define R_MICROBLAZE_TLSGOTTPREL32 28 /* TLS Offset From Thread Pointer. */ #define R_MICROBLAZE_TLSTPREL32 29 /* TLS Offset From Thread Pointer. */ +/* Legal values for d_tag (dynamic entry type). */ +#define DT_NIOS2_GP 0x70000002 /* Address of _gp. */ + +/* Nios II relocations. */ +#define R_NIOS2_NONE 0 /* No reloc. */ +#define R_NIOS2_S16 1 /* Direct signed 16 bit. */ +#define R_NIOS2_U16 2 /* Direct unsigned 16 bit. */ +#define R_NIOS2_PCREL16 3 /* PC relative 16 bit. */ +#define R_NIOS2_CALL26 4 /* Direct call. */ +#define R_NIOS2_IMM5 5 /* 5 bit constant expression. */ +#define R_NIOS2_CACHE_OPX 6 /* 5 bit expression, shift 22. */ +#define R_NIOS2_IMM6 7 /* 6 bit constant expression. */ +#define R_NIOS2_IMM8 8 /* 8 bit constant expression. */ +#define R_NIOS2_HI16 9 /* High 16 bit. */ +#define R_NIOS2_LO16 10 /* Low 16 bit. */ +#define R_NIOS2_HIADJ16 11 /* High 16 bit, adjusted. */ +#define R_NIOS2_BFD_RELOC_32 12 /* 32 bit symbol value + addend. */ +#define R_NIOS2_BFD_RELOC_16 13 /* 16 bit symbol value + addend. */ +#define R_NIOS2_BFD_RELOC_8 14 /* 8 bit symbol value + addend. */ +#define R_NIOS2_GPREL 15 /* 16 bit GP pointer offset. */ +#define R_NIOS2_GNU_VTINHERIT 16 /* GNU C++ vtable hierarchy. */ +#define R_NIOS2_GNU_VTENTRY 17 /* GNU C++ vtable member usage. */ +#define R_NIOS2_UJMP 18 /* Unconditional branch. */ +#define R_NIOS2_CJMP 19 /* Conditional branch. */ +#define R_NIOS2_CALLR 20 /* Indirect call through register. */ +#define R_NIOS2_ALIGN 21 /* Alignment requirement for + linker relaxation. */ +#define R_NIOS2_GOT16 22 /* 16 bit GOT entry. */ +#define R_NIOS2_CALL16 23 /* 16 bit GOT entry for function. */ +#define R_NIOS2_GOTOFF_LO 24 /* %lo of offset to GOT pointer. */ +#define R_NIOS2_GOTOFF_HA 25 /* %hiadj of offset to GOT pointer. */ +#define R_NIOS2_PCREL_LO 26 /* %lo of PC relative offset. */ +#define R_NIOS2_PCREL_HA 27 /* %hiadj of PC relative offset. */ +#define R_NIOS2_TLS_GD16 28 /* 16 bit GOT offset for TLS GD. */ +#define R_NIOS2_TLS_LDM16 29 /* 16 bit GOT offset for TLS LDM. */ +#define R_NIOS2_TLS_LDO16 30 /* 16 bit module relative offset. */ +#define R_NIOS2_TLS_IE16 31 /* 16 bit GOT offset for TLS IE. */ +#define R_NIOS2_TLS_LE16 32 /* 16 bit LE TP-relative offset. */ +#define R_NIOS2_TLS_DTPMOD 33 /* Module number. */ +#define R_NIOS2_TLS_DTPREL 34 /* Module-relative offset. */ +#define R_NIOS2_TLS_TPREL 35 /* TP-relative offset. */ +#define R_NIOS2_COPY 36 /* Copy symbol at runtime. */ +#define R_NIOS2_GLOB_DAT 37 /* Create GOT entry. */ +#define R_NIOS2_JUMP_SLOT 38 /* Create PLT entry. */ +#define R_NIOS2_RELATIVE 39 /* Adjust by program base. */ +#define R_NIOS2_GOTOFF 40 /* 16 bit offset to GOT pointer. */ +#define R_NIOS2_CALL26_NOAT 41 /* Direct call in .noat section. */ +#define R_NIOS2_GOT_LO 42 /* %lo() of GOT entry. */ +#define R_NIOS2_GOT_HA 43 /* %hiadj() of GOT entry. */ +#define R_NIOS2_CALL_LO 44 /* %lo() of function GOT entry. */ +#define R_NIOS2_CALL_HA 45 /* %hiadj() of function GOT entry. */ + /* TILEPro relocations. */ #define R_TILEPRO_NONE 0 /* No reloc */ #define R_TILEPRO_32 1 /* Direct 32 bit */ diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c index 4c59856..f9dfccb 100644 --- a/libelf/elf32_checksum.c +++ b/libelf/elf32_checksum.c @@ -1,5 +1,5 @@ /* Compute simple checksum from permanent parts of the ELF file. - Copyright (C) 2002, 2003, 2004, 2005, 2009 Red Hat, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -51,8 +51,7 @@ long int -elfw2(LIBELFBITS,checksum) (elf) - Elf *elf; +elfw2(LIBELFBITS,checksum) (Elf *elf) { size_t shstrndx; Elf_Scn *scn; diff --git a/libelf/elf32_fsize.c b/libelf/elf32_fsize.c index d7496fa..fddae91 100644 --- a/libelf/elf32_fsize.c +++ b/libelf/elf32_fsize.c @@ -1,5 +1,5 @@ /* Return the size of an object file type. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -40,10 +40,7 @@ size_t -elfw2(LIBELFBITS, fsize) (type, count, version) - Elf_Type type; - size_t count; - unsigned int version; +elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version) { /* We do not have differences between file and memory sizes. Better not since otherwise `mmap' would not work. */ diff --git a/libelf/elf32_getchdr.c b/libelf/elf32_getchdr.c new file mode 100644 index 0000000..982a614 --- /dev/null +++ b/libelf/elf32_getchdr.c @@ -0,0 +1,83 @@ +/* Return section compression header. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "libelfP.h" +#include "common.h" + +#ifndef LIBELFBITS +# define LIBELFBITS 32 +#endif + + +ElfW2(LIBELFBITS,Chdr) * +elfw2(LIBELFBITS,getchdr) (Elf_Scn *scn) +{ + ElfW2(LIBELFBITS,Shdr) *shdr = elfw2(LIBELFBITS,getshdr) (scn); + if (shdr == NULL) + return NULL; + + /* Must have SHF_COMPRESSED flag set. Allocated or no bits sections + can never be compressed. */ + if ((shdr->sh_flags & SHF_ALLOC) != 0) + { + __libelf_seterrno (ELF_E_INVALID_SECTION_FLAGS); + return NULL; + } + + if (shdr->sh_type == SHT_NULL + || shdr->sh_type == SHT_NOBITS) + { + __libelf_seterrno (ELF_E_INVALID_SECTION_TYPE); + return NULL; + } + + if ((shdr->sh_flags & SHF_COMPRESSED) == 0) + { + __libelf_seterrno (ELF_E_NOT_COMPRESSED); + return NULL; + } + + /* This makes sure the data is in the correct format, so we don't + need to swap fields. */ + Elf_Data *d = elf_getdata (scn, NULL); + if (d == NULL) + return NULL; + + if (d->d_size < sizeof (ElfW2(LIBELFBITS,Chdr)) || d->d_buf == NULL) + { + __libelf_seterrno (ELF_E_INVALID_DATA); + return NULL; + } + + return (ElfW2(LIBELFBITS,Chdr) *) d->d_buf; +} diff --git a/libelf/elf32_getehdr.c b/libelf/elf32_getehdr.c index ee0a2e0..89e3c40 100644 --- a/libelf/elf32_getehdr.c +++ b/libelf/elf32_getehdr.c @@ -1,5 +1,5 @@ /* Get ELF header. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -42,9 +42,7 @@ static ElfW2(LIBELFBITS,Ehdr) * -getehdr_impl (elf, wrlock) - Elf *elf; - int wrlock; +getehdr_impl (Elf *elf, int wrlock) { if (elf == NULL) return NULL; @@ -77,15 +75,14 @@ getehdr_impl (elf, wrlock) } ElfW2(LIBELFBITS,Ehdr) * -__elfw2(LIBELFBITS,getehdr_wrlock) (elf) - Elf *elf; +internal_function +__elfw2(LIBELFBITS,getehdr_wrlock) (Elf *elf) { return getehdr_impl (elf, 1); } ElfW2(LIBELFBITS,Ehdr) * -elfw2(LIBELFBITS,getehdr) (elf) - Elf *elf; +elfw2(LIBELFBITS,getehdr) (Elf *elf) { ElfW2(LIBELFBITS,Ehdr) *result; if (elf == NULL) diff --git a/libelf/elf32_getphdr.c b/libelf/elf32_getphdr.c index e74e63f..99b4ac0 100644 --- a/libelf/elf32_getphdr.c +++ b/libelf/elf32_getphdr.c @@ -1,5 +1,5 @@ /* Get ELF program header table. - Copyright (C) 1998-2010, 2014 Red Hat, Inc. + Copyright (C) 1998-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -46,8 +46,7 @@ #endif ElfW2(LIBELFBITS,Phdr) * -__elfw2(LIBELFBITS,getphdr_wrlock) (elf) - Elf *elf; +__elfw2(LIBELFBITS,getphdr_wrlock) (Elf *elf) { ElfW2(LIBELFBITS,Phdr) *result; @@ -76,15 +75,17 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) size_t phnum; if (__elf_getphdrnum_rdlock (elf, &phnum) != 0) goto out; - if (phnum == 0) + if (phnum == 0 || ehdr->e_phoff == 0) { __libelf_seterrno (ELF_E_NO_PHDR); goto out; } + /* Check this doesn't overflow. */ size_t size = phnum * sizeof (ElfW2(LIBELFBITS,Phdr)); - if (ehdr->e_phoff > elf->maximum_size + if (phnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr)) + || ehdr->e_phoff > elf->maximum_size || elf->maximum_size - ehdr->e_phoff < size) { __libelf_seterrno (ELF_E_INVALID_DATA); @@ -139,13 +140,20 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) } else { - if (ALLOW_UNALIGNED - || ((uintptr_t) file_phdr - & (__alignof__ (ElfW2(LIBELFBITS,Phdr)) - 1)) == 0) + bool copy = ! (ALLOW_UNALIGNED + || ((uintptr_t) file_phdr + & (__alignof__ (ElfW2(LIBELFBITS,Phdr)) + - 1)) == 0); + if (! copy) notcvt = file_phdr; else { - notcvt = (ElfW2(LIBELFBITS,Phdr) *) alloca (size); + notcvt = (ElfW2(LIBELFBITS,Phdr) *) malloc (size); + if (unlikely (notcvt == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + goto out; + } memcpy (notcvt, file_phdr, size); } @@ -160,6 +168,9 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) CONVERT_TO (phdr[cnt].p_flags, notcvt[cnt].p_flags); CONVERT_TO (phdr[cnt].p_align, notcvt[cnt].p_align); } + + if (copy) + free (notcvt); } } } @@ -225,8 +236,7 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) } ElfW2(LIBELFBITS,Phdr) * -elfw2(LIBELFBITS,getphdr) (elf) - Elf *elf; +elfw2(LIBELFBITS,getphdr) (Elf *elf) { ElfW2(LIBELFBITS,Phdr) *result; diff --git a/libelf/elf32_getshdr.c b/libelf/elf32_getshdr.c index 7417047..237d912 100644 --- a/libelf/elf32_getshdr.c +++ b/libelf/elf32_getshdr.c @@ -1,5 +1,5 @@ /* Return section header. - Copyright (C) 1998-2002, 2005, 2007, 2009, 2012, 2014 Red Hat, Inc. + Copyright (C) 1998-2002, 2005, 2007, 2009, 2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -99,6 +99,7 @@ load_shdr_wrlock (Elf_Scn *scn) assert ((elf->flags & ELF_F_MALLOCED) || ehdr->e_ident[EI_DATA] != MY_ELFDATA + || elf->cmd == ELF_C_READ_MMAP || (! ALLOW_UNALIGNED && ((uintptr_t) file_shdr & (__alignof__ (ElfW2(LIBELFBITS,Shdr)) - 1)) != 0)); @@ -106,20 +107,29 @@ load_shdr_wrlock (Elf_Scn *scn) /* Now copy the data and at the same time convert the byte order. */ if (ehdr->e_ident[EI_DATA] == MY_ELFDATA) { - assert ((elf->flags & ELF_F_MALLOCED) || ! ALLOW_UNALIGNED); + assert ((elf->flags & ELF_F_MALLOCED) + || elf->cmd == ELF_C_READ_MMAP + || ! ALLOW_UNALIGNED); memcpy (shdr, file_shdr, size); } else { - if (ALLOW_UNALIGNED - || ((uintptr_t) file_shdr - & (__alignof__ (ElfW2(LIBELFBITS,Shdr)) - 1)) == 0) + bool copy = ! (ALLOW_UNALIGNED + || ((uintptr_t) file_shdr + & (__alignof__ (ElfW2(LIBELFBITS,Shdr)) - 1)) + == 0); + if (! copy) notcvt = (ElfW2(LIBELFBITS,Shdr) *) ((char *) elf->map_address + elf->start_offset + ehdr->e_shoff); else { - notcvt = (ElfW2(LIBELFBITS,Shdr) *) alloca (size); + notcvt = (ElfW2(LIBELFBITS,Shdr) *) malloc (size); + if (unlikely (notcvt == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + goto out; + } memcpy (notcvt, ((char *) elf->map_address + elf->start_offset + ehdr->e_shoff), size); @@ -153,6 +163,9 @@ load_shdr_wrlock (Elf_Scn *scn) elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shndx_index = -1; } + + if (copy) + free (notcvt); } } else if (likely (elf->fildes != -1)) @@ -233,8 +246,8 @@ scn_valid (Elf_Scn *scn) } ElfW2(LIBELFBITS,Shdr) * -__elfw2(LIBELFBITS,getshdr_rdlock) (scn) - Elf_Scn *scn; +internal_function +__elfw2(LIBELFBITS,getshdr_rdlock) (Elf_Scn *scn) { ElfW2(LIBELFBITS,Shdr) *result; @@ -255,8 +268,8 @@ __elfw2(LIBELFBITS,getshdr_rdlock) (scn) } ElfW2(LIBELFBITS,Shdr) * -__elfw2(LIBELFBITS,getshdr_wrlock) (scn) - Elf_Scn *scn; +internal_function +__elfw2(LIBELFBITS,getshdr_wrlock) (Elf_Scn *scn) { ElfW2(LIBELFBITS,Shdr) *result; @@ -271,8 +284,7 @@ __elfw2(LIBELFBITS,getshdr_wrlock) (scn) } ElfW2(LIBELFBITS,Shdr) * -elfw2(LIBELFBITS,getshdr) (scn) - Elf_Scn *scn; +elfw2(LIBELFBITS,getshdr) (Elf_Scn *scn) { ElfW2(LIBELFBITS,Shdr) *result; diff --git a/libelf/elf32_newehdr.c b/libelf/elf32_newehdr.c index 4b547bc..775d115 100644 --- a/libelf/elf32_newehdr.c +++ b/libelf/elf32_newehdr.c @@ -1,5 +1,5 @@ /* Create new ELF header. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -42,8 +42,7 @@ ElfW2(LIBELFBITS,Ehdr) * -elfw2(LIBELFBITS,newehdr) (elf) - Elf *elf; +elfw2(LIBELFBITS,newehdr) (Elf *elf) { ElfW2(LIBELFBITS,Ehdr) *result; diff --git a/libelf/elf32_newphdr.c b/libelf/elf32_newphdr.c index 01038e7..4aa7213 100644 --- a/libelf/elf32_newphdr.c +++ b/libelf/elf32_newphdr.c @@ -1,5 +1,5 @@ /* Create new ELF program header table. - Copyright (C) 1999-2010, 2014 Red Hat, Inc. + Copyright (C) 1999-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -43,9 +43,7 @@ ElfW2(LIBELFBITS,Phdr) * -elfw2(LIBELFBITS,newphdr) (elf, count) - Elf *elf; - size_t count; +elfw2(LIBELFBITS,newphdr) (Elf *elf, size_t count) { ElfW2(LIBELFBITS,Phdr) *result; @@ -116,6 +114,17 @@ elfw2(LIBELFBITS,newphdr) (elf, count) { if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr)))) { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; + goto out; + } + + Elf_Scn *scn0 = &elf->state.ELFW(elf,LIBELFBITS).scns.data[0]; + if (unlikely (count >= PN_XNUM && scn0->shdr.ELFW(e,LIBELFBITS) == NULL)) + { + /* Something is wrong with section zero, but we need it to write + the extended phdr count. */ + __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); result = NULL; goto out; } @@ -134,7 +143,6 @@ elfw2(LIBELFBITS,newphdr) (elf, count) if (count >= PN_XNUM) { /* We have to write COUNT into the zeroth section's sh_info. */ - Elf_Scn *scn0 = &elf->state.ELFW(elf,LIBELFBITS).scns.data[0]; if (elf->state.ELFW(elf,LIBELFBITS).scns.cnt == 0) { assert (elf->state.ELFW(elf,LIBELFBITS).scns.max > 0); diff --git a/libelf/elf32_offscn.c b/libelf/elf32_offscn.c index a1ff6d4..9e757c8 100644 --- a/libelf/elf32_offscn.c +++ b/libelf/elf32_offscn.c @@ -1,5 +1,5 @@ /* Get section at specific index. - Copyright (C) 2005, 2008 Red Hat, Inc. + Copyright (C) 2005, 2008, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 2005. @@ -43,9 +43,7 @@ Elf_Scn * -elfw2(LIBELFBITS,offscn) (elf, offset) - Elf *elf; - ElfW2(LIBELFBITS,Off) offset; +elfw2(LIBELFBITS,offscn) (Elf *elf, ElfW2(LIBELFBITS,Off) offset) { if (elf == NULL) return NULL; diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c index 153e377..0909219 100644 --- a/libelf/elf32_updatefile.c +++ b/libelf/elf32_updatefile.c @@ -1,5 +1,5 @@ /* Write changed data structures. - Copyright (C) 2000-2010, 2014 Red Hat, Inc. + Copyright (C) 2000-2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -101,6 +101,29 @@ sort_sections (Elf_Scn **scns, Elf_ScnList *list) } +static inline void +fill_mmap (size_t offset, char *last_position, char *scn_start, + char *const shdr_start, char *const shdr_end) +{ + size_t written = 0; + + if (last_position < shdr_start) + { + written = MIN (scn_start + offset - last_position, + shdr_start - last_position); + + memset (last_position, __libelf_fill_byte, written); + } + + if (last_position + written != scn_start + offset + && shdr_end < scn_start + offset) + { + char *fill_start = MAX (shdr_end, scn_start); + memset (fill_start, __libelf_fill_byte, + scn_start + offset - fill_start); + } +} + int internal_function __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) @@ -206,7 +229,12 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) return 1; Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; - Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *)); + Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); + if (unlikely (scns == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + return -1; + } char *const shdr_start = ((char *) elf->map_address + elf->start_offset + ehdr->e_shoff); char *const shdr_end = shdr_start + ehdr->e_shnum * ehdr->e_shentsize; @@ -238,7 +266,12 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) < ((char *) elf->map_address + elf->start_offset + elf->maximum_size)); - void *p = alloca (sizeof (ElfW2(LIBELFBITS,Shdr))); + void *p = malloc (sizeof (ElfW2(LIBELFBITS,Shdr))); + if (unlikely (p == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + return -1; + } scn->shdr.ELFW(e,LIBELFBITS) = memcpy (p, scn->shdr.ELFW(e,LIBELFBITS), sizeof (ElfW2(LIBELFBITS,Shdr))); @@ -260,7 +293,7 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) > (char *) scn->data_list.data.d.d_buf)) { void *p = malloc (scn->data_list.data.d.d_size); - if (p == NULL) + if (unlikely (p == NULL)) { __libelf_seterrno (ELF_E_NOMEM); return -1; @@ -293,27 +326,6 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) Elf_Data_List *dl = &scn->data_list; bool scn_changed = false; - void fill_mmap (size_t offset) - { - size_t written = 0; - - if (last_position < shdr_start) - { - written = MIN (scn_start + offset - last_position, - shdr_start - last_position); - - memset (last_position, __libelf_fill_byte, written); - } - - if (last_position + written != scn_start + offset - && shdr_end < scn_start + offset) - { - char *fill_start = MAX (shdr_end, scn_start); - memset (fill_start, __libelf_fill_byte, - scn_start + offset - fill_start); - } - } - if (scn->data_list_rear != NULL) do { @@ -328,7 +340,8 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) || ((scn->flags | dl->flags | elf->flags) & ELF_F_DIRTY) != 0)) { - fill_mmap (dl->data.d.d_off); + fill_mmap (dl->data.d.d_off, last_position, scn_start, + shdr_start, shdr_end); last_position = scn_start + dl->data.d.d_off; } @@ -357,7 +370,7 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) last_position += dl->data.d.d_size; } - else + else if (dl->data.d.d_size != 0) last_position = mempcpy (last_position, dl->data.d.d_buf, dl->data.d.d_size); @@ -380,7 +393,8 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) /* If the previous section (or the ELF/program header) changed we might have to fill the gap. */ if (scn_start > last_position && previous_scn_changed) - fill_mmap (0); + fill_mmap (0, last_position, scn_start, + shdr_start, shdr_end); /* We have to trust the existing section header information. */ last_position = scn_start + shdr->sh_size; @@ -421,12 +435,17 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) entry we now have to adjust the pointer again so point to new place in the mapping. */ if (!elf->state.ELFW(elf,LIBELFBITS).shdr_malloced - && (scn->shdr_flags & ELF_F_MALLOCED) == 0) - scn->shdr.ELFW(e,LIBELFBITS) = &shdr_dest[scn->index]; + && (scn->shdr_flags & ELF_F_MALLOCED) == 0 + && scn->shdr.ELFW(e,LIBELFBITS) != &shdr_dest[scn->index]) + { + free (scn->shdr.ELFW(e,LIBELFBITS)); + scn->shdr.ELFW(e,LIBELFBITS) = &shdr_dest[scn->index]; + } scn->shdr_flags &= ~ELF_F_DIRTY; } } + free (scns); } /* That was the last part. Clear the overall flag. */ @@ -582,7 +601,7 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) /* Allocate sufficient memory. */ tmp_phdr = (ElfW2(LIBELFBITS,Phdr) *) malloc (sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum); - if (tmp_phdr == NULL) + if (unlikely (tmp_phdr == NULL)) { __libelf_seterrno (ELF_E_NOMEM); return 1; @@ -640,17 +659,32 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) #endif ElfW2(LIBELFBITS,Shdr) *shdr_data; + ElfW2(LIBELFBITS,Shdr) *shdr_data_mem = NULL; if (change_bo || elf->state.ELFW(elf,LIBELFBITS).shdr == NULL || (elf->flags & ELF_F_DIRTY)) - shdr_data = (ElfW2(LIBELFBITS,Shdr) *) - alloca (shnum * sizeof (ElfW2(LIBELFBITS,Shdr))); + { + shdr_data_mem = (ElfW2(LIBELFBITS,Shdr) *) + malloc (shnum * sizeof (ElfW2(LIBELFBITS,Shdr))); + if (unlikely (shdr_data_mem == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + return -1; + } + shdr_data = shdr_data_mem; + } else shdr_data = elf->state.ELFW(elf,LIBELFBITS).shdr; int shdr_flags = elf->flags; /* Get all sections into the array and sort them. */ Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; - Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *)); + Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); + if (unlikely (scns == NULL)) + { + free (shdr_data_mem); + __libelf_seterrno (ELF_E_NOMEM); + return -1; + } sort_sections (scns, list); for (size_t cnt = 0; cnt < shnum; ++cnt) @@ -685,7 +719,12 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) (scn_start + dl->data.d.d_off) - last_offset, fillbuf, &filled) != 0)) - return 1; + { + fail_free: + free (shdr_data_mem); + free (scns); + return 1; + } } if ((scn->flags | dl->flags | elf->flags) & ELF_F_DIRTY) @@ -714,10 +753,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) if (dl->data.d.d_size > MAX_TMPBUF) { buf = malloc (dl->data.d.d_size); - if (buf == NULL) + if (unlikely (buf == NULL)) { __libelf_seterrno (ELF_E_NOMEM); - return 1; + goto fail_free; } } @@ -734,7 +773,7 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) free (buf); __libelf_seterrno (ELF_E_WRITE_ERROR); - return 1; + goto fail_free; } if (buf != dl->data.d.d_buf && buf != tmpbuf) @@ -759,7 +798,7 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) if (unlikely (fill (elf->fildes, last_offset, scn_start - last_offset, fillbuf, &filled) != 0)) - return 1; + goto fail_free; } last_offset = scn_start + shdr->sh_size; @@ -787,7 +826,7 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) && unlikely (fill (elf->fildes, last_offset, shdr_offset - last_offset, fillbuf, &filled) != 0)) - return 1; + goto fail_free; /* Write out the section header table. */ if (shdr_flags & ELF_F_DIRTY @@ -797,8 +836,11 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) != sizeof (ElfW2(LIBELFBITS,Shdr)) * shnum)) { __libelf_seterrno (ELF_E_WRITE_ERROR); - return 1; + goto fail_free; } + + free (shdr_data_mem); + free (scns); } /* That was the last part. Clear the overall flag. */ diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c index be4cea0..03de032 100644 --- a/libelf/elf32_updatenull.c +++ b/libelf/elf32_updatenull.c @@ -1,5 +1,5 @@ /* Update data structures for changes. - Copyright (C) 2000-2010 Red Hat, Inc. + Copyright (C) 2000-2010, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -84,8 +84,12 @@ ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); - if (unlikely (ehdr->e_version == EV_NONE) - || unlikely (ehdr->e_version >= EV_NUM)) + if (unlikely (ehdr->e_version == EV_NONE)) + { + ehdr->e_version = EV_CURRENT; + elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; + } + else if (unlikely (ehdr->e_version >= EV_NUM)) { __libelf_seterrno (ELF_E_UNKNOWN_VERSION); return 1; @@ -106,6 +110,14 @@ ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; } + /* If phnum is zero make sure e_phoff is also zero and not some random + value. That would cause trouble in update_file. */ + if (ehdr->e_phnum == 0 && ehdr->e_phoff != 0) + { + ehdr->e_phoff = 0; + elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; + } + return 0; } @@ -202,6 +214,11 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) assert (shdr != NULL); ElfW2(LIBELFBITS,Word) sh_entsize = shdr->sh_entsize; ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1; + if (unlikely (! powerof2 (sh_align))) + { + __libelf_seterrno (ELF_E_INVALID_ALIGN); + return -1; + } /* Set the sh_entsize value if we can reliably detect it. */ switch (shdr->sh_type) @@ -318,9 +335,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) if (elf->flags & ELF_F_LAYOUT) { size = MAX ((GElf_Word) size, - shdr->sh_offset - + (shdr->sh_type != SHT_NOBITS - ? shdr->sh_size : 0)); + (shdr->sh_type != SHT_NOBITS + ? shdr->sh_offset + shdr->sh_size : 0)); /* The alignment must be a power of two. This is a requirement from the ELF specification. Additionally @@ -328,7 +344,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) enough for the largest alignment required by a data block. */ if (unlikely (! powerof2 (shdr->sh_addralign)) - || unlikely (shdr->sh_addralign < sh_align)) + || unlikely ((shdr->sh_addralign ?: 1) < sh_align)) { __libelf_seterrno (ELF_E_INVALID_ALIGN); return -1; @@ -366,12 +382,27 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) /* Check that the section size is actually a multiple of the entry size. */ - if (shdr->sh_entsize != 0 - && unlikely (shdr->sh_size % shdr->sh_entsize != 0) + if (shdr->sh_entsize != 0 && shdr->sh_entsize != 1 && (elf->flags & ELF_F_PERMISSIVE) == 0) { - __libelf_seterrno (ELF_E_INVALID_SHENTSIZE); - return -1; + /* For compressed sections check the uncompressed size. */ + ElfW2(LIBELFBITS,Word) sh_size; + if ((shdr->sh_flags & SHF_COMPRESSED) == 0) + sh_size = shdr->sh_size; + else + { + ElfW2(LIBELFBITS,Chdr) *chdr; + chdr = elfw2(LIBELFBITS,getchdr) (scn); + if (unlikely (chdr == NULL)) + return -1; + sh_size = chdr->ch_size; + } + + if (unlikely (sh_size % shdr->sh_entsize != 0)) + { + __libelf_seterrno (ELF_E_INVALID_SHENTSIZE); + return -1; + } } } @@ -382,6 +413,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) while ((list = list->next) != NULL); /* Store section information. */ + update_if_changed (ehdr->e_shentsize, + elf_typesize (LIBELFBITS, ELF_T_SHDR, 1), ehdr_flags); if (elf->flags & ELF_F_LAYOUT) { /* The user is supposed to fill out e_shoff. Use it and @@ -402,9 +435,6 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) size = (size + SHDR_ALIGN - 1) & ~(SHDR_ALIGN - 1); update_if_changed (ehdr->e_shoff, (GElf_Word) size, elf->flags); - update_if_changed (ehdr->e_shentsize, - elf_typesize (LIBELFBITS, ELF_T_SHDR, 1), - ehdr_flags); /* Account for the section header size. */ size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum); diff --git a/libelf/elf32_xlatetof.c b/libelf/elf32_xlatetof.c index 27a973e..ac4eaf4 100644 --- a/libelf/elf32_xlatetof.c +++ b/libelf/elf32_xlatetof.c @@ -1,5 +1,5 @@ /* Convert from memory to file representation. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -43,10 +43,8 @@ Elf_Data * -elfw2(LIBELFBITS, xlatetof) (dest, src, encode) - Elf_Data *dest; - const Elf_Data *src; - unsigned int encode; +elfw2(LIBELFBITS, xlatetof) (Elf_Data *dest, const Elf_Data *src, + unsigned int encode) { /* First test whether the input data is really suitable for this type. This means, whether there is an integer number of records. diff --git a/libelf/elf32_xlatetom.c b/libelf/elf32_xlatetom.c index 368df07..13cd485 100644 --- a/libelf/elf32_xlatetom.c +++ b/libelf/elf32_xlatetom.c @@ -1,5 +1,5 @@ /* Convert from file to memory representation. - Copyright (C) 1998, 1999, 2000, 2002, 2012 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2012, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -43,10 +43,8 @@ Elf_Data * -elfw2(LIBELFBITS, xlatetom) (dest, src, encode) - Elf_Data *dest; - const Elf_Data *src; - unsigned int encode; +elfw2(LIBELFBITS, xlatetom) (Elf_Data *dest, const Elf_Data *src, + unsigned int encode) { /* First test whether the input data is really suitable for this type. This means, whether there is an integer number of records. diff --git a/libelf/elf64_getchdr.c b/libelf/elf64_getchdr.c new file mode 100644 index 0000000..6588b79 --- /dev/null +++ b/libelf/elf64_getchdr.c @@ -0,0 +1,30 @@ +/* Return section compression header. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#define LIBELFBITS 64 +#include "elf32_getchdr.c" diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 1ef70ac..147f5f4 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -1,5 +1,5 @@ /* Create descriptor for processing file. - Copyright (C) 1998-2010, 2012, 2014 Red Hat, Inc. + Copyright (C) 1998-2010, 2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -151,8 +151,8 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA && (ALLOW_UNALIGNED - || (((size_t) ((char *) map_address + offset)) - & (__alignof__ (Elf32_Ehdr) - 1)) == 0)) + || (((size_t) ((char *) map_address + ehdr.e32->e_shoff)) + & (__alignof__ (Elf32_Shdr) - 1)) == 0)) /* We can directly access the memory. */ result = ((Elf32_Shdr *) ((char *) map_address + ehdr.e32->e_shoff + offset))->sh_size; @@ -201,8 +201,8 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, Elf64_Xword size; if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA && (ALLOW_UNALIGNED - || (((size_t) ((char *) map_address + offset)) - & (__alignof__ (Elf64_Ehdr) - 1)) == 0)) + || (((size_t) ((char *) map_address + ehdr.e64->e_shoff)) + & (__alignof__ (Elf64_Shdr) - 1)) == 0)) /* We can directly access the memory. */ size = ((Elf64_Shdr *) ((char *) map_address + ehdr.e64->e_shoff + offset))->sh_size; @@ -216,7 +216,7 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, + offset))->sh_size, sizeof (Elf64_Xword)); else - if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Word), + if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Xword), offset + ehdr.e64->e_shoff + offsetof (Elf64_Shdr, sh_size)) != sizeof (Elf64_Xword))) @@ -306,17 +306,47 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, /* This is a 32-bit binary. */ if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA && (ALLOW_UNALIGNED - || ((((uintptr_t) ehdr) & (__alignof__ (Elf32_Ehdr) - 1)) == 0 - && ((uintptr_t) ((char *) ehdr + ehdr->e_shoff) - & (__alignof__ (Elf32_Shdr) - 1)) == 0 - && ((uintptr_t) ((char *) ehdr + ehdr->e_phoff) - & (__alignof__ (Elf32_Phdr) - 1)) == 0))) + || (((uintptr_t) ehdr) & (__alignof__ (Elf32_Ehdr) - 1)) == 0)) { /* We can use the mmapped memory. */ elf->state.elf32.ehdr = ehdr; + } + else + { + /* Copy the ELF header. */ + elf->state.elf32.ehdr = memcpy (&elf->state.elf32.ehdr_mem, e_ident, + sizeof (Elf32_Ehdr)); + + if (e_ident[EI_DATA] != MY_ELFDATA) + { + CONVERT (elf->state.elf32.ehdr_mem.e_type); + CONVERT (elf->state.elf32.ehdr_mem.e_machine); + CONVERT (elf->state.elf32.ehdr_mem.e_version); + CONVERT (elf->state.elf32.ehdr_mem.e_entry); + CONVERT (elf->state.elf32.ehdr_mem.e_phoff); + CONVERT (elf->state.elf32.ehdr_mem.e_shoff); + CONVERT (elf->state.elf32.ehdr_mem.e_flags); + CONVERT (elf->state.elf32.ehdr_mem.e_ehsize); + CONVERT (elf->state.elf32.ehdr_mem.e_phentsize); + CONVERT (elf->state.elf32.ehdr_mem.e_phnum); + CONVERT (elf->state.elf32.ehdr_mem.e_shentsize); + CONVERT (elf->state.elf32.ehdr_mem.e_shnum); + CONVERT (elf->state.elf32.ehdr_mem.e_shstrndx); + } + } - if (unlikely (ehdr->e_shoff >= maxsize) - || unlikely (maxsize - ehdr->e_shoff + /* Don't precache the phdr pointer here. + elf32_getphdr will validate it against the size when asked. */ + + Elf32_Off e_shoff = elf->state.elf32.ehdr->e_shoff; + if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA + && cmd != ELF_C_READ_MMAP /* We need a copy to be able to write. */ + && (ALLOW_UNALIGNED + || (((uintptr_t) ((char *) ehdr + e_shoff) + & (__alignof__ (Elf32_Shdr) - 1)) == 0))) + { + if (unlikely (e_shoff >= maxsize) + || unlikely (maxsize - e_shoff < scncnt * sizeof (Elf32_Shdr))) { free_and_out: @@ -325,10 +355,7 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, return NULL; } elf->state.elf32.shdr - = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff); - - /* Don't precache the phdr pointer here. - elf32_getphdr will validate it against the size when asked. */ + = (Elf32_Shdr *) ((char *) ehdr + e_shoff); for (size_t cnt = 0; cnt < scncnt; ++cnt) { @@ -337,8 +364,8 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, elf->state.elf32.scns.data[cnt].shdr.e32 = &elf->state.elf32.shdr[cnt]; if (likely (elf->state.elf32.shdr[cnt].sh_offset < maxsize) - && likely (maxsize - elf->state.elf32.shdr[cnt].sh_offset - <= elf->state.elf32.shdr[cnt].sh_size)) + && likely (elf->state.elf32.shdr[cnt].sh_size + <= maxsize - elf->state.elf32.shdr[cnt].sh_offset)) elf->state.elf32.scns.data[cnt].rawdata_base = elf->state.elf32.scns.data[cnt].data_base = ((char *) map_address + offset @@ -361,27 +388,6 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, } else { - /* Copy the ELF header. */ - elf->state.elf32.ehdr = memcpy (&elf->state.elf32.ehdr_mem, e_ident, - sizeof (Elf32_Ehdr)); - - if (e_ident[EI_DATA] != MY_ELFDATA) - { - CONVERT (elf->state.elf32.ehdr_mem.e_type); - CONVERT (elf->state.elf32.ehdr_mem.e_machine); - CONVERT (elf->state.elf32.ehdr_mem.e_version); - CONVERT (elf->state.elf32.ehdr_mem.e_entry); - CONVERT (elf->state.elf32.ehdr_mem.e_phoff); - CONVERT (elf->state.elf32.ehdr_mem.e_shoff); - CONVERT (elf->state.elf32.ehdr_mem.e_flags); - CONVERT (elf->state.elf32.ehdr_mem.e_ehsize); - CONVERT (elf->state.elf32.ehdr_mem.e_phentsize); - CONVERT (elf->state.elf32.ehdr_mem.e_phnum); - CONVERT (elf->state.elf32.ehdr_mem.e_shentsize); - CONVERT (elf->state.elf32.ehdr_mem.e_shnum); - CONVERT (elf->state.elf32.ehdr_mem.e_shstrndx); - } - for (size_t cnt = 0; cnt < scncnt; ++cnt) { elf->state.elf32.scns.data[cnt].index = cnt; @@ -402,24 +408,51 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, /* This is a 64-bit binary. */ if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA && (ALLOW_UNALIGNED - || ((((uintptr_t) ehdr) & (__alignof__ (Elf64_Ehdr) - 1)) == 0 - && ((uintptr_t) ((char *) ehdr + ehdr->e_shoff) - & (__alignof__ (Elf64_Shdr) - 1)) == 0 - && ((uintptr_t) ((char *) ehdr + ehdr->e_phoff) - & (__alignof__ (Elf64_Phdr) - 1)) == 0))) + || (((uintptr_t) ehdr) & (__alignof__ (Elf64_Ehdr) - 1)) == 0)) { /* We can use the mmapped memory. */ elf->state.elf64.ehdr = ehdr; + } + else + { + /* Copy the ELF header. */ + elf->state.elf64.ehdr = memcpy (&elf->state.elf64.ehdr_mem, e_ident, + sizeof (Elf64_Ehdr)); - if (unlikely (ehdr->e_shoff >= maxsize) - || unlikely (ehdr->e_shoff - + scncnt * sizeof (Elf32_Shdr) > maxsize)) + if (e_ident[EI_DATA] != MY_ELFDATA) + { + CONVERT (elf->state.elf64.ehdr_mem.e_type); + CONVERT (elf->state.elf64.ehdr_mem.e_machine); + CONVERT (elf->state.elf64.ehdr_mem.e_version); + CONVERT (elf->state.elf64.ehdr_mem.e_entry); + CONVERT (elf->state.elf64.ehdr_mem.e_phoff); + CONVERT (elf->state.elf64.ehdr_mem.e_shoff); + CONVERT (elf->state.elf64.ehdr_mem.e_flags); + CONVERT (elf->state.elf64.ehdr_mem.e_ehsize); + CONVERT (elf->state.elf64.ehdr_mem.e_phentsize); + CONVERT (elf->state.elf64.ehdr_mem.e_phnum); + CONVERT (elf->state.elf64.ehdr_mem.e_shentsize); + CONVERT (elf->state.elf64.ehdr_mem.e_shnum); + CONVERT (elf->state.elf64.ehdr_mem.e_shstrndx); + } + } + + /* Don't precache the phdr pointer here. + elf64_getphdr will validate it against the size when asked. */ + + Elf64_Off e_shoff = elf->state.elf64.ehdr->e_shoff; + if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA + && cmd != ELF_C_READ_MMAP /* We need a copy to be able to write. */ + && (ALLOW_UNALIGNED + || (((uintptr_t) ((char *) ehdr + e_shoff) + & (__alignof__ (Elf64_Shdr) - 1)) == 0))) + { + if (unlikely (e_shoff >= maxsize) + || unlikely (maxsize - e_shoff + < scncnt * sizeof (Elf64_Shdr))) goto free_and_out; elf->state.elf64.shdr - = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff); - - /* Don't precache the phdr pointer here. - elf64_getphdr will validate it against the size when asked. */ + = (Elf64_Shdr *) ((char *) ehdr + e_shoff); for (size_t cnt = 0; cnt < scncnt; ++cnt) { @@ -428,8 +461,8 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, elf->state.elf64.scns.data[cnt].shdr.e64 = &elf->state.elf64.shdr[cnt]; if (likely (elf->state.elf64.shdr[cnt].sh_offset < maxsize) - && likely (maxsize - elf->state.elf64.shdr[cnt].sh_offset - <= elf->state.elf64.shdr[cnt].sh_size)) + && likely (elf->state.elf64.shdr[cnt].sh_size + <= maxsize - elf->state.elf64.shdr[cnt].sh_offset)) elf->state.elf64.scns.data[cnt].rawdata_base = elf->state.elf64.scns.data[cnt].data_base = ((char *) map_address + offset @@ -452,27 +485,6 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, } else { - /* Copy the ELF header. */ - elf->state.elf64.ehdr = memcpy (&elf->state.elf64.ehdr_mem, e_ident, - sizeof (Elf64_Ehdr)); - - if (e_ident[EI_DATA] != MY_ELFDATA) - { - CONVERT (elf->state.elf64.ehdr_mem.e_type); - CONVERT (elf->state.elf64.ehdr_mem.e_machine); - CONVERT (elf->state.elf64.ehdr_mem.e_version); - CONVERT (elf->state.elf64.ehdr_mem.e_entry); - CONVERT (elf->state.elf64.ehdr_mem.e_phoff); - CONVERT (elf->state.elf64.ehdr_mem.e_shoff); - CONVERT (elf->state.elf64.ehdr_mem.e_flags); - CONVERT (elf->state.elf64.ehdr_mem.e_ehsize); - CONVERT (elf->state.elf64.ehdr_mem.e_phentsize); - CONVERT (elf->state.elf64.ehdr_mem.e_phnum); - CONVERT (elf->state.elf64.ehdr_mem.e_shentsize); - CONVERT (elf->state.elf64.ehdr_mem.e_shnum); - CONVERT (elf->state.elf64.ehdr_mem.e_shstrndx); - } - for (size_t cnt = 0; cnt < scncnt; ++cnt) { elf->state.elf64.scns.data[cnt].index = cnt; @@ -550,9 +562,12 @@ read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd, maxsize), offset); if (unlikely (nread == -1)) - /* We cannot even read the head of the file. Maybe FILDES is associated - with an unseekable device. This is nothing we can handle. */ - return NULL; + { + /* We cannot even read the head of the file. Maybe FILDES is associated + with an unseekable device. This is nothing we can handle. */ + __libelf_seterrno (ELF_E_INVALID_FILE); + return NULL; + } /* See what kind of object we have here. */ Elf_Kind kind = determine_kind (mem.header, nread); @@ -670,7 +685,8 @@ read_long_names (Elf *elf) { if (elf->map_address != NULL) { - if (offset + sizeof (struct ar_hdr) > elf->maximum_size) + if ((size_t) offset > elf->maximum_size + || elf->maximum_size - offset < sizeof (struct ar_hdr)) return NULL; /* The data is mapped. */ @@ -704,11 +720,15 @@ read_long_names (Elf *elf) char *runp; if (elf->map_address != NULL) - /* Simply copy it over. */ - elf->state.ar.long_names = (char *) memcpy (newp, - elf->map_address + offset - + sizeof (struct ar_hdr), - len); + { + if (len > elf->maximum_size - offset - sizeof (struct ar_hdr)) + goto too_much; + /* Simply copy it over. */ + elf->state.ar.long_names = (char *) memcpy (newp, + elf->map_address + offset + + sizeof (struct ar_hdr), + len); + } else { if (unlikely ((size_t) pread_retry (elf->fildes, newp, len, @@ -716,6 +736,7 @@ read_long_names (Elf *elf) + sizeof (struct ar_hdr)) != len)) { + too_much: /* We were not able to read all data. */ free (newp); elf->state.ar.long_names = NULL; @@ -730,16 +751,17 @@ read_long_names (Elf *elf) runp = newp; while (1) { + char *startp = runp; runp = (char *) memchr (runp, '/', newp + len - runp); if (runp == NULL) - /* This was the last entry. */ - break; + { + /* This was the last entry. Clear any left overs. */ + memset (startp, '\0', newp + len - startp); + break; + } /* NUL-terminate the string. */ - *runp = '\0'; - - /* Skip the NUL byte and the \012. */ - runp += 2; + *runp++ = '\0'; /* A sanity check. Somebody might have generated invalid archive. */ @@ -755,8 +777,7 @@ read_long_names (Elf *elf) /* Read the next archive header. */ int internal_function -__libelf_next_arhdr_wrlock (elf) - Elf *elf; +__libelf_next_arhdr_wrlock (Elf *elf) { struct ar_hdr *ar_hdr; Elf_Arhdr *elf_ar_hdr; @@ -764,8 +785,10 @@ __libelf_next_arhdr_wrlock (elf) if (elf->map_address != NULL) { /* See whether this entry is in the file. */ - if (unlikely (elf->state.ar.offset + sizeof (struct ar_hdr) - > elf->start_offset + elf->maximum_size)) + if (unlikely ((size_t) elf->state.ar.offset + > elf->start_offset + elf->maximum_size + || (elf->start_offset + elf->maximum_size + - elf->state.ar.offset) < sizeof (struct ar_hdr))) { /* This record is not anymore in the file. */ __libelf_seterrno (ELF_E_RANGE); @@ -796,7 +819,7 @@ __libelf_next_arhdr_wrlock (elf) } /* Copy the raw name over to a NUL terminated buffer. */ - *((char *) __mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0'; + *((char *) mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0'; elf_ar_hdr = &elf->state.ar.elf_ar_hdr; @@ -892,7 +915,7 @@ __libelf_next_arhdr_wrlock (elf) const char *string = ar_hdr->FIELD; \ if (ar_hdr->FIELD[sizeof (ar_hdr->FIELD) - 1] != ' ') \ { \ - *((char *) __mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD))) \ + *((char *) mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD))) \ = '\0'; \ string = buf; \ } \ @@ -909,6 +932,19 @@ __libelf_next_arhdr_wrlock (elf) INT_FIELD (ar_mode); INT_FIELD (ar_size); + if (elf_ar_hdr->ar_size < 0) + { + __libelf_seterrno (ELF_E_INVALID_ARCHIVE); + return -1; + } + + /* Truncated file? */ + size_t maxsize; + maxsize = (elf->start_offset + elf->maximum_size + - elf->state.ar.offset - sizeof (struct ar_hdr)); + if ((size_t) elf_ar_hdr->ar_size > maxsize) + elf_ar_hdr->ar_size = maxsize; + return 0; } @@ -1005,13 +1041,23 @@ write_file (int fd, Elf_Cmd cmd) return result; } +/* Lock if necessary before dup an archive. */ +static inline Elf * +lock_dup_elf (int fildes, Elf_Cmd cmd, Elf *ref) +{ + /* We need wrlock to dup an archive. */ + if (ref->kind == ELF_K_AR) + { + rwlock_unlock (ref->lock); + rwlock_wrlock (ref->lock); + } + /* Duplicate the descriptor. */ + return dup_elf (fildes, cmd, ref); +} /* Return a descriptor for the file belonging to FILDES. */ Elf * -elf_begin (fildes, cmd, ref) - int fildes; - Elf_Cmd cmd; - Elf *ref; +elf_begin (int fildes, Elf_Cmd cmd, Elf *ref) { Elf *retval; @@ -1032,19 +1078,6 @@ elf_begin (fildes, cmd, ref) return NULL; } - Elf *lock_dup_elf () - { - /* We need wrlock to dup an archive. */ - if (ref->kind == ELF_K_AR) - { - rwlock_unlock (ref->lock); - rwlock_wrlock (ref->lock); - } - - /* Duplicate the descriptor. */ - return dup_elf (fildes, cmd, ref); - } - switch (cmd) { case ELF_C_NULL: @@ -1065,7 +1098,7 @@ elf_begin (fildes, cmd, ref) case ELF_C_READ: case ELF_C_READ_MMAP: if (ref != NULL) - retval = lock_dup_elf (); + retval = lock_dup_elf (fildes, cmd, ref); else /* Create descriptor for existing file. */ retval = read_file (fildes, 0, ~((size_t) 0), cmd, NULL); @@ -1086,7 +1119,7 @@ elf_begin (fildes, cmd, ref) retval = NULL; } else - retval = lock_dup_elf (); + retval = lock_dup_elf (fildes, cmd, ref); } else /* Create descriptor for existing file. */ diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c index a3c5805..ab13ffb 100644 --- a/libelf/elf_cntl.c +++ b/libelf/elf_cntl.c @@ -1,5 +1,5 @@ /* Control an ELF file desrciptor. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -37,9 +37,7 @@ int -elf_cntl (elf, cmd) - Elf *elf; - Elf_Cmd cmd; +elf_cntl (Elf *elf, Elf_Cmd cmd) { int result = 0; diff --git a/libelf/elf_compress.c b/libelf/elf_compress.c new file mode 100644 index 0000000..ec5b717 --- /dev/null +++ b/libelf/elf_compress.c @@ -0,0 +1,511 @@ +/* Compress or decompress a section. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "libelfP.h" +#include "common.h" + +#include +#include +#include +#include +#include +#include + +#ifndef MAX +# define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + +/* Given a section, uses the (in-memory) Elf_Data to extract the + original data size (including the given header size) and data + alignment. Returns a buffer that has at least hsize bytes (for the + caller to fill in with a header) plus zlib compressed date. Also + returns the new buffer size in new_size (hsize + compressed data + size). Returns (void *) -1 when FORCE is false and the compressed + data would be bigger than the original data. */ +void * +internal_function +__libelf_compress (Elf_Scn *scn, size_t hsize, int ei_data, + size_t *orig_size, size_t *orig_addralign, + size_t *new_size, bool force) +{ + /* The compressed data is the on-disk data. We simplify the + implementation a bit by asking for the (converted) in-memory + data (which might be all there is if the user created it with + elf_newdata) and then convert back to raw if needed before + compressing. Should be made a bit more clever to directly + use raw if that is directly available. */ + Elf_Data *data = elf_getdata (scn, NULL); + if (data == NULL) + return NULL; + + /* When not forced and we immediately know we would use more data by + compressing, because of the header plus zlib overhead (five bytes + per 16 KB block, plus a one-time overhead of six bytes for the + entire stream), don't do anything. */ + Elf_Data *next_data = elf_getdata (scn, data); + if (next_data == NULL && !force + && data->d_size <= hsize + 5 + 6) + return (void *) -1; + + *orig_addralign = data->d_align; + *orig_size = data->d_size; + + /* Guess an output block size. 1/8th of the original Elf_Data plus + hsize. Make the first chunk twice that size (25%), then increase + by a block (12.5%) when necessary. */ + size_t block = (data->d_size / 8) + hsize; + size_t out_size = 2 * block; + void *out_buf = malloc (out_size); + if (out_buf == NULL) + { + __libelf_seterrno (ELF_E_NOMEM); + return NULL; + } + + /* Caller gets to fill in the header at the start. Just skip it here. */ + size_t used = hsize; + + z_stream z; + z.zalloc = Z_NULL; + z.zfree = Z_NULL; + z.opaque = Z_NULL; + int zrc = deflateInit (&z, Z_BEST_COMPRESSION); + if (zrc != Z_OK) + { + __libelf_seterrno (ELF_E_COMPRESS_ERROR); + return NULL; + } + + Elf_Data cdata; + cdata.d_buf = NULL; + + /* Cleanup and return result. Don't leak memory. */ + void *deflate_cleanup (void *result) + { + deflateEnd (&z); + free (out_buf); + if (ei_data != MY_ELFDATA) + free (cdata.d_buf); + return result; + } + + /* Loop over data buffers. */ + int flush = Z_NO_FLUSH; + do + { + /* Convert to raw if different endianess. */ + cdata = *data; + if (ei_data != MY_ELFDATA) + { + /* Don't do this conversion in place, we might want to keep + the original data around, caller decides. */ + cdata.d_buf = malloc (data->d_size); + if (cdata.d_buf == NULL) + { + __libelf_seterrno (ELF_E_NOMEM); + return deflate_cleanup (NULL); + } + if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL) + return deflate_cleanup (NULL); + } + + z.avail_in = cdata.d_size; + z.next_in = cdata.d_buf; + + /* Get next buffer to see if this is the last one. */ + data = next_data; + if (data != NULL) + { + *orig_addralign = MAX (*orig_addralign, data->d_align); + *orig_size += data->d_size; + next_data = elf_getdata (scn, data); + } + else + flush = Z_FINISH; + + /* Flush one data buffer. */ + do + { + z.avail_out = out_size - used; + z.next_out = out_buf + used; + zrc = deflate (&z, flush); + if (zrc == Z_STREAM_ERROR) + { + __libelf_seterrno (ELF_E_COMPRESS_ERROR); + return deflate_cleanup (NULL); + } + used += (out_size - used) - z.avail_out; + + /* Bail out if we are sure the user doesn't want the + compression forced and we are using more compressed data + than original data. */ + if (!force && flush == Z_FINISH && used >= *orig_size) + return deflate_cleanup ((void *) -1); + + if (z.avail_out == 0) + { + void *bigger = realloc (out_buf, out_size + block); + if (bigger == NULL) + { + __libelf_seterrno (ELF_E_NOMEM); + return deflate_cleanup (NULL); + } + out_buf = bigger; + out_size += block; + } + } + while (z.avail_out == 0); /* Need more output buffer. */ + + if (ei_data != MY_ELFDATA) + { + free (cdata.d_buf); + cdata.d_buf = NULL; + } + } + while (flush != Z_FINISH); /* More data blocks. */ + + zrc = deflateEnd (&z); + if (zrc != Z_OK) + { + __libelf_seterrno (ELF_E_COMPRESS_ERROR); + return deflate_cleanup (NULL); + } + + *new_size = used; + return out_buf; +} + +void * +internal_function +__libelf_decompress (void *buf_in, size_t size_in, size_t size_out) +{ + void *buf_out = malloc (size_out); + if (unlikely (buf_out == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + return NULL; + } + + z_stream z = + { + .next_in = buf_in, + .avail_in = size_in, + .next_out = buf_out, + .avail_out = size_out + }; + int zrc = inflateInit (&z); + while (z.avail_in > 0 && likely (zrc == Z_OK)) + { + z.next_out = buf_out + (size_out - z.avail_out); + zrc = inflate (&z, Z_FINISH); + if (unlikely (zrc != Z_STREAM_END)) + { + zrc = Z_DATA_ERROR; + break; + } + zrc = inflateReset (&z); + } + if (likely (zrc == Z_OK)) + zrc = inflateEnd (&z); + + if (unlikely (zrc != Z_OK) || unlikely (z.avail_out != 0)) + { + free (buf_out); + __libelf_seterrno (ELF_E_DECOMPRESS_ERROR); + return NULL; + } + + return buf_out; +} + +void * +internal_function +__libelf_decompress_elf (Elf_Scn *scn, size_t *size_out, size_t *addralign) +{ + GElf_Chdr chdr; + if (gelf_getchdr (scn, &chdr) == NULL) + return NULL; + + if (chdr.ch_type != ELFCOMPRESS_ZLIB) + { + __libelf_seterrno (ELF_E_UNKNOWN_COMPRESSION_TYPE); + return NULL; + } + + if (! powerof2 (chdr.ch_addralign)) + { + __libelf_seterrno (ELF_E_INVALID_ALIGN); + return NULL; + } + + /* Take the in-memory representation, so we can even handle a + section that has just been constructed (maybe it was copied + over from some other ELF file first with elf_newdata). This + is slightly inefficient when the raw data needs to be + converted since then we'll be converting the whole buffer and + not just Chdr. */ + Elf_Data *data = elf_getdata (scn, NULL); + if (data == NULL) + return NULL; + + int elfclass = scn->elf->class; + size_t hsize = (elfclass == ELFCLASS32 + ? sizeof (Elf32_Chdr) : sizeof (Elf64_Chdr)); + size_t size_in = data->d_size - hsize; + void *buf_in = data->d_buf + hsize; + void *buf_out = __libelf_decompress (buf_in, size_in, chdr.ch_size); + *size_out = chdr.ch_size; + *addralign = chdr.ch_addralign; + return buf_out; +} + +void +internal_function +__libelf_reset_rawdata (Elf_Scn *scn, void *buf, size_t size, size_t align, + Elf_Type type) +{ + /* This is the new raw data, replace and possibly free old data. */ + scn->rawdata.d.d_off = 0; + scn->rawdata.d.d_version = __libelf_version; + scn->rawdata.d.d_buf = buf; + scn->rawdata.d.d_size = size; + scn->rawdata.d.d_align = align; + scn->rawdata.d.d_type = type; + + /* Existing existing data is no longer valid. */ + scn->data_list_rear = NULL; + if (scn->data_base != scn->rawdata_base) + free (scn->data_base); + scn->data_base = NULL; + if (scn->elf->map_address == NULL + || scn->rawdata_base == scn->zdata_base) + free (scn->rawdata_base); + + scn->rawdata_base = buf; +} + +int +elf_compress (Elf_Scn *scn, int type, unsigned int flags) +{ + if (scn == NULL) + return -1; + + if ((flags & ~ELF_CHF_FORCE) != 0) + { + __libelf_seterrno (ELF_E_INVALID_OPERAND); + return -1; + } + + bool force = (flags & ELF_CHF_FORCE) != 0; + + Elf *elf = scn->elf; + GElf_Ehdr ehdr; + if (gelf_getehdr (elf, &ehdr) == NULL) + return -1; + + int elfclass = elf->class; + int elfdata = ehdr.e_ident[EI_DATA]; + + Elf64_Xword sh_flags; + Elf64_Word sh_type; + Elf64_Xword sh_addralign; + if (elfclass == ELFCLASS32) + { + Elf32_Shdr *shdr = elf32_getshdr (scn); + if (shdr == NULL) + return -1; + + sh_flags = shdr->sh_flags; + sh_type = shdr->sh_type; + sh_addralign = shdr->sh_addralign; + } + else + { + Elf64_Shdr *shdr = elf64_getshdr (scn); + if (shdr == NULL) + return -1; + + sh_flags = shdr->sh_flags; + sh_type = shdr->sh_type; + sh_addralign = shdr->sh_addralign; + } + + if ((sh_flags & SHF_ALLOC) != 0) + { + __libelf_seterrno (ELF_E_INVALID_SECTION_FLAGS); + return -1; + } + + if (sh_type == SHT_NULL || sh_type == SHT_NOBITS) + { + __libelf_seterrno (ELF_E_INVALID_SECTION_TYPE); + return -1; + } + + int compressed = (sh_flags & SHF_COMPRESSED); + if (type == ELFCOMPRESS_ZLIB) + { + /* Compress/Deflate. */ + if (compressed == 1) + { + __libelf_seterrno (ELF_E_ALREADY_COMPRESSED); + return -1; + } + + size_t hsize = (elfclass == ELFCLASS32 + ? sizeof (Elf32_Chdr) : sizeof (Elf64_Chdr)); + size_t orig_size, orig_addralign, new_size; + void *out_buf = __libelf_compress (scn, hsize, elfdata, + &orig_size, &orig_addralign, + &new_size, force); + + /* Compression would make section larger, don't change anything. */ + if (out_buf == (void *) -1) + return 0; + + /* Compression failed, return error. */ + if (out_buf == NULL) + return -1; + + /* Put the header in front of the data. */ + if (elfclass == ELFCLASS32) + { + Elf32_Chdr chdr; + chdr.ch_type = ELFCOMPRESS_ZLIB; + chdr.ch_size = orig_size; + chdr.ch_addralign = orig_addralign; + if (elfdata != MY_ELFDATA) + { + CONVERT (chdr.ch_type); + CONVERT (chdr.ch_size); + CONVERT (chdr.ch_addralign); + } + memcpy (out_buf, &chdr, sizeof (Elf32_Chdr)); + } + else + { + Elf64_Chdr chdr; + chdr.ch_type = ELFCOMPRESS_ZLIB; + chdr.ch_reserved = 0; + chdr.ch_size = orig_size; + chdr.ch_addralign = sh_addralign; + if (elfdata != MY_ELFDATA) + { + CONVERT (chdr.ch_type); + CONVERT (chdr.ch_reserved); + CONVERT (chdr.ch_size); + CONVERT (chdr.ch_addralign); + } + memcpy (out_buf, &chdr, sizeof (Elf64_Chdr)); + } + + /* Note we keep the sh_entsize as is, we assume it is setup + correctly and ignored when SHF_COMPRESSED is set. */ + if (elfclass == ELFCLASS32) + { + Elf32_Shdr *shdr = elf32_getshdr (scn); + shdr->sh_size = new_size; + shdr->sh_addralign = 1; + shdr->sh_flags |= SHF_COMPRESSED; + } + else + { + Elf64_Shdr *shdr = elf64_getshdr (scn); + shdr->sh_size = new_size; + shdr->sh_addralign = 1; + shdr->sh_flags |= SHF_COMPRESSED; + } + + __libelf_reset_rawdata (scn, out_buf, new_size, 1, ELF_T_CHDR); + + /* The section is now compressed, we could keep the uncompressed + data around, but since that might have been multiple Elf_Data + buffers let the user uncompress it explicitly again if they + want it to simplify bookkeeping. */ + scn->zdata_base = NULL; + + return 1; + } + else if (type == 0) + { + /* Decompress/Inflate. */ + if (compressed == 0) + { + __libelf_seterrno (ELF_E_NOT_COMPRESSED); + return -1; + } + + /* If the data is already decompressed (by elf_strptr), then we + only need to setup the rawdata and section header. XXX what + about elf_newdata? */ + if (scn->zdata_base == NULL) + { + size_t size_out, addralign; + void *buf_out = __libelf_decompress_elf (scn, &size_out, &addralign); + if (buf_out == NULL) + return -1; + + scn->zdata_base = buf_out; + scn->zdata_size = size_out; + scn->zdata_align = addralign; + } + + /* Note we keep the sh_entsize as is, we assume it is setup + correctly and ignored when SHF_COMPRESSED is set. */ + if (elfclass == ELFCLASS32) + { + Elf32_Shdr *shdr = elf32_getshdr (scn); + shdr->sh_size = scn->zdata_size; + shdr->sh_addralign = scn->zdata_align; + shdr->sh_flags &= ~SHF_COMPRESSED; + } + else + { + Elf64_Shdr *shdr = elf64_getshdr (scn); + shdr->sh_size = scn->zdata_size; + shdr->sh_addralign = scn->zdata_align; + shdr->sh_flags &= ~SHF_COMPRESSED; + } + + __libelf_reset_rawdata (scn, scn->zdata_base, + scn->zdata_size, scn->zdata_align, + __libelf_data_type (elf, sh_type)); + + return 1; + } + else + { + __libelf_seterrno (ELF_E_UNKNOWN_COMPRESSION_TYPE); + return -1; + } +} diff --git a/libelf/elf_compress_gnu.c b/libelf/elf_compress_gnu.c new file mode 100644 index 0000000..c35dc39 --- /dev/null +++ b/libelf/elf_compress_gnu.c @@ -0,0 +1,208 @@ +/* Compress or decompress a section. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "libelfP.h" +#include "common.h" + +int +elf_compress_gnu (Elf_Scn *scn, int inflate, unsigned int flags) +{ + if (scn == NULL) + return -1; + + if ((flags & ~ELF_CHF_FORCE) != 0) + { + __libelf_seterrno (ELF_E_INVALID_OPERAND); + return -1; + } + + bool force = (flags & ELF_CHF_FORCE) != 0; + + Elf *elf = scn->elf; + GElf_Ehdr ehdr; + if (gelf_getehdr (elf, &ehdr) == NULL) + return -1; + + int elfclass = elf->class; + int elfdata = ehdr.e_ident[EI_DATA]; + + Elf64_Xword sh_flags; + Elf64_Word sh_type; + Elf64_Xword sh_addralign; + if (elfclass == ELFCLASS32) + { + Elf32_Shdr *shdr = elf32_getshdr (scn); + if (shdr == NULL) + return -1; + + sh_flags = shdr->sh_flags; + sh_type = shdr->sh_type; + sh_addralign = shdr->sh_addralign; + } + else + { + Elf64_Shdr *shdr = elf64_getshdr (scn); + if (shdr == NULL) + return -1; + + sh_flags = shdr->sh_flags; + sh_type = shdr->sh_type; + sh_addralign = shdr->sh_addralign; + } + + if ((sh_flags & SHF_ALLOC) != 0) + { + __libelf_seterrno (ELF_E_INVALID_SECTION_FLAGS); + return -1; + } + + if (sh_type == SHT_NULL || sh_type == SHT_NOBITS) + { + __libelf_seterrno (ELF_E_INVALID_SECTION_TYPE); + return -1; + } + + /* For GNU compression we cannot really know whether the section is + already compressed or not. Just try and see what happens... */ + // int compressed = (sh_flags & SHF_COMPRESSED); + if (inflate == 1) + { + size_t hsize = 4 + 8; /* GNU "ZLIB" + 8 byte size. */ + size_t orig_size, new_size, orig_addralign; + void *out_buf = __libelf_compress (scn, hsize, elfdata, + &orig_size, &orig_addralign, + &new_size, force); + + /* Compression would make section larger, don't change anything. */ + if (out_buf == (void *) -1) + return 0; + + /* Compression failed, return error. */ + if (out_buf == NULL) + return -1; + + uint64_t be64_size = htobe64 (orig_size); + memmove (out_buf, "ZLIB", 4); + memmove (out_buf + 4, &be64_size, sizeof (be64_size)); + + /* We don't know anything about sh_entsize, sh_addralign and + sh_flags won't have a SHF_COMPRESSED hint in the GNU format. + Just adjust the sh_size. */ + if (elfclass == ELFCLASS32) + { + Elf32_Shdr *shdr = elf32_getshdr (scn); + shdr->sh_size = new_size; + } + else + { + Elf64_Shdr *shdr = elf64_getshdr (scn); + shdr->sh_size = new_size; + } + + __libelf_reset_rawdata (scn, out_buf, new_size, 1, ELF_T_BYTE); + + /* The section is now compressed, we could keep the uncompressed + data around, but since that might have been multiple Elf_Data + buffers let the user uncompress it explicitly again if they + want it to simplify bookkeeping. */ + scn->zdata_base = NULL; + + return 1; + } + else if (inflate == 0) + { + /* In theory the user could have constucted a compressed section + by hand. But we always just take the rawdata directly and + decompress that. */ + Elf_Data *data = elf_rawdata (scn, NULL); + if (data == NULL) + return -1; + + size_t hsize = 4 + 8; /* GNU "ZLIB" + 8 byte size. */ + if (data->d_size < hsize || memcmp (data->d_buf, "ZLIB", 4) != 0) + { + __libelf_seterrno (ELF_E_NOT_COMPRESSED); + return -1; + } + + /* There is a 12-byte header of "ZLIB" followed by + an 8-byte big-endian size. There is only one type and + Alignment isn't preserved separately. */ + uint64_t gsize; + memcpy (&gsize, data->d_buf + 4, sizeof gsize); + gsize = be64toh (gsize); + + /* One more sanity check, size should be bigger than original + data size plus some overhead (4 chars ZLIB + 8 bytes size + 6 + bytes zlib stream overhead + 5 bytes overhead max for one 16K + block) and should fit into a size_t. */ + if (gsize + 4 + 8 + 6 + 5 < data->d_size || gsize > SIZE_MAX) + { + __libelf_seterrno (ELF_E_NOT_COMPRESSED); + return -1; + } + + size_t size = gsize; + size_t size_in = data->d_size - hsize; + void *buf_in = data->d_buf + hsize; + void *buf_out = __libelf_decompress (buf_in, size_in, size); + if (buf_out == NULL) + return -1; + + /* We don't know anything about sh_entsize, sh_addralign and + sh_flags won't have a SHF_COMPRESSED hint in the GNU format. + Just adjust the sh_size. */ + if (elfclass == ELFCLASS32) + { + Elf32_Shdr *shdr = elf32_getshdr (scn); + shdr->sh_size = size; + } + else + { + Elf64_Shdr *shdr = elf64_getshdr (scn); + shdr->sh_size = size; + } + + __libelf_reset_rawdata (scn, buf_out, size, sh_addralign, + __libelf_data_type (elf, sh_type)); + + scn->zdata_base = buf_out; + + return 1; + } + else + { + __libelf_seterrno (ELF_E_UNKNOWN_COMPRESSION_TYPE); + return -1; + } +} diff --git a/libelf/elf_end.c b/libelf/elf_end.c index d4ae051..fde17b5 100644 --- a/libelf/elf_end.c +++ b/libelf/elf_end.c @@ -1,5 +1,5 @@ /* Free resources associated with Elf descriptor. - Copyright (C) 1998,1999,2000,2001,2002,2004,2005,2007 Red Hat, Inc. + Copyright (C) 1998,1999,2000,2001,2002,2004,2005,2007,2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -40,8 +40,7 @@ int -elf_end (elf) - Elf *elf; +elf_end (Elf *elf) { Elf *parent; @@ -151,6 +150,12 @@ elf_end (elf) /* It doesn't matter which pointer. */ free (scn->shdr.e32); + /* Free zdata if uncompressed, but not yet used as + rawdata_base. If it is already used it will be + freed below. */ + if (scn->zdata_base != scn->rawdata_base) + free (scn->zdata_base); + /* If the file has the same byte order and the architecture doesn't require overly stringent alignment the raw data buffer is the same as the @@ -159,8 +164,9 @@ elf_end (elf) free (scn->data_base); /* The section data is allocated if we couldn't mmap - the file. */ - if (elf->map_address == NULL) + the file. Or if we had to decompress. */ + if (elf->map_address == NULL + || scn->rawdata_base == scn->zdata_base) free (scn->rawdata_base); /* Free the list of data buffers for the section. diff --git a/libelf/elf_error.c b/libelf/elf_error.c index aa7f917..888b389 100644 --- a/libelf/elf_error.c +++ b/libelf/elf_error.c @@ -1,5 +1,5 @@ /* Error handling in libelf. - Copyright (C) 1998-2010 Red Hat, Inc. + Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -230,6 +230,41 @@ core files") (ELF_E_NO_PHDR_IDX \ + sizeof "file has no program header") N_("invalid offset") + "\0" +#define ELF_E_INVALID_SECTION_TYPE_IDX \ + (ELF_E_INVALID_OFFSET_IDX \ + + sizeof "invalid offset") + N_("invalid section type") + "\0" +#define ELF_E_INVALID_SECTION_FLAGS_IDX \ + (ELF_E_INVALID_SECTION_TYPE_IDX \ + + sizeof "invalid section type") + N_("invalid section flags") + "\0" +#define ELF_E_NOT_COMPRESSED_IDX \ + (ELF_E_INVALID_SECTION_FLAGS_IDX \ + + sizeof "invalid section flags") + N_("section does not contain compressed data") + "\0" +#define ELF_E_ALREADY_COMPRESSED_IDX \ + (ELF_E_NOT_COMPRESSED_IDX \ + + sizeof "section does not contain compressed data") + N_("section contains compressed data") + "\0" +#define ELF_E_UNKNOWN_COMPRESSION_TYPE_IDX \ + (ELF_E_ALREADY_COMPRESSED_IDX \ + + sizeof "section contains compressed data") + N_("unknown compression type") + "\0" +#define ELF_E_COMPRESS_ERROR_IDX \ + (ELF_E_UNKNOWN_COMPRESSION_TYPE_IDX \ + + sizeof "unknown compression type") + N_("cannot compress data") + "\0" +#define ELF_E_DECOMPRESS_ERROR_IDX \ + (ELF_E_COMPRESS_ERROR_IDX \ + + sizeof "cannot compress data") + N_("cannot decompress data") }; @@ -277,22 +312,28 @@ static const uint_fast16_t msgidx[ELF_E_NUM] = [ELF_E_GROUP_NOT_REL] = ELF_E_GROUP_NOT_REL_IDX, [ELF_E_INVALID_PHDR] = ELF_E_INVALID_PHDR_IDX, [ELF_E_NO_PHDR] = ELF_E_NO_PHDR_IDX, - [ELF_E_INVALID_OFFSET] = ELF_E_INVALID_OFFSET_IDX + [ELF_E_INVALID_OFFSET] = ELF_E_INVALID_OFFSET_IDX, + [ELF_E_INVALID_SECTION_TYPE] = ELF_E_INVALID_SECTION_TYPE_IDX, + [ELF_E_INVALID_SECTION_FLAGS] = ELF_E_INVALID_SECTION_FLAGS_IDX, + [ELF_E_NOT_COMPRESSED] = ELF_E_NOT_COMPRESSED_IDX, + [ELF_E_ALREADY_COMPRESSED] = ELF_E_ALREADY_COMPRESSED_IDX, + [ELF_E_UNKNOWN_COMPRESSION_TYPE] = ELF_E_UNKNOWN_COMPRESSION_TYPE_IDX, + [ELF_E_COMPRESS_ERROR] = ELF_E_COMPRESS_ERROR_IDX, + [ELF_E_DECOMPRESS_ERROR] = ELF_E_DECOMPRESS_ERROR_IDX }; #define nmsgidx ((int) (sizeof (msgidx) / sizeof (msgidx[0]))) void -__libelf_seterrno (value) - int value; +internal_function +__libelf_seterrno (int value) { global_error = value >= 0 && value < nmsgidx ? value : ELF_E_UNKNOWN_ERROR; } const char * -elf_errmsg (error) - int error; +elf_errmsg (int error) { int last_error = global_error; diff --git a/libelf/elf_fill.c b/libelf/elf_fill.c index 174ab45..6ebdf63 100644 --- a/libelf/elf_fill.c +++ b/libelf/elf_fill.c @@ -1,5 +1,5 @@ /* Set fill byte used when constructing ELF objects. - Copyright (C) 1998, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -40,8 +40,7 @@ int __libelf_fill_byte; void -elf_fill (fill) - int fill; +elf_fill (int fill) { __libelf_fill_byte = fill; } diff --git a/libelf/elf_flagdata.c b/libelf/elf_flagdata.c index ace8cc5..cd2b123 100644 --- a/libelf/elf_flagdata.c +++ b/libelf/elf_flagdata.c @@ -1,5 +1,5 @@ /* Manipulate ELF data flag. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -38,10 +38,7 @@ unsigned int -elf_flagdata (data, cmd, flags) - Elf_Data *data; - Elf_Cmd cmd; - unsigned int flags; +elf_flagdata (Elf_Data *data, Elf_Cmd cmd, unsigned int flags) { Elf_Data_Scn *data_scn; unsigned int result; diff --git a/libelf/elf_flagehdr.c b/libelf/elf_flagehdr.c index d3a320b..a98276d 100644 --- a/libelf/elf_flagehdr.c +++ b/libelf/elf_flagehdr.c @@ -1,5 +1,5 @@ /* Manipulate ELF header flags. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -38,10 +38,7 @@ unsigned int -elf_flagehdr (elf, cmd, flags) - Elf *elf; - Elf_Cmd cmd; - unsigned int flags; +elf_flagehdr (Elf *elf, Elf_Cmd cmd, unsigned int flags) { unsigned int result; diff --git a/libelf/elf_flagelf.c b/libelf/elf_flagelf.c index b34bd4f..bd90a21 100644 --- a/libelf/elf_flagelf.c +++ b/libelf/elf_flagelf.c @@ -1,5 +1,5 @@ /* Manipulate ELF file flags. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -38,10 +38,7 @@ unsigned int -elf_flagelf (elf, cmd, flags) - Elf *elf; - Elf_Cmd cmd; - unsigned int flags; +elf_flagelf (Elf *elf, Elf_Cmd cmd, unsigned int flags) { unsigned int result; diff --git a/libelf/elf_flagphdr.c b/libelf/elf_flagphdr.c index 2a589cc..0682d1f 100644 --- a/libelf/elf_flagphdr.c +++ b/libelf/elf_flagphdr.c @@ -1,5 +1,5 @@ /* Manipulate ELF program header flags. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -38,10 +38,7 @@ unsigned int -elf_flagphdr (elf, cmd, flags) - Elf *elf; - Elf_Cmd cmd; - unsigned int flags; +elf_flagphdr (Elf *elf, Elf_Cmd cmd, unsigned int flags) { unsigned int result; diff --git a/libelf/elf_flagscn.c b/libelf/elf_flagscn.c index 3ff826c..2164a8c 100644 --- a/libelf/elf_flagscn.c +++ b/libelf/elf_flagscn.c @@ -1,5 +1,5 @@ /* Manipulate ELF section flags. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -38,10 +38,7 @@ unsigned int -elf_flagscn (scn, cmd, flags) - Elf_Scn *scn; - Elf_Cmd cmd; - unsigned int flags; +elf_flagscn (Elf_Scn *scn, Elf_Cmd cmd, unsigned int flags) { unsigned int result; diff --git a/libelf/elf_flagshdr.c b/libelf/elf_flagshdr.c index 8d797af..febf4ab 100644 --- a/libelf/elf_flagshdr.c +++ b/libelf/elf_flagshdr.c @@ -1,5 +1,5 @@ /* Manipulate ELF section header flags. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -38,10 +38,7 @@ unsigned int -elf_flagshdr (scn, cmd, flags) - Elf_Scn *scn; - Elf_Cmd cmd; - unsigned int flags; +elf_flagshdr (Elf_Scn *scn, Elf_Cmd cmd, unsigned int flags) { unsigned int result; diff --git a/libelf/elf_getarhdr.c b/libelf/elf_getarhdr.c index f8b36b8..509f1da 100644 --- a/libelf/elf_getarhdr.c +++ b/libelf/elf_getarhdr.c @@ -1,5 +1,5 @@ /* Read header of next archive member. - Copyright (C) 1998, 1999, 2000, 2002, 2008 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2008, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -39,8 +39,7 @@ Elf_Arhdr * -elf_getarhdr (elf) - Elf *elf; +elf_getarhdr (Elf *elf) { if (elf == NULL) return NULL; diff --git a/libelf/elf_getaroff.c b/libelf/elf_getaroff.c index 62da34d..5b59203 100644 --- a/libelf/elf_getaroff.c +++ b/libelf/elf_getaroff.c @@ -1,5 +1,5 @@ /* Return offset in archive for current file ELF. - Copyright (C) 2005, 2008 Red Hat, Inc. + Copyright (C) 2005, 2008, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 2005. @@ -39,8 +39,7 @@ off_t -elf_getaroff (elf) - Elf *elf; +elf_getaroff (Elf *elf) { /* Be gratious, the specs demand it. */ if (elf == NULL || elf->parent == NULL) diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c index 7325190..65c67cc 100644 --- a/libelf/elf_getarsym.c +++ b/libelf/elf_getarsym.c @@ -1,5 +1,5 @@ /* Return symbol table of archive. - Copyright (C) 1998-2000, 2002, 2005, 2009, 2012, 2014 Red Hat, Inc. + Copyright (C) 1998-2000, 2002, 2005, 2009, 2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -74,9 +74,7 @@ read_number_entries (uint64_t *nump, Elf *elf, size_t *offp, bool index64_p) } Elf_Arsym * -elf_getarsym (elf, ptr) - Elf *elf; - size_t *ptr; +elf_getarsym (Elf *elf, size_t *ptr) { if (elf->kind != ELF_K_AR) { @@ -106,6 +104,9 @@ elf_getarsym (elf, ptr) /* In case we find no index remember this for the next call. */ elf->state.ar.ar_sym = (Elf_Arsym *) -1l; + /* We might have to allocate some temporary data for reading. */ + void *temp_data = NULL; + struct ar_hdr *index_hdr; if (elf->map_address == NULL) { @@ -182,11 +183,12 @@ elf_getarsym (elf, ptr) tmpbuf[10] = '\0'; size_t index_size = atol (tmpbuf); - if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size + if (index_size > elf->maximum_size + || elf->maximum_size - index_size < SARMAG + sizeof (struct ar_hdr) #if SIZE_MAX <= 4294967295U || n >= SIZE_MAX / sizeof (Elf_Arsym) #endif - || n * w > index_size) + || n > index_size / w) { /* This index table cannot be right since it does not fit into the file. */ @@ -199,17 +201,19 @@ elf_getarsym (elf, ptr) elf->state.ar.ar_sym = (Elf_Arsym *) malloc (ar_sym_len); if (elf->state.ar.ar_sym != NULL) { - union - { - uint32_t u32[n]; - uint64_t u64[n]; - } *file_data; + void *file_data; /* unit32_t[n] or uint64_t[n] */ char *str_data; size_t sz = n * w; if (elf->map_address == NULL) { - file_data = alloca (sz); + temp_data = malloc (sz); + if (unlikely (temp_data == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + goto out; + } + file_data = temp_data; ar_sym_len += index_size - n * w; Elf_Arsym *newp = (Elf_Arsym *) realloc (elf->state.ar.ar_sym, @@ -245,18 +249,28 @@ elf_getarsym (elf, ptr) file_data = (void *) (elf->map_address + off); if (!ALLOW_UNALIGNED && ((uintptr_t) file_data & -(uintptr_t) n) != 0) - file_data = memcpy (alloca (sz), elf->map_address + off, sz); + { + temp_data = malloc (sz); + if (unlikely (temp_data == NULL)) + { + __libelf_seterrno (ELF_E_NOMEM); + goto out; + } + file_data = memcpy (temp_data, elf->map_address + off, sz); + } str_data = (char *) (elf->map_address + off + sz); } /* Now we can build the data structure. */ Elf_Arsym *arsym = elf->state.ar.ar_sym; + uint64_t (*u64)[n] = file_data; + uint32_t (*u32)[n] = file_data; for (size_t cnt = 0; cnt < n; ++cnt) { arsym[cnt].as_name = str_data; if (index64_p) { - uint64_t tmp = file_data->u64[cnt]; + uint64_t tmp = (*u64)[cnt]; if (__BYTE_ORDER == __LITTLE_ENDIAN) tmp = bswap_64 (tmp); @@ -278,9 +292,9 @@ elf_getarsym (elf, ptr) } } else if (__BYTE_ORDER == __LITTLE_ENDIAN) - arsym[cnt].as_off = bswap_32 (file_data->u32[cnt]); + arsym[cnt].as_off = bswap_32 ((*u32)[cnt]); else - arsym[cnt].as_off = file_data->u32[cnt]; + arsym[cnt].as_off = (*u32)[cnt]; arsym[cnt].as_hash = _dl_elf_hash (str_data); str_data = rawmemchr (str_data, '\0') + 1; @@ -298,6 +312,7 @@ elf_getarsym (elf, ptr) result = elf->state.ar.ar_sym; out: + free (temp_data); rwlock_unlock (elf->lock); } diff --git a/libelf/elf_getbase.c b/libelf/elf_getbase.c index ff0feb4..8ec5f87 100644 --- a/libelf/elf_getbase.c +++ b/libelf/elf_getbase.c @@ -1,5 +1,5 @@ /* Return offset of first byte for the object. - Copyright (C) 1998, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -38,8 +38,7 @@ off_t -elf_getbase (elf) - Elf *elf; +elf_getbase (Elf *elf) { return elf == NULL ? (off_t) -1 : elf->start_offset; } diff --git a/libelf/elf_getdata.c b/libelf/elf_getdata.c index bc9f26a..4ec94b9 100644 --- a/libelf/elf_getdata.c +++ b/libelf/elf_getdata.c @@ -1,5 +1,5 @@ /* Return the next data element from the section after possibly converting it. - Copyright (C) 1998-2005, 2006, 2007 Red Hat, Inc. + Copyright (C) 1998-2005, 2006, 2007, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -83,8 +83,15 @@ const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] # define TYPE_ALIGNS(Bits) \ { \ [ELF_T_ADDR] = __alignof__ (ElfW2(Bits,Addr)), \ + [ELF_T_EHDR] = __alignof__ (ElfW2(Bits,Ehdr)), \ [ELF_T_HALF] = __alignof__ (ElfW2(Bits,Half)), \ + [ELF_T_OFF] = __alignof__ (ElfW2(Bits,Off)), \ + [ELF_T_PHDR] = __alignof__ (ElfW2(Bits,Phdr)), \ + [ELF_T_SHDR] = __alignof__ (ElfW2(Bits,Shdr)), \ + [ELF_T_SWORD] = __alignof__ (ElfW2(Bits,Sword)), \ [ELF_T_WORD] = __alignof__ (ElfW2(Bits,Word)), \ + [ELF_T_XWORD] = __alignof__ (ElfW2(Bits,Xword)), \ + [ELF_T_SXWORD] = __alignof__ (ElfW2(Bits,Sxword)), \ [ELF_T_SYM] = __alignof__ (ElfW2(Bits,Sym)), \ [ELF_T_SYMINFO] = __alignof__ (ElfW2(Bits,Syminfo)), \ [ELF_T_REL] = __alignof__ (ElfW2(Bits,Rel)), \ @@ -97,6 +104,9 @@ const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] [ELF_T_MOVE] = __alignof__ (ElfW2(Bits,Move)), \ [ELF_T_LIB] = __alignof__ (ElfW2(Bits,Lib)), \ [ELF_T_NHDR] = __alignof__ (ElfW2(Bits,Nhdr)), \ + [ELF_T_GNUHASH] = __alignof__ (Elf32_Word), \ + [ELF_T_AUXV] = __alignof__ (ElfW2(Bits,auxv_t)), \ + [ELF_T_CHDR] = __alignof__ (ElfW2(Bits,Chdr)), \ } [EV_CURRENT - 1] = { @@ -108,6 +118,22 @@ const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] #endif +Elf_Type +internal_function +__libelf_data_type (Elf *elf, int sh_type) +{ + /* Some broken ELF ABI for 64-bit machines use the wrong hash table + entry size. See elf-knowledge.h for more information. */ + if (sh_type == SHT_HASH && elf->class == ELFCLASS64) + { + GElf_Ehdr ehdr_mem; + GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem); + return (SH_ENTSIZE_HASH (ehdr) == 4 ? ELF_T_WORD : ELF_T_XWORD); + } + else + return shtype_map[LIBELF_EV_IDX][TYPEIDX (sh_type)]; +} + /* Convert the data in the current section. */ static void convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass, @@ -144,6 +170,25 @@ convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass, return; } + /* Make sure the source is correctly aligned for the conversion + function to directly access the data elements. */ + char *rawdata_source; + if (ALLOW_UNALIGNED || + ((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0) + rawdata_source = scn->rawdata_base; + else + { + rawdata_source = (char *) malloc (size); + if (rawdata_source == NULL) + { + __libelf_seterrno (ELF_E_NOMEM); + return; + } + + /* The copy will be appropriately aligned for direct access. */ + memcpy (rawdata_source, scn->rawdata_base, size); + } + /* Get the conversion function. */ #if EV_NUM != 2 fp = __elf_xfctstom[version - 1][__libelf_version - 1][eclass - 1][type]; @@ -151,7 +196,10 @@ convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass, fp = __elf_xfctstom[0][0][eclass - 1][type]; #endif - fp (scn->data_base, scn->rawdata_base, size, 0); + fp (scn->data_base, rawdata_source, size, 0); + + if (rawdata_source != scn->rawdata_base) + free (rawdata_source); } scn->data_list.data.d.d_buf = scn->data_base; @@ -170,9 +218,10 @@ int internal_function __libelf_set_rawdata_wrlock (Elf_Scn *scn) { - size_t offset; - size_t size; - size_t align; + Elf64_Off offset; + Elf64_Xword size; + Elf64_Xword align; + Elf64_Xword flags; int type; Elf *elf = scn->elf; @@ -189,6 +238,7 @@ __libelf_set_rawdata_wrlock (Elf_Scn *scn) size = shdr->sh_size; type = shdr->sh_type; align = shdr->sh_addralign; + flags = shdr->sh_flags; } else { @@ -203,6 +253,7 @@ __libelf_set_rawdata_wrlock (Elf_Scn *scn) size = shdr->sh_size; type = shdr->sh_type; align = shdr->sh_addralign; + flags = shdr->sh_flags; } /* If the section has no data (for whatever reason), leave the `d_buf' @@ -212,7 +263,10 @@ __libelf_set_rawdata_wrlock (Elf_Scn *scn) /* First a test whether the section is valid at all. */ size_t entsize; - if (type == SHT_HASH) + /* Compressed data has a header, but then compressed data. */ + if ((flags & SHF_COMPRESSED) != 0) + entsize = 1; + else if (type == SHT_HASH) { GElf_Ehdr ehdr_mem; GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem); @@ -243,8 +297,10 @@ __libelf_set_rawdata_wrlock (Elf_Scn *scn) if (elf->map_address != NULL) { /* First see whether the information in the section header is - valid and it does not ask for too much. */ - if (unlikely (offset + size > elf->maximum_size)) + valid and it does not ask for too much. Check for unsigned + overflow. */ + if (unlikely (offset > elf->maximum_size + || elf->maximum_size - offset < size)) { /* Something is wrong. */ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); @@ -287,18 +343,28 @@ __libelf_set_rawdata_wrlock (Elf_Scn *scn) } scn->rawdata.d.d_size = size; - /* Some broken ELF ABI for 64-bit machines use the wrong hash table - entry size. See elf-knowledge.h for more information. */ - if (type == SHT_HASH && elf->class == ELFCLASS64) - { - GElf_Ehdr ehdr_mem; - GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem); - scn->rawdata.d.d_type - = (SH_ENTSIZE_HASH (ehdr) == 4 ? ELF_T_WORD : ELF_T_XWORD); - } + + /* Compressed data always has type ELF_T_CHDR regardless of the + section type. */ + if ((flags & SHF_COMPRESSED) != 0) + scn->rawdata.d.d_type = ELF_T_CHDR; else - scn->rawdata.d.d_type = shtype_map[LIBELF_EV_IDX][TYPEIDX (type)]; + scn->rawdata.d.d_type = __libelf_data_type (elf, type); scn->rawdata.d.d_off = 0; + + /* Make sure the alignment makes sense. d_align should be aligned both + in the section (trivially true since d_off is zero) and in the file. + Unfortunately we cannot be too strict because there are ELF files + out there that fail this requirement. We will try to fix those up + in elf_update when writing out the image. But for very large + alignment values this can bloat the image considerably. So here + just check and clamp the alignment value to not be bigger than the + actual offset of the data in the file. Given that there is always + at least an ehdr this will only trigger for alignment values > 64 + which should be uncommon. */ + align = align ?: 1; + if (align > offset) + align = offset; scn->rawdata.d.d_align = align; if (elf->class == ELFCLASS32 || (offsetof (struct Elf, state.elf32.ehdr) @@ -335,11 +401,47 @@ __libelf_set_rawdata (Elf_Scn *scn) return result; } +void +internal_function +__libelf_set_data_list_rdlock (Elf_Scn *scn, int wrlocked) +{ + if (scn->rawdata.d.d_buf != NULL && scn->rawdata.d.d_size > 0) + { + Elf *elf = scn->elf; + + /* Upgrade the lock to a write lock if necessary and check + nobody else already did the work. */ + if (!wrlocked) + { + rwlock_unlock (elf->lock); + rwlock_wrlock (elf->lock); + if (scn->data_list_rear != NULL) + return; + } + + /* Convert according to the version and the type. */ + convert_data (scn, __libelf_version, elf->class, + (elf->class == ELFCLASS32 + || (offsetof (struct Elf, state.elf32.ehdr) + == offsetof (struct Elf, state.elf64.ehdr)) + ? elf->state.elf32.ehdr->e_ident[EI_DATA] + : elf->state.elf64.ehdr->e_ident[EI_DATA]), + scn->rawdata.d.d_size, scn->rawdata.d.d_type); + } + else + { + /* This is an empty or NOBITS section. There is no buffer but + the size information etc is important. */ + scn->data_list.data.d = scn->rawdata.d; + scn->data_list.data.s = scn; + } + + scn->data_list_rear = &scn->data_list; +} + Elf_Data * internal_function -__elf_getdata_rdlock (scn, data) - Elf_Scn *scn; - Elf_Data *data; +__elf_getdata_rdlock (Elf_Scn *scn, Elf_Data *data) { Elf_Data *result = NULL; Elf *elf; @@ -425,51 +527,17 @@ __elf_getdata_rdlock (scn, data) empty in case the section has size zero (for whatever reason). Now create the converted data in case this is necessary. */ if (scn->data_list_rear == NULL) - { - if (scn->rawdata.d.d_buf != NULL && scn->rawdata.d.d_size > 0) - { - if (!locked) - { - rwlock_unlock (elf->lock); - rwlock_wrlock (elf->lock); - if (scn->data_list_rear != NULL) - goto pass; - } - - /* Convert according to the version and the type. */ - convert_data (scn, __libelf_version, elf->class, - (elf->class == ELFCLASS32 - || (offsetof (struct Elf, state.elf32.ehdr) - == offsetof (struct Elf, state.elf64.ehdr)) - ? elf->state.elf32.ehdr->e_ident[EI_DATA] - : elf->state.elf64.ehdr->e_ident[EI_DATA]), - scn->rawdata.d.d_size, scn->rawdata.d.d_type); - } - else - { - /* This is an empty or NOBITS section. There is no buffer but - the size information etc is important. */ - scn->data_list.data.d = scn->rawdata.d; - scn->data_list.data.s = scn; - } - - scn->data_list_rear = &scn->data_list; - } + __libelf_set_data_list_rdlock (scn, locked); - /* If no data is present we cannot return any. */ - if (scn->data_list_rear != NULL) - pass: - /* Return the first data element in the list. */ - result = &scn->data_list.data.d; + /* Return the first data element in the list. */ + result = &scn->data_list.data.d; out: return result; } Elf_Data * -elf_getdata (scn, data) - Elf_Scn *scn; - Elf_Data *data; +elf_getdata (Elf_Scn *scn, Elf_Data *data) { Elf_Data *result; diff --git a/libelf/elf_getdata_rawchunk.c b/libelf/elf_getdata_rawchunk.c index f4fbe66..31b2fe7 100644 --- a/libelf/elf_getdata_rawchunk.c +++ b/libelf/elf_getdata_rawchunk.c @@ -1,5 +1,5 @@ /* Return converted data from raw chunk of ELF file. - Copyright (C) 2007 Red Hat, Inc. + Copyright (C) 2007, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -41,11 +41,7 @@ #include "common.h" Elf_Data * -elf_getdata_rawchunk (elf, offset, size, type) - Elf *elf; - off64_t offset; - size_t size; - Elf_Type type; +elf_getdata_rawchunk (Elf *elf, off_t offset, size_t size, Elf_Type type) { if (unlikely (elf == NULL)) return NULL; @@ -57,8 +53,9 @@ elf_getdata_rawchunk (elf, offset, size, type) return NULL; } - if (unlikely (offset < 0 || offset + (off64_t) size < offset - || offset + size > elf->maximum_size)) + if (unlikely (offset < 0 || (uint64_t) offset > elf->maximum_size + || elf->maximum_size - (uint64_t) offset < size)) + { /* Invalid request. */ __libelf_seterrno (ELF_E_INVALID_OP); @@ -78,9 +75,24 @@ elf_getdata_rawchunk (elf, offset, size, type) rwlock_rdlock (elf->lock); - /* If the file is mmap'ed we can use it directly. */ + size_t align = __libelf_type_align (elf->class, type); if (elf->map_address != NULL) - rawchunk = elf->map_address + elf->start_offset + offset; + { + /* If the file is mmap'ed we can use it directly, if aligned for type. */ + char *rawdata = elf->map_address + elf->start_offset + offset; + if (ALLOW_UNALIGNED || + ((uintptr_t) rawdata & (align - 1)) == 0) + rawchunk = rawdata; + else + { + /* We allocate the memory and memcpy it to get aligned data. */ + rawchunk = malloc (size); + if (rawchunk == NULL) + goto nomem; + memcpy (rawchunk, rawdata, size); + flags = ELF_F_MALLOCED; + } + } else { /* We allocate the memory and read the data from the file. */ @@ -107,7 +119,6 @@ elf_getdata_rawchunk (elf, offset, size, type) } /* Copy and/or convert the data as needed for aligned native-order access. */ - size_t align = __libelf_type_align (elf->class, type); void *buffer; if (elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA) { diff --git a/libelf/elf_getident.c b/libelf/elf_getident.c index 10beeaf..5abf8c9 100644 --- a/libelf/elf_getident.c +++ b/libelf/elf_getident.c @@ -1,5 +1,5 @@ /* Retrieve file identification data. - Copyright (C) 1998, 1999, 2000, 2002, 2004 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2004, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -37,9 +37,7 @@ char * -elf_getident (elf, ptr) - Elf *elf; - size_t *ptr; +elf_getident (Elf *elf, size_t *ptr) { /* In case this is no ELF file, the handle is invalid and we return NULL. */ diff --git a/libelf/elf_getphdrnum.c b/libelf/elf_getphdrnum.c index 99649be..061183b 100644 --- a/libelf/elf_getphdrnum.c +++ b/libelf/elf_getphdrnum.c @@ -1,5 +1,5 @@ /* Return number of program headers in the ELF file. - Copyright (C) 2010 Red Hat, Inc. + Copyright (C) 2010, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -38,9 +38,8 @@ int -__elf_getphdrnum_rdlock (elf, dst) - Elf *elf; - size_t *dst; +internal_function +__elf_getphdrnum_rdlock (Elf *elf, size_t *dst) { if (unlikely (elf->state.elf64.ehdr == NULL)) { @@ -62,19 +61,63 @@ __elf_getphdrnum_rdlock (elf, dst) /* If there are no section headers, perhaps this is really just 65536 written without PN_XNUM support. Either that or it's bad data. */ - if (likely (scns->cnt > 0)) - *dst = (elf->class == ELFCLASS32 - ? scns->data[0].shdr.e32->sh_info - : scns->data[0].shdr.e64->sh_info); + if (elf->class == ELFCLASS32) + { + if (likely (scns->cnt > 0 + && elf->state.elf32.scns.data[0].shdr.e32 != NULL)) + *dst = scns->data[0].shdr.e32->sh_info; + } + else + { + if (likely (scns->cnt > 0 + && elf->state.elf64.scns.data[0].shdr.e64 != NULL)) + *dst = scns->data[0].shdr.e64->sh_info; + } } return 0; } int -elf_getphdrnum (elf, dst) - Elf *elf; - size_t *dst; +internal_function +__elf_getphdrnum_chk_rdlock (Elf *elf, size_t *dst) +{ + int result = __elf_getphdrnum_rdlock (elf, dst); + + /* Do some sanity checking to make sure phnum and phoff are consistent. */ + Elf64_Off off = (elf->class == ELFCLASS32 + ? elf->state.elf32.ehdr->e_phoff + : elf->state.elf64.ehdr->e_phoff); + if (unlikely (off == 0)) + { + *dst = 0; + return result; + } + + if (unlikely (off >= elf->maximum_size)) + { + __libelf_seterrno (ELF_E_INVALID_DATA); + return -1; + } + + /* Check for too many sections. */ + size_t phdr_size = (elf->class == ELFCLASS32 + ? sizeof (Elf32_Phdr) : sizeof (Elf64_Phdr)); + if (unlikely (*dst > SIZE_MAX / phdr_size)) + { + __libelf_seterrno (ELF_E_INVALID_DATA); + return -1; + } + + /* Truncated file? Don't return more than can be indexed. */ + if (unlikely (elf->maximum_size - off < *dst * phdr_size)) + *dst = (elf->maximum_size - off) / phdr_size; + + return result; +} + +int +elf_getphdrnum (Elf *elf, size_t *dst) { int result; @@ -88,7 +131,7 @@ elf_getphdrnum (elf, dst) } rwlock_rdlock (elf->lock); - result = __elf_getphdrnum_rdlock (elf, dst); + result = __elf_getphdrnum_chk_rdlock (elf, dst); rwlock_unlock (elf->lock); return result; diff --git a/libelf/elf_getscn.c b/libelf/elf_getscn.c index 7c6b7de..9f7213b 100644 --- a/libelf/elf_getscn.c +++ b/libelf/elf_getscn.c @@ -1,5 +1,5 @@ /* Get section at specific index. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -39,9 +39,7 @@ Elf_Scn * -elf_getscn (elf, idx) - Elf *elf; - size_t idx; +elf_getscn (Elf *elf, size_t idx) { if (elf == NULL) return NULL; diff --git a/libelf/elf_getshdrnum.c b/libelf/elf_getshdrnum.c index 73a3300..18e5d14 100644 --- a/libelf/elf_getshdrnum.c +++ b/libelf/elf_getshdrnum.c @@ -1,5 +1,5 @@ /* Return number of sections in the ELF file. - Copyright (C) 2002, 2009 Red Hat, Inc. + Copyright (C) 2002, 2009, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -39,9 +39,8 @@ int -__elf_getshdrnum_rdlock (elf, dst) - Elf *elf; - size_t *dst; +internal_function +__elf_getshdrnum_rdlock (Elf *elf, size_t *dst) { int result = 0; int idx; @@ -71,9 +70,7 @@ __elf_getshdrnum_rdlock (elf, dst) } int -elf_getshdrnum (elf, dst) - Elf *elf; - size_t *dst; +elf_getshdrnum (Elf *elf, size_t *dst) { int result; diff --git a/libelf/elf_getshdrstrndx.c b/libelf/elf_getshdrstrndx.c index 1dbed4c..aead2fe 100644 --- a/libelf/elf_getshdrstrndx.c +++ b/libelf/elf_getshdrstrndx.c @@ -1,5 +1,5 @@ /* Return section index of section header string table. - Copyright (C) 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -43,9 +43,7 @@ int -elf_getshdrstrndx (elf, dst) - Elf *elf; - size_t *dst; +elf_getshdrstrndx (Elf *elf, size_t *dst) { int result = 0; @@ -92,6 +90,13 @@ elf_getshdrstrndx (elf, dst) if (elf->class == ELFCLASS32) { size_t offset; + if (unlikely (elf->state.elf32.scns.cnt == 0)) + { + /* Cannot use SHN_XINDEX without section headers. */ + __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); + result = -1; + goto out; + } if (elf->state.elf32.scns.data[0].shdr.e32 != NULL) { @@ -146,6 +151,14 @@ elf_getshdrstrndx (elf, dst) } else { + if (unlikely (elf->state.elf64.scns.cnt == 0)) + { + /* Cannot use SHN_XINDEX without section headers. */ + __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); + result = -1; + goto out; + } + if (elf->state.elf64.scns.data[0].shdr.e64 != NULL) { num = elf->state.elf64.scns.data[0].shdr.e64->sh_link; diff --git a/libelf/elf_gnu_hash.c b/libelf/elf_gnu_hash.c index 4c21857..5a1b852 100644 --- a/libelf/elf_gnu_hash.c +++ b/libelf/elf_gnu_hash.c @@ -1,5 +1,5 @@ /* GNU-style Hash function used in ELF implementations. - Copyright (C) 2006 Red Hat, Inc. + Copyright (C) 2006, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 2006. @@ -37,8 +37,7 @@ #include unsigned long int -elf_gnu_hash (string) - const char *string; +elf_gnu_hash (const char *string) { uint_fast32_t h = 5381; for (unsigned char c = *string; c != '\0'; c = *++string) diff --git a/libelf/elf_hash.c b/libelf/elf_hash.c index 306ebc2..345697e 100644 --- a/libelf/elf_hash.c +++ b/libelf/elf_hash.c @@ -1,5 +1,5 @@ /* Hash function used in ELF implementations. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -37,8 +37,7 @@ #include unsigned long int -elf_hash (string) - const char *string; +elf_hash (const char *string) { return _dl_elf_hash (string); } diff --git a/libelf/elf_kind.c b/libelf/elf_kind.c index d8ab2fd..0fb3f0c 100644 --- a/libelf/elf_kind.c +++ b/libelf/elf_kind.c @@ -1,5 +1,5 @@ /* Return the kind of file associated with the descriptor. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -38,8 +38,7 @@ Elf_Kind -elf_kind (elf) - Elf *elf; +elf_kind (Elf *elf) { return elf == NULL ? ELF_K_NONE : elf->kind; } diff --git a/libelf/elf_memory.c b/libelf/elf_memory.c index 08f85a1..a47f1d2 100644 --- a/libelf/elf_memory.c +++ b/libelf/elf_memory.c @@ -1,5 +1,5 @@ /* Create descriptor for memory region. - Copyright (C) 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1999. @@ -38,9 +38,7 @@ Elf * -elf_memory (image, size) - char *image; - size_t size; +elf_memory (char *image, size_t size) { if (image == NULL) { diff --git a/libelf/elf_ndxscn.c b/libelf/elf_ndxscn.c index bd4bfbf..488c4e5 100644 --- a/libelf/elf_ndxscn.c +++ b/libelf/elf_ndxscn.c @@ -1,5 +1,5 @@ /* Get index of section. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -38,8 +38,7 @@ size_t -elf_ndxscn (scn) - Elf_Scn *scn; +elf_ndxscn (Elf_Scn *scn) { if (scn == NULL) return SHN_UNDEF; diff --git a/libelf/elf_newdata.c b/libelf/elf_newdata.c index 90d1813..f6609a8 100644 --- a/libelf/elf_newdata.c +++ b/libelf/elf_newdata.c @@ -1,5 +1,5 @@ /* Create new, empty section data. - Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -64,6 +64,25 @@ elf_newdata (Elf_Scn *scn) rwlock_wrlock (scn->elf->lock); + /* data_read is set when data has been read from the ELF image or + when a new section has been created by elf_newscn. If data has + been read from the ELF image, then rawdata_base will point to raw + data. If data_read has been set by elf_newscn, then rawdata_base + will be NULL. data_list_rear will be set by elf_getdata if the + data has been converted, or by this function, elf_newdata, when + new data has been added. + + Currently elf_getdata and elf_update rely on the fact that when + data_list_read is not NULL all they have to do is walk the data + list. They will ignore any (unread) raw data in that case. + + So we need to make sure the data list is setup if there is + already data available. */ + if (scn->data_read + && scn->rawdata_base != NULL + && scn->data_list_rear == NULL) + __libelf_set_data_list_rdlock (scn, 1); + if (scn->data_read && scn->data_list_rear == NULL) { /* This means the section was created by the user and this is the @@ -73,6 +92,19 @@ elf_newdata (Elf_Scn *scn) } else { + /* It would be more efficient to create new data without + reading/converting the data from the file. But then we + have to remember this. Currently elf_getdata and + elf_update rely on the fact that they don't have to + load/convert any data if data_list_rear is set. */ + if (scn->data_read == 0) + { + if (__libelf_set_rawdata_wrlock (scn) != 0) + /* Something went wrong. The error value is already set. */ + goto out; + __libelf_set_data_list_rdlock (scn, 1); + } + /* Create a new, empty data descriptor. */ result = (Elf_Data_List *) calloc (1, sizeof (Elf_Data_List)); if (result == NULL) @@ -82,11 +114,6 @@ elf_newdata (Elf_Scn *scn) } result->flags = ELF_F_DIRTY | ELF_F_MALLOCED; - - if (scn->data_list_rear == NULL) - /* We create new data without reading/converting the data from the - file. That is fine but we have to remember this. */ - scn->data_list_rear = &scn->data_list; } /* Set the predefined values. */ diff --git a/libelf/elf_newscn.c b/libelf/elf_newscn.c index 6e0029e..d15a642 100644 --- a/libelf/elf_newscn.c +++ b/libelf/elf_newscn.c @@ -1,5 +1,5 @@ /* Append new section. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 1998,1999,2000,2001,2002,2005,2009,2014,2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -41,8 +41,7 @@ Elf_Scn * -elf_newscn (elf) - Elf *elf; +elf_newscn (Elf *elf) { Elf_Scn *result = NULL; bool first = false; diff --git a/libelf/elf_next.c b/libelf/elf_next.c index 1f5c03c..6edafd2 100644 --- a/libelf/elf_next.c +++ b/libelf/elf_next.c @@ -1,5 +1,5 @@ /* Advance in archive to next element. - Copyright (C) 1998-2009 Red Hat, Inc. + Copyright (C) 1998-2009, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -39,8 +39,7 @@ Elf_Cmd -elf_next (elf) - Elf *elf; +elf_next (Elf *elf) { Elf *parent; Elf_Cmd ret; diff --git a/libelf/elf_nextscn.c b/libelf/elf_nextscn.c index 0d2bd66..62cb891 100644 --- a/libelf/elf_nextscn.c +++ b/libelf/elf_nextscn.c @@ -1,5 +1,5 @@ /* Get next section. - Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -39,9 +39,7 @@ Elf_Scn * -elf_nextscn (elf, scn) - Elf *elf; - Elf_Scn *scn; +elf_nextscn (Elf *elf, Elf_Scn *scn) { Elf_Scn *result = NULL; diff --git a/libelf/elf_rand.c b/libelf/elf_rand.c index cef4e44..f1850e7 100644 --- a/libelf/elf_rand.c +++ b/libelf/elf_rand.c @@ -1,5 +1,5 @@ /* Select specific element in archive. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -38,9 +38,7 @@ size_t -elf_rand (elf, offset) - Elf *elf; - size_t offset; +elf_rand (Elf *elf, size_t offset) { /* Be gratious, the specs demand it. */ if (elf == NULL || elf->kind != ELF_K_AR) diff --git a/libelf/elf_rawdata.c b/libelf/elf_rawdata.c index 9672652..db28f5d 100644 --- a/libelf/elf_rawdata.c +++ b/libelf/elf_rawdata.c @@ -1,5 +1,5 @@ /* Return raw section content. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -37,9 +37,7 @@ Elf_Data * -elf_rawdata (scn, data) - Elf_Scn *scn; - Elf_Data *data; +elf_rawdata (Elf_Scn *scn, Elf_Data *data) { if (scn == NULL || scn->elf->kind != ELF_K_ELF) { diff --git a/libelf/elf_rawfile.c b/libelf/elf_rawfile.c index dd71b88..b3837f4 100644 --- a/libelf/elf_rawfile.c +++ b/libelf/elf_rawfile.c @@ -1,5 +1,5 @@ /* Retrieve uninterpreted file contents. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -38,9 +38,7 @@ char * -elf_rawfile (elf, ptr) - Elf *elf; - size_t *ptr; +elf_rawfile (Elf *elf, size_t *ptr) { char *result; diff --git a/libelf/elf_readall.c b/libelf/elf_readall.c index 0101618..384d251 100644 --- a/libelf/elf_readall.c +++ b/libelf/elf_readall.c @@ -1,5 +1,5 @@ /* Read all of the file associated with the descriptor. - Copyright (C) 1998-2009 Red Hat, Inc. + Copyright (C) 1998-2009, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -66,8 +66,8 @@ set_address (Elf *elf, size_t offset) char * -__libelf_readall (elf) - Elf *elf; +internal_function +__libelf_readall (Elf *elf) { /* Get the file. */ rwlock_wrlock (elf->lock); diff --git a/libelf/elf_strptr.c b/libelf/elf_strptr.c index 1f40429..e3b5876 100644 --- a/libelf/elf_strptr.c +++ b/libelf/elf_strptr.c @@ -1,5 +1,5 @@ /* Return string pointer from string section. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2008, 2009 Red Hat, Inc. + Copyright (C) 1998-2002, 2004, 2008, 2009, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -38,10 +38,7 @@ char * -elf_strptr (elf, idx, offset) - Elf *elf; - size_t idx; - size_t offset; +elf_strptr (Elf *elf, size_t idx, size_t offset) { if (elf == NULL) return NULL; @@ -86,16 +83,41 @@ elf_strptr (elf, idx, offset) } } + void *get_zdata (void) + { + size_t zsize, zalign; + void *zdata = __libelf_decompress_elf (strscn, &zsize, &zalign); + if (zdata == NULL) + return NULL; + + strscn->zdata_base = zdata; + strscn->zdata_size = zsize; + strscn->zdata_align = zalign; + + return zdata; + } + + size_t sh_size = 0; if (elf->class == ELFCLASS32) { - if (unlikely (strscn->shdr.e32->sh_type != SHT_STRTAB)) + Elf32_Shdr *shdr = strscn->shdr.e32 ?: __elf32_getshdr_rdlock (strscn); + if (unlikely (shdr->sh_type != SHT_STRTAB)) { /* This is no string section. */ __libelf_seterrno (ELF_E_INVALID_SECTION); goto out; } - if (unlikely (offset >= strscn->shdr.e32->sh_size)) + if ((shdr->sh_flags & SHF_COMPRESSED) == 0) + sh_size = shdr->sh_size; + else + { + if (strscn->zdata_base == NULL && get_zdata () == NULL) + goto out; + sh_size = strscn->zdata_size; + } + + if (unlikely (offset >= sh_size)) { /* The given offset is too big, it is beyond this section. */ __libelf_seterrno (ELF_E_OFFSET_RANGE); @@ -104,14 +126,24 @@ elf_strptr (elf, idx, offset) } else { - if (unlikely (strscn->shdr.e64->sh_type != SHT_STRTAB)) + Elf64_Shdr *shdr = strscn->shdr.e64 ?: __elf64_getshdr_rdlock (strscn); + if (unlikely (shdr->sh_type != SHT_STRTAB)) { /* This is no string section. */ __libelf_seterrno (ELF_E_INVALID_SECTION); goto out; } - if (unlikely (offset >= strscn->shdr.e64->sh_size)) + if ((shdr->sh_flags & SHF_COMPRESSED) == 0) + sh_size = shdr->sh_size; + else + { + if (strscn->zdata_base == NULL && get_zdata () == NULL) + goto out; + sh_size = strscn->zdata_size; + } + + if (unlikely (offset >= sh_size)) { /* The given offset is too big, it is beyond this section. */ __libelf_seterrno (ELF_E_OFFSET_RANGE); @@ -129,12 +161,35 @@ elf_strptr (elf, idx, offset) goto out; } - if (likely (strscn->rawdata_base != NULL)) - // XXX Is this correct if a file is read and then new data is added - // XXX to the string section? Likely needs to check offset against - // XXX size of rawdata_base buffer and then iterate over rest of the - // XXX list. - result = &strscn->rawdata_base[offset]; + if (unlikely (strscn->zdata_base != NULL)) + { + /* Make sure the string is NUL terminated. Start from the end, + which very likely is a NUL char. */ + if (likely (memrchr (&strscn->zdata_base[offset], + '\0', sh_size - offset) != NULL)) + result = &strscn->zdata_base[offset]; + else + __libelf_seterrno (ELF_E_INVALID_INDEX); + } + else if (likely (strscn->data_list_rear == NULL)) + { + // XXX The above is currently correct since elf_newdata will + // make sure to convert the rawdata into the datalist if + // necessary. But it would be more efficient to keep the rawdata + // unconverted and only then iterate over the rest of the (newly + // added data) list. Note that when the ELF file is mmapped + // rawdata_base can be set while rawdata.d hasn't been + // initialized yet (when data_read is zero). So we cannot just + // look at the rawdata.d.d_size. + + /* Make sure the string is NUL terminated. Start from the end, + which very likely is a NUL char. */ + if (likely (memrchr (&strscn->rawdata_base[offset], + '\0', sh_size - offset) != NULL)) + result = &strscn->rawdata_base[offset]; + else + __libelf_seterrno (ELF_E_INVALID_INDEX); + } else { /* This is a file which is currently created. Use the list of @@ -145,7 +200,16 @@ elf_strptr (elf, idx, offset) if (offset >= (size_t) dl->data.d.d_off && offset < dl->data.d.d_off + dl->data.d.d_size) { - result = (char *) dl->data.d.d_buf + (offset - dl->data.d.d_off); + /* Make sure the string is NUL terminated. Start from + the end, which very likely is a NUL char. */ + if (likely (memrchr ((char *) dl->data.d.d_buf + + (offset - dl->data.d.d_off), '\0', + (dl->data.d.d_size + - (offset - dl->data.d.d_off))) != NULL)) + result = ((char *) dl->data.d.d_buf + + (offset - dl->data.d.d_off)); + else + __libelf_seterrno (ELF_E_INVALID_INDEX); break; } diff --git a/libelf/elf_update.c b/libelf/elf_update.c index 54c20f5..c635eb3 100644 --- a/libelf/elf_update.c +++ b/libelf/elf_update.c @@ -1,5 +1,5 @@ /* Update data structures for changes and write them out. - Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1999. @@ -32,6 +32,7 @@ #endif #include +#include #include #include #include @@ -77,6 +78,27 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum) if (elf->map_address != NULL) { + /* When using mmap we want to make sure the file content is + really there. Only using ftruncate might mean the file is + extended, but space isn't allocated yet. This might cause a + SIGBUS once we write into the mmapped space and the disk is + full. In glibc posix_fallocate is required to extend the + file and allocate enough space even if the underlying + filesystem would normally return EOPNOTSUPP. But other + implementations might not work as expected. And the glibc + fallback case might fail (with unexpected errnos) in some cases. + So we only report an error when the call fails and errno is + ENOSPC. Otherwise we ignore the error and treat it as just hint. */ + if (elf->parent == NULL + && (elf->maximum_size == ~((size_t) 0) + || (size_t) size > elf->maximum_size) + && unlikely (posix_fallocate (elf->fildes, 0, size) != 0)) + if (errno == ENOSPC) + { + __libelf_seterrno (ELF_E_WRITE_ERROR); + return -1; + } + /* The file is mmaped. */ if ((class == ELFCLASS32 ? __elf32_updatemmap (elf, change_bo, shnum) @@ -94,6 +116,7 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum) size = -1; } + /* Reduce the file size if necessary. */ if (size != -1 && elf->parent == NULL && elf->maximum_size != ~((size_t) 0) @@ -124,9 +147,7 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum) off_t -elf_update (elf, cmd) - Elf *elf; - Elf_Cmd cmd; +elf_update (Elf *elf, Elf_Cmd cmd) { size_t shnum; off_t size; diff --git a/libelf/elf_version.c b/libelf/elf_version.c index dcb6758..7c336ff 100644 --- a/libelf/elf_version.c +++ b/libelf/elf_version.c @@ -1,5 +1,5 @@ /* Coordinate ELF library and application versions. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -42,8 +42,7 @@ unsigned int __libelf_version = EV_CURRENT; unsigned int -elf_version (version) - unsigned int version; +elf_version (unsigned int version) { if (version == EV_NONE) return __libelf_version; diff --git a/libelf/exttypes.h b/libelf/exttypes.h index 8cb2aae..7bacd65 100644 --- a/libelf/exttypes.h +++ b/libelf/exttypes.h @@ -1,5 +1,5 @@ /* External ELF types. - Copyright (C) 1998-2010 Red Hat, Inc. + Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -75,6 +75,7 @@ Syminfo32 (Ext_); Move32 (Ext_); Lib32 (Ext_); auxv_t32 (Ext_); +Chdr32 (Ext_); Ehdr64 (Ext_); Phdr64 (Ext_); @@ -92,6 +93,7 @@ Syminfo64 (Ext_); Move64 (Ext_); Lib64 (Ext_); auxv_t64 (Ext_); +Chdr64 (Ext_); #undef START #undef END diff --git a/libelf/gelf.h b/libelf/gelf.h index e3f0740..1bc7ee7 100644 --- a/libelf/gelf.h +++ b/libelf/gelf.h @@ -1,5 +1,5 @@ /* This file defines generic ELF types, structures, and macros. - Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2007 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -85,6 +85,9 @@ typedef Elf64_Rela GElf_Rela; /* Program segment header. */ typedef Elf64_Phdr GElf_Phdr; +/* Header of a compressed section. */ +typedef Elf64_Chdr GElf_Chdr; + /* Dynamic section entry. */ typedef Elf64_Dyn GElf_Dyn; @@ -183,6 +186,9 @@ extern int gelf_update_phdr (Elf *__elf, int __ndx, GElf_Phdr *__src); /* Create new program header with PHNUM entries. */ extern unsigned long int gelf_newphdr (Elf *__elf, size_t __phnum); +/* Get compression header of section if any. Returns NULL and sets + elf_errno if the section isn't compressed or an error occurred. */ +extern GElf_Chdr *gelf_getchdr (Elf_Scn *__scn, GElf_Chdr *__dst); /* Convert data structure from the representation in the file represented by ELF to their memory representation. */ diff --git a/libelf/gelf_checksum.c b/libelf/gelf_checksum.c index 4906782..831c54c 100644 --- a/libelf/gelf_checksum.c +++ b/libelf/gelf_checksum.c @@ -1,5 +1,5 @@ /* Convert from file to memory representation. Generic ELF version. - Copyright (C) 2002 Red Hat, Inc. + Copyright (C) 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -38,8 +38,7 @@ long int -gelf_checksum (elf) - Elf *elf; +gelf_checksum (Elf *elf) { if (elf == NULL) return -1l; diff --git a/libelf/gelf_fsize.c b/libelf/gelf_fsize.c index a9d2288..0c50926 100644 --- a/libelf/gelf_fsize.c +++ b/libelf/gelf_fsize.c @@ -1,5 +1,5 @@ /* Return the size of an object file type. - Copyright (C) 1998-2010 Red Hat, Inc. + Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -68,6 +68,7 @@ const size_t __libelf_type_sizes[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] = [ELF_T_MOVE] = sizeof (ElfW2(LIBELFBITS, Ext_Move)), \ [ELF_T_LIB] = sizeof (ElfW2(LIBELFBITS, Ext_Lib)), \ [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t)), \ + [ELF_T_CHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Chdr)), \ [ELF_T_GNUHASH] = ELFW2(LIBELFBITS, FSZ_WORD) TYPE_SIZES (32) }, @@ -79,11 +80,7 @@ const size_t __libelf_type_sizes[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] = size_t -gelf_fsize (elf, type, count, version) - Elf *elf; - Elf_Type type; - size_t count; - unsigned int version; +gelf_fsize (Elf *elf, Elf_Type type, size_t count, unsigned int version) { /* We do not have differences between file and memory sizes. Better not since otherwise `mmap' would not work. */ diff --git a/libelf/gelf_getauxv.c b/libelf/gelf_getauxv.c index a2f04e7..1591be2 100644 --- a/libelf/gelf_getauxv.c +++ b/libelf/gelf_getauxv.c @@ -1,5 +1,5 @@ /* Get information from auxiliary vector at the given index. - Copyright (C) 2007 Red Hat, Inc. + Copyright (C) 2007, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -38,10 +38,7 @@ GElf_auxv_t * -gelf_getauxv (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_auxv_t *dst; +gelf_getauxv (Elf_Data *data, int ndx, GElf_auxv_t *dst) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; GElf_auxv_t *result = NULL; diff --git a/libelf/gelf_getchdr.c b/libelf/gelf_getchdr.c new file mode 100644 index 0000000..394bf4b --- /dev/null +++ b/libelf/gelf_getchdr.c @@ -0,0 +1,69 @@ +/* Return section compression header. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libelfP.h" +#include +#include + + +GElf_Chdr * +gelf_getchdr (Elf_Scn *scn, GElf_Chdr *dest) +{ + if (scn == NULL) + return NULL; + + if (dest == NULL) + { + __libelf_seterrno (ELF_E_INVALID_OPERAND); + return NULL; + } + + if (scn->elf->class == ELFCLASS32) + { + Elf32_Chdr *chdr = elf32_getchdr (scn); + if (chdr == NULL) + return NULL; + dest->ch_type = chdr->ch_type; + dest->ch_size = chdr->ch_size; + dest->ch_addralign = chdr->ch_addralign; + } + else + { + Elf64_Chdr *chdr = elf64_getchdr (scn); + if (chdr == NULL) + return NULL; + *dest = *chdr; + } + + return dest; +} +INTDEF(gelf_getchdr) diff --git a/libelf/gelf_getclass.c b/libelf/gelf_getclass.c index 53759dc..7d0924b 100644 --- a/libelf/gelf_getclass.c +++ b/libelf/gelf_getclass.c @@ -1,5 +1,5 @@ /* Return the class of file associated with the descriptor. - Copyright (C) 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -38,8 +38,7 @@ int -gelf_getclass (elf) - Elf *elf; +gelf_getclass (Elf *elf) { return elf == NULL || elf->kind != ELF_K_ELF ? ELFCLASSNONE : elf->class; } diff --git a/libelf/gelf_getdyn.c b/libelf/gelf_getdyn.c index c366fd5..a0090e1 100644 --- a/libelf/gelf_getdyn.c +++ b/libelf/gelf_getdyn.c @@ -1,5 +1,5 @@ /* Get information from dynamic table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -39,10 +39,7 @@ GElf_Dyn * -gelf_getdyn (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Dyn *dst; +gelf_getdyn (Elf_Data *data, int ndx, GElf_Dyn *dst) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; GElf_Dyn *result = NULL; diff --git a/libelf/gelf_getehdr.c b/libelf/gelf_getehdr.c index ea83fc0..abeb70c 100644 --- a/libelf/gelf_getehdr.c +++ b/libelf/gelf_getehdr.c @@ -1,5 +1,5 @@ /* Get ELF header. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -40,9 +40,8 @@ GElf_Ehdr * -__gelf_getehdr_rdlock (elf, dest) - Elf *elf; - GElf_Ehdr *dest; +internal_function +__gelf_getehdr_rdlock (Elf *elf, GElf_Ehdr *dest) { GElf_Ehdr *result = NULL; @@ -95,9 +94,7 @@ __gelf_getehdr_rdlock (elf, dest) } GElf_Ehdr * -gelf_getehdr (elf, dest) - Elf *elf; - GElf_Ehdr *dest; +gelf_getehdr (Elf *elf, GElf_Ehdr *dest) { GElf_Ehdr *result; if (elf == NULL) diff --git a/libelf/gelf_getlib.c b/libelf/gelf_getlib.c index 880817e..a8ac478 100644 --- a/libelf/gelf_getlib.c +++ b/libelf/gelf_getlib.c @@ -1,5 +1,5 @@ /* Get library from table at the given index. - Copyright (C) 2004, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2004, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -39,10 +39,7 @@ GElf_Lib * -gelf_getlib (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Lib *dst; +gelf_getlib (Elf_Data *data, int ndx, GElf_Lib *dst) { if (data == NULL) return NULL; diff --git a/libelf/gelf_getmove.c b/libelf/gelf_getmove.c index b81d61f..18efedc 100644 --- a/libelf/gelf_getmove.c +++ b/libelf/gelf_getmove.c @@ -1,5 +1,5 @@ /* Get move structure at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -39,10 +39,7 @@ GElf_Move * -gelf_getmove (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Move *dst; +gelf_getmove (Elf_Data *data, int ndx, GElf_Move *dst) { GElf_Move *result = NULL; Elf *elf; diff --git a/libelf/gelf_getnote.c b/libelf/gelf_getnote.c index 1a36855..c75edda 100644 --- a/libelf/gelf_getnote.c +++ b/libelf/gelf_getnote.c @@ -1,5 +1,5 @@ /* Get note information at the supplied offset. - Copyright (C) 2007 Red Hat, Inc. + Copyright (C) 2007, 2014, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,12 +37,8 @@ #include "libelfP.h" size_t -gelf_getnote (data, offset, result, name_offset, desc_offset) - Elf_Data *data; - size_t offset; - GElf_Nhdr *result; - size_t *name_offset; - size_t *desc_offset; +gelf_getnote (Elf_Data *data, size_t offset, GElf_Nhdr *result, + size_t *name_offset, size_t *desc_offset) { if (data == NULL) return 0; @@ -62,7 +58,8 @@ gelf_getnote (data, offset, result, name_offset, desc_offset) /* The data is already in the correct form. Just make sure the offset is OK. */ - if (unlikely (offset + sizeof (GElf_Nhdr) > data->d_size)) + if (unlikely (offset > data->d_size + || data->d_size - offset < sizeof (GElf_Nhdr))) { __libelf_seterrno (ELF_E_OFFSET_RANGE); offset = 0; @@ -72,16 +69,21 @@ gelf_getnote (data, offset, result, name_offset, desc_offset) const GElf_Nhdr *n = data->d_buf + offset; offset += sizeof *n; + /* Include padding. Check below for overflow. */ GElf_Word namesz = NOTE_ALIGN (n->n_namesz); GElf_Word descsz = NOTE_ALIGN (n->n_descsz); - if (unlikely (data->d_size - offset < namesz)) + if (unlikely (offset > data->d_size + || data->d_size - offset < namesz + || (namesz == 0 && n->n_namesz != 0))) offset = 0; else { *name_offset = offset; offset += namesz; - if (unlikely (data->d_size - offset < descsz)) + if (unlikely (offset > data->d_size + || data->d_size - offset < descsz + || (descsz == 0 && n->n_descsz != 0))) offset = 0; else { diff --git a/libelf/gelf_getphdr.c b/libelf/gelf_getphdr.c index 3bf7123..c719e4b 100644 --- a/libelf/gelf_getphdr.c +++ b/libelf/gelf_getphdr.c @@ -1,5 +1,5 @@ /* Return program header table entry. - Copyright (C) 1998-2010 Red Hat, Inc. + Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -39,10 +39,7 @@ GElf_Phdr * -gelf_getphdr (elf, ndx, dst) - Elf *elf; - int ndx; - GElf_Phdr *dst; +gelf_getphdr (Elf *elf, int ndx, GElf_Phdr *dst) { GElf_Phdr *result = NULL; @@ -80,10 +77,8 @@ gelf_getphdr (elf, ndx, dst) /* Test whether the index is ok. */ size_t phnum; - if (ndx >= elf->state.elf32.ehdr->e_phnum - && (elf->state.elf32.ehdr->e_phnum != PN_XNUM - || __elf_getphdrnum_rdlock (elf, &phnum) != 0 - || (size_t) ndx >= phnum)) + if (__elf_getphdrnum_chk_rdlock (elf, &phnum) != 0 + || (size_t) ndx >= phnum) { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; @@ -122,10 +117,8 @@ gelf_getphdr (elf, ndx, dst) /* Test whether the index is ok. */ size_t phnum; - if (ndx >= elf->state.elf64.ehdr->e_phnum - && (elf->state.elf64.ehdr->e_phnum != PN_XNUM - || __elf_getphdrnum_rdlock (elf, &phnum) != 0 - || (size_t) ndx >= phnum)) + if (__elf_getphdrnum_chk_rdlock (elf, &phnum) != 0 + || (size_t) ndx >= phnum) { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; diff --git a/libelf/gelf_getrel.c b/libelf/gelf_getrel.c index 1f786ff..309e3d3 100644 --- a/libelf/gelf_getrel.c +++ b/libelf/gelf_getrel.c @@ -1,5 +1,5 @@ /* Get REL relocation information at given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -38,10 +38,7 @@ GElf_Rel * -gelf_getrel (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Rel *dst; +gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_getrela.c b/libelf/gelf_getrela.c index cead7ee..d695f65 100644 --- a/libelf/gelf_getrela.c +++ b/libelf/gelf_getrela.c @@ -1,5 +1,5 @@ /* Get RELA relocation information at given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -38,10 +38,7 @@ GElf_Rela * -gelf_getrela (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Rela *dst; +gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_getshdr.c b/libelf/gelf_getshdr.c index 4a48cb6..3858c8e 100644 --- a/libelf/gelf_getshdr.c +++ b/libelf/gelf_getshdr.c @@ -1,5 +1,5 @@ /* Return section header. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -38,9 +38,7 @@ GElf_Shdr * -gelf_getshdr (scn, dst) - Elf_Scn *scn; - GElf_Shdr *dst; +gelf_getshdr (Elf_Scn *scn, GElf_Shdr *dst) { GElf_Shdr *result = NULL; diff --git a/libelf/gelf_getsym.c b/libelf/gelf_getsym.c index a141c2d..01534d2 100644 --- a/libelf/gelf_getsym.c +++ b/libelf/gelf_getsym.c @@ -1,5 +1,5 @@ /* Get symbol information from symbol table at the given index. - Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -39,10 +39,7 @@ GElf_Sym * -gelf_getsym (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Sym *dst; +gelf_getsym (Elf_Data *data, int ndx, GElf_Sym *dst) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; GElf_Sym *result = NULL; diff --git a/libelf/gelf_getsyminfo.c b/libelf/gelf_getsyminfo.c index 8d7da7f..8360ed3 100644 --- a/libelf/gelf_getsyminfo.c +++ b/libelf/gelf_getsyminfo.c @@ -1,5 +1,5 @@ /* Get additional symbol information from symbol table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -39,10 +39,7 @@ GElf_Syminfo * -gelf_getsyminfo (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Syminfo *dst; +gelf_getsyminfo (Elf_Data *data, int ndx, GElf_Syminfo *dst) { GElf_Syminfo *result = NULL; diff --git a/libelf/gelf_getsymshndx.c b/libelf/gelf_getsymshndx.c index c19e876..17c90fc 100644 --- a/libelf/gelf_getsymshndx.c +++ b/libelf/gelf_getsymshndx.c @@ -1,6 +1,6 @@ /* Get symbol information and separate section index from symbol table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -40,12 +40,8 @@ GElf_Sym * -gelf_getsymshndx (symdata, shndxdata, ndx, dst, dstshndx) - Elf_Data *symdata; - Elf_Data *shndxdata; - int ndx; - GElf_Sym *dst; - Elf32_Word *dstshndx; +gelf_getsymshndx (Elf_Data *symdata, Elf_Data *shndxdata, int ndx, + GElf_Sym *dst, Elf32_Word *dstshndx) { Elf_Data_Scn *symdata_scn = (Elf_Data_Scn *) symdata; Elf_Data_Scn *shndxdata_scn = (Elf_Data_Scn *) shndxdata; diff --git a/libelf/gelf_getverdaux.c b/libelf/gelf_getverdaux.c index d125d9e..739a765 100644 --- a/libelf/gelf_getverdaux.c +++ b/libelf/gelf_getverdaux.c @@ -1,5 +1,5 @@ /* Get additional symbol version definition information at the given offset. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -39,10 +39,7 @@ GElf_Verdaux * -gelf_getverdaux (data, offset, dst) - Elf_Data *data; - int offset; - GElf_Verdaux *dst; +gelf_getverdaux (Elf_Data *data, int offset, GElf_Verdaux *dst) { GElf_Verdaux *result; diff --git a/libelf/gelf_getverdef.c b/libelf/gelf_getverdef.c index 59a3214..651f4fa 100644 --- a/libelf/gelf_getverdef.c +++ b/libelf/gelf_getverdef.c @@ -1,5 +1,5 @@ /* Get symbol version definition information at the given offset. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -39,10 +39,7 @@ GElf_Verdef * -gelf_getverdef (data, offset, dst) - Elf_Data *data; - int offset; - GElf_Verdef *dst; +gelf_getverdef (Elf_Data *data, int offset, GElf_Verdef *dst) { GElf_Verdef *result; diff --git a/libelf/gelf_getvernaux.c b/libelf/gelf_getvernaux.c index 8ebf56a..e47fb0a 100644 --- a/libelf/gelf_getvernaux.c +++ b/libelf/gelf_getvernaux.c @@ -1,5 +1,5 @@ /* Get additional required symbol version information at the given offset. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -39,10 +39,7 @@ GElf_Vernaux * -gelf_getvernaux (data, offset, dst) - Elf_Data *data; - int offset; - GElf_Vernaux *dst; +gelf_getvernaux (Elf_Data *data, int offset, GElf_Vernaux *dst) { GElf_Vernaux *result; diff --git a/libelf/gelf_getverneed.c b/libelf/gelf_getverneed.c index 95fd11f..c1f5d34 100644 --- a/libelf/gelf_getverneed.c +++ b/libelf/gelf_getverneed.c @@ -1,5 +1,5 @@ /* Get required symbol version information at the given offset. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -39,10 +39,7 @@ GElf_Verneed * -gelf_getverneed (data, offset, dst) - Elf_Data *data; - int offset; - GElf_Verneed *dst; +gelf_getverneed (Elf_Data *data, int offset, GElf_Verneed *dst) { GElf_Verneed *result; diff --git a/libelf/gelf_getversym.c b/libelf/gelf_getversym.c index fe8dc62..68d23c7 100644 --- a/libelf/gelf_getversym.c +++ b/libelf/gelf_getversym.c @@ -1,5 +1,5 @@ /* Get symbol version information at the given index. - Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -39,10 +39,7 @@ GElf_Versym * -gelf_getversym (data, ndx, dst) - Elf_Data *data; - int ndx; - GElf_Versym *dst; +gelf_getversym (Elf_Data *data, int ndx, GElf_Versym *dst) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_newehdr.c b/libelf/gelf_newehdr.c index e9f7a58..cfa80e1 100644 --- a/libelf/gelf_newehdr.c +++ b/libelf/gelf_newehdr.c @@ -1,5 +1,5 @@ /* Create new ELF header. - Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -38,9 +38,7 @@ unsigned long int -gelf_newehdr (elf, class) - Elf *elf; - int class; +gelf_newehdr (Elf *elf, int class) { return (class == ELFCLASS32 ? (unsigned long int) INTUSE(elf32_newehdr) (elf) diff --git a/libelf/gelf_newphdr.c b/libelf/gelf_newphdr.c index b634037..4e95474 100644 --- a/libelf/gelf_newphdr.c +++ b/libelf/gelf_newphdr.c @@ -1,5 +1,5 @@ /* Create new ELF program header. - Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -38,9 +38,7 @@ unsigned long int -gelf_newphdr (elf, phnum) - Elf *elf; - size_t phnum; +gelf_newphdr ( Elf *elf, size_t phnum) { return (elf->class == ELFCLASS32 ? (unsigned long int) INTUSE(elf32_newphdr) (elf, phnum) diff --git a/libelf/gelf_offscn.c b/libelf/gelf_offscn.c index 62d12e4..cf206f5 100644 --- a/libelf/gelf_offscn.c +++ b/libelf/gelf_offscn.c @@ -1,5 +1,5 @@ /* Create new ELF header. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -38,9 +38,7 @@ Elf_Scn * -gelf_offscn (elf, offset) - Elf *elf; - GElf_Off offset; +gelf_offscn (Elf *elf, GElf_Off offset) { if (elf->class == ELFCLASS32) { diff --git a/libelf/gelf_update_auxv.c b/libelf/gelf_update_auxv.c index dd8f472..e4e5229 100644 --- a/libelf/gelf_update_auxv.c +++ b/libelf/gelf_update_auxv.c @@ -1,5 +1,5 @@ /* Update information in dynamic table at the given index. - Copyright (C) 2007 Red Hat, Inc. + Copyright (C) 2007, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,10 +37,7 @@ int -gelf_update_auxv (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_auxv_t *src; +gelf_update_auxv (Elf_Data *data, int ndx, GElf_auxv_t *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_update_dyn.c b/libelf/gelf_update_dyn.c index 2eb526e..5c515d2 100644 --- a/libelf/gelf_update_dyn.c +++ b/libelf/gelf_update_dyn.c @@ -1,5 +1,5 @@ /* Update information in dynamic table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -38,10 +38,7 @@ int -gelf_update_dyn (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_Dyn *src; +gelf_update_dyn (Elf_Data *data, int ndx, GElf_Dyn *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_update_lib.c b/libelf/gelf_update_lib.c index 1c8c23d..d0f235e 100644 --- a/libelf/gelf_update_lib.c +++ b/libelf/gelf_update_lib.c @@ -1,5 +1,5 @@ /* Update library in table at the given index. - Copyright (C) 2004, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2004, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -39,10 +39,7 @@ int -gelf_update_lib (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_Lib *src; +gelf_update_lib (Elf_Data *data, int ndx, GElf_Lib *src) { if (data == NULL) return 0; diff --git a/libelf/gelf_update_move.c b/libelf/gelf_update_move.c index ad2ca6a..4190ee3 100644 --- a/libelf/gelf_update_move.c +++ b/libelf/gelf_update_move.c @@ -1,5 +1,5 @@ /* Update move structure at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -39,10 +39,7 @@ int -gelf_update_move (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_Move *src; +gelf_update_move (Elf_Data *data, int ndx, GElf_Move *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; diff --git a/libelf/gelf_update_sym.c b/libelf/gelf_update_sym.c index 278129c..0f47885 100644 --- a/libelf/gelf_update_sym.c +++ b/libelf/gelf_update_sym.c @@ -1,5 +1,5 @@ /* Update symbol information in symbol table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -39,10 +39,7 @@ int -gelf_update_sym (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_Sym *src; +gelf_update_sym (Elf_Data *data, int ndx, GElf_Sym *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_update_syminfo.c b/libelf/gelf_update_syminfo.c index 640a1ed..6f7f302 100644 --- a/libelf/gelf_update_syminfo.c +++ b/libelf/gelf_update_syminfo.c @@ -1,5 +1,5 @@ /* Update additional symbol information in symbol table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -39,10 +39,7 @@ int -gelf_update_syminfo (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_Syminfo *src; +gelf_update_syminfo (Elf_Data *data, int ndx, GElf_Syminfo *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; diff --git a/libelf/gelf_update_symshndx.c b/libelf/gelf_update_symshndx.c index 5e2c7f7..eb80afa 100644 --- a/libelf/gelf_update_symshndx.c +++ b/libelf/gelf_update_symshndx.c @@ -1,6 +1,6 @@ /* Update symbol information and section index in symbol table at the given index. - Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -40,12 +40,8 @@ int -gelf_update_symshndx (symdata, shndxdata, ndx, src, srcshndx) - Elf_Data *symdata; - Elf_Data *shndxdata; - int ndx; - GElf_Sym *src; - Elf32_Word srcshndx; +gelf_update_symshndx (Elf_Data *symdata, Elf_Data *shndxdata, int ndx, + GElf_Sym *src, Elf32_Word srcshndx) { Elf_Data_Scn *symdata_scn = (Elf_Data_Scn *) symdata; Elf_Data_Scn *shndxdata_scn = (Elf_Data_Scn *) shndxdata; diff --git a/libelf/gelf_update_verdaux.c b/libelf/gelf_update_verdaux.c index b377d40..f3554fd 100644 --- a/libelf/gelf_update_verdaux.c +++ b/libelf/gelf_update_verdaux.c @@ -1,5 +1,5 @@ /* Update additional symbol version definition information. - Copyright (C) 2001, 2002 Red Hat, Inc. + Copyright (C) 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -39,10 +39,7 @@ int -gelf_update_verdaux (data, offset, src) - Elf_Data *data; - int offset; - GElf_Verdaux *src; +gelf_update_verdaux (Elf_Data *data, int offset, GElf_Verdaux *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; diff --git a/libelf/gelf_update_verdef.c b/libelf/gelf_update_verdef.c index d591a4f..adb5db1 100644 --- a/libelf/gelf_update_verdef.c +++ b/libelf/gelf_update_verdef.c @@ -1,5 +1,5 @@ /* Update symbol version definition information. - Copyright (C) 2001, 2002 Red Hat, Inc. + Copyright (C) 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -39,10 +39,7 @@ int -gelf_update_verdef (data, offset, src) - Elf_Data *data; - int offset; - GElf_Verdef *src; +gelf_update_verdef (Elf_Data *data, int offset, GElf_Verdef *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; diff --git a/libelf/gelf_update_vernaux.c b/libelf/gelf_update_vernaux.c index 1f691b0..854afab 100644 --- a/libelf/gelf_update_vernaux.c +++ b/libelf/gelf_update_vernaux.c @@ -1,5 +1,5 @@ /* Update additional required symbol version information. - Copyright (C) 2001, 2002 Red Hat, Inc. + Copyright (C) 2001, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -39,10 +39,7 @@ int -gelf_update_vernaux (data, offset, src) - Elf_Data *data; - int offset; - GElf_Vernaux *src; +gelf_update_vernaux (Elf_Data *data, int offset, GElf_Vernaux *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; diff --git a/libelf/gelf_update_verneed.c b/libelf/gelf_update_verneed.c index 713c017..bf5af5a 100644 --- a/libelf/gelf_update_verneed.c +++ b/libelf/gelf_update_verneed.c @@ -1,5 +1,5 @@ /* Update required symbol version information. - Copyright (C) 2001, 2002 Red Hat, Inc. + Copyright (C) 2001, 2002, 201r Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -39,10 +39,7 @@ int -gelf_update_verneed (data, offset, src) - Elf_Data *data; - int offset; - GElf_Verneed *src; +gelf_update_verneed (Elf_Data *data, int offset, GElf_Verneed *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; diff --git a/libelf/gelf_update_versym.c b/libelf/gelf_update_versym.c index 03a3c5a..9949dff 100644 --- a/libelf/gelf_update_versym.c +++ b/libelf/gelf_update_versym.c @@ -1,5 +1,5 @@ /* Update symbol version information. - Copyright (C) 2001, 2002, 2005, 2009, 2014 Red Hat, Inc. + Copyright (C) 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -39,10 +39,7 @@ int -gelf_update_versym (data, ndx, src) - Elf_Data *data; - int ndx; - GElf_Versym *src; +gelf_update_versym (Elf_Data *data, int ndx, GElf_Versym *src) { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; diff --git a/libelf/gelf_xlate.c b/libelf/gelf_xlate.c index c417051..f3d3b7a 100644 --- a/libelf/gelf_xlate.c +++ b/libelf/gelf_xlate.c @@ -1,5 +1,5 @@ /* Transformation functions for ELF data types. - Copyright (C) 1998,1999,2000,2002,2004,2005,2006,2007 Red Hat, Inc. + Copyright (C) 1998,1999,2000,2002,2004,2005,2006,2007,2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -52,7 +52,8 @@ static void (elf_cvt_Byte) (void *dest, const void *src, size_t n, int encode __attribute__ ((unused))) { - memmove (dest, src, n); + if (n != 0) + memmove (dest, src, n); } @@ -165,6 +166,7 @@ union unaligned #include "version_xlate.h" #include "gnuhash_xlate.h" #include "note_xlate.h" +#include "chdr_xlate.h" /* Now the externally visible table with the function pointers. */ @@ -197,7 +199,8 @@ const xfct_t __elf_xfctstom[EV_NUM - 1][EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] [ELF_T_SYMINFO] = ElfW2(Bits, cvt_Syminfo), \ [ELF_T_MOVE] = ElfW2(Bits, cvt_Move), \ [ELF_T_LIB] = ElfW2(Bits, cvt_Lib), \ - [ELF_T_AUXV] = ElfW2(Bits, cvt_auxv_t) + [ELF_T_AUXV] = ElfW2(Bits, cvt_auxv_t), \ + [ELF_T_CHDR] = ElfW2(Bits, cvt_chdr) define_xfcts (32), [ELF_T_GNUHASH] = Elf32_cvt_Word }, diff --git a/libelf/gelf_xlate.h b/libelf/gelf_xlate.h index f11eb90..3c0e4bf 100644 --- a/libelf/gelf_xlate.h +++ b/libelf/gelf_xlate.h @@ -50,6 +50,7 @@ TYPE (Syminfo, LIBELFBITS) TYPE (Move, LIBELFBITS) TYPE (Lib, LIBELFBITS) TYPE (auxv_t, LIBELFBITS) +TYPE (Chdr, LIBELFBITS) /* Prepare for the next round. */ diff --git a/libelf/gelf_xlatetof.c b/libelf/gelf_xlatetof.c index 3366bdc..e266180 100644 --- a/libelf/gelf_xlatetof.c +++ b/libelf/gelf_xlatetof.c @@ -1,5 +1,5 @@ /* Convert from memory to file representation. Generic ELF version. - Copyright (C) 2000, 2002 Red Hat, Inc. + Copyright (C) 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -38,11 +38,8 @@ Elf_Data * -gelf_xlatetof (elf, dest, src, encode) - Elf *elf; - Elf_Data *dest; - const Elf_Data * src; - unsigned int encode; +gelf_xlatetof (Elf *elf, Elf_Data *dest, const Elf_Data * src, + unsigned int encode) { if (elf == NULL) return NULL; diff --git a/libelf/gelf_xlatetom.c b/libelf/gelf_xlatetom.c index c3e812f..8499c71 100644 --- a/libelf/gelf_xlatetom.c +++ b/libelf/gelf_xlatetom.c @@ -1,5 +1,5 @@ /* Convert from file to memory representation. Generic ELF version. - Copyright (C) 2000, 2002 Red Hat, Inc. + Copyright (C) 2000, 2002, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -38,11 +38,8 @@ Elf_Data * -gelf_xlatetom (elf, dest, src, encode) - Elf *elf; - Elf_Data *dest; - const Elf_Data * src; - unsigned int encode; +gelf_xlatetom (Elf *elf, Elf_Data *dest, const Elf_Data * src, + unsigned int encode) { if (elf == NULL) return NULL; diff --git a/libelf/libelf.h b/libelf/libelf.h index 5a2b3af..364e776 100644 --- a/libelf/libelf.h +++ b/libelf/libelf.h @@ -1,5 +1,5 @@ /* Interface for libelf. - Copyright (C) 1998-2010 Red Hat, Inc. + Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -29,6 +29,7 @@ #ifndef _LIBELF_H #define _LIBELF_H 1 +#include #include /* Get the ELF types. */ @@ -63,6 +64,7 @@ typedef enum ELF_T_LIB, /* Elf32_Lib, Elf64_Lib, ... */ ELF_T_GNUHASH, /* GNU-style hash section. */ ELF_T_AUXV, /* Elf32_auxv_t, Elf64_auxv_t, ... */ + ELF_T_CHDR, /* Compressed, Elf32_Chdr, Elf64_Chdr, ... */ /* Keep this the last entry. */ ELF_T_NUM } Elf_Type; @@ -74,7 +76,7 @@ typedef struct Elf_Type d_type; /* Type of this piece of data. */ unsigned int d_version; /* ELF version. */ size_t d_size; /* Size in bytes. */ - loff_t d_off; /* Offset into section. */ + int64_t d_off; /* Offset into section. */ size_t d_align; /* Alignment in section. */ } Elf_Data; @@ -115,6 +117,12 @@ enum #define ELF_F_PERMISSIVE ELF_F_PERMISSIVE }; +/* Flags for elf_compress[_gnu]. */ +enum +{ + ELF_CHF_FORCE = 0x1 +#define ELF_CHF_FORCE ELF_CHF_FORCE +}; /* Identification values for recognized object files. */ typedef enum @@ -136,7 +144,7 @@ typedef struct uid_t ar_uid; /* User ID. */ gid_t ar_gid; /* Group ID. */ mode_t ar_mode; /* File mode. */ - loff_t ar_size; /* File size. */ + int64_t ar_size; /* File size. */ char *ar_rawname; /* Original name of archive member. */ } Elf_Arhdr; @@ -177,13 +185,13 @@ extern Elf_Cmd elf_next (Elf *__elf); extern int elf_end (Elf *__elf); /* Update ELF descriptor and write file to disk. */ -extern loff_t elf_update (Elf *__elf, Elf_Cmd __cmd); +extern int64_t elf_update (Elf *__elf, Elf_Cmd __cmd); /* Determine what kind of file is associated with ELF. */ extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__)); /* Get the base offset for an object file. */ -extern loff_t elf_getbase (Elf *__elf); +extern int64_t elf_getbase (Elf *__elf); /* Retrieve file identification data. */ @@ -266,6 +274,62 @@ extern Elf32_Shdr *elf32_getshdr (Elf_Scn *__scn); /* Similar for ELFCLASS64. */ extern Elf64_Shdr *elf64_getshdr (Elf_Scn *__scn); +/* Returns compression header for a section if section data is + compressed. Returns NULL and sets elf_errno if the section isn't + compressed or an error occurred. */ +extern Elf32_Chdr *elf32_getchdr (Elf_Scn *__scn); +extern Elf64_Chdr *elf64_getchdr (Elf_Scn *__scn); + +/* Compress or decompress the data of a section and adjust the section + header. + + elf_compress works by setting or clearing the SHF_COMPRESS flag + from the section Shdr and will encode or decode a Elf32_Chdr or + Elf64_Chdr at the start of the section data. elf_compress_gnu will + encode or decode any section, but is traditionally only used for + sections that have a name starting with ".debug" when + uncompressed or ".zdebug" when compressed and stores just the + uncompressed size. The GNU compression method is deprecated and + should only be used for legacy support. + + elf_compress takes a compression type that should be either zero to + decompress or an ELFCOMPRESS algorithm to use for compression. + Currently only ELFCOMPRESS_ZLIB is supported. elf_compress_gnu + will compress in the traditional GNU compression format when + compress is one and decompress the section data when compress is + zero. + + The FLAGS argument can be zero or ELF_CHF_FORCE. If FLAGS contains + ELF_CHF_FORCE then it will always compress the section, even if + that would not reduce the size of the data section (including the + header). Otherwise elf_compress and elf_compress_gnu will compress + the section only if the total data size is reduced. + + On successful compression or decompression the function returns + one. If (not forced) compression is requested and the data section + would not actually reduce in size, the section is not actually + compressed and zero is returned. Otherwise -1 is returned and + elf_errno is set. + + It is an error to request compression for a section that already + has SHF_COMPRESSED set, or (for elf_compress) to request + decompression for an section that doesn't have SHF_COMPRESSED set. + It is always an error to call these functions on SHT_NOBITS + sections or if the section has the SHF_ALLOC flag set. + elf_compress_gnu will not check whether the section name starts + with ".debug" or .zdebug". It is the responsibilty of the caller + to make sure the deprecated GNU compression method is only called + on correctly named sections (and to change the name of the section + when using elf_compress_gnu). + + All previous returned Shdrs and Elf_Data buffers are invalidated by + this call and should no longer be accessed. + + Note that although this changes the header and data returned it + doesn't mark the section as dirty. To keep the changes when + calling elf_update the section has to be flagged ELF_F_DIRTY. */ +extern int elf_compress (Elf_Scn *scn, int type, unsigned int flags); +extern int elf_compress_gnu (Elf_Scn *scn, int compress, unsigned int flags); /* Set or clear flags for ELF file. */ extern unsigned int elf_flagelf (Elf *__elf, Elf_Cmd __cmd, @@ -287,8 +351,11 @@ extern unsigned int elf_flagshdr (Elf_Scn *__scn, Elf_Cmd __cmd, unsigned int __flags); -/* Get data from section while translating from file representation - to memory representation. */ +/* Get data from section while translating from file representation to + memory representation. The Elf_Data d_type is set based on the + section type if known. Otherwise d_type is set to ELF_T_BYTE. If + the section contains compressed data then d_type is always set to + ELF_T_CHDR. */ extern Elf_Data *elf_getdata (Elf_Scn *__scn, Elf_Data *__data); /* Get uninterpreted section content. */ @@ -301,7 +368,7 @@ extern Elf_Data *elf_newdata (Elf_Scn *__scn); would be for TYPE. The resulting Elf_Data pointer is valid until elf_end (ELF) is called. */ extern Elf_Data *elf_getdata_rawchunk (Elf *__elf, - loff_t __offset, size_t __size, + int64_t __offset, size_t __size, Elf_Type __type); @@ -313,7 +380,7 @@ extern char *elf_strptr (Elf *__elf, size_t __index, size_t __offset); extern Elf_Arhdr *elf_getarhdr (Elf *__elf); /* Return offset in archive for current file ELF. */ -extern loff_t elf_getaroff (Elf *__elf); +extern int64_t elf_getaroff (Elf *__elf); /* Select archive element at OFFSET. */ extern size_t elf_rand (Elf *__elf, size_t __offset); diff --git a/libelf/libelf.map b/libelf/libelf.map index de6d912..10dc505 100644 --- a/libelf/libelf.map +++ b/libelf/libelf.map @@ -138,3 +138,13 @@ ELFUTILS_1.6 { global: elf_getphdrnum; } ELFUTILS_1.5; + +ELFUTILS_1.7 { + global: + elf32_getchdr; + elf64_getchdr; + gelf_getchdr; + + elf_compress; + elf_compress_gnu; +} ELFUTILS_1.6; diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 52cf745..57ccbce 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -1,5 +1,5 @@ /* Internal interfaces for libelf. - Copyright (C) 1998-2010 Red Hat, Inc. + Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. Contributed by Ulrich Drepper , 1998. @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -138,6 +139,13 @@ enum ELF_E_INVALID_PHDR, ELF_E_NO_PHDR, ELF_E_INVALID_OFFSET, + ELF_E_INVALID_SECTION_TYPE, + ELF_E_INVALID_SECTION_FLAGS, + ELF_E_NOT_COMPRESSED, + ELF_E_ALREADY_COMPRESSED, + ELF_E_UNKNOWN_COMPRESSION_TYPE, + ELF_E_COMPRESS_ERROR, + ELF_E_DECOMPRESS_ERROR, /* Keep this as the last entry. */ ELF_E_NUM }; @@ -230,6 +238,10 @@ struct Elf_Scn char *rawdata_base; /* The unmodified data of the section. */ char *data_base; /* The converted data of the section. */ + char *zdata_base; /* The uncompressed data of the section. */ + size_t zdata_size; /* If zdata_base != NULL, the size of data. */ + size_t zdata_align; /* If zdata_base != NULL, the addralign. */ + struct Elf_ScnList *list; /* Pointer to the section list element the data is in. */ }; @@ -316,7 +328,7 @@ struct Elf int ehdr_flags; /* Flags (dirty) for ELF header. */ int phdr_flags; /* Flags (dirty|malloc) for program header. */ int shdr_malloced; /* Nonzero if shdr array was allocated. */ - off64_t sizestr_offset; /* Offset of the size string in the parent + off_t sizestr_offset; /* Offset of the size string in the parent if this is an archive member. */ } elf; @@ -335,7 +347,7 @@ struct Elf int ehdr_flags; /* Flags (dirty) for ELF header. */ int phdr_flags; /* Flags (dirty|malloc) for program header. */ int shdr_malloced; /* Nonzero if shdr array was allocated. */ - off64_t sizestr_offset; /* Offset of the size string in the parent + off_t sizestr_offset; /* Offset of the size string in the parent if this is an archive member. */ Elf32_Ehdr ehdr_mem; /* Memory used for ELF header when not mmaped. */ @@ -360,7 +372,7 @@ struct Elf int ehdr_flags; /* Flags (dirty) for ELF header. */ int phdr_flags; /* Flags (dirty|malloc) for program header. */ int shdr_malloced; /* Nonzero if shdr array was allocated. */ - off64_t sizestr_offset; /* Offset of the size string in the parent + off_t sizestr_offset; /* Offset of the size string in the parent if this is an archive member. */ Elf64_Ehdr ehdr_mem; /* Memory used for ELF header when not mmaped. */ @@ -438,6 +450,11 @@ extern const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_ # define __libelf_type_align(class, type) 1 #endif +/* Given an Elf handle and a section type returns the Elf_Data d_type. + Should not be called when SHF_COMPRESSED is set, the d_type should + be ELF_T_BYTE. */ +extern Elf_Type __libelf_data_type (Elf *elf, int sh_type) internal_function; + /* The libelf API does not have such a function but it is still useful. Get the memory size for the given type. @@ -511,6 +528,8 @@ extern Elf_Scn *__elf64_offscn_internal (Elf *__elf, Elf64_Off __offset) attribute_hidden; extern int __elf_getphdrnum_rdlock (Elf *__elf, size_t *__dst) internal_function; +extern int __elf_getphdrnum_chk_rdlock (Elf *__elf, size_t *__dst) + internal_function; extern int __elf_getshdrnum_rdlock (Elf *__elf, size_t *__dst) internal_function; extern int __elf_getshdrstrndx_internal (Elf *__elf, size_t *__dst) @@ -530,6 +549,12 @@ extern Elf_Data *__elf_getdata_rdlock (Elf_Scn *__scn, Elf_Data *__data) internal_function; extern Elf_Data *__elf_rawdata_internal (Elf_Scn *__scn, Elf_Data *__data) attribute_hidden; +/* Should be called to setup first section data element if + data_list_rear is NULL and we know data_read is set and there is + raw data available. Might upgrade the ELF lock from a read to a + write lock. If the lock is already a write lock set wrlocked. */ +extern void __libelf_set_data_list_rdlock (Elf_Scn *scn, int wrlocked) + internal_function; extern char *__elf_strptr_internal (Elf *__elf, size_t __index, size_t __offset) attribute_hidden; extern Elf_Data *__elf32_xlatetom_internal (Elf_Data *__dest, @@ -570,6 +595,22 @@ extern GElf_Sym *__gelf_getsym_internal (Elf_Data *__data, int __ndx, extern uint32_t __libelf_crc32 (uint32_t crc, unsigned char *buf, size_t len) attribute_hidden; +extern void * __libelf_compress (Elf_Scn *scn, size_t hsize, int ei_data, + size_t *orig_size, size_t *orig_addralign, + size_t *size, bool force) + internal_function; + +extern void * __libelf_decompress (void *buf_in, size_t size_in, + size_t size_out) internal_function; +extern void * __libelf_decompress_elf (Elf_Scn *scn, + size_t *size_out, size_t *addralign) + internal_function; + + +extern void __libelf_reset_rawdata (Elf_Scn *scn, void *buf, size_t size, + size_t align, Elf_Type type) + internal_function; + /* We often have to update a flag iff a value changed. Make this convenient. */ diff --git a/libelf/nlist.c b/libelf/nlist.c index 41e5ff6..c7b32fd 100644 --- a/libelf/nlist.c +++ b/libelf/nlist.c @@ -1,5 +1,5 @@ /* Extract symbol list from binary. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -116,7 +116,11 @@ nlist (const char *filename, struct nlist *nl) /* Re-get the section header in case we found only the dynamic symbol table. */ if (scn == NULL) - shdr = INTUSE(gelf_getshdr) (symscn, &shdr_mem); + { + shdr = INTUSE(gelf_getshdr) (symscn, &shdr_mem); + if (unlikely (shdr == NULL)) + goto fail_close; + } /* SHDR->SH_LINK now contains the index of the string section. */ /* Get the data for the symbol section. */ @@ -126,7 +130,7 @@ nlist (const char *filename, struct nlist *nl) /* How many symbols are there? */ nsyms = (shdr->sh_size - / INTUSE(gelf_fsize) (elf, ELF_T_SYM, 1, data->d_version)); + / INTUSE(gelf_fsize) (elf, ELF_T_SYM, 1, EV_CURRENT)); /* Create the hash table. */ table = nlist_fshash_init (nsyms); diff --git a/libelf/note_xlate.h b/libelf/note_xlate.h index 8187e88..62c6f63 100644 --- a/libelf/note_xlate.h +++ b/libelf/note_xlate.h @@ -1,5 +1,5 @@ /* Conversion functions for notes. - Copyright (C) 2007, 2009 Red Hat, Inc. + Copyright (C) 2007, 2009, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -56,4 +56,9 @@ elf_cvt_note (void *dest, const void *src, size_t len, int encode) src += namesz + descsz; dest += namesz + descsz; } + + /* Copy opver any leftover data unconcerted. Probably part of + truncated name/desc data. */ + if (unlikely (len > 0) && src != dest) + memcpy (dest, src, len); } diff --git a/libelf/version_xlate.h b/libelf/version_xlate.h index 935f77a..9fe01c6 100644 --- a/libelf/version_xlate.h +++ b/libelf/version_xlate.h @@ -1,5 +1,5 @@ /* Conversion functions for versioning information. - Copyright (C) 1998, 1999, 2000, 2002, 2003 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2003, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -55,13 +55,18 @@ elf_cvt_Verdef (void *dest, const void *src, size_t len, int encode) if (len == 0) return; + /* Below we rely on the next field offsets to be correct, start by + copying over all data as is in case some data isn't translated. + We don't want to leave (undefined) garbage in the dest buffer. */ + memmove (dest, src, len); + do { size_t aux_offset; GElf_Verdaux *asrc; /* Test for correct offset. */ - if (def_offset + sizeof (GElf_Verdef) > len) + if (def_offset > len || len - def_offset < sizeof (GElf_Verdef)) return; /* Work the tree from the first record. */ @@ -90,7 +95,7 @@ elf_cvt_Verdef (void *dest, const void *src, size_t len, int encode) GElf_Verdaux *adest; /* Test for correct offset. */ - if (aux_offset + sizeof (GElf_Verdaux) > len) + if (aux_offset > len || len - aux_offset < sizeof (GElf_Verdaux)) return; adest = (GElf_Verdaux *) ((char *) dest + aux_offset); @@ -149,13 +154,18 @@ elf_cvt_Verneed (void *dest, const void *src, size_t len, int encode) if (len == 0) return; + /* Below we rely on the next field offsets to be correct, start by + copying over all data as is in case some data isn't translated. + We don't want to leave (undefined) garbage in the dest buffer. */ + memmove (dest, src, len); + do { size_t aux_offset; GElf_Vernaux *asrc; /* Test for correct offset. */ - if (need_offset + sizeof (GElf_Verneed) > len) + if (need_offset > len || len - need_offset < sizeof (GElf_Verneed)) return; /* Work the tree from the first record. */ @@ -182,7 +192,7 @@ elf_cvt_Verneed (void *dest, const void *src, size_t len, int encode) GElf_Vernaux *adest; /* Test for correct offset. */ - if (aux_offset + sizeof (GElf_Vernaux) > len) + if (aux_offset > len || len - aux_offset < sizeof (GElf_Vernaux)) return; adest = (GElf_Vernaux *) ((char *) dest + aux_offset); diff --git a/m4/ChangeLog b/m4/ChangeLog index 163ee73..9ee06d7 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2015-05-01 Mark Wielaard + + * zip.m4: Explicitly set with_ to no, if not yes. + 2014-07-14 Mark Wielaard * biarch.m4 (utrace_BIARCH): Set biarch-no for cross-compile using diff --git a/m4/Makefile.in b/m4/Makefile.in index d081f9e..206c89e 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,7 +88,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ @@ -86,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -110,6 +120,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -119,6 +130,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -138,6 +150,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -149,6 +164,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -192,6 +208,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -251,7 +268,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits m4/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -419,6 +435,8 @@ uninstall-am: maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/m4/zip.m4 b/m4/zip.m4 index 8e4d545..ab6fd57 100644 --- a/m4/zip.m4 +++ b/m4/zip.m4 @@ -14,5 +14,7 @@ fi AM_CONDITIONAL([$2], test $with_[$1] = yes) if test $with_[$1] = yes; then AC_DEFINE(USE_[$2]) +else + with_[$1]=no fi AH_TEMPLATE(USE_[$2], [Support $5 decompression via -l$3.])]) diff --git a/po/ChangeLog b/po/ChangeLog index ec4f384..6699fad 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,31 @@ +2016-01-08 Mark Wielaard + + * *.po: Update for 0.165. + +2015-10-16 Mark Wielaard + + * *.po: Regenerate. + +2015-10-15 Mark Wielaard + + * *.po: Update for 0.164. + +2015-06-19 Mark Wielaard + + * *.po: Update for 0.163. + +2015-06-15 Mark Wielaard + + * *.po: Regenerate. + +2015-06-10 Mark Wielaard + + * *.po: Update for 0.162. + +2014-12-18 Mark Wielaard + + * *.po: Update for 0.161. + 2014-08-25 Mark Wielaard * *.po: Update for 0.160. diff --git a/po/POTFILES.in b/po/POTFILES.in index 2058928..02433f9 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -2,9 +2,8 @@ # Copyright (C) 2000-2010 Red Hat, Inc. # Files from the compatibility library +lib/color.c lib/xmalloc.c -#lib/xstrdup.c -lib/xstrndup.c # Library sources libasm/asm_error.c @@ -28,6 +27,7 @@ libelf/elf_error.c # Program sources src/addr2line.c src/ar.c +src/arlib-argp.c src/arlib.c src/elfcmp.c src/elflint.c @@ -41,6 +41,11 @@ src/objdump.c src/ranlib.c src/readelf.c src/size.c +src/stack.c src/strings.c src/strip.c src/unstrip.c + +# Tests +tests/backtrace.c +tests/dwflmodtest.c diff --git a/po/de.gmo b/po/de.gmo index 69c0400..f555ac7 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index 34d83e2..2b937ac 100644 --- a/po/de.po +++ b/po/de.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: elfutils VERSION\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" "PO-Revision-Date: 2009-06-29 15:15+0200\n" "Last-Translator: Michael Münch \n" "Language-Team: German\n" @@ -22,8 +22,28 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 0.3\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" + +#: lib/color.c:190 src/objdump.c:738 +#, fuzzy, c-format +msgid "cannot allocate memory" +msgstr "konnte Verzeichnis nicht erstellen: %s" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "Kein Speicher mehr verfügbar" @@ -33,7 +53,7 @@ msgstr "Kein Speicher mehr verfügbar" msgid "no error" msgstr "kein Fehler" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "nicht genügend Speicher" @@ -72,7 +92,7 @@ msgstr "Fehler bei Datenausgabe" msgid "no backend support available" msgstr "keine Backend-Unterstützung verfügbar" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "unbekannter Fehler" @@ -98,123 +118,136 @@ msgid "no DWARF information" msgstr "keine DWARF Information" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "keine ELF Datei" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "ELF Kopf konnte nicht ausgelesen werden" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "Nicht implementiert" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "Ungültiger Befehl" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "Ungültige Version" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "Ungültige Datei" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "Keine Einträge gefunden" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "DWARF ungültig" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "Kein Adress-Wert" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "Kein Konstanten-Wert" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "Kein Referenz-Wert" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "Ungültiger Referenz-Wert" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr ".debug_line Sektion fehlt" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "ungültige .debug_line Sektion" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "Debug Information zu groß" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "Ungültige DWARF Version" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "ungültiger Verzeichnisindex" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "Außerhalb des Adressbereiches" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "Ungültiger Zeilenindex" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "Ungültiger Adressbereichs Index" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "Kein passender Adressbereich" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "ungültiger Offset" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr "" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 #, fuzzy msgid "invalid CFI section" msgstr "ungültiger Abschnitt" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +#, fuzzy +msgid "invalid opcode" +msgstr "ungültiger Operand" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "Eingabeauswahloptionen:" @@ -244,7 +277,7 @@ msgstr "Finde Adressen im laufenden Kernel" msgid "Kernel with all modules" msgstr "Kernel mit allen Modulen" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "Dateisuchpfad für separate Debug-Informationen" @@ -269,7 +302,12 @@ msgstr "Konnte Kernel oder Module nicht finden" msgid "cannot read ELF core file: %s" msgstr "Konnte ELF Kerndatei %s nicht lesen" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +#, fuzzy +msgid "Not enough memory" +msgstr "nicht genügend Speicher" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "Keine Module in der Kerndatei gefunden" @@ -436,82 +474,82 @@ msgstr "ungültiger Parameter" msgid "Not an ET_CORE ELF file" msgstr "Ungültige ELF Datei" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "Kein Backend" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr ": %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, fuzzy, c-format msgid "unknown SDT version %u\n" msgstr "unbekannte Version" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, fuzzy, c-format msgid "invalid SDT probe descriptor\n" msgstr "ungültiger Datei-Deskriptor" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr "" -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr "" -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr "" -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr "" -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr "" -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr "" -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " Build ID: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr "" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " OS: %s, ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr ": %d" @@ -536,7 +574,7 @@ msgstr "ungültige Grösse des Quell-Operanden" msgid "invalid size of destination operand" msgstr "ungültige Grösse des Ziel-Operanden" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "ungültige Kodierung" @@ -619,8 +657,8 @@ msgstr "data/scn Unterschied" msgid "invalid section header" msgstr "ungültiger Abschnitts-Header" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "Ungültige Daten" @@ -662,62 +700,113 @@ msgstr "" msgid "file has no program header" msgstr "Datei hat keinen Programm-Kopf" +#: libelf/elf_error.c:237 +#, fuzzy +msgid "invalid section type" +msgstr "ungültiger Abschnitt" + +#: libelf/elf_error.c:242 +#, fuzzy +msgid "invalid section flags" +msgstr "ungültiger Abschnitt" + +#: libelf/elf_error.c:247 +msgid "section does not contain compressed data" +msgstr "" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "" + +#: libelf/elf_error.c:257 +#, fuzzy +msgid "unknown compression type" +msgstr "unbekannter Typ" + +#: libelf/elf_error.c:262 +#, fuzzy +msgid "cannot compress data" +msgstr "konnte Abschnittsdaten nicht kopieren: %s" + +#: libelf/elf_error.c:267 +#, fuzzy +msgid "cannot decompress data" +msgstr "konnte Abschnittsdaten nicht kopieren: %s" + #: src/addr2line.c:58 -msgid "Output selection options:" +#, fuzzy +msgid "Input format options:" +msgstr "Eingabeauswahloptionen:" + +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." msgstr "" -#: src/addr2line.c:59 +#: src/addr2line.c:62 +#, fuzzy +msgid "Output format options:" +msgstr "Ausgabeformat:" + +#: src/addr2line.c:63 +msgid "Print address before each entry" +msgstr "" + +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "" -#: src/addr2line.c:64 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "" - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Verschiedenes:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -729,282 +818,295 @@ msgstr "" "GARANTIE,\n" "auch nicht für Marktgängigkeit oder Eignung für einen Bestimmten Zweck.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "Geschrieben von %s.\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, fuzzy, c-format msgid "Section syntax requires exactly one module" msgstr "Abschnitt syntax benötigt genau ein Modul" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "Konnte Symbol '%s' nicht finden" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "Befehle:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Dateien aus dem Archiv löschen." -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Dateien zum Archiv hinzufügen." -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Packe Dateien in Archiv" -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Hänge Dateien an ein Archiv" -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Ersetze existierende oder füge neue Datei in das Archiv ein." -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Zeige Archivinhalt an." -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Entpacke Dateien aus dem Archiv" -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Erhalte ursprüngliche Daten." -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "" -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Ersetze existierende Dateien nicht mit entpackten Dateien" -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Erlaube angehängte Dateinamen, wenn nötig" -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Zeige detaillierte Ausgabe." -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Erzwinge Regenerierung der Symboltabelle." -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Füge Datei nach [MEMBER] ein." -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Füge Datei vor [MEMBER] ein." -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "Genau wie -b." -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Unterdrücke Nachricht wenn Bibliothek erstellt werden muss." -#: src/ar.c:93 +#: src/ar.c:92 #, fuzzy msgid "Use full path for file matching." msgstr "Vollständigen Pfad für Dateiabgleich verwenden." -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Nur ältere Datein im Archiv aktualisieren" -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Erstelle, ändere, extrahiere von Archiven" -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[MEMBER] [COUNT] ARCHIVE [FILE...]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a', 'b', und 'i' nur zusammen mit 'm' and 'r Optionen" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "'N' ist nur mit den Optionen 'x' und 'd' von Bedeutung." -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "COUNT Parameter erforderlich" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "Ungültiger COUNT Parameter %s" -#: src/ar.c:230 +#: src/ar.c:226 #, fuzzy, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "'%' ist nur mit der Option 'x' von Bedeutung" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "Archivname erforderlich" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "Mehr als eine Operation angegeben" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "Konnte Archiv '%s' nicht öffnen" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "Konnte Archiv '%s': %s nicht öffnen" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: Keine Archiv-Datei" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "Kein Eintrag %s in Archiv\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "Konnte Hash-Tabelle nicht erstellen" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "Konnte nicht in Hash-Tabelle einfügen" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "Konnte Inhalt von %s: %s nicht lesen" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "Konnte %.*s nicht öffnen" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "Konnte %s nicht schreiben" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "Konnte Bearbeitungszeit von %s nicht ändern" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "Konnte temporäre Datei nicht in %.*s umbenennen" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "neue Datei konnte nicht angelegt werden" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: Kein Eintrag %s in dem Archiv!\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "Konnte %s nicht öffnen" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "%s ist keine reguläre Datei" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "Konnte %s: %s nicht lesen" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1084,140 +1186,145 @@ msgstr "konnte Programm-Kopf nicht erstellen: %s" msgid "%s %s diff: program header count" msgstr "Datei hat keinen Programm-Kopf" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "'%s' kann nicht geöffnet werden" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "" @@ -1244,11 +1351,11 @@ msgstr "" msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "DATEI..." -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "Kann Eingabedatei nicht öffnen" @@ -1267,7 +1374,7 @@ msgstr "Fehler beim Schliessen des Elf-Desktriptor: %s\n" msgid "No errors" msgstr "Keine Fehler" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "Dateiname fehlt.\n" @@ -1396,1444 +1503,1558 @@ msgstr "" msgid "invalid section header position or size\n" msgstr "" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " "group\n" msgstr "" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" msgstr "" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " "type is not SHT_STRTAB\n" msgstr "" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " "section\n" msgstr "" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " "section index section\n" msgstr "" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " "st_shndx (%)\n" msgstr "" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" msgstr "" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " "SHF_TLS flag set\n" msgstr "" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " "sh_info\n" msgstr "" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " "sh_info\n" msgstr "" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " "[%2d]\n" msgstr "" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " "match %s section address %#\n" msgstr "" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " "match %s section size %\n" msgstr "" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " "section\n" msgstr "" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " "segment address %#\n" msgstr "" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " "segment size %\n" msgstr "" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" "default visibility\n" msgstr "" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" #: src/elflint.c:1082 +#, fuzzy, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/elflint.c:1098 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " "DT_RELCOUNT\n" msgstr "" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " "specified %d relative relocations\n" msgstr "" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "" -#: src/elflint.c:1245 -#, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" -msgstr "" +#: src/elflint.c:1263 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " "type\n" msgstr "" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " "be used with %s\n" msgstr "" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " "%s\n" msgstr "" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " "relocation flag not set\n" msgstr "" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] '%s' referenced by sh_link\n" msgstr "" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " "same symbol table\n" msgstr "" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" -#: src/elflint.c:2081 +#: src/elflint.c:2107 +#, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "" + +#: src/elflint.c:2119 #, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "" -#: src/elflint.c:2092 +#: src/elflint.c:2135 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" msgstr "" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" msgstr "" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "" + +#: src/elflint.c:2409 +#, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" + +#: src/elflint.c:2522 +#, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "" -#: src/elflint.c:2538 -#, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" -msgstr "" +#: src/elflint.c:2693 +#, fuzzy, c-format +msgid "section [%2d] '%s': section index %zu out of range\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "" -#: src/elflint.c:2560 +#: src/elflint.c:2715 #, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " "dynamic symbol table\n" msgstr "" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" msgstr "" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" msgstr "" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name '%s'\n" msgstr "" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" msgstr "" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" msgstr "" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" msgstr "" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " "segments\n" msgstr "" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, fuzzy, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/elflint.c:3918 +#, fuzzy, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/elflint.c:3924 +#, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " "%d\n" msgstr "" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d\n" msgstr "" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" msgstr "" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" msgstr "" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" msgstr "" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " "alignment\n" msgstr "" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" msgstr "" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -2854,8 +3075,8 @@ msgstr "" msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "" -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "" @@ -2889,52 +3110,52 @@ msgstr "" msgid "while reading ELF file" msgstr "" -#: src/findtextrel.c:334 src/findtextrel.c:351 -#, c-format -msgid "cannot get program header index at offset %d: %s" -msgstr "" +#: src/findtextrel.c:329 +#, fuzzy, c-format +msgid "cannot get program header count: %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/findtextrel.c:403 -#, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "" +#: src/findtextrel.c:340 src/findtextrel.c:357 +#, fuzzy, c-format +msgid "cannot get program header index at offset %zd: %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" "fPIC\n" msgstr "" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " "function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -2965,338 +3186,338 @@ msgstr "" msgid "initial-executable TLS relocation cannot be used " msgstr "" -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "" -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "" -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "DATEI" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "Eine Gruppe starten." -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "Eine Gruppe beenden." -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "PFAD" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "" -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "" -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "" -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "" -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "Genau wie --whole-archive." -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "" -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "" -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "" -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "" -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "" -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "" -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "" -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "" -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "" -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "" -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "" -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "ADRESSE" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "" -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "" -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "" -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "" -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "" -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "" -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "" -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "" -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "" -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "" -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "" -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "" -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "" -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "" -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "" -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "" -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "" -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "" -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "" -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "" -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "" -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "" -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "" -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "" -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "" -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "" -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "[DATEI]..." -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "Mindestens eine Eingabedatei benötigt" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( ohne Übereinstimmung -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "nur eine Option aus -G und -r erlaubt" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "Mehr als ein Name der Ausgabedatei angegeben." -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "-) ohne Übereinstimmung -(" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "unbekannte Option '-%c %s'" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "" @@ -3341,8 +3562,8 @@ msgstr "" msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "" @@ -3573,7 +3794,7 @@ msgstr "" msgid "cannot get header of 0th section: %s" msgstr "" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "" @@ -3626,7 +3847,7 @@ msgstr "" #: src/ldscript.y:737 #, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "" #: src/ldscript.y:739 @@ -3639,7 +3860,7 @@ msgstr "" msgid "default visibility set as local and global" msgstr "Standard-Sichtbarkeit auf lokal und global gesetzt" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "" @@ -3667,7 +3888,7 @@ msgstr "Zeige nur undefinierte Symbole" msgid "Include index for symbols from archive members" msgstr "" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "Ausgabeformat:" @@ -3692,7 +3913,7 @@ msgstr "Genau wie --format=bsd" msgid "Same as --format=posix" msgstr "Genau wie --format=posix" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "Benutze RADIX zur Ausgabe von Symbolwerten" @@ -3706,7 +3927,7 @@ msgstr "Kennzeichne schwache Symbole" msgid "Print size of defined symbols" msgstr "Zeige Grösse der definierten Symbole" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "Ausgabeoptionen:" @@ -3730,28 +3951,28 @@ msgstr "" msgid "List symbols from FILEs (a.out by default)." msgstr "" -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 #, fuzzy msgid "Output formatting" msgstr "Ausgabeformat:" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 -#, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 +#, fuzzy, c-format +msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: INTERNER FEHLER %d (%s-%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "beim Schliessen von '%s'" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: Dateiformat nicht erkannt" -#: src/nm.c:460 +#: src/nm.c:457 #, fuzzy msgid "" "\n" @@ -3760,42 +3981,42 @@ msgstr "" "\n" "Archiv-Index:" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "ungültiger Offset %zu für Symbol %s" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: Dateiformat nicht erkannt" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "Kann Suchbaum nicht erstellen" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -3808,76 +4029,76 @@ msgstr "" "Symbole aus %s:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" "\n" msgstr "" -#: src/nm.c:1173 -#, c-format -msgid "%s: entry size in section `%s' is not what we expect" +#: src/nm.c:1232 +#, fuzzy, c-format +msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "%s: entry size in section `%s' is not what we expect" -#: src/nm.c:1177 -#, c-format -msgid "%s: size of section `%s' is not multiple of entry size" -msgstr "" +#: src/nm.c:1237 +#, fuzzy, c-format +msgid "%s: size of section %zd `%s' is not multiple of entry size" +msgstr "%s: entry size in section `%s' is not what we expect" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: Ungültige Operation" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: keine Symbole" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "" -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "" -#: src/objdump.c:60 +#: src/objdump.c:59 #, fuzzy msgid "Output content selection:" msgstr "Eingabeauswahloptionen:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "" -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "" -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "Keine Operation angegeben.\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "" @@ -3893,473 +4114,492 @@ msgstr "" msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "Inhalt des Abschnitts %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "Disassemblieren nicht möglich" -#: src/objdump.c:736 -#, fuzzy, c-format -msgid "cannot allocate memory" -msgstr "konnte Verzeichnis nicht erstellen: %s" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "Erstelle einen Index zur Beschleunigung des Zugriffs auf Archive." -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "ARCHIV" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "Archivname benötigt" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "'%s' ist kein Archiv" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "" -#: src/readelf.c:71 +#: src/readelf.c:72 #, fuzzy msgid "ELF input selection:" msgstr "Eingabeauswahloptionen:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:76 #, fuzzy msgid "ELF output selection:" msgstr "Eingabeauswahloptionen:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "Programm-Köpfe anzeigen" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "Relocations anzeigen" -#: src/readelf.c:85 +#: src/readelf.c:86 #, fuzzy msgid "Display the sections' headers" msgstr "Programm-Köpfe anzeigen" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "Symboltabelle anzeigen" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "Versionierungsinformationen anzeigen" -#: src/readelf.c:89 +#: src/readelf.c:90 #, fuzzy msgid "Display the ELF notes" msgstr "Kernnotizen anzeigen" -#: src/readelf.c:91 +#: src/readelf.c:92 #, fuzzy msgid "Display architecture specific information, if any" msgstr "Architekturspezifische Informationen anzeigen (falls vorhanden)" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "Abschnitte für Ausnahmebehandlung anzeigen" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "" -#: src/readelf.c:97 +#: src/readelf.c:98 msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro or exception" msgstr "" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "Symbolindex des Archivs anzeigen" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "Ausgabekontrolle:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Keine symbolischen Namen für Adressen in DWARF-Daten suchen" -#: src/readelf.c:112 +#: src/readelf.c:113 #, fuzzy msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "Keine symbolischen Namen für Adressen in DWARF-Daten suchen" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "Informationen aus der ELF-Datei in menschenlesbarer Form ausgeben." -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "konnte Elf-Deskriptor nicht erzeugen: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "" -#: src/readelf.c:562 +#: src/readelf.c:571 #, fuzzy, c-format msgid "cannot get section name" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "" -#: src/readelf.c:587 +#: src/readelf.c:596 #, fuzzy, c-format msgid "cannot create temp file '%s'" msgstr "neue Datei konnte nicht angelegt werden" -#: src/readelf.c:596 +#: src/readelf.c:605 #, fuzzy, c-format msgid "cannot write section data" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "" -#: src/readelf.c:609 +#: src/readelf.c:618 #, fuzzy, c-format msgid "error while rewinding file descriptor" msgstr "Fehler beim Schliessen des Elf-Desktriptor: %s\n" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "" -#: src/readelf.c:742 +#: src/readelf.c:751 #, fuzzy, c-format msgid "No such section '%s' in '%s'" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "Konnte '%s' nicht lesen: %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "" -#: src/readelf.c:835 +#: src/readelf.c:858 #, fuzzy, c-format msgid "cannot determine number of program headers: %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " msgstr "" -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" " Class: %s\n" msgstr "" -#: src/readelf.c:951 +#: src/readelf.c:978 #, fuzzy, c-format msgid " Data: %s\n" msgstr " Daten: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr "" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(aktuell)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr "" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr "" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " Typ: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr "" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr "" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr "" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr "" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr "" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr "" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr "" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(Bytes)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr "" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr "" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr "" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr "" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr "" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr "" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr "" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr "" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" "\n" msgstr "" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" "\n" msgstr "" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" "\n" msgstr "" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" msgstr "" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" msgstr "" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1213 +#, c-format +msgid "bad compression header for section %zd: %s" +msgstr "" + +#: src/readelf.c:1224 +#, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "Programm-Köpfe:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" msgstr "" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" " Segment Sections..." msgstr "" -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4370,7 +4610,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4381,21 +4621,25 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 #, fuzzy, c-format -msgid "invalid sh_link value in section %Zu" +msgid "invalid sh_link value in section %zu" msgstr "ungültige .debug_line Sektion" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4408,43 +4652,43 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr "" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" "Invalid symbol table at offset %#0\n" msgstr "" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4457,7 +4701,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4468,29 +4712,29 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr "" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr "" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4501,40 +4745,40 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "keine" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| " -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4547,17 +4791,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, fuzzy, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Version: %hu Datei: %s Cnt: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Name: %s Flags: %s Version: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4570,17 +4814,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr "" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4593,15 +4837,15 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *lokal* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -4616,41 +4860,56 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr "" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" "\t\t\t unsuccessful lookup: %f\n" msgstr "" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3148 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3206 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" " Bitmask Size: %zu bytes %%% bits set 2nd hash shift: %u\n" msgstr "" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -4661,13 +4920,13 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" msgstr "" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -4675,140 +4934,140 @@ msgid "" "%#0:\n" msgstr "" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr "" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " File: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, c-format msgid "%s %# used with different base addresses" msgstr "" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr "" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -4816,37 +5075,37 @@ msgid "" " [ Code]\n" msgstr "" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" "Abbreviation section at offset %:\n" msgstr "" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr "" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr "" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "ja" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "nein" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -4857,189 +5116,193 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" "DWARF section [%2zu] '%s' at offset %#:\n" msgstr "" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4797 src/readelf.c:6494 #, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, fuzzy, c-format msgid "" "\n" " Length: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, fuzzy, c-format msgid " DWARF version: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, fuzzy, c-format msgid " CU offset: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, c-format msgid " Address size: %6\n" msgstr "" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, fuzzy, c-format msgid "unsupported address size" msgstr "Kein Adress-Wert" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, c-format msgid "" " Segment size: %6\n" "\n" msgstr "" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, fuzzy, c-format msgid " %s..%s (%)\n" msgstr " %s: %\n" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr "" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, fuzzy, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +msgid " \n" +msgstr "" + +#: src/readelf.c:5493 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "ELF Kopf konnte nicht ausgelesen werden" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" "Call frame information section [%2zu] '%s' at offset %#:\n" msgstr "" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" " [%6tx] Zero terminator\n" msgstr "" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, fuzzy, c-format msgid "invalid augmentation length" msgstr "ungültige Abschnittsausrichtung" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "" -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "" -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr "" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr "" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr "" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5047,7 +5310,7 @@ msgid "" " [Offset]\n" msgstr "" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5056,7 +5319,7 @@ msgid "" " Type signature: %#, Type offset: %#\n" msgstr "" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5064,32 +5327,32 @@ msgid "" "%, Offset size: %\n" msgstr "" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, c-format msgid "" "\n" @@ -5097,12 +5360,12 @@ msgid "" "\n" msgstr "" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5119,239 +5382,249 @@ msgid "" "Opcodes:\n" msgstr "" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" msgstr "" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" " Entry Dir Time Size Name" msgstr "" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" msgstr "" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr "" -#: src/readelf.c:6421 +#: src/readelf.c:6763 msgid " end of sequence" msgstr "" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, c-format msgid " set address to %s\n" msgstr "" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr "" -#: src/readelf.c:6477 +#: src/readelf.c:6827 #, fuzzy msgid " unknown opcode" msgstr "unbekannter Typ" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr "" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr "" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, c-format msgid " advance address by %u to %s\n" msgstr "" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr "" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr "" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr "" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr "" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr "" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr "" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, c-format msgid " advance address by constant %u to %s\n" msgstr "" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr "" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr "" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr "" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr "" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr "" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "" + +#: src/readelf.c:7334 #, fuzzy, c-format msgid " Offset: 0x%\n" msgstr " %s: %\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, fuzzy, c-format msgid " Flag: 0x%\n" msgstr " %s: %\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, c-format msgid " Offset length: %\n" msgstr "" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, c-format msgid " .debug_line offset: 0x%\n" msgstr "" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, c-format msgid " extension opcode table, % items:\n" msgstr "" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, c-format msgid " % arguments:" msgstr "" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5359,47 +5632,47 @@ msgid "" " %*s String\n" msgstr "" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr "" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" msgstr "" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" msgstr "" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr "" -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr "" -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr "" -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" msgstr "" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5408,809 +5681,966 @@ msgid "" " Action: %u\n" msgstr "" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, c-format msgid "" "\n" "GDB section [%2zu] '%s' at offset %# contains % bytes :\n" msgstr "" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, c-format msgid " CU offset: %#\n" msgstr "" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, c-format msgid " TU offset: %#\n" msgstr "" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, c-format msgid " address offset: %#\n" msgstr "" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, c-format msgid " symbol offset: %#\n" msgstr "" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, c-format msgid " constant offset: %#\n" msgstr "" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, c-format msgid "" "\n" " CU list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, c-format msgid "" "\n" " TU list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, c-format msgid "" "\n" " Address list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, c-format msgid "" "\n" " Symbol table at offset %# contains %zu slots:\n" msgstr "" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" "%*s... ..." msgstr "" -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr "" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr "" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" "Note section [%2zu] '%s' of % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" "Note segment of % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9083 -#, c-format +#: src/readelf.c:9501 +#, fuzzy, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" -msgstr "" +"Section [%zu] '%s' has no data to dump.\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9518 src/readelf.c:9559 +#, fuzzy, c-format +msgid "cannot get data for section [%zu] '%s': %s" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/readelf.c:9523 #, c-format -msgid "cannot get data for section [%Zu] '%s': %s" +msgid "" +"\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9093 +#: src/readelf.c:9528 #, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" msgstr "" -#: src/readelf.c:9106 +#: src/readelf.c:9542 +#, fuzzy, c-format +msgid "" +"\n" +"Section [%zu] '%s' has no strings to dump.\n" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/readelf.c:9564 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9116 +#: src/readelf.c:9569 #, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" msgstr "" -#: src/readelf.c:9164 +#: src/readelf.c:9618 #, c-format msgid "" "\n" "section [%lu] does not exist" msgstr "" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" "section '%s' does not exist" msgstr "" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" "Archive '%s' has no symbol index\n" msgstr "" -#: src/readelf.c:9257 +#: src/readelf.c:9711 #, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" -#: src/readelf.c:9275 -#, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" -msgstr "" +#: src/readelf.c:9729 +#, fuzzy, c-format +msgid "cannot extract member at offset %zu in '%s': %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" msgstr "" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "Genau wie `--format=sysv'" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "Genau wie `--format=bsd'" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "Genau wie `--radix=10'" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "Genau wie `--radix=8'" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "Genau wie `--radix=16'" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "" -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "Ungültiges Format: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr "" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "" + +#: src/stack.c:494 +#, fuzzy, c-format +msgid "Cannot open core file '%s'" +msgstr "Konnte Archiv '%s' nicht öffnen" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "" + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "" + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "" + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "" + +#: src/stack.c:644 +#, fuzzy +msgid "Show stack of process PID" +msgstr "Kann Suchbaum nicht erstellen" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "" + +#: src/stack.c:651 +#, fuzzy +msgid "Output selection options:" +msgstr "Eingabeauswahloptionen:" + +#: src/stack.c:653 +msgid "Additionally show frame activation" +msgstr "" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "" + +#: src/stack.c:662 +msgid "Additionally show source file information" +msgstr "" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "" + +#: src/strings.c:66 msgid "Output Selection:" msgstr "" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" msgstr "" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "" -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "" -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias für --radix=o" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "" -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "" -#: src/strings.c:596 -#, c-format -msgid "lseek64 failed" +#: src/strings.c:600 +#, fuzzy, c-format +msgid "lseek failed" msgstr "lseek64 fehlgeschlagen" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "re-mmap fehlgeschlagen" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "mprotect fehlgeschlagen" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "" -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "" -#: src/strip.c:468 +#: src/strip.c:384 +#, fuzzy, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: Kein Eintrag %s in dem Archiv!\n" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "konnte Programm-Kopf nicht erstellen: %s" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "" -#: src/strip.c:1752 +#: src/strip.c:1861 #, fuzzy, c-format msgid "bad relocation" msgstr "Relocations anzeigen" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, fuzzy, c-format msgid "while writing '%s'" msgstr "beim Schliessen von '%s'" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "Option -d zweimal angegeben" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "nur entweder -o oder -d erlaubt" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "-n kann nicht mit expliziten Dateien oder -o oder -d verwendet werden" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "Ausgabeverzeichnis '%s'" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "genau zwei Datei-Argumente werden benötigt" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "konnte Programm-Kopf nicht kopieren: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "konnte Abschnittsdaten nicht kopieren: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "konnte Verzeichnis nicht erstellen: %s" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "konnte Eintrag aus der Symboltabelle nicht holen: %s" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "konnte Symboltabelle nicht aktualisieren: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" +msgid "unexpected section type in [%zu] with sh_link to symtab" msgstr "" -#: src/unstrip.c:771 -#, c-format -msgid "invalid string offset in symbol [%Zu]" -msgstr "" +#: src/unstrip.c:809 +#, fuzzy, c-format +msgid "invalid string offset in symbol [%zu]" +msgstr "ungültiger Offset %zu für Symbol %s" -#: src/unstrip.c:913 src/unstrip.c:1254 -#, c-format -msgid "cannot read section [%Zu] name: %s" -msgstr "" +#: src/unstrip.c:967 src/unstrip.c:1313 +#, fuzzy, c-format +msgid "cannot read section [%zu] name: %s" +msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" +msgid "overflow with shnum = %zu in '%s' section" msgstr "" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1108 src/unstrip.c:1433 +#, fuzzy, c-format +msgid "cannot find matching section for [%zu] '%s'" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1551 -#, c-format -msgid "symbol [%Zu] has invalid section index" -msgstr "" +#: src/unstrip.c:1618 +#, fuzzy, c-format +msgid "symbol [%zu] has invalid section index" +msgstr "ungültiger Abschnittsindex" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, fuzzy, c-format msgid "cannot read section data: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "konnte Programm-Kopf nicht aktualisieren: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "kein passendes Modul gefunden" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "mehr als ein passendes Modul" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6237,9 +6667,17 @@ msgid "" "was found, or . if FILE contains the debug information." msgstr "" -#, fuzzy -#~ msgid "cannot attach to process" -#~ msgstr "Kann Suchbaum nicht erstellen" +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "" + +#: tests/dwflmodtest.c:213 +msgid "Additionally show function names" +msgstr "" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "" #, fuzzy #~ msgid "cannot attach to core" diff --git a/po/elfutils.pot b/po/elfutils.pot index cb904cb..5f353fc 100644 --- a/po/elfutils.pot +++ b/po/elfutils.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Red Hat, Inc. -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the elfutils package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: elfutils 0.160\n" +"Project-Id-Version: elfutils 0.165\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,8 +18,28 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" + +#: lib/color.c:190 src/objdump.c:738 +#, c-format +msgid "cannot allocate memory" +msgstr "" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "" @@ -29,7 +49,7 @@ msgstr "" msgid "no error" msgstr "" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "" @@ -68,7 +88,7 @@ msgstr "" msgid "no backend support available" msgstr "" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "" @@ -94,122 +114,134 @@ msgid "no DWARF information" msgstr "" #: libdw/dwarf_error.c:65 -msgid "no ELF file" +msgid "cannot decompress DWARF" msgstr "" #: libdw/dwarf_error.c:66 +msgid "no ELF file" +msgstr "" + +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr "" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr "" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +msgid "invalid opcode" +msgstr "" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "" @@ -239,7 +271,7 @@ msgstr "" msgid "Kernel with all modules" msgstr "" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "" @@ -264,7 +296,11 @@ msgstr "" msgid "cannot read ELF core file: %s" msgstr "" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +msgid "Not enough memory" +msgstr "" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "" @@ -420,82 +456,82 @@ msgstr "" msgid "Not an ET_CORE ELF file" msgstr "" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr "" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, c-format msgid "unknown SDT version %u\n" msgstr "" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, c-format msgid "invalid SDT probe descriptor\n" msgstr "" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr "" -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr "" -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr "" -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr "" -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr "" -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr "" -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr "" -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr "" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr "" -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr "" @@ -520,7 +556,7 @@ msgstr "" msgid "invalid size of destination operand" msgstr "" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "" @@ -601,8 +637,8 @@ msgstr "" msgid "invalid section header" msgstr "" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "" @@ -644,62 +680,106 @@ msgstr "" msgid "file has no program header" msgstr "" -#: src/addr2line.c:58 -msgid "Output selection options:" +#: libelf/elf_error.c:237 +msgid "invalid section type" msgstr "" -#: src/addr2line.c:59 -msgid "Show only base names of source files" +#: libelf/elf_error.c:242 +msgid "invalid section flags" msgstr "" -#: src/addr2line.c:61 -msgid "Show absolute file names using compilation directory" +#: libelf/elf_error.c:247 +msgid "section does not contain compressed data" +msgstr "" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "" + +#: libelf/elf_error.c:257 +msgid "unknown compression type" +msgstr "" + +#: libelf/elf_error.c:262 +msgid "cannot compress data" +msgstr "" + +#: libelf/elf_error.c:267 +msgid "cannot decompress data" +msgstr "" + +#: src/addr2line.c:58 +msgid "Input format options:" +msgstr "" + +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." msgstr "" #: src/addr2line.c:62 -msgid "Also show function names" +msgid "Output format options:" msgstr "" #: src/addr2line.c:63 -msgid "Also show symbol or section names" +msgid "Print address before each entry" msgstr "" #: src/addr2line.c:64 -msgid "Also show symbol and the section names" +msgid "Show only base names of source files" msgstr "" -#: src/addr2line.c:65 -msgid "Also show line table flags" +#: src/addr2line.c:66 +msgid "Show absolute file names using compilation directory" msgstr "" #: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." +msgid "Also show function names" +msgstr "" + +#: src/addr2line.c:68 +msgid "Also show symbol or section names" msgstr "" #: src/addr2line.c:69 +msgid "Also show symbol and the section names" +msgstr "" + +#: src/addr2line.c:70 +msgid "Also show line table flags" +msgstr "" + +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -707,281 +787,294 @@ msgid "" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" msgstr "" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "" -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "" -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "" -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "" -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "" -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "" -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "" -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "" -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "" -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "" -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "" -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "" -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "" -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "" -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "" -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "" -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "" -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "" -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "" -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "" -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "" -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1060,140 +1153,145 @@ msgstr "" msgid "%s %s diff: program header count" msgstr "" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "" @@ -1220,11 +1318,11 @@ msgstr "" msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "" -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "" @@ -1243,7 +1341,7 @@ msgstr "" msgid "No errors" msgstr "" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "" @@ -1372,1444 +1470,1558 @@ msgstr "" msgid "invalid section header position or size\n" msgstr "" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " "group\n" msgstr "" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" msgstr "" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " "type is not SHT_STRTAB\n" msgstr "" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " "section\n" msgstr "" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " "section index section\n" msgstr "" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " "st_shndx (%)\n" msgstr "" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" msgstr "" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " "SHF_TLS flag set\n" msgstr "" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " "sh_info\n" msgstr "" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " "sh_info\n" msgstr "" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " "[%2d]\n" msgstr "" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " "match %s section address %#\n" msgstr "" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " "match %s section size %\n" msgstr "" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " "section\n" msgstr "" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " "segment address %#\n" msgstr "" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " "segment size %\n" msgstr "" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" "default visibility\n" msgstr "" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" #: src/elflint.c:1082 #, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "" + +#: src/elflint.c:1098 +#, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " "DT_RELCOUNT\n" msgstr "" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " "specified %d relative relocations\n" msgstr "" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "" -#: src/elflint.c:1245 +#: src/elflint.c:1263 #, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " "type\n" msgstr "" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " "be used with %s\n" msgstr "" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " "%s\n" msgstr "" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " "relocation flag not set\n" msgstr "" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] '%s' referenced by sh_link\n" msgstr "" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " "same symbol table\n" msgstr "" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" -#: src/elflint.c:2081 +#: src/elflint.c:2107 +#, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "" + +#: src/elflint.c:2119 #, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "" -#: src/elflint.c:2092 +#: src/elflint.c:2135 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" msgstr "" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" msgstr "" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "" + +#: src/elflint.c:2409 +#, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" + +#: src/elflint.c:2522 +#, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "" -#: src/elflint.c:2538 +#: src/elflint.c:2693 #, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" +msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "" -#: src/elflint.c:2560 +#: src/elflint.c:2715 #, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " "dynamic symbol table\n" msgstr "" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" msgstr "" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" msgstr "" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name '%s'\n" msgstr "" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" msgstr "" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" msgstr "" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" msgstr "" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " "segments\n" msgstr "" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "" + +#: src/elflint.c:3918 +#, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "" + +#: src/elflint.c:3924 +#, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " "%d\n" msgstr "" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d\n" msgstr "" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" msgstr "" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" msgstr "" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" msgstr "" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " "alignment\n" msgstr "" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" msgstr "" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -2830,8 +3042,8 @@ msgstr "" msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "" -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "" @@ -2865,52 +3077,52 @@ msgstr "" msgid "while reading ELF file" msgstr "" -#: src/findtextrel.c:334 src/findtextrel.c:351 +#: src/findtextrel.c:329 #, c-format -msgid "cannot get program header index at offset %d: %s" +msgid "cannot get program header count: %s" msgstr "" -#: src/findtextrel.c:403 +#: src/findtextrel.c:340 src/findtextrel.c:357 #, c-format -msgid "cannot get section header of section %Zu: %s" +msgid "cannot get program header index at offset %zd: %s" msgstr "" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" "fPIC\n" msgstr "" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " "function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -2941,338 +3153,338 @@ msgstr "" msgid "initial-executable TLS relocation cannot be used " msgstr "" -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "" -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "" -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "" -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "" -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "" -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "" -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "" -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "" -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "" -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "" -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "" -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "" -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "" -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "" -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "" -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "" -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "" -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "" -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "" -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "" -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "" -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "" -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "" -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "" -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "" -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "" -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "" -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "" -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "" -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "" -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "" -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "" -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "" -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "" -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "" -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "" -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "" -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "" -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "" -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "" -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "" -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "" -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "" -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "" -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "" -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "" -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "" -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "" -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "" @@ -3317,8 +3529,8 @@ msgstr "" msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "" @@ -3549,7 +3761,7 @@ msgstr "" msgid "cannot get header of 0th section: %s" msgstr "" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "" @@ -3602,7 +3814,7 @@ msgstr "" #: src/ldscript.y:737 #, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "" #: src/ldscript.y:739 @@ -3615,7 +3827,7 @@ msgstr "" msgid "default visibility set as local and global" msgstr "" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "" @@ -3643,7 +3855,7 @@ msgstr "" msgid "Include index for symbols from archive members" msgstr "" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "" @@ -3665,7 +3877,7 @@ msgstr "" msgid "Same as --format=posix" msgstr "" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "" @@ -3677,7 +3889,7 @@ msgstr "" msgid "Print size of defined symbols" msgstr "" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "" @@ -3701,68 +3913,68 @@ msgstr "" msgid "List symbols from FILEs (a.out by default)." msgstr "" -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 msgid "Output formatting" msgstr "" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 #, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" +msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "" -#: src/nm.c:460 +#: src/nm.c:457 msgid "" "\n" "Archive index:\n" msgstr "" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -3771,75 +3983,75 @@ msgid "" "\n" msgstr "" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" "\n" msgstr "" -#: src/nm.c:1173 +#: src/nm.c:1232 #, c-format -msgid "%s: entry size in section `%s' is not what we expect" +msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "" -#: src/nm.c:1177 +#: src/nm.c:1237 #, c-format -msgid "%s: size of section `%s' is not multiple of entry size" +msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "" -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "" -#: src/objdump.c:60 +#: src/objdump.c:59 msgid "Output content selection:" msgstr "" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "" -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "" -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "" @@ -3855,467 +4067,486 @@ msgstr "" msgid "OFFSET" msgstr "" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "" -#: src/objdump.c:736 -#, c-format -msgid "cannot allocate memory" -msgstr "" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "" -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "" -#: src/readelf.c:71 +#: src/readelf.c:72 msgid "ELF input selection:" msgstr "" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:76 msgid "ELF output selection:" msgstr "" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "" -#: src/readelf.c:85 +#: src/readelf.c:86 msgid "Display the sections' headers" msgstr "" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "" -#: src/readelf.c:89 +#: src/readelf.c:90 msgid "Display the ELF notes" msgstr "" -#: src/readelf.c:91 +#: src/readelf.c:92 msgid "Display architecture specific information, if any" msgstr "" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "" -#: src/readelf.c:97 +#: src/readelf.c:98 msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro or exception" msgstr "" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "" -#: src/readelf.c:112 +#: src/readelf.c:113 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "" -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "" -#: src/readelf.c:562 +#: src/readelf.c:571 #, c-format msgid "cannot get section name" msgstr "" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "" -#: src/readelf.c:587 +#: src/readelf.c:596 #, c-format msgid "cannot create temp file '%s'" msgstr "" -#: src/readelf.c:596 +#: src/readelf.c:605 #, c-format msgid "cannot write section data" msgstr "" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "" -#: src/readelf.c:609 +#: src/readelf.c:618 #, c-format msgid "error while rewinding file descriptor" msgstr "" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "" -#: src/readelf.c:742 +#: src/readelf.c:751 #, c-format msgid "No such section '%s' in '%s'" msgstr "" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "" -#: src/readelf.c:835 +#: src/readelf.c:858 #, c-format msgid "cannot determine number of program headers: %s" msgstr "" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " msgstr "" -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" " Class: %s\n" msgstr "" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr "" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr "" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr "" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr "" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr "" -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr "" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr "" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr "" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr "" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr "" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr "" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr "" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr "" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr "" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr "" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr "" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr "" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr "" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr "" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr "" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" "\n" msgstr "" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" "\n" msgstr "" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" "\n" msgstr "" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" msgstr "" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" msgstr "" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1213 +#, c-format +msgid "bad compression header for section %zd: %s" +msgstr "" + +#: src/readelf.c:1224 +#, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" msgstr "" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" " Segment Sections..." msgstr "" -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4326,7 +4557,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4337,21 +4568,25 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 #, c-format -msgid "invalid sh_link value in section %Zu" +msgid "invalid sh_link value in section %zu" msgstr "" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4364,43 +4599,43 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr "" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" "Invalid symbol table at offset %#0\n" msgstr "" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4413,7 +4648,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4424,29 +4659,29 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr "" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr "" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4457,40 +4692,40 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "" -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4503,17 +4738,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr "" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr "" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4526,17 +4761,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr "" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4549,15 +4784,15 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr "" -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr "" -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -4572,41 +4807,56 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr "" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr "" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" "\t\t\t unsuccessful lookup: %f\n" msgstr "" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "" + +#: src/readelf.c:3148 +#, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "" + +#: src/readelf.c:3206 +#, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" " Bitmask Size: %zu bytes %%% bits set 2nd hash shift: %u\n" msgstr "" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -4617,13 +4867,13 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" msgstr "" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -4631,140 +4881,140 @@ msgid "" "%#0:\n" msgstr "" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr "" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr "" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr "" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr "" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr "" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr "" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr "" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr "" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr "" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, c-format msgid "%s %# used with different base addresses" msgstr "" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr "" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -4772,37 +5022,37 @@ msgid "" " [ Code]\n" msgstr "" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" "Abbreviation section at offset %:\n" msgstr "" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr "" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr "" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -4813,189 +5063,193 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr "" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" "DWARF section [%2zu] '%s' at offset %#:\n" msgstr "" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4797 src/readelf.c:6494 #, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, c-format msgid "" "\n" " Length: %6\n" msgstr "" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, c-format msgid " DWARF version: %6\n" msgstr "" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, c-format msgid " CU offset: %6\n" msgstr "" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, c-format msgid " Address size: %6\n" msgstr "" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, c-format msgid "unsupported address size" msgstr "" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, c-format msgid "" " Segment size: %6\n" "\n" msgstr "" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, c-format msgid " %s..%s (%)\n" msgstr "" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, c-format msgid " %s..%s\n" msgstr "" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr "" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, c-format msgid " [%6tx] empty list\n" msgstr "" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr "" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr "" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +msgid " \n" +msgstr "" + +#: src/readelf.c:5493 #, c-format msgid "cannot get ELF: %s" msgstr "" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" "Call frame information section [%2zu] '%s' at offset %#:\n" msgstr "" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" " [%6tx] Zero terminator\n" msgstr "" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, c-format msgid "invalid augmentation length" msgstr "" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "" -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "" -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr "" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr "" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr "" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5003,7 +5257,7 @@ msgid "" " [Offset]\n" msgstr "" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5012,7 +5266,7 @@ msgid "" " Type signature: %#, Type offset: %#\n" msgstr "" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5020,32 +5274,32 @@ msgid "" "%, Offset size: %\n" msgstr "" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, c-format msgid "" "\n" @@ -5053,12 +5307,12 @@ msgid "" "\n" msgstr "" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5075,238 +5329,248 @@ msgid "" "Opcodes:\n" msgstr "" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" msgstr "" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" " Entry Dir Time Size Name" msgstr "" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" msgstr "" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr "" -#: src/readelf.c:6421 +#: src/readelf.c:6763 msgid " end of sequence" msgstr "" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, c-format msgid " set address to %s\n" msgstr "" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr "" -#: src/readelf.c:6477 +#: src/readelf.c:6827 msgid " unknown opcode" msgstr "" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr "" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr "" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, c-format msgid " advance address by %u to %s\n" msgstr "" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr "" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr "" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr "" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr "" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr "" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr "" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, c-format msgid " advance address by constant %u to %s\n" msgstr "" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr "" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr "" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr "" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr "" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr "" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr "" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr "" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "" + +#: src/readelf.c:7334 #, c-format msgid " Offset: 0x%\n" msgstr "" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, c-format msgid " Version: %\n" msgstr "" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, c-format msgid " Flag: 0x%\n" msgstr "" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, c-format msgid " Offset length: %\n" msgstr "" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, c-format msgid " .debug_line offset: 0x%\n" msgstr "" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, c-format msgid " extension opcode table, % items:\n" msgstr "" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, c-format msgid " % arguments:" msgstr "" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5314,47 +5578,47 @@ msgid "" " %*s String\n" msgstr "" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr "" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" msgstr "" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" msgstr "" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr "" -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr "" -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr "" -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" msgstr "" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5363,809 +5627,964 @@ msgid "" " Action: %u\n" msgstr "" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, c-format msgid "" "\n" "GDB section [%2zu] '%s' at offset %# contains % bytes :\n" msgstr "" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, c-format msgid " Version: %\n" msgstr "" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, c-format msgid " CU offset: %#\n" msgstr "" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, c-format msgid " TU offset: %#\n" msgstr "" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, c-format msgid " address offset: %#\n" msgstr "" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, c-format msgid " symbol offset: %#\n" msgstr "" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, c-format msgid " constant offset: %#\n" msgstr "" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, c-format msgid "" "\n" " CU list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, c-format msgid "" "\n" " TU list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, c-format msgid "" "\n" " Address list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, c-format msgid "" "\n" " Symbol table at offset %# contains %zu slots:\n" msgstr "" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" "%*s... ..." msgstr "" -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr "" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr "" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" "Note section [%2zu] '%s' of % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" "Note segment of % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9083 +#: src/readelf.c:9501 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Section [%zu] '%s' has no data to dump.\n" msgstr "" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9518 src/readelf.c:9559 #, c-format -msgid "cannot get data for section [%Zu] '%s': %s" +msgid "cannot get data for section [%zu] '%s': %s" msgstr "" -#: src/readelf.c:9093 +#: src/readelf.c:9523 #, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9106 +#: src/readelf.c:9528 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" msgstr "" -#: src/readelf.c:9116 +#: src/readelf.c:9542 #, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" -#: src/readelf.c:9164 +#: src/readelf.c:9564 +#, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" +msgstr "" + +#: src/readelf.c:9569 +#, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" +msgstr "" + +#: src/readelf.c:9618 #, c-format msgid "" "\n" "section [%lu] does not exist" msgstr "" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" "section '%s' does not exist" msgstr "" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" "Archive '%s' has no symbol index\n" msgstr "" -#: src/readelf.c:9257 +#: src/readelf.c:9711 #, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" -#: src/readelf.c:9275 +#: src/readelf.c:9729 #, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" +msgid "cannot extract member at offset %zu in '%s': %s" msgstr "" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" msgstr "" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "" -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr "" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "" + +#: src/stack.c:494 +#, c-format +msgid "Cannot open core file '%s'" +msgstr "" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "" + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "" + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "" + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "" + +#: src/stack.c:644 +msgid "Show stack of process PID" +msgstr "" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "" + +#: src/stack.c:651 +msgid "Output selection options:" +msgstr "" + +#: src/stack.c:653 +msgid "Additionally show frame activation" +msgstr "" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "" + +#: src/stack.c:662 +msgid "Additionally show source file information" +msgstr "" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "" + +#: src/strings.c:66 msgid "Output Selection:" msgstr "" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" msgstr "" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "" -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "" -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "" -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "" -#: src/strings.c:596 +#: src/strings.c:600 #, c-format -msgid "lseek64 failed" +msgid "lseek failed" msgstr "" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "" -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "" -#: src/strip.c:468 +#: src/strip.c:384 +#, c-format +msgid "%s: no support for stripping archive" +msgstr "" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, c-format +msgid "cannot get number of phdrs" +msgstr "" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "" -#: src/strip.c:1752 +#: src/strip.c:1861 #, c-format msgid "bad relocation" msgstr "" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, c-format msgid "while writing '%s'" msgstr "" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, c-format +msgid "cannot get number of program headers: %s" +msgstr "" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" +msgid "unexpected section type in [%zu] with sh_link to symtab" msgstr "" -#: src/unstrip.c:771 +#: src/unstrip.c:809 #, c-format -msgid "invalid string offset in symbol [%Zu]" +msgid "invalid string offset in symbol [%zu]" msgstr "" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:967 src/unstrip.c:1313 #, c-format -msgid "cannot read section [%Zu] name: %s" +msgid "cannot read section [%zu] name: %s" msgstr "" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 +#, c-format +msgid "overflow with shnum = %zu in '%s' section" +msgstr "" + +#: src/unstrip.c:1108 src/unstrip.c:1433 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" +msgid "cannot find matching section for [%zu] '%s'" msgstr "" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1551 +#: src/unstrip.c:1618 #, c-format -msgid "symbol [%Zu] has invalid section index" +msgid "symbol [%zu] has invalid section index" msgstr "" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, c-format msgid "cannot read section data: %s" msgstr "" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6191,3 +6610,15 @@ msgid "" "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." msgstr "" + +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "" + +#: tests/dwflmodtest.c:213 +msgid "Additionally show function names" +msgstr "" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "" diff --git a/po/en@boldquot.gmo b/po/en@boldquot.gmo index 5f177e7..230f3e7 100644 Binary files a/po/en@boldquot.gmo and b/po/en@boldquot.gmo differ diff --git a/po/en@boldquot.po b/po/en@boldquot.po index 9bc2a9e..3918ba1 100644 --- a/po/en@boldquot.po +++ b/po/en@boldquot.po @@ -1,7 +1,7 @@ # English translations for elfutils package. -# Copyright (C) 2014 Red Hat, Inc. +# Copyright (C) 2016 Red Hat, Inc. # This file is distributed under the same license as the elfutils package. -# Automatically generated, 2014. +# Automatically generated, 2016. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation @@ -30,10 +30,10 @@ # msgid "" msgstr "" -"Project-Id-Version: elfutils 0.160\n" +"Project-Id-Version: elfutils 0.165\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" -"PO-Revision-Date: 2014-08-27 11:26+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" +"PO-Revision-Date: 2016-01-11 08:48+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en@boldquot\n" @@ -42,8 +42,35 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" +"colorize the output. WHEN defaults to ‘always’ or can be ‘auto’ " +"or ‘never’" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" +"%s: invalid argument ‘%s’ for ‘--color’\n" +"valid arguments are:\n" +" - 'always', 'yes', ‘force’\n" +" - 'never', 'no', ‘none’\n" +" - 'auto', 'tty', ‘if-tty’\n" + +#: lib/color.c:190 src/objdump.c:738 +#, c-format +msgid "cannot allocate memory" +msgstr "cannot allocate memory" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "memory exhausted" @@ -53,7 +80,7 @@ msgstr "memory exhausted" msgid "no error" msgstr "no error" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "out of memory" @@ -92,7 +119,7 @@ msgstr "error during output of data" msgid "no backend support available" msgstr "no backend support available" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "unknown error" @@ -118,122 +145,134 @@ msgid "no DWARF information" msgstr "no DWARF information" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "cannot decompress DWARF" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "no ELF file" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "cannot get ELF header" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "not implemented" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "invalid command" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "invalid version" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "invalid file" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "no entries found" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "invalid DWARF" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "no string data" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "no address value" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "no constant value" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "no reference value" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "invalid reference value" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr ".debug_line section missing" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "invalid .debug_line section" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "debug information too big" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "invalid DWARF version" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "invalid directory index" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "address out of range" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "no location list value" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "no block data" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "invalid line index" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "invalid address range index" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "no matching address range" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "no flag value" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "invalid offset" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr ".debug_ranges section missing" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "invalid CFI section" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "no alternative debug link found" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +msgid "invalid opcode" +msgstr "invalid opcode" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "not a CU (unit) DIE" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "Input selection options:" @@ -265,7 +304,7 @@ msgstr "Find addresses in the running kernel" msgid "Kernel with all modules" msgstr "Kernel with all modules" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "Search path for separate debuginfo files" @@ -290,7 +329,11 @@ msgstr "cannot find kernel or modules" msgid "cannot read ELF core file: %s" msgstr "cannot read ELF core file: %s" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +msgid "Not enough memory" +msgstr "Not enough memory" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "No modules recognized in core file" @@ -446,82 +489,82 @@ msgstr "Invalid argument" msgid "Not an ET_CORE ELF file" msgstr "Not an ET_CORE ELF file" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "No backend" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr ": %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, c-format msgid "unknown SDT version %u\n" msgstr "unknown SDT version %u\n" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, c-format msgid "invalid SDT probe descriptor\n" msgstr "invalid SDT probe descriptor\n" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr " PC: " -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr " Base: " -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr " Semaphore: " -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr " Provider: " -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr " Name: " -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr " Args: " -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " Build ID: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr " Linker version: %.*s\n" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " OS: %s, ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "Stand alone" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr ": %d" @@ -546,7 +589,7 @@ msgstr "invalid size of source operand" msgid "invalid size of destination operand" msgstr "invalid size of destination operand" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "invalid encoding" @@ -627,8 +670,8 @@ msgstr "data/scn mismatch" msgid "invalid section header" msgstr "invalid section header" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "invalid data" @@ -671,39 +714,75 @@ msgstr "" msgid "file has no program header" msgstr "file has no program header" +#: libelf/elf_error.c:237 +msgid "invalid section type" +msgstr "invalid section type" + +#: libelf/elf_error.c:242 +msgid "invalid section flags" +msgstr "invalid section flags" + +#: libelf/elf_error.c:247 +msgid "section does not contain compressed data" +msgstr "section does not contain compressed data" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "section contains compressed data" + +#: libelf/elf_error.c:257 +msgid "unknown compression type" +msgstr "unknown compression type" + +#: libelf/elf_error.c:262 +msgid "cannot compress data" +msgstr "cannot compress data" + +#: libelf/elf_error.c:267 +msgid "cannot decompress data" +msgstr "cannot decompress data" + #: src/addr2line.c:58 -msgid "Output selection options:" -msgstr "Output selection options:" +msgid "Input format options:" +msgstr "Input format options:" + +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." +msgstr "Treat addresses as offsets relative to NAME section." + +#: src/addr2line.c:62 +msgid "Output format options:" +msgstr "Output format options:" + +#: src/addr2line.c:63 +msgid "Print address before each entry" +msgstr "Print address before each entry" -#: src/addr2line.c:59 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Show only base names of source files" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "Show absolute file names using compilation directory" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "Also show function names" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "Also show symbol or section names" -#: src/addr2line.c:64 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "Also show symbol and the section names" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "Also show line table flags" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "Treat addresses as offsets relative to NAME section." - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." @@ -711,25 +790,33 @@ msgstr "" "Show all source locations that caused inline expansion of subroutines at the " "address." -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "Show demangled symbols (ARG is always ignored)" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "Print all information on one line, and indent inlines" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Miscellaneous:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" "Locate source files and line information for ADDRs (in a.out by default)." -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[ADDR...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -740,283 +827,296 @@ msgstr "" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "Written by %s.\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "Section syntax requires exactly one module" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "offset %# lies outside section ‘%s’" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "cannot find symbol ‘%s’" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "offset %# lies outside contents of ‘%s’" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "Commands:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Delete files from archive." -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Move files in archive." -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Print files in archive." -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Quick append files to archive." -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Replace existing or insert new file into archive." -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Display content of archive." -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Extract files from archive." -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Command Modifiers:" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Preserve original dates." -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Use instance [COUNT] of name." -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Do not replace existing files with extracted files." -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Allow filename to be truncated if necessary." -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Provide verbose output." -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Force regeneration of symbol table." -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Insert file after [MEMBER]." -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Insert file before [MEMBER]." -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "Same as -b." -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Suppress message when library has to be created." -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Use full path for file matching." -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Update only older files in archive." -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Create, modify, and extract from archives." -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[MEMBER] [COUNT] ARCHIVE [FILE...]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "" "'a', 'b', and ‘i’ are only allowed with the ‘m’ and ‘r’ " "options" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "MEMBER parameter required for 'a', 'b', and ‘i’ modifiers" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "‘N’ is only meaningful with the ‘x’ and ‘d’ options" -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "COUNT parameter required" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "invalid COUNT parameter %s" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "‘%c’ is only meaningful with the ‘x’ option" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "archive name required" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "command option required" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "More than one operation specified" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "cannot open archive ‘%s’" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "cannot open archive '%s': %s" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: not an archive file" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "cannot stat archive ‘%s’" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "no entry %s in archive\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "cannot create hash table" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "cannot insert into hash table" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "cannot stat ‘%s’" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "cannot read content of %s: %s" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "cannot open %.*s" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "failed to write %s" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "cannot change mode of %s" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "cannot change modification time of %s" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "cannot rename temporary file to %.*s" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "cannot create new file" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "position member %s not found" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: no entry %s in archive!\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "cannot open %s" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "cannot stat %s" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "%s is no regular file" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "cannot get ELF descriptor for %s: %s\n" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "cannot read %s: %s" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "Use zero for uid, gid, and date in archive members." + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "Use actual uid, gid, and date in archive members." + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "%s (default)" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1097,140 +1197,145 @@ msgstr "cannot get program header count of '%s': %s" msgid "%s %s diff: program header count" msgstr "%s %s diff: program header count" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "%s %s differ: section [%zu], [%zu] name" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "%s %s differ: section [%zu] ‘%s’ header" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "cannot get content of section %zu in '%s': %s" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "symbol table [%zu] in ‘%s’ has zero sh_entsize" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "cannot get symbol in '%s': %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "%s %s differ: symbol table [%zu]" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s differ: symbol table [%zu,%zu]" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "%s %s differ: section [%zu] ‘%s’ number of notes" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "cannot read note section [%zu] ‘%s’ in '%s': %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s differ: section [%zu] ‘%s’ note name" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "%s %s differ: section [%zu] ‘%s’ note ‘%s’ type" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s differ: build ID length" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s differ: build ID content" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "%s %s differ: section [%zu] ‘%s’ note ‘%s’ content" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s differ: section [%zu] ‘%s’ content" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s differ: section [%zu,%zu] ‘%s’ content" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s differ: unequal amount of important sections" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "cannot load data of '%s': %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "cannot get program header entry %d of '%s': %s" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s differ: program header %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "%s %s differ: gap" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Invalid value ‘%s’ for --gaps parameter." -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "cannot open ‘%s’" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "cannot create ELF descriptor for '%s': %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "cannot create EBL descriptor for ‘%s’" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "cannot get section header of section %zu: %s" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "cannot get content of section %zu: %s" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "cannot get relocation: %s" @@ -1259,11 +1364,11 @@ msgstr "" msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "Pedantic checking of ELF files compliance with gABI/psABI spec." -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "FILE..." -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "cannot open input file" @@ -1282,7 +1387,7 @@ msgstr "error while closing Elf descriptor: %s\n" msgid "No errors" msgstr "No errors" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "Missing file name.\n" @@ -1411,7 +1516,7 @@ msgstr "invalid section header size: %hd\n" msgid "invalid section header position or size\n" msgstr "invalid section header position or size\n" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1420,7 +1525,7 @@ msgstr "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " "group\n" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1428,14 +1533,14 @@ msgstr "" "section [%2d] '%s': section group [%2zu] ‘%s’ does not precede group " "member\n" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "section [%2d] '%s': cannot get section data\n" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1444,7 +1549,7 @@ msgstr "" "section [%2d] '%s': referenced as string table for section [%2d] ‘%s’ " "but type is not SHT_STRTAB\n" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1453,38 +1558,38 @@ msgstr "" "section [%2d] '%s': symbol table cannot have more than one extended index " "section\n" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "section [%2d] '%s': cannot get symbol %d: %s\n" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "section [%2d] '%s': ‘%s’ in zeroth entry not zero\n" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "section [%2d] '%s': XINDEX for zeroth entry not zero\n" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "section [%2d] '%s': cannot get symbol %zu: %s\n" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "section [%2d] '%s': symbol %zu: invalid name value\n" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1493,7 +1598,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: too large section index but no extended " "section index section\n" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1502,51 +1607,51 @@ msgstr "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " "st_shndx (%)\n" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "section [%2d] '%s': symbol %zu: invalid section index\n" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "section [%2d] '%s': symbol %zu: unknown type\n" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "section [%2d] '%s': symbol %zu: unknown symbol binding\n" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" msgstr "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "section [%2d] '%s': symbol %zu: st_value out of bounds\n" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1555,7 +1660,7 @@ msgstr "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " "[%2d] ‘%s’\n" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1564,7 +1669,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: referenced section [%2d] ‘%s’ does not " "have SHF_TLS flag set\n" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1573,14 +1678,23 @@ msgstr "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " "[%2d] ‘%s’\n" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1589,7 +1703,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " "‘%s’\n" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1598,7 +1712,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " "sh_info\n" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1607,12 +1721,12 @@ msgstr "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " "sh_info\n" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "section [%2d] '%s': symbol %zu: non-local section symbol\n" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1621,7 +1735,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " "[%2d]\n" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1630,7 +1744,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] ‘" "%s’\n" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1639,7 +1753,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " "match %s section address %#\n" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1648,7 +1762,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " "match %s section size %\n" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1657,7 +1771,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " "section\n" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1666,7 +1780,7 @@ msgstr "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " "segment address %#\n" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1675,7 +1789,7 @@ msgstr "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " "segment size %\n" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1684,22 +1798,27 @@ msgstr "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" "default visibility\n" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" #: src/elflint.c:1082 #, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "section [%2d] '%s': cannot get section data.\n" + +#: src/elflint.c:1098 +#, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1708,7 +1827,7 @@ msgstr "" "section [%2d] '%s': relative relocations after index %d as specified by " "DT_RELCOUNT\n" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1717,47 +1836,49 @@ msgstr "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " "specified %d relative relocations\n" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "section [%2d] '%s': invalid destination section index\n" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "section [%2d] '%s': invalid destination section type\n" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "section [%2d] '%s': sh_info should be zero\n" -#: src/elflint.c:1245 +#: src/elflint.c:1263 #, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" -msgstr "section [%2d] '%s': no relocations for merge-able sections possible\n" +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" +msgstr "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "text relocation flag set but there is no read-only segment\n" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "section [%2d] '%s': relocation %zu: invalid type\n" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1766,12 +1887,12 @@ msgstr "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " "type\n" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "section [%2d] '%s': relocation %zu: invalid symbol index\n" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1780,12 +1901,12 @@ msgstr "" "section [%2d] '%s': relocation %zu: only symbol " "‘_GLOBAL_OFFSET_TABLE_’ can be used with %s\n" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "section [%2d] '%s': relocation %zu: offset out of bounds\n" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1794,7 +1915,7 @@ msgstr "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " "%s\n" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1803,64 +1924,73 @@ msgstr "" "section [%2d] '%s': relocation %zu: read-only section modified but text " "relocation flag not set\n" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "section [%2d] '%s': relocations are against loaded and unloaded data\n" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "section [%2d] '%s': cannot get relocation %zu: %s\n" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "more than one dynamic section present\n" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" +"section [%2d]: referenced as string table for section [%2d] ‘%s’ but " +"section link value is invalid\n" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "section [%2d] '%s': sh_info not zero\n" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "section [%2d] '%s': entry %zu: unknown tag\n" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "section [%2d] '%s': entry %zu: level 2 tag %s used\n" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -1869,14 +1999,14 @@ msgstr "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] ‘%s’ referenced by sh_link\n" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -1885,71 +2015,76 @@ msgstr "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] ‘%s’\n" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "section [%2d] '%s': contains %s entry but not %s\n" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "section [%2d] '%s': mandatory tag %s not present\n" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "section [%2d] '%s': no hash section present\n" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "section [%2d] '%s': not all of %s, %s, and %s are present\n" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "section [%2d] '%s': %s tag missing in prelinked executable\n" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" "section [%2d] '%s': only relocatable files can have extended section index\n" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" "section [%2d] '%s': extended section index section not for symbol table\n" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "cannot get data for symbol section\n" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "section [%2d] '%s': entry size does not match Elf32_Word\n" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "section [%2d] '%s': extended index table too small for symbol table\n" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -1958,54 +2093,59 @@ msgstr "" "section [%2d] '%s': extended section index in section [%2zu] ‘%s’ " "refers to same symbol table\n" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "symbol 0 should have zero extended section index\n" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "cannot get data for symbol %zu\n" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "extended section index is % but symbol index is not XINDEX\n" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "section [%2d] '%s': chain array too large\n" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "section [%2d] '%s': hash bucket reference %zu out of bounds\n" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "section [%2d] '%s': hash chain reference %zu out of bounds\n" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "section [%2d] '%s': hash chain reference % out of bounds\n" -#: src/elflint.c:2081 +#: src/elflint.c:2107 +#, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "section [%2d] '%s': not enough data\n" + +#: src/elflint.c:2119 #, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" -msgstr "section [%2d] '%s': bitmask size not power of 2: %u\n" +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" +msgstr "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" -#: src/elflint.c:2092 +#: src/elflint.c:2135 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " @@ -2014,19 +2154,19 @@ msgstr "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "section [%2d] '%s': 2nd hash function shift too big: %u\n" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2035,51 +2175,63 @@ msgstr "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "section [%2d] '%s': bitmask does not match names in the hash table\n" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "section [%2d] '%s': relocatable files cannot have hash tables\n" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "section [%2d] '%s': hash table not for dynamic symbol table\n" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "section [%2d] '%s': hash table entry size incorrect\n" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "section [%2d] '%s': not marked to be allocated\n" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2088,19 +2240,48 @@ msgstr "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" "sh_link in hash sections [%2zu] ‘%s’ and [%2zu] ‘%s’ not " "identical\n" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "hash section [%2zu] ‘%s’ does not contain enough data\n" + +#: src/elflint.c:2409 +#, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "hash section [%2zu] ‘%s’ has zero bit mask words\n" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "hash section [%2zu] ‘%s’ uses too much data\n" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" +"hash section [%2zu] ‘%s’ invalid symbol index % (max_nsyms: " +"%, nentries: %\n" + +#: src/elflint.c:2522 +#, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "hash section [%2zu] ‘%s’ invalid sh_entsize\n" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "section [%2zu] '%s': reference to symbol index 0\n" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2109,7 +2290,7 @@ msgstr "" "symbol %d referenced in new hash table in [%2zu] ‘%s’ but not in old " "hash table in [%2zu] ‘%s’\n" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2118,114 +2299,119 @@ msgstr "" "symbol %d referenced in old hash table in [%2zu] ‘%s’ but not in new " "hash table in [%2zu] ‘%s’\n" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "section [%2d] '%s': nonzero sh_%s for NULL section\n" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "section [%2d] '%s': cannot get symbol table: %s\n" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "section [%2d] '%s': section reference in sh_link is no symbol table\n" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "section [%2d] '%s': invalid symbol index in sh_info\n" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "section [%2d] '%s': sh_flags not zero\n" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "section [%2d] '%s': cannot get symbol for signature\n" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "section [%2d] '%s': cannot get symbol name for signature\n" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "section [%2d] '%s': signature symbol cannot be empty string\n" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "section [%2d] '%s': sh_flags not set correctly\n" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "section [%2d] '%s': cannot get data: %s\n" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "section [%2d] '%s': section group without flags word\n" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "section [%2d] '%s': section group without member\n" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "section [%2d] '%s': section group with only one member\n" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "section [%2d] '%s': unknown section group flags\n" -#: src/elflint.c:2538 +#: src/elflint.c:2693 #, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" -msgstr "section [%2d] '%s': section index %Zu out of range\n" +msgid "section [%2d] '%s': section index %zu out of range\n" +msgstr "section [%2d] '%s': section index %zu out of range\n" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "section [%2d] '%s': cannot get section header for element %zu: %s\n" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "" "section [%2d] '%s': section group contains another group [%2d] ‘%s’\n" -#: src/elflint.c:2560 +#: src/elflint.c:2715 #, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -"section [%2d] '%s': element %Zu references section [%2d] ‘%s’ without " +"section [%2d] '%s': element %zu references section [%2d] ‘%s’ without " "SHF_GROUP flag set\n" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "section [%2d] ‘%s’ is contained in more than one section group\n" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2234,7 +2420,7 @@ msgstr "" "section [%2d] ‘%s’ refers in sh_link to section [%2d] ‘%s’ which " "is no dynamic symbol table\n" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2243,76 +2429,76 @@ msgstr "" "section [%2d] ‘%s’ has different number of entries than symbol table " "[%2d] ‘%s’\n" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "section [%2d] '%s': symbol %d: cannot read version data\n" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "section [%2d] '%s': symbol %d: local symbol with global scope\n" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "section [%2d] '%s': symbol %d: local symbol with version\n" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "section [%2d] '%s': symbol %d: invalid version index %d\n" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "more than one version reference section present\n" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "section [%2d] '%s': sh_link does not link to string table\n" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "section [%2d] '%s': entry %d has wrong version %d\n" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "section [%2d] '%s': entry %d has invalid file reference\n" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "section [%2d] '%s': entry %d references unknown dependency\n" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2321,7 +2507,7 @@ msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2330,7 +2516,7 @@ msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2339,210 +2525,219 @@ msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name ‘%s’\n" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "section [%2d] '%s': entry %d has invalid offset to next entry\n" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "more than one version definition section present\n" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "section [%2d] '%s': more than one BASE definition\n" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "section [%2d] '%s': entry %d has unknown flag\n" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "section [%2d] '%s': entry %d has invalid name reference\n" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "section [%2d] '%s': entry %d has duplicate version name ‘%s’\n" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "section [%2d] '%s': no BASE definition\n" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "section [%2d] '%s': unknown parent version ‘%s’\n" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "section [%2d] '%s': empty object attributes section\n" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "section [%2d] '%s': unrecognized attribute format\n" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "section [%2d] '%s': offset %zu: invalid length in attribute section\n" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "section [%2d] '%s': offset %zu: unterminated vendor name string\n" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "section [%2d] '%s': offset %zu: truncated attribute section\n" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "section [%2d] '%s': offset %zu: unterminated string in attribute\n" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "section [%2d] '%s': offset %zu: vendor ‘%s’ unknown\n" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "cannot get section header of zeroth section\n" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "zeroth section has nonzero name\n" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "zeroth section has nonzero type\n" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "zeroth section has nonzero flags\n" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "zeroth section has nonzero address\n" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "zeroth section has nonzero offset\n" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "zeroth section has nonzero align value\n" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "zeroth section has nonzero entry size value\n" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2551,7 +2746,7 @@ msgstr "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2560,7 +2755,7 @@ msgstr "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2569,27 +2764,27 @@ msgstr "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "cannot get section header for section [%2zu] '%s': %s\n" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "section [%2zu]: invalid name\n" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "section [%2d] ‘%s’ has wrong type: expected %s, is %s\n" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "section [%2zu] ‘%s’ has wrong flags: expected %s, is %s\n" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" @@ -2597,12 +2792,12 @@ msgstr "" "section [%2zu] ‘%s’ has wrong flags: expected %s and possibly %s, is " "%s\n" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "section [%2zu] ‘%s’ present in object file\n" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" @@ -2610,7 +2805,7 @@ msgstr "" "section [%2zu] ‘%s’ has SHF_ALLOC flag set but there is no loadable " "segment\n" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2619,7 +2814,7 @@ msgstr "" "section [%2zu] ‘%s’ has SHF_ALLOC flag not set but there are loadable " "segments\n" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" @@ -2627,22 +2822,22 @@ msgstr "" "section [%2zu] ‘%s’ is extension section index table in non-object " "file\n" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "section [%2zu] '%s': size not multiple of entry size\n" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "cannot get section header\n" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "section [%2zu] ‘%s’ has unsupported type %d\n" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" @@ -2650,48 +2845,70 @@ msgstr "" "section [%2zu] ‘%s’ contains invalid processor-specific flag(s) " "%#\n" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "section [%2zu] ‘%s’ contains unknown flag(s) %#\n" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "section [%2zu] '%s': thread-local data sections address not zero\n" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "section [%2zu] '%s': allocated section cannot be compressed\n" + +#: src/elflint.c:3918 +#, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "section [%2zu] '%s': nobits section cannot be compressed\n" + +#: src/elflint.c:3924 +#, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "section [%2zu] '%s': invalid section reference in link value\n" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "section [%2zu] '%s': invalid section reference in info value\n" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "section [%2zu] '%s': strings flag set without merge flag\n" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "section [%2zu] '%s': merge flag set but entry size is zero\n" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" "section [%2zu] ‘%s’ has unexpected type %d for an executable section\n" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "section [%2zu] ‘%s’ must be of type NOBITS in debuginfo files\n" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "section [%2zu] ‘%s’ is both executable and writable\n" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -2700,7 +2917,7 @@ msgstr "" "section [%2zu] ‘%s’ not fully contained in segment of program header " "entry %d\n" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -2709,7 +2926,16 @@ msgstr "" "section [%2zu] ‘%s’ has type NOBITS but is read from the file in " "segment of program header entry %d\n" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" +"section [%2zu] ‘%s’ has type NOBITS but is read from the file in " +"segment of program header entry %d and file contents is non-zero\n" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -2718,24 +2944,24 @@ msgstr "" "section [%2zu] ‘%s’ has not type NOBITS but is not read from the file " "in segment of program header entry %d\n" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "section [%2zu] ‘%s’ is executable in nonexecutable segment %d\n" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "section [%2zu] ‘%s’ is writable in unwritable segment %d\n" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -2744,36 +2970,36 @@ msgstr "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "more than one version symbol table present\n" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "INTERP program header entry but no .interp section\n" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" "loadable segment [%u] is executable but contains no executable sections\n" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "loadable segment [%u] is writable but contains no writable sections\n" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -2782,194 +3008,201 @@ msgstr "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "duplicate version index %d\n" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "phdr[%d]: unknown core file note type % at offset %\n" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" -msgstr "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" +msgstr "phdr[%d]: unknown object file note type % at offset %zu\n" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: no note entries defined for the type of file\n" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: cannot get content of note section: %s\n" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: extra % bytes after last note\n" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "section [%2d] '%s': no note entries defined for the type of file\n" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "section [%2d] '%s': cannot get content of note section\n" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "section [%2d] '%s': extra % bytes after last note\n" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" "only executables, shared objects, and core files can have program headers\n" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "cannot get program header entry %d: %s\n" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "program header entry %d: unknown program header entry type %#\n" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "more than one INTERP entry in program header\n" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "more than one TLS entry in program header\n" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "static executable cannot have dynamic sections\n" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "dynamic section reference in program header has wrong offset\n" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "dynamic section size mismatch in program and section header\n" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "more than one GNU_RELRO entry in program header\n" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "loadable segment GNU_RELRO applies to is not writable\n" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "%s segment not contained in a loaded segment\n" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "program header offset in ELF header and PHDR entry do not match" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "call frame search table reference in program header has wrong offset\n" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "call frame search table size mismatch in program and section header\n" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "call frame search table must be allocated\n" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "section [%2zu] ‘%s’ must be allocated\n" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "call frame search table must not be writable\n" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "section [%2zu] ‘%s’ must not be writable\n" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "call frame search table must not be executable\n" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "section [%2zu] ‘%s’ must not be executable\n" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "program header entry %d: file size greater than memory size\n" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "program header entry %d: alignment not a power of 2\n" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -2978,7 +3211,7 @@ msgstr "" "program header entry %d: file offset and virtual address not module of " "alignment\n" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -2987,12 +3220,12 @@ msgstr "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "cannot read ELF header: %s\n" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "text relocation flag set but not needed\n" @@ -3013,8 +3246,8 @@ msgstr "Use PATH as root of debuginfo hierarchy" msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "Locate source of text relocations in FILEs (a.out by default)." -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "[FILE...]" @@ -3048,32 +3281,32 @@ msgstr "no text relocations reported in ‘%s’" msgid "while reading ELF file" msgstr "while reading ELF file" -#: src/findtextrel.c:334 src/findtextrel.c:351 +#: src/findtextrel.c:329 #, c-format -msgid "cannot get program header index at offset %d: %s" -msgstr "cannot get program header index at offset %d: %s" +msgid "cannot get program header count: %s" +msgstr "cannot get program header count: %s" -#: src/findtextrel.c:403 +#: src/findtextrel.c:340 src/findtextrel.c:357 #, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "cannot get section header of section %Zu: %s" +msgid "cannot get program header index at offset %zd: %s" +msgstr "cannot get program header index at offset %zd: %s" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "cannot get symbol table section %zu in '%s': %s" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "cannot get relocation at index %d in section %zu in '%s': %s" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "%s not compiled with -fpic/-fPIC\n" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" @@ -3081,7 +3314,7 @@ msgstr "" "the file containing the function ‘%s’ is not compiled with -fpic/-" "fPIC\n" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3090,7 +3323,7 @@ msgstr "" "the file containing the function ‘%s’ might not be compiled with -" "fpic/-fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3099,7 +3332,7 @@ msgstr "" "either the file containing the function ‘%s’ or the file containing " "the function ‘%s’ is not compiled with -fpic/-fPIC\n" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3131,339 +3364,339 @@ msgstr "cannot allocate GOTPLT section: %s" msgid "initial-executable TLS relocation cannot be used " msgstr "initial-executable TLS relocation cannot be used " -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "Input File Control:" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "Include whole archives in the output from now on." -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "Stop including the whole archives in the output." -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "FILE" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "Start a group." -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "End a group." -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "PATH" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "Add PATH to list of directories files are searched in." -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "Only set DT_NEEDED for following dynamic libs if actually used" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "Always set DT_NEEDED for following dynamic libs" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "Ignore LD_LIBRARY_PATH environment variable." -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "Output File Control:" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "Place output in FILE." -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "Object is marked to not use default search path at runtime." -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "Same as --whole-archive." -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" "Default rules of extracting from archive; weak references are not enough." -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "Weak references cause extraction from archive." -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "Allow multiple definitions; first is used." -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "Disallow/allow undefined symbols in DSOs." -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "Object requires immediate handling of $ORIGIN." -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "Relocation will not be processed lazily." -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "Object cannot be unloaded at runtime." -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "Mark object to be initialized first." -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "Enable/disable lazy-loading flag for following dependencies." -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "Mark object as not loadable with 'dlopen'." -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "Ignore/record dependencies on unused DSOs." -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "Generated DSO will be a system library." -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "ADDRESS" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "Set entry point address." -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "Do not link against shared libraries." -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "Prefer linking against shared libraries." -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "Export all dynamic symbols." -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "Strip all symbols." -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "Strip debugging symbols." -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "Assume pagesize for the target system to be SIZE." -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "Set runtime DSO search path." -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "Set link time DSO search path." -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "Generate dynamic shared object." -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "Generate relocatable object." -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "Causes symbol not assigned to a version be reduced to local." -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "Remove unused sections." -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "Don't remove unused sections." -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "Set soname of shared object." -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "Set the dynamic linker name." -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "Add/suppress addition indentifying link-editor to .comment section." -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "Create .eh_frame_hdr section" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "Set hash style to sysv, gnu or both." -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "Generate build ID note (md5, sha1 (default), uuid)." -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "Linker Operation Control:" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "Verbose messages." -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "Trace file opens." -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "Trade speed for less memory usage" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "LEVEL" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "Set optimization level to LEVEL." -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "Use linker script in FILE." -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "Select to get parser debug information" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "Read version information from FILE." -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "Set emulation to NAME." -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "Combine object and archive files." -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "[FILE]..." -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "At least one input file needed" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "error while preparing linking" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "cannot open linker script ‘%s’" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( without matching -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "only one option of -G and -r is allowed" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "more than one ‘-m’ parameter" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "unknown option ‘-%c %s’" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "invalid page size value '%s': ignored" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "invalid hash style ‘%s’" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "invalid build-ID style ‘%s’" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "More than one output file name given." -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "Invalid optimization level ‘%s’" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "nested -( -) groups are not allowed" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "-) without matching -(" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "unknown option ‘-%c %s’" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "could not find input file to determine output file format" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "try again with an appropriate ‘-m’ parameter" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "cannot read version script ‘%s’" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "duplicate definition of ‘%s’ in linker script" @@ -3509,8 +3742,8 @@ msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "" "Warning: size of ‘%s’ changed from % in %s to % in %s" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "cannot determine number of sections: %s" @@ -3746,7 +3979,7 @@ msgstr "internal error: non-nobits section follows nobits section" msgid "cannot get header of 0th section: %s" msgstr "cannot get header of 0th section: %s" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "cannot update ELF header: %s" @@ -3799,9 +4032,10 @@ msgstr "while reading linker script '%s': %s at line %d" #: src/ldscript.y:737 #, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "" -"symbol ‘%s’ is declared both local and global for unnamed version" +"symbol ‘%s’ is declared both local and global for unnamed version ‘" +"%s’" #: src/ldscript.y:739 #, c-format @@ -3814,7 +4048,7 @@ msgstr "" msgid "default visibility set as local and global" msgstr "default visibility set as local and global" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "Output selection:" @@ -3842,7 +4076,7 @@ msgstr "Display only undefined symbols" msgid "Include index for symbols from archive members" msgstr "Include index for symbols from archive members" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "Output format:" @@ -3866,7 +4100,7 @@ msgstr "Same as --format=bsd" msgid "Same as --format=posix" msgstr "Same as --format=posix" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "Use RADIX for printing symbol values" @@ -3878,7 +4112,7 @@ msgstr "Mark special symbols" msgid "Print size of defined symbols" msgstr "Print size of defined symbols" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "Output options:" @@ -3902,27 +4136,27 @@ msgstr "Decode low-level symbol names into source code names" msgid "List symbols from FILEs (a.out by default)." msgstr "List symbols from FILEs (a.out by default)." -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 msgid "Output formatting" msgstr "Output formatting" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 #, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" -msgstr "%s: INTERNAL ERROR %d (%s-%s): %s" +msgid "%s: INTERNAL ERROR %d (%s): %s" +msgstr "%s: INTERNAL ERROR %d (%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "while closing ‘%s’" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: File format not recognized" -#: src/nm.c:460 +#: src/nm.c:457 msgid "" "\n" "Archive index:\n" @@ -3930,42 +4164,42 @@ msgstr "" "\n" "Archive index:\n" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "invalid offset %zu for symbol %s" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "%s in %s\n" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "cannot reset archive offset to beginning" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: file format not recognized" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "cannot create search tree" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "cannot get section header string table index" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -3978,7 +4212,7 @@ msgstr "" "Symbols from %s:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3987,68 +4221,68 @@ msgstr "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" "\n" -#: src/nm.c:1173 +#: src/nm.c:1232 #, c-format -msgid "%s: entry size in section `%s' is not what we expect" -msgstr "%s: entry size in section ‘%s’ is not what we expect" +msgid "%s: entry size in section %zd `%s' is not what we expect" +msgstr "%s: entry size in section %zd ‘%s’ is not what we expect" -#: src/nm.c:1177 +#: src/nm.c:1237 #, c-format -msgid "%s: size of section `%s' is not multiple of entry size" -msgstr "%s: size of section ‘%s’ is not multiple of entry size" +msgid "%s: size of section %zd `%s' is not multiple of entry size" +msgstr "%s: size of section %zd ‘%s’ is not multiple of entry size" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: Invalid operation" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: no symbols" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "Mode selection:" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "Display relocation information." -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "Display the full contents of all sections requested" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "Display assembler code of executable sections" -#: src/objdump.c:60 +#: src/objdump.c:59 msgid "Output content selection:" msgstr "Output content selection:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "Only display information for section NAME." -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "Show information from FILEs (a.out by default)." -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "No operation specified.\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "while close ‘%s’" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "INVALID SYMBOL" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "INVALID SECTION" @@ -4067,111 +4301,106 @@ msgstr "" msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "Contents of section %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "cannot disassemble" -#: src/objdump.c:736 -#, c-format -msgid "cannot allocate memory" -msgstr "cannot allocate memory" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "Generate an index to speed access to archives." -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "ARCHIVE" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "Archive name required" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "‘%s’ is no archive" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "error while freeing sub-ELF descriptor: %s" -#: src/readelf.c:71 +#: src/readelf.c:72 msgid "ELF input selection:" msgstr "ELF input selection:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" -#: src/readelf.c:75 +#: src/readelf.c:76 msgid "ELF output selection:" msgstr "ELF output selection:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "All these plus -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "Display the dynamic segment" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "Display the ELF file header" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "Display histogram of bucket list lengths" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "Display the program headers" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "Display relocations" -#: src/readelf.c:85 +#: src/readelf.c:86 msgid "Display the sections' headers" msgstr "Display the sections' headers" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "Display the symbol table" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "Display versioning information" -#: src/readelf.c:89 +#: src/readelf.c:90 msgid "Display the ELF notes" msgstr "Display the ELF notes" -#: src/readelf.c:91 +#: src/readelf.c:92 msgid "Display architecture specific information, if any" msgstr "Display architecture specific information, if any" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "Display sections for exception handling" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "Additional output selection:" -#: src/readelf.c:97 +#: src/readelf.c:98 msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " @@ -4181,166 +4410,174 @@ msgstr "" "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro or exception" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "Dump the uninterpreted contents of SECTION, by number or name" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "Print string contents of sections" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "Display the symbol index of an archive" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "Output control:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Do not find symbol names for addresses in DWARF data" -#: src/readelf.c:112 +#: src/readelf.c:113 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "" "Display just offsets instead of resolving values to addresses in DWARF data" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "Ignored for compatibility (lines always wide)" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "Print information from ELF file in human-readable form." -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Unknown DWARF debug section ‘%s’.\n" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "cannot generate Elf descriptor: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "cannot get section: %s" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "cannot get section header: %s" -#: src/readelf.c:562 +#: src/readelf.c:571 #, c-format msgid "cannot get section name" msgstr "cannot get section name" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "cannot get %s content: %s" -#: src/readelf.c:587 +#: src/readelf.c:596 #, c-format msgid "cannot create temp file '%s'" msgstr "cannot create temp file ‘%s’" -#: src/readelf.c:596 +#: src/readelf.c:605 #, c-format msgid "cannot write section data" msgstr "cannot write section data" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "error while closing Elf descriptor: %s" -#: src/readelf.c:609 +#: src/readelf.c:618 #, c-format msgid "error while rewinding file descriptor" msgstr "error while rewinding file descriptor" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "‘%s’ is not an archive, cannot print archive index" -#: src/readelf.c:742 +#: src/readelf.c:751 #, c-format msgid "No such section '%s' in '%s'" msgstr "No such section ‘%s’ in ‘%s’" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "cannot stat input file" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "input file is empty" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "failed reading '%s': %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "cannot read ELF header: %s" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "cannot create EBL handle" -#: src/readelf.c:835 +#: src/readelf.c:858 #, c-format msgid "cannot determine number of program headers: %s" msgstr "cannot determine number of program headers: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "NONE (None)" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "REL (Relocatable file)" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "EXEC (Executable file)" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "DYN (Shared object file)" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "CORE (Core file)" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "OS Specific: (%x)\n" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Processor Specific: (%x)\n" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " @@ -4348,7 +4585,7 @@ msgstr "" "ELF Header:\n" " Magic: " -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" @@ -4357,117 +4594,117 @@ msgstr "" "\n" " Class: %s\n" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr " Data: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Ident Version: %hhd %s\n" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(current)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr " OS/ABI: %s\n" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr " ABI Version: %hhd\n" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " Type: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr " Machine: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr " Version: %d %s\n" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr " Entry point address: %#\n" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr " Start of program headers: % %s\n" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "(bytes into file)" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr " Start of section headers: % %s\n" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr " Flags: %s\n" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr " Size of this header: % %s\n" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(bytes)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr " Size of program header entries: % %s\n" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr " Number of program headers entries: %" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr " (% in [0].sh_info)" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr " ([0] not available)" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr " Size of section header entries: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr " Number of section headers entries: %" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr " (% in [0].sh_size)" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr " (% in [0].sh_link)" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4476,7 +4713,7 @@ msgstr "" " Section header string table index: XINDEX%s\n" "\n" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" @@ -4485,7 +4722,7 @@ msgstr "" " Section header string table index: %\n" "\n" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4494,11 +4731,11 @@ msgstr "" "There are %d section headers, starting at offset %#:\n" "\n" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "Section Headers:" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4506,7 +4743,7 @@ msgstr "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4514,17 +4751,35 @@ msgstr "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr " [Compression Size Al]" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr " [Compression Size Al]" + +#: src/readelf.c:1213 +#, c-format +msgid "bad compression header for section %zd: %s" +msgstr "bad compression header for section %zd: %s" + +#: src/readelf.c:1224 +#, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "bad gnu compressed size for section %zd: %s" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "Program Headers:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4532,12 +4787,12 @@ msgstr "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Requesting program interpreter: %s]\n" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" @@ -4547,12 +4802,12 @@ msgstr "" " Section to Segment mapping:\n" " Segment Sections..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "cannot get program header: %s" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4569,7 +4824,7 @@ msgstr[1] "" "COMDAT section group [%2zu] ‘%s’ with signature ‘%s’ contains " "%zu entries:\n" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4586,21 +4841,25 @@ msgstr[1] "" "Section group [%2zu] ‘%s’ with signature ‘%s’ contains %zu " "entries:\n" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "Couldn't uncompress section" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 #, c-format -msgid "invalid sh_link value in section %Zu" -msgstr "invalid sh_link value in section %Zu" +msgid "invalid sh_link value in section %zu" +msgstr "invalid sh_link value in section %zu" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4621,36 +4880,36 @@ msgstr[1] "" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘" "%s’\n" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr " Type Value\n" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "Shared library: [%s]\n" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "Library soname: [%s]\n" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "Library rpath: [%s]\n" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "Library runpath: [%s]\n" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "% (bytes)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" @@ -4659,7 +4918,7 @@ msgstr "" "\n" "Invalid symbol table at offset %#0\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4678,7 +4937,7 @@ msgstr[1] "" "Relocation section [%2zu] ‘%s’ for section [%2u] ‘%s’ at offset " "%#0 contains %d entries:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4695,30 +4954,30 @@ msgstr[1] "" "Relocation section [%2u] ‘%s’ at offset %#0 contains %d " "entries:\n" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr " Offset Type Value Name\n" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr " Offset Type Value Name\n" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr " Offset Type Value Addend Name\n" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr "" " Offset Type Value Addend Name\n" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4733,40 +4992,40 @@ msgstr[1] "" "\n" "Symbol table [%2u] ‘%s’ contains %u entries:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" msgstr[0] " %lu local symbol String table: [%2u] ‘%s’\n" msgstr[1] " %lu local symbols String table: [%2u] ‘%s’\n" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Num: Value Size Type Bind Vis Ndx Name\n" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Num: Value Size Type Bind Vis Ndx Name\n" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "bad dynamic symbol" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "none" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| " -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4787,17 +5046,17 @@ msgstr[1] "" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘" "%s’\n" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Version: %hu File: %s Cnt: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Name: %s Flags: %s Version: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4818,17 +5077,17 @@ msgstr[1] "" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘" "%s’\n" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Parent %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4847,15 +5106,15 @@ msgstr[1] "" "Version symbols section [%2u] ‘%s’ contains %d entries:\n" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘%s’" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *local* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -4880,22 +5139,22 @@ msgstr[1] "" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘" "%s’\n" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Length Number % of total Coverage\n" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4904,12 +5163,27 @@ msgstr "" " Average number of tests: successful lookup: %f\n" "\t\t\t unsuccessful lookup: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "cannot get data for section %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "invalid data in sysv.hash section %d" + +#: src/readelf.c:3148 +#, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "invalid data in sysv.hash64 section %d" + +#: src/readelf.c:3206 +#, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "invalid data in gnu.hash section %d" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4918,7 +5192,7 @@ msgstr "" " Symbol Bias: %u\n" " Bitmask Size: %zu bytes %%% bits set 2nd hash shift: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -4935,7 +5209,7 @@ msgstr[1] "" "Library list section [%2zu] ‘%s’ at offset %#0 contains %d " "entries:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4943,7 +5217,7 @@ msgstr "" " Library Time Stamp Checksum Version " "Flags" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -4954,140 +5228,140 @@ msgstr "" "Object attributes section [%2zu] ‘%s’ of % bytes at offset " "%#0:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr " Owner Size\n" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " File: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "empty block" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "%zu byte block:" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# used with different address sizes" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# used with different offset sizes" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, c-format msgid "%s %# used with different base addresses" msgstr "%s %# used with different base addresses" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] ... % bytes ...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -5098,7 +5372,7 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" " [ Code]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" @@ -5107,30 +5381,30 @@ msgstr "" "\n" "Abbreviation section at offset %:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** error while reading abbreviation: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] offset: %, children: %s, tag: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "yes" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "no" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "cannot get .debug_aranges content: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -5145,20 +5419,20 @@ msgstr[1] "" "\n" "DWARF section [%2zu] ‘%s’ at offset %# contains %zu entries:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" @@ -5167,21 +5441,21 @@ msgstr "" "\n" "DWARF section [%2zu] ‘%s’ at offset %#:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4797 src/readelf.c:6494 #, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "invalid data in section [%zu] ‘%s’" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, c-format msgid "" "\n" @@ -5190,32 +5464,32 @@ msgstr "" "\n" " Length: %6\n" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, c-format msgid " DWARF version: %6\n" msgstr " DWARF version: %6\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "unsupported aranges version" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, c-format msgid " CU offset: %6\n" msgstr " CU offset: %6\n" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, c-format msgid " Address size: %6\n" msgstr " Address size: %6\n" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, c-format msgid "unsupported address size" msgstr "unsupported address size" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, c-format msgid "" " Segment size: %6\n" @@ -5224,62 +5498,66 @@ msgstr "" " Segment size: %6\n" "\n" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "unsupported segment size" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, c-format msgid " %s..%s (%)\n" msgstr " %s..%s (%)\n" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" -msgstr " %Zu padding bytes\n" +msgid " %zu padding bytes\n" +msgstr " %zu padding bytes\n" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "cannot get .debug_ranges content: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] base address %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] empty list\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +msgid " \n" +msgstr " \n" + +#: src/readelf.c:5493 #, c-format msgid "cannot get ELF: %s" msgstr "cannot get ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" @@ -5288,7 +5566,7 @@ msgstr "" "\n" "Call frame information section [%2zu] ‘%s’ at offset %#:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" @@ -5297,50 +5575,50 @@ msgstr "" "\n" " [%6tx] Zero terminator\n" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, c-format msgid "invalid augmentation length" msgstr "invalid augmentation length" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "FDE address encoding: " -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "LSDA pointer encoding: " -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr " (offset: %#)" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr " (end offset: %#)" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sLSDA pointer: %#\n" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "cannot get attribute code: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "cannot get attribute form: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "cannot get attribute value: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5351,7 +5629,7 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" " [Offset]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5364,7 +5642,7 @@ msgstr "" "%, Offset size: %\n" " Type signature: %#, Type offset: %#\n" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5375,32 +5653,32 @@ msgstr "" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "cannot get DIE at offset % in section '%s': %s" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "cannot get DIE offset: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "cannot get tag of DIE at offset % in section '%s': %s" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "cannot get next DIE: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "cannot get next DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, c-format msgid "" "\n" @@ -5411,12 +5689,12 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" "\n" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "cannot get line data section data: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5445,19 +5723,19 @@ msgstr "" "\n" "Opcodes:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "invalid data at offset %tu in section [%zu] ‘%s’" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] " [%*] %hhu argument\n" msgstr[1] " [%*] %hhu arguments\n" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" @@ -5465,7 +5743,7 @@ msgstr "" "\n" "Directory table:" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" @@ -5475,7 +5753,7 @@ msgstr "" "File name table:\n" " Entry Dir Time Size Name" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" @@ -5483,207 +5761,217 @@ msgstr "" "\n" "Line number statements:" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "invalid maximum operations per instruction is zero" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr " special opcode %u: address+%u = %s, line%+d = %zu\n" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr " extended opcode %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6763 msgid " end of sequence" msgstr " end of sequence" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, c-format msgid " set address to %s\n" msgstr " set address to %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr " define new file: dir=%u, mtime=%, length=%, name=%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr " set discriminator to %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6827 msgid " unknown opcode" msgstr " unknown opcode" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr " copy" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr " advance address by %u to %s, op_index to %u\n" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, c-format msgid " advance address by %u to %s\n" msgstr " advance address by %u to %s\n" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr " advance line by constant %d to %\n" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr " set file to %\n" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr " set column to %\n" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr " set ‘%s’ to %\n" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr " set basic block flag" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr " advance address by constant %u to %s, op_index to %u\n" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, c-format msgid " advance address by constant %u to %s\n" msgstr " advance address by constant %u to %s\n" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr " advance address by fixed value %u to %s\n" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr " set prologue end flag" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr " set epilogue begin flag" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr " set isa to %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] " unknown opcode with % parameter:" msgstr[1] " unknown opcode with % parameters:" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "cannot get .debug_loc content: %s" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr " \n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "cannot get macro information section data: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** non-terminated string at end of section" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** missing DW_MACINFO_start_file argument at end of section" + +#: src/readelf.c:7334 #, c-format msgid " Offset: 0x%\n" msgstr " Offset: 0x%\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, c-format msgid " Version: %\n" msgstr " Version: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr " unknown version, cannot parse section\n" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, c-format msgid " Flag: 0x%\n" msgstr " Flag: 0x%\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, c-format msgid " Offset length: %\n" msgstr " Offset length: %\n" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, c-format msgid " .debug_line offset: 0x%\n" msgstr " .debug_line offset: 0x%\n" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, c-format msgid " extension opcode table, % items:\n" msgstr " extension opcode table, % items:\n" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr " [%]" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, c-format msgid " % arguments:" msgstr " % arguments:" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr " no arguments." -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "vendor opcode not verified?" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5694,12 +5982,12 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" " %*s String\n" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** error while reading strings: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" @@ -5708,7 +5996,7 @@ msgstr "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" @@ -5717,22 +6005,22 @@ msgstr "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr " LPStart encoding: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr " TType encoding: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr " Call site encoding: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" @@ -5740,7 +6028,7 @@ msgstr "" "\n" " Call site table:" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5753,12 +6041,12 @@ msgstr "" " Landing pad: %#\n" " Action: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "invalid TType encoding" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, c-format msgid "" "\n" @@ -5768,37 +6056,37 @@ msgstr "" "GDB section [%2zu] ‘%s’ at offset %# contains % " "bytes :\n" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, c-format msgid " Version: %\n" msgstr " Version: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, c-format msgid " CU offset: %#\n" msgstr " CU offset: %#\n" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, c-format msgid " TU offset: %#\n" msgstr " TU offset: %#\n" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, c-format msgid " address offset: %#\n" msgstr " address offset: %#\n" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, c-format msgid " symbol offset: %#\n" msgstr " symbol offset: %#\n" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, c-format msgid " constant offset: %#\n" msgstr " constant offset: %#\n" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, c-format msgid "" "\n" @@ -5807,7 +6095,7 @@ msgstr "" "\n" " CU list at offset %# contains %zu entries:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, c-format msgid "" "\n" @@ -5816,7 +6104,7 @@ msgstr "" "\n" " TU list at offset %# contains %zu entries:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, c-format msgid "" "\n" @@ -5825,7 +6113,7 @@ msgstr "" "\n" " Address list at offset %# contains %zu entries:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, c-format msgid "" "\n" @@ -5834,17 +6122,17 @@ msgstr "" "\n" " Symbol table at offset %# contains %zu slots:\n" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "cannot get debug context descriptor: %s" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "cannot convert core note data: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" @@ -5853,21 +6141,21 @@ msgstr "" "\n" "%*s... ..." -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr " Owner Data size Type\n" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "cannot get content of note section: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" @@ -5876,7 +6164,7 @@ msgstr "" "\n" "Note section [%2zu] ‘%s’ of % bytes at offset %#0:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" @@ -5885,49 +6173,71 @@ msgstr "" "\n" "Note segment of % bytes at offset %#0:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9501 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Section [%zu] '%s' has no data to dump.\n" msgstr "" "\n" -"Section [%Zu] ‘%s’ has no data to dump.\n" +"Section [%zu] ‘%s’ has no data to dump.\n" + +#: src/readelf.c:9518 src/readelf.c:9559 +#, c-format +msgid "cannot get data for section [%zu] '%s': %s" +msgstr "cannot get data for section [%zu] '%s': %s" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9523 #, c-format -msgid "cannot get data for section [%Zu] '%s': %s" -msgstr "cannot get data for section [%Zu] '%s': %s" +msgid "" +"\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" +msgstr "" +"\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" -#: src/readelf.c:9093 +#: src/readelf.c:9528 #, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" msgstr "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9542 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" "\n" -"Section [%Zu] ‘%s’ has no strings to dump.\n" +"Section [%zu] ‘%s’ has no strings to dump.\n" -#: src/readelf.c:9116 +#: src/readelf.c:9564 #, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" msgstr "" "\n" -"String section [%Zu] ‘%s’ contains % bytes at offset " +"String section [%zu] ‘%s’ contains % bytes at offset " "%#0:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9569 +#, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" +msgstr "" +"\n" +"String section [%zu] ‘%s’ contains % bytes (%zd uncompressed) " +"at offset %#0:\n" + +#: src/readelf.c:9618 #, c-format msgid "" "\n" @@ -5936,7 +6246,7 @@ msgstr "" "\n" "section [%lu] does not exist" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" @@ -5945,12 +6255,12 @@ msgstr "" "\n" "section ‘%s’ does not exist" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "cannot get symbol index of archive '%s': %s" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" @@ -5959,26 +6269,26 @@ msgstr "" "\n" "Archive ‘%s’ has no symbol index\n" -#: src/readelf.c:9257 +#: src/readelf.c:9711 #, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" "\n" -"Index of archive ‘%s’ has %Zu entries:\n" +"Index of archive ‘%s’ has %zu entries:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9729 #, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" -msgstr "cannot extract member at offset %Zu in '%s': %s" +msgid "cannot extract member at offset %zu in '%s': %s" +msgstr "cannot extract member at offset %zu in '%s': %s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Archive member ‘%s’ contains:\n" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" @@ -5986,80 +6296,205 @@ msgstr "" "Use the output format FORMAT. FORMAT can be ‘bsd’ or ‘sysv’. " "The default is ‘bsd’" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "Same as ‘--format=sysv’" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "Same as ‘--format=bsd’" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "Same as ‘--radix=10’" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "Same as ‘--radix=8’" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "Same as ‘--radix=16’" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "Similar to ‘--format=sysv’ output but in one line" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "Print size and permission flags for loadable segments" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "Display the total sizes (bsd only)" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "List section sizes of FILEs (a.out by default)." -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "Invalid format: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "Invalid radix: %s" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "%s: file format not recognized" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "(TOTALS)\n" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "-p PID should be a positive process id." + +#: src/stack.c:494 +#, c-format +msgid "Cannot open core file '%s'" +msgstr "Cannot open core file ‘%s’" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "-n MAXFRAMES should be 0 or higher." + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "-e EXEC needs a core given by --core." + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "-1 needs a thread id given by -p." + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "One of -p PID or --core COREFILE should be given." + +#: src/stack.c:644 +msgid "Show stack of process PID" +msgstr "Show stack of process PID" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "Show stack found in COREFILE" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "(optional) EXECUTABLE that produced COREFILE" + +#: src/stack.c:651 +msgid "Output selection options:" +msgstr "Output selection options:" + +#: src/stack.c:653 +msgid "Additionally show frame activation" +msgstr "Additionally show frame activation" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "Additionally try to lookup DWARF debuginfo name for frame address" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "Additionally show module file information" + +#: src/stack.c:662 +msgid "Additionally show source file information" +msgstr "Additionally show source file information" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "Do not resolve address to function symbol name" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "Show raw function symbol names, do not try to demangle names" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "Show module build-id, load address and pc offset" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "Show the backtrace of only one thread" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "Show module memory map with build-id, elf and debug files detected" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "Couldn't show any frames." + +#: src/strings.c:66 msgid "Output Selection:" msgstr "Output Selection:" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Scan entire file, not only loaded sections" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" "Only NUL-terminated sequences of MIN-LEN characters or more are printed" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6067,72 +6502,77 @@ msgstr "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Print name of the file before each string." -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Print location of the string in base 8, 10, or 16 respectively." -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias for --radix=o" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Print the strings of printable characters in files." -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "invalid value ‘%s’ for %s parameter" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "invalid minimum length of matched string size" -#: src/strings.c:596 +#: src/strings.c:600 #, c-format -msgid "lseek64 failed" -msgstr "lseek64 failed" +msgid "lseek failed" +msgstr "lseek failed" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "re-mmap failed" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "mprotect failed" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "Skipping section %zd ‘%s’ data outside file" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "Place stripped output into FILE" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "Extract the removed sections into FILE" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "Embed name FILE instead of -f argument" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "Remove all debugging symbols" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "Remove section headers (not recommended)" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "Copy modified/access timestamps to the output" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " @@ -6142,381 +6582,401 @@ msgstr "" "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "Remove .comment section" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "Relax a few rules to handle slightly broken ELF files" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "Discard symbols from object files." -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "--reloc-debug-sections used without -f" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "Only one input file allowed together with ‘-o’ and ‘-f’" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "-f option specified twice" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "-F option specified twice" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "-o option specified twice" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "-R option supports only .comment section" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "cannot stat input file ‘%s’" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "while opening ‘%s’" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: cannot use -o or -f when stripping archive" -#: src/strip.c:468 +#: src/strip.c:384 +#, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: no support for stripping archive" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "cannot open EBL backend" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, c-format +msgid "cannot get number of phdrs" +msgstr "cannot get number of phdrs" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "cannot create new file '%s': %s" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "illformed file ‘%s’" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "while generating output file: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: error while creating ELF header: %s" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "while preparing output for ‘%s’" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "while create section header section: %s" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "cannot allocate section data: %s" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "while create section header string table: %s" -#: src/strip.c:1752 +#: src/strip.c:1861 #, c-format msgid "bad relocation" msgstr "bad relocation" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "while writing '%s': %s" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "while creating ‘%s’" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "while computing checksum for debug information" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: error while reading the file: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, c-format msgid "while writing '%s'" msgstr "while writing ‘%s’" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "error while finishing '%s': %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "cannot set access and modification date of ‘%s’" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "Match MODULE against file names, not module names" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "Silently skip unfindable files" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "Place output into FILE" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "Create multiple output files under DIRECTORY" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "Use module rather than file names" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "Create output for modules that have no separate debug information" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "Apply relocations to section contents in ET_REL files" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "Only list module and file names, build IDs" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "Force combining files even if some ELF headers don't seem to match" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "-d option specified twice" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "only one of -o or -d allowed" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "-n cannot be used with explicit files or -o or -d" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "output directory ‘%s’" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "exactly two file arguments are required" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "-m, -a, -R, and -i options not allowed with explicit files" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "-o or -d is required when using implicit files" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "cannot create ELF header: %s" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "cannot copy ELF header: %s" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, c-format +msgid "cannot get number of program headers: %s" +msgstr "cannot get number of program headers: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "cannot create program headers: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "cannot copy program header: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "cannot copy section header: %s" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "cannot get section data: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "cannot copy section data: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "cannot create directory ‘%s’" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "cannot get symbol table entry: %s" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "cannot update symbol table: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "cannot update section header: %s" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "cannot update relocation: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "cannot get symbol version: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" -msgstr "unexpected section type in [%Zu] with sh_link to symtab" +msgid "unexpected section type in [%zu] with sh_link to symtab" +msgstr "unexpected section type in [%zu] with sh_link to symtab" -#: src/unstrip.c:771 +#: src/unstrip.c:809 #, c-format -msgid "invalid string offset in symbol [%Zu]" -msgstr "invalid string offset in symbol [%Zu]" +msgid "invalid string offset in symbol [%zu]" +msgstr "invalid string offset in symbol [%zu]" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:967 src/unstrip.c:1313 #, c-format -msgid "cannot read section [%Zu] name: %s" -msgstr "cannot read section [%Zu] name: %s" +msgid "cannot read section [%zu] name: %s" +msgstr "cannot read section [%zu] name: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "cannot read ‘.gnu.prelink_undo’ section: %s" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "invalid contents in ‘%s’ section" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 +#, c-format +msgid "overflow with shnum = %zu in '%s' section" +msgstr "overflow with shnum = %zu in ‘%s’ section" + +#: src/unstrip.c:1108 src/unstrip.c:1433 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" -msgstr "cannot find matching section for [%Zu] ‘%s’" +msgid "cannot find matching section for [%zu] '%s'" +msgstr "cannot find matching section for [%zu] ‘%s’" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "cannot add section name to string table: %s" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "cannot update section header string table data: %s" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "cannot get section header string table section index: %s" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "cannot get section count: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "more sections in stripped file than debug file -- arguments reversed?" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "cannot read section header string table: %s" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "cannot add new section: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1618 #, c-format -msgid "symbol [%Zu] has invalid section index" -msgstr "symbol [%Zu] has invalid section index" +msgid "symbol [%zu] has invalid section index" +msgstr "symbol [%zu] has invalid section index" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, c-format msgid "cannot read section data: %s" msgstr "cannot read section data: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "cannot get ELF header: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "cannot update program header: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "cannot write output file: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "DWARF data not adjusted for prelinking bias; consider prelink -u" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6524,76 +6984,76 @@ msgstr "" "DWARF data in ‘%s’ not adjusted for prelinking bias; consider prelink -" "u" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "cannot create ELF descriptor: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " msgstr "WARNING: " -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" msgstr ", use --force" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" msgstr "ELF header identification (e_ident) different" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" msgstr "ELF header type (e_type) different" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" msgstr "ELF header machine type (e_machine) different" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "stripped program header (e_phnum) smaller than unstripped" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "cannot find stripped file for module '%s': %s" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "cannot open stripped file ‘%s’ for module '%s': %s" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "cannot find debug file for module '%s': %s" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "cannot open debug file ‘%s’ for module '%s': %s" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "module ‘%s’ file ‘%s’ is not stripped" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "cannot cache section addresses for module '%s': %s" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "no matching modules found" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "matched more than one module" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6601,7 +7061,7 @@ msgstr "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6650,3 +7110,15 @@ msgstr "" "if none was found, or . if an ELF image is available but not from any named " "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." + +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "Run executable" + +#: tests/dwflmodtest.c:213 +msgid "Additionally show function names" +msgstr "Additionally show function names" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "Show instances of inlined functions" diff --git a/po/en@quot.gmo b/po/en@quot.gmo index 33da5ab..01fb296 100644 Binary files a/po/en@quot.gmo and b/po/en@quot.gmo differ diff --git a/po/en@quot.po b/po/en@quot.po index c598904..5b1dbef 100644 --- a/po/en@quot.po +++ b/po/en@quot.po @@ -1,7 +1,7 @@ # English translations for elfutils package. -# Copyright (C) 2014 Red Hat, Inc. +# Copyright (C) 2016 Red Hat, Inc. # This file is distributed under the same license as the elfutils package. -# Automatically generated, 2014. +# Automatically generated, 2016. # # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation @@ -27,10 +27,10 @@ # msgid "" msgstr "" -"Project-Id-Version: elfutils 0.160\n" +"Project-Id-Version: elfutils 0.165\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" -"PO-Revision-Date: 2014-08-27 11:26+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" +"PO-Revision-Date: 2016-01-11 08:48+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en@quot\n" @@ -39,8 +39,34 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" +"colorize the output. WHEN defaults to ‘always’ or can be ‘auto’ or ‘never’" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" +"%s: invalid argument ‘%s’ for ‘--color’\n" +"valid arguments are:\n" +" - 'always', 'yes', ‘force’\n" +" - 'never', 'no', ‘none’\n" +" - 'auto', 'tty', ‘if-tty’\n" + +#: lib/color.c:190 src/objdump.c:738 +#, c-format +msgid "cannot allocate memory" +msgstr "cannot allocate memory" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "memory exhausted" @@ -50,7 +76,7 @@ msgstr "memory exhausted" msgid "no error" msgstr "no error" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "out of memory" @@ -89,7 +115,7 @@ msgstr "error during output of data" msgid "no backend support available" msgstr "no backend support available" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "unknown error" @@ -115,122 +141,134 @@ msgid "no DWARF information" msgstr "no DWARF information" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "cannot decompress DWARF" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "no ELF file" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "cannot get ELF header" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "not implemented" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "invalid command" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "invalid version" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "invalid file" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "no entries found" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "invalid DWARF" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "no string data" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "no address value" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "no constant value" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "no reference value" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "invalid reference value" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr ".debug_line section missing" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "invalid .debug_line section" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "debug information too big" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "invalid DWARF version" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "invalid directory index" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "address out of range" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "no location list value" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "no block data" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "invalid line index" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "invalid address range index" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "no matching address range" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "no flag value" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "invalid offset" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr ".debug_ranges section missing" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "invalid CFI section" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "no alternative debug link found" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +msgid "invalid opcode" +msgstr "invalid opcode" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "not a CU (unit) DIE" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "Input selection options:" @@ -262,7 +300,7 @@ msgstr "Find addresses in the running kernel" msgid "Kernel with all modules" msgstr "Kernel with all modules" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "Search path for separate debuginfo files" @@ -287,7 +325,11 @@ msgstr "cannot find kernel or modules" msgid "cannot read ELF core file: %s" msgstr "cannot read ELF core file: %s" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +msgid "Not enough memory" +msgstr "Not enough memory" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "No modules recognized in core file" @@ -443,82 +485,82 @@ msgstr "Invalid argument" msgid "Not an ET_CORE ELF file" msgstr "Not an ET_CORE ELF file" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "No backend" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr ": %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, c-format msgid "unknown SDT version %u\n" msgstr "unknown SDT version %u\n" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, c-format msgid "invalid SDT probe descriptor\n" msgstr "invalid SDT probe descriptor\n" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr " PC: " -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr " Base: " -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr " Semaphore: " -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr " Provider: " -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr " Name: " -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr " Args: " -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " Build ID: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr " Linker version: %.*s\n" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " OS: %s, ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "Stand alone" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr ": %d" @@ -543,7 +585,7 @@ msgstr "invalid size of source operand" msgid "invalid size of destination operand" msgstr "invalid size of destination operand" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "invalid encoding" @@ -624,8 +666,8 @@ msgstr "data/scn mismatch" msgid "invalid section header" msgstr "invalid section header" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "invalid data" @@ -668,39 +710,75 @@ msgstr "" msgid "file has no program header" msgstr "file has no program header" +#: libelf/elf_error.c:237 +msgid "invalid section type" +msgstr "invalid section type" + +#: libelf/elf_error.c:242 +msgid "invalid section flags" +msgstr "invalid section flags" + +#: libelf/elf_error.c:247 +msgid "section does not contain compressed data" +msgstr "section does not contain compressed data" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "section contains compressed data" + +#: libelf/elf_error.c:257 +msgid "unknown compression type" +msgstr "unknown compression type" + +#: libelf/elf_error.c:262 +msgid "cannot compress data" +msgstr "cannot compress data" + +#: libelf/elf_error.c:267 +msgid "cannot decompress data" +msgstr "cannot decompress data" + #: src/addr2line.c:58 -msgid "Output selection options:" -msgstr "Output selection options:" +msgid "Input format options:" +msgstr "Input format options:" + +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." +msgstr "Treat addresses as offsets relative to NAME section." + +#: src/addr2line.c:62 +msgid "Output format options:" +msgstr "Output format options:" + +#: src/addr2line.c:63 +msgid "Print address before each entry" +msgstr "Print address before each entry" -#: src/addr2line.c:59 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Show only base names of source files" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "Show absolute file names using compilation directory" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "Also show function names" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "Also show symbol or section names" -#: src/addr2line.c:64 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "Also show symbol and the section names" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "Also show line table flags" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "Treat addresses as offsets relative to NAME section." - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." @@ -708,25 +786,33 @@ msgstr "" "Show all source locations that caused inline expansion of subroutines at the " "address." -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "Show demangled symbols (ARG is always ignored)" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "Print all information on one line, and indent inlines" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Miscellaneous:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" "Locate source files and line information for ADDRs (in a.out by default)." -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[ADDR...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -737,281 +823,294 @@ msgstr "" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "Written by %s.\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "Section syntax requires exactly one module" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "offset %# lies outside section ‘%s’" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "cannot find symbol ‘%s’" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "offset %# lies outside contents of ‘%s’" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "Commands:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Delete files from archive." -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Move files in archive." -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Print files in archive." -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Quick append files to archive." -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Replace existing or insert new file into archive." -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Display content of archive." -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Extract files from archive." -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Command Modifiers:" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Preserve original dates." -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Use instance [COUNT] of name." -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Do not replace existing files with extracted files." -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Allow filename to be truncated if necessary." -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Provide verbose output." -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Force regeneration of symbol table." -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Insert file after [MEMBER]." -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Insert file before [MEMBER]." -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "Same as -b." -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Suppress message when library has to be created." -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Use full path for file matching." -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Update only older files in archive." -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Create, modify, and extract from archives." -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[MEMBER] [COUNT] ARCHIVE [FILE...]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a', 'b', and ‘i’ are only allowed with the ‘m’ and ‘r’ options" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "MEMBER parameter required for 'a', 'b', and ‘i’ modifiers" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "‘N’ is only meaningful with the ‘x’ and ‘d’ options" -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "COUNT parameter required" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "invalid COUNT parameter %s" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "‘%c’ is only meaningful with the ‘x’ option" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "archive name required" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "command option required" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "More than one operation specified" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "cannot open archive ‘%s’" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "cannot open archive '%s': %s" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: not an archive file" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "cannot stat archive ‘%s’" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "no entry %s in archive\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "cannot create hash table" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "cannot insert into hash table" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "cannot stat ‘%s’" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "cannot read content of %s: %s" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "cannot open %.*s" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "failed to write %s" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "cannot change mode of %s" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "cannot change modification time of %s" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "cannot rename temporary file to %.*s" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "cannot create new file" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "position member %s not found" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: no entry %s in archive!\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "cannot open %s" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "cannot stat %s" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "%s is no regular file" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "cannot get ELF descriptor for %s: %s\n" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "cannot read %s: %s" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "Use zero for uid, gid, and date in archive members." + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "Use actual uid, gid, and date in archive members." + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "%s (default)" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1092,140 +1191,145 @@ msgstr "cannot get program header count of '%s': %s" msgid "%s %s diff: program header count" msgstr "%s %s diff: program header count" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "%s %s differ: section [%zu], [%zu] name" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "%s %s differ: section [%zu] ‘%s’ header" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "cannot get content of section %zu in '%s': %s" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "symbol table [%zu] in ‘%s’ has zero sh_entsize" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "cannot get symbol in '%s': %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "%s %s differ: symbol table [%zu]" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s differ: symbol table [%zu,%zu]" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "%s %s differ: section [%zu] ‘%s’ number of notes" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "cannot read note section [%zu] ‘%s’ in '%s': %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s differ: section [%zu] ‘%s’ note name" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "%s %s differ: section [%zu] ‘%s’ note ‘%s’ type" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s differ: build ID length" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s differ: build ID content" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "%s %s differ: section [%zu] ‘%s’ note ‘%s’ content" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s differ: section [%zu] ‘%s’ content" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s differ: section [%zu,%zu] ‘%s’ content" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s differ: unequal amount of important sections" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "cannot load data of '%s': %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "cannot get program header entry %d of '%s': %s" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s differ: program header %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "%s %s differ: gap" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Invalid value ‘%s’ for --gaps parameter." -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "cannot open ‘%s’" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "cannot create ELF descriptor for '%s': %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "cannot create EBL descriptor for ‘%s’" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "cannot get section header of section %zu: %s" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "cannot get content of section %zu: %s" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "cannot get relocation: %s" @@ -1254,11 +1358,11 @@ msgstr "" msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "Pedantic checking of ELF files compliance with gABI/psABI spec." -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "FILE..." -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "cannot open input file" @@ -1277,7 +1381,7 @@ msgstr "error while closing Elf descriptor: %s\n" msgid "No errors" msgstr "No errors" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "Missing file name.\n" @@ -1406,7 +1510,7 @@ msgstr "invalid section header size: %hd\n" msgid "invalid section header position or size\n" msgstr "invalid section header position or size\n" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1415,21 +1519,21 @@ msgstr "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " "group\n" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" msgstr "" "section [%2d] '%s': section group [%2zu] ‘%s’ does not precede group member\n" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "section [%2d] '%s': cannot get section data\n" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1438,7 +1542,7 @@ msgstr "" "section [%2d] '%s': referenced as string table for section [%2d] ‘%s’ but " "type is not SHT_STRTAB\n" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1447,38 +1551,38 @@ msgstr "" "section [%2d] '%s': symbol table cannot have more than one extended index " "section\n" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "section [%2d] '%s': cannot get symbol %d: %s\n" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "section [%2d] '%s': ‘%s’ in zeroth entry not zero\n" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "section [%2d] '%s': XINDEX for zeroth entry not zero\n" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "section [%2d] '%s': cannot get symbol %zu: %s\n" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "section [%2d] '%s': symbol %zu: invalid name value\n" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1487,7 +1591,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: too large section index but no extended " "section index section\n" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1496,51 +1600,51 @@ msgstr "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " "st_shndx (%)\n" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "section [%2d] '%s': symbol %zu: invalid section index\n" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "section [%2d] '%s': symbol %zu: unknown type\n" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "section [%2d] '%s': symbol %zu: unknown symbol binding\n" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" msgstr "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "section [%2d] '%s': symbol %zu: st_value out of bounds\n" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1549,7 +1653,7 @@ msgstr "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " "[%2d] ‘%s’\n" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1558,7 +1662,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: referenced section [%2d] ‘%s’ does not have " "SHF_TLS flag set\n" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1567,14 +1671,23 @@ msgstr "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " "[%2d] ‘%s’\n" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1583,7 +1696,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " "‘%s’\n" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1592,7 +1705,7 @@ msgstr "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " "sh_info\n" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1601,12 +1714,12 @@ msgstr "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " "sh_info\n" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "section [%2d] '%s': symbol %zu: non-local section symbol\n" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1615,7 +1728,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " "[%2d]\n" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1624,7 +1737,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " "‘%s’\n" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1633,7 +1746,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " "match %s section address %#\n" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1642,7 +1755,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " "match %s section size %\n" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1651,7 +1764,7 @@ msgstr "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " "section\n" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1660,7 +1773,7 @@ msgstr "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " "segment address %#\n" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1669,7 +1782,7 @@ msgstr "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " "segment size %\n" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1678,22 +1791,27 @@ msgstr "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" "default visibility\n" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" #: src/elflint.c:1082 #, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "section [%2d] '%s': cannot get section data.\n" + +#: src/elflint.c:1098 +#, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1702,7 +1820,7 @@ msgstr "" "section [%2d] '%s': relative relocations after index %d as specified by " "DT_RELCOUNT\n" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1711,47 +1829,49 @@ msgstr "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " "specified %d relative relocations\n" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "section [%2d] '%s': invalid destination section index\n" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "section [%2d] '%s': invalid destination section type\n" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "section [%2d] '%s': sh_info should be zero\n" -#: src/elflint.c:1245 +#: src/elflint.c:1263 #, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" -msgstr "section [%2d] '%s': no relocations for merge-able sections possible\n" +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" +msgstr "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "text relocation flag set but there is no read-only segment\n" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "section [%2d] '%s': relocation %zu: invalid type\n" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1760,12 +1880,12 @@ msgstr "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " "type\n" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "section [%2d] '%s': relocation %zu: invalid symbol index\n" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1774,12 +1894,12 @@ msgstr "" "section [%2d] '%s': relocation %zu: only symbol ‘_GLOBAL_OFFSET_TABLE_’ can " "be used with %s\n" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "section [%2d] '%s': relocation %zu: offset out of bounds\n" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1788,7 +1908,7 @@ msgstr "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " "%s\n" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1797,64 +1917,73 @@ msgstr "" "section [%2d] '%s': relocation %zu: read-only section modified but text " "relocation flag not set\n" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "section [%2d] '%s': relocations are against loaded and unloaded data\n" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "section [%2d] '%s': cannot get relocation %zu: %s\n" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "more than one dynamic section present\n" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" +"section [%2d]: referenced as string table for section [%2d] ‘%s’ but section " +"link value is invalid\n" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "section [%2d] '%s': sh_info not zero\n" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "section [%2d] '%s': entry %zu: unknown tag\n" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "section [%2d] '%s': entry %zu: level 2 tag %s used\n" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -1863,14 +1992,14 @@ msgstr "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] ‘%s’ referenced by sh_link\n" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -1879,71 +2008,76 @@ msgstr "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] ‘%s’\n" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "section [%2d] '%s': contains %s entry but not %s\n" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "section [%2d] '%s': mandatory tag %s not present\n" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "section [%2d] '%s': no hash section present\n" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "section [%2d] '%s': not all of %s, %s, and %s are present\n" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "section [%2d] '%s': %s tag missing in prelinked executable\n" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" "section [%2d] '%s': only relocatable files can have extended section index\n" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" "section [%2d] '%s': extended section index section not for symbol table\n" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "cannot get data for symbol section\n" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "section [%2d] '%s': entry size does not match Elf32_Word\n" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "section [%2d] '%s': extended index table too small for symbol table\n" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -1952,54 +2086,59 @@ msgstr "" "section [%2d] '%s': extended section index in section [%2zu] ‘%s’ refers to " "same symbol table\n" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "symbol 0 should have zero extended section index\n" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "cannot get data for symbol %zu\n" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "extended section index is % but symbol index is not XINDEX\n" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "section [%2d] '%s': chain array too large\n" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "section [%2d] '%s': hash bucket reference %zu out of bounds\n" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "section [%2d] '%s': hash chain reference %zu out of bounds\n" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "section [%2d] '%s': hash chain reference % out of bounds\n" -#: src/elflint.c:2081 +#: src/elflint.c:2107 +#, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "section [%2d] '%s': not enough data\n" + +#: src/elflint.c:2119 #, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" -msgstr "section [%2d] '%s': bitmask size not power of 2: %u\n" +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" +msgstr "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" -#: src/elflint.c:2092 +#: src/elflint.c:2135 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " @@ -2008,19 +2147,19 @@ msgstr "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "section [%2d] '%s': 2nd hash function shift too big: %u\n" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2029,51 +2168,63 @@ msgstr "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "section [%2d] '%s': bitmask does not match names in the hash table\n" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "section [%2d] '%s': relocatable files cannot have hash tables\n" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "section [%2d] '%s': hash table not for dynamic symbol table\n" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "section [%2d] '%s': hash table entry size incorrect\n" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "section [%2d] '%s': not marked to be allocated\n" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2082,17 +2233,46 @@ msgstr "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "sh_link in hash sections [%2zu] ‘%s’ and [%2zu] ‘%s’ not identical\n" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "hash section [%2zu] ‘%s’ does not contain enough data\n" + +#: src/elflint.c:2409 +#, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "hash section [%2zu] ‘%s’ has zero bit mask words\n" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "hash section [%2zu] ‘%s’ uses too much data\n" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" +"hash section [%2zu] ‘%s’ invalid symbol index % (max_nsyms: " +"%, nentries: %\n" + +#: src/elflint.c:2522 +#, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "hash section [%2zu] ‘%s’ invalid sh_entsize\n" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "section [%2zu] '%s': reference to symbol index 0\n" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2101,7 +2281,7 @@ msgstr "" "symbol %d referenced in new hash table in [%2zu] ‘%s’ but not in old hash " "table in [%2zu] ‘%s’\n" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2110,113 +2290,118 @@ msgstr "" "symbol %d referenced in old hash table in [%2zu] ‘%s’ but not in new hash " "table in [%2zu] ‘%s’\n" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "section [%2d] '%s': nonzero sh_%s for NULL section\n" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "section [%2d] '%s': cannot get symbol table: %s\n" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "section [%2d] '%s': section reference in sh_link is no symbol table\n" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "section [%2d] '%s': invalid symbol index in sh_info\n" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "section [%2d] '%s': sh_flags not zero\n" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "section [%2d] '%s': cannot get symbol for signature\n" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "section [%2d] '%s': cannot get symbol name for signature\n" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "section [%2d] '%s': signature symbol cannot be empty string\n" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "section [%2d] '%s': sh_flags not set correctly\n" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "section [%2d] '%s': cannot get data: %s\n" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "section [%2d] '%s': section group without flags word\n" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "section [%2d] '%s': section group without member\n" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "section [%2d] '%s': section group with only one member\n" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "section [%2d] '%s': unknown section group flags\n" -#: src/elflint.c:2538 +#: src/elflint.c:2693 #, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" -msgstr "section [%2d] '%s': section index %Zu out of range\n" +msgid "section [%2d] '%s': section index %zu out of range\n" +msgstr "section [%2d] '%s': section index %zu out of range\n" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "section [%2d] '%s': cannot get section header for element %zu: %s\n" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "section [%2d] '%s': section group contains another group [%2d] ‘%s’\n" -#: src/elflint.c:2560 +#: src/elflint.c:2715 #, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -"section [%2d] '%s': element %Zu references section [%2d] ‘%s’ without " +"section [%2d] '%s': element %zu references section [%2d] ‘%s’ without " "SHF_GROUP flag set\n" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "section [%2d] ‘%s’ is contained in more than one section group\n" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2225,7 +2410,7 @@ msgstr "" "section [%2d] ‘%s’ refers in sh_link to section [%2d] ‘%s’ which is no " "dynamic symbol table\n" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2234,76 +2419,76 @@ msgstr "" "section [%2d] ‘%s’ has different number of entries than symbol table [%2d] " "‘%s’\n" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "section [%2d] '%s': symbol %d: cannot read version data\n" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "section [%2d] '%s': symbol %d: local symbol with global scope\n" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "section [%2d] '%s': symbol %d: local symbol with version\n" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "section [%2d] '%s': symbol %d: invalid version index %d\n" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "more than one version reference section present\n" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "section [%2d] '%s': sh_link does not link to string table\n" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "section [%2d] '%s': entry %d has wrong version %d\n" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "section [%2d] '%s': entry %d has invalid file reference\n" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "section [%2d] '%s': entry %d references unknown dependency\n" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2312,7 +2497,7 @@ msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2321,7 +2506,7 @@ msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2330,210 +2515,219 @@ msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name ‘%s’\n" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "section [%2d] '%s': entry %d has invalid offset to next entry\n" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "more than one version definition section present\n" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "section [%2d] '%s': more than one BASE definition\n" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "section [%2d] '%s': entry %d has unknown flag\n" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "section [%2d] '%s': entry %d has invalid name reference\n" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "section [%2d] '%s': entry %d has duplicate version name ‘%s’\n" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "section [%2d] '%s': no BASE definition\n" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "section [%2d] '%s': unknown parent version ‘%s’\n" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "section [%2d] '%s': empty object attributes section\n" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "section [%2d] '%s': unrecognized attribute format\n" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "section [%2d] '%s': offset %zu: invalid length in attribute section\n" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "section [%2d] '%s': offset %zu: unterminated vendor name string\n" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "section [%2d] '%s': offset %zu: truncated attribute section\n" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "section [%2d] '%s': offset %zu: unterminated string in attribute\n" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "section [%2d] '%s': offset %zu: vendor ‘%s’ unknown\n" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "cannot get section header of zeroth section\n" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "zeroth section has nonzero name\n" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "zeroth section has nonzero type\n" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "zeroth section has nonzero flags\n" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "zeroth section has nonzero address\n" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "zeroth section has nonzero offset\n" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "zeroth section has nonzero align value\n" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "zeroth section has nonzero entry size value\n" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2542,7 +2736,7 @@ msgstr "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2551,7 +2745,7 @@ msgstr "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2560,46 +2754,46 @@ msgstr "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "cannot get section header for section [%2zu] '%s': %s\n" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "section [%2zu]: invalid name\n" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "section [%2d] ‘%s’ has wrong type: expected %s, is %s\n" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "section [%2zu] ‘%s’ has wrong flags: expected %s, is %s\n" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" "section [%2zu] ‘%s’ has wrong flags: expected %s and possibly %s, is %s\n" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "section [%2zu] ‘%s’ present in object file\n" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" "section [%2zu] ‘%s’ has SHF_ALLOC flag set but there is no loadable segment\n" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2608,76 +2802,98 @@ msgstr "" "section [%2zu] ‘%s’ has SHF_ALLOC flag not set but there are loadable " "segments\n" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" "section [%2zu] ‘%s’ is extension section index table in non-object file\n" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "section [%2zu] '%s': size not multiple of entry size\n" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "cannot get section header\n" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "section [%2zu] ‘%s’ has unsupported type %d\n" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" "section [%2zu] ‘%s’ contains invalid processor-specific flag(s) %#\n" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "section [%2zu] ‘%s’ contains unknown flag(s) %#\n" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "section [%2zu] '%s': thread-local data sections address not zero\n" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "section [%2zu] '%s': allocated section cannot be compressed\n" + +#: src/elflint.c:3918 +#, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "section [%2zu] '%s': nobits section cannot be compressed\n" + +#: src/elflint.c:3924 +#, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "section [%2zu] '%s': invalid section reference in link value\n" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "section [%2zu] '%s': invalid section reference in info value\n" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "section [%2zu] '%s': strings flag set without merge flag\n" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "section [%2zu] '%s': merge flag set but entry size is zero\n" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "section [%2zu] ‘%s’ has unexpected type %d for an executable section\n" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "section [%2zu] ‘%s’ must be of type NOBITS in debuginfo files\n" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "section [%2zu] ‘%s’ is both executable and writable\n" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -2686,7 +2902,7 @@ msgstr "" "section [%2zu] ‘%s’ not fully contained in segment of program header entry " "%d\n" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -2695,7 +2911,16 @@ msgstr "" "section [%2zu] ‘%s’ has type NOBITS but is read from the file in segment of " "program header entry %d\n" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" +"section [%2zu] ‘%s’ has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -2704,24 +2929,24 @@ msgstr "" "section [%2zu] ‘%s’ has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "section [%2zu] ‘%s’ is executable in nonexecutable segment %d\n" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "section [%2zu] ‘%s’ is writable in unwritable segment %d\n" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -2730,36 +2955,36 @@ msgstr "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "more than one version symbol table present\n" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "INTERP program header entry but no .interp section\n" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" "loadable segment [%u] is executable but contains no executable sections\n" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "loadable segment [%u] is writable but contains no writable sections\n" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -2768,194 +2993,201 @@ msgstr "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "duplicate version index %d\n" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "phdr[%d]: unknown core file note type % at offset %\n" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" -msgstr "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" +msgstr "phdr[%d]: unknown object file note type % at offset %zu\n" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: no note entries defined for the type of file\n" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: cannot get content of note section: %s\n" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: extra % bytes after last note\n" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "section [%2d] '%s': no note entries defined for the type of file\n" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "section [%2d] '%s': cannot get content of note section\n" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "section [%2d] '%s': extra % bytes after last note\n" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" "only executables, shared objects, and core files can have program headers\n" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "cannot get program header entry %d: %s\n" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "program header entry %d: unknown program header entry type %#\n" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "more than one INTERP entry in program header\n" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "more than one TLS entry in program header\n" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "static executable cannot have dynamic sections\n" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "dynamic section reference in program header has wrong offset\n" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "dynamic section size mismatch in program and section header\n" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "more than one GNU_RELRO entry in program header\n" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "loadable segment GNU_RELRO applies to is not writable\n" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "%s segment not contained in a loaded segment\n" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "program header offset in ELF header and PHDR entry do not match" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "call frame search table reference in program header has wrong offset\n" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "call frame search table size mismatch in program and section header\n" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "call frame search table must be allocated\n" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "section [%2zu] ‘%s’ must be allocated\n" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "call frame search table must not be writable\n" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "section [%2zu] ‘%s’ must not be writable\n" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "call frame search table must not be executable\n" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "section [%2zu] ‘%s’ must not be executable\n" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "program header entry %d: file size greater than memory size\n" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "program header entry %d: alignment not a power of 2\n" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -2964,7 +3196,7 @@ msgstr "" "program header entry %d: file offset and virtual address not module of " "alignment\n" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -2973,12 +3205,12 @@ msgstr "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "cannot read ELF header: %s\n" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "text relocation flag set but not needed\n" @@ -2999,8 +3231,8 @@ msgstr "Use PATH as root of debuginfo hierarchy" msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "Locate source of text relocations in FILEs (a.out by default)." -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "[FILE...]" @@ -3034,39 +3266,39 @@ msgstr "no text relocations reported in ‘%s’" msgid "while reading ELF file" msgstr "while reading ELF file" -#: src/findtextrel.c:334 src/findtextrel.c:351 +#: src/findtextrel.c:329 #, c-format -msgid "cannot get program header index at offset %d: %s" -msgstr "cannot get program header index at offset %d: %s" +msgid "cannot get program header count: %s" +msgstr "cannot get program header count: %s" -#: src/findtextrel.c:403 +#: src/findtextrel.c:340 src/findtextrel.c:357 #, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "cannot get section header of section %Zu: %s" +msgid "cannot get program header index at offset %zd: %s" +msgstr "cannot get program header index at offset %zd: %s" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "cannot get symbol table section %zu in '%s': %s" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "cannot get relocation at index %d in section %zu in '%s': %s" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "%s not compiled with -fpic/-fPIC\n" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" "the file containing the function ‘%s’ is not compiled with -fpic/-fPIC\n" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3075,7 +3307,7 @@ msgstr "" "the file containing the function ‘%s’ might not be compiled with -fpic/-" "fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3084,7 +3316,7 @@ msgstr "" "either the file containing the function ‘%s’ or the file containing the " "function ‘%s’ is not compiled with -fpic/-fPIC\n" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3116,339 +3348,339 @@ msgstr "cannot allocate GOTPLT section: %s" msgid "initial-executable TLS relocation cannot be used " msgstr "initial-executable TLS relocation cannot be used " -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "Input File Control:" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "Include whole archives in the output from now on." -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "Stop including the whole archives in the output." -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "FILE" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "Start a group." -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "End a group." -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "PATH" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "Add PATH to list of directories files are searched in." -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "Only set DT_NEEDED for following dynamic libs if actually used" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "Always set DT_NEEDED for following dynamic libs" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "Ignore LD_LIBRARY_PATH environment variable." -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "Output File Control:" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "Place output in FILE." -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "Object is marked to not use default search path at runtime." -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "Same as --whole-archive." -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" "Default rules of extracting from archive; weak references are not enough." -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "Weak references cause extraction from archive." -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "Allow multiple definitions; first is used." -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "Disallow/allow undefined symbols in DSOs." -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "Object requires immediate handling of $ORIGIN." -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "Relocation will not be processed lazily." -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "Object cannot be unloaded at runtime." -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "Mark object to be initialized first." -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "Enable/disable lazy-loading flag for following dependencies." -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "Mark object as not loadable with 'dlopen'." -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "Ignore/record dependencies on unused DSOs." -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "Generated DSO will be a system library." -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "ADDRESS" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "Set entry point address." -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "Do not link against shared libraries." -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "Prefer linking against shared libraries." -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "Export all dynamic symbols." -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "Strip all symbols." -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "Strip debugging symbols." -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "Assume pagesize for the target system to be SIZE." -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "Set runtime DSO search path." -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "Set link time DSO search path." -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "Generate dynamic shared object." -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "Generate relocatable object." -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "Causes symbol not assigned to a version be reduced to local." -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "Remove unused sections." -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "Don't remove unused sections." -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "Set soname of shared object." -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "Set the dynamic linker name." -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "Add/suppress addition indentifying link-editor to .comment section." -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "Create .eh_frame_hdr section" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "Set hash style to sysv, gnu or both." -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "Generate build ID note (md5, sha1 (default), uuid)." -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "Linker Operation Control:" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "Verbose messages." -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "Trace file opens." -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "Trade speed for less memory usage" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "LEVEL" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "Set optimization level to LEVEL." -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "Use linker script in FILE." -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "Select to get parser debug information" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "Read version information from FILE." -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "Set emulation to NAME." -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "Combine object and archive files." -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "[FILE]..." -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "At least one input file needed" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "error while preparing linking" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "cannot open linker script ‘%s’" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( without matching -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "only one option of -G and -r is allowed" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "more than one ‘-m’ parameter" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "unknown option ‘-%c %s’" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "invalid page size value '%s': ignored" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "invalid hash style ‘%s’" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "invalid build-ID style ‘%s’" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "More than one output file name given." -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "Invalid optimization level ‘%s’" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "nested -( -) groups are not allowed" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "-) without matching -(" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "unknown option ‘-%c %s’" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "could not find input file to determine output file format" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "try again with an appropriate ‘-m’ parameter" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "cannot read version script ‘%s’" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "duplicate definition of ‘%s’ in linker script" @@ -3493,8 +3725,8 @@ msgstr "Warning: type of ‘%s’ changed from %s in %s to %s in %s" msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "Warning: size of ‘%s’ changed from % in %s to % in %s" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "cannot determine number of sections: %s" @@ -3729,7 +3961,7 @@ msgstr "internal error: non-nobits section follows nobits section" msgid "cannot get header of 0th section: %s" msgstr "cannot get header of 0th section: %s" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "cannot update ELF header: %s" @@ -3782,8 +4014,8 @@ msgstr "while reading linker script '%s': %s at line %d" #: src/ldscript.y:737 #, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" -msgstr "symbol ‘%s’ is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" +msgstr "symbol ‘%s’ is declared both local and global for unnamed version ‘%s’" #: src/ldscript.y:739 #, c-format @@ -3795,7 +4027,7 @@ msgstr "symbol ‘%s’ is declared both local and global for version ‘%s’" msgid "default visibility set as local and global" msgstr "default visibility set as local and global" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "Output selection:" @@ -3823,7 +4055,7 @@ msgstr "Display only undefined symbols" msgid "Include index for symbols from archive members" msgstr "Include index for symbols from archive members" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "Output format:" @@ -3847,7 +4079,7 @@ msgstr "Same as --format=bsd" msgid "Same as --format=posix" msgstr "Same as --format=posix" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "Use RADIX for printing symbol values" @@ -3859,7 +4091,7 @@ msgstr "Mark special symbols" msgid "Print size of defined symbols" msgstr "Print size of defined symbols" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "Output options:" @@ -3883,27 +4115,27 @@ msgstr "Decode low-level symbol names into source code names" msgid "List symbols from FILEs (a.out by default)." msgstr "List symbols from FILEs (a.out by default)." -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 msgid "Output formatting" msgstr "Output formatting" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 #, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" -msgstr "%s: INTERNAL ERROR %d (%s-%s): %s" +msgid "%s: INTERNAL ERROR %d (%s): %s" +msgstr "%s: INTERNAL ERROR %d (%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "while closing ‘%s’" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: File format not recognized" -#: src/nm.c:460 +#: src/nm.c:457 msgid "" "\n" "Archive index:\n" @@ -3911,42 +4143,42 @@ msgstr "" "\n" "Archive index:\n" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "invalid offset %zu for symbol %s" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "%s in %s\n" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "cannot reset archive offset to beginning" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: file format not recognized" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "cannot create search tree" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "cannot get section header string table index" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -3959,7 +4191,7 @@ msgstr "" "Symbols from %s:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3968,68 +4200,68 @@ msgstr "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" "\n" -#: src/nm.c:1173 +#: src/nm.c:1232 #, c-format -msgid "%s: entry size in section `%s' is not what we expect" -msgstr "%s: entry size in section ‘%s’ is not what we expect" +msgid "%s: entry size in section %zd `%s' is not what we expect" +msgstr "%s: entry size in section %zd ‘%s’ is not what we expect" -#: src/nm.c:1177 +#: src/nm.c:1237 #, c-format -msgid "%s: size of section `%s' is not multiple of entry size" -msgstr "%s: size of section ‘%s’ is not multiple of entry size" +msgid "%s: size of section %zd `%s' is not multiple of entry size" +msgstr "%s: size of section %zd ‘%s’ is not multiple of entry size" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: Invalid operation" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: no symbols" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "Mode selection:" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "Display relocation information." -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "Display the full contents of all sections requested" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "Display assembler code of executable sections" -#: src/objdump.c:60 +#: src/objdump.c:59 msgid "Output content selection:" msgstr "Output content selection:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "Only display information for section NAME." -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "Show information from FILEs (a.out by default)." -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "No operation specified.\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "while close ‘%s’" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "INVALID SYMBOL" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "INVALID SECTION" @@ -4048,111 +4280,106 @@ msgstr "" msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "Contents of section %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "cannot disassemble" -#: src/objdump.c:736 -#, c-format -msgid "cannot allocate memory" -msgstr "cannot allocate memory" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "Generate an index to speed access to archives." -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "ARCHIVE" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "Archive name required" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "‘%s’ is no archive" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "error while freeing sub-ELF descriptor: %s" -#: src/readelf.c:71 +#: src/readelf.c:72 msgid "ELF input selection:" msgstr "ELF input selection:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" -#: src/readelf.c:75 +#: src/readelf.c:76 msgid "ELF output selection:" msgstr "ELF output selection:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "All these plus -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "Display the dynamic segment" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "Display the ELF file header" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "Display histogram of bucket list lengths" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "Display the program headers" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "Display relocations" -#: src/readelf.c:85 +#: src/readelf.c:86 msgid "Display the sections' headers" msgstr "Display the sections' headers" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "Display the symbol table" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "Display versioning information" -#: src/readelf.c:89 +#: src/readelf.c:90 msgid "Display the ELF notes" msgstr "Display the ELF notes" -#: src/readelf.c:91 +#: src/readelf.c:92 msgid "Display architecture specific information, if any" msgstr "Display architecture specific information, if any" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "Display sections for exception handling" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "Additional output selection:" -#: src/readelf.c:97 +#: src/readelf.c:98 msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " @@ -4162,166 +4389,174 @@ msgstr "" "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro or exception" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "Dump the uninterpreted contents of SECTION, by number or name" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "Print string contents of sections" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "Display the symbol index of an archive" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "Output control:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Do not find symbol names for addresses in DWARF data" -#: src/readelf.c:112 +#: src/readelf.c:113 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "" "Display just offsets instead of resolving values to addresses in DWARF data" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "Ignored for compatibility (lines always wide)" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "Print information from ELF file in human-readable form." -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Unknown DWARF debug section ‘%s’.\n" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "cannot generate Elf descriptor: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "cannot get section: %s" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "cannot get section header: %s" -#: src/readelf.c:562 +#: src/readelf.c:571 #, c-format msgid "cannot get section name" msgstr "cannot get section name" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "cannot get %s content: %s" -#: src/readelf.c:587 +#: src/readelf.c:596 #, c-format msgid "cannot create temp file '%s'" msgstr "cannot create temp file ‘%s’" -#: src/readelf.c:596 +#: src/readelf.c:605 #, c-format msgid "cannot write section data" msgstr "cannot write section data" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "error while closing Elf descriptor: %s" -#: src/readelf.c:609 +#: src/readelf.c:618 #, c-format msgid "error while rewinding file descriptor" msgstr "error while rewinding file descriptor" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "‘%s’ is not an archive, cannot print archive index" -#: src/readelf.c:742 +#: src/readelf.c:751 #, c-format msgid "No such section '%s' in '%s'" msgstr "No such section ‘%s’ in ‘%s’" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "cannot stat input file" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "input file is empty" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "failed reading '%s': %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "cannot read ELF header: %s" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "cannot create EBL handle" -#: src/readelf.c:835 +#: src/readelf.c:858 #, c-format msgid "cannot determine number of program headers: %s" msgstr "cannot determine number of program headers: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "NONE (None)" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "REL (Relocatable file)" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "EXEC (Executable file)" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "DYN (Shared object file)" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "CORE (Core file)" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "OS Specific: (%x)\n" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Processor Specific: (%x)\n" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " @@ -4329,7 +4564,7 @@ msgstr "" "ELF Header:\n" " Magic: " -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" @@ -4338,117 +4573,117 @@ msgstr "" "\n" " Class: %s\n" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr " Data: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Ident Version: %hhd %s\n" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(current)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr " OS/ABI: %s\n" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr " ABI Version: %hhd\n" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " Type: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr " Machine: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr " Version: %d %s\n" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr " Entry point address: %#\n" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr " Start of program headers: % %s\n" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "(bytes into file)" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr " Start of section headers: % %s\n" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr " Flags: %s\n" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr " Size of this header: % %s\n" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(bytes)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr " Size of program header entries: % %s\n" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr " Number of program headers entries: %" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr " (% in [0].sh_info)" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr " ([0] not available)" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr " Size of section header entries: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr " Number of section headers entries: %" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr " (% in [0].sh_size)" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr " (% in [0].sh_link)" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4457,7 +4692,7 @@ msgstr "" " Section header string table index: XINDEX%s\n" "\n" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" @@ -4466,7 +4701,7 @@ msgstr "" " Section header string table index: %\n" "\n" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4475,11 +4710,11 @@ msgstr "" "There are %d section headers, starting at offset %#:\n" "\n" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "Section Headers:" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4487,7 +4722,7 @@ msgstr "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4495,17 +4730,35 @@ msgstr "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr " [Compression Size Al]" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr " [Compression Size Al]" + +#: src/readelf.c:1213 +#, c-format +msgid "bad compression header for section %zd: %s" +msgstr "bad compression header for section %zd: %s" + +#: src/readelf.c:1224 +#, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "bad gnu compressed size for section %zd: %s" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "Program Headers:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4513,12 +4766,12 @@ msgstr "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Requesting program interpreter: %s]\n" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" @@ -4528,12 +4781,12 @@ msgstr "" " Section to Segment mapping:\n" " Segment Sections..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "cannot get program header: %s" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4548,7 +4801,7 @@ msgstr[1] "" "\n" "COMDAT section group [%2zu] ‘%s’ with signature ‘%s’ contains %zu entries:\n" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4563,21 +4816,25 @@ msgstr[1] "" "\n" "Section group [%2zu] ‘%s’ with signature ‘%s’ contains %zu entries:\n" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "Couldn't uncompress section" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 #, c-format -msgid "invalid sh_link value in section %Zu" -msgstr "invalid sh_link value in section %Zu" +msgid "invalid sh_link value in section %zu" +msgstr "invalid sh_link value in section %zu" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4596,36 +4853,36 @@ msgstr[1] "" "Dynamic segment contains %lu entries:\n" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘%s’\n" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr " Type Value\n" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "Shared library: [%s]\n" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "Library soname: [%s]\n" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "Library rpath: [%s]\n" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "Library runpath: [%s]\n" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "% (bytes)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" @@ -4634,7 +4891,7 @@ msgstr "" "\n" "Invalid symbol table at offset %#0\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4653,7 +4910,7 @@ msgstr[1] "" "Relocation section [%2zu] ‘%s’ for section [%2u] ‘%s’ at offset %#0 " "contains %d entries:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4668,30 +4925,30 @@ msgstr[1] "" "\n" "Relocation section [%2u] ‘%s’ at offset %#0 contains %d entries:\n" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr " Offset Type Value Name\n" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr " Offset Type Value Name\n" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr " Offset Type Value Addend Name\n" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr "" " Offset Type Value Addend Name\n" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4706,40 +4963,40 @@ msgstr[1] "" "\n" "Symbol table [%2u] ‘%s’ contains %u entries:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" msgstr[0] " %lu local symbol String table: [%2u] ‘%s’\n" msgstr[1] " %lu local symbols String table: [%2u] ‘%s’\n" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Num: Value Size Type Bind Vis Ndx Name\n" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Num: Value Size Type Bind Vis Ndx Name\n" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "bad dynamic symbol" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "none" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| " -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4758,17 +5015,17 @@ msgstr[1] "" "Version needs section [%2u] ‘%s’ contains %d entries:\n" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘%s’\n" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Version: %hu File: %s Cnt: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Name: %s Flags: %s Version: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4787,17 +5044,17 @@ msgstr[1] "" "Version definition section [%2u] ‘%s’ contains %d entries:\n" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘%s’\n" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Parent %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4816,15 +5073,15 @@ msgstr[1] "" "Version symbols section [%2u] ‘%s’ contains %d entries:\n" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘%s’" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *local* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -4847,22 +5104,22 @@ msgstr[1] "" "buckets):\n" " Addr: %#0* Offset: %#08 Link to section: [%2u] ‘%s’\n" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Length Number % of total Coverage\n" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4871,12 +5128,27 @@ msgstr "" " Average number of tests: successful lookup: %f\n" "\t\t\t unsuccessful lookup: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "cannot get data for section %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "invalid data in sysv.hash section %d" + +#: src/readelf.c:3148 +#, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "invalid data in sysv.hash64 section %d" + +#: src/readelf.c:3206 +#, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "invalid data in gnu.hash section %d" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4885,7 +5157,7 @@ msgstr "" " Symbol Bias: %u\n" " Bitmask Size: %zu bytes %%% bits set 2nd hash shift: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -4900,7 +5172,7 @@ msgstr[1] "" "\n" "Library list section [%2zu] ‘%s’ at offset %#0 contains %d entries:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4908,7 +5180,7 @@ msgstr "" " Library Time Stamp Checksum Version " "Flags" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -4919,140 +5191,140 @@ msgstr "" "Object attributes section [%2zu] ‘%s’ of % bytes at offset " "%#0:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr " Owner Size\n" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " File: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "empty block" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "%zu byte block:" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# used with different address sizes" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# used with different offset sizes" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, c-format msgid "%s %# used with different base addresses" msgstr "%s %# used with different base addresses" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] ... % bytes ...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -5063,7 +5335,7 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" " [ Code]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" @@ -5072,30 +5344,30 @@ msgstr "" "\n" "Abbreviation section at offset %:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** error while reading abbreviation: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] offset: %, children: %s, tag: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "yes" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "no" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "cannot get .debug_aranges content: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -5110,20 +5382,20 @@ msgstr[1] "" "\n" "DWARF section [%2zu] ‘%s’ at offset %# contains %zu entries:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" @@ -5132,21 +5404,21 @@ msgstr "" "\n" "DWARF section [%2zu] ‘%s’ at offset %#:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4797 src/readelf.c:6494 #, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "invalid data in section [%zu] ‘%s’" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, c-format msgid "" "\n" @@ -5155,32 +5427,32 @@ msgstr "" "\n" " Length: %6\n" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, c-format msgid " DWARF version: %6\n" msgstr " DWARF version: %6\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "unsupported aranges version" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, c-format msgid " CU offset: %6\n" msgstr " CU offset: %6\n" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, c-format msgid " Address size: %6\n" msgstr " Address size: %6\n" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, c-format msgid "unsupported address size" msgstr "unsupported address size" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, c-format msgid "" " Segment size: %6\n" @@ -5189,62 +5461,66 @@ msgstr "" " Segment size: %6\n" "\n" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "unsupported segment size" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, c-format msgid " %s..%s (%)\n" msgstr " %s..%s (%)\n" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" -msgstr " %Zu padding bytes\n" +msgid " %zu padding bytes\n" +msgstr " %zu padding bytes\n" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "cannot get .debug_ranges content: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] base address %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] empty list\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +msgid " \n" +msgstr " \n" + +#: src/readelf.c:5493 #, c-format msgid "cannot get ELF: %s" msgstr "cannot get ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" @@ -5253,7 +5529,7 @@ msgstr "" "\n" "Call frame information section [%2zu] ‘%s’ at offset %#:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" @@ -5262,50 +5538,50 @@ msgstr "" "\n" " [%6tx] Zero terminator\n" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, c-format msgid "invalid augmentation length" msgstr "invalid augmentation length" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "FDE address encoding: " -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "LSDA pointer encoding: " -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr " (offset: %#)" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr " (end offset: %#)" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sLSDA pointer: %#\n" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "cannot get attribute code: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "cannot get attribute form: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "cannot get attribute value: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5316,7 +5592,7 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" " [Offset]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5329,7 +5605,7 @@ msgstr "" "%, Offset size: %\n" " Type signature: %#, Type offset: %#\n" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5340,32 +5616,32 @@ msgstr "" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "cannot get DIE at offset % in section '%s': %s" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "cannot get DIE offset: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "cannot get tag of DIE at offset % in section '%s': %s" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "cannot get next DIE: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "cannot get next DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, c-format msgid "" "\n" @@ -5376,12 +5652,12 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" "\n" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "cannot get line data section data: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5410,19 +5686,19 @@ msgstr "" "\n" "Opcodes:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "invalid data at offset %tu in section [%zu] ‘%s’" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] " [%*] %hhu argument\n" msgstr[1] " [%*] %hhu arguments\n" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" @@ -5430,7 +5706,7 @@ msgstr "" "\n" "Directory table:" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" @@ -5440,7 +5716,7 @@ msgstr "" "File name table:\n" " Entry Dir Time Size Name" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" @@ -5448,207 +5724,217 @@ msgstr "" "\n" "Line number statements:" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "invalid maximum operations per instruction is zero" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr " special opcode %u: address+%u = %s, line%+d = %zu\n" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr " extended opcode %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6763 msgid " end of sequence" msgstr " end of sequence" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, c-format msgid " set address to %s\n" msgstr " set address to %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr " define new file: dir=%u, mtime=%, length=%, name=%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr " set discriminator to %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6827 msgid " unknown opcode" msgstr " unknown opcode" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr " copy" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr " advance address by %u to %s, op_index to %u\n" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, c-format msgid " advance address by %u to %s\n" msgstr " advance address by %u to %s\n" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr " advance line by constant %d to %\n" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr " set file to %\n" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr " set column to %\n" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr " set ‘%s’ to %\n" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr " set basic block flag" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr " advance address by constant %u to %s, op_index to %u\n" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, c-format msgid " advance address by constant %u to %s\n" msgstr " advance address by constant %u to %s\n" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr " advance address by fixed value %u to %s\n" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr " set prologue end flag" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr " set epilogue begin flag" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr " set isa to %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] " unknown opcode with % parameter:" msgstr[1] " unknown opcode with % parameters:" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "cannot get .debug_loc content: %s" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr " \n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "cannot get macro information section data: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** non-terminated string at end of section" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** missing DW_MACINFO_start_file argument at end of section" + +#: src/readelf.c:7334 #, c-format msgid " Offset: 0x%\n" msgstr " Offset: 0x%\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, c-format msgid " Version: %\n" msgstr " Version: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr " unknown version, cannot parse section\n" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, c-format msgid " Flag: 0x%\n" msgstr " Flag: 0x%\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, c-format msgid " Offset length: %\n" msgstr " Offset length: %\n" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, c-format msgid " .debug_line offset: 0x%\n" msgstr " .debug_line offset: 0x%\n" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, c-format msgid " extension opcode table, % items:\n" msgstr " extension opcode table, % items:\n" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr " [%]" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, c-format msgid " % arguments:" msgstr " % arguments:" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr " no arguments." -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "vendor opcode not verified?" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5659,12 +5945,12 @@ msgstr "" "DWARF section [%2zu] ‘%s’ at offset %#:\n" " %*s String\n" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** error while reading strings: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" @@ -5673,7 +5959,7 @@ msgstr "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" @@ -5682,22 +5968,22 @@ msgstr "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr " LPStart encoding: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr " TType encoding: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr " Call site encoding: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" @@ -5705,7 +5991,7 @@ msgstr "" "\n" " Call site table:" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5718,12 +6004,12 @@ msgstr "" " Landing pad: %#\n" " Action: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "invalid TType encoding" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, c-format msgid "" "\n" @@ -5732,37 +6018,37 @@ msgstr "" "\n" "GDB section [%2zu] ‘%s’ at offset %# contains % bytes :\n" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, c-format msgid " Version: %\n" msgstr " Version: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, c-format msgid " CU offset: %#\n" msgstr " CU offset: %#\n" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, c-format msgid " TU offset: %#\n" msgstr " TU offset: %#\n" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, c-format msgid " address offset: %#\n" msgstr " address offset: %#\n" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, c-format msgid " symbol offset: %#\n" msgstr " symbol offset: %#\n" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, c-format msgid " constant offset: %#\n" msgstr " constant offset: %#\n" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, c-format msgid "" "\n" @@ -5771,7 +6057,7 @@ msgstr "" "\n" " CU list at offset %# contains %zu entries:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, c-format msgid "" "\n" @@ -5780,7 +6066,7 @@ msgstr "" "\n" " TU list at offset %# contains %zu entries:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, c-format msgid "" "\n" @@ -5789,7 +6075,7 @@ msgstr "" "\n" " Address list at offset %# contains %zu entries:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, c-format msgid "" "\n" @@ -5798,17 +6084,17 @@ msgstr "" "\n" " Symbol table at offset %# contains %zu slots:\n" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "cannot get debug context descriptor: %s" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "cannot convert core note data: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" @@ -5817,21 +6103,21 @@ msgstr "" "\n" "%*s... ..." -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr " Owner Data size Type\n" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "cannot get content of note section: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" @@ -5840,7 +6126,7 @@ msgstr "" "\n" "Note section [%2zu] ‘%s’ of % bytes at offset %#0:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" @@ -5849,48 +6135,70 @@ msgstr "" "\n" "Note segment of % bytes at offset %#0:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9501 +#, c-format +msgid "" +"\n" +"Section [%zu] '%s' has no data to dump.\n" +msgstr "" +"\n" +"Section [%zu] ‘%s’ has no data to dump.\n" + +#: src/readelf.c:9518 src/readelf.c:9559 +#, c-format +msgid "cannot get data for section [%zu] '%s': %s" +msgstr "cannot get data for section [%zu] '%s': %s" + +#: src/readelf.c:9523 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" "\n" -"Section [%Zu] ‘%s’ has no data to dump.\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9528 #, c-format -msgid "cannot get data for section [%Zu] '%s': %s" -msgstr "cannot get data for section [%Zu] '%s': %s" +msgid "" +"\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" +msgstr "" +"\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" -#: src/readelf.c:9093 +#: src/readelf.c:9542 #, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Section [%zu] ‘%s’ has no strings to dump.\n" -#: src/readelf.c:9106 +#: src/readelf.c:9564 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" msgstr "" "\n" -"Section [%Zu] ‘%s’ has no strings to dump.\n" +"String section [%zu] ‘%s’ contains % bytes at offset %#0:\n" -#: src/readelf.c:9116 +#: src/readelf.c:9569 #, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" msgstr "" "\n" -"String section [%Zu] ‘%s’ contains % bytes at offset %#0:\n" +"String section [%zu] ‘%s’ contains % bytes (%zd uncompressed) at " +"offset %#0:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9618 #, c-format msgid "" "\n" @@ -5899,7 +6207,7 @@ msgstr "" "\n" "section [%lu] does not exist" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" @@ -5908,12 +6216,12 @@ msgstr "" "\n" "section ‘%s’ does not exist" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "cannot get symbol index of archive '%s': %s" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" @@ -5922,26 +6230,26 @@ msgstr "" "\n" "Archive ‘%s’ has no symbol index\n" -#: src/readelf.c:9257 +#: src/readelf.c:9711 #, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" "\n" -"Index of archive ‘%s’ has %Zu entries:\n" +"Index of archive ‘%s’ has %zu entries:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9729 #, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" -msgstr "cannot extract member at offset %Zu in '%s': %s" +msgid "cannot extract member at offset %zu in '%s': %s" +msgstr "cannot extract member at offset %zu in '%s': %s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Archive member ‘%s’ contains:\n" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" @@ -5949,80 +6257,205 @@ msgstr "" "Use the output format FORMAT. FORMAT can be ‘bsd’ or ‘sysv’. The default " "is ‘bsd’" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "Same as ‘--format=sysv’" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "Same as ‘--format=bsd’" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "Same as ‘--radix=10’" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "Same as ‘--radix=8’" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "Same as ‘--radix=16’" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "Similar to ‘--format=sysv’ output but in one line" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "Print size and permission flags for loadable segments" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "Display the total sizes (bsd only)" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "List section sizes of FILEs (a.out by default)." -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "Invalid format: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "Invalid radix: %s" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "%s: file format not recognized" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "(TOTALS)\n" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "-p PID should be a positive process id." + +#: src/stack.c:494 +#, c-format +msgid "Cannot open core file '%s'" +msgstr "Cannot open core file ‘%s’" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "-n MAXFRAMES should be 0 or higher." + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "-e EXEC needs a core given by --core." + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "-1 needs a thread id given by -p." + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "One of -p PID or --core COREFILE should be given." + +#: src/stack.c:644 +msgid "Show stack of process PID" +msgstr "Show stack of process PID" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "Show stack found in COREFILE" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "(optional) EXECUTABLE that produced COREFILE" + +#: src/stack.c:651 +msgid "Output selection options:" +msgstr "Output selection options:" + +#: src/stack.c:653 +msgid "Additionally show frame activation" +msgstr "Additionally show frame activation" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "Additionally try to lookup DWARF debuginfo name for frame address" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "Additionally show module file information" + +#: src/stack.c:662 +msgid "Additionally show source file information" +msgstr "Additionally show source file information" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "Do not resolve address to function symbol name" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "Show raw function symbol names, do not try to demangle names" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "Show module build-id, load address and pc offset" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "Show the backtrace of only one thread" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "Show module memory map with build-id, elf and debug files detected" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "Couldn't show any frames." + +#: src/strings.c:66 msgid "Output Selection:" msgstr "Output Selection:" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Scan entire file, not only loaded sections" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" "Only NUL-terminated sequences of MIN-LEN characters or more are printed" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6030,72 +6463,77 @@ msgstr "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Print name of the file before each string." -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Print location of the string in base 8, 10, or 16 respectively." -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias for --radix=o" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Print the strings of printable characters in files." -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "invalid value ‘%s’ for %s parameter" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "invalid minimum length of matched string size" -#: src/strings.c:596 +#: src/strings.c:600 #, c-format -msgid "lseek64 failed" -msgstr "lseek64 failed" +msgid "lseek failed" +msgstr "lseek failed" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "re-mmap failed" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "mprotect failed" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "Skipping section %zd ‘%s’ data outside file" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "Place stripped output into FILE" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "Extract the removed sections into FILE" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "Embed name FILE instead of -f argument" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "Remove all debugging symbols" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "Remove section headers (not recommended)" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "Copy modified/access timestamps to the output" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " @@ -6105,457 +6543,477 @@ msgstr "" "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "Remove .comment section" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "Relax a few rules to handle slightly broken ELF files" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "Discard symbols from object files." -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "--reloc-debug-sections used without -f" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "Only one input file allowed together with ‘-o’ and ‘-f’" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "-f option specified twice" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "-F option specified twice" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "-o option specified twice" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "-R option supports only .comment section" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "cannot stat input file ‘%s’" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "while opening ‘%s’" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: cannot use -o or -f when stripping archive" -#: src/strip.c:468 +#: src/strip.c:384 +#, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: no support for stripping archive" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "cannot open EBL backend" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, c-format +msgid "cannot get number of phdrs" +msgstr "cannot get number of phdrs" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "cannot create new file '%s': %s" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "illformed file ‘%s’" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "while generating output file: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: error while creating ELF header: %s" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "while preparing output for ‘%s’" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "while create section header section: %s" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "cannot allocate section data: %s" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "while create section header string table: %s" -#: src/strip.c:1752 +#: src/strip.c:1861 #, c-format msgid "bad relocation" msgstr "bad relocation" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "while writing '%s': %s" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "while creating ‘%s’" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "while computing checksum for debug information" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: error while reading the file: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, c-format msgid "while writing '%s'" msgstr "while writing ‘%s’" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "error while finishing '%s': %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "cannot set access and modification date of ‘%s’" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "Match MODULE against file names, not module names" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "Silently skip unfindable files" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "Place output into FILE" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "Create multiple output files under DIRECTORY" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "Use module rather than file names" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "Create output for modules that have no separate debug information" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "Apply relocations to section contents in ET_REL files" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "Only list module and file names, build IDs" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "Force combining files even if some ELF headers don't seem to match" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "-d option specified twice" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "only one of -o or -d allowed" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "-n cannot be used with explicit files or -o or -d" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "output directory ‘%s’" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "exactly two file arguments are required" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "-m, -a, -R, and -i options not allowed with explicit files" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "-o or -d is required when using implicit files" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "cannot create ELF header: %s" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "cannot copy ELF header: %s" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, c-format +msgid "cannot get number of program headers: %s" +msgstr "cannot get number of program headers: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "cannot create program headers: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "cannot copy program header: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "cannot copy section header: %s" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "cannot get section data: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "cannot copy section data: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "cannot create directory ‘%s’" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "cannot get symbol table entry: %s" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "cannot update symbol table: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "cannot update section header: %s" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "cannot update relocation: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "cannot get symbol version: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" -msgstr "unexpected section type in [%Zu] with sh_link to symtab" +msgid "unexpected section type in [%zu] with sh_link to symtab" +msgstr "unexpected section type in [%zu] with sh_link to symtab" -#: src/unstrip.c:771 +#: src/unstrip.c:809 #, c-format -msgid "invalid string offset in symbol [%Zu]" -msgstr "invalid string offset in symbol [%Zu]" +msgid "invalid string offset in symbol [%zu]" +msgstr "invalid string offset in symbol [%zu]" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:967 src/unstrip.c:1313 #, c-format -msgid "cannot read section [%Zu] name: %s" -msgstr "cannot read section [%Zu] name: %s" +msgid "cannot read section [%zu] name: %s" +msgstr "cannot read section [%zu] name: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "cannot read ‘.gnu.prelink_undo’ section: %s" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "invalid contents in ‘%s’ section" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 +#, c-format +msgid "overflow with shnum = %zu in '%s' section" +msgstr "overflow with shnum = %zu in ‘%s’ section" + +#: src/unstrip.c:1108 src/unstrip.c:1433 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" -msgstr "cannot find matching section for [%Zu] ‘%s’" +msgid "cannot find matching section for [%zu] '%s'" +msgstr "cannot find matching section for [%zu] ‘%s’" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "cannot add section name to string table: %s" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "cannot update section header string table data: %s" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "cannot get section header string table section index: %s" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "cannot get section count: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "more sections in stripped file than debug file -- arguments reversed?" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "cannot read section header string table: %s" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "cannot add new section: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1618 #, c-format -msgid "symbol [%Zu] has invalid section index" -msgstr "symbol [%Zu] has invalid section index" +msgid "symbol [%zu] has invalid section index" +msgstr "symbol [%zu] has invalid section index" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, c-format msgid "cannot read section data: %s" msgstr "cannot read section data: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "cannot get ELF header: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "cannot update program header: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "cannot write output file: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "DWARF data not adjusted for prelinking bias; consider prelink -u" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" "DWARF data in ‘%s’ not adjusted for prelinking bias; consider prelink -u" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "cannot create ELF descriptor: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " msgstr "WARNING: " -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" msgstr ", use --force" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" msgstr "ELF header identification (e_ident) different" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" msgstr "ELF header type (e_type) different" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" msgstr "ELF header machine type (e_machine) different" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "stripped program header (e_phnum) smaller than unstripped" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "cannot find stripped file for module '%s': %s" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "cannot open stripped file ‘%s’ for module '%s': %s" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "cannot find debug file for module '%s': %s" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "cannot open debug file ‘%s’ for module '%s': %s" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "module ‘%s’ file ‘%s’ is not stripped" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "cannot cache section addresses for module '%s': %s" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "no matching modules found" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "matched more than one module" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6563,7 +7021,7 @@ msgstr "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6612,3 +7070,15 @@ msgstr "" "if none was found, or . if an ELF image is available but not from any named " "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." + +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "Run executable" + +#: tests/dwflmodtest.c:213 +msgid "Additionally show function names" +msgstr "Additionally show function names" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "Show instances of inlined functions" diff --git a/po/es.gmo b/po/es.gmo index 1485c39..6843e51 100644 Binary files a/po/es.gmo and b/po/es.gmo differ diff --git a/po/es.po b/po/es.po index 84ba76a..ba58653 100644 --- a/po/es.po +++ b/po/es.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: elfutils.master.es\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" "PO-Revision-Date: 2011-01-10 15:17-0300\n" "Last-Translator: Claudio Rodrigo Pereyra Diaz \n" @@ -24,8 +24,28 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Country: ARGENTINA\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" + +#: lib/color.c:190 src/objdump.c:738 +#, fuzzy, c-format +msgid "cannot allocate memory" +msgstr "No se puede asignar sección PLT: %s" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "memoria agotada" @@ -35,7 +55,7 @@ msgstr "memoria agotada" msgid "no error" msgstr "ningún error" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "memoria agotada" @@ -74,7 +94,7 @@ msgstr "error durante salida de datos" msgid "no backend support available" msgstr "No hay soporte de segundo plano" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "error desconocido" @@ -100,122 +120,135 @@ msgid "no DWARF information" msgstr "Sin información de DWARF" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "No hay archivo ELF" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "no se puede obtener el encabezamiento ELF" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "sin implementar" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "comando inválido" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "versión inválida" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "Archivo inválido" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "No se hallaron entradas" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "DWARF inválido" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "no hay datos de cadena" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "no hay valor de dirección" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "no hay valor constante" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "no hay valor de referencia" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "valor de la referencia inválido" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr ".debug_line section faltante" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr ".debug_line section inválida" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "información de depuración muy grande" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "versión DWARF inválida" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "Índice de directorio inválido" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "dirección fuera de rango" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "valor de lista sin ubicación" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "sin datos de bloque " -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "Índice de línea inválido" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "Índice de dirección de rango inválido" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "dirección de rango no coincidente" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "sin valor de bandera" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "desplazamiento inválido" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr ".debug_ranges section faltante" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "sección CFI inválida" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +#, fuzzy +msgid "invalid opcode" +msgstr "operando inválido" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "Opciones de selección de entrada:" @@ -247,7 +280,7 @@ msgstr "Busca direcciones en el kernel que está ejecutándose" msgid "Kernel with all modules" msgstr "Kernel con todos los módulos" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "Ruta de búsqueda para archivos debugingfo independientes" @@ -272,7 +305,12 @@ msgstr "imposible encontrar kernel o módulos" msgid "cannot read ELF core file: %s" msgstr "No se puede leer archivo core ELF: %s" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +#, fuzzy +msgid "Not enough memory" +msgstr "memoria agotada" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "No hay módulos reconocidos en el archivo core" @@ -433,82 +471,82 @@ msgstr "Parámetro inválido" msgid "Not an ET_CORE ELF file" msgstr "no es un archivo ELF válido" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "No hay segundo plano (Backend)" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr ": %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, fuzzy, c-format msgid "unknown SDT version %u\n" msgstr "versión desconocida" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, fuzzy, c-format msgid "invalid SDT probe descriptor\n" msgstr "descriptor de archivo inválido" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr "" -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr "" -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr "" -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr "" -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr "" -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr "" -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " Build ID: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr " Versión del Enlazador: %.*s\n" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " OS: %s, ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "Autónomo" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr ": %d" @@ -533,7 +571,7 @@ msgstr "tamaño inválido del operando fuente" msgid "invalid size of destination operand" msgstr "tamaño inválido del operando destino" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "codificación inválida" @@ -614,8 +652,8 @@ msgstr "no coinciden los datos/scn" msgid "invalid section header" msgstr "encabezamiento de sección inválida" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "datos inválidos" @@ -659,66 +697,119 @@ msgstr "" msgid "file has no program header" msgstr "el archivo no tiene encabezamiento de programa" +#: libelf/elf_error.c:237 +#, fuzzy +msgid "invalid section type" +msgstr "sección inválida" + +#: libelf/elf_error.c:242 +#, fuzzy +msgid "invalid section flags" +msgstr "sección inválida" + +#: libelf/elf_error.c:247 +#, fuzzy +msgid "section does not contain compressed data" +msgstr "sección [%2zu] '%s' no debe ser ejecutable\n" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "" + +#: libelf/elf_error.c:257 +#, fuzzy +msgid "unknown compression type" +msgstr "tipo desconocido" + +#: libelf/elf_error.c:262 +#, fuzzy +msgid "cannot compress data" +msgstr "no pueden copiar datos de sección: %s" + +#: libelf/elf_error.c:267 +#, fuzzy +msgid "cannot decompress data" +msgstr "no pueden copiar datos de sección: %s" + #: src/addr2line.c:58 -msgid "Output selection options:" -msgstr "Opciones de selección de salida:" +#, fuzzy +msgid "Input format options:" +msgstr "Opciones de selección de entrada:" + +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." +msgstr "Manejar direcciones como compensaciones relativas a sección de NOMBRE." + +#: src/addr2line.c:62 +#, fuzzy +msgid "Output format options:" +msgstr "Formato de salida:" -#: src/addr2line.c:59 +#: src/addr2line.c:63 +#, fuzzy +msgid "Print address before each entry" +msgstr "Imprimir nombre de archivo antes de cada cadena." + +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Mostrar sólo nombres de base de ficheros fuente" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "" "Mostrar nombres de fichero absolutos mediante directorio de compilación" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "También mostrar nombres de función" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "También mostrar símbolo o nombres de sección" -#: src/addr2line.c:64 +#: src/addr2line.c:69 #, fuzzy msgid "Also show symbol and the section names" msgstr "También mostrar símbolo o nombres de sección" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "También mostrar marcas de líneas de tabla" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "Manejar direcciones como compensaciones relativas a sección de NOMBRE." - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Misceláneos:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" "Localizar archivos fuente e información de línea para DIRECCIONES (en a.out " "por defecto)." -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[DIREC...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -731,281 +822,294 @@ msgstr "" "garantía, ni siquiera para SU COMERCIALIZACIÓN o PARA SER USADO CON UN FIN " "DETERMINADO.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "Escrito por %s.\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "Sintaxis de sección requiere exactamente un módulo" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "Compensación %# se encuentra fuera de sección '%s'" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "no se puede encontrar símbolo '%s'" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "compensación %# se encuentra fuera de contenido de '%s'" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "Comandos:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Borrar archivos de un archivo" -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Desplazar ficheros en archivo." -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Imprimir ficheros en archivo." -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Adición rápida de ficheros para archivar" -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Remplazar fichero existente o insertar uno nuevo en el archivo." -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Mostrar contenido de archivo" -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "extraer ficheros de un archivo" -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Modificadores de comandos:" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Preservar fechas originales." -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Usar instancia [COUNT] de nombre." -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "No remplazar los archivos existentes por los archivos extractados." -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Permitir truncamiento del nombre de archivo de ser necesario." -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Proporcionar salida detallada" -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Forzar regeneración de tabla de símbolos." -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Insertar archivo después de [MIEMBRO]." -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Introducir fichero antes de [MIEMBRO]." -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "Igual que -b." -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Suprimir mensaje cuando se tenga que crear la biblioteca." -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Usar la ruta total para fichero coincidente." -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Actualizar sólo ficheros antiguos en archivo." -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Crear, modificar, y extraer de archivos." -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[MIEMBRO] [CONTAR] ARCHIVO [FICHERO...]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a', 'b', é 'i' sólo se permiten con las opciones 'm' y 'r'." -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "Parámetro MIEMBRO requerido para modificadores 'a', 'b', e 'i'" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "'N' sólo es significativa con las opciones `x' y `d'." -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "Parámetro CONTAR requerido" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "Parámetro CONTAR inválido %s" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "'%c' es sólo significativo con la opción 'x'" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "nombre de archivo requerido" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "Más de una operación especificada" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "Imposible abrir el archivo '%s'" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "Imposible abrir el archivo '%s': %s" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: no es un fichero de archivo" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "no sepuede stat el archivo '%s'" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "no hay entrada %s en archivo\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "Falló al crear la tabla de dispersión" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "no sepuede insertar en tabla de dispersión" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "no se puede stat '%s'" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "no se puede leer el contenido de %s: %s" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr " Imposible abrir %.*s" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "Falló al escribir %s" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "No se puede cambiar el modo de %s" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "No puede cambiar tiempo de modificación de %s" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "no sepuede renombrar fichero temporal para %.*s" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "no sepuede crear fichero nuevo" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "no se encuentra miembro de posición %s " -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: ¡no hay entrada %s en archive!\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "no sepuede abrir %s" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "no sepuede efectuar stat %s" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr " %s no es un fichero ordinario " -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "no sepuede obtener descriptor ELF para %s: %s\n" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "no sepuede leer %s: %s" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1086,141 +1190,148 @@ msgstr "no se puede obtener un conteo de encabezado de programa de '%s': %s" msgid "%s %s diff: program header count" msgstr "%s %s diff: encabezado de programa" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, fuzzy, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "%s %s differ: sección [%zu,%zu] contenido '%s'" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "No se puede obtener contenido de sección %zu en '%s': %s" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, fuzzy, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "" +"\n" +"La tabla de símbolos [%2u] '%s' contiene entrada %u:\n" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "No se puede obtener símbolo en '%s': %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "%s %s differ: tabla de símbolos [%zu]" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s differ: tabla de símbolos [%zu,%zu]" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "No se puede obtener contenido de sección %zu en '%s': %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, fuzzy, c-format msgid "%s %s differ: build ID length" msgstr "%s %s differ: brecha" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, fuzzy, c-format msgid "%s %s differ: build ID content" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s differ: sección [%zu,%zu] contenido '%s'" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s differ: cantidad desigual de secciones importantes" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "no se pueden cargar los datos de '%s': %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" "no se puede obtener entrada de encabezamiento de programa %d de '%s': %s" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s differ: encabezamiento de programa %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "%s %s differ: brecha" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Valor inválido '%s' para parámetro --gaps" -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "Imposible abrir '%s'" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "No puede crear descriptor ELF para '%s': %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "no se puede crear el descriptor EBL para '%s'" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "No se puede obtener el encabezamiento de sección %zu: %s" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "No se puede obtener contenido de sección %zu: %s" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "No se puede obtener reubicación: %s" @@ -1249,11 +1360,11 @@ msgstr "" msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "Chequeo minucioso de ficheros ELF de acuerdo con gABI/psABI " -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "FICHERO..." -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "no se puede abrir el fichero de entrada" @@ -1272,7 +1383,7 @@ msgstr "error al cerrar el descriptor ELF: %s\n" msgid "No errors" msgstr "No hay errores" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "Falta el nombre de archivo.\n" @@ -1405,7 +1516,7 @@ msgstr "tamaño inválido del encabezamiento de sección: %hd\n" msgid "invalid section header position or size\n" msgstr "tamaño o posición no válidos del encabezamiento de sección\n" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1414,7 +1525,7 @@ msgstr "" "sección [%2d] '%s': sección con la bandera SHF_GROUP no es parte de una " "sección de grupo\n" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1422,14 +1533,14 @@ msgstr "" "sección [%2d] '%s': el grupo de sección [%2zu] '%s' no precede al miembro de " "grupo\n" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "Sección [%2d] '%s': No se pueden obtener datos de sección\n" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1438,7 +1549,7 @@ msgstr "" "sección [%2d] '%s': nombrado como una tabla de cadena para la sección [%2d] " "'%s' pero el tipo no es SHT_STRTAB\n" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1447,39 +1558,39 @@ msgstr "" "sección [%2d] '%s': la tabla de símbolo no puede tener más de una sección de " "índice extendido\n" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "" "sección [%2u] '%s': el tamaño de la entrada no coincide con ElfXX_Sym\n" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "Sección [%2d] '%s': no se puede obtener símbolo %d: %s\n" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "Sección [%2d] '%s': '%s' en la entrada zeroth no es cero\n" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "sección [%2d] '%s': XINDEX en la entrada zeroth no es cero\n" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "sección [%2d] '%s': no es posible obtener el símbolo %zu: %s\n" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "sección [%2d] '%s': símbolo %zu: valor de nombre inválido\n" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1488,7 +1599,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: el índice de sección es demasiado extenso, " "pero no la sección extendida de la sección de índice\n" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1497,27 +1608,27 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: XINDEX es utilizado para índice que pueda " "caber en st_shndx (%)\n" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "sección [%2d] '%s': símbolo %zu: índice de sección inválido\n" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "sección [%2d] '%s': símbolo %zu: tipo desconocido\n" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "sección [%2d] '%s': símbolo %zu: asociación de símbolo desconocida\n" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "Sección [%2d] '%s': símbolo %zu: símbolo único no de tipo de objeto\n" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1525,25 +1636,25 @@ msgstr "" "sección [%2d] '%s': símbolo %zu: COMMON solo es permitido en archivos " "realojables\n" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolos locales COMMON no tienen sentido\n" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" "Sección [%2d] '%s': símbolo %zu: función en sección COMMON no tiene sentido\n" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "sección [%2d] '%s': símbolo %zu: st_value fuera de límites\n" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1552,7 +1663,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu no se ajusta totalmente en la sección [%2d] " "'%s'\n" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1561,7 +1672,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: sección de referencia [%2d] '%s' no tiene " "establecida bandera SHF_TLS\n" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1570,7 +1681,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: st_value fuera de límites de sección de " "referencia [%2d] '%s'\n" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" @@ -1578,7 +1689,16 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo TLS, pero no hay entrada de " "programa TLS\n" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" +"Sección [%2d] '%s': símbolo %zu: símbolo TLS, pero no hay entrada de " +"programa TLS\n" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1587,7 +1707,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: st_value falta sección de referencia [%2d] " "'%s'\n" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1596,7 +1716,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo local fuera del rango descrito en " "sh_info\n" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1605,12 +1725,12 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo non-local fuera del rango descrito " "en sh_info\n" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "Sección [%2d] '%s': símbolo %zu: símbolo de sección non-local\n" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1619,7 +1739,7 @@ msgstr "" "Sección [%2d] '%s': símbolo _GLOBAL_OFFSET_TABLE_ se refiere a sección " "errada [%2d]\n" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1628,7 +1748,7 @@ msgstr "" "Sección [%2d] '%s': símbolo _GLOBAL_OFFSET_TABLE_ se refiere a sección [%2d] " "'%s'\n" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1637,7 +1757,7 @@ msgstr "" "Sección [%2d] '%s': valor del símbolo _GLOBAL_OFFSET_TABLE_ %# no " "coincide con dirección de sección %s %#\n" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1646,7 +1766,7 @@ msgstr "" "Sección [%2d] '%s': tamaño de símbolo _GLOBAL_OFFSET_TABLE_ % no " "coincide con tamaño de sección %s %\n" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1655,7 +1775,7 @@ msgstr "" "Sección [%2d] '%s': símbolo _GLOBAL_OFFSET_TABLE_ presente, pero no. sección " "got\n" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1664,7 +1784,7 @@ msgstr "" "sección [%2d] '%s': Valor de símbolo _DYNAMIC_ %# no coincide con la " "dirección de segmento%#\n" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1673,7 +1793,7 @@ msgstr "" "Sección [%2d] '%s': tamaño de símbolo _DYNAMIC % no coincide con " "tamaño de segmento %\n" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1682,24 +1802,29 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo en tabla de símbolos dinámicos sin " "visibilidad predeterminada\n" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" "Sección [%2d] '%s': símbolo %zu: bit desconocido establecido en st_other\n" #: src/elflint.c:1082 +#, fuzzy, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "Sección [%2d] '%s': No se pueden obtener datos de sección\n" + +#: src/elflint.c:1098 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "Sección [%2d] '%s': DT_RELCOUNT utilizada para esta sección RELA\n" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" "Sección [%2d] '%s': valor DT_RELCOUNT %d demasiado alto para esta sección\n" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1708,7 +1833,7 @@ msgstr "" "Sección [%2d] '%s': reubicaciones relativas después de que el %d de índice " "haya sido especificado por DT_RELCOUNT\n" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1717,49 +1842,50 @@ msgstr "" "Sección [%2d] '%s': reubicación no-relativa en %zu de índice; DT_RELCOUNT " "especificado %d reubicaciones relativas\n" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "sección [%2d] '%s': DT_RELACOUNT utilizado para esta sección REL\n" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "Sección [%2d] '%s': índice de sección de destino inválido\n" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "Sección [%2d] '%s': tipo de sección de destino inválido\n" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "Sección [%2d] '%s': sh_info debe ser cero\n" -#: src/elflint.c:1245 -#, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" +#: src/elflint.c:1263 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "Sección [%2d] '%s': no reubicaciones para secciones de fusión posibles\n" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" "Sección [%2d] '%s': tamaño de entrada de sección no coincide con ElfXX_Rela\n" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "Reubicación de bandera pero no hay segmento de sólo lectura\n" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "Sección [%2d] '%s': reubicación %zu: tipo inválido\n" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1768,12 +1894,12 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: tipo de reubicación inválido para el " "tipo de archivo\n" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "Sección [%2d] '%s': reubicación %zu: índice de símbolo inválido\n" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1782,12 +1908,12 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: sólo el símbolo '_GLOBAL_OFFSET_TABLE_' " "puede utilizarse con %s\n" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "Sección [%2d] '%s': reubicación %zu: compensación fuera de límites\n" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1796,7 +1922,7 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: reubicación de copia con símbolo de " "tipo %s\n" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1805,61 +1931,70 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: sección de sólo-lectura modificada, " "pero no se estableció bandera de reubicación\n" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" "Sección [%2d] '%s': las reubicaciones se hacen con datos cargados y " "descargados\n" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "Sección [%2d] '%s': no puede obtener reubicación %zu: %s\n" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "más de una sección dinámica presente\n" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, fuzzy, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" +"sección [%2d] '%s': nombrado como una tabla de cadena para la sección [%2d] " +"'%s' pero el tipo no es SHT_STRTAB\n" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" "Sección [%2d] '%s': tamaño de entrada de sección no coincide con ElfXX_Dyn\n" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "Sección [%2d] '%s': sh_info no es cero\n" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" "Sección [%2d] '%s': no puede obtener entrada de sección dinámica %zu: %s\n" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "Sección [%2d] '%s': entradas non-DT_NULL siguen a la entrada DT_NULL\n" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "Sección [%2d] '%s': entrada %zu: etiqueta desconocida\n" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "Sección [%2d] '%s': entrada %zu: más de una entrada con etiqueta %s\n" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "Sección [%2d] '%s': entrada %zu: nivel 2 etiqueta %s utilizada\n" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" @@ -1867,7 +2002,7 @@ msgstr "" "Sección [%2d] '%s': entrada %zu: el valor DT_PLTREL debe ser DT_REL or " "DT_RELA\n" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -1876,14 +2011,14 @@ msgstr "" "Sección [%2d] '%s': entrada %zu: puntero no coincide con dirección de " "sección [%2d] '%s' al que hace referencia sh_link\n" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" "Sección [%2d] '%s': entrada %zu: valor %s debe apuntar en segmento cargado\n" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -1892,46 +2027,46 @@ msgstr "" "sección [%2d] '%s': entrada %zu: valor %s debe ser compensación válida en " "sección [%2d] '%s'\n" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "Sección [%2d] '%s': contiene entrada %s pero no %s\n" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "Sección [%2d] '%s': etiqueta obligatoria %s no está presente\n" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "Sección [%2d] '%s': no hay sección de dispersión presente\n" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "Sección [%2d] '%s': no todas las %s, %s, y %s están presentes\n" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" "Sección [%2d] '%s': etiqueta %s faltante en DSO marcada durante el pre-" "enlace\n" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" "Sección [%2d] '%s': archivo no-DSO marcado como dependencia durante el pre-" "enlace\n" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "Sección [%2d] '%s': etiqueta %s faltante en pre-enlace ejecutable\n" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" @@ -1939,31 +2074,37 @@ msgstr "" "Sección [%2d] '%s': sólo los archivos reubicables pueden tener índice de " "sección extendido\n" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" "Sección [%2d] '%s': índice de sección extendido no para tabla de símbolos\n" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, fuzzy, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "" +"Sección [%2d] '%s': índice de sección extendido no para tabla de símbolos\n" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "no se puede obtener sección para símbolos\n" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "Sección [%2d] '%s': tamaño de entrada no coincide con Elf32_Word\n" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" "Sección [%2d] '%s': tabla de índice extendida demasiado pequeña para tabla " "de símbolos\n" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -1972,24 +2113,24 @@ msgstr "" "Sección [%2d] '%s': índice de sección extendida en sección [%2zu] '%s' se " "refiere a la misma tabla de símbolos\n" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "símbolo 0 debe tener índice de sección extendida cero\n" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "no puede obtener datos para símbolo %zu\n" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" "índice de sección extendida es % pero índice de símbolo no es " "XINDEX\n" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" @@ -1997,37 +2138,42 @@ msgstr "" "Sección [%2d] '%s': sección de tabla de dispersión es demasiado pequeña (es " "%ld, se espera %ld)\n" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "Sección [%2d] '%s': índice de la cadena es demasiado grande\n" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" "Sección [%2d] '%s': referencia de cubetas de dispersión %zu fuera de " "límites\n" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" "Sección [%2d] '%s': referencia de cadena de dispersión %zu fuera de límites\n" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" "Sección [%2d] '%s': referencia de cadena de dispersión % fuera de " "límites\n" -#: src/elflint.c:2081 -#, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" +#: src/elflint.c:2107 +#, fuzzy, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "Sección [%2d] '%s': no puede obtener datos: %s\n" + +#: src/elflint.c:2119 +#, fuzzy, c-format +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "Sección [%2d] '%s': tamaño de bitmask no es potencia de 2: %u\n" -#: src/elflint.c:2092 +#: src/elflint.c:2135 #, fuzzy, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " @@ -2036,14 +2182,14 @@ msgstr "" "Sección [%2d] '%s': sección de tabla de dispersión es demasiado pequeña (es " "%ld, se espera al menos least%ld)\n" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" "Sección [%2d] '%s': segundo cambio de función de dispersión demasiado " "grande: %u\n" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" @@ -2051,7 +2197,7 @@ msgstr "" "Sección [%2d] '%s': cadena de dispersión para cubetas %zu inferior a " "polarización de índice de símbolo\n" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2060,7 +2206,7 @@ msgstr "" "Sección [%2d] '%s': el símbolo %u al que se hace referencia en cadena para " "cubeta %zu es indefinido\n" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" @@ -2068,13 +2214,21 @@ msgstr "" "Sección [%2d] '%s': valor de dispersión para símbolo %u en cadena para " "cubeta %zu está errado\n" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "" +"Sección [%2d] '%s': valor de dispersión para símbolo %u en cadena para " +"cubeta %zu está errado\n" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" "Sección [%2d] '%s': cadena de dispersión para cubeta %zu fuera de limites\n" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" @@ -2082,38 +2236,43 @@ msgstr "" "Sección [%2d] '%s': referencia de símbolo en cadena para cubeta %zu fuera de " "límites\n" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" "Sección [%2d] '%s': bitmask no coincide con nombres en la tabla de " "dispersión\n" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" "Sección [%2d] '%s': archivos reubicables no pueden tener tablas de " "dispersión\n" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" "Sección [%2d] '%s': tabla de dispersión no para tabla de símbolos dinámicos\n" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, fuzzy, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "Sección [%2d] '%s': índice de sección de destino inválido\n" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" "Sección [%2d] '%s': tamaño incorrecto de entrada de tabla de dispersión\n" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "Sección [%2d] '%s': no marcada para ser asignada\n" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2122,19 +2281,46 @@ msgstr "" "Sección [%2d] '%s': tabla de dispersión no tiene ni siquiera espacio para " "entradas administrativas iniciales\n" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" "sh_link en secciones de dispersión [%2zu] '%s' y [%2zu] '%s' no son " "idénticas\n" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "sección [%2zu] '%s' no debe ser ejecutable\n" + +#: src/elflint.c:2409 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "Sección [%2d] '%s': grupo de sección sin palabra de banderas\n" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "sección [%2zu] '%s' debe ser asignada\n" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" + +#: src/elflint.c:2522 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "Sección [%2zu]: nombre inválido\n" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "Sección [%2zu] '%s': referencia al índice de símbolo 0\n" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2143,7 +2329,7 @@ msgstr "" "Símbolo %d nombrado en nueva tabla de dispersión en [%2zu] '%s' pero no en " "la tabla de dispersión anterior en [%2zu] '%s'\n" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2152,12 +2338,12 @@ msgstr "" "Símbolo %d nombrado en la tabla de dispersión anterior en [%2zu] '%s' pero " "no en la nueva tabla de dispersión en [%2zu] '%s'\n" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "Sección [%2d] '%s': nonzero sh_%s para sección NULL\n" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" @@ -2165,108 +2351,113 @@ msgstr "" "Sección [%2d] '%s': grupos de sección sólo permitidos en archivos de objeto " "reubicables\n" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "Sección [%2d] '%s': no puede obtener tabla de símbolos: %s\n" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" "Sección [%2d] '%s': referencia de sección en sh_link no es una tabla de " "símbolos\n" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "Sección [%2d] '%s': índice de símbolo inválido en sh_info\n" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "Sección [%2d] '%s': sh_flags no cero\n" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "Sección [%2d] '%s': no puede obtener símbolo para firma\n" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, fuzzy, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "Sección [%2d] '%s': no puede obtener símbolo para firma\n" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "" "sección [%2d] '%s': el símbolo de firma no puede ser una cadena vacía\n" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "Sección [%2d] '%s': sh_flags no establecida correctamente\n" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "Sección [%2d] '%s': no puede obtener datos: %s\n" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" "Sección [%2d] '%s': tamaño de sección no es múltiplo de tamaño de " "(Elf32_Word)\n" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "Sección [%2d] '%s': grupo de sección sin palabra de banderas\n" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "Sección [%2d] '%s': grupo de sección sin miembro\n" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "Sección [%2d] '%s': grupo de sección con sólo un miembro\n" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "Sección [%2d] '%s': banderas de grupo de sección desconocido\n" -#: src/elflint.c:2538 -#, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" +#: src/elflint.c:2693 +#, fuzzy, c-format +msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "Sección [%2d] '%s': índice de sección %Zu fuera de rango\n" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" "Sección [%2d] '%s': no se puede obtener encabezamiento de sección para " "elemento %zu: %s\n" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "Sección [%2d] '%s': grupo de sección contiene otro grupo [%2d] '%s'\n" -#: src/elflint.c:2560 -#, c-format +#: src/elflint.c:2715 +#, fuzzy, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" "Sección [%2d] '%s': elemento %Zu hace referencia a sección [%2d] '%s' sin " "establecer bandera SHF_GROUP\n" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "Sección [%2d] '%s' está contenida en más de un grupo de sección\n" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2275,7 +2466,7 @@ msgstr "" "Sección [%2d] '%s' se refiere en sh_link a la sección [%2d] '%s' la cual no " "es una tabla de símbolos dinámicos\n" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2284,29 +2475,29 @@ msgstr "" "Sección [%2d] '%s' tiene un número diferente de entradas a la de la tabla de " "símbolos [%2d] '%s'\n" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" "Sección [%2d] '%s': el símbolo %d: no se pueden leer datos de versión\n" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" "Sección [%2d] '%s': el símbolo %d: el símbolo local con alcance mundial\n" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "Sección [%2d] '%s': símbolo %d: símbolo local con versión\n" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "Sección [%2d] '%s': símbolo %d: índice de versión inválida %d\n" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" @@ -2314,7 +2505,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %d: índice de versión %d es para versión " "definida\n" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" @@ -2322,46 +2513,46 @@ msgstr "" "Sección [%2d] '%s': símbolo %d: índice de versión %d es para la versión " "solicitada\n" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "Más de una sección de referencia de versión presente\n" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "Sección [%2d] '%s': sh_link no se enlaza a la tabla de cadenas\n" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "Sección [%2d] '%s': entrada %d tiene versión %d errada\n" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene compensación errada de datos " "auxiliares\n" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "Sección [%2d] '%s': entrada %d tiene referencia de archivo inválida\n" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "Sección [%2d] '%s': %d hace referencia a dependencia desconocida\n" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" "sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene bandera " "desconocida\n" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2370,7 +2561,7 @@ msgstr "" "Sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene referencia de " "nombre inválida\n" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2379,7 +2570,7 @@ msgstr "" "Sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene valor de " "dispersión: %#x, esperado %#x\n" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2388,7 +2579,7 @@ msgstr "" "sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene nombre duplicado " "'%s'\n" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" @@ -2396,53 +2587,62 @@ msgstr "" "sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene próximo campo " "errado\n" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" "sección [%2d] '%s': entrada %d tiene compensación inválida para próxima " "entrada\n" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" +"sección [%2d] '%s': entrada %d tiene compensación inválida para próxima " +"entrada\n" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "más de una definición de versión presente de sección\n" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "Sección [%2d] '%s': más de una definición de BASE\n" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" "Sección [%2d] '%s': definición de BASE debe tener índice VER_NDX_GLOBAL\n" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "Sección [%2d] '%s': entrada %d tiene bandera desconocida\n" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "Sección [%2d] '%s': entrada %d tiene referencia de nombre inválida\n" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene valor de dispersión errado: %#x, " "esperado %#x\n" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene nombre de versión duplicado '%s'\n" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" @@ -2450,34 +2650,34 @@ msgstr "" "Sección [%2d] '%s': entrada %d tiene referencia de nombre inválida en datos " "auxiliares\n" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene próximo campo errado en datos " "auxiliares\n" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "Sección [%2d] '%s': no hay definición de BASE\n" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "Sección [%2d] '%s': desconocida versión principal '%s'\n" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "Sección [%2d] '%s': sección de atributos de objeto vacío\n" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "Sección[%2d] '%s': formato de atributo no reconocido\n" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" @@ -2485,21 +2685,21 @@ msgstr "" "Sección[%2d] '%s': compensación %zu: campo de longitud cero en sección de " "atributo\n" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" "Sección[%2d] '%s': compensación %zu: longitud inválida en sección de " "atributo\n" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" "Sección[%2d] '%s': compensación %zu: cadena de nombre de proveedor sin " "terminar\n" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" @@ -2507,12 +2707,12 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: sin fin ULEB128 en etiqueta de sub-" "sección de atributo\n" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "Sección [%2d] '%s': compensación %zu: sección de atributo truncado\n" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" @@ -2520,7 +2720,7 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: campo de longitud cero length en sub-" "sección de atributo\n" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" @@ -2528,7 +2728,7 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: longitud inválida en sub-sección de " "atributo\n" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" @@ -2536,26 +2736,26 @@ msgstr "" "Sección[%2d] '%s': compensación %zu: sub-sección de atributo tiene etiqueta " "inesperada %u\n" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" "Sección[%2d] '%s': compensación %zu: sin fin ULEB128 en etiqueta de " "atributo\n" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" "Sección [%2d] '%s': compensación %zu: cadena sin terminar en atributo\n" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" "Sección [%2d] '%s': compensación %zu: etiqueta de atributo no reconocida %u\n" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" @@ -2563,12 +2763,12 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: no reconocido %s valor de atributo " "%\n" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "Sección [%2d] '%s': compensación %zu: proveedor '%s' desconocido\n" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" @@ -2576,47 +2776,47 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: extra bytes después de la última " "sección de atributo\n" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "no puede obtener encabezamiento de sección de sección zeroth\n" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "Sección zeroth tiene nombre nonzero\n" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "Sección zeroth tiene tipo nonzero\n" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "Sección zeroth tiene banderas nonzero\n" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "Sección zeroth tiene dirección nonzero\n" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "Sección zeroth tiene compensación nonzero\n" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "Sección zeroth tiene valor de alineación nonzero\n" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "Sección zeroth tiene valor de tamaño de entrada nonzero\n" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2625,7 +2825,7 @@ msgstr "" "Sección zeroth tiene valor de tamaño nonzero mientras que el encabezamiento " "ELF tiene valor shnum nonzero\n" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2634,7 +2834,7 @@ msgstr "" "Sección zeroth tiene valor de enlace nonzero mientras que el encabezamiento " "ELF no señala sobreflujo en shstrndx\n" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2643,27 +2843,27 @@ msgstr "" "la sección zeroth tiene un valor de enlace distinto a cero mientras que el " "encabezamiento ELF no señala desbordamiento en phnum\n" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "No se puede obtener encabezamiento para sección [%2zu] '%s': %s\n" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "Sección [%2zu]: nombre inválido\n" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "Sección [%2d] '%s' tiene tipo errado: %s esperado, es %s\n" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "Sección [%2zu] '%s' tiene banderas erradas: %s esperado, es %s\n" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" @@ -2671,12 +2871,12 @@ msgstr "" "Sección [%2zu] '%s' tiene banderas erradas: %s esperado y posiblemente %s, " "es %s\n" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "Sección [%2zu] '%s' presente en archivo objeto\n" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" @@ -2684,7 +2884,7 @@ msgstr "" "Sección [%2zu] '%s' tiene bandera SHF_ALLOC establecida pero no es un " "segmento cargable\n" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2693,7 +2893,7 @@ msgstr "" "Sección [%2zu] '%s' no tiene bandera SHF_ALLOC establecida pero hay " "segmentos cargables\n" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" @@ -2701,22 +2901,22 @@ msgstr "" "Sección [%2zu] '%s' es tabla de índice de sección de extensión en archivo no-" "objeto\n" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "Sección [%2zu] '%s': tamaño no es múltiplo de tamaño de entrada\n" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "no se puede obtener encabezamiento de sección\n" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "sección [%2zu] '%s' tiene tipo %d incompatible \n" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" @@ -2724,54 +2924,76 @@ msgstr "" "Sección [%2zu] '%s' contiene bandera(s) de procesador-específico inválidas " "%#\n" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "Sección [%2zu] '%s' contiene bandera(s) desconocidas %#\n" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" "Sección [%2zu] '%s': dirección de secciones de datos de hilo-local no cero\n" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, fuzzy, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "" +"Sección [%2zu] '%s': dirección de secciones de datos de hilo-local no cero\n" + +#: src/elflint.c:3918 +#, fuzzy, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "Sección [%2d] '%s': no hay sección de dispersión presente\n" + +#: src/elflint.c:3924 +#, fuzzy, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "Sección [%2d] '%s': grupo de sección con sólo un miembro\n" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" "Sección [%2zu] '%s': referencia de sección inválida en valor de enlace\n" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" "Sección [%2zu] '%s': referencia de sección inválida en valor de información\n" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" "Sección [%2zu] '%s': bandera de cadenas establecida sin bandera de fusión\n" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" "Sección [%2zu] '%s': bandera de fusión establecida pero tamaño de entrada es " "cero\n" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" "Sección [%2zu] '%s' tiene un tipo %d inesperado para una sección ejecutable\n" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, fuzzy, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "sección [%2zu] '%s' no debe tener permiso de escritura\n" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "Sección [%2zu] '%s' es tanto de ejecución como de escritura\n" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -2780,7 +3002,7 @@ msgstr "" "Sección [%2zu] '%s' no contenida totalmente en segmento de entrada de " "encabezamiento de programa %d\n" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -2789,7 +3011,16 @@ msgstr "" "Sección [%2zu] '%s' no tiene tipo NOBITS pero es leída desde el archivo en " "segmento de entrada de encabezamiento de programa %d\n" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, fuzzy, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" +"Sección [%2zu] '%s' no tiene tipo NOBITS pero es leída desde el archivo en " +"segmento de entrada de encabezamiento de programa %d\n" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -2798,18 +3029,18 @@ msgstr "" "Sección [%2zu] '%s' no tiene tipo NOBITS pero no es leída desde el fichero " "en segmento de entrada de encabezamiento de programa %d\n" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "Sección [%2zu] '%s' es ejecutable en segmento no ejecutable %d\n" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" "Sección [%2zu] '%s' es de escritura en segmento que no es de escritura %d\n" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" @@ -2817,7 +3048,7 @@ msgstr "" "Sección [%2zu] '%s': asignación de bandera establecida pero sección no en " "ningún segmento cargado\n" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -2826,7 +3057,7 @@ msgstr "" "Sección [%2zu] '%s': encabezamiento ELF dice esta es la tabla de cadena de " "encabezamiento de sección, pero el tipo no es SHT_TYPE\n" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" @@ -2834,32 +3065,32 @@ msgstr "" "sección [%2zu] '%s': ficheros reubicables no pueden tener tablas de símbolos " "dinámicos\n" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "Más de una tabla de símbolos presente\n" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" "Entrada de encabezamiento de programa INTERP pero no la sección .interp\n" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" "segmento cargable [%u] es ejecutable pero no contiene secciones ejecutables\n" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" "segmento cargable [%u] es de escritura pero contiene secciones protegidas " "contra escritura\n" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -2868,82 +3099,82 @@ msgstr "" "Sección no .gnu.versym presente, pero la sección .gnu.versym_d o la sección ." "gnu.versym_r existen\n" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "Duplicar índice de versión %d\n" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" "Sección .gnu.versym presente sin las secciones .gnu.versym_d o .gnu." "versym_r\n" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" "phdr[%d]: tipo de nota de fichero core desconocido % en compensación " "%\n" -#: src/elflint.c:4028 -#, c-format +#: src/elflint.c:4286 +#, fuzzy, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" "Sección [%2d] '%s': tipo de nota de fichero core desconocido % en " "compensación %Zu\n" -#: src/elflint.c:4051 -#, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" +#: src/elflint.c:4309 +#, fuzzy, c-format +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" "phdr[%d]: tipo de nota de fichero objeto desconocido % en " "compensación %Zu\n" -#: src/elflint.c:4055 -#, c-format +#: src/elflint.c:4313 +#, fuzzy, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" "Sección [%2d] '%s': tipo de nota de fichero objeto desconocido % en " "compensación %Zu\n" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: no hay entradas de nota definidas para el tipo de archivo\n" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: no puede obtener contenido de sección de nota: %s\n" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: extra % bytes después de la última nota\n" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" "Sección [%2d] '%s': no hay entradas de nota definidas para el tipo de " "archivo\n" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" "Sección[%2d] '%s': no se puede obtener el contenido de sección de nota\n" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "Sección[%2d] '%s': extra % bytes después de la última nota\n" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" @@ -2951,139 +3182,145 @@ msgstr "" "Sólo ejecutables, objetos compartidos y ficheros core pueden tener " "encabezamientos de programas\n" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "no se puede obtener entrada de encabezamiento %d: %s\n" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "entrada de encabezamiento de programa %d: tipo %# de entrada de " "encabezamiento de programa desconocido\n" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "Más de una entrada INTERP en encabezamiento de programa\n" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "más de una entrada TLS en encabezamiento de programa\n" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "ejecutable estático no puede tener secciones dinámicas\n" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" "Referencia de sección dinámica en encabezamiento de programa tiene " "compensación errada\n" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" "No coinciden tamaño de sección dinámica en programa y encabezamiento de " "sección\n" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "Más de una entrada GNU_RELRO en encabezamiento de programa\n" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "Segmento cargable GNU_RELRO que se aplica no es de escritura\n" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" "Banderas de segmento cargable [%u] no coinciden con banderas GNU_RELRO [%u]\n" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "Segmento %s no contenido en un segmento cargable\n" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" "Compensación de encabezamiento de programa en encabezamiento ELF y entrada " "PHDR no coinciden" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" "Referencia de tabla de búsqueda de marco de llamada en encabezamiento de " "programa tiene una compensación errada\n" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" "Tamaño de tabla de búsqueda de marco de llamada no coincide con programa y " "encabezamiento de sección\n" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "PT_GNU_EH_FRAME presente pero no la sección.eh_frame_hdr\n" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "tabla de búsqueda de marco de llamada debe ser asignada\n" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "sección [%2zu] '%s' debe ser asignada\n" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "" "tabla de búsqueda de marco de llamada no debe tener permiso de escritura\n" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "sección [%2zu] '%s' no debe tener permiso de escritura\n" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "tabla de búsqueda de marco de llamada no debe ser ejecutable\n" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "sección [%2zu] '%s' no debe ser ejecutable\n" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" "entrada de encabezamiento de programa %d: tamaño de fichero mayor que el " "tamaño de memoria\n" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" "entrada de encabezamiento de programa %d: alineamiento no es potencia de 2\n" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -3092,7 +3329,7 @@ msgstr "" "entrada de encabezamiento de programa %d: compensación de fichero y " "dirección virtual no módulo de alineación\n" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -3101,12 +3338,12 @@ msgstr "" "ejecutable/DSO con sección .eh_frame_hdr no tiene una entrada de " "encabezamiento de programa PT_GNU_EH_FRAME" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "No se puede leer encabezamiento ELF: %s\n" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "Bandera de reubicación de texto establecida pero no necesaria\n" @@ -3128,8 +3365,8 @@ msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "" "Localizar origen de reubicaciones de texto en FICHEROS (a.out por defecto)." -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "[FICHERO...]" @@ -3163,42 +3400,42 @@ msgstr "no hay reubicaciones de texto reportado en '%s'" msgid "while reading ELF file" msgstr "Error al leer fichero ELF" -#: src/findtextrel.c:334 src/findtextrel.c:351 -#, c-format -msgid "cannot get program header index at offset %d: %s" +#: src/findtextrel.c:329 +#, fuzzy, c-format +msgid "cannot get program header count: %s" +msgstr "no se puede obtener memoria para encabezamiento del programa: %s" + +#: src/findtextrel.c:340 src/findtextrel.c:357 +#, fuzzy, c-format +msgid "cannot get program header index at offset %zd: %s" msgstr "" "Nos se puede obtener el índice de encabezamiento de programa en compensación " "%d: %s" -#: src/findtextrel.c:403 -#, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "No se puede obtener encabezamiento de sección %Zu: %s" - -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "No se puede obtener tabla de símbolos %zu en '%s': %s" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "" "No se puede obtener reubicación en índice %d en sección %zu en '%s': %s" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "%s no compilado con -fpic/-fPIC\n" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" "El archivo que contiene la función '%s' no está compilado con -fpic/-fPIC\n" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3207,7 +3444,7 @@ msgstr "" "el fichero que contiene la función '%s' podría no estar compilado con -fpic/-" "fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3216,7 +3453,7 @@ msgstr "" "Tanto el fichero que contiene la función '%s' como el fichero que contiene " "la función '%s' no están compilados con -fpic/-fPIC\n" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3249,350 +3486,350 @@ msgstr "No se puede asignar sección GOTPLT: %s" msgid "initial-executable TLS relocation cannot be used " msgstr "Reubicación TLS ejecutable-inicial no se puede utilizar" -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "Control de fichero de entrada:" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "A partir de ahora incluye archivos completos en la salida." -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "Deja de incluir archivos completos en la salida." -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "FICHERO" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "Inicia un grupo" -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "Termina un grupo." -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "RUTA" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "" "Agrega RUTA a la lista de los directorios en los que se realiza la búsqueda." -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "" "Sólo se define DT_NEEDED para las siguientes bibliotecas dinámicas, si están " "siendo utilizadas" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "Siempre establece DT_NEEDED para las siguientes bibliotecas dinámicas" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "Ignora la variable de entorno LD_LIBRARY_PATH." -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "Control de fichero de salida:" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "Coloca salida en FICHERO." -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "" "Objeto está marcado para no usar ruta de búsqueda predeterminada en tiempo " "de ejecución." -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "Lo mismo que --whole-archive." -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" "Reglas establecidas por defecto para extraer desde el archivo; las " "referencias débiles no son suficientes." -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "Referencias débiles causan extracción del archivo." -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "Permite definiciones múltiples; se utiliza la primera." -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "Habilita/inhabilita símbolos indefinidos en los DSO." -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "Los objetos requieren manipulación inmediata de $ORIGIN." -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "La reubicación no se procesará de forma perezosa." -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "El objeto no se puede descargar en tiempo de ejecución." -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "Marcar objeto a ser inicializado primero." -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "" "Activar/desactivar marca lazy-loading para las siguientes dependencias." -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "Marcar el objeto como no cargable con 'dlopen'" -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "Ignorar/registrar dependencias sobre DSO no utilizados." -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "El DSO generado será una biblioteca del sistema." -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "DIRECCIÓN" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "Establecer dirección de entrada de punto" -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "No enlazar con bibliotecas compartidas." -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "No enlazar con bibliotecas compartidas." -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "Exportar todos los símbolos dinámicos." -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "Descartar todos los símbolos." -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "Descartar los símbolos de depuración." -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "Asumir que pagesize para el sistema de destino sea SIZE." -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "Establecer la ruta de búsqueda tiempo de ejecución DSO." -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "Establecer ruta de tiempo de enlace DSO." -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "Generar objeto compartido dinámico." -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "Generar objeto reubicable" -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "Hacer que un símbolo no asignado a una versión sea reducido a local." -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "Eliminar las secciones no utilizadas." -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "No eliminar las secciones no utilizadas." -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "Establecer soname de objeto compartido." -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "Establecer el nombre de enlazador dinámico." -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "" "Añadir/suprimir adición identificando enlace-editor para .sección de " "comentario." -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "Crear una sección .eh_frame_hdr" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "Establecer el estilo de dispersión un sysv, gnu o ambos." -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "Crear una nota del ID de compilación (md5, sha1 (por defecto), uuid)." -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "Control de volumen desconocido:" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "Mensajes explicativos." -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "Rastrear apertura de ficheros." -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "Intercambiar velocidad por menor utilización de memoria" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "NIVEL" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "Establecer el nivel de optimización a LEVEL." -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "Usar script enlazador en FICHERO." -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "Seleccionar para obtener análisis de información de depuración" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "Leer información de versión de FICHERO." -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "Establecer emulación a NOMBRE." -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "Combinar objeto y archivos de almacenamiento." -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "[FICHERO]..." -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "Se necesita al menos un fichero de entrada" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "Error al preparar vinculación" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "no se puede abrir script enlazador '%s'" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( sin coincidir -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "Solamente una opción de -G y -r es permitida" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "más de un parámetro '-m'" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "opción desconocida `-%c %s'" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "Valor de tamaño de página'%s': ignorado" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "estilo de dispersión inválido '%s'" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "estilo de cuerpo-ID inválido '%s'" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "Se ha dado más de un nombre de archivo de salida." -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "Nivel de optimización inválido `%s'" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "no se permiten grupos -( -) en nido" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "-) sin coincidir -(" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "Opción desconocida '-%c %s'" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "" "no se pudo encontrar un archivo de entrada que determine el formato del " "archivo de salida" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "Inténtelo con una parámetro '-m' apropiado" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "No se puede leer script de versión '%s'" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "Duplicar definición de '%s' en script enlazador" @@ -3640,8 +3877,8 @@ msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "" "Advertencia: el tamaño de `%s' cambió de % en %s a % en %s" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "no se pudieron determinar el número de secciones: %s" @@ -3897,7 +4134,7 @@ msgstr "error interno: sección non-nobits sigue a sección nobits" msgid "cannot get header of 0th section: %s" msgstr "No se puede obtener encabezamiento de sección 0th: %s" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "No se puede actualizar encabezamiento ELF: %s" @@ -3951,8 +4188,8 @@ msgid "while reading linker script '%s': %s at line %d" msgstr "al leer script de enlace '%s': %s en línea %d" #: src/ldscript.y:737 -#, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +#, fuzzy, c-format +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "" "el símbolo '%s' es declarado tanto local como global para la versión sin " "nombre" @@ -3968,7 +4205,7 @@ msgstr "" msgid "default visibility set as local and global" msgstr "la visibilidad establecida por defecto establecida como local y global" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "Selección de salida:" @@ -3996,7 +4233,7 @@ msgstr "Mostrar sólo símbolos indefinidos" msgid "Include index for symbols from archive members" msgstr "Incluir índices para símbolos de miembros de archivo" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "Formato de salida:" @@ -4020,7 +4257,7 @@ msgstr "lo mismo que --format=bsd" msgid "Same as --format=posix" msgstr "lo mismo que --format=posix" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "Utilizar RADIX para imprimir valores de símbolo" @@ -4033,7 +4270,7 @@ msgstr "Marcar símbolos débiles" msgid "Print size of defined symbols" msgstr "Tamaño de impresión de símbolos definidos" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "Opciones de salida:" @@ -4057,28 +4294,28 @@ msgstr "" msgid "List symbols from FILEs (a.out by default)." msgstr "Listar símbolos de FICHEROS (a.out por defecto)." -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 #, fuzzy msgid "Output formatting" msgstr "Formato de salida:" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 -#, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 +#, fuzzy, c-format +msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: ERROR INTERNO %d (%s-%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "error al cerrar '%s'" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: No se reconoce el formato del fichero" -#: src/nm.c:460 +#: src/nm.c:457 #, fuzzy msgid "" "\n" @@ -4087,42 +4324,42 @@ msgstr "" "\n" "Índice de archivo:" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "Compensación %zu inválida para símbolo %s" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "%s en %s\n" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "imposible restablecer compensación de archivo al inicio" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: no se reconoció el formato de fichero" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "No se puede crear el árbol de búsqueda" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "no se puede obtener índice de cadena de encabezamiento de sección" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -4135,7 +4372,7 @@ msgstr "" "Símbolos de %s:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -4144,70 +4381,70 @@ msgstr "" "%*s%-*s %-*s Clase Tipo %-*s %*s Sección\n" "\n" -#: src/nm.c:1173 -#, c-format -msgid "%s: entry size in section `%s' is not what we expect" +#: src/nm.c:1232 +#, fuzzy, c-format +msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "" "%s: el tamaño de la entrada en la sección `%s' no es el que esperábamos " -#: src/nm.c:1177 -#, c-format -msgid "%s: size of section `%s' is not multiple of entry size" +#: src/nm.c:1237 +#, fuzzy, c-format +msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: Tamaño de sección `%s' no es múltiplo de tamaño de entrada" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: Operación inválida" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: No hay símbolos" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "Selección de modo:" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "Mostrar la reubicación de información." -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "Mostrar el contenido total de todas las secciones solicitadas" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "Mostrar código de ensamblador de secciones ejecutables" -#: src/objdump.c:60 +#: src/objdump.c:59 #, fuzzy msgid "Output content selection:" msgstr "Selección de opción de salida:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "Sólo muestra información para NOMBRE de sección." -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "Muestra información de FICHEROS (a.out por defecto)." -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "No se especificó una operación.\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "mientras cierra `%s'" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "SÍMBOLO INVÁLIDO" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "SECCIÓN INVÁLIDA" @@ -4226,111 +4463,106 @@ msgstr "" msgid "OFFSET" msgstr "COMPENSACIÓN" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "Contenido de la sección %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "No se puede desensamblar" -#: src/objdump.c:736 -#, fuzzy, c-format -msgid "cannot allocate memory" -msgstr "No se puede asignar sección PLT: %s" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr " Generar un índice para acelerar el acceso a los archivos." -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "ARCHIVO " -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "Se requiere nombre de archivo" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "%s: no es un archivo" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "error al liberar descriptor sub-ELF: %s" -#: src/readelf.c:71 +#: src/readelf.c:72 #, fuzzy msgid "ELF input selection:" msgstr "Selección de salida de ELF:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:76 msgid "ELF output selection:" msgstr "Selección de salida de ELF:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "Todo esto mas -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "Mostrar el segmento dinámico" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "Mostrar el encabezamiento del fichero ELF" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "Mostrar histograma de las longitudes de las listas de cubetas" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "Mostrar encabezamientos de programa" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "Mostrar reubicaciones" -#: src/readelf.c:85 +#: src/readelf.c:86 msgid "Display the sections' headers" msgstr "Mostrar los encabezados de las secciones" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "Mostrar la tabla de símbolos" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "Mostrar información de versión" -#: src/readelf.c:89 +#: src/readelf.c:90 msgid "Display the ELF notes" msgstr "Mostrar las notas ELF" -#: src/readelf.c:91 +#: src/readelf.c:92 msgid "Display architecture specific information, if any" msgstr "Mostrar información específica de la arquitectura (si es que la hay)" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "Muestra secciones para manejo de excepciones" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "Selección de salida adicional:" -#: src/readelf.c:97 +#: src/readelf.c:98 #, fuzzy msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " @@ -4341,170 +4573,176 @@ msgstr "" "siguiente: abbrev, aranges, frame, info, loc, line, ranges, pubnames, str, " "macinfo, o exception" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "Vuelca los contenidos no interpretados de SECCIÓN, por número o nombre" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "Imprime contenido de cadena de secciones" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "Muestra el índice de símbolos de un archivo" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "Control de salida:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "" "No se encuentran los nombres de símbolos para direcciones en datos DWARF" -#: src/readelf.c:112 +#: src/readelf.c:113 #, fuzzy msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "" "No se encuentran los nombres de símbolos para direcciones en datos DWARF" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "" "Imprimir información del fichero ELF en una forma comprensible para los " "seres humanos." -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Sección de depuración DWARF desconocida `%s'.\n" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "no se puede crear descriptor ELF: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "No se puede encontrar la sección: %s" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "No se puede obtener encabezamiento de sección: %s" -#: src/readelf.c:562 +#: src/readelf.c:571 #, fuzzy, c-format msgid "cannot get section name" msgstr "no se puede obtener encabezamiento de sección\n" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "No se puede obtener el contenido %s: %s" -#: src/readelf.c:587 +#: src/readelf.c:596 #, fuzzy, c-format msgid "cannot create temp file '%s'" msgstr "no se puede crear fichero nuevo '%s': %s" -#: src/readelf.c:596 +#: src/readelf.c:605 #, fuzzy, c-format msgid "cannot write section data" msgstr "no se puede leer la sección de datos: %s" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "error al cerrar el descriptor ELF: %s" -#: src/readelf.c:609 +#: src/readelf.c:618 #, fuzzy, c-format msgid "error while rewinding file descriptor" msgstr "error al cerrar el descriptor ELF: %s" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "'%s' no es un archivo, no se puede imprimir índice de archivo" -#: src/readelf.c:742 +#: src/readelf.c:751 #, fuzzy, c-format msgid "No such section '%s' in '%s'" msgstr "No se puede obtener contenido de sección %zu en '%s': %s" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "no sepudo stat archivo de entrada" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "archivo de entrada vacío" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "Falló lectura de '%s': %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "no se pudo leer encabezamiento ELF: %s" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "no se puede crear EBL" -#: src/readelf.c:835 +#: src/readelf.c:858 #, c-format msgid "cannot determine number of program headers: %s" msgstr "no se pudo determinar la cantidad de encabezados de programa: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "NONE (Ninguno)" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "REL (Fichero reubicable)" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "EXEC (Fichero ejecutable)" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "DYN (Fichero objeto compartido)" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "CORE (Fichero núcleo)" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "OS Specific: (%x)\n" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Específico del procesador: (%x)\n" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " @@ -4512,7 +4750,7 @@ msgstr "" "Encabezamiento ELF:\n" " Mágico: " -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" @@ -4521,119 +4759,119 @@ msgstr "" "\n" " Clase: %s\n" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr " Datos: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Versión ident: %hhd %s\n" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(actual)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr " OS/ABI: %s\n" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr " Versión ABI: %hhd\n" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " Tipo: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr " Máquina: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr " Versión: %d %s\n" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr " Dirección de punto de entrada: %#\n" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr " Inicio de encabezamientos de programa: % %s\n" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr " (bytes en el archivo)" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr " Inicio de encabezamientos de sección: % %s\n" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr " Indicadores: %s\n" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr " Tamaño de este encabezamiento: % %s\n" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(bytes)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr "" " Tamaño de las entradas en encabezamiento del programa: % %s\n" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr " Cantidad de entradas de encabezados de programa: %" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr " (% in [0].sh_info)" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr " ([0] no disponible)" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr "" " Tamaño de las entradas en el encabezamiento de sección: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr " Cantidad de entradas en los encabezamientos de sección: %" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr " (% en [0].sh_size)" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr " (% en [0].sh_link)" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4642,14 +4880,14 @@ msgstr "" " Índice de tabla de cadenas de sección de encabezamiento de : XINDEX%s\n" "\n" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" "\n" msgstr " Índice de tabla de cadenas de sección de encabezamiento: %\n" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4658,11 +4896,11 @@ msgstr "" "Hay %d encabezamientos de sección, comenzando en compensación %#:\n" "\n" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "encabezamientos de sección:" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4670,7 +4908,7 @@ msgstr "" "[Nr] Nombre Tipo Dirección Off Tamaño Inf Al " "Enlace banderas ES" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4678,18 +4916,36 @@ msgstr "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1213 +#, fuzzy, c-format +msgid "bad compression header for section %zd: %s" +msgstr "No se puede obtener el encabezamiento de sección %zu: %s" + +#: src/readelf.c:1224 +#, fuzzy, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "No se pueden obtener datos para la sección %d: %s" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "encabezamientos de programa:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Tipo Compensación Dirección Virtual Dirección " "Física Tamaño de Fichero Tamaño de Memoria Alineación de bandera" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4697,12 +4953,12 @@ msgstr "" " Tipo Compensación Dirección Virtual Dirección " "Física Tamaño de Fichero Tamaño de Memoria Alineación de bandera" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Solicitando intérprete de programa: %s]\n" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" @@ -4712,12 +4968,12 @@ msgstr "" " Sección para asignación de segmento:\n" " Secciones de segmento..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "no se puede obtener memoria para encabezamiento del programa: %s" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4732,7 +4988,7 @@ msgstr[1] "" "\n" "Grupo de sección COMDAT [%2zu] '%s' con firma '%s' contiene entradas %zu:\n" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4747,21 +5003,25 @@ msgstr[1] "" "\n" "Grupo de sección [%2zu] '%s' con firma '%s' contiene entradas %zu:\n" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 #, fuzzy, c-format -msgid "invalid sh_link value in section %Zu" +msgid "invalid sh_link value in section %zu" msgstr ".debug_line section inválida" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4782,36 +5042,36 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr " Tipo Valor\n" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "Biblioteca compartida: [%s]\n" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "Nombre-so de la biblioteca: [%s]\n" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "Rpath de la biblioteca: [%s]\n" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "Ruta de ejecución de la biblioteca: [%s]\n" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "% (bytes)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" @@ -4820,7 +5080,7 @@ msgstr "" "\n" "Tabla de símbolos inválida en compensación %#0\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4839,7 +5099,7 @@ msgstr[1] "" "Sección de reubicación [%2zu] '%s' para sección [%2u] '%s' en compensación " "%#0 contiene entradas %d:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4856,29 +5116,29 @@ msgstr[1] "" "Sección de reubicación [%2u] '%s' en compensación %#0 contiene " "entradas %d:\n" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr " Compensación Tipo Valor Nombre\n" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr " Compensación Tipo Valor Nombre\n" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr " Compensación Tipo Valor Nombre Adend\n" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr " Compensación Tipo Valor Nombre Adend\n" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4893,40 +5153,40 @@ msgstr[1] "" "\n" "La tabla de símbolos [%2u] '%s' contiene entradas %u:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" msgstr[0] "símbolos locales %lu Tabla de cadena: [%2u] '%s'\n" msgstr[1] " Símbolos locales %lu Tabla de cadenas: [%2u] '%s'\n" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Núm: Valor Tamaño Tipo Unión Vis Nombre Ndx\n" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Num: Valor Tamaño Tipo Unión Vis Nombre Ndx\n" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "símbolo dinámico erróneo" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "nada" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| " -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4947,17 +5207,17 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Versión: %hu Fichero: %s Conteo: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Nombre: %s Banderas: %s Versión: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4978,18 +5238,18 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr "" " %#06x: Versión: %hd Banderas: %s Índice: %hd Conteo: %hd Nombre: %s\n" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Principal %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -5010,15 +5270,15 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *local* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -5043,22 +5303,22 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Longitud Número % of total Cobertura\n" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -5067,12 +5327,27 @@ msgstr "" " Número promedio de pruebas: búsqueda exitosa: %f\n" " búsqueda sin éxito: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "No se pueden obtener datos para la sección %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3148 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3206 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" @@ -5082,7 +5357,7 @@ msgstr "" " Tamaño de Bitmask: %zu bytes %%% bits establecen segundo " "cambio de dispersión: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -5099,7 +5374,7 @@ msgstr[1] "" "Sección de lista de biblioteca [%2zu] '%s' en compensación %#0 " "contiene entradas %d:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -5107,7 +5382,7 @@ msgstr "" " Biblioteca Marca de tiempo Indicadores " "de versión de suma de verificación" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -5118,140 +5393,140 @@ msgstr "" "Sección de atributos de objeto [%2zu] '%s' de % bytes con " "desplazamiento %#0:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr " Propietario Tamaño\n" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " File: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "bloque vacío" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "bloque de byte %zu:" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# utilizado con direcciones de diferente tamaño" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# utilizado con offsetr de diferente tamaño" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, fuzzy, c-format msgid "%s %# used with different base addresses" msgstr "%s %# utilizado con direcciones de diferente tamaño" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] ... % bytes ...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -5262,7 +5537,7 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#:\n" " [ Código]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" @@ -5271,30 +5546,30 @@ msgstr "" "\n" "Sección de abreviatura en compensación %:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** error en lectura de abreviatura: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] compensación: %, hijos: %s, etiqueta: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "sí" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "no" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "no se ha podido obtener contenido de .debug_aranges: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -5309,12 +5584,12 @@ msgstr[1] "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entradas %zu:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" @@ -5322,8 +5597,8 @@ msgstr "" " Inicio [%*zu]: %0#*, longitud: %5, compensación CU DIE: " "%6\n" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" @@ -5332,115 +5607,120 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#:\n" -#: src/readelf.c:4569 src/readelf.c:6171 -#, c-format +#: src/readelf.c:4797 src/readelf.c:6494 +#, fuzzy, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" "\n" "Tabla en compensación %Zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "Datos inválidos en sección [%zu] '%s'" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, fuzzy, c-format msgid "" "\n" " Length: %6\n" msgstr " (compensación: %#)" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, fuzzy, c-format msgid " DWARF version: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, fuzzy, c-format msgid " CU offset: %6\n" msgstr " (compensación: %#)" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, fuzzy, c-format msgid " Address size: %6\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, fuzzy, c-format msgid "unsupported address size" msgstr "no hay valor de dirección" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, fuzzy, c-format msgid "" " Segment size: %6\n" "\n" msgstr " establecer archivo a %\n" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, fuzzy, c-format msgid " %s..%s (%)\n" msgstr " %s: %\n" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "no se ha podido obtener contenido de .debug_ranges: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] (dirección base) %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] lista vacía\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +#, fuzzy +msgid " \n" +msgstr " \n" + +#: src/readelf.c:5493 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "no se puede leer encabezamiento ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" @@ -5450,7 +5730,7 @@ msgstr "" "Sección de información de marco de llamada [%2zu] '%s' en compensación " "%#:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" @@ -5459,50 +5739,50 @@ msgstr "" "\n" " [%6tx] Terminator cero\n" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, c-format msgid "invalid augmentation length" msgstr "longitud de aumento inválida" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "Codificación de dirección FDE:" -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "Codificación de puntero LSDA:" -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr " (compensación: %#)" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr " (fin de compensación: %#)" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr "Puntero %-26sLSDA: %#\n" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "No se puede obtener código de atributo: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "No se puede obtener forma de atributo: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "No se puede obtener valor: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5513,7 +5793,7 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#:\n" " [Offset]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5526,7 +5806,7 @@ msgstr "" "Tamaño de dirección: %, Tamaño de compensación: %\n" " Tipo de firma: %#, Tipo de compensación: %#\n" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5537,34 +5817,34 @@ msgstr "" " Versión: %, Compensación de sección de abreviatura: %, " "Tamaño de dirección: %, Tamaño de compensación: %\n" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "no se puede obtener DIE en compensación % en sección '%s': %s" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "no se puede obtener DIE en compensación: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "" "no se ha podido obtener etiqueta de DIE en compensación% en sección " "'%s': %s" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "No se puede obtener próximo DIE: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "No se puede obtener próximo DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, fuzzy, c-format msgid "" "\n" @@ -5574,12 +5854,12 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#:\n" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "No se puede obtener sección de datos de línea: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5608,19 +5888,19 @@ msgstr "" "\n" "Códigos operativos:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "datos inválidos en compensación %tu en sección [%zu] '%s'" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] " [%*] argumento %hhu \n" msgstr[1] " [%*] argumento %hhu\n" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" @@ -5628,7 +5908,7 @@ msgstr "" "\n" "Tabla de Directorio:" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" @@ -5638,7 +5918,7 @@ msgstr "" "Tabla de nombre de archivo:\n" " Directorio de entrada Tiempo Tamaño Nombre" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" @@ -5646,214 +5926,224 @@ msgstr "" "\n" " Declaraciones de número de Línea:" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, fuzzy, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "longitud mínima inválida de tamaño de cadena coincidente" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr "" " opcode especial %u: dirección+%u = %s, op_index = %u, línea%+d = %zu\n" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr " opcode especial %u: dirección+%u = %s, línea%+d = %zu\n" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr " Código operativo extendido %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6763 #, fuzzy msgid " end of sequence" msgstr "Fin de secuencia" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, fuzzy, c-format msgid " set address to %s\n" msgstr "Establecer dirección a %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, fuzzy, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" "definir nuevo archivo: dir=%u, mtime=%, longitud=%, nombre=" "%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr " establecer discriminador a %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6827 #, fuzzy msgid " unknown opcode" msgstr "código operativo desconocido " -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr "Copiar" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, fuzzy, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr "dirección avanzada por %u a %s, op_index a %u\n" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, fuzzy, c-format msgid " advance address by %u to %s\n" msgstr "Dirección de avance por %u a %s\n" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr " línea de avance por la constante %d a %\n" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr " establecer archivo a %\n" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr " Establecer columna a %\n" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr "Establecer '%s' a %\n" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr "Establecer bandera de bloque básico" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, fuzzy, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr "dirección avanzada por constante %u a %s, op_index a %u\n" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, fuzzy, c-format msgid " advance address by constant %u to %s\n" msgstr "Dirección de avance por constante %u a %s\n" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, fuzzy, c-format msgid " advance address by fixed value %u to %s\n" msgstr "dirección de avance por valor corregido %u a %s\n" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr " Establecer bandera prologue_end" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr " Establecer bandera epilogue_begin" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr " establecer isa para %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] " opcódigo con parámetro % desconocido:" msgstr[1] " opcódigo con parámetros % desconocido:" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "no es posible obtener contenido de .debug_loc: %s" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr " \n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "no es posible obtener datos de la sección de macro información: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** cadena no finalizada al final de la sección" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, fuzzy, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** cadena no finalizada al final de la sección" + +#: src/readelf.c:7334 #, fuzzy, c-format msgid " Offset: 0x%\n" msgstr " Propietario Tamaño\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, fuzzy, c-format msgid " Flag: 0x%\n" msgstr " Dirección de punto de entrada: %#\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, fuzzy, c-format msgid " Offset length: %\n" msgstr " (compensación: %#)" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, fuzzy, c-format msgid " .debug_line offset: 0x%\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, fuzzy, c-format msgid " extension opcode table, % items:\n" msgstr " opcódigo con parámetro % desconocido:" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, fuzzy, c-format msgid " % arguments:" msgstr " [%*] argumento %hhu \n" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" " Compensación [%5d] DIE: %6, Compensación CU DIE: %6, " "nombre: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5864,12 +6154,12 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#:\n" " %*s String\n" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** error en lectura de cadenas: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" @@ -5878,7 +6168,7 @@ msgstr "" "\n" "Sección de tabla de búsqueda de marco de llamada [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" @@ -5887,22 +6177,22 @@ msgstr "" "\n" "Excepción en el manejo de la sección de tabla [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr "Codificación LPStart: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr "Codificación TType: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr "Codificación de sitio de llamada: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" @@ -5910,7 +6200,7 @@ msgstr "" "\n" " Tabla de sitio de llamada:" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5923,12 +6213,12 @@ msgstr "" " Landing pad: %#\n" " Action: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "Codificación TType inválida" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, fuzzy, c-format msgid "" "\n" @@ -5937,37 +6227,37 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, fuzzy, c-format msgid " CU offset: %#\n" msgstr " (compensación: %#)" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, fuzzy, c-format msgid " TU offset: %#\n" msgstr " (compensación: %#)" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, fuzzy, c-format msgid " address offset: %#\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, fuzzy, c-format msgid " symbol offset: %#\n" msgstr " (compensación: %#)" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, fuzzy, c-format msgid " constant offset: %#\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, fuzzy, c-format msgid "" "\n" @@ -5976,7 +6266,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, fuzzy, c-format msgid "" "\n" @@ -5985,7 +6275,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, fuzzy, c-format msgid "" "\n" @@ -5994,7 +6284,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, fuzzy, c-format msgid "" "\n" @@ -6003,17 +6293,17 @@ msgstr "" "\n" "Tabla de símbolos inválida en compensación %#0\n" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "no se puede depurar descriptor de contexto: %s" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "no es posible convertir datos de la nota principal: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" @@ -6022,21 +6312,21 @@ msgstr "" "\n" "%*s... ..." -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr " Owner Data size Type\n" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "no se puede obtener el contenido de sección de nota: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" @@ -6045,7 +6335,7 @@ msgstr "" "\n" "Sección de nota [%2zu] '%s' de % bytes en compensación %#0:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" @@ -6054,50 +6344,72 @@ msgstr "" "\n" "Segmento de nota de % bytes en compensación %#0:\n" -#: src/readelf.c:9083 -#, c-format +#: src/readelf.c:9501 +#, fuzzy, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Section [%zu] '%s' has no data to dump.\n" msgstr "" "\n" "Sección [%Zu] '%s' no tiene datos para volcar.\n" -#: src/readelf.c:9089 src/readelf.c:9112 -#, c-format -msgid "cannot get data for section [%Zu] '%s': %s" +#: src/readelf.c:9518 src/readelf.c:9559 +#, fuzzy, c-format +msgid "cannot get data for section [%zu] '%s': %s" msgstr "no se pueden obtener datos para sección [%Zu] '%s': %s" -#: src/readelf.c:9093 -#, c-format +#: src/readelf.c:9523 +#, fuzzy, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" "\n" "Volcado Hex de sección [%Zu] '%s', % bytes en compensación " "%#0:\n" -#: src/readelf.c:9106 -#, c-format +#: src/readelf.c:9528 +#, fuzzy, c-format +msgid "" +"\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" +msgstr "" +"\n" +"Volcado Hex de sección [%Zu] '%s', % bytes en compensación " +"%#0:\n" + +#: src/readelf.c:9542 +#, fuzzy, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" "\n" "Sección [%Zu] '%s' no tiene datos para volcar.\n" -#: src/readelf.c:9116 -#, c-format +#: src/readelf.c:9564 +#, fuzzy, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" +msgstr "" +"\n" +"Sección de cadena [%Zu] '%s' contiene % bytes en compensación " +"%#0:\n" + +#: src/readelf.c:9569 +#, fuzzy, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" msgstr "" "\n" "Sección de cadena [%Zu] '%s' contiene % bytes en compensación " "%#0:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9618 #, c-format msgid "" "\n" @@ -6106,7 +6418,7 @@ msgstr "" "\n" "sección [%lu] no existe" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" @@ -6115,12 +6427,12 @@ msgstr "" "\n" "sección '%s' no existe" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "no se puede obtener el índice de símbolo de archivo '%s': %s" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" @@ -6129,26 +6441,26 @@ msgstr "" "\n" "Archivo '%s' no tiene índice de símbolo\n" -#: src/readelf.c:9257 -#, c-format +#: src/readelf.c:9711 +#, fuzzy, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" "\n" "Índice de archivo '%s' tiene %Zu entradas:\n" -#: src/readelf.c:9275 -#, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" +#: src/readelf.c:9729 +#, fuzzy, c-format +msgid "cannot extract member at offset %zu in '%s': %s" msgstr "no es posible extraer miembro en compensación %Zu en '%s': %s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Miembro de archivo contiene '%s':\n" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" @@ -6156,81 +6468,198 @@ msgstr "" "Utilice el formato de salida FORMAT. FORMAT puede ser tanto `bsd' como " "`sysv'. El establecido por defecto es `bsd'" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "lo mismo que `--format=sysv'" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "lo mismo que `--format=bsd'" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "lo mismo que `--radix=10'" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "lo mismo que `--radix=8'" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "lo mismo que`--radix=16'" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "Similar a la salida `--format=sysv' pero en una sola línea" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "" "Imprime el tamaño y las marcas de permiso para los segmentos que pueden ser " "cargados" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "Muestra el tamaño total (bsd solamente)" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "Lista los tamaños de sección de FICHEROS (por defecto a.out). " -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "Formato de archivo inválido: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "Radical inválido: %s" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "%s: No se reconoce el formato del fichero" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "(TOTALES)\n" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "" + +#: src/stack.c:494 +#, fuzzy, c-format +msgid "Cannot open core file '%s'" +msgstr "Imposible abrir el archivo '%s'" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "" + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "" + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "" + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "" + +#: src/stack.c:644 +#, fuzzy +msgid "Show stack of process PID" +msgstr "No se puede crear el árbol de búsqueda" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "" + +#: src/stack.c:651 +msgid "Output selection options:" +msgstr "Opciones de selección de salida:" + +#: src/stack.c:653 +#, fuzzy +msgid "Additionally show frame activation" +msgstr "Selección de salida adicional:" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "" + +#: src/stack.c:662 +#, fuzzy +msgid "Additionally show source file information" +msgstr "Selección de salida adicional:" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "" + +#: src/strings.c:66 msgid "Output Selection:" msgstr "Selección de salida:" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Explorar todo el archivo, no sólo las secciones cargadas" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "Sólo secuencias NUL-terminated de caracteres MIN-LEN o más se imprimen" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6238,463 +6667,488 @@ msgstr "" "Seleccionar tamaño de caracter y Endianess: s = 7-bit, S = 8-bit, {b,l} = 16-" "bit, {B,L} = 32-bit" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Imprimir nombre de archivo antes de cada cadena." -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Imprimir ubicación de la cadena en base 8, 10, o 16 respectivamente." -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias para --radix=o" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Imprimir las cadenas de caracteres imprimibles en archivos." -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "Valor inválido '%s' para parámetro %s" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "longitud mínima inválida de tamaño de cadena coincidente" -#: src/strings.c:596 -#, c-format -msgid "lseek64 failed" +#: src/strings.c:600 +#, fuzzy, c-format +msgid "lseek failed" msgstr "lseek64 falló" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "re-mmap falló" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "mprotect falló" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "Colocar la salida obtenida en FICHERO" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "Extraer secciones eliminadas en FICHERO" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "Incorporar nombre FILE en lugar de argumento -f" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "Elimina todos los símbolos de depuración" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "Quitar sección de cabeceras (no recomendado)" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "Copiar marcas de tiempo modificadas/acceso a la salida" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "Quitar sección de comentario" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "Relaja algunas reglas para manejar ficheros ELF rotos" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "Descarta símbolos de archivos objeto." -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "Sólo se permite ingresar un archivo junto con '-o' y '-f'" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "opción -f especificada dos veces" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "opción -F especificada dos veces" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "opción -o especificada dos veces" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "la opción -R soporta únicamente. sección de comentario" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "no sepuede stat fichero de entrada '%s'" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "mientras se abría '%s'" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: no puede utilizarse -o o -f cuando se extrae un archivo" -#: src/strip.c:468 +#: src/strip.c:384 +#, fuzzy, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: no puede utilizarse -o o -f cuando se extrae un archivo" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "No se puede abrir el segundo plano EBL" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "no se pudo determinar la cantidad de encabezados de programa: %s" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "no se puede crear fichero nuevo '%s': %s" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "Fichero illformed '%s'" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "al generar fichero de salida: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: error al crear encabezamiento ELF: %s" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "al preparar salida para '%s'" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "al crear sección de encabezamiento de sección: %s" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "no se puede asignar espacio para los datos: %s" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "al crear tabla de cadenas de encabezamiento de sección: %s" -#: src/strip.c:1752 +#: src/strip.c:1861 #, fuzzy, c-format msgid "bad relocation" msgstr "Mostrar reubicaciones" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "al escribir '%s': %s" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "al crear '%s'" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "al computar la suma de verificación para información de depuración" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: error al leer el fichero: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, c-format msgid "while writing '%s'" msgstr "al escribir '%s'" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "Error al terminar '%s': %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "no es posible establecer acceso y fecha de modificación de '%s'" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "Coincidir MODULO con nombres de archivo, no con nombres de módulo" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "Omitir silenciosamente los archivos perdidos" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "Colocar salida en FICHERO" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "Crear archivos de salida múltiple bajo DIRECTORIO" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "Usar módulo en lugar de nombres de archivo" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "" "Crear salida para módulos que no tienen información de depuración " "independiente" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "Aplicar reubicaciones a contenido de sección en archivos ET_REL" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "Solamente listar módulo y nombres de archivo, crear los ID" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "opción -d especificada dos veces" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "Sólo se permite usar -o ó -d " -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "-n no puede utilizarse con archivos explícitos o con -o ó -d" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "Directorio de salida '%s'" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "dos argumentos de archivos se requieren exactamente" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "No se permiten las opciones -m, -a, -R, ni -i con archivos explícitos" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "se requiere -o ó -d cuando se utilizan archivos implícitos" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "no se puede crear el encabezamiento ELF: %s" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "no se puede copiar encabezamiento ELF: %s" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "no se pudo determinar la cantidad de encabezados de programa: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "No pueden crear encabezamientos de programa: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "no puede copiar encabezamiento de programa: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "no se puede copiar encabezamiento de sección: %s" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "no se pueden obtener datos de sección: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "no pueden copiar datos de sección: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "no se puede crear el directorio '%s'" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "no se puede obtener entrada de tabla de símbolos: %s" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "no se puede actualizar tabla de símbolos: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "no se puede actualizar encabezamiento de sección: %s" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "no se puede actualizar reubicación: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "no se puede obtener versión de símbolo: %s" -#: src/unstrip.c:523 -#, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" +#: src/unstrip.c:560 +#, fuzzy, c-format +msgid "unexpected section type in [%zu] with sh_link to symtab" msgstr "tipo de sección inesperado en [%Zu] con sh_link para symtab" -#: src/unstrip.c:771 -#, c-format -msgid "invalid string offset in symbol [%Zu]" +#: src/unstrip.c:809 +#, fuzzy, c-format +msgid "invalid string offset in symbol [%zu]" msgstr "compensación de cadena inválida en símbolo [%Zu]" -#: src/unstrip.c:913 src/unstrip.c:1254 -#, c-format -msgid "cannot read section [%Zu] name: %s" +#: src/unstrip.c:967 src/unstrip.c:1313 +#, fuzzy, c-format +msgid "cannot read section [%zu] name: %s" msgstr "no se puede leer nombre [%Zu]: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "no se puede leer sección '.gnu.prelink_undo': %s" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "contenido inválido en sección '%s'" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" +msgid "overflow with shnum = %zu in '%s' section" +msgstr "" + +#: src/unstrip.c:1108 src/unstrip.c:1433 +#, fuzzy, c-format +msgid "cannot find matching section for [%zu] '%s'" msgstr "no se puede hallar sección coincidente para [%Zu] '%s'" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "no se puede añadir nombre de sección a tabla de cadenas: %s" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "" "no se pueden actualizar datos de tabla de cadenas de encabezamiento de " "sección: %s" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" "no se puede obtener índice de sección de tabla de cadenas de encabezamiento " "de sección: %s" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "No se puede obtener cuenta de sección: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" "más secciones en el archivo despojado que en el archivo de depuración -- " "¿argumentos invertidos?" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "no se puede obtener tabla de cadenas de encabezamiento de sección: %s" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "No se puede añadir nueva sección: %s" -#: src/unstrip.c:1551 -#, c-format -msgid "symbol [%Zu] has invalid section index" +#: src/unstrip.c:1618 +#, fuzzy, c-format +msgid "symbol [%zu] has invalid section index" msgstr "símbolo [%Zu] tiene índice de sección inválido" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, c-format msgid "cannot read section data: %s" msgstr "no se puede leer la sección de datos: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "no se puede leer encabezamiento ELF: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "no se puede actualizar encabezamiento de programa: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "no se puede escribir al archivo de salida: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" "datos DWARF no se ajustan para polarización de pre-enlace; considere prelink " "-u" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6702,77 +7156,77 @@ msgstr "" "Datos DWARF en '%s' no se ajustan a polarización de pre-enlace; considere " "prelink -u" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "no se puede crear un descriptor ELF: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "no se puede hallar archivo obtenido para módulo '%s': %s " -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "No se puede abrir el archivo '%s' obtenido para módulo '%s': %s" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "no puede hallar archivo de depuración para módulo '%s': %su" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "No puede abrir archivo de depuración '%s' para módulo '%s': %s" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "No se obtuvo el archivo '%s' de módulo '%s' " -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" "No puede almacenar en cache direcciones de sección para módulo '%s': %s" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "No se encontraron módulos coincidentes" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "coincidió con más de un módulo" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6780,7 +7234,7 @@ msgstr "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6830,9 +7284,21 @@ msgstr "" "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "" + +#: tests/dwflmodtest.c:213 #, fuzzy -#~ msgid "cannot attach to process" -#~ msgstr "No se puede crear el árbol de búsqueda" +msgid "Additionally show function names" +msgstr "También mostrar nombres de función" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "" + +#~ msgid "cannot get section header of section %Zu: %s" +#~ msgstr "No se puede obtener encabezamiento de sección %Zu: %s" #, fuzzy #~ msgid "cannot attach to core" diff --git a/po/ja.gmo b/po/ja.gmo index 54d35b1..5418a27 100644 Binary files a/po/ja.gmo and b/po/ja.gmo differ diff --git a/po/ja.po b/po/ja.po index 3b9afaa..6d99a25 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ja\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" "PO-Revision-Date: 2009-09-20 15:32+0900\n" "Last-Translator: Hyu_gabaru Ryu_ichi \n" "Language-Team: Japanese \n" @@ -19,8 +19,28 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" + +#: lib/color.c:190 src/objdump.c:738 +#, fuzzy, c-format +msgid "cannot allocate memory" +msgstr "PLT セクションを割り当てられません: %s" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "メモリー消費済み" @@ -30,7 +50,7 @@ msgstr "メモリー消費済み" msgid "no error" msgstr "エラー無し" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "メモリー不足" @@ -69,7 +89,7 @@ msgstr "データの出力中にエラー" msgid "no backend support available" msgstr "バックエンドサポートが利用できません" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "不明なエラー" @@ -95,122 +115,135 @@ msgid "no DWARF information" msgstr "DWARF 情報がありません" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "ELF ファイルがありません" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "ELF ヘッダーを得られません" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "未実装" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "不当なコマンド" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "不当なバージョン" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "不当なファイル" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "項目が見つかりません" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "不当な DWARF" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "文字データがありません" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "アドレス値ではありません" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "固定値ではありません" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "参照値がありません" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "不当な参照値" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr ".debug_line セクションがありません" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "不当な .debug_line セクション" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "デバッグ情報が大きすぎます" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "不当な DWARF バージョン" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "不当なディレクトリー索引" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "アドレスが範囲外です" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "ロケーションリスト値ではありません" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "ブロックデータではありません" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "不当な行索引" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "不当なアドレス範囲索引" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "アドレス範囲に対応しません" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "フラグ値がありません" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "不当なオフセット" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr ".debug_ranges セクションがありません" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "不当な CFI セクション" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +#, fuzzy +msgid "invalid opcode" +msgstr "不当なオペランド" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "選択オプションを入力してください:" @@ -242,7 +275,7 @@ msgstr "実行中のカーネルのアドレスを探す" msgid "Kernel with all modules" msgstr "全てのモジュール付きのカーネル" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "分離した debuginfo ファイルべきパスを探す" @@ -267,7 +300,12 @@ msgstr "カーネルかモジュールを見つけられません" msgid "cannot read ELF core file: %s" msgstr "ELF コアファイルを読めません: %s" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +#, fuzzy +msgid "Not enough memory" +msgstr "メモリー不足" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "コアファイルの中にモジュールを認識できません" @@ -434,82 +472,82 @@ msgstr "不当なパラメーター" msgid "Not an ET_CORE ELF file" msgstr "不当な ELF ファイル" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "バックエンドがありません" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "<不明>" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr "<不明>: %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, fuzzy, c-format msgid "unknown SDT version %u\n" msgstr "不明なバージョン" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, fuzzy, c-format msgid "invalid SDT probe descriptor\n" msgstr "不当なファイル記述子" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr "" -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr "" -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr "" -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr "" -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr "" -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr "" -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " ビルト ID: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr "" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " OS: %s、ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "スタンドアローン" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr "<不明>: %d" @@ -534,7 +572,7 @@ msgstr "ソース演算子の大きさが無効" msgid "invalid size of destination operand" msgstr "宛先演算子の大きさが無効" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "無効なエンコード" @@ -616,8 +654,8 @@ msgstr "データ/scnが不整合です" msgid "invalid section header" msgstr "不当なセクションヘッダー" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "不当なデータ" @@ -661,62 +699,114 @@ msgstr "" msgid "file has no program header" msgstr "ファイルにプログラムヘッダーがありません" +#: libelf/elf_error.c:237 +#, fuzzy +msgid "invalid section type" +msgstr "不当なセクション" + +#: libelf/elf_error.c:242 +#, fuzzy +msgid "invalid section flags" +msgstr "不当なセクション" + +#: libelf/elf_error.c:247 +#, fuzzy +msgid "section does not contain compressed data" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "" + +#: libelf/elf_error.c:257 +#, fuzzy +msgid "unknown compression type" +msgstr "不明なタイプ" + +#: libelf/elf_error.c:262 +#, fuzzy +msgid "cannot compress data" +msgstr "セクションデータを割り当てられません: %s" + +#: libelf/elf_error.c:267 +#, fuzzy +msgid "cannot decompress data" +msgstr "セクションデータを割り当てられません: %s" + #: src/addr2line.c:58 -msgid "Output selection options:" +#, fuzzy +msgid "Input format options:" +msgstr "選択オプションを入力してください:" + +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." msgstr "" -#: src/addr2line.c:59 +#: src/addr2line.c:62 +#, fuzzy +msgid "Output format options:" +msgstr "出力形式:" + +#: src/addr2line.c:63 +msgid "Print address before each entry" +msgstr "" + +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "" -#: src/addr2line.c:64 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "" - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "雑則:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -727,281 +817,294 @@ msgstr "" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "%s によって書かれました。\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "コマンド:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "アーカイブからファイルを削除。" -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "アーカイブ内のファイルを移動。" -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "アーカイブ内のファイルを印刷。" -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "アーカイブへの即座のファイル追加。" -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "アーカイブへの既存のファイルの置き換えか、新しいファイルの挿入。" -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "アーカイブの内容の表示" -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "アーカイブからのファイルの取出し" -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "コマンド修飾子:" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "元データの保存。" -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "名前のインスタンス [COUNT] の使用。" -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "既存のファイルを抽出したファイルで置き換えない。" -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "必要ならばファイル名の切り捨てを認める。" -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "饒舌な出力を提供する。" -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "シンボルテーブルの再生成を強制する。" -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "[MEMBER]の後にファイルを挿入する。" -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "[MEMBER]の前にファイルを挿入する。" -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "-b と同じ。" -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "ライブラリーを生成しなければならない時にメッセージを抑止する。" -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "ファイル照合にフルパスを使う。" -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "アーカイブの古いファイルのみ更新する。" -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "アーカイブから作成や、修正、抽出する。" -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[メンバー] [合計] アーカイブ [ファイル...]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a'や、'b'、'i'は、'm' や 'r' オプションと一緒にしか指定できません" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "'a'や、'b'、'i' 修飾子には MEMBER パラメーターが必要です" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "'N' は 'x' や 'd' オプションと一緒の時のみ意味を持ちます" -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "COUNT パラメーターが必要です" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "不当な COUNT パラメーター %s" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "'%c' は 'x' オプションと一緒の時のみ意味を持ちます" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "アーカイブ名が必要です" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "1つを越える操作が指定されました" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "アーカイブ '%s' を開くことができません" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "アーカイブ '%s' を開けません: %s" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: アーカイブファイルではありません" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "アーカイブに stat できません: '%s'" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "アーカイブに項目 %s がありません\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "ハッシュテーブルを生成できません" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "ハッシュに挿入できません" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "'%s' に stat できません" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "%s の内容を読むことができません: %s" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "%.*s を開けません" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "%s への書込みに失敗しました" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "%s のモードを変更できません" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "%s の更新時間を変更できません" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "一時ファイルを %.*s に名前変更できません" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "新しいファイルを生成できません" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "位置メンバー %s が見つかりません" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: 項目 %s がアーカイブにありません!\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "%s を開けません" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "%s を stat できません" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "%s は一般ファイルではありません" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "%s の ELF 記述子を得られません: %s\n" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "%s を読みません: %s" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "" + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1080,140 +1183,147 @@ msgstr "プログラムヘッダーを得られません: %s" msgid "%s %s diff: program header count" msgstr "ファイルにプログラムヘッダーがありません" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, fuzzy, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "" +"\n" +"シンボルテーブル [%2u] '%s' には %u 個の項目があります:\n" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "'%s' を開けません" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "" @@ -1241,11 +1351,11 @@ msgstr "" msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "ELF ファイルが gABI/psABI 仕様へ準拠しているかの厳密なチェック。" -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "ふぁいる..." -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "入力ファイルを開けません" @@ -1264,7 +1374,7 @@ msgstr "Elf 記述子を閉じている時にエラー: %s\n" msgid "No errors" msgstr "エラーはありません" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "ファイル名がありません。\n" @@ -1394,7 +1504,7 @@ msgstr "不当なセクションヘッダーサイズ: %hd\n" msgid "invalid section header position or size\n" msgstr "不当なセクションヘッダー位置かサイズ\n" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1403,7 +1513,7 @@ msgstr "" "セクション [%2d] '%s': SHF_GROUP フラグのあるセクションにセクショングループの" "一部分が設定されていません\n" -#: src/elflint.c:574 +#: src/elflint.c:575 #, fuzzy, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1411,14 +1521,14 @@ msgstr "" "セクション [%2d] '%s': セクショングループ [%2zu] '%s' がグループメンバーを継" "続していません\n" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1427,7 +1537,7 @@ msgstr "" "セクション [%2d] '%s': セクション [%2d] '%s' 用の文字列テーブルとして参照され" "ていますが、タイプが SHT_STRTAB ではありません\n" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1436,38 +1546,38 @@ msgstr "" "セクション [%2d] '%s': シンボルテーブルは 1 個を越える拡張インデックスセク" "ションを持てません\n" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "セクション [%2u] '%s': 項目サイズが ElfXX_Sym と一致しません\n" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "セクション [%2d] '%s': シンボル %d を得られません: %s\n" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "セクション [%2d] '%s': 0番目の項目にある '%s' ゼロではありません\n" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "セクション [%2d] '%s': 0番目の項目用の XINDEX がゼロではありません\n" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "セクション [%2d] '%s': シンボル %zu を得られません: %s\n" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不当な名前の値\n" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1476,7 +1586,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 大きすぎるセクションインデックスだが、拡" "張セクションインデックスセクションがありません\n" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1485,29 +1595,29 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: st_shndx (%) に適合するインデッ" "クス用に使われる XINDEX\n" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不当なセクションインデックス\n" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不明なタイプ\n" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不明なシンボルバインディング\n" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" "セクション [%2d] '%s': シンボル %zu: オブジェクトタイプと異なる固有のシンボ" "ル\n" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1515,14 +1625,14 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: COMMON はリロケータブルファイル内のみで" "許されます\n" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" "セクション [%2d] '%s': シンボル %zu: ローカルな COMMON シンボルは意味がありま" "せん\n" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" @@ -1530,12 +1640,12 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: COMMON セクションの機能は意味がありませ" "ん\n" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "セクション [%2d] '%s': シンボル %zu: st_value 境界外\n" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1544,7 +1654,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu は参照されるセクション [%2d] '%s' とは完" "全に一致しません\n" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1553,7 +1663,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 参照されるセクション [%2d] '%s' は " "SHF_TLS フラグが設定されていません\n" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1562,7 +1672,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: st_value 参照されるセクション [%2d] " "'%s' の境界外\n" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" @@ -1570,7 +1680,16 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: TLS プログラムヘッダー項目がない TLS シ" "ンボル\n" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" +"セクション [%2d] '%s': シンボル %zu: TLS プログラムヘッダー項目がない TLS シ" +"ンボル\n" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1579,7 +1698,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 参照されるセクション [%2d] '%s' の" "st_value 不足\n" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1588,7 +1707,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: sh_info に記述された範囲外のローカルシン" "ボル\n" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1597,12 +1716,12 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: sh_info に記述された範囲外の非ローカルシ" "ンボル\n" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "セクション [%2d] '%s': シンボル %zu: 非ローカルセクションシンボル\n" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1611,7 +1730,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルが間違ったセクション " "[%2d] を参照しています\n" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1620,7 +1739,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルはセクション [%2d] '%s' " "を参照しています\n" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1629,7 +1748,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボル値 %# は %s のセ" "クションアドレス %# と一致しません\n" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1638,7 +1757,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルサイズ % は %s " "のセクションサイズ % と一致しません\n" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1647,7 +1766,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルはありますが、.got セク" "ションがありません\n" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1656,7 +1775,7 @@ msgstr "" "セクション [%2d] '%s': _DYNAMIC_ シンボル値 %# は動的セグメントアドレ" "ス %# と一致しません\n" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1665,7 +1784,7 @@ msgstr "" "セクション [%2d] '%s': _DYNAMIC シンボルサイズ % は動的セグメントサイ" "ズ % と一致しません\n" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1674,24 +1793,29 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 省略以外の可視性を持った動的シンボルテー" "ブル中のシンボル\n" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" "セクション [%2d] '%s': シンボル %zu: st_other 中に設定された不明なビット\n" #: src/elflint.c:1082 +#, fuzzy, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:1098 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "セクション [%2d] '%s': この RELA セクション用に使われる DT_RELCOUNT\n" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" "セクション [%2d] '%s': このセクション用には高すぎる DT_RELCOUNT 値 %d\n" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1700,7 +1824,7 @@ msgstr "" "セクション [%2d] '%s': UT_RELOCOUNT で指定されたインデックス %d 後の相対リロ" "ケーション\n" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1709,51 +1833,52 @@ msgstr "" "セクション [%2d] '%s': インデックス %zu での非相対リロケーション; %d 相対リ" "ロケーションで指定された DT_RELCOUNT\n" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "セクション [%2d] '%s': この REL セクション用に使われる DT_RELACOUNT\n" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションインデックス\n" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションタイプ\n" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "セクション [%2d] '%s': sh_info はゼロでなければなりません\n" -#: src/elflint.c:1245 -#, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" +#: src/elflint.c:1263 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "セクション [%2d] '%s': マージできるセクションのリロケーションは不可能です\n" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" "セクション [%2d] '%s': セクション項目サイズが ElfXX_Rela と一致しません\n" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" "テキストリロケーションフラグが設定されていますが、読込み専用セグメントがあり" "ません\n" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "セクション [%2d] '%s': リロケーション %zu: 不当なタイプ\n" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1762,13 +1887,13 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: このファイル用のリロケーションタイ" "プは不当です\n" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "" "セクション [%2d] '%s': リロケーション %zu: 不当なシンボルインデックス\n" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1777,12 +1902,12 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: シンボル '_GLOBAL_OFFSET_TABLE_' " "のみが %s と一緒に使用できます\n" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "セクション [%2d] '%s': リロケーション %zu: オフセット境界外\n" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1791,7 +1916,7 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: タイプ %s のシンボルに対するコピー" "リロケーション\n" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1800,1109 +1925,1216 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: 読込み専用セクションが変更されまし" "たが、テキストリロケーションフラグが設定されていません\n" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" "セクション [%2d] '%s': リロケーションがロードされたデータとロードされなかった" "データに対してです\n" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, fuzzy, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" +"セクション [%2d] '%s': セクション [%2d] '%s' 用の文字列テーブルとして参照され" +"ていますが、タイプが SHT_STRTAB ではありません\n" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] '%s' referenced by sh_link\n" msgstr "" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, fuzzy, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "セクション [%2d] '%s': 不当な宛先セクションインデックス\n" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " "same symbol table\n" msgstr "" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" -#: src/elflint.c:2081 -#, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" -msgstr "" +#: src/elflint.c:2107 +#, fuzzy, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:2119 +#, fuzzy, c-format +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" +msgstr "セクション [%2d] '%s': 0番目の項目にある '%s' ゼロではありません\n" -#: src/elflint.c:2092 +#: src/elflint.c:2135 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" msgstr "" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, fuzzy, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "セクション [%2d] '%s': 不当な宛先セクションインデックス\n" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" msgstr "" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:2409 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "" +"\n" +"セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" + +#: src/elflint.c:2522 +#, fuzzy, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "セクション [%2d] '%s': 不当な宛先セクションタイプ\n" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, fuzzy, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "セクション [%2d] '%s': シンボル %d を得られません: %s\n" + +#: src/elflint.c:2634 #, fuzzy, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "" -#: src/elflint.c:2538 -#, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" -msgstr "" +#: src/elflint.c:2693 +#, fuzzy, c-format +msgid "section [%2d] '%s': section index %zu out of range\n" +msgstr "セクション [%2d] '%s': リロケーション %zu: オフセット境界外\n" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "" -#: src/elflint.c:2560 -#, c-format +#: src/elflint.c:2715 +#, fuzzy, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" +"セクション [%2d] '%s': シンボル %zu: 参照されるセクション [%2d] '%s' は " +"SHF_TLS フラグが設定されていません\n" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " "dynamic symbol table\n" msgstr "" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" msgstr "" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" msgstr "" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name '%s'\n" msgstr "" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" msgstr "" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" msgstr "" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" msgstr "" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " "segments\n" msgstr "" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, fuzzy, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:3918 +#, fuzzy, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "セクション [%2d] '%s': セクションデータを得られません\n" + +#: src/elflint.c:3924 +#, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " "%d\n" msgstr "" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d\n" msgstr "" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" msgstr "" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" msgstr "" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" msgstr "" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " "alignment\n" msgstr "" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" msgstr "" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -2923,8 +3155,8 @@ msgstr "" msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "" -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "[ふぁいる...]" @@ -2958,52 +3190,52 @@ msgstr "" msgid "while reading ELF file" msgstr "" -#: src/findtextrel.c:334 src/findtextrel.c:351 -#, c-format -msgid "cannot get program header index at offset %d: %s" -msgstr "" +#: src/findtextrel.c:329 +#, fuzzy, c-format +msgid "cannot get program header count: %s" +msgstr "プログラムヘッダーを得られません: %s" -#: src/findtextrel.c:403 -#, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "" +#: src/findtextrel.c:340 src/findtextrel.c:357 +#, fuzzy, c-format +msgid "cannot get program header index at offset %zd: %s" +msgstr "プログラムヘッダーを得られません: %s" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" "fPIC\n" msgstr "" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " "function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3034,342 +3266,342 @@ msgstr "GOTPLT セクションを割り当てられません: %s" msgid "initial-executable TLS relocation cannot be used " msgstr "最初に実行される TLS リロケーションが使用されません " -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "入力ファイル制御:" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "今から出力中の全アーカイブを含める。" -#: src/ld.c:83 +#: src/ld.c:82 #, fuzzy msgid "Stop including the whole archives in the output." msgstr "出力中の全アーカイブを含めるのを止める。" -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "ふぁいる" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "グループの開始。" -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "グループの終了。" -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "パス" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "ファイルが検索されるディレクトリーの一覧にPATHを追加する。" -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "" "実際に使用されるのなら以下のダイナミックライブラリーに DT_NEEDED を設定する" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "以下のダイナミックライブラリーに常に DT_NEEDED を設定する" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "LD_LIBRARY_PATH 環境変数を無視する。" -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "出力ファイル制御:" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "出力を ふぁいる に置く。" -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "オブジェクトは実行時に省略値の検索パスを使わないと記されています。" -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "--whole-archive と同じ。" -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" "アーカイブから抽出する時の省略値の規則: 弱い参照では十分ではありません。" -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "弱い参照はアーカイブから抽出します。" -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "複数の定義を認めます: 最初を使用します。" -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "DSO 中の未定義のシンボルを認めない/認める。" -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "オブジェクトには %ORIGIN の直接ハンドルが必要です。" -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "リロケーションは遅延処理されません。" -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "オプションは実行時にはアンロードできません。" -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "オブジェクトは最初に初期化されると記します。" -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "以下の依存性のための遅延ロードを有効/無効にします。" -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "'dlopen' でロードできないと記します。" -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "使用されない DSO の依存性を無視/記録します。" -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "生成された DSO はシステムライブラリーになります。" -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "アドレス" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "入口点アドレスを設定します。" -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "共用ライブラリーに対してリンクを設定してはいけません。" -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "共用ライブラリーに対してリンクを好みます。" -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "全ダイナミックシンボルをエクスポートします。" -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "全シンボルを取り除きます。" -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "デバッグシンボルを取り除きます。" -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "ターゲットシステムのページサイズを SIZE と見做します。" -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "実行時 DSO 検索パスを設定します。" -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "リンク時 DSO 検索パスを設定します。" -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "動的共用オブジェクトを生成します。" -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "リロケータブルオブジェクトを生成します。" -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "バージョンが指定されていないシンボルはローカルに減少します。" -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "使用されていないセクションを取り除きます。" -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "利用されていていセクションを取り除いてはいけません。" -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "共用ライブラリーの so 名を設定します。" -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "動的リンカーの名前を設定します。" -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "" ".comment セクションにリンクエディターを識別する追加情報を追加/抑止します。" -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr ".eh_frame_hdr セクションを生成します" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "ハッシュ形式を sysvか、gnu、両方のどれかに設定します。" -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "ビルド ID ノート (md5、sh1 (省略値)、uuid) を生成します。" -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "リンカー操作制御:" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "饒舌メッセージ。" -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "ファイルのオープンを追跡します。" -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "速度と引き換えにメモリー使用量を減らします" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "れべる" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "最適化レベルを れべる に設定します。" -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "ふぁいる でリンカースクリプトを使用します。" -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "パーサーのデバッグ情報を得るように選択します" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "ふぁいる からバージョン情報を読みます。" -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "エミュレーションを なまえ に設定します。" -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "オブジェクトとアーカイブファイルを一体化します。" -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "[ふぁいる]..." -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "少なくとも 1 つの入力ファイルが必要です" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "リンクの準備中にエラー" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "リンカースクリプト '%s' を開けません" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( 何も一致しない -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "-G か -r のどちらかひとつのオプションだけ認められます" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "-m パラメーターが1つを越えています" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "不明なオプション `%c %s'" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "不当なページサイズ値 '%s': 無視しました" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "不当なハッシュスタイル '%s'" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "不当なビルド-ID スタイル '%s'" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "ひとつを越える出力ファイル名が与えられました。" -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "不当な最適化レベル `%s'" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "ネストされた -( -) グループは認められません" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "対応する -( がない -)" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "不明なオプション '-%c %s'" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "出力ファイル形式を決定するための入力ファイルが見つかりません" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "適切な '-m' パラメーターを付けて再試行してください" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "バージョンスクリプト '%s' を読めません" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "リンカースクリプトに '%s' の重複定義" @@ -3417,8 +3649,8 @@ msgstr "" "警告: `%1$s の大きさが %3$s の %2$ から %5$s の %4$ に変更さ" "れました" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "セクション数を決定できません: %s" @@ -3656,7 +3888,7 @@ msgstr "内部エラー: 非 nobits セクションが nobits セクションに msgid "cannot get header of 0th section: %s" msgstr "0番目のセクションのヘッダーを得られません: %s" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "ELF ヘッダーを更新できません: %s" @@ -3710,7 +3942,7 @@ msgstr "リンカースクリプト '%1$s' 読込み中: %3$d 行目の %2$s" #: src/ldscript.y:737 #, fuzzy, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "名前なしバージョン用のローカルとグローバルで宣言されたシンボル '%s'" #: src/ldscript.y:739 @@ -3723,7 +3955,7 @@ msgstr "バージョン '%2$s' 用のローカルとグローバルで宣言さ msgid "default visibility set as local and global" msgstr "ローカルとグローバルに設定されたデフォルトの可視性" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "出力選択:" @@ -3751,7 +3983,7 @@ msgstr "未定義シンボルのみを表示" msgid "Include index for symbols from archive members" msgstr "アーカイブメンバーからのシンボルの索引を含める" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "出力形式:" @@ -3775,7 +4007,7 @@ msgstr "--format=bsd と同じ" msgid "Same as --format=posix" msgstr "--format=posix と同じ" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "シンボル値を印刷するために RADIX を使う" @@ -3788,7 +4020,7 @@ msgstr "弱いシンボルに印を点ける" msgid "Print size of defined symbols" msgstr "定義されたシンボルの印刷サイズ" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "出力オプション:" @@ -3812,28 +4044,28 @@ msgstr "" msgid "List symbols from FILEs (a.out by default)." msgstr "ふぁいる からシンボルを表示 (デフォルトではa.out)。" -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 #, fuzzy msgid "Output formatting" msgstr "出力形式:" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 -#, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 +#, fuzzy, c-format +msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: 内部エラー %d (%s-%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "'%s' を閉じている最中" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: ファイル形式を認識できませんでした" -#: src/nm.c:460 +#: src/nm.c:457 #, fuzzy msgid "" "\n" @@ -3842,42 +4074,42 @@ msgstr "" "\n" "アーカイブ索引:" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "シンボル %2$sの不正なオフセット %1$zu " -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "%2$s の中の %1$s\n" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "アーカイブのオフセットを最初にリセットできません" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: ファイル形式を認識できません" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "検索ツリーを生成できません" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "セクションヘッダー文字列テーブル索引が得られません" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -3890,7 +4122,7 @@ msgstr "" "%s からのシンボル:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3899,69 +4131,69 @@ msgstr "" "%*s%-*s %-*s クラス タイプ %-*s %*s セクション\n" "\n" -#: src/nm.c:1173 -#, c-format -msgid "%s: entry size in section `%s' is not what we expect" +#: src/nm.c:1232 +#, fuzzy, c-format +msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "%s: セクションの項目の大きさ `%s' は予期したものとは異なります" -#: src/nm.c:1177 -#, c-format -msgid "%s: size of section `%s' is not multiple of entry size" +#: src/nm.c:1237 +#, fuzzy, c-format +msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: セクション `%s' の大きさは項目の大きさの整数倍ではありません" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: 不当な操作" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: シンボルがありません" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "" -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "" -#: src/objdump.c:60 +#: src/objdump.c:59 #, fuzzy msgid "Output content selection:" msgstr "出力選択:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "" -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "" -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "操作が指定されていません。\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "不当なシンボル" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "不当なセクション" @@ -3977,116 +4209,111 @@ msgstr "" msgid "OFFSET" msgstr "" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "" -#: src/objdump.c:736 -#, fuzzy, c-format -msgid "cannot allocate memory" -msgstr "PLT セクションを割り当てられません: %s" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "" -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "" -#: src/readelf.c:71 +#: src/readelf.c:72 #, fuzzy msgid "ELF input selection:" msgstr "出力選択:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:76 #, fuzzy msgid "ELF output selection:" msgstr "出力選択:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "動的セグメントを表示" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "ELF ファイルヘッダーを表示" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "バケットリスト長の柱状図を表示" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "プログラムヘッダーを表示" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "リロケーションを表示" -#: src/readelf.c:85 +#: src/readelf.c:86 #, fuzzy msgid "Display the sections' headers" msgstr "セクションのヘッダーを表示" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "シンボルテーブルを表示" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "バージョニング情報の表示" -#: src/readelf.c:89 +#: src/readelf.c:90 #, fuzzy msgid "Display the ELF notes" msgstr "コアノートを表示" -#: src/readelf.c:91 +#: src/readelf.c:92 #, fuzzy msgid "Display architecture specific information, if any" msgstr "(もしあれば)アーキテクチャー固有の情報を表示" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "例外を取り扱うためのセクションを表示" -#: src/readelf.c:95 +#: src/readelf.c:96 #, fuzzy msgid "Additional output selection:" msgstr "出力選択:" -#: src/readelf.c:97 +#: src/readelf.c:98 #, fuzzy msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " @@ -4096,166 +4323,172 @@ msgstr "" "DWARF セクションの内容を表示。SECTION は addrevか、aranges、frame、info、" "loc、ranges、pubnames、str、macinfo、exception のいずれかです" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "数字か名前で解釈できないセクションの内容をダンプする" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "セクションの文字列内容を印刷する" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "アーカイブのシンボル索引を表示" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "出力制御:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "DWARFデータ中のアドレスのためのシンボル名を探さない" -#: src/readelf.c:112 +#: src/readelf.c:113 #, fuzzy msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "DWARFデータ中のアドレスのためのシンボル名を探さない" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "ELF ファイルから人間が読める形で情報を印刷する。" -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "不明な DWARF デバッグセクション `%s'.\n" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "Elf 記述子を生成できません: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "セクションを得られません: %s" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "セクションヘッダーを得られません: %s" -#: src/readelf.c:562 +#: src/readelf.c:571 #, fuzzy, c-format msgid "cannot get section name" msgstr "セクションを得られません: %s" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "%s の内容を得られません: %s" -#: src/readelf.c:587 +#: src/readelf.c:596 #, fuzzy, c-format msgid "cannot create temp file '%s'" msgstr "新しいファイル '%s' を生成できません: %s" -#: src/readelf.c:596 +#: src/readelf.c:605 #, fuzzy, c-format msgid "cannot write section data" msgstr "セクションデータを割り当てられません: %s" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "Elf 記述子を閉じている時にエラー: %s" -#: src/readelf.c:609 +#: src/readelf.c:618 #, fuzzy, c-format msgid "error while rewinding file descriptor" msgstr "Elf 記述子を閉じている時にエラー: %s" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "'%s' はアーカイブではなく、アーカイブ索引を印刷できません" -#: src/readelf.c:742 +#: src/readelf.c:751 #, fuzzy, c-format msgid "No such section '%s' in '%s'" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "入力ファイルを stat できません" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "入力ファイルが空です" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "'%s' の読込みに失敗: %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "ELF ヘッダーが読めません: %s" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "EBL ヘッダーを生成できません" -#: src/readelf.c:835 +#: src/readelf.c:858 #, fuzzy, c-format msgid "cannot determine number of program headers: %s" msgstr "セクション数を決定できません: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "なし (なし)" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "REL (リロケータブルファイル)" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "(EXEC (実行ファイル)" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "DYN (共用オブジェクトファイル)" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "CORE (コアファイル)" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "OS 固有: (%x)\n" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "プロセッサー固有: (%x)\n" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " @@ -4263,7 +4496,7 @@ msgstr "" "ELF ヘッダー:\n" " マジック: " -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" @@ -4272,117 +4505,117 @@ msgstr "" "\n" " クラス: %s\n" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr " データ: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " 識別バージョン: %hhd %s\n" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(現在)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr " OS/ABI: %s\n" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr " ABI バージョン: %hhd\n" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " タイプ: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr " マシン : %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr " バージョン: %d %s\n" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr " 入口点アドレス : %#\n" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr " プログラムヘッダーの開始: % %s\n" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "(ファイルへのバイト数)" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr " セクションヘッダーの開始: % %s\n" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr " フラグ: %s\n" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr " このヘッダーの大きさ: % %s\n" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(バイト)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr " プログラムヘッダー項目の大きさ:% %s\n" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, fuzzy, c-format msgid " Number of program headers entries: %" msgstr " プログラムヘッダー項目の数 : %\n" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, fuzzy, c-format msgid " (% in [0].sh_info)" msgstr "([0].sh_link の %)" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr "([0]は使えません)" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr " セクションヘッダー項目の大きさ:% %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr " セクションヘッダー項目の数 : %" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr " ([0].sh_size の %)" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr "([0].sh_link の %)" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4391,7 +4624,7 @@ msgstr "" " セクションヘッダー文字列テーブル索引: XINDEX%s\n" "\n" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" @@ -4400,7 +4633,7 @@ msgstr "" " セクションヘッダー文字列テーブル索引: %\n" "\n" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4409,11 +4642,11 @@ msgstr "" "オフセット %2$# から始まる %1$d 個のセクションヘッダーがあります:\n" "\n" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "セクションヘッダー:" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4421,7 +4654,7 @@ msgstr "" "[番] 名前 タイプ アドレス オフセ 大きさ ES フラグLk " "Inf Al" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4429,17 +4662,35 @@ msgstr "" "[番] 名前 タイプ アドレス オフセ 大きさ ES " "フラグLk Inf Al" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1213 +#, fuzzy, c-format +msgid "bad compression header for section %zd: %s" +msgstr "セクションヘッダー文字列セクションを生成できません: %s" + +#: src/readelf.c:1224 +#, fuzzy, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "セクションからデータを得られません %d: %s" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "プログラムヘッダー:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " タイプ オフセ 仮アドレス 物アドレス ファイ量 メモ量 Flg 調整 " -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4447,12 +4698,12 @@ msgstr "" " タイプ オフセ 仮想アドレス 物理アドレス ファイル量メモ" "量 Flg 調整 " -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[プログラム割込みを要求: %s]\n" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" @@ -4462,12 +4713,12 @@ msgstr "" " セクションからセグメントへのマッビング:\n" " セグメント セクション..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "プログラムヘッダーを得られません: %s" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4480,7 +4731,7 @@ msgstr[0] "" "署名 '%3$s' を持つ COMDAT セクショングループ [%1$2zu] '%2$s' には %4$zu 個の" "項目があります:\n" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4493,21 +4744,25 @@ msgstr[0] "" "署名 '%3$s' を持つセクショングループ [%1$2zu] '%2$s' には %4$zu 個の項目があ" "ります:\n" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "<不当なシンボル>" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "<不当なセクション>" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 #, fuzzy, c-format -msgid "invalid sh_link value in section %Zu" +msgid "invalid sh_link value in section %zu" msgstr "不当な .debug_line セクション" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4523,36 +4778,36 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr " タイプ 値\n" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "共用ライブラリー: [%s]\n" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "ライブラリー so 名: [%s]\n" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "ライブラリー rパス: [%s]\n" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "ライブラリー run パス: [%s]\n" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "% (バイト)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" @@ -4561,7 +4816,7 @@ msgstr "" "\n" "オフセット %#0 に不当なシンボルテーブル\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4576,7 +4831,7 @@ msgstr[0] "" "オフセット %5$#0 のセクション [%3$2u] '%4$s' 用のリロケーションセク" "ション [%1$2zu] '%2$s' には %6$d 個の項目があります:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4589,29 +4844,29 @@ msgstr[0] "" "オフセット %3$#0 のリロケーションセクション [%1$2u] '%2$s' には %4$d " "個の項目があります:\n" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr " オフセット タイプ 値 名前\n" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr " オフセット タイプ 値 名前\n" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "<不当なRELOC>" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr " オフセット タイプ 値 付加名\n" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr " オフセット タイプ 値 付加名\n" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4623,39 +4878,39 @@ msgstr[0] "" "\n" "シンボルテーブル [%2u] '%s' には %u 個の項目があります:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" msgstr[0] " %lu ローカルシンボル文字列テーブル: [%2u] '%s'\n" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " 数 : 値 大き タイプ Bind Vis Ndx 名前\n" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " 数 : 値 大き タイプ Bind Vis Ndx 名前\n" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "不正な動的シンボル" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "なし" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| <不明>" -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4671,17 +4926,17 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: バージョン: %hu ファイル: %s 数: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: 名前: %s フラグ: %s バージョン: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4697,17 +4952,17 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr " %#06x: バージョン: %hd フラグ: %s 索引: %hd 数: %hd 名前: %s\n" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: 親 %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4723,15 +4978,15 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *ローカル* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *グローバル* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -4749,22 +5004,22 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, fuzzy, no-c-format msgid " Length Number % of total Coverage\n" msgstr " 長さ 数 全体の% 範囲 \n" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, fuzzy, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4773,12 +5028,27 @@ msgstr "" " テストの平均数: 検索成功: %f\n" " 検索失敗: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "セクションからデータを得られません %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3148 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3206 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4788,7 +5058,7 @@ msgstr "" " ビットマスクの大きさ: %zu バイト %%% ビット設定 第2ハッシュシフ" "ト: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -4801,7 +5071,7 @@ msgstr[0] "" "オフセット %3$#0 のライブラリー一覧セクション [%1$2zu] '%2$s' には " "%4$d 個の項目があります:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4809,7 +5079,7 @@ msgstr "" " ライブラリー タイムスタンプ チェックサム バー" "ジョン フラグ" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -4820,140 +5090,140 @@ msgstr "" "オフセット %4$#0 の %3$ バイトのオブジェクト属性セクション " "[%1$2zu] '%2$s':\n" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr " 所有者 大きさ\n" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " ファイル: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %、%s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "空ブロック" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "%zu バイトのブロック:" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, c-format msgid "%s %# used with different base addresses" msgstr "" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr "" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -4964,7 +5234,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" " [ コード]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" @@ -4973,30 +5243,30 @@ msgstr "" "\n" "オフセット % の略語セクション:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** 略語を読んでいる間にエラー: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] オフセット: %、子: %s、タグ: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "はい" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "いいえ" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr ".debug_aragnes の内容を得られません: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -5009,20 +5279,20 @@ msgstr[0] "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" " [%*zu] 開始: %0#*、長さ: %5、CU DIE オフセット: %6\n" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" @@ -5031,117 +5301,122 @@ msgstr "" "\n" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:4569 src/readelf.c:6171 -#, c-format +#: src/readelf.c:4797 src/readelf.c:6494 +#, fuzzy, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" "\n" "オフセット %Zu のテーブル:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, fuzzy, c-format msgid "" "\n" " Length: %6\n" msgstr " (オフセット: %#)" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, fuzzy, c-format msgid " DWARF version: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, fuzzy, c-format msgid " CU offset: %6\n" msgstr " (オフセット: %#)" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, fuzzy, c-format msgid " Address size: %6\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, fuzzy, c-format msgid "unsupported address size" msgstr "アドレス値ではありません" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, fuzzy, c-format msgid "" " Segment size: %6\n" "\n" msgstr " ファイルを % に設定する\n" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, fuzzy, c-format msgid " %s..%s (%)\n" msgstr " %s: %\n" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr ".degub_ranges の内容を得られません: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] ベースアドレス %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, fuzzy, c-format msgid " [%6tx] empty list\n" msgstr "" "\n" " [%6tx] ゼロ終端\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +#, fuzzy +msgid " \n" +msgstr " [%6tx] <不当なデータ>\n" + +#: src/readelf.c:5493 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "次の DIE を得られません: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" @@ -5150,7 +5425,7 @@ msgstr "" "\n" "オフセット %3$# の フレーム情報呼出しセクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" @@ -5159,50 +5434,50 @@ msgstr "" "\n" " [%6tx] ゼロ終端\n" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, fuzzy, c-format msgid "invalid augmentation length" msgstr "不当な拡大エンコード" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "FDE アドレスエンコード" -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "LSDA ポインターエンコード:" -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr " (オフセット: %#)" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr " (終了オフセット: %#)" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sLSDA ポインター: %#\n" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "属性コードを得られません: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "属性様式を得られません: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "属性値を得られません: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5213,7 +5488,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" " [オフセット]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, fuzzy, c-format msgid "" " Type unit at offset %:\n" @@ -5225,7 +5500,7 @@ msgstr "" " バージョン: %2$、略語セクションオフセット: %3$、アドレスの大" "きさ: %4$、オフセットの大きさ: %5$\n" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5236,35 +5511,35 @@ msgstr "" " バージョン: %2$、略語セクションオフセット: %3$、アドレスの大" "きさ: %4$、オフセットの大きさ: %5$\n" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "" "セクション '%2$s' の オフセット %1$ の DIE を得られません: %3$s" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "DIE オフセットを得られません: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "" "セクション '%2$s' 中のオフセット %1$ の DIE のタグを得られません: " "%3$s" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "次の DIE を得られません: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "次の DIE を得られません: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, fuzzy, c-format msgid "" "\n" @@ -5274,12 +5549,12 @@ msgstr "" "\n" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "ラインデータセクションデータを得られません: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, fuzzy, c-format msgid "" "\n" @@ -5307,18 +5582,18 @@ msgstr "" "\n" "命令コード:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "セクション [%2$zu] '%3$s' 中のオフセット %1$tu に不当なデータ" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] " [%*] %hhu パラメーター\n" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" @@ -5326,7 +5601,7 @@ msgstr "" "\n" "ディレクトリーテーブル:" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" @@ -5336,7 +5611,7 @@ msgstr "" "ファイル名テーブル:\n" " Entry Dir 時刻 大きさ 名前" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" @@ -5344,205 +5619,215 @@ msgstr "" "\n" "行 番号 文:" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "" + +#: src/readelf.c:6733 #, fuzzy, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr " 特殊命令コード %u: アドレス+%u = %s, 行%+d = %zu\n" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr " 特殊命令コード %u: アドレス+%u = %s, 行%+d = %zu\n" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr " 拡張命令コード %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6763 #, fuzzy msgid " end of sequence" msgstr "列の終わり" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, fuzzy, c-format msgid " set address to %s\n" msgstr "アドレスを %s に設定する\n" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, fuzzy, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" "新ファイルを定義する: dir=%u、mtime=%、長さh=%、名前=%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, fuzzy, c-format msgid " set discriminator to %u\n" msgstr "カラムを % に設定する\n" -#: src/readelf.c:6477 +#: src/readelf.c:6827 #, fuzzy msgid " unknown opcode" msgstr "不明な命令コード" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr "複写" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, fuzzy, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr "アドレスを %u だけ進めて %s にする\n" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, fuzzy, c-format msgid " advance address by %u to %s\n" msgstr "アドレスを %u だけ進めて %s にする\n" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr "行を定数 %d だけ進めて % にする\n" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr " ファイルを % に設定する\n" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr "カラムを % に設定する\n" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr " '%s' を % に設定する\n" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr "基本ブロックフラグを設定する" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, fuzzy, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr "アドレスを定数 %u だけ済めて %s にする\n" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, fuzzy, c-format msgid " advance address by constant %u to %s\n" msgstr "アドレスを定数 %u だけ済めて %s にする\n" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, fuzzy, c-format msgid " advance address by fixed value %u to %s\n" msgstr "アドレスを固定値 %u だけ進めて %s にする\n" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr "プロローグ終了フラグを設定する" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr "エピローグ開始フラグを設定する" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, fuzzy, c-format msgid " set isa to %u\n" msgstr " ファイルを % に設定する\n" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] " % 個のパラメーターのある不明な命令コード:" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr ".debug_loc の内容を得られません: %s" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 #, fuzzy msgid " \n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "マクロ情報セクションのデータを得られません: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** 最後のセクションの終端していない文字列" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, fuzzy, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** 最後のセクションの終端していない文字列" + +#: src/readelf.c:7334 #, fuzzy, c-format msgid " Offset: 0x%\n" msgstr " 所有者 大きさ\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, fuzzy, c-format msgid " Flag: 0x%\n" msgstr " 入口点アドレス : %#\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, fuzzy, c-format msgid " Offset length: %\n" msgstr " (オフセット: %#)" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, fuzzy, c-format msgid " .debug_line offset: 0x%\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, fuzzy, c-format msgid " extension opcode table, % items:\n" msgstr " % 個のパラメーターのある不明な命令コード:" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, fuzzy, c-format msgid " % arguments:" msgstr " [%*] %hhu パラメーター\n" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" @@ -5550,7 +5835,7 @@ msgstr "" # # "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" # # " %4$*s 文字列\n" がエラーになるのは何故? 取り敢えず fuzzy扱い -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, fuzzy, c-format msgid "" "\n" @@ -5561,12 +5846,12 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" " %4$*s 文字列\n" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** 文字列の読込み中にエラー: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" @@ -5575,7 +5860,7 @@ msgstr "" "\n" "呼出しフレーム検索テーブルセクション [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" @@ -5584,22 +5869,22 @@ msgstr "" "\n" "例外取扱いテーブルセクション [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr " LPStart コード化: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr "TType コード化: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr "呼出しサイトコード化: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" @@ -5607,7 +5892,7 @@ msgstr "" "\n" " 呼出しサイトテーブル:" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5620,12 +5905,12 @@ msgstr "" " 離着陸場: %#\n" " 行動: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "不当な TType コード化" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, fuzzy, c-format msgid "" "\n" @@ -5635,37 +5920,37 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, fuzzy, c-format msgid " CU offset: %#\n" msgstr " (オフセット: %#)" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, fuzzy, c-format msgid " TU offset: %#\n" msgstr " (オフセット: %#)" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, fuzzy, c-format msgid " address offset: %#\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, fuzzy, c-format msgid " symbol offset: %#\n" msgstr " (オフセット: %#)" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, fuzzy, c-format msgid " constant offset: %#\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, fuzzy, c-format msgid "" "\n" @@ -5675,7 +5960,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, fuzzy, c-format msgid "" "\n" @@ -5685,7 +5970,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, fuzzy, c-format msgid "" "\n" @@ -5695,7 +5980,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, fuzzy, c-format msgid "" "\n" @@ -5704,17 +5989,17 @@ msgstr "" "\n" "オフセット %#0 に不当なシンボルテーブル\n" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "デバッグ内容記述子を得られません: %s" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "コアノートデータの変換ができません: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" @@ -5723,21 +6008,21 @@ msgstr "" "\n" "%*s... < %u 回の繰返し> ..." -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr " 所有者 データ大きさタイプ\n" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "ノートセクションの内容を得られません: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" @@ -5747,7 +6032,7 @@ msgstr "" "オフセット %4$#0 の %3$ バイトのノートセクション [%1$2zu] " "'%2$s':\n" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" @@ -5756,50 +6041,72 @@ msgstr "" "\n" "オフセット %2$#0 の %1$ バイトのノートセグメント:\n" -#: src/readelf.c:9083 -#, c-format +#: src/readelf.c:9501 +#, fuzzy, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Section [%zu] '%s' has no data to dump.\n" msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/readelf.c:9089 src/readelf.c:9112 -#, c-format -msgid "cannot get data for section [%Zu] '%s': %s" +#: src/readelf.c:9518 src/readelf.c:9559 +#, fuzzy, c-format +msgid "cannot get data for section [%zu] '%s': %s" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/readelf.c:9093 -#, c-format +#: src/readelf.c:9523 +#, fuzzy, c-format +msgid "" +"\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" +msgstr "" +"\n" +"オフセット %4$#0 のセクション [%1$Zu] '%2$s' の16進ダン" +"プ、%3$ バイト:\n" + +#: src/readelf.c:9528 +#, fuzzy, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" msgstr "" "\n" "オフセット %4$#0 のセクション [%1$Zu] '%2$s' の16進ダン" "プ、%3$ バイト:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9542 #, fuzzy, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/readelf.c:9116 -#, c-format +#: src/readelf.c:9564 +#, fuzzy, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" msgstr "" "\n" "オフセット %4$#0 文字列セクション [%1$Zu] '%2$s' には %3$ バ" "イトあります:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9569 +#, fuzzy, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" +msgstr "" +"\n" +"オフセット %4$#0 文字列セクション [%1$Zu] '%2$s' には %3$ バ" +"イトあります:\n" + +#: src/readelf.c:9618 #, c-format msgid "" "\n" @@ -5808,7 +6115,7 @@ msgstr "" "\n" "セクション [%lu] がありません" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" @@ -5817,12 +6124,12 @@ msgstr "" "\n" "セクション '%s' がありません" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "アーカイブのシンボル索引 '%s' を得られません: %s" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" @@ -5831,26 +6138,26 @@ msgstr "" "\n" "アーカイブ '%s' にはシンボル索引がありません\n" -#: src/readelf.c:9257 -#, c-format +#: src/readelf.c:9711 +#, fuzzy, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" "\n" "アーカイブ '%s' の索引には %Zu 項目あります:\n" -#: src/readelf.c:9275 -#, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" +#: src/readelf.c:9729 +#, fuzzy, c-format +msgid "cannot extract member at offset %zu in '%s': %s" msgstr "'%2$s' の オフセット %1$Zu のメンバーを抽出できません: %3$s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "アーカイブメンバー '%s' には以下があります:\n" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" @@ -5858,612 +6165,755 @@ msgstr "" "出力形式として FORMAT を使ってください。FORMAT は `bsd'か、`sysv' のどちらか" "です。省略値は `bsd'です" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "`--format=sysv' と同じ" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "`--format=bsd' と同じ" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "`--radix=10' と同じ" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "`--radix=8' と同じ" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "`--radix=16' と同じ" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "`--format=sysv' の出力と似ていますが、1行です" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "ロード可能セグメントのための印刷の大きさと許可フラグ" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "合計の大きさを表示 (bsd のみ)" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "ふぁいる のセクションの大きさの一覧 (省略値は a.out)" -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "不当な形式: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "不当な基数: %s" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "%s: ファイル形式を認識できません" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "(合計)\n" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "" + +#: src/stack.c:494 +#, fuzzy, c-format +msgid "Cannot open core file '%s'" +msgstr "アーカイブ '%s' を開くことができません" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "" + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "" + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "" + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "" + +#: src/stack.c:644 +#, fuzzy +msgid "Show stack of process PID" +msgstr "検索ツリーを生成できません" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "" + +#: src/stack.c:651 +#, fuzzy +msgid "Output selection options:" +msgstr "選択オプションを入力してください:" + +#: src/stack.c:653 +#, fuzzy +msgid "Additionally show frame activation" +msgstr "出力選択:" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "" + +#: src/stack.c:662 +#, fuzzy +msgid "Additionally show source file information" +msgstr "出力選択:" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "" + +#: src/strings.c:66 msgid "Output Selection:" msgstr "" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" msgstr "" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "" -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "" -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "" -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "" -#: src/strings.c:596 +#: src/strings.c:600 #, c-format -msgid "lseek64 failed" +msgid "lseek failed" msgstr "" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "はぎ取った出力を ふぁいる に置く" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "抽出した取り除いたセクションを ふぁいる に置く" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "-f パラメーターの代わりに 名前 ふぁいる を有効にする" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "デバッグ用のシンボルを全て取り除く" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "修正/アクセスタイムスタンプを出力へ複写する" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr ".comment セクションを取り除く" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "少し壊れた ELF ファイルを取り扱うためにルールを少し緩和する" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "オブジェクトファイルからシンボルを破棄する" -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "'-o' と '-f' と一緒の場合は入力ファイルは 1 つしか認められません" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "-f オプションが 2 回指定されています" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "-F オプションが 2 回指定されています" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "-o オプションが 2 回指定されています" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "-R オプションは .comment セクションのみをサポートします" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "入力ファイル '%s' を stat できません" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "'%s' を開いている間" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: アーカイブから抜き出している時は -o や -f は使えません" -#: src/strip.c:468 +#: src/strip.c:384 +#, fuzzy, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: アーカイブから抜き出している時は -o や -f は使えません" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "EBL バックエンドを開けません" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "セクション数を決定できません: %s" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "新しいファイル '%s' を生成できません: %s" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "不適格なファイル '%s'" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "出力ファイルを生成している間: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: ELF ヘッダーを生成している間にエラー: %s" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "'%s' のための出力を準備している間" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "セクションヘッダーセクションを生成している間: %s" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "セクションヘッダー文字列テーブルを生成中: %s" -#: src/strip.c:1752 +#: src/strip.c:1861 #, fuzzy, c-format msgid "bad relocation" msgstr "リロケーションを表示" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "'%s' を書込み中: %s" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "'%s' を生成中" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "デバッグ情報のチェックサムを計算中" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: ファイルを読込み中にエラー: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, fuzzy, c-format msgid "while writing '%s'" msgstr "'%s' を書込み中: %s" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "'%s' の終了中にエラー: %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "'%s' のアクセスと変更日付を設定できません" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "セクション数を決定できません: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" +msgid "unexpected section type in [%zu] with sh_link to symtab" msgstr "" -#: src/unstrip.c:771 -#, c-format -msgid "invalid string offset in symbol [%Zu]" -msgstr "" +#: src/unstrip.c:809 +#, fuzzy, c-format +msgid "invalid string offset in symbol [%zu]" +msgstr "シンボル %2$sの不正なオフセット %1$zu " -#: src/unstrip.c:913 src/unstrip.c:1254 -#, c-format -msgid "cannot read section [%Zu] name: %s" -msgstr "" +#: src/unstrip.c:967 src/unstrip.c:1313 +#, fuzzy, c-format +msgid "cannot read section [%zu] name: %s" +msgstr "セクションデータを割り当てられません: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" +msgid "overflow with shnum = %zu in '%s' section" msgstr "" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1108 src/unstrip.c:1433 +#, fuzzy, c-format +msgid "cannot find matching section for [%zu] '%s'" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1551 -#, c-format -msgid "symbol [%Zu] has invalid section index" -msgstr "" +#: src/unstrip.c:1618 +#, fuzzy, c-format +msgid "symbol [%zu] has invalid section index" +msgstr "不当なセクション索引" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, fuzzy, c-format msgid "cannot read section data: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6490,9 +6940,18 @@ msgid "" "was found, or . if FILE contains the debug information." msgstr "" +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "" + +#: tests/dwflmodtest.c:213 #, fuzzy -#~ msgid "cannot attach to process" -#~ msgstr "検索ツリーを生成できません" +msgid "Additionally show function names" +msgstr "出力選択:" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "" #, fuzzy #~ msgid "cannot attach to core" diff --git a/po/pl.gmo b/po/pl.gmo index 98d93d3..54e9ece 100644 Binary files a/po/pl.gmo and b/po/pl.gmo differ diff --git a/po/pl.po b/po/pl.po index b5224dc..66c4f59 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1,13 +1,13 @@ # translation of pl.po to Polish # Jakub Bogusz , 2003-2007. -# Piotr Drąg , 2010-2012. +# Piotr Drąg , 2010-2016. # msgid "" msgstr "" -"Project-Id-Version: pl\n" +"Project-Id-Version: elfutils\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" -"PO-Revision-Date: 2012-09-02 19:12+0200\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" +"PO-Revision-Date: 2016-01-07 15:44+0100\n" "Last-Translator: Piotr Drąg \n" "Language-Team: Polish \n" "Language: pl\n" @@ -17,8 +17,35 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" +"koloruje wyjście. WHEN domyślnie wynosi „always” lub może wynosić „auto” lub " +"„never”" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" +"%s: nieprawidłowy parametr „%s” dla „--color”\n" +"prawidłowe parametry:\n" +" • „always”, „yes”, „force”\n" +" • „never”, „no”, „none”\n" +" • „auto”, „tty”, „if-tty”\n" + +#: lib/color.c:190 src/objdump.c:738 +#, c-format +msgid "cannot allocate memory" +msgstr "nie można przydzielić pamięci" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "pamięć wyczerpana" @@ -28,7 +55,7 @@ msgstr "pamięć wyczerpana" msgid "no error" msgstr "brak błędu" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "brak pamięci" @@ -67,7 +94,7 @@ msgstr "błąd podczas wyprowadzania danych" msgid "no backend support available" msgstr "brak dostępnej obsługi zaplecza" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "nieznany błąd" @@ -93,122 +120,134 @@ msgid "no DWARF information" msgstr "brak informacji DWARF" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "nie można dekompresować DWARF" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "brak pliku ELF" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "nie można uzyskać nagłówka ELF" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "niezaimplementowane" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "nieprawidłowe polecenie" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "nieprawidłowa wersja" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "nieprawidłowy plik" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "nie odnaleziono wpisów" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "nieprawidłowy DWARF" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "brak danych w postaci ciągu" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "brak wartości adresu" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "brak wartości stałej" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "brak wartości odwołania" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "nieprawidłowa wartość odwołania" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr "brak sekcji .debug_line" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "nieprawidłowa sekcja .debug_line" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "informacje debugowania są za duże" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "nieprawidłowa wersja DWARF" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "nieprawidłowy indeks katalogu" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "adres jest spoza zakresu" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "brak wartości listy położeń" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "brak danych blokowych" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "nieprawidłowy indeks wiersza" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "nieprawidłowy indeks zakresu adresów" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "brak pasującego zakresu adresów" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "brak wartości flagi" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "nieprawidłowy offset" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr "brak sekcji .debug_ranges" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "nieprawidłowa wersja CFI" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "nie odnaleziono alternatywnego dowiązania debugowania" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +msgid "invalid opcode" +msgstr "nieprawidłowa instrukcja" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "nie jest CU (jednostką) DIE" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "Opcje wyboru wejścia:" @@ -240,7 +279,7 @@ msgstr "Wyszukuje adresy w uruchomionych jądrze" msgid "Kernel with all modules" msgstr "Jądro ze wszystkimi modułami" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "Wyszukuje ścieżkę dla oddzielnych plików debuginfo" @@ -265,7 +304,11 @@ msgstr "nie można odnaleźć jądra lub modułów" msgid "cannot read ELF core file: %s" msgstr "nie można odczytać pliku core ELF: %s" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +msgid "Not enough memory" +msgstr "Za mało pamięci" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "Nie rozpoznano żadnych modułów w pliku core" @@ -287,15 +330,15 @@ msgstr "Proszę zobaczyć ebl_errno (brak XXX)" #: libdwfl/libdwflP.h:60 msgid "gzip decompression failed" -msgstr "dekompresja gzip nie powiodła się" +msgstr "dekompresja gzip się nie powiodła" #: libdwfl/libdwflP.h:61 msgid "bzip2 decompression failed" -msgstr "dekompresja bzip2 nie powiodła się" +msgstr "dekompresja bzip2 się nie powiodła" #: libdwfl/libdwflP.h:62 msgid "LZMA decompression failed" -msgstr "dekompresja LZMA nie powiodła się" +msgstr "dekompresja LZMA się nie powiodła" #: libdwfl/libdwflP.h:63 msgid "no support library found for machine" @@ -367,140 +410,136 @@ msgstr "uszkodzone dane sekcji .gnu.prelink_undo" #: libdwfl/libdwflP.h:82 msgid "Internal error due to ebl" -msgstr "" +msgstr "Wewnętrzny błąd z powodu ebl" #: libdwfl/libdwflP.h:83 msgid "Missing data in core file" -msgstr "" +msgstr "Brak danych w pliku core" #: libdwfl/libdwflP.h:84 -#, fuzzy msgid "Invalid register" -msgstr "nieprawidłowy parametr" +msgstr "Nieprawidłowy rejestr" #: libdwfl/libdwflP.h:85 msgid "Error reading process memory" -msgstr "" +msgstr "Błąd podczas odczytywania pamięci procesu" #: libdwfl/libdwflP.h:86 msgid "Couldn't find architecture of any ELF" -msgstr "" +msgstr "Nie można odnaleźć architektury żadnego ELF" #: libdwfl/libdwflP.h:87 msgid "Error parsing /proc filesystem" -msgstr "" +msgstr "Błąd podczas przetwarzania systemu plików /proc" #: libdwfl/libdwflP.h:88 -#, fuzzy msgid "Invalid DWARF" -msgstr "nieprawidłowy DWARF" +msgstr "Nieprawidłowy DWARF" #: libdwfl/libdwflP.h:89 msgid "Unsupported DWARF" -msgstr "" +msgstr "Nieobsługiwany DWARF" #: libdwfl/libdwflP.h:90 msgid "Unable to find more threads" -msgstr "" +msgstr "Nie można odnaleźć więcej wątków" #: libdwfl/libdwflP.h:91 msgid "Dwfl already has attached state" -msgstr "" +msgstr "Dwfl już posiada załączony stan" #: libdwfl/libdwflP.h:92 msgid "Dwfl has no attached state" -msgstr "" +msgstr "Dwfl nie posiada załączonego stanu" #: libdwfl/libdwflP.h:93 msgid "Unwinding not supported for this architecture" -msgstr "" +msgstr "Odwijanie nie jest obsługiwane dla tej architektury" #: libdwfl/libdwflP.h:94 -#, fuzzy msgid "Invalid argument" -msgstr "nieprawidłowy parametr" +msgstr "Nieprawidłowy parametr" #: libdwfl/libdwflP.h:95 -#, fuzzy msgid "Not an ET_CORE ELF file" -msgstr "nie jest prawidłowym plikiem ELF" +msgstr "Nie jest plikiem ELF ET_CORE" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "Brak zaplecza" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr ": %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, c-format msgid "unknown SDT version %u\n" msgstr "nieznana wersja SDT %u\n" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, c-format msgid "invalid SDT probe descriptor\n" msgstr "nieprawidłowy deskryptor sondy SDT\n" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr " PC: " -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr " Podstawa: " -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr " Semafor: " -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr " Dostawca: " -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr " Nazwa: " -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr " Parametry: " -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " Identyfikator kopii: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr " Wersja konsolidatora: %.*s\n" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " System operacyjny: %s, ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "Samodzielny" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr ": %d" @@ -515,7 +554,7 @@ msgstr "nieznany typ" #: libelf/elf_error.c:75 msgid "invalid `Elf' handle" -msgstr "nieprawidłowa obsługa \"Elf\"" +msgstr "nieprawidłowa obsługa „Elf”" #: libelf/elf_error.c:79 msgid "invalid size of source operand" @@ -525,7 +564,7 @@ msgstr "nieprawidłowy rozmiar operanda źródłowego" msgid "invalid size of destination operand" msgstr "nieprawidłowy rozmiar operanda docelowego" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "nieprawidłowe kodowanie" @@ -606,8 +645,8 @@ msgstr "dane/scn nie zgadzają się" msgid "invalid section header" msgstr "nieprawidłowy nagłówek sekcji" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "nieprawidłowe dane" @@ -618,7 +657,7 @@ msgstr "nieznane kodowanie danych" #: libelf/elf_error.c:195 msgid "section `sh_size' too small for data" -msgstr "sekcja \"sh_size\" jest za mała dla danych" +msgstr "sekcja „sh_size” jest za mała dla danych" #: libelf/elf_error.c:199 msgid "invalid section alignment" @@ -651,356 +690,415 @@ msgstr "" msgid "file has no program header" msgstr "plik nie posiada nagłówków programu" +#: libelf/elf_error.c:237 +msgid "invalid section type" +msgstr "nieprawidłowy typ sekcji" + +#: libelf/elf_error.c:242 +msgid "invalid section flags" +msgstr "nieprawidłowe flagi sekcji" + +#: libelf/elf_error.c:247 +msgid "section does not contain compressed data" +msgstr "sekcja nie zawiera skompresowanych danych" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "sekcja zawiera skompresowane dane" + +#: libelf/elf_error.c:257 +msgid "unknown compression type" +msgstr "nieznany typ kompresji" + +#: libelf/elf_error.c:262 +msgid "cannot compress data" +msgstr "nie można kompresować danych" + +#: libelf/elf_error.c:267 +msgid "cannot decompress data" +msgstr "nie można dekompresować danych" + #: src/addr2line.c:58 -msgid "Output selection options:" -msgstr "Opcje wyboru wyjścia:" +msgid "Input format options:" +msgstr "Opcje formatowania wejścia:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." +msgstr "Traktuje adresy jako offsety względne do sekcji NAZWA." + +#: src/addr2line.c:62 +msgid "Output format options:" +msgstr "Opcje formatowania wyjścia:" + +#: src/addr2line.c:63 +msgid "Print address before each entry" +msgstr "Wyświetla adres pliku przed każdym wpisem" + +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Wyświetla tylko podstawowe nazwy plików źródłowych" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "Wyświetla bezwzględne nazwy plików używając katalogu kompilacji" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "Wyświetla także nazwy funkcji" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" -msgstr "Wyświetla także nazwy symboli ub sekcji" +msgstr "Wyświetla także nazwy symboli lub sekcji" -#: src/addr2line.c:64 -#, fuzzy +#: src/addr2line.c:69 msgid "Also show symbol and the section names" -msgstr "Wyświetla także nazwy symboli ub sekcji" +msgstr "Wyświetla także nazwy symboli i sekcji" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "Wyświetla także flagi tabeli wierszy" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "Traktuje adresy jako offsety względne do sekcji NAZWA." - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" +"Wyświetla wszystkie położenia źródłowe, które spowodowały wstawione " +"rozszerzenie podprogramów pod tym adresem." + +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "" +"Wyświetla symbole z usuniętym dekorowaniem (PARAMETR jest zawsze ignorowany)" -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "Wyświetla wszystkie informacje w jednym wierszy i wyrównuje wstawki" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Różne:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" "Odnajdywanie plików źródłowych i informacji o wierszu dla ADRESU (domyślne w " "a.out)." -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" -msgstr "[ADRES...]" +msgstr "[ADRES…]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" msgstr "" -"Copyright (C) %s Red Hat, Inc.\n" +"Copyright © %s Red Hat, Inc.\n" "Niniejszy program jest wolnym oprogramowaniem; proszę zobaczyć kod źródłowy\n" "w celu poznania warunków kopiowania. Niniejszy program rozprowadzany jest\n" "BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI\n" "HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "Napisane przez %s.\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "Składnia sekcji wymaga dokładnie jednego modułu" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" -msgstr "offset %# leży poza sekcją \"%s\"" +msgstr "offset %# leży poza sekcją „%s”" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" -msgstr "nie można odnaleźć symbolu \"%s\"" +msgstr "nie można odnaleźć symbolu „%s”" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" -msgstr "offset %# leży poza zawartością \"%s\"" +msgstr "offset %# leży poza zawartością „%s”" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "Polecenia:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Usuwa pliki z archiwum." -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Przenosi pliki w archiwum." -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Wyświetla pliki w archiwum." -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Szybko dodaje pliki do archiwum." -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Zastępuje istniejący lub umieszcza nowy plik w archiwum." -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Wyświetla zawartość archiwum." -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Wypakowuje pliki z archiwum." -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Modyfikatory poleceń:" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Zachowuje pierwotne daty." -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Używa wystąpienia [LICZNIK] nazwy." -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Nie zastępuje istniejących plików wypakowanymi plikami." -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Zezwala na skrócenie nazwy pliku, jeśli jest to wymagane." -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Wyświetla więcej informacji." -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Wymusza ponowne utworzenie tabeli symboli." -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Umieszcza plik po [ELEMENCIE]." -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Umieszcza plik przed [ELEMENTEM]." -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "To samo, co -b." -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Zmniejsza komunikat, jeśli biblioteka musi zostać utworzona." -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Używa pełnej ścieżki do dopasowywania plików." -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Aktualizuje tylko starsze pliki w archiwum." -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Tworzenie, modyfikowanie i wypakowywanie archiwów." -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" -msgstr "[ELEMENT] [LICZNIK] ARCHIWUM [PLIK...]" +msgstr "[ELEMENT] [LICZNIK] ARCHIWUM [PLIK…]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" -msgstr "\"a\", \"b\" i \"i\" są dozwolone tylko z opcjami \"m\" i \"r\"" +msgstr "„a”, „b” i „i” są dozwolone tylko z opcjami „m” i „r”" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" -msgstr "parametr ELEMENT jest wymagany dla modyfikatorów \"a\", \"b\" i \"i\"" +msgstr "parametr ELEMENT jest wymagany dla modyfikatorów „a”, „b” i „i”" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" -msgstr "\"N\" ma znaczenie tylko z opcjami \"x\" i \"d\"" +msgstr "„N” ma znaczenie tylko z opcjami „x” i „d”" -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "wymagany jest parametr LICZNIK" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "nieprawidłowy parametr LICZNIK %s" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" -msgstr "\"%c\" ma znaczenie tylko z opcją \"x\"" +msgstr "„%c” ma znaczenie tylko z opcją „x”" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "wymagana jest nazwa archiwum" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "wymagana jest opcja polecenia" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "Podano więcej niż jedno działanie" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" -msgstr "nie można otworzyć archiwum \"%s\"" +msgstr "nie można otworzyć archiwum „%s”" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" -msgstr "nie można otworzyć archiwum \"%s\": %s" +msgstr "nie można otworzyć archiwum „%s”: %s" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: nie jest plikiem archiwum" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" -msgstr "nie można wykonać stat na archiwum \"%s\"" +msgstr "nie można wykonać stat na archiwum „%s”" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "brak wpisu %s w archiwum\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "nie można utworzyć tabeli mieszającej" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "nie można umieścić w tabeli mieszającej" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" -msgstr "nie można wykonać stat na \"%s\"" +msgstr "nie można wykonać stat na „%s”" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "nie można odczytać zawartości %s: %s" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "nie można otworzyć %.*s" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" -msgstr "zapisanie %s nie powiodło się" +msgstr "zapisanie %s się nie powiodło" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "nie można zmienić trybu %s" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "nie można zmienić czasu modyfikacji %s" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "nie można zmienić nazwy pliku tymczasowego na %.*s" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "nie można utworzyć nowego pliku" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "nie odnaleziono położenia elementu %s" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: brak wpisu %s w archiwum.\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "nie można otworzyć %s" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "nie można wykonać stat na %s" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "%s nie jest zwykłym plikiem" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "nie można uzyskać deskryptora ELF dla %s: %s\n" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "nie można odczytać %s: %s" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "Używa zero jako UID, GID i datę w elementach archiwum." + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "Używa prawdziwe UID, GID i datę w elementach archiwum." + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "%s (domyślnie)" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" -msgstr "archiwum \"%s\" jest za duże" +msgstr "archiwum „%s” jest za duże" #: src/arlib.c:222 #, c-format @@ -1050,7 +1148,7 @@ msgstr "Nieprawidłowa liczba parametrów.\n" #: src/elfcmp.c:174 src/elfcmp.c:179 #, c-format msgid "cannot get ELF header of '%s': %s" -msgstr "nie można uzyskać nagłówka ELF \"%s\": %s" +msgstr "nie można uzyskać nagłówka ELF „%s”: %s" #: src/elfcmp.c:205 #, c-format @@ -1060,7 +1158,7 @@ msgstr "%s %s różnią się: nagłówek ELF" #: src/elfcmp.c:212 src/elfcmp.c:215 #, c-format msgid "cannot get section count of '%s': %s" -msgstr "nie można uzyskać licznika sekcji \"%s\": %s" +msgstr "nie można uzyskać licznika sekcji „%s”: %s" #: src/elfcmp.c:220 #, c-format @@ -1070,147 +1168,152 @@ msgstr "%s %s różnią się: licznik sekcji" #: src/elfcmp.c:227 src/elfcmp.c:230 #, c-format msgid "cannot get program header count of '%s': %s" -msgstr "nie można uzyskać licznika nagłówka programu \"%s\": %s" +msgstr "nie można uzyskać licznika nagłówka programu „%s”: %s" #: src/elfcmp.c:235 #, c-format msgid "%s %s diff: program header count" msgstr "%s %s różnią się: licznik nagłówka programu" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "%s %s różnią się: nazwa sekcji [%zu], [%zu]" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, c-format msgid "%s %s differ: section [%zu] '%s' header" -msgstr "%s %s różnią się: nagłówek sekcji [%zu] \"%s\"" +msgstr "%s %s różnią się: nagłówek sekcji [%zu] „%s”" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" -msgstr "nie można uzyskać zawartości sekcji %zu w \"%s\": %s" +msgstr "nie można uzyskać zawartości sekcji %zu w „%s”: %s" + +#: src/elfcmp.c:339 +#, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "tabela symboli [%zu] w „%s” posiada zerowe sh_entsize" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" -msgstr "nie można uzyskać symbolu w \"%s\": %s" +msgstr "nie można uzyskać symbolu w „%s”: %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "%s %s różnią się: tabela symboli [%zu]" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s różnią się: tabela symboli [%zu,%zu]" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" -msgstr "%s %s różnią się: liczba notatek sekcji [%zu] \"%s\"" +msgstr "%s %s różnią się: liczba notatek sekcji [%zu] „%s”" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" -msgstr "nie można odczytać notatki sekcji [%zu] \"%s\" w \"%s\": %s" +msgstr "nie można odczytać notatki sekcji [%zu] „%s” w „%s”: %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" -msgstr "%s %s różnią się: nazwa notatki sekcji [%zu] \"%s\"" +msgstr "%s %s różnią się: nazwa notatki sekcji [%zu] „%s”" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" -msgstr "%s %s różnią się: sekcja [%zu] \"%s\" notatka \"%s\" typ" +msgstr "%s %s różnią się: sekcja [%zu] „%s” notatka „%s” typ" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s różnią się: długość identyfikatora kopii" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s różnią się: zawartość identyfikatora kopii" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" -msgstr "%s %s różnią się: sekcja [%zu] \"%s\" notatka \"%s\" zawartość" +msgstr "%s %s różnią się: sekcja [%zu] „%s” notatka „%s” zawartość" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" -msgstr "%s %s różnią się: zawartość sekcji [%zu] \"%s\"" +msgstr "%s %s różnią się: zawartość sekcji [%zu] „%s”" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" -msgstr "%s %s różnią się: zawartość sekcji [%zu,%zu] \"%s\"" +msgstr "%s %s różnią się: zawartość sekcji [%zu,%zu] „%s”" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s różnią się: różna liczba ważnych sekcji" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" -msgstr "nie można wczytać danych z \"%s\": %s" +msgstr "nie można wczytać danych z „%s”: %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" -msgstr "nie można uzyskać wpisu nagłówka programu %d z \"%s\": %s" +msgstr "nie można uzyskać wpisu nagłówka programu %d z „%s”: %s" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s różnią się: nagłówek programu %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "%s %s różnią się: luka" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." -msgstr "Nieprawidłowa wartość \"%s\" dla parametru --gaps." +msgstr "Nieprawidłowa wartość „%s” dla parametru --gaps." -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" -msgstr "nie można otworzyć \"%s\"" +msgstr "nie można otworzyć „%s”" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" -msgstr "nie można utworzyć deskryptora ELF dla \"%s\": %s" +msgstr "nie można utworzyć deskryptora ELF dla „%s”: %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" -msgstr "nie można utworzyć deskryptora EBL dla \"%s\"" +msgstr "nie można utworzyć deskryptora EBL dla „%s”" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "nie można uzyskać nagłówka sekcji dla sekcji %zu: %s" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "nie można uzyskać zawartości sekcji %zu: %s" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "nie można uzyskać relokacji: %s" @@ -1240,11 +1343,11 @@ msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" "Szczegółowe sprawdzanie zgodności plików ELF ze specyfikacją gABI/psABI." -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." -msgstr "PLIK..." +msgstr "PLIK…" -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "nie można otworzyć pliku wejściowego" @@ -1263,7 +1366,7 @@ msgstr "błąd podczas zamykania deskryptora ELF: %s\n" msgid "No errors" msgstr "Brak błędów" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "Brak nazwy pliku.\n" @@ -1275,7 +1378,7 @@ msgstr " błąd podczas zwalniania deskryptora pod-ELF: %s\n" #: src/elflint.c:306 #, c-format msgid "Not an ELF file - it has the wrong magic bytes at the start\n" -msgstr "To nie jest plik ELF - posiada błędne bajty magiczne na początku\n" +msgstr "To nie jest plik ELF — posiada błędne bajty magiczne na początku\n" #: src/elflint.c:371 #, c-format @@ -1295,7 +1398,7 @@ msgstr "nieznany numer wersji nagłówka ELF e_ident[%d] == %d\n" #: src/elflint.c:386 #, c-format msgid "unsupported OS ABI e_ident[%d] == '%s'\n" -msgstr "nieobsługiwane ABI systemu operacyjnego e_ident[%d] == \"%s\"\n" +msgstr "nieobsługiwane ABI systemu operacyjnego e_ident[%d] == „%s”\n" #: src/elflint.c:392 #, c-format @@ -1393,1198 +1496,1280 @@ msgstr "nieprawidłowy rozmiar nagłówka sekcji: %hd\n" msgid "invalid section header position or size\n" msgstr "nieprawidłowe położenie lub rozmiar nagłówka sekcji\n" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " "group\n" msgstr "" -"sekcja [%2d] \"%s\": sekcja z flagą SHF_GROUP nie jest częścią grupy sekcji\n" +"sekcja [%2d] „%s”: sekcja z flagą SHF_GROUP nie jest częścią grupy sekcji\n" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" msgstr "" -"sekcja [%2d] \"%s\": grupa sekcji [%2zu] \"%s\" nie poprzedza elementu " -"grupy\n" +"sekcja [%2d] „%s”: grupa sekcji [%2zu] „%s” nie poprzedza elementu grupy\n" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać danych sekcji\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać danych sekcji\n" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " "type is not SHT_STRTAB\n" msgstr "" -"sekcja [%2d] \"%s\": użyta jako tabela ciągów dla sekcji [%2d] \"%s\", ale " -"nie jest typu SHT_STRTAB\n" +"sekcja [%2d] „%s”: użyta jako tabela ciągów dla sekcji [%2d] „%s”, ale nie " +"jest typu SHT_STRTAB\n" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " "section\n" msgstr "" -"sekcja [%2d] \"%s\": tabela symboli nie może mieć więcej niż jednej " +"sekcja [%2d] „%s”: tabela symboli nie może mieć więcej niż jednej " "rozszerzonej sekcji indeksów\n" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" -msgstr "sekcja [%2u] \"%s\": rozmiar wpisu nie zgadza się z ElfXX_Sym\n" +msgstr "sekcja [%2u] „%s”: rozmiar wpisu nie zgadza się z ElfXX_Sym\n" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać symbolu %d: %s\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać symbolu %d: %s\n" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" -msgstr "sekcja [%2d] \"%s\": \"%s\" w zerowym wpisie nie jest zerem\n" +msgstr "sekcja [%2d] „%s”: „%s” w zerowym wpisie nie jest zerem\n" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" -msgstr "sekcja [%2d] \"%s\": XINDEX dla zerowego wpisu nie jest zerem\n" +msgstr "sekcja [%2d] „%s”: XINDEX dla zerowego wpisu nie jest zerem\n" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać symbolu %zu: %s\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać symbolu %zu: %s\n" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: nieprawidłowa wartość nazwy\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: nieprawidłowa wartość nazwy\n" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " "section index section\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: za duży indeks sekcji, ale nie posiada " -"sekcji rozszerzonych indeksów sekcji\n" +"sekcja [%2d] „%s”: symbol %zu: za duży indeks sekcji, ale nie posiada sekcji " +"rozszerzonych indeksów sekcji\n" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " "st_shndx (%)\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: XINDEX użyty dla indeksu, który zmieściłby " +"sekcja [%2d] „%s”: symbol %zu: XINDEX użyty dla indeksu, który zmieściłby " "się w st_shndx (%)\n" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: nieprawidłowy indeks sekcji\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: nieprawidłowy indeks sekcji\n" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: nieznany typ\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: nieznany typ\n" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: nieznane dowiązanie symbolu\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: nieznane dowiązanie symbolu\n" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: unikalny symbol nie jest typem obiektu\n" +"sekcja [%2d] „%s”: symbol %zu: unikalny symbol nie jest typem obiektu\n" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: COMMON jest dozwolone tylko w plikach " +"sekcja [%2d] „%s”: symbol %zu: COMMON jest dozwolone tylko w plikach " "relokowalnych\n" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: lokalne symbole COMMON to nonsens\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: lokalne symbole COMMON to nonsens\n" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: funkcja w sekcji COMMON to nonsens\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: funkcja w sekcji COMMON to nonsens\n" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: st_value spoza zakresu\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: st_value spoza zakresu\n" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " "[%2d] '%s'\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu nie mieści się w całości we wskazywanej " -"sekcji [%2d] \"%s\"\n" +"sekcja [%2d] „%s”: symbol %zu nie mieści się w całości we wskazywanej sekcji " +"[%2d] „%s”\n" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " "SHF_TLS flag set\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: wskazywana sekcja [%2d] \"%s\" nie posiada " +"sekcja [%2d] „%s”: symbol %zu: wskazywana sekcja [%2d] „%s” nie posiada " "ustawionej flagi SHF_TLS\n" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " "[%2d] '%s'\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: st_value spoza zakresu wskazywanej sekcji " -"[%2d] \"%s\"\n" +"sekcja [%2d] „%s”: symbol %zu: st_value spoza zakresu wskazywanej sekcji " +"[%2d] „%s”\n" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: symbol TLS, ale brak wpisu TLS nagłówka " +"sekcja [%2d] „%s”: symbol %zu: symbol TLS, ale brak wpisu TLS nagłówka " "programu\n" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" +"sekcja [%2d] „%s”: symbol %zu: symbol TLS, ale nie można uzyskać wpisu TLS " +"nagłówka programu\n" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " "'%s'\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: st_value pomija wskazywaną sekcję [%2d] \"%s" -"\"\n" +"sekcja [%2d] „%s”: symbol %zu: st_value pomija wskazywaną sekcję [%2d] „%s”\n" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " "sh_info\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: lokalny symbol spoza zakresu określonego w " +"sekcja [%2d] „%s”: symbol %zu: lokalny symbol spoza zakresu określonego w " "sh_info\n" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " "sh_info\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: nielokalny symbol spoza zakresu określonego " -"w sh_info\n" +"sekcja [%2d] „%s”: symbol %zu: nielokalny symbol spoza zakresu określonego w " +"sh_info\n" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: nielokalny symbol sekcji\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: nielokalny symbol sekcji\n" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " "[%2d]\n" msgstr "" -"sekcja [%2d] \"%s\": symbol _GLOBAL_OFFSET_TABLE_ odnosi się do błędnej " -"sekcji [%2d]\n" +"sekcja [%2d] „%s”: symbol _GLOBAL_OFFSET_TABLE_ odnosi się do błędnej sekcji " +"[%2d]\n" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " "'%s'\n" msgstr "" -"sekcja [%2d] \"%s\": symbol _GLOBAL_OFFSET_TABLE_ odnosi się do sekcji [%2d] " -"\"%s\"\n" +"sekcja [%2d] „%s”: symbol _GLOBAL_OFFSET_TABLE_ odnosi się do sekcji [%2d] " +"„%s”\n" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " "match %s section address %#\n" msgstr "" -"sekcja [%2d] \"%s\": wartość symbolu _GLOBAL_OFFSET_TABLE_ %# nie " +"sekcja [%2d] „%s”: wartość symbolu _GLOBAL_OFFSET_TABLE_ %# nie " "pasuje do adresu sekcji %s %#\n" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " "match %s section size %\n" msgstr "" -"sekcja [%2d] \"%s\": rozmiar symbolu _GLOBAL_OFFSET_TABLE_ % nie " +"sekcja [%2d] „%s”: rozmiar symbolu _GLOBAL_OFFSET_TABLE_ % nie " "pasuje do rozmiaru sekcji %s %\n" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " "section\n" msgstr "" -"sekcja [%2d] \"%s\": symbol _GLOBAL_OFFSET_TABLE_ istnieje, ale brak sekcji ." +"sekcja [%2d] „%s”: symbol _GLOBAL_OFFSET_TABLE_ istnieje, ale brak sekcji ." "got\n" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " "segment address %#\n" msgstr "" -"sekcja [%2d] \"%s\": wartość symbolu _DYNAMIC_ %# nie pasuje do " -"adresu segmentu dynamicznego %#\n" +"sekcja [%2d] „%s”: wartość symbolu _DYNAMIC_ %# nie pasuje do adresu " +"segmentu dynamicznego %#\n" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " "segment size %\n" msgstr "" -"sekcja [%2d] \"%s\": rozmiar symbolu _DYNAMIC_ % nie pasuje do " +"sekcja [%2d] „%s”: rozmiar symbolu _DYNAMIC_ % nie pasuje do " "rozmiaru segmentu dynamicznego %\n" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" "default visibility\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %zu: symbol w dynamicznej tabeli symboli z " +"sekcja [%2d] „%s”: symbol %zu: symbol w dynamicznej tabeli symboli z " "niedomyślną widocznością\n" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" -msgstr "sekcja [%2d] \"%s\": symbol %zu: ustawiono nieznany bit w st_other\n" +msgstr "sekcja [%2d] „%s”: symbol %zu: ustawiono nieznany bit w st_other\n" #: src/elflint.c:1082 #, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać danych sekcji.\n" + +#: src/elflint.c:1098 +#, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" -msgstr "sekcja [%2d] \"%s\": DT_RELCOUNT użyte dla tej sekcji RELA\n" +msgstr "sekcja [%2d] „%s”: DT_RELCOUNT użyte dla tej sekcji RELA\n" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" -msgstr "sekcja [%2d] \"%s\": DT_RELCOUNT %d za duże dla tej sekcji\n" +msgstr "sekcja [%2d] „%s”: DT_RELCOUNT %d za duże dla tej sekcji\n" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " "DT_RELCOUNT\n" msgstr "" -"sekcja [%2d] \"%s\": relokacje względne po indeksie %d podanym przez " +"sekcja [%2d] „%s”: relokacje względne po indeksie %d podanym przez " "DT_RELCOUNT\n" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " "specified %d relative relocations\n" msgstr "" -"sekcja [%2d] \"%s\": relokacja bezwzględna pod indeksem %zu; DT_RELCOUNT " -"podał %d relokacji względnych\n" +"sekcja [%2d] „%s”: relokacja bezwzględna pod indeksem %zu; DT_RELCOUNT podał " +"%d relokacji względnych\n" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" -msgstr "sekcja [%2d] \"%s\": DT_RELACOUNT użyte dla tej sekcji REL\n" +msgstr "sekcja [%2d] „%s”: DT_RELACOUNT użyte dla tej sekcji REL\n" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" -msgstr "sekcja [%2d] \"%s\": nieprawidłowy indeks sekcji docelowej\n" +msgstr "sekcja [%2d] „%s”: nieprawidłowy indeks sekcji docelowej\n" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" -msgstr "sekcja [%2d] \"%s\": nieprawidłowy typ sekcji docelowej\n" +msgstr "sekcja [%2d] „%s”: nieprawidłowy typ sekcji docelowej\n" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" -msgstr "sekcja [%2d] \"%s\": sh_info powinno wynosić zero\n" +msgstr "sekcja [%2d] „%s”: sh_info powinno wynosić zero\n" -#: src/elflint.c:1245 +#: src/elflint.c:1263 #, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" -msgstr "sekcja [%2d] \"%s\": relokacje dla sekcji złączalnych są niemożliwe\n" +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" +msgstr "" +"sekcja [%2d] „%s”: relokacje dla sekcji złączalnych ciągów są niemożliwe\n" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" -msgstr "" -"sekcja [%2d] \"%s\": rozmiar wpisu sekcji nie zgadza się z ElfXX_Rela\n" +msgstr "sekcja [%2d] „%s”: rozmiar wpisu sekcji nie zgadza się z ElfXX_Rela\n" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" "flaga relokacji tekstu jest ustawiona, ale nie posiada segmentu tylko do " "odczytu\n" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" -msgstr "sekcja [%2d] \"%s\": relokacja %zu: nieprawidłowy typ\n" +msgstr "sekcja [%2d] „%s”: relokacja %zu: nieprawidłowy typ\n" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " "type\n" msgstr "" -"sekcja [%2d] \"%s\": relokacja %zu: typ relokacji nieprawidłowy dla tego " -"typu pliku\n" +"sekcja [%2d] „%s”: relokacja %zu: typ relokacji nieprawidłowy dla tego typu " +"pliku\n" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" -msgstr "sekcja [%2d] \"%s\": relokacja %zu: nieprawidłowy indeks symbolu\n" +msgstr "sekcja [%2d] „%s”: relokacja %zu: nieprawidłowy indeks symbolu\n" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " "be used with %s\n" msgstr "" -"sekcja [%2d] \"%s\": relokacja %zu: z %s można użyć tylko symbolu " -"\"_GLOBAL_OFFSET_TABLE_\"\n" +"sekcja [%2d] „%s”: relokacja %zu: z %s można użyć tylko symbolu " +"„_GLOBAL_OFFSET_TABLE_”\n" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" -msgstr "sekcja [%2d] \"%s\": relokacja %zu: offset spoza zakresu\n" +msgstr "sekcja [%2d] „%s”: relokacja %zu: offset spoza zakresu\n" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " "%s\n" msgstr "" -"sekcja [%2d] \"%s\": relokacja %zu: relokacja kopii względem symbolu typu " -"%s\n" +"sekcja [%2d] „%s”: relokacja %zu: relokacja kopii względem symbolu typu %s\n" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " "relocation flag not set\n" msgstr "" -"sekcja [%2d] \"%s\": relokacja %zu: sekcja tylko do odczytu została " +"sekcja [%2d] „%s”: relokacja %zu: sekcja tylko do odczytu została " "zmodyfikowana, ale nie ustawiono flagi relokacji tekstu\n" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" -"sekcja [%2d] \"%s\": relokacje względem wczytanych i niewczytanych danych\n" +"sekcja [%2d] „%s”: relokacje względem wczytanych i niewczytanych danych\n" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać relokacji %zu: %s\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać relokacji %zu: %s\n" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "obecna jest więcej niż jedna sekcja dynamiczna\n" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" +"sekcja [%2d]: wskazane jako tabela ciągów dla sekcji [%2d] „%s”, ale wartość " +"dowiązania sekcji jest nieprawidłowa\n" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" -msgstr "sekcja [%2d] \"%s\": rozmiar wpisu sekcji nie zgadza się z ElfXX_Dyn\n" +msgstr "sekcja [%2d] „%s”: rozmiar wpisu sekcji nie zgadza się z ElfXX_Dyn\n" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" -msgstr "sekcja [%2d] \"%s\": sh_info nie wynosi zero\n" +msgstr "sekcja [%2d] „%s”: sh_info nie wynosi zero\n" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" -"sekcja [%2d] \"%s\": nie można uzyskać wpisu %zu sekcji dynamicznej: %s\n" +"sekcja [%2d] „%s”: nie można uzyskać wpisu %zu sekcji dynamicznej: %s\n" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" -msgstr "sekcja [%2d] \"%s\": wpisy nie-DT_NULL występują po wpisie DT_NULL\n" +msgstr "sekcja [%2d] „%s”: wpisy nie-DT_NULL występują po wpisie DT_NULL\n" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" -msgstr "sekcja [%2d] \"%s\": wpis %zu: nieznany znacznik\n" +msgstr "sekcja [%2d] „%s”: wpis %zu: nieznany znacznik\n" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" -msgstr "" -"sekcja [%2d] \"%s\": wpis %zu: więcej niż jeden wpis ze znacznikiem %s\n" +msgstr "sekcja [%2d] „%s”: wpis %zu: więcej niż jeden wpis ze znacznikiem %s\n" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" -msgstr "sekcja [%2d] \"%s\": wpis %zu: użyto znacznika %s poziomu 2\n" +msgstr "sekcja [%2d] „%s”: wpis %zu: użyto znacznika %s poziomu 2\n" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %zu: wartość DT_PLTREL musi wynosić DT_REL lub " +"sekcja [%2d] „%s”: wpis %zu: wartość DT_PLTREL musi wynosić DT_REL lub " "DT_RELA\n" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] '%s' referenced by sh_link\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %zu: wskaźnik nie pasuje do adresu sekcji [%2d] " -"\"%s\" wskazywanej przez sh_link\n" +"sekcja [%2d] „%s”: wpis %zu: wskaźnik nie pasuje do adresu sekcji [%2d] „%s” " +"wskazywanej przez sh_link\n" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %zu: wartość %s musi wskazywać na wczytany " -"segment\n" +"sekcja [%2d] „%s”: wpis %zu: wartość %s musi wskazywać na wczytany segment\n" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] '%s'\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %zu: wartość %s musi być prawidłowym offsetem w " -"sekcji [%2d] \"%s\"\n" +"sekcja [%2d] „%s”: wpis %zu: wartość %s musi być prawidłowym offsetem w " +"sekcji [%2d] „%s”\n" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" -msgstr "sekcja [%2d] \"%s\": zawiera wpis %s, ale nie %s\n" +msgstr "sekcja [%2d] „%s”: zawiera wpis %s, ale nie %s\n" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" -msgstr "sekcja [%2d] \"%s\": brak obowiązkowego znacznika %s\n" +msgstr "sekcja [%2d] „%s”: brak obowiązkowego znacznika %s\n" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" -msgstr "sekcja [%2d] \"%s\": brak sekcji skrótów\n" +msgstr "sekcja [%2d] „%s”: brak sekcji skrótów\n" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" -msgstr "sekcja [%2d] \"%s\": nie wszystkie z %s, %s i %s są obecne\n" +msgstr "sekcja [%2d] „%s”: nie wszystkie z %s, %s i %s są obecne\n" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" -"sekcja [%2d] \"%s\": brak znacznika %s w DSO oznaczonym podczas wstępnej " +"sekcja [%2d] „%s”: brak znacznika %s w DSO oznaczonym podczas wstępnej " "konsolidacji\n" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" -"sekcja [%2d] \"%s\": plik nie-DSO oznaczony jako zależność podczas wstępnej " +"sekcja [%2d] „%s”: plik nie-DSO oznaczony jako zależność podczas wstępnej " "konsolidacji\n" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" -"sekcja [%2d] \"%s\": brak znacznika %s we wstępnie konsolidowanym pliku " +"sekcja [%2d] „%s”: brak znacznika %s we wstępnie konsolidowanym pliku " "wykonywalnym\n" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" -"sekcja [%2d] \"%s\": tylko pliki relokowalne mogą mieć rozszerzoną sekcję " +"sekcja [%2d] „%s”: tylko pliki relokowalne mogą mieć rozszerzoną sekcję " "indeksów\n" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" -"sekcja [%2d] \"%s\": sekcja rozszerzonych indeksów sekcji nie dla tabeli " +"sekcja [%2d] „%s”: sekcja rozszerzonych indeksów sekcji nie dla tabeli " "symboli\n" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "" +"sekcja [%2d] „%s”: rozszerzony indeks sekcji sh_link [%2d] jest " +"nieprawidłowy\n" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "nie można uzyskać danych dla sekcji symboli\n" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" -msgstr "sekcja [%2d] \"%s\": rozmiar wpisu nie zgadza się z Elf32_Word\n" +msgstr "sekcja [%2d] „%s”: rozmiar wpisu nie zgadza się z Elf32_Word\n" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" -"sekcja [%2d] \"%s\": tabela rozszerzonych indeksów jest za mała dla tabeli " +"sekcja [%2d] „%s”: tabela rozszerzonych indeksów jest za mała dla tabeli " "symboli\n" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " "same symbol table\n" msgstr "" -"sekcja [%2d] \"%s\": rozszerzony indeks sekcji w sekcji [%2zu] \"%s\" " -"odwołuje się do tej samej tabeli symboli\n" +"sekcja [%2d] „%s”: rozszerzony indeks sekcji w sekcji [%2zu] „%s” odwołuje " +"się do tej samej tabeli symboli\n" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "symbol 0 powinien mieć zerowy rozszerzony indeks sekcji\n" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "nie można uzyskać danych dla symbolu %zu\n" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" "rozszerzony indeks sekcji wynosi %, ale indeks symbolu nie wynosi " "XINDEX\n" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" -"sekcja [%2d] \"%s\": sekcja tabeli mieszającej jest za mała (%ld, oczekiwano " +"sekcja [%2d] „%s”: sekcja tabeli mieszającej jest za mała (%ld, oczekiwano " "%ld)\n" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" -msgstr "sekcja [%2d] \"%s\": tabela łańcuchowa jest za duża\n" +msgstr "sekcja [%2d] „%s”: tabela łańcuchowa jest za duża\n" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" -"sekcja [%2d] \"%s\": odwołanie do kubełka skrótu %zu jest spoza zakresu\n" +"sekcja [%2d] „%s”: odwołanie do kubełka skrótu %zu jest spoza zakresu\n" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" -"sekcja [%2d] \"%s\": odwołanie do łańcucha skrótu %zu jest spoza zakresu\n" +"sekcja [%2d] „%s”: odwołanie do łańcucha skrótu %zu jest spoza zakresu\n" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" -"sekcja [%2d] \"%s\": odwołanie do łańcucha skrótu % jest spoza " +"sekcja [%2d] „%s”: odwołanie do łańcucha skrótu % jest spoza " "zakresu\n" -#: src/elflint.c:2081 +#: src/elflint.c:2107 +#, c-format +msgid "section [%2d] '%s': not enough data\n" +msgstr "sekcja [%2d] „%s”: brak wystarczającej ilości danych\n" + +#: src/elflint.c:2119 #, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" -msgstr "sekcja [%2d] \"%s\": rozmiar maski bitowej nie jest potęgą 2: %u\n" +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" +msgstr "" +"sekcja [%2d] „%s”: rozmiar maski bitowej wynosi zero lub nie jest potęgą 2: " +"%u\n" -#: src/elflint.c:2092 -#, fuzzy, c-format +#: src/elflint.c:2135 +#, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -"sekcja [%2d] \"%s\": sekcja tabeli mieszającej jest za mała (%ld, oczekiwano " -"co najmniej %ld)\n" +"sekcja [%2d] „%s”: sekcja tabeli mieszającej jest za mała (wynosi %ld, " +"oczekiwano co najmniej %ld)\n" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" -"sekcja [%2d] \"%s\": drugie przesunięcie funkcji mieszającej jest za duże: " -"%u\n" +"sekcja [%2d] „%s”: drugie przesunięcie funkcji mieszającej jest za duże: %u\n" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" -"sekcja [%2d] \"%s\": łańcuch mieszający dla kubełka %zu jest mniejszy niż " +"sekcja [%2d] „%s”: łańcuch mieszający dla kubełka %zu jest mniejszy niż " "przesunięcie indeksu symboli\n" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %u wskazywany w łańcuchu dla kubełka %zu jest " +"sekcja [%2d] „%s”: symbol %u wskazywany w łańcuchu dla kubełka %zu jest " "nieokreślony\n" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" -"sekcja [%2d] \"%s\": wartość skrótu dla symbolu %u w łańcuchu dla kubełka " -"%zu jest błędna\n" +"sekcja [%2d] „%s”: wartość skrótu dla symbolu %u w łańcuchu dla kubełka %zu " +"jest błędna\n" -#: src/elflint.c:2195 +#: src/elflint.c:2221 #, c-format -msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" msgstr "" -"sekcja [%2d] \"%s\": łańcuch skrótu dla kubełka %zu jest spoza zakresu\n" +"sekcja [%2d] „%s”: indeks maski dla symbolu %u w łańcuchu dla kubełka %zu " +"jest błędny\n" + +#: src/elflint.c:2251 +#, c-format +msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" +msgstr "sekcja [%2d] „%s”: łańcuch skrótu dla kubełka %zu jest spoza zakresu\n" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" -"sekcja [%2d] \"%s\": odwołanie do symbolu w łańcuchu dla kubełka %zu jest " +"sekcja [%2d] „%s”: odwołanie do symbolu w łańcuchu dla kubełka %zu jest " "spoza zakresu\n" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" -"sekcja [%2d] \"%s\": maska bitowa nie pasuje do nazw w tabeli mieszającej\n" +"sekcja [%2d] „%s”: maska bitowa nie pasuje do nazw w tabeli mieszającej\n" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" -"sekcja [%2d] \"%s\": pliki relokowalne nie mogą posiadać tabeli " -"mieszających\n" +"sekcja [%2d] „%s”: pliki relokowalne nie mogą posiadać tabeli mieszających\n" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" -"sekcja [%2d] \"%s\": tabela mieszająca nie dla tabeli dynamicznych symboli\n" +"sekcja [%2d] „%s”: tabela mieszająca nie dla tabeli dynamicznych symboli\n" + +#: src/elflint.c:2297 +#, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "" +"sekcja [%2d] „%s”: nieprawidłowy indeks sekcji tabeli symboli sh_link [%2d]\n" -#: src/elflint.c:2245 +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" -msgstr "sekcja [%2d] \"%s\": niepoprawny rozmiar wpisu tabeli mieszającej\n" +msgstr "sekcja [%2d] „%s”: niepoprawny rozmiar wpisu tabeli mieszającej\n" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" -msgstr "sekcja [%2d] \"%s\": nieoznaczona do przydzielenia\n" +msgstr "sekcja [%2d] „%s”: nieoznaczona do przydzielenia\n" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" msgstr "" -"sekcja [%2d] \"%s\": tabela mieszająca nie posiada miejsca nawet na " -"początkowe wpisy administracyjne\n" +"sekcja [%2d] „%s”: tabela mieszająca nie posiada miejsca nawet na początkowe " +"wpisy administracyjne\n" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" -"sh_link w sekcjach skrótu [%2zu] \"%s\" i [%2zu] \"%s\" nie są identyczne\n" +"sh_link w sekcjach skrótu [%2zu] „%s” i [%2zu] „%s” nie są identyczne\n" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "" +"sekcja mieszania [%2zu] „%s” nie zawiera wystarczającej ilości danych\n" + +#: src/elflint.c:2409 +#, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "sekcja mieszania [%2zu] „%s” posiada zerowe słowa maski bitów\n" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "sekcja mieszania [%2zu] „%s” używa za dużo danych\n" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" +"sekcja mieszająca [%2zu] „%s” nieprawidłowy indeks symboli % " +"(max_nsyms: %, nentries: %\n" + +#: src/elflint.c:2522 +#, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "sekcja mieszania [%2zu] „%s” nieprawidłowe sh_entsize\n" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" -msgstr "sekcja [%2zu] \"%s\": odwołanie do symbolu o indeksie 0\n" +msgstr "sekcja [%2zu] „%s”: odwołanie do symbolu o indeksie 0\n" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " "table in [%2zu] '%s'\n" msgstr "" -"symbol %d wymieniony w nowej tabeli mieszającej w [%2zu] \"%s\", ale nie w " -"poprzedniej tabeli mieszającej [%2zu] \"%s\"\n" +"symbol %d wymieniony w nowej tabeli mieszającej w [%2zu] „%s”, ale nie w " +"poprzedniej tabeli mieszającej [%2zu] „%s”\n" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " "table in [%2zu] '%s'\n" msgstr "" -"symbol %d wymieniony w poprzedniej tabeli mieszającej w [%2zu] \"%s\", ale " -"nie w nowej tabeli mieszającej w [%2zu] \"%s\"\n" +"symbol %d wymieniony w poprzedniej tabeli mieszającej w [%2zu] „%s”, ale nie " +"w nowej tabeli mieszającej w [%2zu] „%s”\n" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" -msgstr "sekcja [%2d] \"%s\": niezerowe sh_%s dla sekcji NULL\n" +msgstr "sekcja [%2d] „%s”: niezerowe sh_%s dla sekcji NULL\n" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" -"sekcja [%2d] \"%s\": w plikach obiektów relokowalnych dozwolone są tylko " -"grupy sekcji\n" +"sekcja [%2d] „%s”: w plikach obiektów relokowalnych dozwolone są tylko grupy " +"sekcji\n" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać tabeli symboli: %s\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać tabeli symboli: %s\n" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" -"sekcja [%2d] \"%s\": odwołanie do sekcji w sh_link nie posiada tabeli " -"symboli\n" +"sekcja [%2d] „%s”: odwołanie do sekcji w sh_link nie posiada tabeli symboli\n" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" -msgstr "sekcja [%2d] \"%s\": nieprawidłowy indeks symbolu w sh_info\n" +msgstr "sekcja [%2d] „%s”: nieprawidłowy indeks symbolu w sh_info\n" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" -msgstr "sekcja [%2d] \"%s\": niezerowe sh_flags\n" +msgstr "sekcja [%2d] „%s”: niezerowe sh_flags\n" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać symbolu dla podpisu\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać symbolu dla podpisu\n" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać nazwy symbolu dla podpisu\n" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" -msgstr "sekcja [%2d] \"%s\": symbol podpisu nie można być pustym ciągiem\n" +msgstr "sekcja [%2d] „%s”: symbol podpisu nie można być pustym ciągiem\n" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" -msgstr "sekcja [%2d] \"%s\": sh_flags nie ustawione poprawnie\n" +msgstr "sekcja [%2d] „%s”: sh_flags nie ustawione poprawnie\n" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać danych: %s\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać danych: %s\n" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" -"sekcja [%2d] \"%s\": rozmiar sekcji nie jest wielokrotnością " +"sekcja [%2d] „%s”: rozmiar sekcji nie jest wielokrotnością " "sizeof(Elf32_Word)\n" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" -msgstr "sekcja [%2d] \"%s\": grupa sekcji bez słowa flag\n" +msgstr "sekcja [%2d] „%s”: grupa sekcji bez słowa flag\n" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" -msgstr "sekcja [%2d] \"%s\": grupa sekcji bez elementów\n" +msgstr "sekcja [%2d] „%s”: grupa sekcji bez elementów\n" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" -msgstr "sekcja [%2d] \"%s\": grupa sekcji z tylko jednym elementem\n" +msgstr "sekcja [%2d] „%s”: grupa sekcji z tylko jednym elementem\n" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" -msgstr "sekcja [%2d] \"%s\": nieznane flagi grupy sekcji\n" +msgstr "sekcja [%2d] „%s”: nieznane flagi grupy sekcji\n" -#: src/elflint.c:2538 +#: src/elflint.c:2693 #, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" -msgstr "sekcja [%2d] \"%s\": indeks sekcji %Zu jest spoza zakresu\n" +msgid "section [%2d] '%s': section index %zu out of range\n" +msgstr "sekcja [%2d] „%s”: indeks sekcji %zu jest spoza zakresu\n" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" -"sekcja [%2d] \"%s\": nie można uzyskać nagłówka sekcji dla elementu %zu: %s\n" +"sekcja [%2d] „%s”: nie można uzyskać nagłówka sekcji dla elementu %zu: %s\n" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" -msgstr "sekcja [%2d] \"%s\": grupa sekcji zawiera inną grupę [%2d] \"%s\"\n" +msgstr "sekcja [%2d] „%s”: grupa sekcji zawiera inną grupę [%2d] „%s”\n" -#: src/elflint.c:2560 +#: src/elflint.c:2715 #, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -"sekcja [%2d] \"%s\": element %Zu odwołuje się do sekcji [%2d] \"%s\" bez " -"flagi SHF_GROUP\n" +"sekcja [%2d] „%s”: element %zu odwołuje się do sekcji [%2d] „%s” bez flagi " +"SHF_GROUP\n" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" -msgstr "sekcja [%2d] \"%s\" jest zawarta w więcej niż jednej grupie sekcji\n" +msgstr "sekcja [%2d] „%s” jest zawarta w więcej niż jednej grupie sekcji\n" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " "dynamic symbol table\n" msgstr "" -"sekcja [%2d] \"%s\" odwołuje się w sh_link do sekcji [%2d] \"%s\", która nie " +"sekcja [%2d] „%s” odwołuje się w sh_link do sekcji [%2d] „%s”, która nie " "jest tabelą symboli dynamicznych\n" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " "'%s'\n" msgstr "" -"sekcja [%2d] \"%s\" posiada inną liczbę wpisów niż tabela symboli [%2d] \"%s" -"\"\n" +"sekcja [%2d] „%s” posiada inną liczbę wpisów niż tabela symboli [%2d] „%s”\n" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" -msgstr "sekcja [%2d] \"%s\": symbol %d: nie można odczytać danych wersji\n" +msgstr "sekcja [%2d] „%s”: symbol %d: nie można odczytać danych wersji\n" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" -msgstr "sekcja [%2d] \"%s\": symbol %d: symbol lokalny z zakresem globalnym\n" +msgstr "sekcja [%2d] „%s”: symbol %d: symbol lokalny z zakresem globalnym\n" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" -msgstr "sekcja [%2d] \"%s\": symbol %d: symbol lokalny z wersją\n" +msgstr "sekcja [%2d] „%s”: symbol %d: symbol lokalny z wersją\n" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" -msgstr "sekcja [%2d] \"%s\": symbol %d: nieprawidłowy indeks wersji %d\n" +msgstr "sekcja [%2d] „%s”: symbol %d: nieprawidłowy indeks wersji %d\n" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %d: indeks wersji %d jest dla wersji określonej\n" +"sekcja [%2d] „%s”: symbol %d: indeks wersji %d jest dla wersji określonej\n" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" -"sekcja [%2d] \"%s\": symbol %d: indeks wersji %d jest dla wersji żądanej\n" +"sekcja [%2d] „%s”: symbol %d: indeks wersji %d jest dla wersji żądanej\n" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "obecna jest więcej niż jedna sekcja odniesienia wersji\n" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" -msgstr "sekcja [%2d] \"%s\": sh_link nie łączy się z tabelą ciągów\n" +msgstr "sekcja [%2d] „%s”: sh_link nie łączy się z tabelą ciągów\n" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" -msgstr "sekcja [%2d] \"%s\": wpis %d posiada błędną wersję %d\n" +msgstr "sekcja [%2d] „%s”: wpis %d posiada błędną wersję %d\n" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %d posiada błędny offset dla danych dodatkowych\n" +"sekcja [%2d] „%s”: wpis %d posiada błędny offset dla danych dodatkowych\n" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" -msgstr "sekcja [%2d] \"%s\": symbol %d posiada błędne odniesienie do pliku\n" +msgstr "sekcja [%2d] „%s”: symbol %d posiada błędne odniesienie do pliku\n" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" -msgstr "sekcja [%2d] \"%s\": wpis %d odnosi się do nieznanej zależności\n" +msgstr "sekcja [%2d] „%s”: wpis %d odnosi się do nieznanej zależności\n" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" -"sekcja [%2d] \"%s\": wpis dodatkowy %d do wpisu %d posiada nieznaną flagę\n" +"sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d posiada nieznaną flagę\n" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" msgstr "" -"sekcja [%2d] \"%s\": wpis dodatkowy %d do wpisu %d posiada nieprawidłowe " +"sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d posiada nieprawidłowe " "odniesienie do nazwy\n" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" msgstr "" -"sekcja [%2d] \"%s\": wpis dodatkowy %d do wpisu %d posiada błędną wartość " +"sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d posiada błędną wartość " "skrótu: %#x, oczekiwano %#x\n" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name '%s'\n" msgstr "" -"sekcja [%2d] \"%s\": wpis dodatkowy %d do wpisu %d posiada powtórzoną nazwę " -"wersji \"%s\"\n" +"sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d posiada powtórzoną nazwę " +"wersji „%s”\n" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" -"sekcja [%2d] \"%s\": wpis dodatkowy %d do wpisu %d posiada błędne następne " +"sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d posiada błędne następne " "pole\n" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" +msgstr "sekcja [%2d] „%s”: wpis %d posiada błędny offset do następnego wpisu\n" + +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %d posiada błędny offset do następnego wpisu\n" +"sekcja [%2d] „%s”: wpis %d posiada zerowy offset do następnego wpisu, ale " +"sh_info zawiera informacje o więcej wpisów\n" -#: src/elflint.c:3018 +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "obecna jest więcej niż jedna sekcja definicji wersji\n" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" -msgstr "sekcja [%2d] \"%s\": jest więcej niż jedna definicja BASE\n" +msgstr "sekcja [%2d] „%s”: jest więcej niż jedna definicja BASE\n" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" -"sekcja [%2d] \"%s\": definicja BASE musi posiadać indeks VER_NDX_GLOBAL\n" +"sekcja [%2d] „%s”: definicja BASE musi posiadać indeks VER_NDX_GLOBAL\n" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" -msgstr "sekcja [%2d] \"%s\": wpis %d posiada nieznaną flagę\n" +msgstr "sekcja [%2d] „%s”: wpis %d posiada nieznaną flagę\n" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %d posiada nieprawidłowe odniesienie do nazwy\n" +"sekcja [%2d] „%s”: wpis %d posiada nieprawidłowe odniesienie do nazwy\n" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %d posiada błędną wartość skrótu: %#x, oczekiwano " +"sekcja [%2d] „%s”: wpis %d posiada błędną wartość skrótu: %#x, oczekiwano " "%#x\n" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" -msgstr "sekcja [%2d] \"%s\": wpis %d posiada powtórzoną nazwę wersji \"%s\"\n" +msgstr "sekcja [%2d] „%s”: wpis %d posiada powtórzoną nazwę wersji „%s”\n" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %d posiada nieprawidłowe odniesienie do nazwy w " +"sekcja [%2d] „%s”: wpis %d posiada nieprawidłowe odniesienie do nazwy w " "danych dodatkowych\n" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" -"sekcja [%2d] \"%s\": wpis %d posiada błędne następne pole w danych " +"sekcja [%2d] „%s”: wpis %d posiada błędne następne pole w danych " "dodatkowych\n" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" -msgstr "sekcja [%2d] \"%s\": brak definicji BASE\n" +msgstr "sekcja [%2d] „%s”: brak definicji BASE\n" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" -msgstr "sekcja [%2d] \"%s\": nieznana wersja rodzica \"%s\"\n" +msgstr "sekcja [%2d] „%s”: nieznana wersja rodzica „%s”\n" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" -msgstr "sekcja [%2d] \"%s\": pusta sekcja atrybutów obiektu\n" +msgstr "sekcja [%2d] „%s”: pusta sekcja atrybutów obiektu\n" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" -msgstr "sekcja [%2d] \"%s\": nierozpoznany format atrybutu\n" +msgstr "sekcja [%2d] „%s”: nierozpoznany format atrybutu\n" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: pole o zerowej długości w sekcji atrybutów\n" +"sekcja [%2d] „%s”: offset %zu: pole o zerowej długości w sekcji atrybutów\n" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: nieprawidłowa długość w sekcji atrybutów\n" +"sekcja [%2d] „%s”: offset %zu: nieprawidłowa długość w sekcji atrybutów\n" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" -msgstr "sekcja [%2d] \"%s\": offset %zu: niezakończony ciąg nazwy producenta\n" +msgstr "sekcja [%2d] „%s”: offset %zu: niezakończony ciąg nazwy producenta\n" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: niekończące się ULEB128 w znaczniku " -"podsekcji atrybutów\n" +"sekcja [%2d] „%s”: offset %zu: niekończące się ULEB128 w znaczniku podsekcji " +"atrybutów\n" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" -msgstr "sekcja [%2d] \"%s\": offset %zu: skrócona sekcja atrybutów\n" +msgstr "sekcja [%2d] „%s”: offset %zu: skrócona sekcja atrybutów\n" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: zerowej długości pole w podsekcji " -"atrybutów\n" +"sekcja [%2d] „%s”: offset %zu: zerowej długości pole w podsekcji atrybutów\n" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: nieprawidłowa długość w podsekcji " -"atrybutów\n" +"sekcja [%2d] „%s”: offset %zu: nieprawidłowa długość w podsekcji atrybutów\n" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: podsekcja atrybutów posiada nieoczekiwany " +"sekcja [%2d] „%s”: offset %zu: podsekcja atrybutów posiada nieoczekiwany " "znacznik %u\n" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: niekończące się ULEB128 w znaczniku " -"atrybutu\n" +"sekcja [%2d] „%s”: offset %zu: niekończące się ULEB128 w znaczniku atrybutu\n" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" -msgstr "sekcja [%2d] \"%s\": offset %zu: niezakończony ciąg w atrybucie\n" +msgstr "sekcja [%2d] „%s”: offset %zu: niezakończony ciąg w atrybucie\n" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" -msgstr "sekcja [%2d] \"%s\": offset %zu: nierozpoznany znacznik atrybutu %u\n" +msgstr "sekcja [%2d] „%s”: offset %zu: nierozpoznany znacznik atrybutu %u\n" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: atrybut %s posiada nierozpoznaną wartość " +"sekcja [%2d] „%s”: offset %zu: atrybut %s posiada nierozpoznaną wartość " "%\n" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" -msgstr "sekcja [%2d] \"%s\": offset %zu: producent \"%s\" jest nieznany\n" +msgstr "sekcja [%2d] „%s”: offset %zu: producent „%s” jest nieznany\n" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" -"sekcja [%2d] \"%s\": offset %zu: dodatkowe bajty po ostatniej sekcji " +"sekcja [%2d] „%s”: offset %zu: dodatkowe bajty po ostatniej sekcji " "atrybutów\n" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "nie można uzyskać nagłówka sekcji zerowej\n" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "sekcja zerowa posiada niezerową nazwę\n" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "sekcja zerowa posiada niezerowy typ\n" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "sekcja zerowa posiada niezerowe flagi\n" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "sekcja zerowa posiada niezerowy adres\n" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "sekcja zerowa posiada niezerowy offset\n" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "sekcja zerowa posiada niezerową wartość wyrównania\n" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "sekcja zerowa posiada niezerową wartość rozmiaru wpisu\n" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2593,7 +2778,7 @@ msgstr "" "sekcja zerowa posiada niezerową wartość rozmiaru, a nagłówek ELF posiada " "niezerową wartość shnum\n" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2602,7 +2787,7 @@ msgstr "" "sekcja zerowa posiada niezerową wartość dowiązań, a nagłówek ELF nie " "wskazuje przepełnienia w shstrndx\n" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2611,210 +2796,236 @@ msgstr "" "sekcja zerowa posiada niezerową wartość dowiązań, a nagłówek ELF nie " "wskazuje przepełnienia w phnum\n" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" -msgstr "nie można uzyskać nagłówka sekcji dla sekcji [%2zu] \"%s\": %s\n" +msgstr "nie można uzyskać nagłówka sekcji dla sekcji [%2zu] „%s”: %s\n" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "sekcja [%2zu]: nieprawidłowa nazwa\n" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" -msgstr "sekcja [%2d] \"%s\" posiada błędny typ: oczekiwano %s, jest %s\n" +msgstr "sekcja [%2d] „%s” posiada błędny typ: oczekiwano %s, jest %s\n" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" -msgstr "sekcja [%2zu] \"%s\" posiada błędne flagi: oczekiwano %s, jest %s\n" +msgstr "sekcja [%2zu] „%s” posiada błędne flagi: oczekiwano %s, jest %s\n" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" -"sekcja [%2zu] \"%s\" posiada błędne flagi: oczekiwano %s i być może %s, jest " +"sekcja [%2zu] „%s” posiada błędne flagi: oczekiwano %s i być może %s, jest " "%s\n" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" -msgstr "sekcja [%2zu] \"%s\" jest obecna w pliku obiektu\n" +msgstr "sekcja [%2zu] „%s” jest obecna w pliku obiektu\n" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" -"sekcja [%2zu] \"%s\" posiada flagę SHF_ALLOC, ale nie posiada segmentu " +"sekcja [%2zu] „%s” posiada flagę SHF_ALLOC, ale nie posiada segmentu " "wczytywalnego\n" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " "segments\n" msgstr "" -"sekcja [%2zu] \"%s\" nie posiada flagi SHF_ALLOC, ale są segmenty " -"wczytywalne\n" +"sekcja [%2zu] „%s” nie posiada flagi SHF_ALLOC, ale są segmenty wczytywalne\n" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" -"sekcja [%2zu] \"%s\" jest tabelą indeksów sekcji rozszerzeń w pliku " +"sekcja [%2zu] „%s” jest tabelą indeksów sekcji rozszerzeń w pliku " "nieobiektowym\n" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" -msgstr "" -"sekcja [%2zu] \"%s\": rozmiar nie jest wielokrotnością rozmiaru wpisu\n" +msgstr "sekcja [%2zu] „%s”: rozmiar nie jest wielokrotnością rozmiaru wpisu\n" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "nie można uzyskać nagłówka sekcji\n" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" -msgstr "sekcja [%2zu] \"%s\" posiada nieobsługiwany typ %d\n" +msgstr "sekcja [%2zu] „%s” posiada nieobsługiwany typ %d\n" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" -"sekcja [%2zu] \"%s\" zawiera nieprawidłowe flagi specyficzne dla procesora " +"sekcja [%2zu] „%s” zawiera nieprawidłowe flagi specyficzne dla procesora " "%#\n" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" -msgstr "sekcja [%2zu] \"%s\" zawiera nieznane flagi %#\n" +msgstr "sekcja [%2zu] „%s” zawiera nieznane flagi %#\n" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" -"sekcja [%2zu] \"%s\": adres sekcji danych lokalnych dla wątków nie jest " -"zerem\n" +"sekcja [%2zu] „%s”: adres sekcji danych lokalnych dla wątków nie jest zerem\n" + +#: src/elflint.c:3913 +#, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "sekcja [%2zu] „%s”: nie można skompresować przydzielonej sekcji\n" + +#: src/elflint.c:3918 +#, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "sekcja [%2zu] „%s”: nie można skompresować sekcji „nobits”\n" + +#: src/elflint.c:3924 +#, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "sekcja [%2zu] „%s”: skompresowana sekcja bez nagłówka kompresji: %s\n" -#: src/elflint.c:3711 +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" -"sekcja [%2zu] \"%s\": nieprawidłowe odwołanie do sekcji w wartości " -"dowiązania\n" +"sekcja [%2zu] „%s”: nieprawidłowe odwołanie do sekcji w wartości dowiązania\n" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" -"sekcja [%2zu] \"%s\": nieprawidłowe odwołanie do sekcji w wartości " +"sekcja [%2zu] „%s”: nieprawidłowe odwołanie do sekcji w wartości " "informacyjnej\n" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" -msgstr "sekcja [%2zu] \"%s\": flaga ciągów jest ustawiona bez flagi merge\n" +msgstr "sekcja [%2zu] „%s”: flaga ciągów jest ustawiona bez flagi merge\n" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" -"sekcja [%2zu] \"%s\": flaga merge jest ustawiona, ale rozmiar wpisu jest " +"sekcja [%2zu] „%s”: flaga merge jest ustawiona, ale rozmiar wpisu jest " "zerowy\n" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" -"sekcja [%2zu] \"%s\" posiada nieoczekiwany typ %d dla sekcji wykonywalnej\n" +"sekcja [%2zu] „%s” posiada nieoczekiwany typ %d dla sekcji wykonywalnej\n" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "sekcja [%2zu] „%s” musi być typu NOBITS w plikach debuginfo\n" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" -msgstr "sekcja [%2zu] \"%s\" jest wykonywalne i zapisywalne\n" +msgstr "sekcja [%2zu] „%s” jest wykonywalne i zapisywalne\n" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " "%d\n" msgstr "" -"sekcja [%2zu] \"%s\" nie jest w całości zawarta w segmencie wpisu %d " -"nagłówka programu\n" +"sekcja [%2zu] „%s” nie jest w całości zawarta w segmencie wpisu %d nagłówka " +"programu\n" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d\n" msgstr "" -"sekcja [%2zu] \"%s\" posiada typ NOBITS, a jest odczytywana z pliku w " +"sekcja [%2zu] „%s” posiada typ NOBITS, a jest odczytywana z pliku w " "segmencie wpisu %d nagłówka programu\n" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" +"sekcja [%2zu] „%s” posiada typ NOBITS, ale jest odczytywana z pliku w " +"segmencie wpisu %d nagłówka programu, a zawartość pliku jest niezerowa\n" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" msgstr "" -"sekcja [%2zu] \"%s\" nie posiada typu NOBITS, a nie jest odczytywana z pliku " -"w segmencie wpisu %d nagłówka programu\n" +"sekcja [%2zu] „%s” nie posiada typu NOBITS, a nie jest odczytywana z pliku w " +"segmencie wpisu %d nagłówka programu\n" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" -msgstr "sekcja [%2zu] \"%s\" jest wykonywalne w segmencie niewykonywalnym %d\n" +msgstr "sekcja [%2zu] „%s” jest wykonywalne w segmencie niewykonywalnym %d\n" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" -msgstr "sekcja [%2zu] \"%s\" jest zapisywalne w niezapisywalnym segmencie %d\n" +msgstr "sekcja [%2zu] „%s” jest zapisywalne w niezapisywalnym segmencie %d\n" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" -"sekcja [%2zu] \"%s\": posiada flagę alloc, ale sekcja nie jest w żadnym " +"sekcja [%2zu] „%s”: posiada flagę alloc, ale sekcja nie jest w żadnym " "segmencie wczytywalnym\n" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" msgstr "" -"sekcja [%2zu] \"%s\": według nagłówka ELF to jest tabela ciągów nagłówków " +"sekcja [%2zu] „%s”: według nagłówka ELF to jest tabela ciągów nagłówków " "sekcji, ale typ nie jest SHT_TYPE\n" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" -"sekcja [%2zu] \"%s\": pliki relokowalne nie mogą posiadać tabeli symboli " +"sekcja [%2zu] „%s”: pliki relokowalne nie mogą posiadać tabeli symboli " "dynamicznych\n" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "obecna jest więcej niż jedna tabela symboli wersji\n" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "jest wpis nagłówka programu INTERP, ale nie posiada sekcji .interp\n" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" @@ -2822,14 +3033,14 @@ msgstr "" "wczytywalny segment [%u] jest wykonywalny, ale nie zawiera wykonywalnych " "sekcji\n" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" "wczytywalny segment [%u] jest zapisywalny, ale nie zawiera zapisywalnych " "sekcji\n" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -2838,75 +3049,75 @@ msgstr "" "brak sekcji .gnu.versym, ale istnieje sekcja .gnu.versym_d lub .gnu." "versym_r\n" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "powtórzony indeks wersji %d\n" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "sekcja .gnu.versym istnieje bez .gnu.versym_d lub .gnu.versym_r\n" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" "phdr[%d]: nieznany typ notatki pliku core % pod offsetem %\n" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -"phdr[%2d]: \"%s\": nieznany typ notatki pliku core % pod offsetem " -"%Zu\n" +"sekcja [%2d]: „%s”: nieznany typ notatki pliku core % pod offsetem " +"%zu\n" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -"phdr[%d]: nieznany typ notatki pliku obiektu % pod offsetem %Zu\n" +"phdr[%d]: nieznany typ notatki pliku obiektu % pod offsetem %zu\n" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -"phdr[%d]: \"%s\": nieznany typ notatki pliku obiektu % pod offsetem " -"%Zu\n" +"sekcja [%2d] „%s”: nieznany typ notatki pliku obiektu % pod offsetem " +"%zu\n" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: brak określonych wpisów notatek dla typu pliku\n" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: nie można uzyskać zawartości sekcji notatki: %s\n" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: dodatkowe % bajtów po ostatniej notatce\n" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" -msgstr "sekcja [%2d] \"%s\": brak określonych wpisów notatek dla typu pliku\n" +msgstr "sekcja [%2d] „%s”: brak określonych wpisów notatek dla typu pliku\n" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" -msgstr "sekcja [%2d] \"%s\": nie można uzyskać zawartości sekcji notatek\n" +msgstr "sekcja [%2d] „%s”: nie można uzyskać zawartości sekcji notatek\n" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" -msgstr "sekcja [%2d] \"%s\": dodatkowe % bajtów po ostatniej notatce\n" +msgstr "sekcja [%2d] „%s”: dodatkowe % bajtów po ostatniej notatce\n" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" @@ -2914,129 +3125,136 @@ msgstr "" "tylko pliki wykonywalne, obiekty współdzielone i pliki core mogą posiadać " "nagłówki programu\n" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "nie można uzyskać wpisu nagłówka programu %d: %s\n" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "wpis nagłówka programu %d: nieznany typ wpisu nagłówka programu %#\n" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "więcej niż jeden wpis INTERP w nagłówku programu\n" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "więcej niż jeden wpis TLS w nagłówku programu\n" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "statyczny plik wykonywalny nie może posiadać sekcji dynamicznych\n" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" "odniesienie sekcji dynamicznej w nagłówku programu posiada błędny offset\n" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "różne rozmiary sekcji dynamicznej w nagłówku programu i sekcji\n" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "więcej niż jeden wpis GNU_RELRO w nagłówku programu\n" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "wczytywalny segment wskazywany przez GNU_RELRO nie jest zapisywalny\n" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "flagi wczytywalnego segmentu [%u] nie pasują do flag GNU_RELRO [%u]\n" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" +"flagi GNU_RELRO [%u] nie są podzbiorem flag wczytywalnego segmentu [%u]\n" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "segment %s nie zawiera się we wczytywalnym segmencie\n" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" "offsety nagłówka programu w nagłówku ELF i wpisie PHDR nie zgadzają się" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" "odniesienie tabeli wyszukiwania ramki wywołania w nagłówku programu posiada " "błędny offset\n" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" "różne rozmiary tabel wyszukiwania ramki wywołania w nagłówku programu i " "sekcji\n" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "PT_GNU_EH_FRAME jest obecne, ale brak sekcji .eh_frame_hdr\n" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "tabela wyszukiwania ramki wywołania musi być przydzielona\n" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" -msgstr "sekcja [%2zu] \"%s\": musi być przydzielona\n" +msgstr "sekcja [%2zu] „%s”: musi być przydzielona\n" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "tabela wyszukiwania ramki wywołania nie może być zapisywalna\n" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" -msgstr "sekcja [%2zu] \"%s\" nie może być zapisywalna\n" +msgstr "sekcja [%2zu] „%s” nie może być zapisywalna\n" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "tabela wyszukiwania ramki wywołania nie może być wykonywalna\n" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" -msgstr "sekcja [%2zu] \"%s\" nie może być wykonywalna\n" +msgstr "sekcja [%2zu] „%s” nie może być wykonywalna\n" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "wpis nagłówka programu %d: rozmiar pliku większy niż rozmiar pamięci\n" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "wpis nagłówka programu %d: wyrównanie nie jest potęgą 2\n" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -3045,7 +3263,7 @@ msgstr "" "wpis nagłówka programu %d: offset w pliku i adres wirtualny nie są " "wielokrotnością wyrównania\n" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -3054,12 +3272,12 @@ msgstr "" "plik wykonywalny/DSO z sekcją .eh_frame_hdr nie posiada wpisu nagłówka " "programu PT_GNU_EH_FRAME" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "nie można odczytać nagłówka ELF: %s\n" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "flaga relokacji tekstu jest ustawiona, ale niepotrzebna\n" @@ -3080,20 +3298,20 @@ msgstr "Używa ŚCIEÅ»KI jako korzenia dla hierarchii debuginfo" msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "Odnajduje źródło relokacji tekstu w PLIKACH (domyślnie a.out)." -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" -msgstr "[PLIK...]" +msgstr "[PLIK…]" #: src/findtextrel.c:238 #, c-format msgid "cannot get ELF header '%s': %s" -msgstr "nie można uzyskać nagłówka ELF \"%s\": %s" +msgstr "nie można uzyskać nagłówka ELF „%s”: %s" #: src/findtextrel.c:249 #, c-format msgid "'%s' is not a DSO or PIE" -msgstr "\"%s\" nie jest DSO ani PIE" +msgstr "„%s” nie jest DSO ani PIE" #: src/findtextrel.c:269 #, c-format @@ -3108,63 +3326,62 @@ msgstr "nie można odczytać sekcji dynamicznej: %s" #: src/findtextrel.c:313 #, c-format msgid "no text relocations reported in '%s'" -msgstr "brak relokacji tekstu w \"%s\"" +msgstr "brak relokacji tekstu w „%s”" #: src/findtextrel.c:325 #, c-format msgid "while reading ELF file" msgstr "podczas odczytywania pliku ELF" -#: src/findtextrel.c:334 src/findtextrel.c:351 +#: src/findtextrel.c:329 #, c-format -msgid "cannot get program header index at offset %d: %s" -msgstr "nie można uzyskać indeksu nagłówka programu pod offsetem %d: %s" +msgid "cannot get program header count: %s" +msgstr "nie można uzyskać liczby nagłówków programu: %s" -#: src/findtextrel.c:403 +#: src/findtextrel.c:340 src/findtextrel.c:357 #, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "nie można uzyskać nagłówka sekcji dla sekcji %Zu: %s" +msgid "cannot get program header index at offset %zd: %s" +msgstr "nie można uzyskać indeksu nagłówka programu pod offsetem %zd: %s" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" -msgstr "nie można uzyskać sekcji tabeli symboli %zu w \"%s\": %s" +msgstr "nie można uzyskać sekcji tabeli symboli %zu w „%s”: %s" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" -msgstr "nie można uzyskać relokacji pod indeksem %d w sekcji %zu w \"%s\": %s" +msgstr "nie można uzyskać relokacji pod indeksem %d w sekcji %zu w „%s”: %s" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "%s nie został skompilowany z -fpic/-fPIC\n" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" -msgstr "" -"plik zawierający funkcję \"%s\" nie został skompilowany z -fpic/-fPIC\n" +msgstr "plik zawierający funkcję „%s” nie został skompilowany z -fpic/-fPIC\n" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" "fPIC\n" msgstr "" -"plik zawierający funkcję \"%s\" mógł nie zostać skompilowany z -fpic/-fPIC\n" +"plik zawierający funkcję „%s” mógł nie zostać skompilowany z -fpic/-fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " "function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" -"plik zawierający funkcję \"%s\" lub plik zawierający funkcję \"%s\" nie " -"został skompilowany z -fpic/-fPIC\n" +"plik zawierający funkcję „%s” lub plik zawierający funkcję „%s” nie został " +"skompilowany z -fpic/-fPIC\n" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3197,346 +3414,346 @@ msgstr "nie można przydzielić sekcji GOTPLT: %s" msgid "initial-executable TLS relocation cannot be used " msgstr "początkowo wykonywalna relokacja TLS nie może zostać użyta " -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "Sterowanie plikiem wejściowym:" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "Dołącza całe archiwa w wyjściu od teraz." -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "Przestaje dołączać całe archiwa w wyjściu." -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "PLIK" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "Rozpoczyna grupę." -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "Kończy grupę." -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "ŚCIEÅ»KA" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "Dodaje ŚCIEÅ»KĘ do listy katalogów, w których są szukane pliki." -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "" "Ustawia DT_NEEDED dla następujących bibliotek dynamicznych tylko, jeśli są " "używane" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "Ustawia zawsze DT_NEEDED dla następujących bibliotek dynamicznych" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "Ignoruje zmienną środowiskową LD_LIBRARY_PATH." -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "Sterowanie plikiem wyjściowym:" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "Umieszcza wyjście w PLIKU." -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "Oznacza obiekt, aby nie używał domyślnej ścieżki przeszukiwań." -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "To samo, co --whole-archive." -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "" "Domyślne reguły wydobywania z archiwum; słabe odwołania nie wystarczają." -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "Słabe odwołania powodują wydobywanie z archiwum." -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "Zezwala na wielokrotne definicje; używana jest pierwsza." -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "Zabrania/zezwala na nieokreślone symbole w DSO." -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "Obiekt wymaga natychmiastowej obsługi $ORIGIN." -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "Relokacje nie będą przeprowadzane leniwie." -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "Obiekt nie może być wyładowany w czasie działania." -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "Oznacza obiekt, aby był inicjowany jako pierwszy." -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "Włącza/wyłącza flagi leniwego wczytywania dla następnych zależności." -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." -msgstr "Oznacza obiekt jako niewczytywalnego przez \"dlopen\"." +msgstr "Oznacza obiekt jako niewczytywalnego przez „dlopen”." -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "Ignoruje/zapisuje zależności od nieużywanych DSO." -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "Utworzony DSO będzie biblioteką systemową." -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "ADRES" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "Ustawia adres punktu wejściowego." -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "Bez konsolidowania z bibliotekami współdzielonymi." -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "Preferuje konsolidowanie z bibliotekami dzielonymi." -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "Eksportuje wszystkie symbole dynamiczne." -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "Skraca wszystkie symbole." -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "Skraca symbole debugowania." -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "Przyjmuje dla systemu docelowego rozmiaru strony ROZMIAR." -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "Ustawia ścieżkę poszukiwania DSO w czasie działania." -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "Ustawia ścieżki poszukiwania DSO w czasie konsolidowania." -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "Tworzy dynamiczny obiekt współdzielony." -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "Tworzy obiekt relokowalny." -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "Ogranicza zasięg symboli nieprzypisanych do wersji do lokalnego." -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "Usuwa nieużywane sekcje." -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "Bez usuwania nieużywanych sekcji." -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "Ustawia soname obiektu współdzielonego." -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "Ustawia nazwę dynamicznego konsolidatora." -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "" -"Dodaje/pomija dodanie identyfikacji edytora konsolidacji do sekcji .comment" +"Dodaje/pomija dodanie identyfikacji edytora konsolidacji do sekcji .comment." -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "Tworzy sekcję .eh_frame_hdr" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "Ustawia styl sum kontrolnych na sysv, gnu lub oba." -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." -msgstr "Tworzy wpis identyfikatora kopii (md5, sha1 (domyślnie), uuid)." +msgstr "Tworzy wpis identyfikatora kopii (MD5, SHA1 (domyślnie), UUID)." -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "Sterowanie działaniami konsolidatora:" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "Szczegółowe komunikaty." -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "Śledzi otwarcia plików." -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "Poświęca prędkość na mniejsze zużycie pamięci" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "POZIOM" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "Ustawia poziom optymalizacji na POZIOM." -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "Używa skryptu konsolidatora z PLIKU." -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "Wybiera pobranie informacji debugowania parsera" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "Odczytuje informacje o wersji z PLIKU." -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "Ustawia emulację na NAZWĘ." -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "Łączy pliki obiektów i archiwów." -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." -msgstr "[PLIK]..." +msgstr "[PLIK]…" -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "Wymagany jest co najmniej jeden plik wejściowy" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "błąd podczas przygotowywania konsolidowania" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" -msgstr "nie można otworzyć skryptu konsolidatora \"%s\"" +msgstr "nie można otworzyć skryptu konsolidatora „%s”" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( bez pasującego -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "dozwolona jest tylko jedna z opcji -G i -r" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" -msgstr "podano więcej niż jeden parametr \"-m\"" +msgstr "podano więcej niż jeden parametr „-m”" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" -msgstr "nieznana opcja \"-%c %s\"" +msgstr "nieznana opcja „-%c %s”" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" -msgstr "nieprawidłowa wartość rozmiaru strony \"%s\": zignorowano" +msgstr "nieprawidłowa wartość rozmiaru strony „%s”: zignorowano" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" -msgstr "nieprawidłowy styl sum kontrolnych \"%s\"" +msgstr "nieprawidłowy styl sum kontrolnych „%s”" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" -msgstr "nieprawidłowy styl identyfikatora budowania \"%s\"" +msgstr "nieprawidłowy styl identyfikatora kopii „%s”" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "Podano więcej niż jeden plik wyjściowy." -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" -msgstr "Nieprawidłowy poziom optymalizacji \"%s\"" +msgstr "Nieprawidłowy poziom optymalizacji „%s”" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "zagnieżdżone grupy -( -) nie są dozwolone" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "-) bez pasującego -(" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" -msgstr "nieznana opcja \"-%c %s\"" +msgstr "nieznana opcja „-%c %s”" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "" "nie można odnaleźć pliku wejściowego, aby określić format pliku wyjściowego" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" -msgstr "proszę spróbować jeszcze raz z odpowiednim parametrem \"-m\"" +msgstr "proszę spróbować jeszcze raz z odpowiednim parametrem „-m”" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" -msgstr "nie można odczytać skryptu wersji \"%s\"" +msgstr "nie można odczytać skryptu wersji „%s”" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" -msgstr "powtórzona definicja \"%s\" w skrypcie konsolidatora" +msgstr "powtórzona definicja „%s” w skrypcie konsolidatora" #: src/ldgeneric.c:201 src/ldgeneric.c:5141 #, c-format @@ -3546,12 +3763,12 @@ msgstr "nie można utworzyć tabeli ciągów" #: src/ldgeneric.c:247 #, c-format msgid "cannot load ld backend library '%s': %s" -msgstr "nie można odczytać biblioteki zaplecza ld \"%s\": %s" +msgstr "nie można odczytać biblioteki zaplecza ld „%s”: %s" #: src/ldgeneric.c:257 #, c-format msgid "cannot find init function in ld backend library '%s': %s" -msgstr "nie można odnaleźć funkcji init w bibliotece zaplecza ld \"%s\": %s" +msgstr "nie można odnaleźć funkcji init w bibliotece zaplecza ld „%s”: %s" #: src/ldgeneric.c:300 #, c-format @@ -3571,16 +3788,16 @@ msgstr "%s (dla DT_NEEDED %s)\n" #: src/ldgeneric.c:563 #, c-format msgid "Warning: type of `%s' changed from %s in %s to %s in %s" -msgstr "Ostrzeżenie: typ \"%s\" zmienił się z %s w %s na %s w %s" +msgstr "Ostrzeżenie: typ „%s” zmienił się z %s w %s na %s w %s" #: src/ldgeneric.c:576 #, c-format msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "" -"Ostrzeżenie: rozmiar \"%s\" zmienił się z % w %s na % w %s" +"Ostrzeżenie: rozmiar „%s” zmienił się z % w %s na % w %s" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "nie można określić liczby sekcji: %s" @@ -3603,12 +3820,12 @@ msgstr "%s: nie można uzyskać danych grupy sekcji: %s" #: src/ldgeneric.c:830 #, c-format msgid "%s: section '%s' with group flag set does not belong to any group" -msgstr "%s: sekcja \"%s\" z ustawioną flagą grupy nie należy do żadnej grupy" +msgstr "%s: sekcja „%s” z ustawioną flagą grupy nie należy do żadnej grupy" #: src/ldgeneric.c:875 #, c-format msgid "%s: section [%2d] '%s' is not in the correct section group" -msgstr "%s: sekcja [%2d] \"%s\" nie jest w poprawnej grupie sekcji" +msgstr "%s: sekcja [%2d] „%s” nie jest w poprawnej grupie sekcji" #: src/ldgeneric.c:1146 src/ldgeneric.c:1403 src/ldgeneric.c:1412 #: src/ldgeneric.c:1471 src/ldgeneric.c:1480 src/ldgeneric.c:1743 @@ -3625,12 +3842,12 @@ msgstr "%s: tylko pliki typu ET_REL mogą zawierać grupy sekcji" #: src/ldgeneric.c:1292 #, c-format msgid "%s: cannot determine signature of section group [%2zd] '%s': %s" -msgstr "%s: nie można określić podpisu grupy sekcji [%2zd] \"%s\": %s" +msgstr "%s: nie można określić podpisu grupy sekcji [%2zd] „%s”: %s" #: src/ldgeneric.c:1304 #, c-format msgid "%s: cannot get content of section group [%2zd] '%s': %s'" -msgstr "%s: nie można uzyskać zawartości grupy sekcji [%2zd] \"%s\": %s" +msgstr "%s: nie można uzyskać zawartości grupy sekcji [%2zd] „%s”: %s" #: src/ldgeneric.c:1318 #, c-format @@ -3638,13 +3855,13 @@ msgid "" "%s: group member %zu of section group [%2zd] '%s' has too high index: " "%" msgstr "" -"%s: element grupy %zu grupy sekcji [%2zd] \"%s\" posiada za wysoki indeks: " +"%s: element grupy %zu grupy sekcji [%2zd] „%s” posiada za wysoki indeks: " "%" #: src/ldgeneric.c:1340 #, c-format msgid "%s: section '%s' has unknown type: %d" -msgstr "%s: sekcja \"%s\" posiada nieznany typ: %d" +msgstr "%s: sekcja „%s” posiada nieznany typ: %d" #: src/ldgeneric.c:1719 #, c-format @@ -3654,7 +3871,7 @@ msgstr "nie można uzyskać deskryptora dla pliku ELF (%s:%d): %s\n" #: src/ldgeneric.c:1889 #, c-format msgid "cannot read archive `%s': %s" -msgstr "nie można odczytać archiwum \"%s\": %s" +msgstr "nie można odczytać archiwum „%s”: %s" #: src/ldgeneric.c:2010 #, c-format @@ -3674,18 +3891,17 @@ msgstr "%s: nie można uzyskać indeksu tabeli ciągów nagłówków sekcji: %s\ #: src/ldgeneric.c:2063 #, c-format msgid "cannot use DSO '%s' when generating relocatable object file" -msgstr "" -"nie można użyć DSO \"%s\" podczas tworzenia relokowalnego pliku obiektu" +msgstr "nie można użyć DSO „%s” podczas tworzenia relokowalnego pliku obiektu" #: src/ldgeneric.c:2148 #, c-format msgid "input file '%s' ignored" -msgstr "plik wejściowy \"%s\" został zignorowany" +msgstr "plik wejściowy „%s” został zignorowany" #: src/ldgeneric.c:2362 #, c-format msgid "undefined symbol `%s' in %s" -msgstr "nieokreślony symbol \"%s\" w %s" +msgstr "nieokreślony symbol „%s” w %s" #: src/ldgeneric.c:2692 #, c-format @@ -3708,7 +3924,7 @@ msgstr "nie można utworzyć sekcji dla pliku wyjściowego: %s" #: src/ldgeneric.c:3434 #, c-format msgid "address computation expression contains variable '%s'" -msgstr "wyrażenie obliczenia adresu zawiera zmienną \"%s\"" +msgstr "wyrażenie obliczenia adresu zawiera zmienną „%s”" #: src/ldgeneric.c:3479 #, c-format @@ -3716,14 +3932,14 @@ msgid "" "argument '%' of ALIGN in address computation expression is no power " "of two" msgstr "" -"parametr \"%\" ALIGN w wyrażeniu obliczenia adresu nie jest potęgą " +"parametr „%” ALIGN w wyrażeniu obliczenia adresu nie jest potęgą " "dwójki" #: src/ldgeneric.c:3674 #, c-format msgid "cannot find entry symbol '%s': defaulting to %#0*" msgstr "" -"nie można odnaleźć symbolu wejściowego \"%s\": użycie domyślnego %#0*" +"nie można odnaleźć symbolu wejściowego „%s”: użycie domyślnego %#0*" #: src/ldgeneric.c:3680 #, c-format @@ -3749,12 +3965,12 @@ msgstr "nie można utworzyć sekcji identyfikatora kopii: %s" #: src/ldgeneric.c:4181 #, c-format msgid "cannot convert section data to file format: %s" -msgstr "nie można przekonwertować danych sekcji na format pliku: %s" +msgstr "nie można konwertować danych sekcji na format pliku: %s" #: src/ldgeneric.c:4190 #, c-format msgid "cannot convert section data to memory format: %s" -msgstr "nie można przekonwertować danych sekcji na format pamięci: %s" +msgstr "nie można konwertować danych sekcji na format pamięci: %s" #: src/ldgeneric.c:4251 #, c-format @@ -3819,7 +4035,7 @@ msgstr "błąd wewnętrzny: sekcja nie będąca nobits po sekcji nobits" msgid "cannot get header of 0th section: %s" msgstr "nie można uzyskać nagłówka zerowej sekcji: %s" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "nie można zaktualizować nagłówka ELF: %s" @@ -3856,7 +4072,7 @@ msgstr "" #: src/ldgeneric.c:7130 #, c-format msgid "no machine specific '%s' implementation" -msgstr "brak implementacji \"%s\" specyficznej dla maszyny" +msgstr "brak implementacji „%s” specyficznej dla maszyny" #: src/ldscript.y:170 msgid "mode for segment invalid\n" @@ -3865,33 +4081,33 @@ msgstr "nieprawidłowy tryb dla segmentu\n" #: src/ldscript.y:457 #, c-format msgid "while reading version script '%s': %s at line %d" -msgstr "podczas odczytywania skryptu wersji \"%s\": %s w wierszu %d" +msgstr "podczas odczytywania skryptu wersji „%s”: %s w wierszu %d" #: src/ldscript.y:458 #, c-format msgid "while reading linker script '%s': %s at line %d" -msgstr "podczas odczytywania skryptu konsolidatora \"%s\": %s w wierszu %d" +msgstr "podczas odczytywania skryptu konsolidatora „%s”: %s w wierszu %d" #: src/ldscript.y:737 #, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "" -"symbol \"%s\" jest zadeklarowany jednocześnie lokalny i globalny dla " -"nienazwanej wersji" +"symbol „%s” jest zadeklarowany jednocześnie lokalny i globalny dla " +"nienazwanej wersji „%s”" #: src/ldscript.y:739 #, c-format msgid "symbol '%s' is declared both local and global for version '%s'" msgstr "" -"symbol \"%s\" jest zadeklarowany jednocześnie lokalny i globalny dla wersji " -"\"%s\"" +"symbol „%s” jest zadeklarowany jednocześnie lokalny i globalny dla wersji " +"„%s”" #: src/ldscript.y:759 src/ldscript.y:766 #, c-format msgid "default visibility set as local and global" msgstr "domyślna widoczność ustawiona jako lokalna i globalna" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "Wybór wyjścia:" @@ -3919,7 +4135,7 @@ msgstr "Wyświetla tylko nieokreślone symbole" msgid "Include index for symbols from archive members" msgstr "Dołącza indeks dla symboli z elementów archiwum" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "Format wyjścia:" @@ -3932,8 +4148,8 @@ msgid "" "Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The " "default is `sysv'" msgstr "" -"Używa FORMATU wyjściowego. Może to być \"bsd\", \"sysv\" lub \"posix\". " -"Domyślny jest format \"sysv\"" +"Używa FORMATU wyjściowego. Może to być „bsd”, „sysv” lub „posix”. Domyślny " +"jest format „sysv”" #: src/nm.c:84 msgid "Same as --format=bsd" @@ -3943,7 +4159,7 @@ msgstr "To samo, co --format=bsd" msgid "Same as --format=posix" msgstr "To samo co, --format=posix" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "Używa BAZY do wypisywania wartości symboli" @@ -3955,7 +4171,7 @@ msgstr "Oznacza specjalne symbole" msgid "Print size of defined symbols" msgstr "Wyświetla rozmiar określonych symboli" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "Opcje wyjścia:" @@ -3979,27 +4195,27 @@ msgstr "Dekoduje niskopoziomowe nazwy symboli na nazwy kodu źródłowego" msgid "List symbols from FILEs (a.out by default)." msgstr "Wyświetla listę symboli z PLIKU (domyślnie a.out)." -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 msgid "Output formatting" msgstr "Formatowanie wyjścia" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 #, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" -msgstr "%s: BŁĄD WEWNĘTRZNY %d (%s-%s): %s" +msgid "%s: INTERNAL ERROR %d (%s): %s" +msgstr "%s: BŁĄD WEWNĘTRZNY %d (%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" -msgstr "podczas zamykania \"%s\"" +msgstr "podczas zamykania „%s”" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: nie rozpoznano formatu pliku" -#: src/nm.c:460 +#: src/nm.c:457 msgid "" "\n" "Archive index:\n" @@ -4007,42 +4223,42 @@ msgstr "" "\n" "Indeks archiwum:\n" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "nieprawidłowy offset %zu dla symbolu %s" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "%s w %s\n" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "nie można przywrócić offsetu w archiwum na początek" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: nie rozpoznano formatu pliku" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "nie można utworzyć drzewa wyszukiwania" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "nie można uzyskać indeksu tabeli ciągów nagłówków sekcji" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -4055,7 +4271,7 @@ msgstr "" "Symbole z %s:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -4064,68 +4280,68 @@ msgstr "" "%*s%-*s %-*s Klasa Typ %-*s %*s Sekcja\n" "\n" -#: src/nm.c:1173 +#: src/nm.c:1232 #, c-format -msgid "%s: entry size in section `%s' is not what we expect" -msgstr "%s: rozmiar wpisu w sekcji \"%s\" nie jest tym, czego oczekiwano" +msgid "%s: entry size in section %zd `%s' is not what we expect" +msgstr "%s: rozmiar wpisu w sekcji %zd „%s” nie jest tym, czego oczekiwano" -#: src/nm.c:1177 +#: src/nm.c:1237 #, c-format -msgid "%s: size of section `%s' is not multiple of entry size" -msgstr "%s: rozmiar sekcji \"%s\" nie jest wielokrotnością rozmiaru wpisu" +msgid "%s: size of section %zd `%s' is not multiple of entry size" +msgstr "%s: rozmiar sekcji %zd „%s” nie jest wielokrotnością rozmiaru wpisu" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: nieprawidłowe działanie" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: brak symboli" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "Wybór trybu:" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "Wyświetla informacje o relokacji." -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "Wyświetla pełną zawartość żądanych sekcji" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "Wyświetla kod asemblera sekcji wykonywalnych" -#: src/objdump.c:60 +#: src/objdump.c:59 msgid "Output content selection:" msgstr "Wybór zawartości wyjścia:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "Wyświetla tylko informacje o sekcji NAZWA." -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "Wyświetla informacje z PLIKÓW (domyślnie a.out)." -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "Nie podano działania.\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" -msgstr "podczas zamykania \"%s\"" +msgstr "podczas zamykania „%s”" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "NIEPRAWIDŁOWY SYMBOL" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "NIEPRAWIDŁOWA SEKCJA" @@ -4144,281 +4360,286 @@ msgstr "" msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "Zawartość sekcji %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "nie można deasemblować" -#: src/objdump.c:736 -#, c-format -msgid "cannot allocate memory" -msgstr "nie można przydzielić pamięci" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "Tworzenie indeksu w celu przyspieszenia dostępu do archiwów." -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "ARCHIWUM" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "Wymagana jest nazwa archiwum" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" -msgstr "\"%s\" nie jest archiwum" +msgstr "„%s” nie jest archiwum" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "błąd podczas zwalniania deskryptora pod-ELF: %s" -#: src/readelf.c:71 -#, fuzzy +#: src/readelf.c:72 msgid "ELF input selection:" msgstr "Wybór wyjścia ELF:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" +"Używa podanej SEKCJI (domyślnie .gnu_debugdata) jako (skompresowanych) " +"danych wejściowych ELF" -#: src/readelf.c:75 +#: src/readelf.c:76 msgid "ELF output selection:" msgstr "Wybór wyjścia ELF:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "Wszystkie te plus -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "Wyświetla segment dynamiczny" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "Wyświetla nagłówek pliku ELF" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "Wyświetla histogram długości list kubełków" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "Wyświetla nagłówki programu" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "Wyświetla relokacje" -#: src/readelf.c:85 +#: src/readelf.c:86 msgid "Display the sections' headers" msgstr "Wyświetla nagłówków sekcji" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "Wyświetla tabelę symboli" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "Wyświetla informacje o wersjonowaniu" -#: src/readelf.c:89 +#: src/readelf.c:90 msgid "Display the ELF notes" msgstr "Wyświetla notatki ELF" -#: src/readelf.c:91 +#: src/readelf.c:92 msgid "Display architecture specific information, if any" msgstr "Wyświetla informacje specyficzne dla architektury, jeśli są" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "Wyświetla sekcje do obsługi wyjątków" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "Dodatkowy wybór wyjścia:" -#: src/readelf.c:97 -#, fuzzy +#: src/readelf.c:98 msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro or exception" msgstr "" "Wyświetla zawartość sekcji DWARF. SEKCJA może być jednym z abbrev, aranges, " -"frame, gdb_index, info, loc, line, ranges, pubnames, str, macinfo, macro lub " -"exception." +"decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " +"pubnames, str, macinfo, macro lub exception" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "Zrzuca niezinterpretowaną zawartość SEKCJI, według liczny lub nazwy" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "Wyświetla zawartość ciągów sekcji" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "Wyświetla indeks symboli archiwum" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "Kontrola wyjścia:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Bez odnajdywania nazw symboli dla adresów w danych DWARF" -#: src/readelf.c:112 -#, fuzzy +#: src/readelf.c:113 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" -msgstr "Bez odnajdywania nazw symboli dla adresów w danych DWARF" +msgstr "" +"Wyświetla tylko offsety zamiast rozwiązywania wartości na adresy w danych " +"DWARF" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "Ignorowane dla zgodności (wiersze są zawsze szerokie)" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" +"Wyświetla informacje o kompresji dla skompresowanych sekcji (kiedy jest " +"używane z opcją -S); dekompresuje sekcję przed zrzuceniem danych (kiedy jest " +"używane z opcją -p lub -x)" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "Wyświetla informacje z pliku ELF w postaci czytelnej dla człowieka." -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" -msgstr "Nieznana sekcja debugowania DWARF \"%s\".\n" +msgstr "Nieznana sekcja debugowania DWARF „%s”.\n" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "nie można utworzyć deskryptora ELF: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "nie można uzyskać sekcji: %s" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "nie można uzyskać nagłówka sekcji: %s" -#: src/readelf.c:562 -#, fuzzy, c-format +#: src/readelf.c:571 +#, c-format msgid "cannot get section name" -msgstr "nie można uzyskać nagłówka sekcji\n" +msgstr "nie można uzyskać nazwy sekcji" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "nie można uzyskać zwartości %s: %s" -#: src/readelf.c:587 -#, fuzzy, c-format +#: src/readelf.c:596 +#, c-format msgid "cannot create temp file '%s'" -msgstr "nie można utworzyć nowego pliku \"%s\": %s" +msgstr "nie można utworzyć pliku tymczasowego „%s”" -#: src/readelf.c:596 -#, fuzzy, c-format +#: src/readelf.c:605 +#, c-format msgid "cannot write section data" -msgstr "nie można odczytać danych sekcji: %s" +msgstr "nie można zapisać danych sekcji" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "błąd podczas zamykania deskryptora ELF: %s" -#: src/readelf.c:609 -#, fuzzy, c-format +#: src/readelf.c:618 +#, c-format msgid "error while rewinding file descriptor" -msgstr "błąd podczas zamykania deskryptora ELF: %s" +msgstr "błąd podczas przewijania deskryptora pliku" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" -msgstr "\"%s\" nie jest archiwum, nie można wyświetlić indeksu archiwum" +msgstr "„%s” nie jest archiwum, nie można wyświetlić indeksu archiwum" -#: src/readelf.c:742 -#, fuzzy, c-format +#: src/readelf.c:751 +#, c-format msgid "No such section '%s' in '%s'" -msgstr "nie można odczytać notatki sekcji [%zu] \"%s\" w \"%s\": %s" +msgstr "Brak sekcji „%s” w „%s”" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "nie można wykonać stat na pliku wejściowym" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "plik wejściowy jest pusty" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" -msgstr "odczytanie \"%s\" nie powiodło się: %s" +msgstr "odczytanie „%s” się nie powiodło: %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "nie można odczytać nagłówka ELF: %s" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "nie można utworzyć uchwytu EBL" -#: src/readelf.c:835 +#: src/readelf.c:858 #, c-format msgid "cannot determine number of program headers: %s" msgstr "nie można określić liczby nagłówków programu: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "NONE (żaden)" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "REL (plik relokowalny)" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "EXEC (plik wykonywalny)" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "DYN (plik obiektu współdzielonego)" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "CORE (plik core)" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "Zależny od systemu: (%x)\n" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Zależny od procesora: (%x)\n" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " @@ -4426,7 +4647,7 @@ msgstr "" "Nagłówek ELF:\n" " Magic: " -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" @@ -4435,117 +4656,117 @@ msgstr "" "\n" " Klasa: %s\n" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr " Dane: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Wersja Ident: %hhd %s\n" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(bieżąca)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr " System operacyjny/ABI: %s\n" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr " Wersja ABI: %hhd\n" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " Typ: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr " Komputer: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr " Wersja: %d %s\n" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr " Adres punktu wejściowego: %#\n" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr " Początek nagłówków programu: % %s\n" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "(bajtów w pliku)" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr " Początek nagłówków sekcji: % %s\n" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr " Flagi: %s\n" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr " Rozmiar tego nagłówka: % %s\n" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(bajtów)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr " Rozmiar wpisów nagłówka programu: % %s\n" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr " Liczba wpisów nagłówków programu: %" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr " (% w [0].sh_info)" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr " ([0] niedostępny)" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr " Rozmiar wpisów nagłówka sekcji: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr " Liczba wpisów nagłówków sekcji: %" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr " (% w [0].sh_size)" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr " (% w [0].sh_link)" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4554,7 +4775,7 @@ msgstr "" " Indeks tabeli ciągów nagłówków sekcji: XINDEX%s\n" "\n" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" @@ -4563,7 +4784,7 @@ msgstr "" " Indeks tabeli ciągów nagłówków sekcji: %\n" "\n" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4572,19 +4793,19 @@ msgstr "" "Jest %d nagłówków sekcji, rozpoczynających się od offsetu %#:\n" "\n" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "Nagłówki sekcji:" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" msgstr "" -"[Nr] Nazwa Typ Adres Offset Rozm ES Flagi Lk " +"[Nr] Nazwa Typ Adres Offset Rozm. ES Flagi Lk " "Inf Al" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4592,18 +4813,36 @@ msgstr "" "[Nr] Nazwa Typ Adres Offset Rozmiar ES " "Flagi Lk Inf Al" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr " [Kompresja Rozmiar Al]" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr " [Kompresja Rozmiar Al]" + +#: src/readelf.c:1213 +#, c-format +msgid "bad compression header for section %zd: %s" +msgstr "błędny nagłówek kompresji dla sekcji %zd: %s" + +#: src/readelf.c:1224 +#, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "błędny rozmiar kompresji gnu dla sekcji %zd: %s" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "Nagłówki programu:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Typ Offset AdresWirt AdresFiz RozmPlik RozmPam Flg " "Wyrównanie" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4611,27 +4850,27 @@ msgstr "" " Typ Offset AdresWirtualny AdresFizyczny RozmPlik " "RozmPam Flg Wyrównanie" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Wywołanie interpretera programu: %s]\n" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" " Segment Sections..." msgstr "" "\n" -" mapowanie sekcji do segmentów:\n" -" Segment sekcji..." +" Mapowanie sekcji do segmentów:\n" +" Segment sekcji…" -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "nie można uzyskać nagłówka programu: %s" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4641,15 +4880,15 @@ msgid_plural "" "COMDAT section group [%2zu] '%s' with signature '%s' contains %zu entries:\n" msgstr[0] "" "\n" -"Grupa sekcji COMDAT [%2zu] \"%s\" z podspiem \"%s\" zawiera %zu wpis:\n" +"Grupa sekcji COMDAT [%2zu] „%s” z podpisem „%s” zawiera %zu wpis:\n" msgstr[1] "" "\n" -"Grupa sekcji COMDAT [%2zu] \"%s\" z podpisem \"%s\" zawiera %zu wpisy:\n" +"Grupa sekcji COMDAT [%2zu] „%s” z podpisem „%s” zawiera %zu wpisy:\n" msgstr[2] "" "\n" -"Grupa sekcji COMDAT [%2zu] \"%s\" z podpisem \"%s\" zawiera %zu wpisów:\n" +"Grupa sekcji COMDAT [%2zu] „%s” z podpisem „%s” zawiera %zu wpisów:\n" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4659,29 +4898,33 @@ msgid_plural "" "Section group [%2zu] '%s' with signature '%s' contains %zu entries:\n" msgstr[0] "" "\n" -"Grupa sekcji [%2zu] \"%s\" z podpisem \"%s\" zawiera %zu wpis:\n" +"Grupa sekcji [%2zu] „%s” z podpisem „%s” zawiera %zu wpis:\n" msgstr[1] "" "\n" -"Grupa sekcji [%2zu] \"%s\" z podpisem \"%s\" zawiera %zu wpisy:\n" +"Grupa sekcji [%2zu] „%s” z podpisem „%s” zawiera %zu wpisy:\n" msgstr[2] "" "\n" -"Grupa sekcji [%2zu] \"%s\" z podpisem \"%s\" zawiera %zu wpisów:\n" +"Grupa sekcji [%2zu] „%s” z podpisem „%s” zawiera %zu wpisów:\n" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 -#, fuzzy, c-format -msgid "invalid sh_link value in section %Zu" -msgstr "nieprawidłowa sekcja .debug_line" +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "Nie można dekompresować sekcji" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 +#, c-format +msgid "invalid sh_link value in section %zu" +msgstr "nieprawidłowa wartość sh_link w sekcji %zu" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4707,36 +4950,36 @@ msgstr[2] "" " Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " "'%s'\n" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr " Typ Wartość\n" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "Biblioteka współdzielona: [%s]\n" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "soname biblioteki: [%s]\n" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "rpath biblioteki: [%s]\n" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "runpath biblioteki: [%s]\n" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "% (bajtów)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" @@ -4745,7 +4988,7 @@ msgstr "" "\n" "Nieprawidłowa tabela symboli pod offsetem %#0\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4757,18 +5000,18 @@ msgid_plural "" "contains %d entries:\n" msgstr[0] "" "\n" -"Sekcja relokacji [%2zu] \"%s\" dla sekcji [%2u] \"%s\" pod offsetem " -"%#0 zawiera %d wpis:\n" +"Sekcja relokacji [%2zu] „%s” dla sekcji [%2u] „%s” pod offsetem %#0 " +"zawiera %d wpis:\n" msgstr[1] "" "\n" -"Sekcja relokacji [%2zu] \"%s\" dla sekcji [%2u] \"%s\" pod offsetem " -"%#0 zawiera %d wpisy:\n" +"Sekcja relokacji [%2zu] „%s” dla sekcji [%2u] „%s” pod offsetem %#0 " +"zawiera %d wpisy:\n" msgstr[2] "" "\n" -"Sekcja relokacji [%2zu] \"%s\" dla sekcji [%2u] \"%s\" pod offsetem " -"%#0 zawiera %d wpisów:\n" +"Sekcja relokacji [%2zu] „%s” dla sekcji [%2u] „%s” pod offsetem %#0 " +"zawiera %d wpisów:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4778,38 +5021,38 @@ msgid_plural "" "Relocation section [%2u] '%s' at offset %#0 contains %d entries:\n" msgstr[0] "" "\n" -"Sekcja relokacji [%2u] \"%s\" pod offsetem %#0 zawiera %d wpis:\n" +"Sekcja relokacji [%2u] „%s” pod offsetem %#0 zawiera %d wpis:\n" msgstr[1] "" "\n" -"Sekcja relokacji [%2u] \"%s\" pod offsetem %#0 zawiera %d wpisy:\n" +"Sekcja relokacji [%2u] „%s” pod offsetem %#0 zawiera %d wpisy:\n" msgstr[2] "" "\n" -"Sekcja relokacji [%2u] \"%s\" pod offsetem %#0 zawiera %d wpisów:\n" +"Sekcja relokacji [%2u] „%s” pod offsetem %#0 zawiera %d wpisów:\n" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr " Offset Typ Wartość Nazwa\n" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr " Offset Typ Wartość Nazwa\n" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr " Offset Typ Wartość Koniec Nazwa\n" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr "" " Offset Typ Wartość Koniec Nazwa\n" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4819,49 +5062,49 @@ msgid_plural "" "Symbol table [%2u] '%s' contains %u entries:\n" msgstr[0] "" "\n" -"Tabela symboli [%2u] \"%s\" zawiera %u wpis:\n" +"Tabela symboli [%2u] „%s” zawiera %u wpis:\n" msgstr[1] "" "\n" -"Tabela symboli [%2u] \"%s\" zawiera %u wpisy:\n" +"Tabela symboli [%2u] „%s” zawiera %u wpisy:\n" msgstr[2] "" "\n" -"Tabela symboli [%2u] \"%s\" zawiera %u wpisów:\n" +"Tabela symboli [%2u] „%s” zawiera %u wpisów:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" -msgstr[0] " %lu symbol lokalny Tabela ciągów: [%2u] \"%s\"\n" -msgstr[1] " %lu symbole lokalne Tabela ciągów: [%2u] \"%s\"\n" -msgstr[2] " %lu symboli lokalnych Tabela ciągów: [%2u] \"%s\"\n" +msgstr[0] " %lu symbol lokalny Tabela ciągów: [%2u] „%s”\n" +msgstr[1] " %lu symbole lokalne Tabela ciągów: [%2u] „%s”\n" +msgstr[2] " %lu symboli lokalnych Tabela ciągów: [%2u] „%s”\n" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Numer: Wartość Rozm Typ Bind Widoczność Ndx Nazwa\n" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Numer: Wartość Rozm Typ Bind Widoczność Ndx Nazwa\n" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "błędny symbol dynamiczny" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "brak" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| " -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4873,31 +5116,31 @@ msgid_plural "" " Addr: %#0* Offset: %#08 Link to section: [%2u] '%s'\n" msgstr[0] "" "\n" -"Sekcja wymaganych wersji [%2u] \"%s\" zawiera %d wpis:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +"Sekcja wymaganych wersji [%2u] „%s” zawiera %d wpis:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" msgstr[1] "" "\n" -"Sekcja wymaganych wersji [%2u] \"%s\" zawiera %d wpisy:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +"Sekcja wymaganych wersji [%2u] „%s” zawiera %d wpisy:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" msgstr[2] "" "\n" -"Sekcja wymaganych wersji [%2u] \"%s\" zawiera %d wpisów:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +"Sekcja wymaganych wersji [%2u] „%s” zawiera %d wpisów:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Wersja: %hu Plik: %s Licznik: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Nazwa: %s Flagi: %s Wersja: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4909,32 +5152,32 @@ msgid_plural "" " Addr: %#0* Offset: %#08 Link to section: [%2u] '%s'\n" msgstr[0] "" "\n" -"Sekcja definicji wersji [%2u] \"%s\" zawiera %d wpis:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +"Sekcja definicji wersji [%2u] „%s” zawiera %d wpis:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" msgstr[1] "" "\n" -"Sekcja definicji wersji [%2u] \"%s\" zawiera %d wpisy:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +"Sekcja definicji wersji [%2u] „%s” zawiera %d wpisy:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" msgstr[2] "" "\n" -"Sekcja definicji wersji [%2u] \"%s\" zawiera %d wpisów:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +"Sekcja definicji wersji [%2u] „%s” zawiera %d wpisów:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr "" " %#06x: Wersja: %hd Flagi: %s Indeks: %hd Licznik: %hd Nazwa: %s\n" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Rodzic %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4946,29 +5189,26 @@ msgid_plural "" " Addr: %#0* Offset: %#08 Link to section: [%2u] '%s'" msgstr[0] "" "\n" -"Sekcja symboli wersji [%2u] \"%s\" zawiera %d wpis:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"" +"Sekcja symboli wersji [%2u] „%s” zawiera %d wpis:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] „%s”" msgstr[1] "" "\n" -"Sekcja symboli wersji [%2u] \"%s\" zawiera %d wpisy:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"" +"Sekcja symboli wersji [%2u] „%s” zawiera %d wpisy:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] „%s”" msgstr[2] "" "\n" -"Sekcja symboli wersji [%2u] \"%s\" zawiera %d wpisów:\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"" +"Sekcja symboli wersji [%2u] „%s” zawiera %d wpisów:\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] „%s”" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *lokalny* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *globalny* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -4982,39 +5222,39 @@ msgid_plural "" " Addr: %#0* Offset: %#08 Link to section: [%2u] '%s'\n" msgstr[0] "" "\n" -"Histogram dla długości listy kubełków w sekcji [%2u] \"%s\" (w sumie %d " +"Histogram dla długości listy kubełków w sekcji [%2u] „%s” (w sumie %d " "kubełek):\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" msgstr[1] "" "\n" -"Histogram dla długości listy kubełków w sekcji [%2u] \"%s\" (w sumie %d " +"Histogram dla długości listy kubełków w sekcji [%2u] „%s” (w sumie %d " "kubełki):\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" msgstr[2] "" "\n" -"Histogram dla długości listy kubełków w sekcji [%2u] \"%s\" (w sumie %d " +"Histogram dla długości listy kubełków w sekcji [%2u] „%s” (w sumie %d " "kubełków):\n" -" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] \"%s" -"\"\n" +" Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " +"„%s”\n" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Długość Liczba % całości Pokrycie\n" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -5023,12 +5263,27 @@ msgstr "" " Średnia liczba testów: udane wyszukania: %f\n" "\t\t\t nieudane wyszukania: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "nie można uzyskać danych dla sekcji %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "nieprawidłowe dane w sekcji sysv.hash %d" + +#: src/readelf.c:3148 +#, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "nieprawidłowe dane w sekcji sysv.hash64 %d" + +#: src/readelf.c:3206 +#, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "nieprawidłowe dane w sekcji gnu.hash %d" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" @@ -5038,7 +5293,7 @@ msgstr "" " Rozmiar maski bitowej: %zu bajtów %%% bitów ustawionych " "drugie przesunięcie skrótu: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -5048,18 +5303,18 @@ msgid_plural "" "Library list section [%2zu] '%s' at offset %#0 contains %d entries:\n" msgstr[0] "" "\n" -"Sekcja listy bibliotek [%2zu] \"%s\" pod offsetem %#0 zawiera %d " +"Sekcja listy bibliotek [%2zu] „%s” pod offsetem %#0 zawiera %d " "wpis:\n" msgstr[1] "" "\n" -"Sekcja listy bibliotek [%2zu] \"%s\" pod offsetem %#0 zawiera %d " +"Sekcja listy bibliotek [%2zu] „%s” pod offsetem %#0 zawiera %d " "wpisy:\n" msgstr[2] "" "\n" -"Sekcja listy bibliotek [%2zu] \"%s\" pod offsetem %#0 zawiera %d " +"Sekcja listy bibliotek [%2zu] „%s” pod offsetem %#0 zawiera %d " "wpisów:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -5067,7 +5322,7 @@ msgstr "" " Biblioteka Oznaczenie czasu Suma k. Wersja " "Flagi" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -5075,143 +5330,143 @@ msgid "" "%#0:\n" msgstr "" "\n" -"Sekcja atrybutów obiektu [%2zu] \"%s\" % bajtów pod offsetem " +"Sekcja atrybutów obiektu [%2zu] „%s” % bajtów pod offsetem " "%#0:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr " Właściciel Rozmiar\n" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " Plik: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "pusty blok" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "%zu bajtowy blok:" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# zostało użyte z różnymi rozmiarami adresu" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# zostało użyte z różnymi rozmiarami offsetu" -#: src/readelf.c:4288 -#, fuzzy, c-format +#: src/readelf.c:4509 +#, c-format msgid "%s %# used with different base addresses" -msgstr "%s %# zostało użyte z różnymi rozmiarami adresu" +msgstr "%s %# zostało użyte z różnymi adresami podstawowymi" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" -msgstr " [%6tx] ... % bajtów...\n" +msgstr " [%6tx] … % bajtów…\n" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -5219,10 +5474,10 @@ msgid "" " [ Code]\n" msgstr "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %#:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" " [ Kod]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" @@ -5231,30 +5486,30 @@ msgstr "" "\n" "Sekcja skrótów pod offsetem %:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** błąd podczas odczytywania skrótu: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] offset: %, potomek: %s, znacznik: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "tak" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "nie" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "nie można uzyskać zawartości .debug_aranges: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -5264,20 +5519,20 @@ msgid_plural "" "DWARF section [%2zu] '%s' at offset %# contains %zu entries:\n" msgstr[0] "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %# zawiera %zu wpis:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %# zawiera %zu wpis:\n" msgstr[1] "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %# zawiera %zu wpisy:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %# zawiera %zu wpisy:\n" msgstr[2] "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %# zawiera %zu wpisów:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" @@ -5285,134 +5540,142 @@ msgstr "" " [%*zu] początek: %0#*, długość: %5, offset CU DIE: " "%6\n" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" "DWARF section [%2zu] '%s' at offset %#:\n" msgstr "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %#:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4797 src/readelf.c:6494 #, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" "\n" -"Tabela pod offsetem %Zu:\n" +"Tabela pod offsetem %zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" -msgstr "nieprawidłowe dane w sekcji [%zu] \"%s\"" +msgstr "nieprawidłowe dane w sekcji [%zu] „%s”" -#: src/readelf.c:4589 -#, fuzzy, c-format +#: src/readelf.c:4817 +#, c-format msgid "" "\n" " Length: %6\n" -msgstr " Długość offsetu: %\n" +msgstr "" +"\n" +" Długość: %6\n" -#: src/readelf.c:4601 -#, fuzzy, c-format +#: src/readelf.c:4829 +#, c-format msgid " DWARF version: %6\n" -msgstr " Wersja: %\n" +msgstr " Wersja DWARF: %6\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" -msgstr "" +msgstr "nieobsługiwana wersja aranges" -#: src/readelf.c:4616 -#, fuzzy, c-format +#: src/readelf.c:4844 +#, c-format msgid " CU offset: %6\n" -msgstr " offset CU: %#\n" +msgstr " Offset CU: %6\n" -#: src/readelf.c:4622 -#, fuzzy, c-format +#: src/readelf.c:4850 +#, c-format msgid " Address size: %6\n" -msgstr " offset adresu: %#\n" +msgstr " Offset adresu: %6\n" -#: src/readelf.c:4626 -#, fuzzy, c-format +#: src/readelf.c:4854 +#, c-format msgid "unsupported address size" -msgstr "brak wartości adresu" +msgstr "nieobsługiwany rozmiar adresu" -#: src/readelf.c:4631 -#, fuzzy, c-format +#: src/readelf.c:4859 +#, c-format msgid "" " Segment size: %6\n" "\n" -msgstr " ustawienie pliku na %\n" +msgstr "" +" Rozmiar segmentu: %6\n" +"\n" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" -msgstr "" +msgstr "nieobsługiwany rozmiar segmentu" -#: src/readelf.c:4675 -#, fuzzy, c-format +#: src/readelf.c:4903 +#, c-format msgid " %s..%s (%)\n" -msgstr " %s: %\n" +msgstr " %s..%s (%)\n" -#: src/readelf.c:4678 -#, fuzzy, c-format +#: src/readelf.c:4906 +#, c-format msgid " %s..%s\n" -msgstr " [%6tx] %s...%s\n" +msgstr " %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" -msgstr "" +msgid " %zu padding bytes\n" +msgstr " bajty wypełnienia: %zu\n" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "nie można uzyskać zawartości .debug_ranges: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] adres podstawowy %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] pusta lista\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" -msgstr " [%6tx] %s...%s\n" +msgstr " [%6tx] %s…%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" -msgstr " %s...%s\n" +msgstr " %s…%s\n" -#: src/readelf.c:5210 -#, fuzzy, c-format +#: src/readelf.c:5184 +msgid " \n" +msgstr " \n" + +#: src/readelf.c:5493 +#, c-format msgid "cannot get ELF: %s" -msgstr "nie można uzyskać nagłówka ELF: %s" +msgstr "nie można uzyskać ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" "Call frame information section [%2zu] '%s' at offset %#:\n" msgstr "" "\n" -"Sekcja informacji o ramce wywołania [%2zu] \"%s\" pod offsetem %#0:\n" +"Sekcja informacji o ramce wywołania [%2zu] „%s” pod offsetem %#:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" @@ -5421,50 +5684,50 @@ msgstr "" "\n" " [%6tx] Zerowy koniec\n" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, c-format msgid "invalid augmentation length" msgstr "nieprawidłowa długość powiększenia" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "Kodowanie adresu FDE: " -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "Kodowanie wskaźnika LSDA: " -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr " (offset: %#)" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr " (kończący offset: %#)" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sWskaźnik LSDA: %#\n" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "nie można uzyskać kodu atrybutu: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "nie można uzyskać formy atrybutu: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "nie można uzyskać wartości atrybutu: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5472,10 +5735,10 @@ msgid "" " [Offset]\n" msgstr "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %#:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" " [Offset]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5488,7 +5751,7 @@ msgstr "" "%, rozmiar offsetu: %\n" " Podpis typu: %#, offset typu: %#\n" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5499,48 +5762,49 @@ msgstr "" " Wersja: %, offset sekcji skrótów: %, rozmiar adresu: " "%, rozmiar offsetu: %\n" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" -msgstr "nie można uzyskać DIE pod offsetem % w sekcji \"%s\": %s" +msgstr "nie można uzyskać DIE pod offsetem % w sekcji „%s”: %s" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "nie można uzyskać offsetu DIE: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "" -"nie można uzyskać znacznika DIE pod offsetem % w sekcji \"%s\": %s" +"nie można uzyskać znacznika DIE pod offsetem % w sekcji „%s”: %s" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "nie można uzyskać następnego DIE: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "nie można uzyskać następnego DIE: %s" -#: src/readelf.c:6059 -#, fuzzy, c-format +#: src/readelf.c:6372 +#, c-format msgid "" "\n" "DWARF section [%2zu] '%s' at offset %#:\n" "\n" msgstr "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %#:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" +"\n" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "nie można uzyskać danych sekcji danych wiersza: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5562,19 +5826,19 @@ msgstr "" " Długość prologu: %\n" " Minimalna długość instrukcji: %\n" " Maksymalna liczba działań na instrukcję: %\n" -" Początkowa wartość \"%s\": %\n" +" Początkowa wartość „%s”: %\n" " Początek wiersza: %\n" " Przedział wiersza: %\n" " Początek instrukcji: %\n" "\n" "Instrukcje:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" -msgstr "nieprawidłowe dane pod offsetem %tu w sekcji [%zu] \"%s\"" +msgstr "nieprawidłowe dane pod offsetem %tu w sekcji [%zu] „%s”" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" @@ -5582,7 +5846,7 @@ msgstr[0] " [%*] %hhu parametr\n" msgstr[1] " [%*] %hhu parametry\n" msgstr[2] " [%*] %hhu parametrów\n" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" @@ -5590,7 +5854,7 @@ msgstr "" "\n" "Tabela katalogu:" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" @@ -5600,7 +5864,7 @@ msgstr "" "Tabela nazw plików:\n" " Wpis Kat Czas Rozmiar Nazwa" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" @@ -5608,114 +5872,119 @@ msgstr "" "\n" "Instrukcje numerów wierszy:" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "nieprawidłowe maksimum operacji na instrukcję wynosi zero" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr "" " instrukcja specjalna %u: adres+%u = %s, op_index = %u, wiersz%+d = %zu\n" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr " instrukcja specjalna %u: adres+%u = %s, wiersz%+d = %zu\n" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr " instrukcja rozszerzona %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6763 msgid " end of sequence" msgstr " koniec sekwencji" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, c-format msgid " set address to %s\n" msgstr " ustawienie adresu na %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" " definicja nowego pliku: dir=%u, mtime=%, długość=%, nazwa=" "%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr " ustawienie dyskryminatora na %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6827 msgid " unknown opcode" msgstr " nieznana instrukcja" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr " kopiowanie" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr " zwiększenie adresu o %u do %s, op_index do %u\n" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, c-format msgid " advance address by %u to %s\n" msgstr " zwiększenie adresu o %u do %s\n" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr " zwiększenie wiersza o stałą %d do %\n" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr " ustawienie pliku na %\n" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr " ustawienie kolumny na %\n" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" -msgstr " ustawienie \"%s\" na %\n" +msgstr " ustawienie „%s” na %\n" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr " ustawienie podstawowej flagi bloku" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr " zwiększenie adresu o stałą %u do %s, op_index do %u\n" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, c-format msgid " advance address by constant %u to %s\n" msgstr " zwiększenie adresu o stałą %u do %s\n" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr " zwiększenie adresu o stałą wartość %u do %s\n" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr " ustawienie flagi końca prologu" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr " ustawienie flagi początku epilogu" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr " ustawienie isa na %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" @@ -5723,96 +5992,101 @@ msgstr[0] " nieznana instrukcja z % parametrem:" msgstr[1] " nieznana instrukcja z % parametrami:" msgstr[2] " nieznana instrukcja z % parametrami:" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "nie można uzyskać zawartości .debug_log: %s" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" -msgstr " [%6tx] %s...%s" +msgstr " [%6tx] %s…%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" -msgstr " %s...%s" +msgstr " %s…%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr " \n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "nie można uzyskać danych sekcji informacji o makrach: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** niezakończony ciąg na końcu sekcji" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** brak parametru DW_MACINFO_start_file na końcu sekcji" + +#: src/readelf.c:7334 #, c-format msgid " Offset: 0x%\n" msgstr " Offset: 0x%\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, c-format msgid " Version: %\n" -msgstr " Wersja: %\n" +msgstr " Wersja: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr " nieznana wersja, nie można przetworzyć sekcji\n" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, c-format msgid " Flag: 0x%\n" -msgstr " Flaga: 0x%\n" +msgstr " Flaga: 0x%\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, c-format msgid " Offset length: %\n" -msgstr " Długość offsetu: %\n" +msgstr " Długość offsetu: %\n" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, c-format msgid " .debug_line offset: 0x%\n" msgstr " Offset .debug_line: 0x%\n" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, c-format msgid " extension opcode table, % items:\n" -msgstr " tablica instrukcji rozszerzenia, % elementów:\n" +msgstr " tablica instrukcji rozszerzenia, % elementów:\n" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr " [%]" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, c-format msgid " % arguments:" msgstr " Parametry %:" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr " brak parametrów." -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "instrukcja producenta nie została sprawdzona?" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr " [%5d] offset DIE: %6, offset CU DIE: %6, nazwa: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5820,48 +6094,48 @@ msgid "" " %*s String\n" msgstr "" "\n" -"Sekcja DWARF [%2zu] \"%s\" pod offsetem %#:\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" " %*s Ciąg\n" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** błąd podczas odczytywania ciągów: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" msgstr "" "\n" -"Sekcja tabeli wyszukiwania ramki wywołania [%2zu] \".eh_frame_hdr\":\n" +"Sekcja tabeli wyszukiwania ramki wywołania [%2zu] „.eh_frame_hdr”:\n" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" msgstr "" "\n" -"Sekcja tabeli obsługiwania wyjątków [%2zu] \".gcc_except_table\":\n" +"Sekcja tabeli obsługiwania wyjątków [%2zu] „.gcc_except_table”:\n" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr " Kodowanie LPStart: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr " Kodowanie TType: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr " Kodowanie strony wywołania: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" @@ -5869,7 +6143,7 @@ msgstr "" "\n" " Tabela strony wywołania:" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5882,51 +6156,51 @@ msgstr "" " Lądowisko: %#\n" " Działanie: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "nieprawidłowe kodowanie TType" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, c-format msgid "" "\n" "GDB section [%2zu] '%s' at offset %# contains % bytes :\n" msgstr "" "\n" -"Sekcja GDB [%2zu] \"%s\" pod offsetem %# zawiera % bajtów:\n" +"Sekcja GDB [%2zu] „%s” pod offsetem %# zawiera % bajtów:\n" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, c-format msgid " Version: %\n" msgstr " Wersja: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, c-format msgid " CU offset: %#\n" msgstr " offset CU: %#\n" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, c-format msgid " TU offset: %#\n" msgstr " offset TU: %#\n" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, c-format msgid " address offset: %#\n" msgstr " offset adresu: %#\n" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, c-format msgid " symbol offset: %#\n" msgstr " offset symbolu: %#\n" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, c-format msgid " constant offset: %#\n" msgstr " offset stałej: %#\n" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, c-format msgid "" "\n" @@ -5935,7 +6209,7 @@ msgstr "" "\n" " Lista CU pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, c-format msgid "" "\n" @@ -5944,7 +6218,7 @@ msgstr "" "\n" " Lista TU pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, c-format msgid "" "\n" @@ -5953,7 +6227,7 @@ msgstr "" "\n" " Lista adresów pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, c-format msgid "" "\n" @@ -5962,50 +6236,50 @@ msgstr "" "\n" " Tabela symboli pod offsetem %# zawiera %zu gniazd:\n" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "nie można uzyskać deskryptora kontekstu debugowania: %s" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" -msgstr "nie można przekonwertować danych notatki core: %s" +msgstr "nie można konwertować danych notatki core: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" "%*s... ..." msgstr "" "\n" -"%*s... ..." +"%*s… …" -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr " Właściciel Rozmiar danych Typ\n" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "nie można uzyskać zawartości sekcji notatki: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" "Note section [%2zu] '%s' of % bytes at offset %#0:\n" msgstr "" "\n" -"Segment notatki [%2zu] \"%s\" o długości % bajtów pod offsetem " +"Segment notatki [%2zu] „%s” o długości % bajtów pod offsetem " "%#0:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" @@ -6014,50 +6288,71 @@ msgstr "" "\n" "Segment notatki o długości % bajtów pod offsetem %#0:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9501 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Section [%zu] '%s' has no data to dump.\n" msgstr "" "\n" -"Sekcja [%Zu] \"%s\" nie posiada danych do zrzucenia.\n" +"Sekcja [%zu] „%s” nie posiada danych do zrzucenia.\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9518 src/readelf.c:9559 #, c-format -msgid "cannot get data for section [%Zu] '%s': %s" -msgstr "nie można uzyskać danych dla sekcji [%Zu] \"%s\": %s" +msgid "cannot get data for section [%zu] '%s': %s" +msgstr "nie można uzyskać danych dla sekcji [%zu] „%s”: %s" -#: src/readelf.c:9093 +#: src/readelf.c:9523 #, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" "\n" -"Segment zrzutu szesnastkowego [%Zu] \"%s\", % bajtów pod offsetem " +"Segment zrzutu szesnastkowego [%zu] „%s”, % bajtów pod offsetem " "%#0:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9528 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" msgstr "" "\n" -"Sekcja [%Zu] \"%s\" nie posiada ciągów do zrzucenia.\n" +"Zrzut szesnastkowy sekcji [%zu] „%s”, % bajtów (%zd " +"nieskompresowanych) pod offsetem %#0:\n" -#: src/readelf.c:9116 +#: src/readelf.c:9542 #, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" "\n" -"Sekcja ciągów [%Zu] \"%s\" zawiera % bajtów pod offsetem " -"%#0:\n" +"Sekcja [%zu] „%s” nie posiada ciągów do zrzucenia.\n" -#: src/readelf.c:9164 +#: src/readelf.c:9564 +#, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" +msgstr "" +"\n" +"Sekcja ciągów [%zu] „%s” zawiera % bajtów pod offsetem %#0:\n" + +#: src/readelf.c:9569 +#, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" +msgstr "" +"\n" +"Sekcja ciągów [%zu] „%s” zawiera % bajtów (%zd nieskompresowanych) " +"pod offsetem %#0:\n" + +#: src/readelf.c:9618 #, c-format msgid "" "\n" @@ -6066,130 +6361,260 @@ msgstr "" "\n" "sekcja [%lu] nie istnieje" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" "section '%s' does not exist" msgstr "" "\n" -"sekcja \"%s\" nie istnieje" +"sekcja „%s” nie istnieje" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" -msgstr "nie można uzyskać indeksu symboli archiwum \"%s\": %s" +msgstr "nie można uzyskać indeksu symboli archiwum „%s”: %s" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" "Archive '%s' has no symbol index\n" msgstr "" "\n" -"Archiwum \"%s\" nie posiada indeksu symboli\n" +"Archiwum „%s” nie posiada indeksu symboli\n" -#: src/readelf.c:9257 +#: src/readelf.c:9711 #, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" "\n" -"Indeks archiwum \"%s\" posiada %Zu wpisów:\n" +"Indeks archiwum „%s” posiada %zu wpisów:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9729 #, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" -msgstr "nie można wydobyć elementów pod offsetem %Zu w \"%s\": %s" +msgid "cannot extract member at offset %zu in '%s': %s" +msgstr "nie można wydobyć elementów pod offsetem %zu w „%s”: %s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" -msgstr "Element archiwum \"%s\" zawiera:\n" +msgstr "Element archiwum „%s” zawiera:\n" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" msgstr "" -"Używa FORMATU wyjścia. Może to być \"bsd\" lub \"sysv\". Domyślny jest \"bsd" -"\"" +"Używa FORMATU wyjścia. Może to być „bsd” lub „sysv”. Domyślny jest „bsd”" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" -msgstr "To samo, co \"--format=sysv\"" +msgstr "To samo, co „--format=sysv”" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" -msgstr "To samo, co \"--format=bsd\"" +msgstr "To samo, co „--format=bsd”" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" -msgstr "To samo, co \"--radix=10\"" +msgstr "To samo, co „--radix=10”" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" -msgstr "To samo, co \"--radix=8\"" +msgstr "To samo, co „--radix=8”" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" -msgstr "To samo, co \"--radix=16\"" +msgstr "To samo, co „--radix=16”" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" -msgstr "Podobne do wyjścia \"--format=sysv\", ale w jednym wierszu" +msgstr "Podobne do wyjścia „--format=sysv”, ale w jednym wierszu" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "Wyświetla rozmiar i flagi uprawnień dla segmentów wczytywalnych" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "Wyświetla całkowite rozmiary (tylko bsd)" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "Wyświetla listę rozmiarów sekcji PLIKU (domyślnie a.out)." -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "Nieprawidłowy format: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "Nieprawidłowa baza: %s" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "%s: nie rozpoznano formatu pliku" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "(CAŁKOWITE)\n" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "-p PID powinien być dodatnim identyfikatorem procesu." + +#: src/stack.c:494 +#, c-format +msgid "Cannot open core file '%s'" +msgstr "Nie można otworzyć pliku core „%s”" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "-n MAKSYMALNA_LICZBA_RAMEK powinna wynosić 0 lub więcej." + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "-e PLIK_WYKONYWALNY wymaga pliku core podanego za pomocą opcji --core." + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "-1 wymaga identyfikatora wątku podanego za pomocą opcji -p." + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "Tylko jedna z opcji -p PID lub --core PLIK_CORE powinna zostać podana." + +#: src/stack.c:644 +msgid "Show stack of process PID" +msgstr "Wyświetla stos numeru PID procesu" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "Wyświetla stos odnaleziony w PLIKU_CORE" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "(opcjonalnie) PLIK_WYKONYWALNY, który utworzył PLIK_CORE" + +#: src/stack.c:651 +msgid "Output selection options:" +msgstr "Opcje wyboru wyjścia:" + +#: src/stack.c:653 +msgid "Additionally show frame activation" +msgstr "Dodatkowo wyświetla aktywację ramki" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "Dodatkowo próbuje wyszukać nazwy debuginfo DWARF dla adresu ramki" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" +"Dodatkowo wyświetla wstawione ramki używając debuginfo DWARF, jeśli jest " +"dostępne (zakłada opcję -d)" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "Dodatkowo wyświetla informacje o pliku modułu" + +#: src/stack.c:662 +msgid "Additionally show source file information" +msgstr "Dodatkowo wyświetla informacje o pliku źródłowym" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" +"Wyświetla wszystkie dodatkowe informacje (aktywację, nazwę debugowania, " +"wstawki, moduł i źródło)" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "Nie rozwiązuje nazw symboli adresów do funkcji" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "" +"Wyświetla surowe nazwy symboli funkcji, nie próbuje usuwać dekoracji z nazw" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "Wyświetla identyfikator kopii modułu, wczytuje adres i offset pc" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "Wyświetla wyjątek, jeśli jest tylko jeden wątek" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "" +"Wyświetla najwyżej MAKSYMALNĄ_LICZBĘ_KLATEK na wątek (domyślnie 256, 0 " +"oznacza brak ograniczenia)" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "" +"Wyświetla mapę pamięci modułu z identyfikatorem kopii, wykryte pliki elf i " +"debug" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" +"Wyświetla stos dla każdego wątku w procesie lub pliku core.\vProgram kończy " +"działanie z kodem zwrotnym 0, jeśli wszystkie ramki zostały wyświetlone bez " +"żadnych błędów. Jeśli niektóre ramki zostały wyświetlone, ale wystąpiły " +"niekrytyczne błędy, które mogą spowodować niepełny wyjątek, to program " +"kończy działanie z kodem zwrotnym 1. Jeśli żadne ramki nie mogły zostać " +"wyświetlone lub wystąpił krytyczny błąd, to program kończy działanie z kodem " +"zwrotnym 2. Jeśli program został wywołany za pomocą błędnych lub brakujących " +"parametrów, to zakończy on działanie z kodem zwrotnym 64." + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "Nie można wyświetlić żadnych ramek." + +#: src/strings.c:66 msgid "Output Selection:" msgstr "Wybór wyjścia:" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Przeszukuje cały plik, nie tylko wczytane sekcje" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" "Wyświetlane są tylko zakończone NUL sekwencje o MIN-LEN lub więcej znaków" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6197,72 +6622,77 @@ msgstr "" "Wybór rozmiaru i kolejności znaków: s = 7 bitów, S = 8 bitów, {b,l} = 16 " "bitów, {B,L} = 32 bity" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Wyświetla nazwę pliku przed każdym ciągiem." -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Wyświetla położenie ciągu z podstawą odpowiednio 8, 10 lub 16." -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias dla --radix=o" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Wyświetla ciągi znaków drukowalnych w plikach." -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" -msgstr "nieprawidłowa wartość \"%s\" dla parametru %s" +msgstr "nieprawidłowa wartość „%s” dla parametru %s" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "nieprawidłowa minimalna długość dopasowanego rozmiaru ciągu" -#: src/strings.c:596 +#: src/strings.c:600 #, c-format -msgid "lseek64 failed" -msgstr "lseek64 nie powiodło się" +msgid "lseek failed" +msgstr "lseek się nie powiodło" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" -msgstr "ponowne mmap nie powiodło się" +msgstr "ponowne mmap się nie powiodło" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" -msgstr "mprotect nie powiodło się" +msgstr "mprotect się nie powiodło" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "Pomijanie sekcji %zd „%s” dane poza plikiem" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "Umieszcza okrojone wyjście w PLIKU" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "Wydobywa usunięte sekcje do PLIKU" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "Osadza nazwę PLIKU zamiast parametru -f" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "Usuwa wszystkie symbole debugowania" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "Usuwa nagłówki sekcji (niezalecane)" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "Kopiuje czasy modyfikacji/dostępu do wyjścia" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " @@ -6272,473 +6702,494 @@ msgstr "" "usunięte sekcje zostały umieszczone w pliku debugowania (ma znaczenie tylko " "dla plików ET_REL, działanie jest nieodwracalne, wymaga użycia opcji -f)" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "Usuwa sekcję .comment" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "Łagodzi kilka reguł, aby obsłużyć lekko uszkodzone pliki ELF" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "Odrzuca symbole z plików obiektów." -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "Użyto --reloc-debug-sections bez opcji -f" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" -msgstr "Tylko jeden plik wejściowy jest dozwolony z \"-o\" i \"-f\"" +msgstr "Tylko jeden plik wejściowy jest dozwolony z „-o” i „-f”" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "Opcję -f podano dwukrotnie" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "Opcję -F podano dwukrotnie" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "Opcję -o podano dwukrotnie" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "Opcja -R obsługuje tylko sekcję .comment" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" -msgstr "nie można wykonać stat na pliku wejściowym \"%s\"" +msgstr "nie można wykonać stat na pliku wejściowym „%s”" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" -msgstr "podczas otwierania \"%s\"" +msgstr "podczas otwierania „%s”" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: nie można używać -o lub -f podczas okrajania archiwum" -#: src/strip.c:468 +#: src/strip.c:384 +#, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: brak obsługi okrajania archiwum" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "nie można otworzyć zaplecza EBL" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, c-format +msgid "cannot get number of phdrs" +msgstr "nie można uzyskać liczby phdr" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" -msgstr "nie można utworzyć nowego pliku \"%s\": %s" +msgstr "nie można utworzyć nowego pliku „%s”: %s" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" -msgstr "plik \"%s\" posiada błędny format" +msgstr "plik „%s” posiada błędny format" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "podczas tworzenia pliku wyjściowego: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: błąd podczas tworzenia nagłówka ELF: %s" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" -msgstr "podczas przygotowywania wyjścia dla \"%s\"" +msgstr "podczas przygotowywania wyjścia dla „%s”" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "podczas tworzenia sekcji nagłówka sekcji: %s" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "nie można przydzielić danych sekcji: %s" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "podczas tworzenia tabeli ciągów nagłówka sekcji: %s" -#: src/strip.c:1752 +#: src/strip.c:1861 #, c-format msgid "bad relocation" msgstr "błędna relokacja" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" -msgstr "podczas zapisywania \"%s\": %s" +msgstr "podczas zapisywania „%s”: %s" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" -msgstr "podczas tworzenia \"%s\"" +msgstr "podczas tworzenia „%s”" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "podczas obliczania sumy kontrolnej dla informacji debugowania" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: błąd podczas odczytywania pliku: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, c-format msgid "while writing '%s'" -msgstr "podczas zapisywania \"%s\"" +msgstr "podczas zapisywania „%s”" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" -msgstr "błąd podczas kończenia \"%s\": %s" +msgstr "błąd podczas kończenia „%s”: %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" -msgstr "nie można ustawić czasu dostępu i modyfikacji \"%s\"" +msgstr "nie można ustawić czasu dostępu i modyfikacji „%s”" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "Dopasowuje MODUŁY do nazw plików, a nie nazwy modułów" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "Pomija nieodnalezione pliki bez zgłaszania tego" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "Umieszcza wyjście w PLIKU" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "Tworzy wiele plików wyjściowych w KATALOGU" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "Używa nazw modułów zamiast nazw plików" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "" "Tworzy wyjście dla modułów nieposiadających oddzielnych informacji " "debugowania" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "Zastosowuje relokacje do zawartości sekcji w plikach ET_REL" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "Wyświetla tylko nazwy modułów i plików, identyfikatory kopii" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "" +"Wymusza łączenie plików nawet, jeśli niektóre nagłówki ELF się nie zgadzają" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "opcję -d podano dwukrotnie" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "dozwolona jest tylko jedna z opcji -o lub -d" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "opcja -n nie może być używana z jawnymi plikami albo z opcją -o lub -d" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" -msgstr "katalog wyjściowy \"%s\"" +msgstr "katalog wyjściowy „%s”" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "wymagane są dokładnie dwa parametry plików" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "opcje -m, -a, -R oraz -i nie są dozwolone z jawnymi plikami" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "opcja -o lub -d jest wymagana podczas używania ukrytych plików" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "nie można utworzyć nagłówka ELF: %s" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "nie można skopiować nagłówka ELF: %s" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, c-format +msgid "cannot get number of program headers: %s" +msgstr "nie można uzyskać liczby nagłówków programu: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "nie można utworzyć nagłówków programu: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "nie można skopiować nagłówka programu: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "nie można skopiować nagłówka sekcji: %s" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "nie można uzyskać danych sekcji: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "nie można skopiować danych sekcji: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" -msgstr "nie można utworzyć katalogu \"%s\"" +msgstr "nie można utworzyć katalogu „%s”" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "nie można uzyskać wpisu tabeli symboli: %s" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "nie można zaktualizować tabeli symboli: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "nie można zaktualizować nagłówka sekcji: %s" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "nie można zaktualizować relokacji: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "nie można uzyskać wersji symbolu: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" -msgstr "nieoczekiwany typ sekcji w [%Zu] z sh_link do tabeli symboli" +msgid "unexpected section type in [%zu] with sh_link to symtab" +msgstr "nieoczekiwany typ sekcji w [%zu] z sh_link do tabeli symboli" -#: src/unstrip.c:771 +#: src/unstrip.c:809 #, c-format -msgid "invalid string offset in symbol [%Zu]" -msgstr "nieprawidłowy offset ciągu w symbolu [%Zu]" +msgid "invalid string offset in symbol [%zu]" +msgstr "nieprawidłowy offset ciągu w symbolu [%zu]" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:967 src/unstrip.c:1313 #, c-format -msgid "cannot read section [%Zu] name: %s" -msgstr "nie można odczytać nazwy sekcji [%Zu]: %s" +msgid "cannot read section [%zu] name: %s" +msgstr "nie można odczytać nazwy sekcji [%zu]: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" -msgstr "nie można odczytać sekcji \".gnu.prelink_undo\": %s" +msgstr "nie można odczytać sekcji „.gnu.prelink_undo”: %s" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" -msgstr "nieprawidłowa zawartość w sekcji \"%s\"" +msgstr "nieprawidłowa zawartość w sekcji „%s”" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" -msgstr "nie można odnaleźć pasującej sekcji dla [%Zu] \"%s\"" +msgid "overflow with shnum = %zu in '%s' section" +msgstr "przepełnienie z shnum = %zu w sekcji „%s”" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1108 src/unstrip.c:1433 +#, c-format +msgid "cannot find matching section for [%zu] '%s'" +msgstr "nie można odnaleźć pasującej sekcji dla [%zu] „%s”" + +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "nie można nazwy sekcji do tabeli ciągów: %s" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "nie można zaktualizować danych tabeli ciągów nagłówków sekcji: %s" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "nie można uzyskać indeksu sekcji tabeli ciągów nagłówków sekcji: %s" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "nie można uzyskać licznika sekcji: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" -"więcej sekcji w okrojonym pliku niż w pliku debugowania - odwrócono " +"więcej sekcji w okrojonym pliku niż w pliku debugowania — odwrócono " "parametry?" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "nie można odczytać tabeli ciągów nagłówków sekcji: %s" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "nie można dodać nowej sekcji: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1618 #, c-format -msgid "symbol [%Zu] has invalid section index" -msgstr "symbol [%Zu] posiada nieprawidłowy indeks sekcji" +msgid "symbol [%zu] has invalid section index" +msgstr "symbol [%zu] posiada nieprawidłowy indeks sekcji" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, c-format msgid "cannot read section data: %s" msgstr "nie można odczytać danych sekcji: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "nie można uzyskać nagłówka ELF: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "nie można zaktualizować nagłówka programu: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "nie można zapisać pliku wyjściowego: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" "Dane DWARF nie zostały dostosowane do przesunięcia wczesnego konsolidowania; " "proszę rozważyć polecenie prelink -u" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" -"Dane DWARF w \"%s\" nie zostały dostosowane do przesunięcia wczesnego " +"Dane DWARF w „%s” nie zostały dostosowane do przesunięcia wczesnego " "konsolidowania; proszę rozważyć polecenie prelink -u" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "nie można utworzyć deskryptora ELF: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " -msgstr "" +msgstr "OSTRZEÅ»ENIE: " -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" -msgstr "" +msgstr ", należy użyć opcji --force" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" -msgstr "" +msgstr "Różna identyfikacja nagłówka ELF (e_ident)" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" -msgstr "" +msgstr "Różne typy nagłówka ELF (e_type)" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" -msgstr "" +msgstr "Różne typy maszyny nagłówka ELF (e_machine)" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" -msgstr "" +msgstr "okrojony nagłówek programu (e_phnum) jest mniejszy niż nieokrojony" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" -msgstr "nie można odnaleźć okrojonego pliku dla modułu \"%s\": %s" +msgstr "nie można odnaleźć okrojonego pliku dla modułu „%s”: %s" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" -msgstr "nie można otworzyć okrojonego pliku \"%s\" dla modułu \"%s\": %s" +msgstr "nie można otworzyć okrojonego pliku „%s” dla modułu „%s”: %s" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" -msgstr "nie można odnaleźć pliku debugowania dla modułu \"%s\": %s" +msgstr "nie można odnaleźć pliku debugowania dla modułu „%s”: %s" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" -msgstr "nie można otworzyć pliku debugowania \"%s\" dla modułu \"%s\": %s" +msgstr "nie można otworzyć pliku debugowania „%s” dla modułu „%s”: %s" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" -msgstr "moduł \"%s\" pliku \"%s\" nie został okrojony" +msgstr "moduł „%s” pliku „%s” nie został okrojony" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -"nie można utworzyć pamięci podręcznej adresów sekcji dla modułu \"%s\": %s" +"nie można utworzyć pamięci podręcznej adresów sekcji dla modułu „%s”: %s" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "nie odnaleziono pasujących modułów" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "pasuje więcej niż jeden moduł" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" "OKROJONY-PLIK PLIK-DEBUGOWANIA\n" -"[MODUŁ...]" +"[MODUŁ…]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6783,21 +7234,22 @@ msgstr "" "\tPOCZĄTEK+ROZMIAR IDENTYFIKATOR-KOPII PLIK PLIK-DEBUGOWANIA NAZWA-MODUŁU\n" "POCZĄTEK i ROZMIAR są liczbami szesnastkowymi podającymi zakres adresów " "modułu. IDENTYFIKATOR-KOPII jest liczbą szesnastkową dla bitów " -"identyfikatora kopii lub \"-\", jeśli identyfikator jest nieznany; liczba " +"identyfikatora kopii lub „-”, jeśli identyfikator jest nieznany; liczba " "szesnastkowa może być uzupełniona @0xADRES podającym adres, gdzie znajduje " "się identyfikator, jeśli jest to wiadome. PLIK jest nazwą pliku " -"odnalezionego dla modułu lub \"-\", jeśli go nie odnaleziono lub \".\", " -"jeśli obraz ELF jest dostępny, ale nie z żadnego nazwanego pliku. PLIK-" -"DEBUGOWANIA jest nazwą oddzielnego pliku debuginfo lub \"-\", jeśli nie " -"odnaleziono debuginfo lub \".\", jeśli PLIK zawiera informacje debugowania." - -#, fuzzy -#~ msgid "cannot attach to process" -#~ msgstr "nie można utworzyć drzewa wyszukiwania" - -#, fuzzy -#~ msgid "cannot attach to core" -#~ msgstr "nie można utworzyć drzewa wyszukiwania" - -#~ msgid "'%s' and '%s' do not seem to match" -#~ msgstr "\"%s\" i \"%s\" nie zgadzają się" +"odnalezionego dla modułu lub „-”, jeśli go nie odnaleziono lub „.”, jeśli " +"obraz ELF jest dostępny, ale nie z żadnego nazwanego pliku. PLIK-DEBUGOWANIA " +"jest nazwą oddzielnego pliku debuginfo lub „-”, jeśli nie odnaleziono " +"debuginfo lub „.”, jeśli PLIK zawiera informacje debugowania." + +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "Uruchamia plik wykonywalny" + +#: tests/dwflmodtest.c:213 +msgid "Additionally show function names" +msgstr "Dodatkowo wyświetla nazwy funkcji" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "Wyświetla wystąpienia wstawionych funkcji" diff --git a/po/uk.gmo b/po/uk.gmo index f1f4e04..421aa19 100644 Binary files a/po/uk.gmo and b/po/uk.gmo differ diff --git a/po/uk.po b/po/uk.po index 37f4f2b..7e875e2 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2,13 +2,13 @@ # Copyright (C) 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the elfutils package. # -# Yuri Chornoivan , 2010, 2011, 2012, 2013. +# Yuri Chornoivan , 2010, 2011, 2012, 2013, 2014, 2015. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-27 11:26+0200\n" -"PO-Revision-Date: 2013-10-09 17:50+0300\n" +"POT-Creation-Date: 2016-01-11 08:48+0100\n" +"PO-Revision-Date: 2015-09-26 16:41+0300\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "Language: uk\n" @@ -19,8 +19,35 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Lokalize 1.5\n" -#: lib/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3098 -#: src/readelf.c:3447 src/readelf.c:8018 src/unstrip.c:2115 src/unstrip.c:2323 +#: lib/color.c:53 +msgid "" +"colorize the output. WHEN defaults to 'always' or can be 'auto' or 'never'" +msgstr "" +"розфарбовувати виведене. Типові значення «always» (завжди), «auto» (авто) " +"або «never» (ніколи)" + +#: lib/color.c:127 +#, c-format +msgid "" +"%s: invalid argument '%s' for '--color'\n" +"valid arguments are:\n" +" - 'always', 'yes', 'force'\n" +" - 'never', 'no', 'none'\n" +" - 'auto', 'tty', 'if-tty'\n" +msgstr "" +"%s: некоректний аргумент «%s» до «--color»\n" +"коректними аргументами є такі:\n" +" - «always», «yes», «force»\n" +" - «never», «no», «none»\n" +" - «auto», «tty», «if-tty»\n" + +#: lib/color.c:190 src/objdump.c:738 +#, c-format +msgid "cannot allocate memory" +msgstr "не вдалося розподілити пам’ять" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3282 +#: src/readelf.c:3669 src/readelf.c:8416 src/unstrip.c:2233 src/unstrip.c:2438 #, c-format msgid "memory exhausted" msgstr "пам’ять вичерпано" @@ -30,7 +57,7 @@ msgstr "пам’ять вичерпано" msgid "no error" msgstr "без помилок" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "нестача пам'яті" @@ -69,7 +96,7 @@ msgstr "помилка під час спроби виведення даних" msgid "no backend support available" msgstr "підтримки серверів не передбачено" -#: libasm/asm_error.c:84 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "невідома помилка" @@ -95,122 +122,134 @@ msgid "no DWARF information" msgstr "немає відомостей DWARF" #: libdw/dwarf_error.c:65 +msgid "cannot decompress DWARF" +msgstr "не вдалося розпакувати DWARF" + +#: libdw/dwarf_error.c:66 msgid "no ELF file" msgstr "немає файла ELF" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:67 msgid "cannot get ELF header" msgstr "не вдалося отримати заголовок ELF" -#: libdw/dwarf_error.c:68 +#: libdw/dwarf_error.c:69 msgid "not implemented" msgstr "не реалізовано" -#: libdw/dwarf_error.c:69 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 msgid "invalid command" msgstr "некоректна команда" -#: libdw/dwarf_error.c:70 +#: libdw/dwarf_error.c:71 msgid "invalid version" msgstr "некоректна версія" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:72 msgid "invalid file" msgstr "некоректний файл" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:73 msgid "no entries found" msgstr "запис не знайдено" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:74 msgid "invalid DWARF" msgstr "некоректний запис DWARF" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:75 msgid "no string data" msgstr "немає рядкових даних" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:76 msgid "no address value" msgstr "немає значення адреси" -#: libdw/dwarf_error.c:76 +#: libdw/dwarf_error.c:77 msgid "no constant value" msgstr "немає значення сталої" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:78 msgid "no reference value" msgstr "немає значення для порівняння" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:79 msgid "invalid reference value" msgstr "некоректне значення для порівняння" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:80 msgid ".debug_line section missing" msgstr "немає розділу .debug_line" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:81 msgid "invalid .debug_line section" msgstr "некоректний розділ .debug_line" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:82 msgid "debug information too big" msgstr "занадто великі відомості для діагностики" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:83 msgid "invalid DWARF version" msgstr "некоректна версія DWARF" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:84 msgid "invalid directory index" msgstr "некоректний покажчик каталогу" -#: libdw/dwarf_error.c:84 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 msgid "address out of range" msgstr "некоректна адреса" -#: libdw/dwarf_error.c:85 +#: libdw/dwarf_error.c:86 msgid "no location list value" msgstr "немає значення списку адрес" -#: libdw/dwarf_error.c:86 +#: libdw/dwarf_error.c:87 msgid "no block data" msgstr "немає блокових даних" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:88 msgid "invalid line index" msgstr "некоректний номер рядка" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:89 msgid "invalid address range index" msgstr "некоректний індекс діапазону адрес" -#: libdw/dwarf_error.c:89 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 msgid "no matching address range" msgstr "не виявлено відповідного діапазону адрес" -#: libdw/dwarf_error.c:90 +#: libdw/dwarf_error.c:91 msgid "no flag value" msgstr "немає значення прапорця" -#: libdw/dwarf_error.c:91 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 msgid "invalid offset" msgstr "некоректне значення зміщення" -#: libdw/dwarf_error.c:92 +#: libdw/dwarf_error.c:93 msgid ".debug_ranges section missing" msgstr "немає розділу .debug_ranges" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:94 msgid "invalid CFI section" msgstr "некоректний розділ CFI" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:95 msgid "no alternative debug link found" msgstr "альтернативного діагностичного посилання не знайдено" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:96 +msgid "invalid opcode" +msgstr "некоректний код операції" + +#: libdw/dwarf_error.c:97 +msgid "not a CU (unit) DIE" +msgstr "не є DIE CU (модуля)" + +#: libdwfl/argp-std.c:46 src/stack.c:642 src/unstrip.c:2380 msgid "Input selection options:" msgstr "Вибір параметрів виведення даних:" @@ -242,7 +281,7 @@ msgstr "Знайти адреси у запущеному ядрі" msgid "Kernel with all modules" msgstr "Ядро з усіма модулями" -#: libdwfl/argp-std.c:59 +#: libdwfl/argp-std.c:59 src/stack.c:649 msgid "Search path for separate debuginfo files" msgstr "Шукати у вказаному каталозі окремі файли debuginfo" @@ -268,7 +307,12 @@ msgstr "не вдалося виявити ядро або модулі" msgid "cannot read ELF core file: %s" msgstr "не вдалося прочитати файл core ELF: %s" -#: libdwfl/argp-std.c:311 +#: libdwfl/argp-std.c:313 +#, fuzzy +msgid "Not enough memory" +msgstr "нестача пам'яті" + +#: libdwfl/argp-std.c:323 msgid "No modules recognized in core file" msgstr "Не вдалося виявити модулі у файлі core" @@ -370,140 +414,136 @@ msgstr "дані розділу «.gnu.prelink_undo» пошкоджено" #: libdwfl/libdwflP.h:82 msgid "Internal error due to ebl" -msgstr "" +msgstr "Внутрішня помилка через ebl" #: libdwfl/libdwflP.h:83 msgid "Missing data in core file" -msgstr "" +msgstr "У файлі ядра не вистачає даних" #: libdwfl/libdwflP.h:84 -#, fuzzy msgid "Invalid register" -msgstr "некоректний параметр" +msgstr "Некоректний регістр" #: libdwfl/libdwflP.h:85 msgid "Error reading process memory" -msgstr "" +msgstr "Помилка під час спроби читання пам’яті процесу" #: libdwfl/libdwflP.h:86 msgid "Couldn't find architecture of any ELF" -msgstr "" +msgstr "Не вдалося знайти хоч якусь архітектуру ELF" #: libdwfl/libdwflP.h:87 msgid "Error parsing /proc filesystem" -msgstr "" +msgstr "Помилка під час спроби обробки файлової системи /proc" #: libdwfl/libdwflP.h:88 -#, fuzzy msgid "Invalid DWARF" -msgstr "некоректний запис DWARF" +msgstr "Некоректний запис DWARF" #: libdwfl/libdwflP.h:89 msgid "Unsupported DWARF" -msgstr "" +msgstr "Непідтримуваний запис DWARF" #: libdwfl/libdwflP.h:90 msgid "Unable to find more threads" -msgstr "" +msgstr "Не вдалося знайти додаткові потоки" #: libdwfl/libdwflP.h:91 msgid "Dwfl already has attached state" -msgstr "" +msgstr "Dwfl уже перебуває у стані долучення до процесу" #: libdwfl/libdwflP.h:92 msgid "Dwfl has no attached state" -msgstr "" +msgstr "Dwfl не перебуває у стані долучення до процесу" #: libdwfl/libdwflP.h:93 msgid "Unwinding not supported for this architecture" -msgstr "" +msgstr "Для цієї архітектури розгортання не передбачено" #: libdwfl/libdwflP.h:94 -#, fuzzy msgid "Invalid argument" -msgstr "некоректний параметр" +msgstr "Некоректний аргумент" #: libdwfl/libdwflP.h:95 -#, fuzzy msgid "Not an ET_CORE ELF file" -msgstr "не є коректним файлом ELF" +msgstr "Не є файлом ET_CORE ELF" -#: libebl/eblbackendname.c:42 +#: libebl/eblbackendname.c:41 msgid "No backend" msgstr "Немає сервера" -#: libebl/eblcorenotetypename.c:102 libebl/eblobjecttypename.c:57 -#: libebl/eblobjnotetypename.c:73 libebl/eblosabiname.c:77 -#: libebl/eblsectionname.c:89 libebl/eblsectiontypename.c:119 -#: libebl/eblsegmenttypename.c:83 +#: libebl/eblcorenotetypename.c:98 libebl/eblobjecttypename.c:53 +#: libebl/eblobjnotetypename.c:69 libebl/eblosabiname.c:73 +#: libebl/eblsectionname.c:83 libebl/eblsectiontypename.c:115 +#: libebl/eblsegmenttypename.c:79 msgid "" msgstr "<невідомо>" -#: libebl/ebldynamictagname.c:105 +#: libebl/ebldynamictagname.c:101 #, c-format msgid ": %#" msgstr "<невідомо>: %#" -#: libebl/eblobjnote.c:55 +#: libebl/eblobjnote.c:53 #, c-format msgid "unknown SDT version %u\n" msgstr "невідома версія SDT, %u\n" -#: libebl/eblobjnote.c:73 +#: libebl/eblobjnote.c:71 #, c-format msgid "invalid SDT probe descriptor\n" msgstr "некоректний дескриптор зондування SDT\n" -#: libebl/eblobjnote.c:123 +#: libebl/eblobjnote.c:121 #, c-format msgid " PC: " msgstr " PC: " -#: libebl/eblobjnote.c:125 +#: libebl/eblobjnote.c:123 #, c-format msgid " Base: " msgstr "Основа: " -#: libebl/eblobjnote.c:127 +#: libebl/eblobjnote.c:125 #, c-format msgid " Semaphore: " msgstr " Семафор: " -#: libebl/eblobjnote.c:129 +#: libebl/eblobjnote.c:127 #, c-format msgid " Provider: " msgstr " Постачальник: " -#: libebl/eblobjnote.c:131 +#: libebl/eblobjnote.c:129 #, c-format msgid " Name: " msgstr "Назва: " -#: libebl/eblobjnote.c:133 +#: libebl/eblobjnote.c:131 #, c-format msgid " Args: " msgstr " Арг.: " -#: libebl/eblobjnote.c:143 +#: libebl/eblobjnote.c:141 #, c-format msgid " Build ID: " msgstr " Ід. збирання: " -#: libebl/eblobjnote.c:154 +#: libebl/eblobjnote.c:152 #, c-format msgid " Linker version: %.*s\n" msgstr " Версія компонувальника: %.*s\n" -#: libebl/eblobjnote.c:203 +#: libebl/eblobjnote.c:213 #, c-format msgid " OS: %s, ABI: " msgstr " ОС: %s, ABI: " -#: libebl/eblosabiname.c:74 +#: libebl/eblosabiname.c:70 msgid "Stand alone" msgstr "Окремий" -#: libebl/eblsymbolbindingname.c:71 libebl/eblsymboltypename.c:77 +#: libebl/eblsymbolbindingname.c:67 libebl/eblsymboltypename.c:73 #, c-format msgid ": %d" msgstr "<невідомий>: %d" @@ -528,7 +568,7 @@ msgstr "некоректна розмірність вхідного парам msgid "invalid size of destination operand" msgstr "некоректна розмірність вихідного параметра" -#: libelf/elf_error.c:87 src/readelf.c:5190 +#: libelf/elf_error.c:87 src/readelf.c:5473 #, c-format msgid "invalid encoding" msgstr "некоректне кодування" @@ -609,8 +649,8 @@ msgstr "невідповідність полів data/scn" msgid "invalid section header" msgstr "некоректний заголовок розділу" -#: libelf/elf_error.c:187 src/readelf.c:6980 src/readelf.c:7426 -#: src/readelf.c:7527 src/readelf.c:7689 +#: libelf/elf_error.c:187 src/readelf.c:7342 src/readelf.c:7790 +#: src/readelf.c:7891 src/readelf.c:8072 #, c-format msgid "invalid data" msgstr "некоректні дані" @@ -654,40 +694,81 @@ msgstr "" msgid "file has no program header" msgstr "у файлі немає заголовка програми" +#: libelf/elf_error.c:237 +#, fuzzy +msgid "invalid section type" +msgstr "некоректний розділ" + +#: libelf/elf_error.c:242 +#, fuzzy +msgid "invalid section flags" +msgstr "некоректний розділ" + +#: libelf/elf_error.c:247 +#, fuzzy +msgid "section does not contain compressed data" +msgstr "розділ хешу [%2zu] «%s» містить недостатньо даних\n" + +#: libelf/elf_error.c:252 +msgid "section contains compressed data" +msgstr "" + +#: libelf/elf_error.c:257 +#, fuzzy +msgid "unknown compression type" +msgstr "невизначений тип" + +#: libelf/elf_error.c:262 +#, fuzzy +msgid "cannot compress data" +msgstr "не вдалося розпакувати DWARF" + +#: libelf/elf_error.c:267 +#, fuzzy +msgid "cannot decompress data" +msgstr "не вдалося розпакувати DWARF" + #: src/addr2line.c:58 -msgid "Output selection options:" -msgstr "Параметри вибору виведених даних:" +msgid "Input format options:" +msgstr "Параметри форматування вхідних даних:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 +msgid "Treat addresses as offsets relative to NAME section." +msgstr "Вважати адреси зміщеннями відносно розділу НАЗВА." + +#: src/addr2line.c:62 +msgid "Output format options:" +msgstr "Параметри форматування результатів:" + +#: src/addr2line.c:63 +msgid "Print address before each entry" +msgstr "Виводити адресу перед кожним записом" + +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Показувати лише базові назви файлів коду програми" -#: src/addr2line.c:61 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "Показувати абсолютні назви файлів з використанням каталогу збирання" -#: src/addr2line.c:62 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "Показувати також назви функцій" -#: src/addr2line.c:63 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "Показувати також назви символів та розділів" -#: src/addr2line.c:64 -#, fuzzy +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "Показувати також назви символів та розділів" -#: src/addr2line.c:65 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "Показувати також прапорці рядків таблиці" -#: src/addr2line.c:67 -msgid "Treat addresses as offsets relative to NAME section." -msgstr "Вважати адреси зміщеннями відносно розділу НАЗВА." - -#: src/addr2line.c:69 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." @@ -695,24 +776,32 @@ msgstr "" "Показати усі місця у початковому коді, у яких було виявлено вбудоване " "розгортання підпрограм за вказаною адресою." -#: src/addr2line.c:72 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 -#: src/strings.c:75 +#: src/addr2line.c:75 +msgid "Show demangled symbols (ARG is always ignored)" +msgstr "Виводити розшифровані символи (АРГ завжди ігнорується)" + +#: src/addr2line.c:77 +msgid "Print all information on one line, and indent inlines" +msgstr "Вивести усі дані у один рядок і додати відступи до перенесених рядків" + +#: src/addr2line.c:79 src/elfcmp.c:72 src/findtextrel.c:67 src/nm.c:100 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Інше:" -#: src/addr2line.c:81 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "Шукати АДРЕСИ у файлах кодів та даних про рядки (типово, у a.out)." -#: src/addr2line.c:85 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[АДРЕСА...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 -#: src/findtextrel.c:162 src/ld.c:949 src/nm.c:265 src/objdump.c:181 -#: src/ranlib.c:128 src/readelf.c:500 src/size.c:211 src/strings.c:226 -#: src/strip.c:213 src/unstrip.c:233 +#: src/addr2line.c:216 src/ar.c:285 src/elfcmp.c:672 src/elflint.c:235 +#: src/findtextrel.c:162 src/ld.c:943 src/nm.c:262 src/objdump.c:177 +#: src/ranlib.c:124 src/readelf.c:509 src/size.c:207 src/strings.c:230 +#: src/strip.c:218 src/unstrip.c:232 #, c-format msgid "" "Copyright (C) %s Red Hat, Inc.\n" @@ -724,284 +813,299 @@ msgstr "" "початкових кодах. Умовами ліцензування програми НЕ передбачено жодних " "гарантій, зокрема гарантій працездатності або придатності для певної мети.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 -#: src/findtextrel.c:167 src/ld.c:954 src/nm.c:270 src/objdump.c:186 -#: src/ranlib.c:133 src/readelf.c:505 src/size.c:216 src/strings.c:231 -#: src/strip.c:218 src/unstrip.c:238 +#: src/addr2line.c:221 src/ar.c:290 src/elfcmp.c:677 src/elflint.c:240 +#: src/findtextrel.c:167 src/ld.c:948 src/nm.c:267 src/objdump.c:182 +#: src/ranlib.c:129 src/readelf.c:514 src/size.c:212 src/strings.c:235 +#: src/strip.c:223 src/unstrip.c:237 #, c-format msgid "Written by %s.\n" msgstr "Автор — %s.\n" -#: src/addr2line.c:474 +#: src/addr2line.c:533 #, c-format msgid "Section syntax requires exactly one module" msgstr "Синтаксис розділів вимагає точного одного модуля" -#: src/addr2line.c:497 +#: src/addr2line.c:556 #, c-format msgid "offset %# lies outside section '%s'" msgstr "зміщення %# розташовано поза межами розділу «%s»" -#: src/addr2line.c:563 +#: src/addr2line.c:645 #, c-format msgid "cannot find symbol '%s'" msgstr "не вдалося знайти символ «%s»" -#: src/addr2line.c:568 +#: src/addr2line.c:650 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "зміщення %# розташовано поза межами вмісту «%s»" -#: src/ar.c:69 +#: src/ar.c:68 msgid "Commands:" msgstr "Команди:" -#: src/ar.c:70 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Вилучити файли з архіву." -#: src/ar.c:71 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Пересунути файли до архіву." -#: src/ar.c:72 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Надрукувати список файлів у архіві." -#: src/ar.c:73 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Швидко додати файли до архіву." -#: src/ar.c:75 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Замінити поточний або вставити новий файл до архіву." -#: src/ar.c:76 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Показати вміст архіву." -#: src/ar.c:77 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Видобути файли з архіву." -#: src/ar.c:79 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Модифікатори команд:" -#: src/ar.c:80 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Зберігати початкові часові мітки." -#: src/ar.c:81 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Використовувати екземпляр [НОМЕР] назви." -#: src/ar.c:83 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Не замінювати поточні файли видобутими." -#: src/ar.c:84 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Уможливити, за потреби, обрізання назв файлів." -#: src/ar.c:86 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Докладний вивід даних." -#: src/ar.c:87 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Примусове повторне створення таблиці символів." -#: src/ar.c:88 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Вставити файл після [ЕЛЕМЕНТ]." -#: src/ar.c:89 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Вставити файл перед [ЕЛЕМЕНТ]." -#: src/ar.c:90 +#: src/ar.c:89 msgid "Same as -b." msgstr "Те саме, що і -b." -#: src/ar.c:91 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Придушити повідомлення, якщо має бути створено бібліотеку." -#: src/ar.c:93 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Використовувати для порівняння повний шлях до файла." -#: src/ar.c:94 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Оновлювати у архіві лише старіші файли." -#: src/ar.c:100 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Створення, зміна архівів і видобування даних з архівів." -#: src/ar.c:103 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[ЕЛЕМЕНТ] [НОМЕР] АРХІВ [ФАЙЛ...]" -#: src/ar.c:185 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "" "модифікатори «a», «b» і «i» можна використовувати лише разом з параметрами " "«m» і «r»" -#: src/ar.c:190 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "" "Для модифікаторів «a», «b» та «i» слід використовувати параметр ЕЛЕМЕНТ" -#: src/ar.c:206 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "«N» має значення лише разом з параметрами «x» і «d»" -#: src/ar.c:211 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "потрібен параметр НОМЕР" -#: src/ar.c:223 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "некоректний параметр НОМЕР %s" -#: src/ar.c:230 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "«%c» має сенс лише у разі використання параметра «x»" -#: src/ar.c:236 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "слід вказати назву архіву" -#: src/ar.c:249 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "має бути вказано параметр команди" -#: src/ar.c:314 +#: src/ar.c:310 #, c-format msgid "More than one operation specified" msgstr "Вказано більше за одну дію" -#: src/ar.c:408 +#: src/ar.c:404 #, c-format msgid "cannot open archive '%s'" msgstr "не вдалося відкрити архів «%s»" -#: src/ar.c:418 +#: src/ar.c:414 #, c-format msgid "cannot open archive '%s': %s" msgstr "не вдалося відкрити архів «%s»: %s" -#: src/ar.c:422 +#: src/ar.c:418 #, c-format msgid "%s: not an archive file" msgstr "%s: не є файлом архіву" -#: src/ar.c:426 +#: src/ar.c:422 #, c-format msgid "cannot stat archive '%s'" msgstr "не вдалося отримати дані архіву «%s» за допомогою stat" -#: src/ar.c:438 +#: src/ar.c:434 #, c-format msgid "no entry %s in archive\n" msgstr "у архіві немає запису %s\n" -#: src/ar.c:491 src/ar.c:933 src/ar.c:1133 +#: src/ar.c:487 src/ar.c:929 src/ar.c:1129 #, c-format msgid "cannot create hash table" msgstr "не вдалося створити таблицю хешів" -#: src/ar.c:498 src/ar.c:940 src/ar.c:1142 +#: src/ar.c:494 src/ar.c:936 src/ar.c:1138 #, c-format msgid "cannot insert into hash table" msgstr "не вдалося вставити запис до таблиці хешів" -#: src/ar.c:506 src/ranlib.c:168 +#: src/ar.c:502 src/ranlib.c:164 #, c-format msgid "cannot stat '%s'" msgstr "не вдалося отримати дані з «%s» за допомогою stat" -#: src/ar.c:602 +#: src/ar.c:598 #, c-format msgid "cannot read content of %s: %s" msgstr "не вдалося прочитати вміст з %s: %s" -#: src/ar.c:645 +#: src/ar.c:641 #, c-format msgid "cannot open %.*s" msgstr "не вдалося відкрити %.*s" -#: src/ar.c:667 +#: src/ar.c:663 #, c-format msgid "failed to write %s" msgstr "не вдалося записати %s" -#: src/ar.c:679 +#: src/ar.c:675 #, c-format msgid "cannot change mode of %s" msgstr "не вдалося змінити права доступу до %s" -#: src/ar.c:695 +#: src/ar.c:691 #, c-format msgid "cannot change modification time of %s" msgstr "не вдалося змінити часову мітку зміни %s" -#: src/ar.c:741 +#: src/ar.c:737 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "не вдалося перейменувати файл тимчасових даних на %.*s" -#: src/ar.c:777 src/ar.c:1025 src/ar.c:1424 src/ranlib.c:242 +#: src/ar.c:773 src/ar.c:1021 src/ar.c:1420 src/ranlib.c:238 #, c-format msgid "cannot create new file" msgstr "не вдалося створити файл" -#: src/ar.c:1224 +#: src/ar.c:1220 #, c-format msgid "position member %s not found" msgstr "не виявлено елемента позиції %s" -#: src/ar.c:1234 +#: src/ar.c:1230 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: у архіві немає запису %s!\n" -#: src/ar.c:1263 src/ldgeneric.c:509 src/objdump.c:257 +#: src/ar.c:1259 src/ldgeneric.c:509 src/objdump.c:253 #, c-format msgid "cannot open %s" msgstr "не вдалося відкрити %s" -#: src/ar.c:1268 +#: src/ar.c:1264 #, c-format msgid "cannot stat %s" msgstr "не вдалося отримати дані %s за допомогою stat" -#: src/ar.c:1274 +#: src/ar.c:1270 #, c-format msgid "%s is no regular file" msgstr "%s не є звичайним файлом" -#: src/ar.c:1287 +#: src/ar.c:1283 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "не вдалося отримати дескриптор ELF для %s: %s\n" -#: src/ar.c:1307 +#: src/ar.c:1303 #, c-format msgid "cannot read %s: %s" msgstr "не вдалося прочитати %s: %s" +#: src/arlib-argp.c:32 +msgid "Use zero for uid, gid, and date in archive members." +msgstr "" +"Використовувати нульове значення для uid, gid, та дати у елементах архіву." + +#: src/arlib-argp.c:34 +msgid "Use actual uid, gid, and date in archive members." +msgstr "" +"Використовувати поточні значення для uid, gid, та дати у елементах архіву." + +#: src/arlib-argp.c:65 +#, c-format +msgid "%s (default)" +msgstr "%s (типово)" + #: src/arlib.c:209 #, c-format msgid "the archive '%s' is too large" @@ -1083,140 +1187,145 @@ msgstr "" msgid "%s %s diff: program header count" msgstr "%s %s diff: кількість заголовків програми" -#: src/elfcmp.c:292 +#: src/elfcmp.c:293 #, c-format msgid "%s %s differ: section [%zu], [%zu] name" msgstr "%s %s diff: розділ [%zu], назва [%zu]" -#: src/elfcmp.c:315 +#: src/elfcmp.c:316 #, c-format msgid "%s %s differ: section [%zu] '%s' header" msgstr "%s %s diff: розділ [%zu] заголовок «%s»" -#: src/elfcmp.c:323 src/elfcmp.c:329 +#: src/elfcmp.c:324 src/elfcmp.c:330 #, c-format msgid "cannot get content of section %zu in '%s': %s" msgstr "не вдалося отримати вміст розділу %zu у «%s»: %s" -#: src/elfcmp.c:345 src/elfcmp.c:351 +#: src/elfcmp.c:339 +#, c-format +msgid "symbol table [%zu] in '%s' has zero sh_entsize" +msgstr "таблиця символів [%zu] у «%s» містить нульове значення sh_entsize" + +#: src/elfcmp.c:351 src/elfcmp.c:357 #, c-format msgid "cannot get symbol in '%s': %s" msgstr "не вдалося отримати символ у «%s»: %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:379 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "%s %s diff: таблиця символів [%zu]" -#: src/elfcmp.c:375 +#: src/elfcmp.c:382 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s diff: таблиця символів [%zu,%zu]" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:428 src/elfcmp.c:497 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "%s %s diff: розділ [%zu] кількість нотаток «%s»" -#: src/elfcmp.c:429 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "не вдалося прочитати розділ нотаток [%zu] «%s» у «%s»: %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:446 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s diff: розділ [%zu] назва нотатки «%s»" -#: src/elfcmp.c:447 +#: src/elfcmp.c:454 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "%s %s diff: розділ [%zu] нотатка «%s» тип «%s»" -#: src/elfcmp.c:462 +#: src/elfcmp.c:469 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s diff: довжина ідентифікатора збирання" -#: src/elfcmp.c:470 +#: src/elfcmp.c:477 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s diff: вміст ідентифікатора збирання" -#: src/elfcmp.c:479 +#: src/elfcmp.c:486 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "%s %s diff: розділ [%zu] нотатка «%s» вміст «%s»" -#: src/elfcmp.c:519 +#: src/elfcmp.c:527 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s diff: розділ [%zu] «%s», вміст" -#: src/elfcmp.c:523 +#: src/elfcmp.c:531 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s diff: розділ [%zu,%zu] «%s», вміст" -#: src/elfcmp.c:538 +#: src/elfcmp.c:546 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s diff: невідповідність об’ємів важливих розділів" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:579 src/elfcmp.c:584 #, c-format msgid "cannot load data of '%s': %s" msgstr "не вдалося завантажити дані «%s»: %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:603 src/elfcmp.c:609 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "не вдалося отримати запис заголовка програми %d «%s»: %s" -#: src/elfcmp.c:607 +#: src/elfcmp.c:615 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s diff: заголовок програми %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:639 #, c-format msgid "%s %s differ: gap" msgstr "%s %s diff: проміжок" -#: src/elfcmp.c:694 +#: src/elfcmp.c:704 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Некоректне значення «%s» параметра --gaps." -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 -#: src/ldgeneric.c:4247 src/nm.c:381 src/ranlib.c:161 src/size.c:293 -#: src/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1911 -#: src/unstrip.c:1940 +#: src/elfcmp.c:732 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/ldgeneric.c:4247 src/nm.c:378 src/ranlib.c:157 src/size.c:289 +#: src/strings.c:186 src/strip.c:466 src/strip.c:503 src/unstrip.c:2029 +#: src/unstrip.c:2058 #, c-format msgid "cannot open '%s'" msgstr "не вдалося відкрити «%s»" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:736 src/findtextrel.c:228 src/ranlib.c:174 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "не вдалося створити дескриптор ELF для «%s»: %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:741 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "не вдалося створити дескриптор EBL для «%s»" -#: src/elfcmp.c:749 +#: src/elfcmp.c:759 src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "не вдалося отримати заголовок розділу %zu: %s" -#: src/elfcmp.c:759 +#: src/elfcmp.c:769 #, c-format msgid "cannot get content of section %zu: %s" msgstr "не вдалося отримати вміст розділу %zu: %s" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:779 src/elfcmp.c:793 #, c-format msgid "cannot get relocation: %s" msgstr "не вдалося отримати пересування: %s" @@ -1246,11 +1355,11 @@ msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" "Педантична перевірка файлів ELF на сумісність зі специфікаціями gABI/psABI." -#: src/elflint.c:78 src/readelf.c:123 +#: src/elflint.c:78 src/readelf.c:126 msgid "FILE..." msgstr "ФАЙЛ..." -#: src/elflint.c:155 src/readelf.c:292 +#: src/elflint.c:155 src/readelf.c:298 #, c-format msgid "cannot open input file" msgstr "не вдалося відкрити вхідний файл." @@ -1269,7 +1378,7 @@ msgstr "помилка під час спроби закриття дескри msgid "No errors" msgstr "Без помилок" -#: src/elflint.c:219 src/readelf.c:468 +#: src/elflint.c:219 src/readelf.c:474 msgid "Missing file name.\n" msgstr "Не вказано назви файла.\n" @@ -1400,7 +1509,7 @@ msgstr "некоректний розмір заголовка розділу: % msgid "invalid section header position or size\n" msgstr "некоректне розташування або розмір заголовка розділу\n" -#: src/elflint.c:570 +#: src/elflint.c:571 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1409,7 +1518,7 @@ msgstr "" "розділ [%2d] «%s»: розділ з встановленим прапорцем SHF_GROUP не є частиною " "групи розділів\n" -#: src/elflint.c:574 +#: src/elflint.c:575 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1417,14 +1526,14 @@ msgstr "" "розділ [%2d] «%s»: групу розділів [%2zu] «%s» мало бути визначено до розділу-" "елемента цієї групи\n" -#: src/elflint.c:590 src/elflint.c:1457 src/elflint.c:1508 src/elflint.c:1614 -#: src/elflint.c:1939 src/elflint.c:2228 src/elflint.c:2742 src/elflint.c:2904 -#: src/elflint.c:3034 src/elflint.c:3206 src/elflint.c:4108 +#: src/elflint.c:591 src/elflint.c:1475 src/elflint.c:1526 src/elflint.c:1632 +#: src/elflint.c:1968 src/elflint.c:2284 src/elflint.c:2898 src/elflint.c:3061 +#: src/elflint.c:3209 src/elflint.c:3399 src/elflint.c:4366 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "розділ [%2d] «%s»: не вдалося отримати дані розділу\n" -#: src/elflint.c:603 src/elflint.c:1621 +#: src/elflint.c:604 src/elflint.c:1639 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1433,7 +1542,7 @@ msgstr "" "розділ [%2d] «%s»: надано посилання на таблицю рядків розділу [%2d] «%s», " "але типом даних не є SHT_STRTAB\n" -#: src/elflint.c:626 +#: src/elflint.c:627 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1442,38 +1551,38 @@ msgstr "" "розділ [%2d] «%s»: у таблиці символів не може бути більше одного розширеного " "розділу покажчика\n" -#: src/elflint.c:638 +#: src/elflint.c:639 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "розділ [%2u] «%s»: розмірність запису не відповідає ElfXX_Sym\n" -#: src/elflint.c:647 +#: src/elflint.c:648 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати символ %d: %s\n" -#: src/elflint.c:652 src/elflint.c:655 src/elflint.c:658 src/elflint.c:661 -#: src/elflint.c:664 src/elflint.c:667 +#: src/elflint.c:653 src/elflint.c:656 src/elflint.c:659 src/elflint.c:662 +#: src/elflint.c:665 src/elflint.c:668 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "розділ [%2d] «%s»: «%s» у нульовому записі не є нулем\n" -#: src/elflint.c:670 +#: src/elflint.c:671 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "розділ [%2d] «%s»: XINDEX для нульового запису не є нулем\n" -#: src/elflint.c:680 +#: src/elflint.c:681 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати символ %zu: %s\n" -#: src/elflint.c:689 +#: src/elflint.c:690 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "розділ [%2d] «%s»: символ %zu: некоректне значення назви\n" -#: src/elflint.c:704 +#: src/elflint.c:705 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1482,7 +1591,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: занадто великий покажчик розділу за умови, що " "не визначено розділу розширеного покажчика розділів\n" -#: src/elflint.c:710 +#: src/elflint.c:711 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1491,29 +1600,29 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: XINDEX використано для індексування, яке не " "відповідає st_shndx (%)\n" -#: src/elflint.c:722 +#: src/elflint.c:723 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "розділ [%2d] «%s»: символ %zu: некоректний індекс розділу\n" -#: src/elflint.c:730 +#: src/elflint.c:731 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "розділ [%2d] «%s»: символ %zu: невідомий тип\n" -#: src/elflint.c:736 +#: src/elflint.c:737 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "розділ [%2d] «%s»: символ %zu: невідома прив’язка символу\n" -#: src/elflint.c:741 +#: src/elflint.c:742 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" "розділ [%2d] «%s»: символ %zu: унікальний символ, що не належить до типу " "об’єктів\n" -#: src/elflint.c:749 +#: src/elflint.c:750 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1521,14 +1630,14 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: COMMON можна використовувати лише у файлах, " "придатних до пересування\n" -#: src/elflint.c:753 +#: src/elflint.c:754 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" "розділ [%2d] «%s»: символ %zu: використання локальних символів COMMON " "позбавлене сенсу\n" -#: src/elflint.c:757 +#: src/elflint.c:758 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" @@ -1536,13 +1645,13 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: використання функції у розділі COMMON " "позбавлене сенсу\n" -#: src/elflint.c:804 +#: src/elflint.c:809 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "" "розділ [%2d] «%s»: символ %zu: значення st_value поза можливим діапазоном\n" -#: src/elflint.c:810 src/elflint.c:835 src/elflint.c:878 +#: src/elflint.c:815 src/elflint.c:840 src/elflint.c:889 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1551,7 +1660,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu не повністю відповідає розділу, на який " "посилається, [%2d] «%s»\n" -#: src/elflint.c:819 +#: src/elflint.c:824 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1560,7 +1669,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: для розділу посилання [%2d] «%s» не " "встановлено прапорець SHF_TLS\n" -#: src/elflint.c:829 src/elflint.c:871 +#: src/elflint.c:834 src/elflint.c:882 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1569,14 +1678,23 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: значення st_value поза межами розділу " "посилання, [%2d] «%s»\n" -#: src/elflint.c:856 +#: src/elflint.c:861 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" "розділ [%2d] «%s»: символ %zu: символ TLS без запису заголовка програми TLS\n" -#: src/elflint.c:864 +#: src/elflint.c:867 +#, c-format +msgid "" +"section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " +"header entry\n" +msgstr "" +"розділ [%2d] «%s»: символ %zu: маємо символ TLS, але не вдалося отримати " +"запис заголовка програми TLS\n" + +#: src/elflint.c:875 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1585,7 +1703,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: значення st_value перед розділом посилання, " "[%2d] «%s»\n" -#: src/elflint.c:891 +#: src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1594,7 +1712,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: у sh_info описано локальний символ поза " "діапазоном\n" -#: src/elflint.c:898 +#: src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1603,12 +1721,12 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: у sh_info описано нелокальний символ поза " "діапазоном\n" -#: src/elflint.c:905 +#: src/elflint.c:916 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "розділ [%2d] «%s»: символ %zu: нелокальний символ розділу\n" -#: src/elflint.c:955 +#: src/elflint.c:966 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1617,7 +1735,7 @@ msgstr "" "розділ [%2d] «%s»: символ _GLOBAL_OFFSET_TABLE_ посилається на помилковий " "розділ, [%2d]\n" -#: src/elflint.c:962 +#: src/elflint.c:973 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1626,7 +1744,7 @@ msgstr "" "розділ [%2d] «%s»: символ _GLOBAL_OFFSET_TABLE_ посилається на розділ [%2d] " "'%s'\n" -#: src/elflint.c:978 +#: src/elflint.c:989 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1635,7 +1753,7 @@ msgstr "" "розділ [%2d] «%s»: значення символу _GLOBAL_OFFSET_TABLE_ %# не " "відповідає адресі розділу %s %#\n" -#: src/elflint.c:985 +#: src/elflint.c:996 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1644,7 +1762,7 @@ msgstr "" "розділ [%2d] «%s»: розмір символу _GLOBAL_OFFSET_TABLE_ % не " "відповідає розміру розділу %s %\n" -#: src/elflint.c:993 +#: src/elflint.c:1004 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1653,7 +1771,7 @@ msgstr "" "розділ [%2d] «%s»: виявлено символ _GLOBAL_OFFSET_TABLE_, але не виявлено " "розділу .got\n" -#: src/elflint.c:1009 +#: src/elflint.c:1020 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1662,7 +1780,7 @@ msgstr "" "розділ [%2d] «%s»: значення символу _DYNAMIC_ %# не відповідає " "адресі динамічного сегмента %#\n" -#: src/elflint.c:1016 +#: src/elflint.c:1027 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1671,7 +1789,7 @@ msgstr "" "розділ [%2d] «%s»: розмір символу _DYNAMIC % не відповідає розміру " "динамічного сегмента %\n" -#: src/elflint.c:1029 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1680,24 +1798,29 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: символ у динамічній таблиці символів з " "нетиповою видимістю\n" -#: src/elflint.c:1033 +#: src/elflint.c:1044 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "розділ [%2d] «%s»: символ %zu: невідомий набір бітів у st_other\n" #: src/elflint.c:1082 #, c-format +msgid "section [%2d] '%s': cannot get section data.\n" +msgstr "розділ [%2d] «%s»: не вдалося отримати дані розділу.\n" + +#: src/elflint.c:1098 +#, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "розділ [%2d] «%s»: для цього розділу RELA використано DT_RELCOUNT\n" -#: src/elflint.c:1093 src/elflint.c:1145 +#: src/elflint.c:1109 src/elflint.c:1162 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" "розділ [%2d] «%s»: значення DT_RELCOUNT %d є занадто високим для цього " "розділу\n" -#: src/elflint.c:1118 src/elflint.c:1170 +#: src/elflint.c:1134 src/elflint.c:1187 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1706,7 +1829,7 @@ msgstr "" "розділ [%2d] «%s»: відносні пересування після позиції %d, вказаної за " "допомогою DT_RELCOUNT\n" -#: src/elflint.c:1124 src/elflint.c:1176 +#: src/elflint.c:1140 src/elflint.c:1193 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1715,51 +1838,52 @@ msgstr "" "розділ [%2d] «%s»: безвідносне пересування на позиції %zu; DT_RELCOUNT " "визначено %d відносних пересування\n" -#: src/elflint.c:1136 +#: src/elflint.c:1152 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "розділ [%2d] «%s»: для цього розділу REL використано DT_RELACOUNT\n" -#: src/elflint.c:1218 +#: src/elflint.c:1235 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "розділ [%2d] «%s»: некоректний індекс розділу призначення\n" -#: src/elflint.c:1230 +#: src/elflint.c:1247 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "розділ [%2d] «%s»: некоректний тип розділу призначення\n" -#: src/elflint.c:1238 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "розділ [%2d] «%s»: sh_info має бути нульовим\n" -#: src/elflint.c:1245 -#, c-format -msgid "section [%2d] '%s': no relocations for merge-able sections possible\n" +#: src/elflint.c:1263 +#, fuzzy, c-format +msgid "" +"section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "розділ [%2d] «%s»: пересування у придатних до об’єднання розділах неможливе\n" -#: src/elflint.c:1253 +#: src/elflint.c:1271 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" "розділ [%2d] «%s»: розмірність запису розділу не відповідає ElfXX_Rela\n" -#: src/elflint.c:1313 +#: src/elflint.c:1331 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" "встановлено прапорець пересування тексту, але сегмент придатний лише до " "читання\n" -#: src/elflint.c:1340 +#: src/elflint.c:1358 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "розділ [%2d] «%s»: пересування %zu: некоректний тип\n" -#: src/elflint.c:1348 +#: src/elflint.c:1366 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1768,12 +1892,12 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: некоректний тип пересування для типу " "файла\n" -#: src/elflint.c:1356 +#: src/elflint.c:1374 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "розділ [%2d] «%s»: пересування %zu: некоректний індекс символу\n" -#: src/elflint.c:1374 +#: src/elflint.c:1392 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1782,12 +1906,12 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: з %s можна використовувати лише символ " "«_GLOBAL_OFFSET_TABLE_»\n" -#: src/elflint.c:1391 +#: src/elflint.c:1409 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "розділ [%2d] «%s»: пересування %zu: зміщення за межі діапазону\n" -#: src/elflint.c:1406 +#: src/elflint.c:1424 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1796,7 +1920,7 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: пересування копіювання для символу типу " "%s\n" -#: src/elflint.c:1427 +#: src/elflint.c:1445 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1805,61 +1929,70 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: змінено придатний лише для читання " "розділ, але не встановлено прапорець пересування тексту\n" -#: src/elflint.c:1442 +#: src/elflint.c:1460 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "розділ [%2d] «%s»: пересування завантажених і незавантажених даних\n" -#: src/elflint.c:1482 src/elflint.c:1533 +#: src/elflint.c:1500 src/elflint.c:1551 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати зміщення %zu: %s\n" -#: src/elflint.c:1609 +#: src/elflint.c:1627 #, c-format msgid "more than one dynamic section present\n" msgstr "вказано більше одного динамічного розділу\n" -#: src/elflint.c:1628 +#: src/elflint.c:1645 +#, c-format +msgid "" +"section [%2d]: referenced as string table for section [%2d] '%s' but section " +"link value is invalid\n" +msgstr "" +"розділ [%2d]: надано посилання на таблицю рядків розділу [%2d] «%s», але " +"значення посилання на розділ є некоректним\n" + +#: src/elflint.c:1653 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" "розділ [%2d] «%s»: розмірність запису розділу не відповідає ElfXX_Dyn\n" -#: src/elflint.c:1633 src/elflint.c:1918 +#: src/elflint.c:1658 src/elflint.c:1947 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "розділ [%2d] «%s»: sh_info не є нульовим\n" -#: src/elflint.c:1643 +#: src/elflint.c:1668 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" "розділ [%2d] «%s»: не вдалося отримати запис динамічного розділу %zu: %s\n" -#: src/elflint.c:1651 +#: src/elflint.c:1676 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" "розділ [%2d] «%s»: за записом DT_NULL вказано записи, що не належать до " "DT_NULL\n" -#: src/elflint.c:1658 +#: src/elflint.c:1683 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "розділ [%2d] «%s»: запис %zu: невідома мітка\n" -#: src/elflint.c:1669 +#: src/elflint.c:1694 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "розділ [%2d] «%s»: запис %zu: декілька записів з міткою %s\n" -#: src/elflint.c:1679 +#: src/elflint.c:1704 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "розділ [%2d] «%s»: запис %zu: використано мітку рівня 2 %s\n" -#: src/elflint.c:1697 +#: src/elflint.c:1722 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" @@ -1867,7 +2000,7 @@ msgstr "" "розділ [%2d] «%s»: запис %zu: значенням DT_PLTREL має бути DT_REL або " "DT_RELA\n" -#: src/elflint.c:1710 +#: src/elflint.c:1735 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -1876,7 +2009,7 @@ msgstr "" "розділ [%2d] «%s»: розділ %zu: вказівник не відповідає адресі розділу [%2d] " "«%s», на яку посилається sh_link\n" -#: src/elflint.c:1753 +#: src/elflint.c:1778 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" @@ -1884,7 +2017,7 @@ msgstr "" "розділ [%2d] «%s»: запис %zu: значення %s має вказувати на завантажений " "сегмент\n" -#: src/elflint.c:1768 +#: src/elflint.c:1793 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -1893,48 +2026,48 @@ msgstr "" "розділ [%2d] «%s»: запис %zu: значенням %s має бути коректне зміщення у " "розділі [%2d] «%s»\n" -#: src/elflint.c:1788 src/elflint.c:1816 +#: src/elflint.c:1813 src/elflint.c:1841 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "розділ [%2d] «%s»: містить запис %s, але не %s\n" -#: src/elflint.c:1800 +#: src/elflint.c:1825 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "розділ [%2d] «%s»: немає обов’язкової мітки %s\n" -#: src/elflint.c:1809 +#: src/elflint.c:1834 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "розділ [%2d] «%s»: не виявлено розділу хешів\n" -#: src/elflint.c:1824 src/elflint.c:1831 +#: src/elflint.c:1849 src/elflint.c:1856 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "розділ [%2d] «%s»: вказано не всі зі значень %s, %s і %s\n" -#: src/elflint.c:1841 src/elflint.c:1845 +#: src/elflint.c:1866 src/elflint.c:1870 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" "розділ [%2d] «%s»: у DSO, позначеному на кроці попереднього компонування, " "немає мітки %s\n" -#: src/elflint.c:1851 +#: src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" "розділ [%2d] «%s»: під час попереднього компонування як залежність позначено " "файл, який не є файлом DSO\n" -#: src/elflint.c:1862 src/elflint.c:1866 src/elflint.c:1870 src/elflint.c:1874 +#: src/elflint.c:1887 src/elflint.c:1891 src/elflint.c:1895 src/elflint.c:1899 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" "розділ [%2d] «%s»: у попередньо скомпонованому виконуваному файлі не " "міститься мітки %s\n" -#: src/elflint.c:1886 +#: src/elflint.c:1911 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" @@ -1942,7 +2075,7 @@ msgstr "" "розділ [%2d] «%s»: розширений розділ покажчика можуть мати лише файли, " "придатні до пересування\n" -#: src/elflint.c:1896 +#: src/elflint.c:1921 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" @@ -1950,23 +2083,29 @@ msgstr "" "розділ [%2d] «%s»: розділ розширеного покажчика розділів не призначено для " "таблиць символів\n" -#: src/elflint.c:1901 +#: src/elflint.c:1925 +#, c-format +msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" +msgstr "" +"розділ [%2d] «%s»: індекс розширеного розділу sh_link [%2d] є некоректним\n" + +#: src/elflint.c:1930 #, c-format msgid "cannot get data for symbol section\n" msgstr "не вдалося отримати дані для розділу символів\n" -#: src/elflint.c:1904 +#: src/elflint.c:1933 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "розділ [%2d] «%s»: розмірність запису не відповідає Elf32_Word\n" -#: src/elflint.c:1913 +#: src/elflint.c:1942 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" "розділ [%2d] «%s»: розширена таблиця покажчика замала для таблиці символів\n" -#: src/elflint.c:1928 +#: src/elflint.c:1957 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -1975,24 +2114,24 @@ msgstr "" "розділ [%2d] «%s»: розширений покажчик розділів у розділі [%2zu] «%s» " "посилається на ту саму таблицю розділів\n" -#: src/elflint.c:1945 +#: src/elflint.c:1974 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "символу 0 має відповідати нульовий індекс розширеного розділу\n" -#: src/elflint.c:1957 +#: src/elflint.c:1986 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "не вдалося отримати дані для символу %zu\n" -#: src/elflint.c:1962 +#: src/elflint.c:1991 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" "індекс розширеного розділу дорівнює %, але індекс символу не є " "XINDEX\n" -#: src/elflint.c:1978 src/elflint.c:2029 +#: src/elflint.c:2007 src/elflint.c:2058 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" @@ -2000,51 +2139,57 @@ msgstr "" "розділ [%2d] «%s»: розділ таблиці хешів занадто малий (розмір %ld, мало бути " "— %ld)\n" -#: src/elflint.c:1990 src/elflint.c:2041 +#: src/elflint.c:2019 src/elflint.c:2070 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "розділ [%2d] «%s»: масив ланцюжка занадто великий\n" -#: src/elflint.c:2004 src/elflint.c:2055 +#: src/elflint.c:2033 src/elflint.c:2084 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" "розділ [%2d] «%s»: посилання на хеш блоку %zu лежить поза межами діапазону\n" -#: src/elflint.c:2014 +#: src/elflint.c:2043 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" "розділ [%2d] «%s»: посилання ланцюжка хешів %zu лежить поза межами " "діапазону\n" -#: src/elflint.c:2065 +#: src/elflint.c:2094 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" "розділ [%2d] «%s»: посилання ланцюжка хешів % лежить поза межами " "діапазону\n" -#: src/elflint.c:2081 +#: src/elflint.c:2107 #, c-format -msgid "section [%2d] '%s': bitmask size not power of 2: %u\n" -msgstr "розділ [%2d] «%s»: розмір бітової маски не є степенем 2: %u\n" +msgid "section [%2d] '%s': not enough data\n" +msgstr "розділ [%2d] «%s»: недостатньо даних\n" -#: src/elflint.c:2092 -#, fuzzy, c-format +#: src/elflint.c:2119 +#, c-format +msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" +msgstr "" +"розділ [%2d] «%s»: розмір бітової маски є нульовим або не є степенем 2: %u\n" + +#: src/elflint.c:2135 +#, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -"розділ [%2d] «%s»: розділ таблиці хешів занадто малий (розмір %ld, мало бути " -"не менше %ld)\n" +"розділ [%2d] «%s»: розділ таблиці хешів є надто малим (маємо %ld, мало бути " +"принаймні %ld)\n" -#: src/elflint.c:2100 +#: src/elflint.c:2144 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "розділ [%2d] «%s»: зсув 2-ої функції хешування занадто великий: %u\n" -#: src/elflint.c:2132 +#: src/elflint.c:2178 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" @@ -2052,7 +2197,7 @@ msgstr "" "розділ [%2d] '%s': ланцюжок хешів для блоку %zu розташовано нижче за позицію " "відхилення індексу символу\n" -#: src/elflint.c:2153 +#: src/elflint.c:2199 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2061,7 +2206,7 @@ msgstr "" "розділ [%2d] «%s»: символ %u, на який посилається ланцюжок у блоці %zu не " "визначено\n" -#: src/elflint.c:2164 +#: src/elflint.c:2212 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" @@ -2069,14 +2214,22 @@ msgstr "" "розділ [%2d] «%s»: значення хешу для символу %u у ланцюжку для блоку %zu є " "помилковим\n" -#: src/elflint.c:2195 +#: src/elflint.c:2221 +#, c-format +msgid "" +"section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" +msgstr "" +"розділ [%2d] «%s»: індекс маски для символу %u у ланцюжку для блоку %zu є " +"помилковим\n" + +#: src/elflint.c:2251 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" "розділ [%2d] «%s»: ланцюжок хешів для блоку %zu лежить поза межами " "діапазону\n" -#: src/elflint.c:2200 +#: src/elflint.c:2256 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" @@ -2084,36 +2237,43 @@ msgstr "" "розділ [%2d] «%s»: посилання на символ у ланцюжку для блоку %zu лежить поза " "межами діапазону\n" -#: src/elflint.c:2206 +#: src/elflint.c:2262 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "розділ [%2d] «%s»: бітова маска не відповідає назвам у таблиці хешів\n" -#: src/elflint.c:2219 +#: src/elflint.c:2275 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" "розділ [%2d] «%s»: придатні до пересування файли не можуть містити таблиць " "хешів\n" -#: src/elflint.c:2237 +#: src/elflint.c:2293 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" "розділ [%2d] «%s»: таблицю хешів не призначено для зберігання таблиці " "динамічних символів\n" -#: src/elflint.c:2245 +#: src/elflint.c:2297 +#, c-format +msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" +msgstr "" +"розділ [%2d] «%s»: некоректний індекс розділу таблиці символів sh_link " +"[%2d]\n" + +#: src/elflint.c:2305 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "розділ [%2d] «%s»: розмірність запису таблиці хешів є некоректною\n" -#: src/elflint.c:2250 +#: src/elflint.c:2310 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "розділ [%2d] «%s»: не позначено для пересування\n" -#: src/elflint.c:2255 +#: src/elflint.c:2315 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2122,17 +2282,46 @@ msgstr "" "розділ [%2d] «%s»: у таблиці хешів виявлено незвичайне розташування " "початкових адміністративних записів\n" -#: src/elflint.c:2303 +#: src/elflint.c:2364 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "sh_link у розділах хешів [%2zu] «%s» і [%2zu] «%s» не збігаються\n" -#: src/elflint.c:2381 src/elflint.c:2385 +#: src/elflint.c:2388 src/elflint.c:2453 src/elflint.c:2488 +#, c-format +msgid "hash section [%2zu] '%s' does not contain enough data\n" +msgstr "розділ хешу [%2zu] «%s» містить недостатньо даних\n" + +#: src/elflint.c:2409 +#, c-format +msgid "hash section [%2zu] '%s' has zero bit mask words\n" +msgstr "розділ хешу [%2zu] «%s» містить нульові слова бітової маски\n" + +#: src/elflint.c:2420 src/elflint.c:2464 src/elflint.c:2501 +#, c-format +msgid "hash section [%2zu] '%s' uses too much data\n" +msgstr "розділ хешу [%2zu] «%s» використовує надто багато даних\n" + +#: src/elflint.c:2435 +#, c-format +msgid "" +"hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " +"%, nentries: %\n" +msgstr "" +"розділ хешу [%2zu] «%s» некоректний індекс символу % (макс. к-ть " +"символів: %, кількість записів: %\n" + +#: src/elflint.c:2522 +#, c-format +msgid "hash section [%2zu] '%s' invalid sh_entsize\n" +msgstr "розділ хешу [%2zu] «%s» некоректне значення sh_entsize\n" + +#: src/elflint.c:2532 src/elflint.c:2536 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "розділ [%2zu] «%s»: посилання на індекс символів 0\n" -#: src/elflint.c:2392 +#: src/elflint.c:2543 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2141,7 +2330,7 @@ msgstr "" "виявлено посилання на символ %d у новій таблиці хешів у [%2zu] «%s», але " "його немає у старій таблиці хешів у [%2zu] «%s»\n" -#: src/elflint.c:2404 +#: src/elflint.c:2555 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2150,12 +2339,12 @@ msgstr "" "виявлено посилання на символ %d у старій таблиці хешів у [%2zu] «%s», але " "його немає у новій таблиці хешів у [%2zu] «%s»\n" -#: src/elflint.c:2420 +#: src/elflint.c:2571 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "розділ [%2d] «%s»: ненульове значення sh_%s для розділу NULL\n" -#: src/elflint.c:2440 +#: src/elflint.c:2591 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" @@ -2163,104 +2352,109 @@ msgstr "" "розділ [%2d] «%s»: групи розділів передбачено лише для придатних до " "пересування об’єктних файлах\n" -#: src/elflint.c:2451 +#: src/elflint.c:2602 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати таблицю символів: %s\n" -#: src/elflint.c:2456 +#: src/elflint.c:2607 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" "розділ [%2d] «%s»: посилання на розділ у sh_link не має таблиці символів\n" -#: src/elflint.c:2462 +#: src/elflint.c:2613 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "розділ [%2d] «%s»: некоректний індекс символу у sh_info\n" -#: src/elflint.c:2467 +#: src/elflint.c:2618 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "розділ [%2d] «%s»: sh_flags не є нульовим\n" -#: src/elflint.c:2474 +#: src/elflint.c:2625 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "розділ [%2d] «%s»: не вдалося отримати символ для підпису\n" -#: src/elflint.c:2479 +#: src/elflint.c:2629 +#, c-format +msgid "section [%2d] '%s': cannot get symbol name for signature\n" +msgstr "розділ [%2d] «%s»: не вдалося отримати назву символу для підпису\n" + +#: src/elflint.c:2634 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "розділ [%2d] «%s»: символ підпису не може бути порожнім рядком\n" -#: src/elflint.c:2485 +#: src/elflint.c:2640 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "розділ [%2d] «%s»: для sh_flags встановлено помилкове значення\n" -#: src/elflint.c:2491 +#: src/elflint.c:2646 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати дані: %s\n" -#: src/elflint.c:2500 +#: src/elflint.c:2655 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "розділ [%2d] «%s»: розмір розділу не є кратним до sizeof(Elf32_Word)\n" -#: src/elflint.c:2505 +#: src/elflint.c:2660 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "розділ [%2d] «%s»: група розділів без значення типу word прапорців\n" -#: src/elflint.c:2511 +#: src/elflint.c:2666 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "розділ [%2d] «%s»: група розділів без елементів\n" -#: src/elflint.c:2515 +#: src/elflint.c:2670 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "розділ [%2d] «%s»: група розділів, що містить лише один елемент\n" -#: src/elflint.c:2526 +#: src/elflint.c:2681 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "розділ [%2d] «%s»: невідомі прапорці групи розділів\n" -#: src/elflint.c:2538 +#: src/elflint.c:2693 #, c-format -msgid "section [%2d] '%s': section index %Zu out of range\n" -msgstr "розділ [%2d] «%s»: індекс розділу %Zu поза межами діапазону\n" +msgid "section [%2d] '%s': section index %zu out of range\n" +msgstr "розділ [%2d] «%s»: індекс розділу %zu поза межами діапазону\n" -#: src/elflint.c:2547 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" "розділ [%2d] «%s»: не вдалося отримати заголовок розділу для елемента %zu: " "%s\n" -#: src/elflint.c:2554 +#: src/elflint.c:2709 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "розділ [%2d] «%s»: група розділів містить іншу групу [%2d] «%s»\n" -#: src/elflint.c:2560 +#: src/elflint.c:2715 #, c-format msgid "" -"section [%2d] '%s': element %Zu references section [%2d] '%s' without " +"section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -"розділ [%2d] «%s»: елемент %Zu посилається на розділ [%2d] «%s» без " +"розділ [%2d] «%s»: елемент %zu посилається на розділ [%2d] «%s» без " "встановленого прапорця SHF_GROUP\n" -#: src/elflint.c:2567 +#: src/elflint.c:2722 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "розділ [%2d] «%s» міститься у більше ніж одній групі розділів\n" -#: src/elflint.c:2756 +#: src/elflint.c:2912 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2269,7 +2463,7 @@ msgstr "" "розділ [%2d] «%s» посилається у sh_link на розділ [%2d] «%s», який не має " "динамічної таблиці символів\n" -#: src/elflint.c:2768 +#: src/elflint.c:2924 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2278,28 +2472,28 @@ msgstr "" "кількість записів у розділі [%2d] «%s» відрізняється від кількості у таблиці " "символів [%2d] «%s»\n" -#: src/elflint.c:2784 +#: src/elflint.c:2940 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "розділ [%2d] «%s»: символ %d: не вдалося прочитати дані щодо версії\n" -#: src/elflint.c:2800 +#: src/elflint.c:2956 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" "розділ [%2d] «%s»: символ %d: локальний символ у загальному контексті\n" -#: src/elflint.c:2808 +#: src/elflint.c:2964 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "розділ [%2d] «%s»: символ %d: локальний символ з версією\n" -#: src/elflint.c:2822 +#: src/elflint.c:2978 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "розділ [%2d] «%s»: символ %d: некоректний індекс версії %d\n" -#: src/elflint.c:2827 +#: src/elflint.c:2983 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" @@ -2307,7 +2501,7 @@ msgstr "" "розділ [%2d] «%s»: символ %d: індекси версії %d призначено до визначеної " "версії\n" -#: src/elflint.c:2837 +#: src/elflint.c:2993 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" @@ -2315,45 +2509,45 @@ msgstr "" "розділ [%2d] «%s»: символ %d: індекс версії %d призначено для версії, на яку " "надійшов запит\n" -#: src/elflint.c:2889 +#: src/elflint.c:3046 #, c-format msgid "more than one version reference section present\n" msgstr "виявлено більше за один розділ посилань на версії\n" -#: src/elflint.c:2897 src/elflint.c:3026 +#: src/elflint.c:3054 src/elflint.c:3201 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "розділ [%2d] «%s»: sh_link не посилається на таблицю рядків\n" -#: src/elflint.c:2920 src/elflint.c:3078 +#: src/elflint.c:3079 src/elflint.c:3255 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "розділ [%2d] «%s»: запис %d має помилкову версію %d\n" -#: src/elflint.c:2926 src/elflint.c:3084 +#: src/elflint.c:3086 src/elflint.c:3262 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" "розділ [%2d] «%s»: запис %d містить помилкове зміщення у допоміжних даних\n" -#: src/elflint.c:2934 +#: src/elflint.c:3096 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "розділ [%2d] «%s»: запис %d містить некоректне посилання на файл\n" -#: src/elflint.c:2942 +#: src/elflint.c:3104 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "розділ [%2d] «%s»: запис %d посилається на невідому залежність\n" -#: src/elflint.c:2954 +#: src/elflint.c:3116 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d позначено невідомим " "прапорцем\n" -#: src/elflint.c:2961 +#: src/elflint.c:3124 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2362,7 +2556,7 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d містить некоректне " "посилання на назву\n" -#: src/elflint.c:2968 +#: src/elflint.c:3133 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2371,7 +2565,7 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d має помилкове значення " "хешу: %#x, мало бути %#x\n" -#: src/elflint.c:2978 +#: src/elflint.c:3142 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2380,7 +2574,7 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d містить дублікати назви " "версії «%s»\n" -#: src/elflint.c:2989 +#: src/elflint.c:3153 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" @@ -2388,50 +2582,59 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d має помилкове наступне " "поле\n" -#: src/elflint.c:3005 src/elflint.c:3163 +#: src/elflint.c:3170 src/elflint.c:3346 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" "розділ [%2d] «%s»: запис %d має некоректне зміщення щодо наступного запису\n" -#: src/elflint.c:3018 +#: src/elflint.c:3178 src/elflint.c:3354 +#, c-format +msgid "" +"section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " +"there are more entries\n" +msgstr "" +"розділ [%2d] «%s»: запис %d має нульове зміщення щодо наступного запису, але " +"за sh_info можна зрозуміти, що записів більше\n" + +#: src/elflint.c:3193 #, c-format msgid "more than one version definition section present\n" msgstr "виявлено більше за один розділ визначення версій\n" -#: src/elflint.c:3063 +#: src/elflint.c:3240 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "розділ [%2d] «%s»: повторне визначення BASE\n" -#: src/elflint.c:3067 +#: src/elflint.c:3244 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" "розділ [%2d] «%s»: визначення BASE повинно мати індекс VER_NDX_GLOBAL\n" -#: src/elflint.c:3073 +#: src/elflint.c:3250 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "розділ [%2d] «%s»: невідомий прапорець запису %d\n" -#: src/elflint.c:3097 +#: src/elflint.c:3277 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "розділ [%2d] «%s»: запис %d містить некоректне посилання на назву\n" -#: src/elflint.c:3104 +#: src/elflint.c:3284 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" "розділ [%2d] «%s»: запис %d має помилкове значення хешу: %#x, мало бути %#x\n" -#: src/elflint.c:3113 +#: src/elflint.c:3292 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "розділ [%2d] «%s»: запис %d містить дублікати назви версії «%s»\n" -#: src/elflint.c:3132 +#: src/elflint.c:3312 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" @@ -2439,53 +2642,53 @@ msgstr "" "розділ [%2d] «%s»: запис %d містить некоректне посилання на назву у " "допоміжних даних\n" -#: src/elflint.c:3147 +#: src/elflint.c:3329 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" "розділ [%2d] «%s»: у допоміжних даних запису %d міститься помилкове поле " "наступного запису\n" -#: src/elflint.c:3169 +#: src/elflint.c:3362 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "розділ [%2d] «%s»: немає визначення BASE\n" -#: src/elflint.c:3185 +#: src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "розділ [%2d] «%s»: невідома основна версія «%s»\n" -#: src/elflint.c:3198 +#: src/elflint.c:3391 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "розділ [%2d] «%s»: порожній розділ атрибутів об’єкта\n" -#: src/elflint.c:3219 +#: src/elflint.c:3412 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "розділ [%2d] «%s»: не вдалося визначити формат атрибутів\n" -#: src/elflint.c:3235 +#: src/elflint.c:3428 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: поле нульового розміру у розділі атрибутів\n" -#: src/elflint.c:3244 +#: src/elflint.c:3437 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: некоректна довжина у розділі атрибутів\n" -#: src/elflint.c:3256 +#: src/elflint.c:3449 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: незавершений рядок назви постачальника\n" -#: src/elflint.c:3273 +#: src/elflint.c:3466 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" @@ -2493,12 +2696,12 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: незавершене поле ULEB128 у тезі підрозділу " "атрибутів\n" -#: src/elflint.c:3282 +#: src/elflint.c:3475 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "розділ [%2d] «%s»: зміщення %zu: обрізаний розділ атрибутів\n" -#: src/elflint.c:3291 +#: src/elflint.c:3484 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" @@ -2506,14 +2709,14 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: поле нульового розміру у підрозділі " "атрибутів\n" -#: src/elflint.c:3304 +#: src/elflint.c:3499 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: некоректна довжина у підрозділі атрибутів\n" -#: src/elflint.c:3315 +#: src/elflint.c:3510 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" @@ -2521,35 +2724,35 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: підрозділ атрибутів містить неочікуваний " "теґ %u\n" -#: src/elflint.c:3333 +#: src/elflint.c:3528 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: незавершене поле ULEB128 у тезі атрибуту\n" -#: src/elflint.c:3344 +#: src/elflint.c:3539 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "розділ [%2d] «%s»: зміщення %zu: незавершений рядок у атрибуті\n" -#: src/elflint.c:3357 +#: src/elflint.c:3552 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "розділ [%2d] «%s»: зміщення %zu: незавершений теґ атрибуту %u\n" -#: src/elflint.c:3361 +#: src/elflint.c:3556 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: невідоме значення %s атрибуту %\n" -#: src/elflint.c:3371 +#: src/elflint.c:3566 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "розділ [%2d] «%s»: зміщення %zu: невідомий постачальник «%s»\n" -#: src/elflint.c:3377 +#: src/elflint.c:3572 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" @@ -2557,47 +2760,47 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: зайві байти після останнього розділу " "атрибутів\n" -#: src/elflint.c:3466 +#: src/elflint.c:3661 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "не вдалося отримати заголовок нульового розділу\n" -#: src/elflint.c:3470 +#: src/elflint.c:3665 #, c-format msgid "zeroth section has nonzero name\n" msgstr "нульовий розділ має ненульову назву\n" -#: src/elflint.c:3472 +#: src/elflint.c:3667 #, c-format msgid "zeroth section has nonzero type\n" msgstr "нульовий розділ має ненульовий тип\n" -#: src/elflint.c:3474 +#: src/elflint.c:3669 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "нульовий розділ має ненульові прапорці\n" -#: src/elflint.c:3476 +#: src/elflint.c:3671 #, c-format msgid "zeroth section has nonzero address\n" msgstr "нульовий розділ має ненульову адресу\n" -#: src/elflint.c:3478 +#: src/elflint.c:3673 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "нульовий розділ має ненульове зміщення\n" -#: src/elflint.c:3480 +#: src/elflint.c:3675 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "нульовий розділ має ненульове значення вирівнювання\n" -#: src/elflint.c:3482 +#: src/elflint.c:3677 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "нульовий розділ має ненульове значення розміру запису\n" -#: src/elflint.c:3485 +#: src/elflint.c:3680 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2606,7 +2809,7 @@ msgstr "" "нульовий розділ має ненульове значення розміру, хоча заголовок ELF ман " "ненульове значення shnum\n" -#: src/elflint.c:3489 +#: src/elflint.c:3684 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2615,7 +2818,7 @@ msgstr "" "нульовий розділ має ненульове значення компонування, хоча у заголовку ELF " "немає сигналу переповнення у shstrndx\n" -#: src/elflint.c:3493 +#: src/elflint.c:3688 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2624,28 +2827,28 @@ msgstr "" "нульовий розділ має ненульове значення компонування, хоча у заголовку ELF " "немає сигналу переповнення у phnum\n" -#: src/elflint.c:3510 +#: src/elflint.c:3706 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "не вдалося отримати заголовок розділу [%2zu] «%s»: %s\n" -#: src/elflint.c:3519 +#: src/elflint.c:3715 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "розділ [%2zu]: некоректна назва\n" -#: src/elflint.c:3546 +#: src/elflint.c:3742 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" "розділ [%2d] «%s» належить до помилкового типу: мав бути %s, маємо %s\n" -#: src/elflint.c:3562 +#: src/elflint.c:3760 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "розділ [%2zu] «%s» має помилкові прапорці: мало бути %s, маємо %s\n" -#: src/elflint.c:3579 +#: src/elflint.c:3778 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" @@ -2653,12 +2856,12 @@ msgstr "" "розділ [%2zu] «%s» має помилкові прапорці: мало бути %s, можливо, %s, але " "маємо %s\n" -#: src/elflint.c:3597 +#: src/elflint.c:3796 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "у об’єктному файлі виявлено розділ [%2zu] «%s»\n" -#: src/elflint.c:3603 src/elflint.c:3635 +#: src/elflint.c:3802 src/elflint.c:3834 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" @@ -2666,7 +2869,7 @@ msgstr "" "у розділ [%2zu] «%s» встановлено прапорець SHF_ALLOC, але немає придатного " "до завантаження сегмента\n" -#: src/elflint.c:3608 src/elflint.c:3640 +#: src/elflint.c:3807 src/elflint.c:3839 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2675,7 +2878,7 @@ msgstr "" "у розділі [%2zu] «%s» не встановлено прапорець SHF_ALLOC, але є придатні до " "завантаження сегменти\n" -#: src/elflint.c:3616 +#: src/elflint.c:3815 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" @@ -2683,22 +2886,22 @@ msgstr "" "розділ [%2zu] «%s» є таблицею-покажчиком розділу розширень у файлі, який не " "є об’єктним\n" -#: src/elflint.c:3659 +#: src/elflint.c:3858 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "розділ [%2zu] «%s»: розмір не є кратним до розміру запису\n" -#: src/elflint.c:3664 +#: src/elflint.c:3863 #, c-format msgid "cannot get section header\n" msgstr "не вдалося отримати заголовок розділу\n" -#: src/elflint.c:3674 +#: src/elflint.c:3873 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "розділ [%2zu] «%s» належить до непідтримуваного типу %d\n" -#: src/elflint.c:3688 +#: src/elflint.c:3888 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" @@ -2706,52 +2909,74 @@ msgstr "" "розділ [%2zu] «%s» містить некоректні специфічні для процесора прапорці " "%#\n" -#: src/elflint.c:3695 +#: src/elflint.c:3895 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "розділ [%2zu] «%s» містить невідомі прапорці %#\n" -#: src/elflint.c:3703 +#: src/elflint.c:3903 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" "розділ [%2zu] «%s»: адреса розділів локальних даних потоків не є нульовою\n" -#: src/elflint.c:3711 +#: src/elflint.c:3913 +#, fuzzy, c-format +msgid "section [%2zu] '%s': allocated section cannot be compressed\n" +msgstr "" +"розділ [%2zu] «%s»: адреса розділів локальних даних потоків не є нульовою\n" + +#: src/elflint.c:3918 +#, fuzzy, c-format +msgid "section [%2zu] '%s': nobits section cannot be compressed\n" +msgstr "розділ [%2d] «%s»: не виявлено розділу хешів\n" + +#: src/elflint.c:3924 +#, fuzzy, c-format +msgid "" +"section [%2zu] '%s': compressed section with no compression header: %s\n" +msgstr "розділ [%2d] «%s»: група розділів, що містить лише один елемент\n" + +#: src/elflint.c:3930 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" "розділ [%2zu] «%s»: некоректне посилання на розділ у значенні компонування\n" -#: src/elflint.c:3716 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" "розділ [%2zu] «%s»: некоректне посилання на розділ у значенні відомостей\n" -#: src/elflint.c:3723 +#: src/elflint.c:3942 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "розділ [%2zu] «%s»: встановлено прапорець strings без прапорця merge\n" -#: src/elflint.c:3728 +#: src/elflint.c:3947 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" "розділ [%2zu] «%s»: встановлено прапорець merge, але розмір запису є " "нульовим\n" -#: src/elflint.c:3746 +#: src/elflint.c:3965 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "розділ [%2zu] «%s» має неочікуваний тип %d для виконуваного розділу\n" -#: src/elflint.c:3755 +#: src/elflint.c:3974 +#, fuzzy, c-format +msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" +msgstr "розділ [%2zu] «%s» не повинен бути придатним до запису\n" + +#: src/elflint.c:3981 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "розділ [%2zu] «%s» є одночасно виконуваним і придатним до запису\n" -#: src/elflint.c:3784 +#: src/elflint.c:4012 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -2760,7 +2985,7 @@ msgstr "" "розділ [%2zu] «%s» не повністю міститься у сегменті запису заголовка " "програми %d\n" -#: src/elflint.c:3792 +#: src/elflint.c:4022 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -2769,7 +2994,16 @@ msgstr "" "розділ [%2zu] «%s» належить до типу NOBITS, але його читання виконується з " "файла у сегментів запису заголовка програми %d\n" -#: src/elflint.c:3801 +#: src/elflint.c:4048 +#, c-format +msgid "" +"section [%2zu] '%s' has type NOBITS but is read from the file in segment of " +"program header entry %d and file contents is non-zero\n" +msgstr "" +"розділ [%2zu] «%s» належить до типу NOBITS, але його читання виконується з " +"файла у сегментів запису заголовка програми %d, а вміст файла є ненульовим\n" + +#: src/elflint.c:4059 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -2778,19 +3012,19 @@ msgstr "" "розділ [%2zu] «%s» не належить до типу NOBITS, але його читання не " "виконується з файла у сегментів запису заголовка програми %d\n" -#: src/elflint.c:3812 +#: src/elflint.c:4070 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "розділ [%2zu] «%s» є виконуваним у невиконуваному сегменті %d\n" -#: src/elflint.c:3822 +#: src/elflint.c:4080 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" "розділ [%2zu] «%s» є придатним до запису у непридатному до запису сегменті " "%d\n" -#: src/elflint.c:3832 +#: src/elflint.c:4090 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" @@ -2798,7 +3032,7 @@ msgstr "" "розділ [%2zu] «%s»: встановлено прапорець alloc, але розділ не перебуває у " "жодному завантаженому сегменті\n" -#: src/elflint.c:3838 +#: src/elflint.c:4096 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -2807,7 +3041,7 @@ msgstr "" "розділ [%2zu] «%s»: заголовок ELF повідомляє про те, що це таблиця рядків " "заголовка розділу, але ця таблиця не належить до типу SHT_TYPE\n" -#: src/elflint.c:3846 +#: src/elflint.c:4104 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" @@ -2815,17 +3049,17 @@ msgstr "" "розділ [%2zu] «%s»: придатні до пересування файли не можуть містити " "динамічних таблиць символів\n" -#: src/elflint.c:3897 +#: src/elflint.c:4155 #, c-format msgid "more than one version symbol table present\n" msgstr "виявлено більше за одну таблицю символів версій\n" -#: src/elflint.c:3920 +#: src/elflint.c:4178 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "існує запис заголовка програми INTERP, але не розділ .interp\n" -#: src/elflint.c:3931 +#: src/elflint.c:4189 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" @@ -2833,14 +3067,14 @@ msgstr "" "придатний до завантаження сегмент [%u] є виконуваним, але не містить " "виконуваних розділів\n" -#: src/elflint.c:3937 +#: src/elflint.c:4195 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" "придатний до завантаження розділ [%u] є придатним до запису, але не містить " "придатних до запису розділів\n" -#: src/elflint.c:3948 +#: src/elflint.c:4206 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -2849,78 +3083,78 @@ msgstr "" "немає розділу .gnu.versym, хоча існує розділ .gnu.versym_d або .gnu." "versym_r\n" -#: src/elflint.c:3961 +#: src/elflint.c:4219 #, c-format msgid "duplicate version index %d\n" msgstr "дублікат індексу версії %d\n" -#: src/elflint.c:3975 +#: src/elflint.c:4233 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" "існує розділ .gnu.versym, але немає розділу .gnu.versym_d або .gnu.versym_r\n" -#: src/elflint.c:4024 +#: src/elflint.c:4282 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" "phdr[%d]: невідомий тип нотатки файла core % за зміщенням %\n" -#: src/elflint.c:4028 +#: src/elflint.c:4286 #, c-format msgid "" -"section [%2d] '%s': unknown core file note type % at offset %Zu\n" +"section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" "розділ [%2d] «%s»: невідомий тип нотатки файла core % за зміщенням " -"%Zu\n" +"%zu\n" -#: src/elflint.c:4051 +#: src/elflint.c:4309 #, c-format -msgid "phdr[%d]: unknown object file note type % at offset %Zu\n" +msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -"phdr[%d]: невідомий тип нотатки об’єктного файла % за зміщенням %Zu\n" +"phdr[%d]: невідомий тип нотатки об’єктного файла % за зміщенням %zu\n" -#: src/elflint.c:4055 +#: src/elflint.c:4313 #, c-format msgid "" -"section [%2d] '%s': unknown object file note type % at offset %Zu\n" +"section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" "розділ [%2d] «%s»: невідомий тип нотатки об’єктного файла % за " -"зміщенням %Zu\n" +"зміщенням %zu\n" -#: src/elflint.c:4072 +#: src/elflint.c:4330 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: для цього типу файлів не визначено записів нотаток\n" -#: src/elflint.c:4091 +#: src/elflint.c:4349 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: не вдалося отримати вміст розділу нотаток: %s\n" -#: src/elflint.c:4094 +#: src/elflint.c:4352 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: зайві % байтів після останнього запису нотатки\n" -#: src/elflint.c:4115 +#: src/elflint.c:4373 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" "розділ [%2d] «%s»: для цього типу файлів не визначено записів нотаток\n" -#: src/elflint.c:4122 +#: src/elflint.c:4380 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "розділ [%2d] «%s»: не вдалося отримати вміст розділу нотаток\n" -#: src/elflint.c:4125 +#: src/elflint.c:4383 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" "розділ [%2d] «%s»: додаткові % байтів після останньої нотатки\n" -#: src/elflint.c:4143 +#: src/elflint.c:4401 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" @@ -2928,135 +3162,141 @@ msgstr "" "заголовки програм можуть бути лише у виконуваних файлів, об’єктних файлів " "спільного використання або файлів core\n" -#: src/elflint.c:4158 +#: src/elflint.c:4416 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "не вдалося отримати запис заголовка програми %d: %s\n" -#: src/elflint.c:4167 +#: src/elflint.c:4425 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "запис заголовка програми %d: невідомий тип запису заголовка програми " "%#\n" -#: src/elflint.c:4178 +#: src/elflint.c:4436 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "більше за один запис INTERP у заголовку програми\n" -#: src/elflint.c:4186 +#: src/elflint.c:4444 #, c-format msgid "more than one TLS entry in program header\n" msgstr "більше за один запис TLS у заголовку програми\n" -#: src/elflint.c:4193 +#: src/elflint.c:4451 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "у статичному виконуваному файлі не може бути динамічних розділів\n" -#: src/elflint.c:4207 +#: src/elflint.c:4465 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" "посилання на динамічний розділ у заголовку програми має помилкове зміщення\n" -#: src/elflint.c:4210 +#: src/elflint.c:4468 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" "розміри динамічного розділу у заголовку програми та у заголовку розділу не " "збігаються\n" -#: src/elflint.c:4220 +#: src/elflint.c:4478 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "більше за один запис GNU_RELRO у заголовку програми\n" -#: src/elflint.c:4241 +#: src/elflint.c:4499 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" "придатний до завантаження сегмент, до якого звертається GNU_RELRO, " "непридатний до запису\n" -#: src/elflint.c:4244 +#: src/elflint.c:4510 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" "прапорці придатного до завантаження сегмента [%u] не відповідають прапорцям " "GNU_RELRO [%u]\n" -#: src/elflint.c:4252 src/elflint.c:4275 +#: src/elflint.c:4517 +#, c-format +msgid "" +"GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" +msgstr "" + +#: src/elflint.c:4526 src/elflint.c:4549 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "сегмент %s не міститься у завантаженому сегменті\n" -#: src/elflint.c:4281 +#: src/elflint.c:4555 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "зміщення заголовка програми у заголовку ELF і запис PHDR не збігаються" -#: src/elflint.c:4305 +#: src/elflint.c:4580 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" "посилання на таблицю вікон викликів у заголовку програми має помилкове " "зміщення\n" -#: src/elflint.c:4308 +#: src/elflint.c:4583 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" "розміри таблиці пошуку вікон виклику у заголовку програми та у заголовку " "розділу не збігаються\n" -#: src/elflint.c:4321 +#: src/elflint.c:4596 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "існує PT_GNU_EH_FRAME, хоча немає розділу .eh_frame_hdr\n" -#: src/elflint.c:4329 +#: src/elflint.c:4604 #, c-format msgid "call frame search table must be allocated\n" msgstr "таблицю пошуку вікон викликів має бути розміщено у пам’яті\n" -#: src/elflint.c:4332 +#: src/elflint.c:4607 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "розділ [%2zu] «%s» має бути розміщено у пам’яті\n" -#: src/elflint.c:4336 +#: src/elflint.c:4611 #, c-format msgid "call frame search table must not be writable\n" msgstr "таблиця пошуку вікон викликів не повинна бути придатною до запису\n" -#: src/elflint.c:4339 +#: src/elflint.c:4614 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "розділ [%2zu] «%s» не повинен бути придатним до запису\n" -#: src/elflint.c:4344 +#: src/elflint.c:4619 #, c-format msgid "call frame search table must not be executable\n" msgstr "таблиця пошуку вікон викликів не повинна бути придатною до виконання\n" -#: src/elflint.c:4347 +#: src/elflint.c:4622 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "розділ [%2zu] «%s» не повинен бути придатним до виконання\n" -#: src/elflint.c:4358 +#: src/elflint.c:4633 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "запис заголовка програми %d: розмір файла перевищує об’єм пам’яті\n" -#: src/elflint.c:4365 +#: src/elflint.c:4640 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "запис заголовка програми %d: значення вирівнювання не є степенем 2\n" -#: src/elflint.c:4368 +#: src/elflint.c:4643 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -3065,7 +3305,7 @@ msgstr "" "запис заголовка програми %d: зміщення у файлі і віртуальна адреса не " "співвідносяться з вирівнюванням\n" -#: src/elflint.c:4381 +#: src/elflint.c:4656 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -3074,12 +3314,12 @@ msgstr "" "виконуваний модуль/DSO з розділом .eh_frame_hdr не містить запису заголовка " "програми PT_GNU_EH_FRAME" -#: src/elflint.c:4415 +#: src/elflint.c:4690 #, c-format msgid "cannot read ELF header: %s\n" msgstr "не вдалося прочитати заголовок ELF: %s\n" -#: src/elflint.c:4441 +#: src/elflint.c:4716 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -3101,8 +3341,8 @@ msgstr "Використовувати ШЛЯХ як кореневий ката msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "Шукає джерело пересуваного тексту у ФАЙЛАХ (типово, a.out)." -#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:72 src/size.c:84 -#: src/strings.c:84 src/strip.c:96 +#: src/findtextrel.c:76 src/nm.c:108 src/objdump.c:71 src/size.c:83 +#: src/strings.c:88 src/strip.c:95 msgid "[FILE...]" msgstr "[ФАЙЛ...]" @@ -3136,40 +3376,40 @@ msgstr "у «%s» не виявлено пересувань тексту" msgid "while reading ELF file" msgstr "під час спроби читання файла ELF" -#: src/findtextrel.c:334 src/findtextrel.c:351 +#: src/findtextrel.c:329 #, c-format -msgid "cannot get program header index at offset %d: %s" -msgstr "не вдалося отримати індекс заголовка програми за зміщенням %d: %s" +msgid "cannot get program header count: %s" +msgstr "не вдалося отримати кількість заголовків програми: %s" -#: src/findtextrel.c:403 +#: src/findtextrel.c:340 src/findtextrel.c:357 #, c-format -msgid "cannot get section header of section %Zu: %s" -msgstr "не вдалося отримати заголовок розділу %Zu: %s" +msgid "cannot get program header index at offset %zd: %s" +msgstr "не вдалося отримати індекс заголовка програми за зміщенням %zd: %s" -#: src/findtextrel.c:415 +#: src/findtextrel.c:421 #, c-format msgid "cannot get symbol table section %zu in '%s': %s" msgstr "не вдалося отримати таблицю символів розділу %zu у «%s»: %s" -#: src/findtextrel.c:435 src/findtextrel.c:458 +#: src/findtextrel.c:441 src/findtextrel.c:464 #, c-format msgid "cannot get relocation at index %d in section %zu in '%s': %s" msgstr "" "не вдалося отримати пересування за індексом %d у розділі %zu у «%s»: %s" -#: src/findtextrel.c:523 +#: src/findtextrel.c:530 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "%s не зібрано з -fpic/-fPIC\n" -#: src/findtextrel.c:576 +#: src/findtextrel.c:583 #, c-format msgid "" "the file containing the function '%s' is not compiled with -fpic/-fPIC\n" msgstr "" "файл, що містить функцію «%s», не було зібрано з параметрами -fpic/-fPIC\n" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:590 src/findtextrel.c:610 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3178,7 +3418,7 @@ msgstr "" "файл, що містить функцію «%s», ймовірно, не було зібрано з параметрами -" "fpic/-fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:598 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3187,7 +3427,7 @@ msgstr "" "файл, що містить функцію «%s», або файл, що містить функцію «%s», зібрано " "без параметрів -fpic/-fPIC\n" -#: src/findtextrel.c:611 +#: src/findtextrel.c:618 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3221,351 +3461,351 @@ msgid "initial-executable TLS relocation cannot be used " msgstr "" "не можна використовувати пересування TLS у початковому виконуваному файлі" -#: src/ld.c:79 +#: src/ld.c:78 msgid "Input File Control:" msgstr "Керування файлом вхідних даних:" -#: src/ld.c:81 +#: src/ld.c:80 msgid "Include whole archives in the output from now on." msgstr "Відтепер включати цілі архіви до виведених даних." -#: src/ld.c:83 +#: src/ld.c:82 msgid "Stop including the whole archives in the output." msgstr "Припинити включення цілих архівів до вихідних даних." -#: src/ld.c:84 src/ld.c:98 src/ld.c:176 +#: src/ld.c:83 src/ld.c:97 src/ld.c:175 msgid "FILE" msgstr "ФАЙЛ" -#: src/ld.c:85 +#: src/ld.c:84 msgid "Start a group." msgstr "Почати групу." -#: src/ld.c:86 +#: src/ld.c:85 msgid "End a group." msgstr "Завершити групу." -#: src/ld.c:87 +#: src/ld.c:86 msgid "PATH" msgstr "ШЛЯХ" -#: src/ld.c:88 +#: src/ld.c:87 msgid "Add PATH to list of directories files are searched in." msgstr "Додати ШЛЯХ до списку каталогів, у яких слід шукати файли." -#: src/ld.c:90 +#: src/ld.c:89 msgid "Only set DT_NEEDED for following dynamic libs if actually used" msgstr "" "Встановлювати DT_NEEDED лише для наступних динамічних бібліотек, якщо він " "справді використовується" -#: src/ld.c:92 +#: src/ld.c:91 msgid "Always set DT_NEEDED for following dynamic libs" msgstr "Завжди встановлювати DT_NEEDED для наступних динамічних бібліотек" -#: src/ld.c:94 +#: src/ld.c:93 msgid "Ignore LD_LIBRARY_PATH environment variable." msgstr "Ігнорувати змінну середовища LD_LIBRARY_PATH." -#: src/ld.c:97 +#: src/ld.c:96 msgid "Output File Control:" msgstr "Керування файлом виведених даних:" -#: src/ld.c:98 +#: src/ld.c:97 msgid "Place output in FILE." msgstr "Вивести дані до ФАЙЛА." -#: src/ld.c:101 +#: src/ld.c:100 msgid "Object is marked to not use default search path at runtime." msgstr "" "Об’єкт позначено, як таких, який не використовує типовий шлях пошуку під час " "запуску." -#: src/ld.c:103 +#: src/ld.c:102 msgid "Same as --whole-archive." msgstr "Те саме, що --whole-archive." -#: src/ld.c:104 +#: src/ld.c:103 msgid "" "Default rules of extracting from archive; weak references are not enough." msgstr "Типові правила видобування з архівів; слабкого посилання недостатньо." -#: src/ld.c:108 +#: src/ld.c:107 msgid "Weak references cause extraction from archive." msgstr "Слабкі посилання спричиняють видобування з архіву." -#: src/ld.c:110 +#: src/ld.c:109 msgid "Allow multiple definitions; first is used." msgstr "Дозволити декілька визначень. Використовуватиметься лише перше." -#: src/ld.c:112 +#: src/ld.c:111 msgid "Disallow/allow undefined symbols in DSOs." msgstr "Заборонити/Дозволити невизначені символи у DSO." -#: src/ld.c:115 +#: src/ld.c:114 msgid "Object requires immediate handling of $ORIGIN." msgstr "Об’єкт вимагає негайної обробки $ORIGIN." -#: src/ld.c:117 +#: src/ld.c:116 msgid "Relocation will not be processed lazily." msgstr "Переміщення не буде оброблятися у лінивому режимі." -#: src/ld.c:119 +#: src/ld.c:118 msgid "Object cannot be unloaded at runtime." msgstr "Об’єкт не можна вивантажувати під час запуску." -#: src/ld.c:121 +#: src/ld.c:120 msgid "Mark object to be initialized first." msgstr "Позначити об’єкт, як такий, що потребує ініціалізації." -#: src/ld.c:123 +#: src/ld.c:122 msgid "Enable/disable lazy-loading flag for following dependencies." msgstr "" "Увімкнути/Вимкнути прапорець лінивого завантаження для наведених нижче " "залежностей." -#: src/ld.c:125 +#: src/ld.c:124 msgid "Mark object as not loadable with 'dlopen'." msgstr "" "Позначити об’єкт, як непридатний для завантаження за допомогою «dlopen»." -#: src/ld.c:127 +#: src/ld.c:126 msgid "Ignore/record dependencies on unused DSOs." msgstr "Ігнорувати/Записувати залежності невикористаних DSO." -#: src/ld.c:129 +#: src/ld.c:128 msgid "Generated DSO will be a system library." msgstr "Створена DSO буде системною бібліотекою." -#: src/ld.c:130 +#: src/ld.c:129 msgid "ADDRESS" msgstr "АДРЕСА" -#: src/ld.c:130 +#: src/ld.c:129 msgid "Set entry point address." msgstr "Встановити адресу точки входу." -#: src/ld.c:133 +#: src/ld.c:132 msgid "Do not link against shared libraries." msgstr "Не компонувати з бібліотеками спільного використання." -#: src/ld.c:136 +#: src/ld.c:135 msgid "Prefer linking against shared libraries." msgstr "Надавати перевагу компонуванню з бібліотеками спільного використання." -#: src/ld.c:137 +#: src/ld.c:136 msgid "Export all dynamic symbols." msgstr "Експортувати всі динамічні символи." -#: src/ld.c:138 +#: src/ld.c:137 msgid "Strip all symbols." msgstr "Вилучити всі символи." -#: src/ld.c:139 +#: src/ld.c:138 msgid "Strip debugging symbols." msgstr "Вилучити символи зневаджування." -#: src/ld.c:141 +#: src/ld.c:140 msgid "Assume pagesize for the target system to be SIZE." msgstr "" "Вважати розмір сторінки для системи призначення рівним значенню РОЗМІР." -#: src/ld.c:143 +#: src/ld.c:142 msgid "Set runtime DSO search path." msgstr "Встановити шлях пошуку DSO під час запуску." -#: src/ld.c:146 +#: src/ld.c:145 msgid "Set link time DSO search path." msgstr "Встановити шлях пошуку DSO під час компонування." -#: src/ld.c:147 +#: src/ld.c:146 msgid "Generate dynamic shared object." msgstr "Створити динамічний об’єкт спільного використання." -#: src/ld.c:148 +#: src/ld.c:147 msgid "Generate relocatable object." msgstr "Створити придатний для пересування об’єкт." -#: src/ld.c:151 +#: src/ld.c:150 msgid "Causes symbol not assigned to a version be reduced to local." msgstr "" "Спричиняє перетворення символів, не прив’язаних до версії, на локальні." -#: src/ld.c:152 +#: src/ld.c:151 msgid "Remove unused sections." msgstr "Вилучити невикористані розділи." -#: src/ld.c:155 +#: src/ld.c:154 msgid "Don't remove unused sections." msgstr "Не вилучати невикористані розділи." -#: src/ld.c:156 +#: src/ld.c:155 msgid "Set soname of shared object." msgstr "Встановити soname об’єкта спільного використання." -#: src/ld.c:157 +#: src/ld.c:156 msgid "Set the dynamic linker name." msgstr "Встановити назву динамічного компонувальника." -#: src/ld.c:160 +#: src/ld.c:159 msgid "Add/suppress addition indentifying link-editor to .comment section." msgstr "" "Додати/Придушити додавання ідентифікації редактора компонування до розділу ." "comment." -#: src/ld.c:163 +#: src/ld.c:162 msgid "Create .eh_frame_hdr section" msgstr "Створити розділ .eh_frame_hdr" -#: src/ld.c:165 +#: src/ld.c:164 msgid "Set hash style to sysv, gnu or both." msgstr "Встановити формат хешування у значення sysv, gnu або both." -#: src/ld.c:167 +#: src/ld.c:166 msgid "Generate build ID note (md5, sha1 (default), uuid)." msgstr "Створити запису ідентифікатора збирання (md5, sha1 (типовий), uuid)." -#: src/ld.c:169 +#: src/ld.c:168 msgid "Linker Operation Control:" msgstr "Керування роботою компонувальника:" -#: src/ld.c:170 +#: src/ld.c:169 msgid "Verbose messages." msgstr "Докладні повідомлення." -#: src/ld.c:171 +#: src/ld.c:170 msgid "Trace file opens." msgstr "Спостерігати за відкриттями файлів." -#: src/ld.c:173 +#: src/ld.c:172 msgid "Trade speed for less memory usage" msgstr "Зменшити споживання пам’яті за рахунок швидкості" -#: src/ld.c:174 +#: src/ld.c:173 msgid "LEVEL" msgstr "РІВЕНЬ" -#: src/ld.c:175 +#: src/ld.c:174 msgid "Set optimization level to LEVEL." msgstr "Встановити рівень оптимізації РІВЕНЬ." -#: src/ld.c:176 +#: src/ld.c:175 msgid "Use linker script in FILE." msgstr "Використати скрипт компонування у ФАЙЛі." -#: src/ld.c:179 +#: src/ld.c:178 msgid "Select to get parser debug information" msgstr "Позначте, щоб отримати діагностичні дані обробника" -#: src/ld.c:182 +#: src/ld.c:181 msgid "Read version information from FILE." msgstr "Прочитати відомості щодо версії з ФАЙЛа." -#: src/ld.c:183 +#: src/ld.c:182 msgid "Set emulation to NAME." msgstr "Встановити режим емуляції на основі НАЗВИ." -#: src/ld.c:189 +#: src/ld.c:188 msgid "Combine object and archive files." msgstr "Комбінує об’єктні файли і файли архівів." -#: src/ld.c:192 +#: src/ld.c:191 msgid "[FILE]..." msgstr "[ФАЙЛ]..." -#: src/ld.c:325 +#: src/ld.c:319 #, c-format msgid "At least one input file needed" msgstr "Потрібен принаймні один файл вхідних даних" -#: src/ld.c:341 +#: src/ld.c:335 #, c-format msgid "error while preparing linking" msgstr "помилка під час приготування до компонування" -#: src/ld.c:348 +#: src/ld.c:342 #, c-format msgid "cannot open linker script '%s'" msgstr "не вдалося відкрити скрипт компонування «%s»" -#: src/ld.c:389 +#: src/ld.c:383 #, c-format msgid "-( without matching -)" msgstr "-( без відповідника -)" -#: src/ld.c:564 src/ld.c:602 +#: src/ld.c:558 src/ld.c:596 #, c-format msgid "only one option of -G and -r is allowed" msgstr "можна використовувати лише один з параметрів -G або -r" -#: src/ld.c:586 +#: src/ld.c:580 #, c-format msgid "more than one '-m' parameter" msgstr "декілька параметрів «-m»" -#: src/ld.c:596 src/ld.c:1005 +#: src/ld.c:590 src/ld.c:999 #, c-format msgid "unknown option `-%c %s'" msgstr "невідомий параметр «-%c %s»" -#: src/ld.c:638 +#: src/ld.c:632 #, c-format msgid "invalid page size value '%s': ignored" msgstr "некоректне значення розміру сторінки «%s»: проігноровано" -#: src/ld.c:679 +#: src/ld.c:673 #, c-format msgid "invalid hash style '%s'" msgstr "некоректний формат хешування «%s»" -#: src/ld.c:689 +#: src/ld.c:683 #, c-format msgid "invalid build-ID style '%s'" msgstr "некоректний формат ідентифікатора збирання «%s»" -#: src/ld.c:777 +#: src/ld.c:771 #, c-format msgid "More than one output file name given." msgstr "Вказано декілька назв файлів виведення даних." -#: src/ld.c:794 +#: src/ld.c:788 #, c-format msgid "Invalid optimization level `%s'" msgstr "Некоректний рівень оптимізації «%s»" -#: src/ld.c:842 +#: src/ld.c:836 #, c-format msgid "nested -( -) groups are not allowed" msgstr "підтримки вкладених груп -( -) не передбачено" -#: src/ld.c:861 +#: src/ld.c:855 #, c-format msgid "-) without matching -(" msgstr "-) без відповідника -(" -#: src/ld.c:1038 +#: src/ld.c:1032 #, c-format msgid "unknown option '-%c %s'" msgstr "невідомий параметр «-%c %s»" -#: src/ld.c:1142 +#: src/ld.c:1138 #, c-format msgid "could not find input file to determine output file format" msgstr "" "не вдалося виявити файл вхідних даних для визначення формату файла вихідних " "даних" -#: src/ld.c:1144 +#: src/ld.c:1140 #, c-format msgid "try again with an appropriate '-m' parameter" msgstr "повторіть спробу з належним параметром «-m»" -#: src/ld.c:1438 +#: src/ld.c:1434 #, c-format msgid "cannot read version script '%s'" msgstr "не вдалося прочитати скрипт версій «%s»" -#: src/ld.c:1504 src/ld.c:1543 +#: src/ld.c:1500 src/ld.c:1539 #, c-format msgid "duplicate definition of '%s' in linker script" msgstr "повторне визначення «%s» у скрипті компонування" @@ -3610,8 +3850,8 @@ msgstr "Попередження: тип «%s» змінився з %s у %s н msgid "Warning: size of `%s' changed from % in %s to % in %s" msgstr "Попередження: розмір «%s» змінено з % у %s на % у %s" -#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:536 src/readelf.c:852 +#: src/strip.c:589 #, c-format msgid "cannot determine number of sections: %s" msgstr "не вдалося визначити кількість розділів: %s" @@ -3853,7 +4093,7 @@ msgstr "внутрішня помилка: небезбітовий розділ msgid "cannot get header of 0th section: %s" msgstr "не вдалося отримати заголовок 0-го розділу: %s" -#: src/ldgeneric.c:6930 src/unstrip.c:1818 +#: src/ldgeneric.c:6930 src/unstrip.c:1929 #, c-format msgid "cannot update ELF header: %s" msgstr "не вдалося оновити заголовок ELF: %s" @@ -3908,9 +4148,10 @@ msgstr "під час читання скрипту компонування «% #: src/ldscript.y:737 #, c-format -msgid "symbol '%s' is declared both local and global for unnamed version" +msgid "symbol '%s' is declared both local and global for unnamed version '%s'" msgstr "" -"символ «%s» оголошено локально і на загальному рівні для версії без назви" +"символ «%s» оголошено локально і на загальному рівні для версії без назви " +"«%s»" #: src/ldscript.y:739 #, c-format @@ -3922,7 +4163,7 @@ msgstr "символ «%s» оголошено локально і на зага msgid "default visibility set as local and global" msgstr "типову видимість визначено як локальну і загальну" -#: src/nm.c:66 src/strip.c:68 +#: src/nm.c:66 src/strip.c:67 msgid "Output selection:" msgstr "Вибір виводу:" @@ -3950,7 +4191,7 @@ msgstr "Показувати лише невизначені символи" msgid "Include index for symbols from archive members" msgstr "Включити покажчик для символів з елементів архіву" -#: src/nm.c:77 src/size.c:58 +#: src/nm.c:77 src/size.c:57 msgid "Output format:" msgstr "Формат виводу:" @@ -3974,7 +4215,7 @@ msgstr "Те саме, що і --format=bsd" msgid "Same as --format=posix" msgstr "Те саме, що і --format=posix" -#: src/nm.c:86 src/size.c:64 +#: src/nm.c:86 src/size.c:63 msgid "Use RADIX for printing symbol values" msgstr "Використовувати ОСНОВУ числення для виводу символьних значень" @@ -3986,7 +4227,7 @@ msgstr "Позначати спеціальні символи" msgid "Print size of defined symbols" msgstr "Вивести розмір визначених символів" -#: src/nm.c:91 src/size.c:72 src/strip.c:73 src/unstrip.c:73 +#: src/nm.c:91 src/size.c:71 src/strip.c:72 src/unstrip.c:72 msgid "Output options:" msgstr "Параметри виводу:" @@ -4010,27 +4251,27 @@ msgstr "Визначати за низькорівневими назвами с msgid "List symbols from FILEs (a.out by default)." msgstr "Показати список символів з ФАЙЛів (типово з a.out)." -#: src/nm.c:116 src/objdump.c:80 +#: src/nm.c:116 src/objdump.c:79 msgid "Output formatting" msgstr "Форматування виводу" -#: src/nm.c:140 src/objdump.c:104 src/size.c:109 src/strip.c:120 +#: src/nm.c:140 src/objdump.c:103 src/size.c:108 src/strip.c:127 #, c-format -msgid "%s: INTERNAL ERROR %d (%s-%s): %s" -msgstr "%s: ВНУТРІШНЯ ПОМИЛКА %d (%s-%s): %s" +msgid "%s: INTERNAL ERROR %d (%s): %s" +msgstr "%s: ВНУТРІШНЯ ПОМИЛКА %d (%s): %s" -#: src/nm.c:398 src/nm.c:410 src/size.c:309 src/size.c:318 src/size.c:329 -#: src/strip.c:2155 +#: src/nm.c:395 src/nm.c:407 src/size.c:305 src/size.c:314 src/size.c:325 +#: src/strip.c:2280 #, c-format msgid "while closing '%s'" msgstr "під час закриття «%s»" -#: src/nm.c:420 src/objdump.c:296 src/strip.c:376 +#: src/nm.c:417 src/objdump.c:292 src/strip.c:391 #, c-format msgid "%s: File format not recognized" msgstr "%s: не вдалося розпізнати формат файла" -#: src/nm.c:460 +#: src/nm.c:457 msgid "" "\n" "Archive index:\n" @@ -4038,42 +4279,42 @@ msgstr "" "\n" "Покажчик архіву:\n" -#: src/nm.c:469 +#: src/nm.c:466 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "некоректне зміщення %zu для символу %s" -#: src/nm.c:474 +#: src/nm.c:471 #, c-format msgid "%s in %s\n" msgstr "%s у %s\n" -#: src/nm.c:482 +#: src/nm.c:479 #, c-format msgid "cannot reset archive offset to beginning" msgstr "не вдалося відновити зміщення початку архіву" -#: src/nm.c:506 src/objdump.c:344 +#: src/nm.c:504 src/objdump.c:340 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: не вдалося розпізнати формат файла" -#: src/nm.c:718 +#: src/nm.c:719 #, c-format msgid "cannot create search tree" msgstr "не вдалося створити дерево пошуку" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 -#: src/readelf.c:1085 src/readelf.c:1245 src/readelf.c:1393 src/readelf.c:1579 -#: src/readelf.c:1785 src/readelf.c:1972 src/readelf.c:2196 src/readelf.c:2454 -#: src/readelf.c:2524 src/readelf.c:2606 src/readelf.c:3117 src/readelf.c:3153 -#: src/readelf.c:3216 src/readelf.c:7920 src/readelf.c:9002 src/readelf.c:9149 -#: src/readelf.c:9217 src/size.c:417 src/size.c:487 src/strip.c:503 +#: src/nm.c:760 src/nm.c:1221 src/objdump.c:789 src/readelf.c:545 +#: src/readelf.c:1123 src/readelf.c:1323 src/readelf.c:1471 src/readelf.c:1667 +#: src/readelf.c:1873 src/readelf.c:2063 src/readelf.c:2300 src/readelf.c:2558 +#: src/readelf.c:2634 src/readelf.c:2721 src/readelf.c:3301 src/readelf.c:3347 +#: src/readelf.c:3410 src/readelf.c:8320 src/readelf.c:9420 src/readelf.c:9603 +#: src/readelf.c:9671 src/size.c:413 src/size.c:482 src/strip.c:520 #, c-format msgid "cannot get section header string table index" msgstr "не вдалося визначити індекс заголовка розділу у таблиці рядків" -#: src/nm.c:784 +#: src/nm.c:787 #, c-format msgid "" "\n" @@ -4086,7 +4327,7 @@ msgstr "" "Символи з %s:\n" "\n" -#: src/nm.c:787 +#: src/nm.c:790 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -4095,68 +4336,68 @@ msgstr "" "%*s%-*s %-*s Клас Тип %-*s %*s Розділ\n" "\n" -#: src/nm.c:1173 +#: src/nm.c:1232 #, c-format -msgid "%s: entry size in section `%s' is not what we expect" -msgstr "%s: розмір запису у розділі «%s» не є очікуваним" +msgid "%s: entry size in section %zd `%s' is not what we expect" +msgstr "%s: розмір запису у розділі %zd «%s» не є очікуваним" -#: src/nm.c:1177 +#: src/nm.c:1237 #, c-format -msgid "%s: size of section `%s' is not multiple of entry size" -msgstr "%s: розмір розділу «%s» не є кратним до розміру запису" +msgid "%s: size of section %zd `%s' is not multiple of entry size" +msgstr "%s: розмір розділу %zd «%s» не є кратним до розміру запису" -#: src/nm.c:1435 +#: src/nm.c:1537 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: некоректна дія" -#: src/nm.c:1492 +#: src/nm.c:1594 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: немає символів" -#: src/objdump.c:53 +#: src/objdump.c:52 msgid "Mode selection:" msgstr "Вибір режиму:" -#: src/objdump.c:54 +#: src/objdump.c:53 msgid "Display relocation information." msgstr "Показати інформацію про пересування." -#: src/objdump.c:56 +#: src/objdump.c:55 msgid "Display the full contents of all sections requested" msgstr "Показати весь вміст всіх вказаних розділів" -#: src/objdump.c:58 +#: src/objdump.c:57 msgid "Display assembler code of executable sections" msgstr "Показати код асемблера виконуваних розділів" -#: src/objdump.c:60 +#: src/objdump.c:59 msgid "Output content selection:" msgstr "Вибір виведених даних:" -#: src/objdump.c:62 +#: src/objdump.c:61 msgid "Only display information for section NAME." msgstr "Показати інформацію лише з розділу НАЗВА." -#: src/objdump.c:68 +#: src/objdump.c:67 msgid "Show information from FILEs (a.out by default)." msgstr "Показати інформацію з ФАЙЛів (типово a.out)." -#: src/objdump.c:236 src/readelf.c:473 +#: src/objdump.c:232 src/readelf.c:479 msgid "No operation specified.\n" msgstr "Не вказано дії.\n" -#: src/objdump.c:274 src/objdump.c:286 +#: src/objdump.c:270 src/objdump.c:282 #, c-format msgid "while close `%s'" msgstr "під час закриття «%s»" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:375 src/readelf.c:1968 src/readelf.c:2160 msgid "INVALID SYMBOL" msgstr "НЕКОРЕКТНИЙ СИМВОЛ" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:390 src/readelf.c:2002 src/readelf.c:2196 msgid "INVALID SECTION" msgstr "НЕКОРЕКТНИЙ РОЗДІЛ" @@ -4175,112 +4416,107 @@ msgstr "" msgid "OFFSET" msgstr "ЗМІЩЕННЯ" -#: src/objdump.c:576 +#: src/objdump.c:578 #, c-format msgid "Contents of section %s:\n" msgstr "Вміст розділу %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:699 #, c-format msgid "cannot disassemble" msgstr "не вдалося дизасемблювати" -#: src/objdump.c:736 -#, c-format -msgid "cannot allocate memory" -msgstr "не вдалося розподілити пам’ять" - -#: src/ranlib.c:66 +#: src/ranlib.c:65 msgid "Generate an index to speed access to archives." msgstr "Створювати покажчик для пришвидшення доступу до архівів." -#: src/ranlib.c:69 +#: src/ranlib.c:68 msgid "ARCHIVE" msgstr "АРХІВ" -#: src/ranlib.c:108 +#: src/ranlib.c:104 #, c-format msgid "Archive name required" msgstr "Слід вказати назву архіву" -#: src/ranlib.c:186 +#: src/ranlib.c:182 #, c-format msgid "'%s' is no archive" msgstr "«%s» не є архівом" -#: src/ranlib.c:221 +#: src/ranlib.c:217 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "помилка під час спроби вивільнення дескриптора під-ELF: %s" -#: src/readelf.c:71 +#: src/readelf.c:72 msgid "ELF input selection:" msgstr "Вибір вихідних даних ELF:" -#: src/readelf.c:73 +#: src/readelf.c:74 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" "Використовувати вказаний за іменем РОЗДІЛ (типово .gnu_debugdata) як " "(стиснені) вхідні дані ELF" -#: src/readelf.c:75 +#: src/readelf.c:76 msgid "ELF output selection:" msgstr "Вибір виводу ELF:" -#: src/readelf.c:77 +#: src/readelf.c:78 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "Все це плюс -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:79 msgid "Display the dynamic segment" msgstr "Показувати динамічний сегмент" -#: src/readelf.c:79 +#: src/readelf.c:80 msgid "Display the ELF file header" msgstr "Показувати заголовок файла ELF" -#: src/readelf.c:81 +#: src/readelf.c:82 msgid "Display histogram of bucket list lengths" msgstr "Показати гістограму довжин списку блоків" -#: src/readelf.c:82 +#: src/readelf.c:83 msgid "Display the program headers" msgstr "Показувати заголовки програми" -#: src/readelf.c:84 +#: src/readelf.c:85 msgid "Display relocations" msgstr "Показувати пересування" -#: src/readelf.c:85 +#: src/readelf.c:86 msgid "Display the sections' headers" msgstr "Показувати заголовки розділів" -#: src/readelf.c:87 +#: src/readelf.c:88 msgid "Display the symbol table" msgstr "Показувати таблицю символів" -#: src/readelf.c:88 +#: src/readelf.c:89 msgid "Display versioning information" msgstr "Показувати відомості щодо версії" -#: src/readelf.c:89 +#: src/readelf.c:90 msgid "Display the ELF notes" msgstr "Показувати нотатки ELF" -#: src/readelf.c:91 +#: src/readelf.c:92 msgid "Display architecture specific information, if any" msgstr "Показувати специфічні для архітектури дані, якщо такі буде виявлено" -#: src/readelf.c:93 +#: src/readelf.c:94 msgid "Display sections for exception handling" msgstr "Показувати розділи для обробки виключень" -#: src/readelf.c:95 +#: src/readelf.c:96 msgid "Additional output selection:" msgstr "Додатковий вибір виводу:" -#: src/readelf.c:97 +#: src/readelf.c:98 msgid "" "Display DWARF section content. SECTION can be one of abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " @@ -4290,167 +4526,173 @@ msgstr "" "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro або exception" -#: src/readelf.c:101 +#: src/readelf.c:102 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "" "Створити дамп даних РОЗДІЛ, які не вдалося інтерпретувати, за номером або " "назвами" -#: src/readelf.c:103 +#: src/readelf.c:104 msgid "Print string contents of sections" msgstr "Виводити вміст рядків розділів" -#: src/readelf.c:106 +#: src/readelf.c:107 msgid "Display the symbol index of an archive" msgstr "Показувати покажчик символів архіву" -#: src/readelf.c:108 +#: src/readelf.c:109 msgid "Output control:" msgstr "Керування виводом:" -#: src/readelf.c:110 +#: src/readelf.c:111 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Не шукати назви символів для адрес у даних DWARF" -#: src/readelf.c:112 +#: src/readelf.c:113 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "Показати лише зміщення, а не визначені значення адреси у даних DWARF" -#: src/readelf.c:114 +#: src/readelf.c:115 msgid "Ignored for compatibility (lines always wide)" msgstr "Ігнорується з міркувань сумісності (рядки завжди широкі)" -#: src/readelf.c:119 +#: src/readelf.c:117 +msgid "" +"Show compression information for compressed sections (when used with -S); " +"decompress section before dumping data (when used with -p or -x)" +msgstr "" + +#: src/readelf.c:122 msgid "Print information from ELF file in human-readable form." msgstr "Виводити відомості з файла ELF у придатному для читання форматі." -#: src/readelf.c:441 +#: src/readelf.c:447 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Невідомий діагностичний розділ DWARF «%s».\n" -#: src/readelf.c:520 src/readelf.c:631 +#: src/readelf.c:529 src/readelf.c:640 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "не вдалося створити дескриптор Elf: %s" -#: src/readelf.c:545 src/readelf.c:1099 src/readelf.c:1269 +#: src/readelf.c:554 src/readelf.c:1145 src/readelf.c:1347 #, c-format msgid "cannot get section: %s" msgstr "не вдалося отримати розділ: %s" -#: src/readelf.c:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9169 -#: src/unstrip.c:352 src/unstrip.c:383 src/unstrip.c:432 src/unstrip.c:540 -#: src/unstrip.c:557 src/unstrip.c:593 src/unstrip.c:791 src/unstrip.c:1059 -#: src/unstrip.c:1250 src/unstrip.c:1310 src/unstrip.c:1431 src/unstrip.c:1484 -#: src/unstrip.c:1591 src/unstrip.c:1780 +#: src/readelf.c:563 src/readelf.c:1152 src/readelf.c:1355 src/readelf.c:9623 +#: src/unstrip.c:387 src/unstrip.c:418 src/unstrip.c:467 src/unstrip.c:577 +#: src/unstrip.c:594 src/unstrip.c:631 src/unstrip.c:829 src/unstrip.c:1118 +#: src/unstrip.c:1309 src/unstrip.c:1369 src/unstrip.c:1490 src/unstrip.c:1543 +#: src/unstrip.c:1658 src/unstrip.c:1796 src/unstrip.c:1891 #, c-format msgid "cannot get section header: %s" msgstr "не вдалося отримати заголовок розділу: %s" -#: src/readelf.c:562 +#: src/readelf.c:571 #, c-format msgid "cannot get section name" msgstr "не вдалося отримати назву розділу" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:580 src/readelf.c:5504 src/readelf.c:7778 src/readelf.c:7880 +#: src/readelf.c:8057 #, c-format msgid "cannot get %s content: %s" msgstr "не вдалося отримати дані %s: %s" -#: src/readelf.c:587 +#: src/readelf.c:596 #, c-format msgid "cannot create temp file '%s'" msgstr "не вдалося створити файл тимчасових даних «%s»" -#: src/readelf.c:596 +#: src/readelf.c:605 #, c-format msgid "cannot write section data" msgstr "не вдалося записати дані розділу" -#: src/readelf.c:602 src/readelf.c:619 src/readelf.c:648 +#: src/readelf.c:611 src/readelf.c:628 src/readelf.c:657 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "помилка під час спроби закриття дескриптора Elf: %s" -#: src/readelf.c:609 +#: src/readelf.c:618 #, c-format msgid "error while rewinding file descriptor" msgstr "помилка під час повернення до початкового значення дескриптора файла" -#: src/readelf.c:643 +#: src/readelf.c:652 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "«%s» не є архівом, виведення покажчика архіву неможливе" -#: src/readelf.c:742 +#: src/readelf.c:751 #, c-format msgid "No such section '%s' in '%s'" msgstr "У «%2$s» немає розділу «%1$s»" -#: src/readelf.c:769 +#: src/readelf.c:778 #, c-format msgid "cannot stat input file" msgstr "не вдалося отримати дані з вхідного файла за допомогою stat" -#: src/readelf.c:771 +#: src/readelf.c:780 #, c-format msgid "input file is empty" msgstr "вхідний файл є порожнім" -#: src/readelf.c:773 +#: src/readelf.c:782 #, c-format msgid "failed reading '%s': %s" msgstr "не вдалося прочитати «%s»: %s" -#: src/readelf.c:814 +#: src/readelf.c:837 #, c-format msgid "cannot read ELF header: %s" msgstr "не вдалося прочитати заголовок ELF: %s" -#: src/readelf.c:822 +#: src/readelf.c:845 #, c-format msgid "cannot create EBL handle" msgstr "не вдалося створити дескриптор EBL" -#: src/readelf.c:835 +#: src/readelf.c:858 #, c-format msgid "cannot determine number of program headers: %s" msgstr "не вдалося визначити кількість заголовків програми: %s" -#: src/readelf.c:921 +#: src/readelf.c:948 msgid "NONE (None)" msgstr "NONE (Немає)" -#: src/readelf.c:922 +#: src/readelf.c:949 msgid "REL (Relocatable file)" msgstr "REL (Придатний до пересування файл)" -#: src/readelf.c:923 +#: src/readelf.c:950 msgid "EXEC (Executable file)" msgstr "EXEC (Виконуваний файл)" -#: src/readelf.c:924 +#: src/readelf.c:951 msgid "DYN (Shared object file)" msgstr "DYN (Файл об’єктів спільного використання)" -#: src/readelf.c:925 +#: src/readelf.c:952 msgid "CORE (Core file)" msgstr "CORE (Файл ядра)" -#: src/readelf.c:930 +#: src/readelf.c:957 #, c-format msgid "OS Specific: (%x)\n" msgstr "ОС-специфічне: (%x)\n" -#: src/readelf.c:932 +#: src/readelf.c:959 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Специфічне для процесора: (%x)\n" -#: src/readelf.c:942 +#: src/readelf.c:969 msgid "" "ELF Header:\n" " Magic: " @@ -4458,7 +4700,7 @@ msgstr "" "Заголовок ELF:\n" " Magic: " -#: src/readelf.c:946 +#: src/readelf.c:973 #, c-format msgid "" "\n" @@ -4467,117 +4709,117 @@ msgstr "" "\n" " Клас: %s\n" -#: src/readelf.c:951 +#: src/readelf.c:978 #, c-format msgid " Data: %s\n" msgstr " Дані: %s\n" -#: src/readelf.c:957 +#: src/readelf.c:984 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Версія Ident: %hhd %s\n" -#: src/readelf.c:959 src/readelf.c:976 +#: src/readelf.c:986 src/readelf.c:1003 msgid "(current)" msgstr "(поточний)" -#: src/readelf.c:963 +#: src/readelf.c:990 #, c-format msgid " OS/ABI: %s\n" msgstr " ОС/ABI: %s\n" -#: src/readelf.c:966 +#: src/readelf.c:993 #, c-format msgid " ABI Version: %hhd\n" msgstr " Версія ABI: %hhd\n" -#: src/readelf.c:969 +#: src/readelf.c:996 msgid " Type: " msgstr " Тип: " -#: src/readelf.c:972 +#: src/readelf.c:999 #, c-format msgid " Machine: %s\n" msgstr " Архітектура: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1001 #, c-format msgid " Version: %d %s\n" msgstr " Версія: %d %s\n" -#: src/readelf.c:978 +#: src/readelf.c:1005 #, c-format msgid " Entry point address: %#\n" msgstr " Адреса вхідної точки: %#\n" -#: src/readelf.c:981 +#: src/readelf.c:1008 #, c-format msgid " Start of program headers: % %s\n" msgstr " Початок заголовків програм: % %s\n" -#: src/readelf.c:982 src/readelf.c:985 +#: src/readelf.c:1009 src/readelf.c:1012 msgid "(bytes into file)" msgstr "(байтів у файл)" -#: src/readelf.c:984 +#: src/readelf.c:1011 #, c-format msgid " Start of section headers: % %s\n" msgstr " Початок заголовків розділів: % %s\n" -#: src/readelf.c:987 +#: src/readelf.c:1014 #, c-format msgid " Flags: %s\n" msgstr " Прапорці: %s\n" -#: src/readelf.c:990 +#: src/readelf.c:1017 #, c-format msgid " Size of this header: % %s\n" msgstr " Розмір цього заголовка: % %s\n" -#: src/readelf.c:991 src/readelf.c:994 src/readelf.c:1011 +#: src/readelf.c:1018 src/readelf.c:1021 src/readelf.c:1038 msgid "(bytes)" msgstr "(байтів)" -#: src/readelf.c:993 +#: src/readelf.c:1020 #, c-format msgid " Size of program header entries: % %s\n" msgstr " Розмір записів заголовка програми: % %s\n" -#: src/readelf.c:996 +#: src/readelf.c:1023 #, c-format msgid " Number of program headers entries: %" msgstr " Кількість записів заголовків програми: %" -#: src/readelf.c:1003 +#: src/readelf.c:1030 #, c-format msgid " (% in [0].sh_info)" msgstr " (% у [0].sh_info)" -#: src/readelf.c:1006 src/readelf.c:1023 src/readelf.c:1037 +#: src/readelf.c:1033 src/readelf.c:1050 src/readelf.c:1064 msgid " ([0] not available)" msgstr " ([0] недоступний)" -#: src/readelf.c:1010 +#: src/readelf.c:1037 #, c-format msgid " Size of section header entries: % %s\n" msgstr " Розмір записів заголовків розділів: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1040 #, c-format msgid " Number of section headers entries: %" msgstr " Кількість записів заголовків розділів: %" -#: src/readelf.c:1020 +#: src/readelf.c:1047 #, c-format msgid " (% in [0].sh_size)" msgstr " (% у [0].sh_size)" -#: src/readelf.c:1033 +#: src/readelf.c:1060 #, c-format msgid " (% in [0].sh_link)" msgstr " (% у [0].sh_link)" -#: src/readelf.c:1041 +#: src/readelf.c:1068 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4586,7 +4828,7 @@ msgstr "" " Індекс заголовка розділу у таблиці рядків: XINDEX%s\n" "\n" -#: src/readelf.c:1045 +#: src/readelf.c:1072 #, c-format msgid "" " Section header string table index: %\n" @@ -4595,7 +4837,7 @@ msgstr "" " Індекс заголовка розділу у таблиці рядків: %\n" "\n" -#: src/readelf.c:1077 +#: src/readelf.c:1115 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4604,11 +4846,11 @@ msgstr "" "Виявлено %d заголовків розділів, зміщення початку — %#:\n" "\n" -#: src/readelf.c:1087 +#: src/readelf.c:1125 msgid "Section Headers:" msgstr "Заголовки розділів:" -#: src/readelf.c:1090 +#: src/readelf.c:1128 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4616,7 +4858,7 @@ msgstr "" "[№ ] Назва Тип Адр Змі Розмір ES Прап Lk " "Інф Al" -#: src/readelf.c:1092 +#: src/readelf.c:1130 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4624,17 +4866,35 @@ msgstr "" "[№ ] Назва Тип Адр Змі Розмір ES " "Прап Lk Інф Al" -#: src/readelf.c:1164 +#: src/readelf.c:1135 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1137 +msgid " [Compression Size Al]" +msgstr "" + +#: src/readelf.c:1213 +#, fuzzy, c-format +msgid "bad compression header for section %zd: %s" +msgstr "не вдалося отримати заголовок розділу %zu: %s" + +#: src/readelf.c:1224 +#, fuzzy, c-format +msgid "bad gnu compressed size for section %zd: %s" +msgstr "не вдалося отримати дані для розділу %d: %s" + +#: src/readelf.c:1242 msgid "Program Headers:" msgstr "Заголовки програми:" -#: src/readelf.c:1166 +#: src/readelf.c:1244 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Тип Зміщен ВіртАдр ФізАдр РозмФайл РозмПам Пра Вирів" -#: src/readelf.c:1169 +#: src/readelf.c:1247 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4642,12 +4902,12 @@ msgstr "" " Тип Зміщен ВіртАдр ФізАдр " "РозмФайлРозмПам Пра Вирів" -#: src/readelf.c:1226 +#: src/readelf.c:1304 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Запит щодо інтерпретатора програми: %s]\n" -#: src/readelf.c:1247 +#: src/readelf.c:1325 msgid "" "\n" " Section to Segment mapping:\n" @@ -4657,12 +4917,12 @@ msgstr "" " Відображення розділів на сегмент:\n" " Розділи сегмента..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1336 src/unstrip.c:1950 src/unstrip.c:1992 src/unstrip.c:1999 #, c-format msgid "cannot get program header: %s" msgstr "не вдалося отримати заголовок програми: %s" -#: src/readelf.c:1401 +#: src/readelf.c:1479 #, c-format msgid "" "\n" @@ -4680,7 +4940,7 @@ msgstr[2] "" "\n" "Група розділів COMDAT [%2zu] «%s» з підписом «%s» містить %zu записів:\n" -#: src/readelf.c:1406 +#: src/readelf.c:1484 #, c-format msgid "" "\n" @@ -4698,21 +4958,25 @@ msgstr[2] "" "\n" "Група розділів [%2zu] «%s» з підписом «%s» містить %zu записів:\n" -#: src/readelf.c:1414 +#: src/readelf.c:1492 msgid "" msgstr "<НЕКОРЕКТНИЙ СИМВОЛ>" -#: src/readelf.c:1428 +#: src/readelf.c:1506 msgid "" msgstr "<НЕКОРЕКТНИЙ РОЗДІЛ>" -#: src/readelf.c:1585 src/readelf.c:2202 src/readelf.c:2460 src/readelf.c:2530 -#: src/readelf.c:2812 src/readelf.c:2885 src/readelf.c:4488 -#, fuzzy, c-format -msgid "invalid sh_link value in section %Zu" -msgstr "некоректний розділ .debug_line" +#: src/readelf.c:1529 src/readelf.c:2238 src/readelf.c:3317 +msgid "Couldn't uncompress section" +msgstr "" + +#: src/readelf.c:1673 src/readelf.c:2306 src/readelf.c:2564 src/readelf.c:2640 +#: src/readelf.c:2944 src/readelf.c:3018 src/readelf.c:4716 +#, c-format +msgid "invalid sh_link value in section %zu" +msgstr "некоректне значення sh_link у розділі %zu" -#: src/readelf.c:1588 +#: src/readelf.c:1676 #, c-format msgid "" "\n" @@ -4735,36 +4999,36 @@ msgstr[2] "" "Динамічний сегмент містить %lu записів:\n" " Адр: %#0* Зміщення: %#08 Пос. на розділ: [%2u] '%s'\n" -#: src/readelf.c:1598 +#: src/readelf.c:1686 msgid " Type Value\n" msgstr " Тип Значення\n" -#: src/readelf.c:1622 +#: src/readelf.c:1710 #, c-format msgid "Shared library: [%s]\n" msgstr "Спільна бібліотека: [%s]\n" -#: src/readelf.c:1627 +#: src/readelf.c:1715 #, c-format msgid "Library soname: [%s]\n" msgstr "Назва so бібліотеки: [%s]\n" -#: src/readelf.c:1632 +#: src/readelf.c:1720 #, c-format msgid "Library rpath: [%s]\n" msgstr "Rpath бібліотеки: [%s]\n" -#: src/readelf.c:1637 +#: src/readelf.c:1725 #, c-format msgid "Library runpath: [%s]\n" msgstr "Runpath бібліотеки: [%s]\n" -#: src/readelf.c:1657 +#: src/readelf.c:1745 #, c-format msgid "% (bytes)\n" msgstr "% (байт)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1858 src/readelf.c:2048 #, c-format msgid "" "\n" @@ -4773,7 +5037,7 @@ msgstr "" "\n" "Некоректна таблиця символів за зміщенням %#0\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1876 src/readelf.c:2066 #, c-format msgid "" "\n" @@ -4796,7 +5060,7 @@ msgstr[2] "" "Розділ пересування [%2zu] «%s» для розділу [%2u] «%s» за зміщенням " "%#0 містить %d записів:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1891 src/readelf.c:2081 #, c-format msgid "" "\n" @@ -4814,30 +5078,30 @@ msgstr[2] "" "\n" "Розділ пересування [%2u] «%s» за зміщенням %#0 містить %d записів:\n" -#: src/readelf.c:1813 +#: src/readelf.c:1901 msgid " Offset Type Value Name\n" msgstr " Зміщення Тип Значення Назва\n" -#: src/readelf.c:1815 +#: src/readelf.c:1903 msgid " Offset Type Value Name\n" msgstr " Зміщення Тип Значення Назва\n" -#: src/readelf.c:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1910 -#: src/readelf.c:1922 src/readelf.c:2056 src/readelf.c:2068 src/readelf.c:2082 -#: src/readelf.c:2101 src/readelf.c:2114 +#: src/readelf.c:1956 src/readelf.c:1967 src/readelf.c:1980 src/readelf.c:2001 +#: src/readelf.c:2013 src/readelf.c:2147 src/readelf.c:2159 src/readelf.c:2173 +#: src/readelf.c:2195 src/readelf.c:2208 msgid "" msgstr "<НЕКОРЕКТНЕ ПЕРЕМІЩЕННЯ>" -#: src/readelf.c:2000 +#: src/readelf.c:2091 msgid " Offset Type Value Addend Name\n" msgstr " Зміщення Тип Значення Назва додатка\n" -#: src/readelf.c:2002 +#: src/readelf.c:2093 msgid " Offset Type Value Addend Name\n" msgstr "" " Зміщення Тип Значення Назва додатка\n" -#: src/readelf.c:2210 +#: src/readelf.c:2314 #, c-format msgid "" "\n" @@ -4855,7 +5119,7 @@ msgstr[2] "" "\n" "Таблиця символів [%2u] «%s» містить %u записів:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2319 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" @@ -4863,33 +5127,33 @@ msgstr[0] " %lu лок. символ Таблиця символів: [%2u] « msgstr[1] " %lu лок. символи Таблиця символів: [%2u] «%s»\n" msgstr[2] " %lu лок. символів Таблиця символів: [%2u] «%s»\n" -#: src/readelf.c:2223 +#: src/readelf.c:2327 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " №№ Знач. Роз. Тип Зв’яз Вид. Інд Назва\n" -#: src/readelf.c:2225 +#: src/readelf.c:2329 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " №№ Знач. Роз. Тип Зв’яз Вид. Інд Назва\n" -#: src/readelf.c:2245 +#: src/readelf.c:2349 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2437 #, c-format msgid "bad dynamic symbol" msgstr "помилковий динамічний символ" -#: src/readelf.c:2415 +#: src/readelf.c:2519 msgid "none" msgstr "немає" -#: src/readelf.c:2432 +#: src/readelf.c:2536 msgid "| " msgstr "| <невідомо>" -#: src/readelf.c:2463 +#: src/readelf.c:2567 #, c-format msgid "" "\n" @@ -4912,17 +5176,17 @@ msgstr[2] "" "Розділ потреби у версіях [%2u] «%s», що містить %d записів:\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2484 +#: src/readelf.c:2588 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Версія: %hu Файл: %s Кть: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2601 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Назва: %s Прап: %s Версія: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2644 #, c-format msgid "" "\n" @@ -4945,17 +5209,17 @@ msgstr[2] "" "Розділ визначення версії [%2u] «%s», що містить %d записів:\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2562 +#: src/readelf.c:2672 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr " %#06x: Версія: %hd Прап.: %s Індекс: %hd К-ть: %hd Назва: %s\n" -#: src/readelf.c:2577 +#: src/readelf.c:2687 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: батьківський %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2948 #, c-format msgid "" "\n" @@ -4978,15 +5242,15 @@ msgstr[2] "" "Розділ символів версій [%2u] «%s», що містить %d записів:\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»" -#: src/readelf.c:2844 +#: src/readelf.c:2976 msgid " 0 *local* " msgstr " 0 *локальний* " -#: src/readelf.c:2849 +#: src/readelf.c:2981 msgid " 1 *global* " msgstr " 1 *загальний* " -#: src/readelf.c:2890 +#: src/readelf.c:3023 #, c-format msgid "" "\n" @@ -5014,22 +5278,22 @@ msgstr[2] "" "блоками):\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2912 +#: src/readelf.c:3045 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Довжина Номер % від загал. Покриття\n" -#: src/readelf.c:2914 +#: src/readelf.c:3047 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:3054 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:3067 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -5038,12 +5302,27 @@ msgstr "" " Середня кількість тестів: успішний пошук: %f\n" "\t\t\t неуспішний пошук: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:3085 src/readelf.c:3140 src/readelf.c:3197 #, c-format msgid "cannot get data for section %d: %s" msgstr "не вдалося отримати дані для розділу %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:3093 +#, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "некоректні дані у розділі sysv.hash %d" + +#: src/readelf.c:3148 +#, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "некоректні дані у розділі sysv.hash64 %d" + +#: src/readelf.c:3206 +#, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "некоректні дані у розділі gnu.hash %d" + +#: src/readelf.c:3273 #, c-format msgid "" " Symbol Bias: %u\n" @@ -5053,7 +5332,7 @@ msgstr "" " Розмір бітової маски: %zu байтів %%% встановлених бітів зсув " "2-го хешу: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3358 #, c-format msgid "" "\n" @@ -5074,7 +5353,7 @@ msgstr[2] "" "Розділ списку бібліотек [%2zu] «%s» за зміщенням %#0 містить %d " "записів:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3372 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -5082,7 +5361,7 @@ msgstr "" " Бібліотека Часовий штамп Версія суми " "Прапорці" -#: src/readelf.c:3228 +#: src/readelf.c:3422 #, c-format msgid "" "\n" @@ -5093,140 +5372,140 @@ msgstr "" "Розділ атрибутів об’єктів [%2zu] «%s» з % байтів за зміщенням " "%#0:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3439 msgid " Owner Size\n" msgstr " Власник Розмір\n" -#: src/readelf.c:3270 +#: src/readelf.c:3468 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" -#: src/readelf.c:3302 +#: src/readelf.c:3507 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" -#: src/readelf.c:3307 +#: src/readelf.c:3512 #, c-format msgid " File: %11\n" msgstr " Файл: %11\n" -#: src/readelf.c:3342 +#: src/readelf.c:3561 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3564 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3348 +#: src/readelf.c:3567 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3577 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3358 +#: src/readelf.c:3580 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3625 #, c-format msgid "%s+%# <%s+%#>" msgstr "%s+%# <%s+%#>" -#: src/readelf.c:3406 +#: src/readelf.c:3628 #, c-format msgid "%s+%#0* <%s+%#>" msgstr "%s+%#0* <%s+%#>" -#: src/readelf.c:3411 +#: src/readelf.c:3633 #, c-format msgid "%# <%s+%#>" msgstr "%# <%s+%#>" -#: src/readelf.c:3414 +#: src/readelf.c:3636 #, c-format msgid "%#0* <%s+%#>" msgstr "%#0* <%s+%#>" -#: src/readelf.c:3420 +#: src/readelf.c:3642 #, c-format msgid "%s+%# <%s>" msgstr "%s+%# <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3645 #, c-format msgid "%s+%#0* <%s>" msgstr "%s+%#0* <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3649 #, c-format msgid "%# <%s>" msgstr "%# <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3652 #, c-format msgid "%#0* <%s>" msgstr "%#0* <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3657 #, c-format msgid "%s+%#" msgstr "%s+%#" -#: src/readelf.c:3438 +#: src/readelf.c:3660 #, c-format msgid "%s+%#0*" msgstr "%s+%#0*" -#: src/readelf.c:3820 +#: src/readelf.c:4038 msgid "empty block" msgstr "порожній блок" -#: src/readelf.c:3823 +#: src/readelf.c:4041 #, c-format msgid "%zu byte block:" msgstr "%zu-байтовий блок:" -#: src/readelf.c:4217 +#: src/readelf.c:4438 #, c-format msgid "%*s[%4] %s \n" msgstr "%*s[%4] %s <ОБРІЗАНО>\n" -#: src/readelf.c:4274 +#: src/readelf.c:4495 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# використано з різними розмірами адрес" -#: src/readelf.c:4281 +#: src/readelf.c:4502 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# використано з різними розмірами зміщень" -#: src/readelf.c:4288 +#: src/readelf.c:4509 #, c-format msgid "%s %# used with different base addresses" msgstr "%s %# використано з різними базовими адресами" -#: src/readelf.c:4370 +#: src/readelf.c:4598 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] <НЕВИКОРИСТОВУВАНІ ДАНІ У РЕШТІ РОЗДІЛУ>\n" -#: src/readelf.c:4378 +#: src/readelf.c:4606 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] <НЕВИКОРИСТОВУВАНІ ДАНІ> ... % байтів ...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4632 #, c-format msgid "" "\n" @@ -5237,7 +5516,7 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" " [ Код]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4640 #, c-format msgid "" "\n" @@ -5246,30 +5525,30 @@ msgstr "" "\n" "Розділ скорочень за зміщенням %:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4653 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** помилка під час читання скорочення: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4669 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] зміщення: %, дочірній: %s, мітка: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "yes" msgstr "так" -#: src/readelf.c:4444 +#: src/readelf.c:4672 msgid "no" msgstr "ні" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4706 src/readelf.c:4779 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "не вдалося отримати дані get .debug_aranges: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4721 #, c-format msgid "" "\n" @@ -5287,12 +5566,12 @@ msgstr[2] "" "\n" "Розділ DWARF [%2zu] «%s» за зміщенням %# містить %zu записів:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4752 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4754 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" @@ -5300,8 +5579,8 @@ msgstr "" " [%*zu] початок: %0#*, довжина: %5, зміщення CU DIE: " "%6\n" -#: src/readelf.c:4556 src/readelf.c:4710 src/readelf.c:5231 src/readelf.c:6145 -#: src/readelf.c:6646 src/readelf.c:6766 src/readelf.c:6922 src/readelf.c:7345 +#: src/readelf.c:4784 src/readelf.c:4938 src/readelf.c:5514 src/readelf.c:6468 +#: src/readelf.c:7000 src/readelf.c:7120 src/readelf.c:7284 src/readelf.c:7709 #, c-format msgid "" "\n" @@ -5310,21 +5589,21 @@ msgstr "" "\n" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4797 src/readelf.c:6494 #, c-format msgid "" "\n" -"Table at offset %Zu:\n" +"Table at offset %zu:\n" msgstr "" "\n" -"Таблиця за зміщенням %Zu:\n" +"Таблиця за зміщенням %zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4801 src/readelf.c:5538 src/readelf.c:6505 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "некоректні дані у розділі [%zu] «%s»" -#: src/readelf.c:4589 +#: src/readelf.c:4817 #, c-format msgid "" "\n" @@ -5333,32 +5612,32 @@ msgstr "" "\n" " Довжина: %6\n" -#: src/readelf.c:4601 +#: src/readelf.c:4829 #, c-format msgid " DWARF version: %6\n" msgstr " версія DWARF: %6\n" -#: src/readelf.c:4605 +#: src/readelf.c:4833 #, c-format msgid "unsupported aranges version" msgstr "непідтримувана версія aranges" -#: src/readelf.c:4616 +#: src/readelf.c:4844 #, c-format msgid " CU offset: %6\n" msgstr " зміщення CU: %6\n" -#: src/readelf.c:4622 +#: src/readelf.c:4850 #, c-format msgid " Address size: %6\n" msgstr " Розмір адреси: %6\n" -#: src/readelf.c:4626 +#: src/readelf.c:4854 #, c-format msgid "unsupported address size" msgstr "непідтримуваний розмір адреси" -#: src/readelf.c:4631 +#: src/readelf.c:4859 #, c-format msgid "" " Segment size: %6\n" @@ -5367,62 +5646,66 @@ msgstr "" " Розмір сегмента: %6\n" "\n" -#: src/readelf.c:4635 +#: src/readelf.c:4863 #, c-format msgid "unsupported segment size" msgstr "непідтримуваний розмір сегмента" -#: src/readelf.c:4675 +#: src/readelf.c:4903 #, c-format msgid " %s..%s (%)\n" msgstr " %s..%s (%)\n" -#: src/readelf.c:4678 +#: src/readelf.c:4906 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4915 #, c-format -msgid " %Zu padding bytes\n" -msgstr " %Zu байтів доповнення\n" +msgid " %zu padding bytes\n" +msgstr " %zu байтів доповнення\n" -#: src/readelf.c:4705 +#: src/readelf.c:4933 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "не вдалося отримати дані .debug_ranges: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4963 src/readelf.c:7027 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] <НЕКОРЕКТНІ ДАНІ>\n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4985 src/readelf.c:7049 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] базова адреса %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4992 src/readelf.c:7056 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] порожній список\n" -#: src/readelf.c:4775 +#: src/readelf.c:5003 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:5005 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5184 +msgid " \n" +msgstr " <НЕКОРЕКТНІ ДАНІ>\n" + +#: src/readelf.c:5493 #, c-format msgid "cannot get ELF: %s" msgstr "не вдалося отримати ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5510 #, c-format msgid "" "\n" @@ -5431,7 +5714,7 @@ msgstr "" "\n" "Розділ відомостей щодо вікна викликів [%2zu] «%s» за зміщенням %#:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5560 #, c-format msgid "" "\n" @@ -5440,50 +5723,50 @@ msgstr "" "\n" " [%6tx] нульовий переривач\n" -#: src/readelf.c:5362 +#: src/readelf.c:5653 src/readelf.c:5808 #, c-format msgid "invalid augmentation length" msgstr "некоректна довжина збільшення" -#: src/readelf.c:5374 +#: src/readelf.c:5668 msgid "FDE address encoding: " msgstr "Кодування адреси FDE: " -#: src/readelf.c:5380 +#: src/readelf.c:5674 msgid "LSDA pointer encoding: " msgstr "Кодування вказівника LSDA: " -#: src/readelf.c:5491 +#: src/readelf.c:5785 #, c-format msgid " (offset: %#)" msgstr " (зміщення: %#)" -#: src/readelf.c:5498 +#: src/readelf.c:5792 #, c-format msgid " (end offset: %#)" msgstr " (зміщення від кінця: %#)" -#: src/readelf.c:5525 +#: src/readelf.c:5829 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sвказівник LSDA: %#\n" -#: src/readelf.c:5577 +#: src/readelf.c:5884 #, c-format msgid "cannot get attribute code: %s" msgstr "не вдалося отримати код атрибута: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5893 #, c-format msgid "cannot get attribute form: %s" msgstr "не вдалося отримати форму атрибута: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5908 #, c-format msgid "cannot get attribute value: %s" msgstr "не вдалося отримати значення атрибута: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6207 #, c-format msgid "" "\n" @@ -5494,7 +5777,7 @@ msgstr "" "Розділ DWARF [%2zu] «%s» за зміщенням %#:\n" " [Зміщення]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6239 #, c-format msgid "" " Type unit at offset %:\n" @@ -5507,7 +5790,7 @@ msgstr "" "Зміщення: %\n" " Підпис типу: %#, Зміщення типу: %#\n" -#: src/readelf.c:5935 +#: src/readelf.c:6248 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5518,33 +5801,33 @@ msgstr "" " Версія: %, Зміщення розділу скорочень: %, Адреса: %, " "Зміщення: %\n" -#: src/readelf.c:5960 +#: src/readelf.c:6273 #, c-format msgid "cannot get DIE at offset % in section '%s': %s" msgstr "не вдалося отримати DIE за зміщенням % у розділі «%s»: %s" -#: src/readelf.c:5974 +#: src/readelf.c:6287 #, c-format msgid "cannot get DIE offset: %s" msgstr "не вдалося отримати зміщення DIE: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6296 #, c-format msgid "cannot get tag of DIE at offset % in section '%s': %s" msgstr "" "не вдалося отримати мітку DIE за зміщенням % у розділі «%s»: %s" -#: src/readelf.c:6015 +#: src/readelf.c:6328 #, c-format msgid "cannot get next DIE: %s\n" msgstr "не вдалося визначити наступний DIE: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6336 #, c-format msgid "cannot get next DIE: %s" msgstr "не вдалося визначити наступний DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6372 #, c-format msgid "" "\n" @@ -5555,12 +5838,12 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" "\n" -#: src/readelf.c:6158 +#: src/readelf.c:6481 #, c-format msgid "cannot get line data section data: %s" msgstr "не вдалося отримати дані розділу лінійних даних: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6551 #, c-format msgid "" "\n" @@ -5589,12 +5872,12 @@ msgstr "" "\n" "Коди операцій:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6572 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "некоректні дані зі зміщенням %tu у розділі [%zu] «%s»" -#: src/readelf.c:6262 +#: src/readelf.c:6587 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" @@ -5602,7 +5885,7 @@ msgstr[0] " [%*] %hhu аргумент\n" msgstr[1] " [%*] %hhu аргументи\n" msgstr[2] " [%*] %hhu аргументів\n" -#: src/readelf.c:6270 +#: src/readelf.c:6595 msgid "" "\n" "Directory table:" @@ -5610,7 +5893,7 @@ msgstr "" "\n" "Таблиця каталогу:" -#: src/readelf.c:6286 +#: src/readelf.c:6611 msgid "" "\n" "File name table:\n" @@ -5620,7 +5903,7 @@ msgstr "" "Таблиця назв файлів:\n" " Запис Кат Час Розмір Назва" -#: src/readelf.c:6315 +#: src/readelf.c:6646 msgid "" "\n" "Line number statements:" @@ -5628,115 +5911,120 @@ msgstr "" "\n" "Оператори номерів рядків:" -#: src/readelf.c:6391 +#: src/readelf.c:6697 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "некоректну кількість операцій на інструкцію прирівняно до нуля" + +#: src/readelf.c:6733 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr "" " спеціальний код операції %u: адреса+%u = %s, індекс_оп = %u, рядок%+d = " "%zu\n" -#: src/readelf.c:6396 +#: src/readelf.c:6738 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr " спеціальний код операції %u: адреса+%u = %s, рядок%+d = %zu\n" -#: src/readelf.c:6416 +#: src/readelf.c:6758 #, c-format msgid " extended opcode %u: " msgstr " розширений код операції %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6763 msgid " end of sequence" msgstr " кінець послідовності" -#: src/readelf.c:6438 +#: src/readelf.c:6782 #, c-format msgid " set address to %s\n" msgstr " встановити адресу у значення %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6809 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" " визначення нового файла: dir=%u, mtime=%, довжина=%, назва=" "%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6822 #, c-format msgid " set discriminator to %u\n" msgstr " встановити розрізнення для %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6827 msgid " unknown opcode" msgstr " невідомий код операції" -#: src/readelf.c:6489 +#: src/readelf.c:6839 msgid " copy" msgstr " копія" -#: src/readelf.c:6500 +#: src/readelf.c:6850 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr " збільшення адреси на %u до %s, індекс_оп до %u\n" -#: src/readelf.c:6504 +#: src/readelf.c:6854 #, c-format msgid " advance address by %u to %s\n" msgstr " збільшення адреси на %u до %s\n" -#: src/readelf.c:6515 +#: src/readelf.c:6865 #, c-format msgid " advance line by constant %d to %\n" msgstr " просувати рядок на сталу %d до %\n" -#: src/readelf.c:6523 +#: src/readelf.c:6873 #, c-format msgid " set file to %\n" msgstr " встановити файл у %\n" -#: src/readelf.c:6533 +#: src/readelf.c:6883 #, c-format msgid " set column to %\n" msgstr " встановити значення стовпчика %\n" -#: src/readelf.c:6540 +#: src/readelf.c:6890 #, c-format msgid " set '%s' to %\n" msgstr " встановити «%s» у %\n" -#: src/readelf.c:6546 +#: src/readelf.c:6896 msgid " set basic block flag" msgstr " встановити прапорець базового блоку" -#: src/readelf.c:6555 +#: src/readelf.c:6909 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr " збільшити адресу на сталу величину %u до %s, індекс_оп до %u\n" -#: src/readelf.c:6559 +#: src/readelf.c:6913 #, c-format msgid " advance address by constant %u to %s\n" msgstr " збільшити адресу на сталу величину %u до %s\n" -#: src/readelf.c:6577 +#: src/readelf.c:6931 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr " збільшити адресу на фіксовану величину %u до %s\n" -#: src/readelf.c:6586 +#: src/readelf.c:6940 msgid " set prologue end flag" msgstr " встановити прапорець кінця вступу" -#: src/readelf.c:6591 +#: src/readelf.c:6945 msgid " set epilogue begin flag" msgstr " встановити прапорець початку епілогу" -#: src/readelf.c:6600 +#: src/readelf.c:6954 #, c-format msgid " set isa to %u\n" msgstr " встановити isa у %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6963 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" @@ -5744,97 +6032,102 @@ msgstr[0] " невідомий код операції з % параме msgstr[1] " невідомий код операції з % параметрами:" msgstr[2] " невідомий код операції з % параметрами:" -#: src/readelf.c:6641 +#: src/readelf.c:6995 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "не вдалося отримати вміст .debug_loc: %s" -#: src/readelf.c:6716 +#: src/readelf.c:7070 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:7072 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:7079 src/readelf.c:7967 msgid " \n" msgstr " <НЕКОРЕКТНІ ДАНІ>\n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7131 src/readelf.c:7293 #, c-format msgid "cannot get macro information section data: %s" msgstr "не вдалося отримати дані розділу відомостей щодо макросів: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7211 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** незавершений рядок наприкінці розділу" -#: src/readelf.c:6972 +#: src/readelf.c:7234 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** пропущено аргумент DW_MACINFO_start_file наприкінці розділу" + +#: src/readelf.c:7334 #, c-format msgid " Offset: 0x%\n" msgstr " Зміщення: 0x%\n" -#: src/readelf.c:6984 +#: src/readelf.c:7346 #, c-format msgid " Version: %\n" msgstr " Версія: %\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7352 src/readelf.c:8086 #, c-format msgid " unknown version, cannot parse section\n" msgstr " невідома версія, не вдалося обробити розділ\n" -#: src/readelf.c:6997 +#: src/readelf.c:7359 #, c-format msgid " Flag: 0x%\n" msgstr " Прапорець: 0x%\n" -#: src/readelf.c:7000 +#: src/readelf.c:7362 #, c-format msgid " Offset length: %\n" msgstr " Довжина зміщення: %\n" -#: src/readelf.c:7008 +#: src/readelf.c:7370 #, c-format msgid " .debug_line offset: 0x%\n" msgstr " зміщення .debug_line: 0x%\n" -#: src/readelf.c:7021 +#: src/readelf.c:7383 #, c-format msgid " extension opcode table, % items:\n" msgstr " таблиця кодів операцій розширень, записів — %:\n" -#: src/readelf.c:7028 +#: src/readelf.c:7390 #, c-format msgid " [%]" msgstr " [%]" -#: src/readelf.c:7040 +#: src/readelf.c:7402 #, c-format msgid " % arguments:" msgstr " % аргументів:" -#: src/readelf.c:7068 +#: src/readelf.c:7430 #, c-format msgid " no arguments." msgstr " немає аргументів." -#: src/readelf.c:7303 +#: src/readelf.c:7667 #, c-format msgid "vendor opcode not verified?" msgstr "код операції постачальника не перевірено?" -#: src/readelf.c:7331 +#: src/readelf.c:7695 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" " [%5d] зміщення DIE: %6, зміщення CU DIE: %6, назва: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7736 #, c-format msgid "" "\n" @@ -5845,12 +6138,12 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" " %*s Рядок\n" -#: src/readelf.c:7386 +#: src/readelf.c:7750 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** помилка під час читання рядків: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7770 #, c-format msgid "" "\n" @@ -5859,7 +6152,7 @@ msgstr "" "\n" "Розділ таблиці пошуку вікон виклику [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7872 #, c-format msgid "" "\n" @@ -5868,22 +6161,22 @@ msgstr "" "\n" "Розділ таблиці обробки виключень [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7895 #, c-format msgid " LPStart encoding: %#x " msgstr " Кодування LPStart: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7907 #, c-format msgid " TType encoding: %#x " msgstr " Кодування TType: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7922 #, c-format msgid " Call site encoding: %#x " msgstr " Кодування місця виклику:%#x " -#: src/readelf.c:7570 +#: src/readelf.c:7935 msgid "" "\n" " Call site table:" @@ -5891,7 +6184,7 @@ msgstr "" "\n" " Таблиця місця виклику:" -#: src/readelf.c:7584 +#: src/readelf.c:7949 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5904,12 +6197,12 @@ msgstr "" " Місце застосування: %#\n" " Дія: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:8022 #, c-format msgid "invalid TType encoding" msgstr "некоректне кодування TType" -#: src/readelf.c:7665 +#: src/readelf.c:8048 #, c-format msgid "" "\n" @@ -5918,37 +6211,37 @@ msgstr "" "\n" "Розділ GDB [%2zu] «%s» за зміщенням %# містить % байтів:\n" -#: src/readelf.c:7694 +#: src/readelf.c:8077 #, c-format msgid " Version: %\n" msgstr " Версія: %\n" -#: src/readelf.c:7712 +#: src/readelf.c:8095 #, c-format msgid " CU offset: %#\n" msgstr " зміщення CU: %#\n" -#: src/readelf.c:7719 +#: src/readelf.c:8102 #, c-format msgid " TU offset: %#\n" msgstr " зміщення TU: %#\n" -#: src/readelf.c:7726 +#: src/readelf.c:8109 #, c-format msgid " address offset: %#\n" msgstr " зміщення адреси: %#\n" -#: src/readelf.c:7733 +#: src/readelf.c:8116 #, c-format msgid " symbol offset: %#\n" msgstr " зміщення символу: %#\n" -#: src/readelf.c:7740 +#: src/readelf.c:8123 #, c-format msgid " constant offset: %#\n" msgstr " стале зміщення: %#\n" -#: src/readelf.c:7747 +#: src/readelf.c:8137 #, c-format msgid "" "\n" @@ -5957,7 +6250,7 @@ msgstr "" "\n" " Список CU зі зміщенням %# містить %zu записів:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8162 #, c-format msgid "" "\n" @@ -5966,7 +6259,7 @@ msgstr "" "\n" " Список TU зі зміщенням %# містить %zu записів:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8191 #, c-format msgid "" "\n" @@ -5975,7 +6268,7 @@ msgstr "" "\n" " Список адрес зі зміщенням %# містить %zu записів:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8224 #, c-format msgid "" "\n" @@ -5984,17 +6277,17 @@ msgstr "" "\n" " Таблиця символів за зміщенням %# містить %zu позицій:\n" -#: src/readelf.c:7909 +#: src/readelf.c:8311 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "не вдалося отримати дескриптор контексту зневаджування: %s" -#: src/readelf.c:8069 src/readelf.c:8675 src/readelf.c:8786 src/readelf.c:8844 +#: src/readelf.c:8467 src/readelf.c:9089 src/readelf.c:9200 src/readelf.c:9258 #, c-format msgid "cannot convert core note data: %s" msgstr "не вдалося перетворити дані запису ядра: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8830 #, c-format msgid "" "\n" @@ -6003,21 +6296,21 @@ msgstr "" "\n" "%*s... <повторюється %u разів> ..." -#: src/readelf.c:8919 +#: src/readelf.c:9337 msgid " Owner Data size Type\n" msgstr " Власник Розм. даних Тип\n" -#: src/readelf.c:8937 +#: src/readelf.c:9355 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9405 #, c-format msgid "cannot get content of note section: %s" msgstr "не вдалося отримати вміст розділу записів: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9432 #, c-format msgid "" "\n" @@ -6027,7 +6320,7 @@ msgstr "" "Розділ записів (note) [%2zu] «%s» з % байтів за зміщенням " "%#0:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9455 #, c-format msgid "" "\n" @@ -6036,48 +6329,68 @@ msgstr "" "\n" "Сегмент записів з % байтів за зміщенням %#0:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9501 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no data to dump.\n" +"Section [%zu] '%s' has no data to dump.\n" msgstr "" "\n" -"У розділі [%Zu] «%s» не міститься даних для створення дампу.\n" +"У розділі [%zu] «%s» не міститься даних для створення дампу.\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9518 src/readelf.c:9559 #, c-format -msgid "cannot get data for section [%Zu] '%s': %s" -msgstr "не вдалося отримати дані для розділу [%Zu] «%s»: %s" +msgid "cannot get data for section [%zu] '%s': %s" +msgstr "не вдалося отримати дані для розділу [%zu] «%s»: %s" -#: src/readelf.c:9093 +#: src/readelf.c:9523 #, c-format msgid "" "\n" -"Hex dump of section [%Zu] '%s', % bytes at offset %#0:\n" +"Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" "\n" -"Шіст. дамп розділу [%Zu] «%s», % байтів за зміщенням %#0:\n" +"Шіст. дамп розділу [%zu] «%s», % байтів за зміщенням %#0:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9528 +#, fuzzy, c-format +msgid "" +"\n" +"Hex dump of section [%zu] '%s', % bytes (%zd uncompressed) at offset " +"%#0:\n" +msgstr "" +"\n" +"Шіст. дамп розділу [%zu] «%s», % байтів за зміщенням %#0:\n" + +#: src/readelf.c:9542 #, c-format msgid "" "\n" -"Section [%Zu] '%s' has no strings to dump.\n" +"Section [%zu] '%s' has no strings to dump.\n" msgstr "" "\n" -"У розділі [%Zu] «%s» не міститься рядків для створення дампу.\n" +"У розділі [%zu] «%s» не міститься рядків для створення дампу.\n" -#: src/readelf.c:9116 +#: src/readelf.c:9564 #, c-format msgid "" "\n" -"String section [%Zu] '%s' contains % bytes at offset %#0:\n" +"String section [%zu] '%s' contains % bytes at offset %#0:\n" +msgstr "" +"\n" +"Розділ рядків [%zu] «%s» містить % байтів за зміщенням %#0:\n" + +#: src/readelf.c:9569 +#, fuzzy, c-format +msgid "" +"\n" +"String section [%zu] '%s' contains % bytes (%zd uncompressed) at " +"offset %#0:\n" msgstr "" "\n" -"Розділ рядків [%Zu] «%s» містить % байтів за зміщенням %#0:\n" +"Розділ рядків [%zu] «%s» містить % байтів за зміщенням %#0:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9618 #, c-format msgid "" "\n" @@ -6086,7 +6399,7 @@ msgstr "" "\n" "розділу [%lu] не існує" -#: src/readelf.c:9193 +#: src/readelf.c:9647 #, c-format msgid "" "\n" @@ -6095,12 +6408,12 @@ msgstr "" "\n" "розділу «%s» не існує" -#: src/readelf.c:9250 +#: src/readelf.c:9704 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "не вдалося отримати покажчик символів архіву «%s»: %s" -#: src/readelf.c:9253 +#: src/readelf.c:9707 #, c-format msgid "" "\n" @@ -6109,26 +6422,26 @@ msgstr "" "\n" "У архіві «%s» немає покажчика символів\n" -#: src/readelf.c:9257 +#: src/readelf.c:9711 #, c-format msgid "" "\n" -"Index of archive '%s' has %Zu entries:\n" +"Index of archive '%s' has %zu entries:\n" msgstr "" "\n" -"Покажчик архіву «%s» містить %Zu записів:\n" +"Покажчик архіву «%s» містить %zu записів:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9729 #, c-format -msgid "cannot extract member at offset %Zu in '%s': %s" -msgstr "не вдалося видобути елемент за зміщенням %Zu у «%s»: %s" +msgid "cannot extract member at offset %zu in '%s': %s" +msgstr "не вдалося видобути елемент за зміщенням %zu у «%s»: %s" -#: src/readelf.c:9280 +#: src/readelf.c:9734 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Елемент архіву «%s» містить:\n" -#: src/size.c:60 +#: src/size.c:59 msgid "" "Use the output format FORMAT. FORMAT can be `bsd' or `sysv'. The default " "is `bsd'" @@ -6136,83 +6449,216 @@ msgstr "" "Використовувати формат виводу ФОРМАТ. ФОРМАТом може бути «bsd» або «sysv». " "Типовим є значення «bsd»" -#: src/size.c:62 +#: src/size.c:61 msgid "Same as `--format=sysv'" msgstr "Те саме, що і «--format=sysv»" -#: src/size.c:63 +#: src/size.c:62 msgid "Same as `--format=bsd'" msgstr "Те саме, що і «--format=bsd»" -#: src/size.c:66 +#: src/size.c:65 msgid "Same as `--radix=10'" msgstr "Те саме, що і «--radix=10»" -#: src/size.c:67 +#: src/size.c:66 msgid "Same as `--radix=8'" msgstr "Те саме, що і «--radix=8»" -#: src/size.c:68 +#: src/size.c:67 msgid "Same as `--radix=16'" msgstr "Те саме, що і «--radix=16»" -#: src/size.c:70 +#: src/size.c:69 msgid "Similar to `--format=sysv' output but in one line" msgstr "Вивід даних у форматі, подібному до «--format=sysv», але у один рядок" -#: src/size.c:74 +#: src/size.c:73 msgid "Print size and permission flags for loadable segments" msgstr "" "Вивести розмір і прапорці прав доступу для придатних до завантаження " "сегментів" -#: src/size.c:75 +#: src/size.c:74 msgid "Display the total sizes (bsd only)" msgstr "Показувати загальні розміри (лише bsd)" -#: src/size.c:80 +#: src/size.c:79 msgid "List section sizes of FILEs (a.out by default)." msgstr "Показати розміри розділів ФАЙЛів (типово a.out)." -#: src/size.c:261 +#: src/size.c:257 #, c-format msgid "Invalid format: %s" msgstr "Некоректний формат: %s" -#: src/size.c:272 +#: src/size.c:268 #, c-format msgid "Invalid radix: %s" msgstr "Некоректна основа числення: %s" -#: src/size.c:331 +#: src/size.c:327 #, c-format msgid "%s: file format not recognized" msgstr "%s: не вдалося розпізнати формат файла" -#: src/size.c:438 src/size.c:571 +#: src/size.c:433 src/size.c:566 #, c-format msgid " (ex %s)" msgstr " (прикл. %s)" -#: src/size.c:596 +#: src/size.c:591 msgid "(TOTALS)\n" msgstr "(ЗАГАЛОМ)\n" -#: src/strings.c:62 +#: src/stack.c:488 +#, c-format +msgid "-p PID should be a positive process id." +msgstr "PID у -p PID має бути додатним значенням ідентифікатора процесу." + +#: src/stack.c:494 +#, c-format +msgid "Cannot open core file '%s'" +msgstr "Не вдалося відкрити файл дампу ядра «%s»" + +#: src/stack.c:554 +#, c-format +msgid "-n MAXFRAMES should be 0 or higher." +msgstr "MAXFRAMES у -n має бути значенням рівним 0 або більшим." + +#: src/stack.c:566 +#, c-format +msgid "-e EXEC needs a core given by --core." +msgstr "Для -e EXEC слід вказати ядро за допомогою --core." + +#: src/stack.c:570 +#, c-format +msgid "-1 needs a thread id given by -p." +msgstr "-1 слід передати ідентифікатор потоку виконання, заданого -p." + +#: src/stack.c:574 +#, c-format +msgid "One of -p PID or --core COREFILE should be given." +msgstr "Слід вказати -p PID або --core COREFILE." + +#: src/stack.c:644 +msgid "Show stack of process PID" +msgstr "Вивести стек PID процесу" + +#: src/stack.c:646 +msgid "Show stack found in COREFILE" +msgstr "Вивести стек, знайдений у COREFILE" + +#: src/stack.c:647 +msgid "(optional) EXECUTABLE that produced COREFILE" +msgstr "(необов’язковий) EXECUTABLE, яким створено COREFILE" + +#: src/stack.c:651 +msgid "Output selection options:" +msgstr "Параметри вибору виведених даних:" + +#: src/stack.c:653 +msgid "Additionally show frame activation" +msgstr "Додатково вивести активацію вікна" + +#: src/stack.c:655 +msgid "Additionally try to lookup DWARF debuginfo name for frame address" +msgstr "" +"Додатково спробувати визначити назву файла даних діагностики DWARF для " +"адреси вікна" + +#: src/stack.c:658 +msgid "" +"Additionally show inlined function frames using DWARF debuginfo if available " +"(implies -d)" +msgstr "" +"Додатково вивести вікна вбудованих функцій за допомогою даних діагностики " +"DWARF, якщо такі є (використовується і -d)" + +#: src/stack.c:660 +msgid "Additionally show module file information" +msgstr "Додатково вивести дані щодо файла модуля" + +#: src/stack.c:662 +msgid "Additionally show source file information" +msgstr "Додатково вивести дані щодо файла початкового коду" + +#: src/stack.c:664 +msgid "" +"Show all additional information (activation, debugname, inlines, module and " +"source)" +msgstr "" +"Вивести усі додаткові дані (активацію, назву у системі діагностики, " +"вбудовані функції, модуль і початковий файл)" + +#: src/stack.c:666 +msgid "Do not resolve address to function symbol name" +msgstr "Не розгортати адресу до назви символу функції" + +#: src/stack.c:668 +msgid "Show raw function symbol names, do not try to demangle names" +msgstr "" +"Вивести назви символів функцій без обробки, не намагатися розшифрувати назви" + +#: src/stack.c:670 +msgid "Show module build-id, load address and pc offset" +msgstr "Виводити ідентифікатор збирання, адресу завантаження та зсув модуля" + +#: src/stack.c:672 +msgid "Show the backtrace of only one thread" +msgstr "Виводити зворотне трасування лише одного потоку" + +#: src/stack.c:674 +msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" +msgstr "" +"Виводити не більше MAXFRAMES на потік виконання (типове значення 256, 0 — не " +"обмежувати)" + +#: src/stack.c:676 +msgid "Show module memory map with build-id, elf and debug files detected" +msgstr "" +"Вивести карту пам’яті модуля із виявленими ідентифікатором збирання, elf та " +"файлами діагностичних даних" + +#: src/stack.c:684 +msgid "" +"Print a stack for each thread in a process or core file.\vProgram exits with " +"return code 0 if all frames were shown without any errors. If some frames " +"were shown, but there were some non-fatal errors, possibly causing an " +"incomplete backtrace, the program exits with return code 1. If no frames " +"could be shown, or a fatal error occured the program exits with return code " +"2. If the program was invoked with bad or missing arguments it will exit " +"with return code 64." +msgstr "" +"Вивести стек для кожного потоку у процесі або файлі дампу ядра.\vПрограма " +"завершує роботу з кодом виходу 0, якщо усі вікна було виведено без помилок. " +"Якщо деякі вікна було показано, але сталися некритичні помилки, ймовірно " +"спричинені неповними даними зворотного трасування, програма завершує роботу " +"з кодом повернення 1. Якщо не вдалося вивести жодного вікна або сталася " +"критична помилка, програма виходить з кодом повернення 2. Якщо програму було " +"викликано з помилковими або пропущеними аргументами, програма завершить " +"роботу з кодом виходу 64." + +#: src/stack.c:757 +#, c-format +msgid "Couldn't show any frames." +msgstr "Не вдалося вивести жодного вікна." + +#: src/strings.c:66 msgid "Output Selection:" msgstr "Вибір виводу:" -#: src/strings.c:63 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Шукати у всьому файлі, а не лише у завантажених розділах" -#: src/strings.c:65 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" "Буде виведено лише послідовності з не менше, ніж MIN-LEN символів, що " "завершуються на NUL" -#: src/strings.c:66 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6220,72 +6666,77 @@ msgstr "" "Визначення розмірності та порядку бітів символів: s = 7-бітові, S = 8-" "бітові, {b,l} = 16-бітові, {B,L} = 32-бітові" -#: src/strings.c:70 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Виводити назву файла перед кожним рядком." -#: src/strings.c:72 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Виводити адресу рядка за основами 8, 10 та 16, відповідно." -#: src/strings.c:73 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Замінник --radix=o" -#: src/strings.c:80 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Вивести рядки файлів з символів, придатних для друку." -#: src/strings.c:267 src/strings.c:302 +#: src/strings.c:271 src/strings.c:306 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "некоректне значення «%s» параметра %s" -#: src/strings.c:313 +#: src/strings.c:317 #, c-format msgid "invalid minimum length of matched string size" msgstr "некоректна мінімальна довжина розмірності рядка для порівняння" -#: src/strings.c:596 -#, c-format -msgid "lseek64 failed" +#: src/strings.c:600 +#, fuzzy, c-format +msgid "lseek failed" msgstr "помилка lseek64" -#: src/strings.c:613 src/strings.c:677 +#: src/strings.c:617 src/strings.c:681 #, c-format msgid "re-mmap failed" msgstr "помилка повторного використання mmap" -#: src/strings.c:650 +#: src/strings.c:654 #, c-format msgid "mprotect failed" msgstr "помилка mprotect" -#: src/strip.c:69 +#: src/strings.c:743 +#, c-format +msgid "Skipping section %zd '%s' data outside file" +msgstr "Пропускаємо дані %zd «%s» поза файлом" + +#: src/strip.c:68 msgid "Place stripped output into FILE" msgstr "Вивести дані після вилучення до ФАЙЛа" -#: src/strip.c:70 +#: src/strip.c:69 msgid "Extract the removed sections into FILE" msgstr "Видобути вилучені розділи до ФАЙЛа" -#: src/strip.c:71 +#: src/strip.c:70 msgid "Embed name FILE instead of -f argument" msgstr "Вбудувати назву ФАЙЛа замість аргументу -f" -#: src/strip.c:75 +#: src/strip.c:74 msgid "Remove all debugging symbols" msgstr "Вилучити всі символи зневаджування" -#: src/strip.c:79 +#: src/strip.c:78 msgid "Remove section headers (not recommended)" msgstr "Вилучити заголовки розділів (не рекомендовано)" -#: src/strip.c:81 +#: src/strip.c:80 msgid "Copy modified/access timestamps to the output" msgstr "Скопіювати часові позначки зміни/доступу до виведених даних" -#: src/strip.c:83 +#: src/strip.c:82 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " @@ -6295,395 +6746,417 @@ msgstr "" "вилучені розділи було розташовано у діагностичному файлі (стосується лише " "файлів ET_REL, скасувати дію неможливо, потребує параметра -f)" -#: src/strip.c:85 +#: src/strip.c:84 msgid "Remove .comment section" msgstr "Вилучити розділ .comment" -#: src/strip.c:88 +#: src/strip.c:87 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "" "Знехтувати декількома правилами для обробки трохи пошкоджених файлів ELF" -#: src/strip.c:93 +#: src/strip.c:92 msgid "Discard symbols from object files." msgstr "Відкинути символи з об’єктних файлів" -#: src/strip.c:181 +#: src/strip.c:186 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "--reloc-debug-sections використано без -f" -#: src/strip.c:195 +#: src/strip.c:200 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "" "Разом з «-o» або «-f» можна використовувати лише один файл вхідних даних" -#: src/strip.c:231 +#: src/strip.c:236 #, c-format msgid "-f option specified twice" msgstr "параметр -f вказано двічі" -#: src/strip.c:240 +#: src/strip.c:245 #, c-format msgid "-F option specified twice" msgstr "параметр -F вказано двічі" -#: src/strip.c:249 src/unstrip.c:121 +#: src/strip.c:254 src/unstrip.c:120 #, c-format msgid "-o option specified twice" msgstr "параметр -o вказано двічі" -#: src/strip.c:273 +#: src/strip.c:278 #, c-format msgid "-R option supports only .comment section" msgstr "Для параметра -R передбачено підтримку лише розділу .comment" -#: src/strip.c:315 src/strip.c:339 +#: src/strip.c:320 src/strip.c:344 #, c-format msgid "cannot stat input file '%s'" msgstr "не вдалося отримати дані з вхідного файла «%s» за допомогою stat" -#: src/strip.c:329 +#: src/strip.c:334 #, c-format msgid "while opening '%s'" msgstr "під час спроби відкриття «%s»" -#: src/strip.c:367 +#: src/strip.c:372 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "" "%s: не можна використовувати -o або -f під час вилучення додаткового вмісту " "архіву" -#: src/strip.c:468 +#: src/strip.c:384 +#, c-format +msgid "%s: no support for stripping archive" +msgstr "%s: підтримки вилучення додаткового вмісту з архіву не передбачено" + +#: src/strip.c:483 #, c-format msgid "cannot open EBL backend" msgstr "не вдалося відкрити канал сервера EBL" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:528 +#, c-format +msgid "cannot get number of phdrs" +msgstr "не вдалося отримати кількість phdr" + +#: src/strip.c:544 src/strip.c:568 #, c-format msgid "cannot create new file '%s': %s" msgstr "не вдалося створити файл «%s»: %s" -#: src/strip.c:608 +#: src/strip.c:634 #, c-format msgid "illformed file '%s'" msgstr "помилкове форматування файла «%s»" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:968 src/strip.c:1067 #, c-format msgid "while generating output file: %s" msgstr "під час спроби створення файла з виведеними даними: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:1033 src/strip.c:2071 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: помилка під час створення заголовка ELF: %s" -#: src/strip.c:1006 +#: src/strip.c:1050 #, c-format msgid "while preparing output for '%s'" msgstr "під час приготування виведених даних для «%s»" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1108 src/strip.c:1171 #, c-format msgid "while create section header section: %s" msgstr "під час створення розділу заголовка розділу: %s" -#: src/strip.c:1063 +#: src/strip.c:1117 #, c-format msgid "cannot allocate section data: %s" msgstr "не вдалося розмістити дані розділу: %s" -#: src/strip.c:1123 +#: src/strip.c:1183 #, c-format msgid "while create section header string table: %s" msgstr "під час створення таблиці рядків заголовка розділу: %s" -#: src/strip.c:1752 +#: src/strip.c:1861 #, c-format msgid "bad relocation" msgstr "помилкове пересування" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1982 src/strip.c:2095 #, c-format msgid "while writing '%s': %s" msgstr "під час запису «%s»: %s" -#: src/strip.c:1880 +#: src/strip.c:1993 #, c-format msgid "while creating '%s'" msgstr "під час спроби створення «%s»" -#: src/strip.c:1902 +#: src/strip.c:2016 #, c-format msgid "while computing checksum for debug information" msgstr "під час обчислення контрольної суми для діагностичних даних" -#: src/strip.c:1965 +#: src/strip.c:2080 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: помилка під час читання файла: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2120 src/strip.c:2140 #, c-format msgid "while writing '%s'" msgstr "під час спроби запису «%s»" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2177 src/strip.c:2184 #, c-format msgid "error while finishing '%s': %s" msgstr "помилка під час завершення «%s»: %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2201 src/strip.c:2273 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "не вдалося встановити права доступу та дату зміни «%s»" -#: src/unstrip.c:70 +#: src/unstrip.c:69 msgid "Match MODULE against file names, not module names" msgstr "" "Встановити відповідність МОДУЛЯ назвам файлів, а не назвам модулів names" -#: src/unstrip.c:71 +#: src/unstrip.c:70 msgid "Silently skip unfindable files" msgstr "Пропустити незнайдені файли без додаткових повідомлень" -#: src/unstrip.c:74 +#: src/unstrip.c:73 msgid "Place output into FILE" msgstr "Вивести дані у ФАЙЛ" -#: src/unstrip.c:76 +#: src/unstrip.c:75 msgid "Create multiple output files under DIRECTORY" msgstr "Створити декілька файлів виведених даних у КАТАЛОЗІ" -#: src/unstrip.c:77 +#: src/unstrip.c:76 msgid "Use module rather than file names" msgstr "Використовувати назви модулів, а не файлів" -#: src/unstrip.c:79 +#: src/unstrip.c:78 msgid "Create output for modules that have no separate debug information" msgstr "" "Вивести дані для модулів, які не містять окремих діагностичних відомостей" -#: src/unstrip.c:82 +#: src/unstrip.c:81 msgid "Apply relocations to section contents in ET_REL files" msgstr "Застосувати пересування до вмісту розділів у файлах ET_REL" -#: src/unstrip.c:84 +#: src/unstrip.c:83 msgid "Only list module and file names, build IDs" msgstr "Вивести лише список назв модулів, файлів, побудувати ідентифікатори" -#: src/unstrip.c:86 +#: src/unstrip.c:85 msgid "Force combining files even if some ELF headers don't seem to match" msgstr "" +"Примусово поєднати файли, навіть якщо буде встановлено невідповідність " +"якихось із заголовків ELF" -#: src/unstrip.c:130 +#: src/unstrip.c:129 #, c-format msgid "-d option specified twice" msgstr "параметр -d вказано двічі" -#: src/unstrip.c:165 +#: src/unstrip.c:164 #, c-format msgid "only one of -o or -d allowed" msgstr "можна використовувати лише один з параметрів: -o або -d" -#: src/unstrip.c:174 +#: src/unstrip.c:173 #, c-format msgid "-n cannot be used with explicit files or -o or -d" msgstr "" "-n не можна використовувати з файлами, заданими явно, або параметрами -o і -d" -#: src/unstrip.c:189 +#: src/unstrip.c:188 #, c-format msgid "output directory '%s'" msgstr "каталог виведення даних «%s»" -#: src/unstrip.c:198 +#: src/unstrip.c:197 #, c-format msgid "exactly two file arguments are required" msgstr "як аргументи має бути вказано точно два файла" -#: src/unstrip.c:204 +#: src/unstrip.c:203 #, c-format msgid "-m, -a, -R, and -i options not allowed with explicit files" msgstr "" "для файлів, заданих явно, не можна використовувати параметри -m, -a, -R і -i" -#: src/unstrip.c:217 +#: src/unstrip.c:216 #, c-format msgid "-o or -d is required when using implicit files" msgstr "" "якщо використовуються файли, задані неявно, слід додавати параметр -o або -d" -#: src/unstrip.c:253 +#: src/unstrip.c:252 #, c-format msgid "cannot create ELF header: %s" msgstr "не вдалося створити заголовок ELF: %s" -#: src/unstrip.c:258 +#: src/unstrip.c:257 #, c-format msgid "cannot copy ELF header: %s" msgstr "не вдалося скопіювати заголовок ELF: %s" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:261 src/unstrip.c:1939 src/unstrip.c:1982 +#, c-format +msgid "cannot get number of program headers: %s" +msgstr "не вдалося отримати кількість заголовків програми: %s" + +#: src/unstrip.c:266 src/unstrip.c:1943 #, c-format msgid "cannot create program headers: %s" msgstr "не вдалося створити заголовки програми: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:272 #, c-format msgid "cannot copy program header: %s" msgstr "не вдалося скопіювати заголовок програми: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:282 #, c-format msgid "cannot copy section header: %s" msgstr "не вдалося скопіювати заголовок розділу: %s" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:285 src/unstrip.c:1576 #, c-format msgid "cannot get section data: %s" msgstr "не вдалося отримати дані розділу: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:287 src/unstrip.c:1578 #, c-format msgid "cannot copy section data: %s" msgstr "не вдалося скопіювати дані розділу: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:311 #, c-format msgid "cannot create directory '%s'" msgstr "не вдалося створити каталог «%s»" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:383 src/unstrip.c:803 src/unstrip.c:1610 #, c-format msgid "cannot get symbol table entry: %s" msgstr "не вдалося отримати запис таблиці символів: %s" -#: src/unstrip.c:364 src/unstrip.c:582 src/unstrip.c:603 src/unstrip.c:615 -#: src/unstrip.c:1564 src/unstrip.c:1694 src/unstrip.c:1718 +#: src/unstrip.c:399 src/unstrip.c:620 src/unstrip.c:641 src/unstrip.c:653 +#: src/unstrip.c:1631 src/unstrip.c:1805 src/unstrip.c:1829 #, c-format msgid "cannot update symbol table: %s" msgstr "не вдалося оновити таблицю символів: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:409 #, c-format msgid "cannot update section header: %s" msgstr "не вдалося оновити заголовок розділу: %s" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:448 src/unstrip.c:459 #, c-format msgid "cannot update relocation: %s" msgstr "не вдалося оновити пересування: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:547 #, c-format msgid "cannot get symbol version: %s" msgstr "не вдалося отримати версію символу: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:560 #, c-format -msgid "unexpected section type in [%Zu] with sh_link to symtab" -msgstr "неочікуваний тип розділу у [%Zu] з посиланням sh_link на symtab" +msgid "unexpected section type in [%zu] with sh_link to symtab" +msgstr "неочікуваний тип розділу у [%zu] з посиланням sh_link на symtab" -#: src/unstrip.c:771 +#: src/unstrip.c:809 #, c-format -msgid "invalid string offset in symbol [%Zu]" -msgstr "некоректне зміщення рядка у символі [%Zu]" +msgid "invalid string offset in symbol [%zu]" +msgstr "некоректне зміщення рядка у символі [%zu]" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:967 src/unstrip.c:1313 #, c-format -msgid "cannot read section [%Zu] name: %s" -msgstr "не вдалося прочитати назву розділу [%Zu]: %s" +msgid "cannot read section [%zu] name: %s" +msgstr "не вдалося прочитати назву розділу [%zu]: %s" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:1008 src/unstrip.c:1027 src/unstrip.c:1062 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "не вдалося прочитати розділ «.gnu.prelink_undo»: %s" -#: src/unstrip.c:994 +#: src/unstrip.c:1048 #, c-format msgid "invalid contents in '%s' section" msgstr "некоректний вміст розділу «%s»" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1054 #, c-format -msgid "cannot find matching section for [%Zu] '%s'" -msgstr "не вдалося знайти відповідний розділ для [%Zu] «%s»" +msgid "overflow with shnum = %zu in '%s' section" +msgstr "" + +#: src/unstrip.c:1108 src/unstrip.c:1433 +#, c-format +msgid "cannot find matching section for [%zu] '%s'" +msgstr "не вдалося знайти відповідний розділ для [%zu] «%s»" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1233 src/unstrip.c:1248 src/unstrip.c:1514 src/unstrip.c:1766 #, c-format msgid "cannot add section name to string table: %s" msgstr "не вдалося додати назву розділу до таблиці рядків: %s" -#: src/unstrip.c:1198 +#: src/unstrip.c:1257 #, c-format msgid "cannot update section header string table data: %s" msgstr "не вдалося оновити дані заголовка розділу у таблиці рядків: %s" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1284 src/unstrip.c:1288 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" "не вдалося визначити індекс розділу заголовка розділу у таблиці рядків: %s" -#: src/unstrip.c:1233 src/unstrip.c:1237 src/unstrip.c:1470 +#: src/unstrip.c:1292 src/unstrip.c:1296 src/unstrip.c:1529 #, c-format msgid "cannot get section count: %s" msgstr "не вдалося отримати кількість розділів: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1299 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" "у очищеному файлі більше розділів ніж у файлі з даними для зневаджування — " "помилковий порядок параметрів?" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1358 src/unstrip.c:1448 #, c-format msgid "cannot read section header string table: %s" msgstr "не вдалося прочитати таблицю рядків заголовка розділу: %s" -#: src/unstrip.c:1449 +#: src/unstrip.c:1508 #, c-format msgid "cannot add new section: %s" msgstr "не вдалося додати новий розділ: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1618 #, c-format -msgid "symbol [%Zu] has invalid section index" -msgstr "символ [%Zu] має некоректний індекс розділу" +msgid "symbol [%zu] has invalid section index" +msgstr "символ [%zu] має некоректний індекс розділу" -#: src/unstrip.c:1789 +#: src/unstrip.c:1900 #, c-format msgid "cannot read section data: %s" msgstr "не вдалося прочитати дані розділу: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1921 #, c-format msgid "cannot get ELF header: %s" msgstr "не вдалося отримати заголовок ELF: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1953 #, c-format msgid "cannot update program header: %s" msgstr "не вдалося оновити заголовок програми: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1958 src/unstrip.c:2040 #, c-format msgid "cannot write output file: %s" msgstr "не вдалося записати файл виведених даних: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:2009 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" "Дані DWARF не скориговано відповідно до відхилення перед компонуванням; " "спробуйте виправити це командою prelink -u" -#: src/unstrip.c:1894 +#: src/unstrip.c:2012 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6691,76 +7164,76 @@ msgstr "" "Дані DWARF у «%s» не скориговано відповідно до відхилення перед " "компонуванням; спробуйте виправити це командою prelink -u" -#: src/unstrip.c:1913 src/unstrip.c:1964 src/unstrip.c:1976 src/unstrip.c:2062 +#: src/unstrip.c:2031 src/unstrip.c:2082 src/unstrip.c:2094 src/unstrip.c:2180 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "не вдалося створити дескриптор ELF: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:2073 msgid "WARNING: " -msgstr "" +msgstr "УВАГА: " -#: src/unstrip.c:1957 +#: src/unstrip.c:2075 msgid ", use --force" -msgstr "" +msgstr ", скористайтеся --force" -#: src/unstrip.c:1980 +#: src/unstrip.c:2098 msgid "ELF header identification (e_ident) different" -msgstr "" +msgstr "Різні ідентифікатори заголовків ELF (e_ident)" -#: src/unstrip.c:1983 +#: src/unstrip.c:2101 msgid "ELF header type (e_type) different" -msgstr "" +msgstr "Різні типи заголовків ELF (e_type)" -#: src/unstrip.c:1986 +#: src/unstrip.c:2104 msgid "ELF header machine type (e_machine) different" -msgstr "" +msgstr "Різні типи архітектур заголовків ELF (e_machine)" -#: src/unstrip.c:1989 +#: src/unstrip.c:2107 msgid "stripped program header (e_phnum) smaller than unstripped" -msgstr "" +msgstr "очищений заголовок програми (e_phnum) є меншим за неочищений" -#: src/unstrip.c:2019 +#: src/unstrip.c:2137 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "не вдалося знайти очищений файл для модуля «%s»: %s" -#: src/unstrip.c:2023 +#: src/unstrip.c:2141 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "не вдалося відкрити очищений файл «%s» для модуля «%s»: %s" -#: src/unstrip.c:2038 +#: src/unstrip.c:2156 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "не вдалося знайти файл діагностичних даних для модуля «%s»: %s" -#: src/unstrip.c:2042 +#: src/unstrip.c:2160 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "не вдалося відкрити файл діагностичних даних «%s» для модуля «%s»: %s" -#: src/unstrip.c:2055 +#: src/unstrip.c:2173 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "у модулі «%s» файл «%s» не очищено strip" -#: src/unstrip.c:2086 +#: src/unstrip.c:2204 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "не вдалося кешувати адреси розділів для модуля «%s»: %s" -#: src/unstrip.c:2219 +#: src/unstrip.c:2337 #, c-format msgid "no matching modules found" msgstr "відповідних модулів не виявлено" -#: src/unstrip.c:2228 +#: src/unstrip.c:2346 #, c-format msgid "matched more than one module" msgstr "встановлено відповідність декількох модулів" -#: src/unstrip.c:2275 +#: src/unstrip.c:2390 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6768,7 +7241,7 @@ msgstr "" "ОЧИЩЕНИЙ-ФАЙЛ ФАЙЛ-DEBUG\n" "[МОДУЛЬ...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2391 msgid "" "Combine stripped files with separate symbols and debug information.\vThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" @@ -6824,9 +7297,20 @@ msgstr "" "окремого файла діагностичних даних або «-», якщо файла діагностичних даних " "не вдалося знайти, і «.», якщо ФАЙЛ сам містить діагностичні дані." -#, fuzzy -#~ msgid "cannot attach to process" -#~ msgstr "не вдалося створити дерево пошуку" +#: tests/backtrace.c:427 +msgid "Run executable" +msgstr "Запустити виконуваний файл" + +#: tests/dwflmodtest.c:213 +msgid "Additionally show function names" +msgstr "Додатково вивести назви функцій" + +#: tests/dwflmodtest.c:214 +msgid "Show instances of inlined functions" +msgstr "Вивести екземпляри вбудованих функцій" + +#~ msgid "cannot get section header of section %Zu: %s" +#~ msgstr "не вдалося отримати заголовок розділу %Zu: %s" #, fuzzy #~ msgid "cannot attach to core" diff --git a/src/ChangeLog b/src/ChangeLog index 986b341..af98c4d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,700 @@ +2016-01-08 Mark Wielaard + + * elfcompress.c (compress_section): Use %zu to print size_t. + * readelf.c (print_shdr): Use %zx to print size_t. + +2015-12-16 Mark Wielaard + + * elfcompress.c: New file. + * Makefile.am (bin_PROGRAMS): Add elfcompress. + (elfcompress_LDADD): New variable. + +2015-12-18 Mark Wielaard + + * elflint.c (section_flags_string): Add NEWFLAG COMPRESSED. + (check_sections): SHF_COMPRESSED can be on any special section. + SHF_COMPRESSED is a valid section flag. SHF_COMPRESSED cannot + be used together with SHF_ALLOC or with SHT_NOBITS. Should have + a valid Chdr. + +2015-10-20 Mark Wielaard + + * readelf.c (options): Expand -z help text. + (dump_data_section): Check whether we need and can decompress section + data and call elf_rawzdata if so, + (print_string_section): Likewise. + (elf_contains_chdrs): New function. + (process_elf_file): Rename print_unrelocated to print_unchanged, + use elf_contains_chdrs. + (print_scngrp): Check whether section is compressed before use. + (print_symtab): Likewise. + (handle_hash): Likewise. + +2015-10-16 Mark Wielaard + + * readelf.c (argp_option): Describe --decompress,-z. + (print_decompress): New bool. + (parse_opt): Handle -z. + (elf_ch_type_name): New function. + (print_shdr): Print section compress information. + +2015-12-31 Mark Wielaard + + * elflint.c (check_symtab): Add _edata and _end (plus extra underscore + variants) to to the list of possibly dangling symbols. + +2015-12-02 Mark Wielaard + + * nm.c (process_file): Accept fd and pass it on. + (handle_elf): Likewise. + (find_no_debuginfo): New. + (struct getdbg): Likewise. + (getdbg_dwflmod): Likewise. + (show_symbols): Take fd. If the file is ET_REL use libdwfl to get + the relocated Dwarf. + +2015-12-02 Mark Wielaard + + * nm.c (get_local_names): Check for duplicates in local_root tree. + +2015-12-02 Mark Wielaard + + * unstrip.c (struct data_list): New. + (new_data_list): Likewise. + (record_new_data): Likewise. + (free_new_data): Likewise. + (adjust_relocs): Call record_new_data. + (add_new_section_symbols): Likewise. + (copy_elided_sections): Call free_new_data. + +2015-12-01 Mark Wielaard + + * elfcmp.c (main): Close ebl1 and ebl2 backends. + +2015-10-16 Mark Wielaard + + * Makefile.am [BUILD_STATIC](libdw): Add -lz. + [BUILD_STATIC](libelf): Likewise. + +2015-10-16 Mark Wielaard + + * elflint.c (check_symtab): Don't check TLS symbol value against TLS + phdr offset in debuginfo files. + (check_sections): Don't try to match section offsets to phdrs offsets + in debuginfo files. + +2015-10-16 Mark Wielaard + + * elflint.c (check_reloc_shdr): Reject only desthdrs if they have both + SHF_MERGE and SHF_STRINGS set. + +2015-10-13 Jose E. Marchesi + + * elflint.c (check_sections): Do not rely on + ebl_check_special_section when checking debuginfo files. Also + check that the type of WE sections in debuginfo files is NOBITS. + +2015-10-13 Mark Wielaard + + * elflint.c (check_program_header): Check relro flags are a subset + of the load segment if they don't fully overlap. + +2015-10-07 Mark Wielaard + + * Makefile.am (ldlex_no_Wstack_usage): New. + * ldlex.l ([RWX]): Make cnt unsigned. + +2015-10-09 Josh Stone + + * elflint.c (main): Replace stat64 and fstat64 with stat and fstat. + * readelf.c (process_file): Likewise. + (process_elf_file): Replace off64_t with off_t. + * findtextrel.c (process_file): Replace open64 with open. + * ld.c (main): Replace sizeof (off64_t) with 8. + * strings.c: Replace off64_t with off_t throughout. + (main): Replace stat64 and fstat64 with stat and fstat. + (map_file): Replace mmap64 with mmap. + (read_block): Likewise, and replace lseek64 with lseek. + * strip.c (handle_elf): Replace ftruncate64 with ftruncate. + (process_file): Replace stat64 and fstat64 with stat and fstat. + * unstrip.c (parse_opt): Replace stat64 with stat. + (handle_file): Replace open64 with open. + (open_file): Likewise. + +2015-10-08 Chih-Hung Hsieh + + * ld.c (determine_output_format): Move recursive nested + function "try" to file scope. + +2015-10-04 Mark Wielaard + + * strip.c (handle_elf): Only sanity check section symbols to not + kept discarded sections if we are creating a debug file. + +2015-10-07 Mark Wielaard + + * unstrip.c (MAX): Removed. + (find_alloc_sections_prelink): Allocate exact amount of bytes for + shdrs. + +2015-10-05 Chih-Hung Hsieh + + * unstrip.c (find_alloc_sections_prelink): Do not allocate + on stack union types with variable length arrays; use xmalloc + for such dynamic sized objects. + * readelf.c (handle_core_item): Likewise, but use alloca + for small variable size data object and add assert(count < 128). + +2015-10-05 Josh Stone + + * Makefile.am (libld_elf_i386.so): Add AM_V_CCLD silencer. + (.deps/none_ld.Po): Always silence the dummy command. + (make-debug-archive): Add AM_V_GEN and AM_V_at silencers. + +2015-10-02 Mark Wielaard + + * unstrip.c (copy_elided_sections): Use SH_INFO_LINK_P, not just + SHF_INFO_LINK. + +2015-10-02 Mark Wielaard + + * strip.c (handle_elf): Don't move around allocated NOBITS sections. + Don't just mark the section header string table as unused. + * unstrip.c (copy_elided_sections): Add header names to strtab if + shstrndx equals the symtab strtabndx. + +2015-09-22 Mark Wielaard + + * strip.c (cleanup_debug): Remove old-style function definitions. + +2015-09-09 Chih-Hung Hsieh + + * readelf.c (print_debug_exception_table): Initialize variable before + it is used, because compiler does not know that error never returns. + (dump_arhive_index): Likewise. + +2015-09-04 Chih-Hung Hsieh + + * elflint.c (check_group): Replace %Z length modifier with %z. + (check_note_data): Likewise. + * findtextrel.c (process_file): Likewise. + * readelf.c (handle_dynamic): Likewise. + (handle_symtab): Likewise. + (handle_verneed): Likewise. + (handle_verdef): Likewise. + (handle_versym): Likewise. + (print_hash_info): Likewise. + (print_decoded_aranges_section): Likewise. + (print_debug_aranges_section): Likewise. + (print_debug_line_section): Likewise. + (hex_dump): Likewise. + (dump_data_section): Likewise. + (print_string_section): Likewise. + (dump_archive_index): Likewise. + * unstrip.c (adjust_relocs): Likewise. + (collect_symbols): likewise. + (get_section_name): Likewise. + (find_alloc_sections_prelink): Likewise. + (copy_elided_sections): Likewise. + * ldscript.y (add_id_list): Add missing '%s'. + +2015-09-03 Mark Wielaard + + * readelf.c (handle_core_item): Handle right shift >= 32 bits. + +2015-08-11 Mark Wielaard + + * elflint.c (check_sections): When gnuld and a NOBITS section falls + inside a segment make sure any ELF file contents is zero. + +2015-07-29 Mark Wielaard + + * unstrip.c (sections_flags_match): New function. + (sections_match): Use sections_flags_match. + (find_alloc_sections_prelink): Only clear matched sections if there + is an undo section. + (copy_elided_sections): Add SHF_INFO_LINK to shdr_mem.sh_flags if + necessary. + +2015-06-27 Pino Toscano + + * src/strings.c: Define MAP_POPULATE if not defined already. + +2015-06-27 Mark Wielaard + + * nm.c (show_symbols): First call elf_getdata, then allocate memory. + +2015-06-18 Mark Wielaard + + * findtextrel.c (process_file): Free segments after use. + +2015-06-18 Mark Wielaard + + * readelf.c (print_phdr): Make sure phdr2_mem lifetime/scope equals + phdr2 pointer. + +2015-06-18 Mark Wielaard + + * readelf.c (handle_gnu_hash): Free lengths on invalid_data. + +2015-06-18 Mark Wielaard + + * elflint.c (check_symtab): Only check the PT_TLS phdr if it actually + exists. Warn otherwise. + +2015-06-18 Mark Wielaard + + * nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to + known whether or not we stack allocated memory. + +2015-06-18 Mark Wielaard + + * strings.c (readelf): Use "" if we cannot retrieve section + name. + +2015-06-09 Mark Wielaard + + * addr2line.c (print_dwarf_function): Always free scopes before + returning. + +2015-06-09 Mark Wielaard + + * strip.c (handle_ar): Mark as unused. + (process_file): Produce an error when trying to handle an ar. + +2015-05-30 Mark Wielaard + + * elfcmp.c (main): Only call memcmp when d_size != 0. + +2015-05-23 Mark Wielaard + + * Makefile.am: Define ldgeneric, readelf, nm, size, strip, elflint, + findtextrel, elfcmp objdump, ranlib, ar and unstrip no_Wstack_usage. + +2015-05-21 Mark Wielaard + + * addr2line.c (handle_address): Set scopes to NULL after free. + +2015-05-20 Mark Wielaard + + * addr2line.c (OPT_PRETTY): New constant define. + (argp_option): Add "pretty-print". + (pretty): New static bool. + (parse_opt): Set pretty. + (print_dwarf_function): Adjust output when pretty is set. + (print_addrsym): Likewise. + (handle_address): Likewise. + +2015-05-20 Mark Wielaard + + * Makefile.am (addr2line_LDADD): Add demanglelib. + * addr2line.c (argp_option): Move demangle under output format. + (demangle): New static bool. + (demangle_buffer_len): New static size_t. + (demangle_buffer): New static char *. + (main): free demangle_buffer. + (parse_opt): Set demangle. + (symname): New static function. + (get_diename): Use symname. + (print_dwarf_function): Likewise. + (print_addrsym): Likewise. + (handle_address): Likewise. + +2015-05-20 Mark Wielaard + + * addr2line.c (argp_option): Add "addresses", 'a'. + (print_addresses): New static bool. + (parse_opt): Set print_addresses. + (get_addr_width): New static function. + (handle_address): Print address if print_addresses is true. + +2015-05-20 Mark Wielaard + + * addr2line.c (handle_address): Call strtoumax with base 16. Make + sure all input has been processed. + +2015-05-20 Mark Wielaard + + * addr2line (argp_option): Group 'section' under "Input format + options". + +2015-05-12 Mark Wielaard + + * strip.c (debug_fd): New static variable. + (tmp_debug_fname): Likewise. + (cleanup_debug): New function using the above to clean up temporary + debug file. + (INTERNAL_ERROR): Call cleanup_debug. + (handle_elf): Use debug_fd and tmp_debug_fname statics and call + cleanup_debug before any error. Use output_fname instead of fname in + error messages when it exists (-o was given). SHT_NOBITS sections + can also be moved freely even if SHF_ALLOC is set. Add various + sanity checks. Use elf_assert instead of plain assert. + +2015-05-08 Mark Wielaard + + * nm.c (show_symbols): Call gelf_fsize with EV_CURRENT. + * strip.c (handle_elf): Likewise. + +2015-05-06 Mark Wielaard + + * elflint.c (check_gnu_hash): Return early when 2nd hash function + shift too big. Check there is enough data available. Make sure + bitmask_words is not zero. + (check_verdef): Use Elf64_Word for shdr->sh_info cnt. + (check_verneed): Likewise. + (check_attributes): Break when vendor name isn't terminated. + Add overflow check for subsection_len. + +2015-05-05 Mark Wielaard + + * nm.c (show_symbols): Handle dwarf_linesrc returning NULL. + +2015-05-04 Max Filippov + + * ar.c (do_oper_extract): Replace struct timeval with struct timespec + and futimes with futimens. + * strip.c (process_file): Replace struct timeval with struct timespec. + (handle_elf, handle_ar): Replace struct timeval with struct timespec + in prototype. Replace futimes with futimens. + +2015-05-04 Max Filippov + + * addr2line.c (main): Drop mtrace() call and #include . + * ar.c: Likewise. + * ld.c: Likewise. + * nm.c: Likewise. + * objdump.c: Likewise. + * ranlib.c: Likewise. + * size.c: Likewise. + * strip.c: Likewise. + * unstrip.c: Likewise. + +2015-05-04 Anthony G. Basile + + * Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD) + (ld_LDADD, elflint_LDADD, findtextrel_LDADD, addr2line_LDADD) + (elfcmp_LDADD, objdump_LDADD, ranlib_LDADD, strings_LDADD) + (ar_LDADD, unstrip_LDADD, stack_LDADD): Append $(argp_LDADD). + +2015-03-22 Mark Wielaard + + * readelf.c (print_debug_frame_section): Cast start to Dwarf_Off + before subtracting cie_id. And cast cie_offset to Dwarf_Off before + comparison. + +2015-03-22 Mark Wielaard + + * readelf.c (print_gdb_index_section): Check all offsets used + against section d_size. + +2015-03-17 Mark Wielaard + + * readelf.c (print_debug): Don't return, but always use dummy_dbg. + +2015-03-17 Mark Wielaard + + * readelf.c (print_gdb_index_section): Add overflow checking for + dataend checks. + +2015-03-14 Mark Wielaard + + * nm.c (INTERNAL_ERROR): Remove __DATE__. + * objdump.c (INTERNAL_ERROR): Likewise. + * size.c (INTERNAL_ERROR): Likewise. + * strip.c (INTERNAL_ERROR): Likewise. + +2015-03-18 Petr Machata + + * readelf.c (dwarf_tag_string, dwarf_attr_string) + (dwarf_form_string, dwarf_lang_string, dwarf_inline_string) + (dwarf_encoding_string, dwarf_access_string) + (dwarf_visibility_string, dwarf_virtuality_string) + (dwarf_identifier_case_string, dwarf_calling_convention_string) + (dwarf_ordering_string, dwarf_discr_list_string) + (dwarf_locexpr_opcode_string): Adjust uses of know-dwarf.h macros + to match the API changes. + +2015-03-09 Mark Wielaard + + * elflint.c (compare_hash_gnu_hash): Correct gnu_symbias usage. + +2015-01-03 Mark Wielaard + + * elfcmp (main): Check section name is not NULL. Check sh_entsize + is not zero for symbol tables. Check phdrs are not NULL. + (search_for_copy_reloc): Check sh_entsize is not zero. + +2014-12-30 Mark Wielaard + + * elflint.c (check_scn_group): Check d_buf and name are not NULL. + (is_rel_dyn): Check d is not NULL. Check shdr->sh_entsize is not + zero. + (check_dynamic): Check strshdr is not NULL. Check d_tag is positive. + (check_symtab_shndx): Check symshdr and data->d_buf are not NULL. + Check shdr and symshdr sh_entsize are not zero. + (check_gnu_hash): Make sure maskidx is smaller than bitmask_words. + Check symshdr->sh_entsize is not zero. Check data->d_buf is not + NULL. + (compare_hash_gnu_hash): Check sections d_buf are not NULL. + Check section data is large enough. Use gnu_symbias. + (check_group): Check section val is valid. + (has_copy_reloc): Check sh_entsize is not zero. + (check_versym): Likewise. + (unknown_dependency_p): Likewise. + (check_verneed): Break on invalid ref or offset. Don't assert. + Report error when next offset is zero, but more vers expected. + (check_verdef): Likewise. + (check_attributes): Make sure d_buf is not NULL. + (check_note): Likewise. + (check_note_section): Likewise. + (check_program_header): Make sure section name is not NULL. + +2014-12-26 Mark Wielaard + + * strings.c (read_elf): Produce error when section data falls outside + file. + +2014-12-26 Mark Wielaard + + * nm.c (show_symbols): Guard against divide by zero in error check. + Add section index number in error message. + +2014-12-26 Mark Wielaard + + * nm.c (handle_ar): Skip over /SYM64/ entries. + +2014-12-26 Mark Wielaard + + * nm.c (handle_ar): Break on arsym with invalid offset. + +2014-12-20 Mark Wielaard + + * readelf.c (print_debug_macinfo_section): Mark cus sentinel files + as -1 non-existent. Check macoff against sentinel cus. + +2014-12-20 Mark Wielaard + + * readelf.c (print_debug_exception_table): Add max_action overflow + check. Check action_table_end before reading slib128. Check + max_ar_filter underflow. + +2014-12-18 Ulrich Drepper + + * Makefile.am: Suppress output of textrel_check command. + +2014-12-17 Mark Wielaard + + * readelf.c (print_cfa_program): Add bounds check before each op that + takes at least one argument. + +2014-12-16 Mark Wielaard + + * readelf.c (print_decoded_line_section): Print dwarf_errmsg if + dwarf_onesrcline or dwarf_linesrc fails. + +2014-12-16 Mark Wielaard + + * readelf.c (print_debug_line_section): Correct overflow check for + unit_length. + (print_debug_aranges_section): Correct overflow check for length. + +2014-12-15 Mark Wielaard + + * readelf.c (notice_listptr): Return false if offset doesn't fit + in 61-bits. + (attr_callback): Warn if loclist or rangelist offset doesn't fit. + +2014-12-15 Mark Wielaard + + * readelf.c (print_ops): Don't assert when addr_size or ref_size + is not 4 or 8, just report invalid data. + +2014-12-15 Mark Wielaard + + * readelf.c (print_gdb_index_section): Add more bounds checks. + +2014-12-15 Mark Wielaard + + * readelf.c (print_debug_line_section): Check there is enough room + for DW_LNE_set_address argument. Make sure there is enough room + for the the initial unit_length. + +2014-12-14 Mark Wielaard + + * elflint.c (check_attributes): Call get_uleb128 with end pointer. + * readelf.c (print_attributes): Likewise. + (print_ops): Likewise and also for get_sleb128. + (print_cfa_program): Likewise and add more readp bounds checks. + (read_encoded): Likewise. + (print_debug_frame_section): Likewise. + (print_debug_line_section): Likewise. + (print_debug_macinfo_section): Likewise. + (print_debug_macro_section): Likewise. + (print_debug_exception_table): Likewise. + +2014-12-16 Mark Wielaard + + * elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word + difference doesn't wrap around before returning as int. + +2014-12-11 Mark Wielaard + + * readelf.c (print_debug_exception_table): Check TType base offset + and Action table are sane. + +2014-12-11 Mark Wielaard + + * readelf.c (print_debug_frame_section): Check number of augmentation + chars to print. + +2014-12-09 Mark Wielaard + + * readelf.c (handle_file_note): Check count fits data section and + doesn't overflow fptr. + +2014-12-08 Mark Wielaard + + * readelf.c (print_debug_exception_table): Report invalid data if + action table doesn't immediately follow call site table. + +2014-12-10 Josh Stone + + * addr2line.c (get_diename): New, get linkage_name or name. + * addr2line.c (print_dwarf_function): Use get_diename. + * addr2line.c (handle_address): Likewise. + * addr2line.c (print_diesym): Removed. + +2014-12-10 Josh Stone + + * addr2line.c (handle_address): Find the proper inline parents. + +2014-12-07 Mark Wielaard + + * readelf.c (print_debug_line_section): max_ops_per_instr cannot + be zero. + +2014-12-07 Mark Wielaard + + * readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref + and DW_OP_GNU_implicit_pointer. + +2014-12-04 Mark Wielaard + + * objdump.c (show_relocs_x): Make sure destshdr exists. + (show_relocs_rel): Don't rely on shdr->sh_entsize, use gelf_fsize. + (show_relocs_rela): Likewise. + (show_relocs): Make sure destshdr, symshdr and symdata exists. + +2014-11-30 Mark Wielaard + + * readelf.c (handle_sysv_hash64): Fix overflow check. + +2014-11-28 Mark Wielaard + + * readelf.c (handle_relocs_rel): Don't reuse destshdr to store + section header of a relocation against a STT_SECTION symbol. Use + a new local variable secshdr. + (handle_relocs_rela): Likewise. + +2014-11-26 Mark Wielaard + + * readelf.c (print_debug_aranges_section): Cast Dwarf_Word length + to ptrdiff_t for comparison. + +2014-11-24 Mark Wielaard + + * readelf.c (print_debug_line_section): Check line_range is not zero + before usage. + +2014-11-23 Mark Wielaard + + * readelf.c (print_debug_aranges_section): Check length to catch + nexthdr overflow. + +2014-11-21 Mark Wielaard + + * readelf.c (print_attributes): Guard against empty section. + Document attribute format. Break when vendor name isn't terminated. + Add overflow check for subsection_len. Handle both gnu and non-gnu + attribute tags. + +2014-11-22 Mark Wielaard + + * elflint.c (check_sections): Call ebl_bss_plt_p without ehdr. + * findtextrel.c (process_file): Use elf_getphdrnum. + * readelf.c (process_elf_file): Remove redundant ehdr->e_phoff check. + (print_phdr): Check phnum. + * size.c (show_segments): Use elf_getphdrnum. + * strip.c (handle_elf): Likewise. + * unstrip.c (copy_elf): Likewise. + (copy_elided_sections): Likewise. + (handle_file): Likewise. + +2014-11-18 Mark Wielaard + + * readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block + length. + +2014-11-17 Mark Wielaard + + * readelf.c (handle_verneed): Check vna_next and vn_next exist. + (handle_verdef): Check vda_next and vd_next exist. + (handle_versym): Check vd_next, vna_next and vn_next exist. + Check vername and filename are not NULL before use. + +2014-11-17 Mark Wielaard + + * elfcmp.c (main): Check section names are NULL before use. + * objdump.c (section_match): Likewise. + * size.c (show_sysv): Likewise. + +2014-11-17 Mark Wielaard + + * readelf.c (print_debug_frame_section): Warn if ptr_size is not 4 + or 8 instead of just calling print_cfa_program. + +2014-11-16 Mark Wielaard + + * readelf (process_elf_file): Set phnum to zero if there aren't + actually any pheaders. + (print_phdr): Check there actually is a phdr. + +2014-11-16 Mark Wielaard + + * readelf.c (print_cfa_program): Check block len before calling + print_ops. + +2014-11-14 Mark Wielaard + + * readelf.c (print_debug_frame_section): Sanity Check CIE + unit_length and augmentationlen. + +2014-11-14 Mark Wielaard + + * readelf.c (handle_versym): Check def == NULL before use. + +2014-11-08 Mark Wielaard + + * readelf.c (handle_versym): Initialize vername and filename array + elements. + +2014-11-07 Mark Wielaard + + * readelf.c (handle_sysv_hash): Sanity check section contents. + (handle_sysv_hash64): Likewise. + (handle_gnu_hash): Likewise. + +2014-09-14 Petr Machata + + * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly. + +2014-09-12 Petr Machata + + * readelf.c (encoded_ptr_size): In the switch statement, change + magic constants 3 and 4 to DW_EH_PE_* counterparts. Still accept + 0. Print diagnostic for anything else. + 2014-08-25 Josh Stone * Makefile.am: Prevent premature @AR@ replacement in a sed expression. diff --git a/src/Makefile.am b/src/Makefile.am index 28dad85..a39df27 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,7 +35,7 @@ native_ld = @native_ld@ base_cpu = @base_cpu@ bin_PROGRAMS = readelf nm size strip ld elflint findtextrel addr2line \ - elfcmp objdump ranlib strings ar unstrip stack + elfcmp objdump ranlib strings ar unstrip stack elfcompress ld_dsos = libld_elf_i386_pic.a @@ -72,8 +72,8 @@ CLEANFILES += make-debug-archive if BUILD_STATIC libasm = ../libasm/libasm.a -libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl -libelf = ../libelf/libelf.a +libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl +libelf = ../libelf/libelf.a -lz else libasm = ../libasm/libasm.so libdw = ../libdw/libdw.so @@ -88,28 +88,44 @@ endif # XXX While the file is not finished, don't warn about this ldgeneric_no_Wunused = yes - -readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl -nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \ +ldgeneric_no_Wstack_usage = yes +ldlex_no_Wstack_usage = yes + +# Bad, bad stack usage... +readelf_no_Wstack_usage = yes +nm_no_Wstack_usage = yes +size_no_Wstack_usage = yes +strip_no_Wstack_usage = yes +elflint_no_Wstack_usage = yes +findtextrel_no_Wstack_usage = yes +elfcmp_no_Wstack_usage = yes +objdump_no_Wstack_usage = yes +ranlib_no_Wstack_usage = yes +ar_no_Wstack_usage = yes +unstrip_no_Wstack_usage = yes + +readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ $(demanglelib) -size_LDADD = $(libelf) $(libeu) -strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl -ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl +size_LDADD = $(libelf) $(libeu) $(argp_LDADD) +strip_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +ld_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl if NATIVE_LD # -ldl is always needed for libebl. ld_LDADD += libld_elf.a endif ld_LDFLAGS = -rdynamic -elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl -findtextrel_LDADD = $(libdw) $(libelf) -addr2line_LDADD = $(libdw) $(libelf) -elfcmp_LDADD = $(libebl) $(libelf) -ldl -objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) -ldl -ranlib_LDADD = libar.a $(libelf) $(libeu) -strings_LDADD = $(libelf) $(libeu) -ar_LDADD = libar.a $(libelf) $(libeu) -unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl -stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl $(demanglelib) +elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +findtextrel_LDADD = $(libdw) $(libelf) $(argp_LDADD) +addr2line_LDADD = $(libdw) $(libelf) $(argp_LDADD) $(demanglelib) +elfcmp_LDADD = $(libebl) $(libelf) $(argp_LDADD) -ldl +objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) +strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) +ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) +unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl +stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) +elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) ldlex.o: ldscript.c ldlex_no_Werror = yes @@ -124,16 +140,16 @@ am_libld_elf_i386_pic_a_OBJECTS = i386_ld.os libld_elf_i386_so_SOURCES = libld_elf_i386.so: libld_elf_i386_pic.a libld_elf_i386.map - $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ $(libelf) $(libeu) \ -Wl,--version-script,$(srcdir)/libld_elf_i386.map - $(textrel_check) + @$(textrel_check) endif # Special rule to make it possible to define libld_elf_a_SOURCES as we do. # Otherwise make would complain. .deps/none_ld.Po: none_ld.os - -: + @-: installcheck-binPROGRAMS: $(bin_PROGRAMS) @@ -158,11 +174,11 @@ MAINTAINERCLEANFILES = ldlex.c ldscript.c ldscript.h make-debug-archive: $(srcdir)/make-debug-archive.in - UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \ + $(AM_V_GEN)UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \ AR=$(bindir)/`echo ar | sed '$(transform)'`; \ sed -e "s,[@]UNSTRIP[@],$$UNSTRIP,g" -e "s,[@]AR[@],$$AR,g" \ -e "s%[@]PACKAGE_NAME[@]%$(PACKAGE_NAME)%g" \ -e "s%[@]PACKAGE_VERSION[@]%$(PACKAGE_VERSION)%g" \ $(srcdir)/make-debug-archive.in > $@.new - chmod +x $@.new - mv -f $@.new $@ + $(AM_V_at)chmod +x $@.new + $(AM_V_at)mv -f $@.new $@ diff --git a/src/Makefile.in b/src/Makefile.in index d1a5bad..77bc010 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -18,7 +18,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,21 +91,18 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am ldlex.c ldscript.c \ - $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ - $(noinst_HEADERS) ChangeLog +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \ strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \ findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \ objdump$(EXEEXT) ranlib$(EXEEXT) strings$(EXEEXT) ar$(EXEEXT) \ - unstrip$(EXEEXT) stack$(EXEEXT) + unstrip$(EXEEXT) stack$(EXEEXT) elfcompress$(EXEEXT) @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) # We never build this library but we need to get the dependency files # of all the linker backends that might be used in a non-generic linker. -@NEVER_TRUE@am__append_1 = libdummy.a +@NEVER_TRUE@am__append_2 = libdummy.a # -ldl is always needed for libebl. -@NATIVE_LD_TRUE@am__append_2 = libld_elf.a +@NATIVE_LD_TRUE@am__append_3 = libld_elf.a @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS = subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -105,12 +112,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; @@ -139,27 +147,40 @@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) addr2line_SOURCES = addr2line.c addr2line_OBJECTS = addr2line.$(OBJEXT) am__DEPENDENCIES_1 = -@BUILD_STATIC_FALSE@am__DEPENDENCIES_2 = ../libdw/libdw.so -@BUILD_STATIC_TRUE@am__DEPENDENCIES_2 = ../libdw/libdw.a \ -@BUILD_STATIC_TRUE@ $(am__DEPENDENCIES_1) $(libelf) $(libebl) -addr2line_DEPENDENCIES = $(am__DEPENDENCIES_2) $(libelf) +@BUILD_STATIC_FALSE@am__DEPENDENCIES_2 = ../libelf/libelf.so +@BUILD_STATIC_TRUE@am__DEPENDENCIES_2 = ../libelf/libelf.a +@BUILD_STATIC_FALSE@am__DEPENDENCIES_3 = ../libdw/libdw.so +@BUILD_STATIC_TRUE@am__DEPENDENCIES_3 = ../libdw/libdw.a \ +@BUILD_STATIC_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ +@BUILD_STATIC_TRUE@ $(libebl) +addr2line_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ar_SOURCES = ar.c ar_OBJECTS = ar.$(OBJEXT) -ar_DEPENDENCIES = libar.a $(libelf) $(libeu) +ar_DEPENDENCIES = libar.a $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) elfcmp_SOURCES = elfcmp.c elfcmp_OBJECTS = elfcmp.$(OBJEXT) -elfcmp_DEPENDENCIES = $(libebl) $(libelf) +elfcmp_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) +elfcompress_SOURCES = elfcompress.c +elfcompress_OBJECTS = elfcompress.$(OBJEXT) +elfcompress_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_3) $(libeu) $(am__DEPENDENCIES_1) elflint_SOURCES = elflint.c elflint_OBJECTS = elflint.$(OBJEXT) -elflint_DEPENDENCIES = $(libebl) $(libelf) $(libeu) +elflint_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) findtextrel_SOURCES = findtextrel.c findtextrel_OBJECTS = findtextrel.$(OBJEXT) -findtextrel_DEPENDENCIES = $(am__DEPENDENCIES_2) $(libelf) +findtextrel_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$(OBJEXT) ldlex.$(OBJEXT) \ ldscript.$(OBJEXT) symbolhash.$(OBJEXT) sectionhash.$(OBJEXT) \ versionhash.$(OBJEXT) ld_OBJECTS = $(am_ld_OBJECTS) -ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__append_2) +ld_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) $(am__append_3) ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ $@ am_libld_elf_i386_so_OBJECTS = @@ -167,35 +188,42 @@ libld_elf_i386_so_OBJECTS = $(am_libld_elf_i386_so_OBJECTS) libld_elf_i386_so_LDADD = $(LDADD) nm_SOURCES = nm.c nm_OBJECTS = nm.$(OBJEXT) -nm_DEPENDENCIES = $(am__DEPENDENCIES_2) $(libebl) $(libelf) $(libeu) \ +nm_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libebl) \ + $(am__DEPENDENCIES_2) $(libeu) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) objdump_SOURCES = objdump.c objdump_OBJECTS = objdump.$(OBJEXT) -objdump_DEPENDENCIES = $(libasm) $(libebl) $(libelf) $(libeu) +objdump_DEPENDENCIES = $(libasm) $(libebl) $(am__DEPENDENCIES_2) \ + $(libeu) $(am__DEPENDENCIES_1) ranlib_SOURCES = ranlib.c ranlib_OBJECTS = ranlib.$(OBJEXT) -ranlib_DEPENDENCIES = libar.a $(libelf) $(libeu) +ranlib_DEPENDENCIES = libar.a $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) readelf_SOURCES = readelf.c readelf_OBJECTS = readelf.$(OBJEXT) -readelf_DEPENDENCIES = $(am__DEPENDENCIES_2) $(libebl) $(libelf) \ - $(libeu) +readelf_DEPENDENCIES = $(am__DEPENDENCIES_3) $(libebl) \ + $(am__DEPENDENCIES_2) $(libeu) $(am__DEPENDENCIES_1) size_SOURCES = size.c size_OBJECTS = size.$(OBJEXT) -size_DEPENDENCIES = $(libelf) $(libeu) +size_DEPENDENCIES = $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) stack_SOURCES = stack.c stack_OBJECTS = stack.$(OBJEXT) -stack_DEPENDENCIES = $(libebl) $(libelf) $(am__DEPENDENCIES_2) \ - $(libeu) $(am__DEPENDENCIES_1) +stack_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_3) $(libeu) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) strings_SOURCES = strings.c strings_OBJECTS = strings.$(OBJEXT) -strings_DEPENDENCIES = $(libelf) $(libeu) +strings_DEPENDENCIES = $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) strip_SOURCES = strip.c strip_OBJECTS = strip.$(OBJEXT) -strip_DEPENDENCIES = $(libebl) $(libelf) $(libeu) +strip_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) $(libeu) \ + $(am__DEPENDENCIES_1) unstrip_SOURCES = unstrip.c unstrip_OBJECTS = unstrip.$(OBJEXT) -unstrip_DEPENDENCIES = $(libebl) $(libelf) $(am__DEPENDENCIES_2) \ - $(libeu) +unstrip_DEPENDENCIES = $(libebl) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_3) $(libeu) $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -269,13 +297,14 @@ am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = SOURCES = $(libar_a_SOURCES) $(libdummy_a_SOURCES) \ $(libld_elf_a_SOURCES) $(libld_elf_i386_pic_a_SOURCES) \ - addr2line.c ar.c elfcmp.c elflint.c findtextrel.c \ - $(ld_SOURCES) $(libld_elf_i386_so_SOURCES) nm.c objdump.c \ - ranlib.c readelf.c size.c stack.c strings.c strip.c unstrip.c + addr2line.c ar.c elfcmp.c elfcompress.c elflint.c \ + findtextrel.c $(ld_SOURCES) $(libld_elf_i386_so_SOURCES) nm.c \ + objdump.c ranlib.c readelf.c size.c stack.c strings.c strip.c \ + unstrip.c DIST_SOURCES = $(libar_a_SOURCES) $(am__libdummy_a_SOURCES_DIST) \ $(am__libld_elf_a_SOURCES_DIST) \ $(libld_elf_i386_pic_a_SOURCES) addr2line.c ar.c elfcmp.c \ - elflint.c findtextrel.c $(ld_SOURCES) \ + elfcompress.c elflint.c findtextrel.c $(ld_SOURCES) \ $(libld_elf_i386_so_SOURCES) nm.c objdump.c ranlib.c readelf.c \ size.c stack.c strings.c strip.c unstrip.c am__can_run_installinfo = \ @@ -303,6 +332,9 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am $(top_srcdir)/config/ylwrap \ + ChangeLog ldlex.c ldscript.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -312,6 +344,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -333,6 +366,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -344,6 +380,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -387,6 +424,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -434,23 +472,37 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \ -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda make-debug-archive none_ld.os \ $(ld_modules:.c=.os) *.gconv -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw AM_YFLAGS = -pld AM_LFLAGS = -Pld -olex.yy.c native_ld = @native_ld@ ld_dsos = libld_elf_i386_pic.a @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \ -@NATIVE_LD_FALSE@ $(am__append_1) -@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_1) +@NATIVE_LD_FALSE@ $(am__append_2) +@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2) @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu) @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \ @@ -467,33 +519,50 @@ bin_SCRIPTS = make-debug-archive @BUILD_STATIC_FALSE@libasm = ../libasm/libasm.so @BUILD_STATIC_TRUE@libasm = ../libasm/libasm.a @BUILD_STATIC_FALSE@libdw = ../libdw/libdw.so -@BUILD_STATIC_TRUE@libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl +@BUILD_STATIC_TRUE@libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl @BUILD_STATIC_FALSE@libelf = ../libelf/libelf.so -@BUILD_STATIC_TRUE@libelf = ../libelf/libelf.a +@BUILD_STATIC_TRUE@libelf = ../libelf/libelf.a -lz libebl = ../libebl/libebl.a libeu = ../lib/libeu.a @DEMANGLE_TRUE@demanglelib = -lstdc++ # XXX While the file is not finished, don't warn about this ldgeneric_no_Wunused = yes -readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl -nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \ +ldgeneric_no_Wstack_usage = yes +ldlex_no_Wstack_usage = yes + +# Bad, bad stack usage... +readelf_no_Wstack_usage = yes +nm_no_Wstack_usage = yes +size_no_Wstack_usage = yes +strip_no_Wstack_usage = yes +elflint_no_Wstack_usage = yes +findtextrel_no_Wstack_usage = yes +elfcmp_no_Wstack_usage = yes +objdump_no_Wstack_usage = yes +ranlib_no_Wstack_usage = yes +ar_no_Wstack_usage = yes +unstrip_no_Wstack_usage = yes +readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ $(demanglelib) -size_LDADD = $(libelf) $(libeu) -strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl -ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(am__append_2) +size_LDADD = $(libelf) $(libeu) $(argp_LDADD) +strip_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +ld_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ + $(am__append_3) ld_LDFLAGS = -rdynamic -elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl -findtextrel_LDADD = $(libdw) $(libelf) -addr2line_LDADD = $(libdw) $(libelf) -elfcmp_LDADD = $(libebl) $(libelf) -ldl -objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) -ldl -ranlib_LDADD = libar.a $(libelf) $(libeu) -strings_LDADD = $(libelf) $(libeu) -ar_LDADD = libar.a $(libelf) $(libeu) -unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl -stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl $(demanglelib) +elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +findtextrel_LDADD = $(libdw) $(libelf) $(argp_LDADD) +addr2line_LDADD = $(libdw) $(libelf) $(argp_LDADD) $(demanglelib) +elfcmp_LDADD = $(libebl) $(libelf) $(argp_LDADD) -ldl +objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) +strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) +ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) +unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl +stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) +elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) ldlex_no_Werror = yes # Machine-specific linker code. @@ -518,7 +587,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits src/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -527,7 +595,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -618,6 +686,10 @@ elfcmp$(EXEEXT): $(elfcmp_OBJECTS) $(elfcmp_DEPENDENCIES) $(EXTRA_elfcmp_DEPENDE @rm -f elfcmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elfcmp_OBJECTS) $(elfcmp_LDADD) $(LIBS) +elfcompress$(EXEEXT): $(elfcompress_OBJECTS) $(elfcompress_DEPENDENCIES) $(EXTRA_elfcompress_DEPENDENCIES) + @rm -f elfcompress$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfcompress_OBJECTS) $(elfcompress_LDADD) $(LIBS) + elflint$(EXEEXT): $(elflint_OBJECTS) $(elflint_DEPENDENCIES) $(EXTRA_elflint_DEPENDENCIES) @rm -f elflint$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elflint_OBJECTS) $(elflint_LDADD) $(LIBS) @@ -733,6 +805,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arlib2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfcmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfcompress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elflint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findtextrel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386_ld.Po@am__quote@ @@ -758,14 +831,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) @@ -984,28 +1057,33 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) ldlex.o: ldscript.c ldscript.h: ldscript.c @NATIVE_LD_FALSE@libld_elf_i386.so: libld_elf_i386_pic.a libld_elf_i386.map -@NATIVE_LD_FALSE@ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ +@NATIVE_LD_FALSE@ $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ @NATIVE_LD_FALSE@ $(libelf) $(libeu) \ @NATIVE_LD_FALSE@ -Wl,--version-script,$(srcdir)/libld_elf_i386.map -@NATIVE_LD_FALSE@ $(textrel_check) +@NATIVE_LD_FALSE@ @$(textrel_check) # Special rule to make it possible to define libld_elf_a_SOURCES as we do. # Otherwise make would complain. .deps/none_ld.Po: none_ld.os - -: + @-: installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ @@ -1024,14 +1102,14 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) done; rm -f c$${pid}_.???; exit $$bad make-debug-archive: $(srcdir)/make-debug-archive.in - UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \ + $(AM_V_GEN)UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \ AR=$(bindir)/`echo ar | sed '$(transform)'`; \ sed -e "s,[@]UNSTRIP[@],$$UNSTRIP,g" -e "s,[@]AR[@],$$AR,g" \ -e "s%[@]PACKAGE_NAME[@]%$(PACKAGE_NAME)%g" \ -e "s%[@]PACKAGE_VERSION[@]%$(PACKAGE_VERSION)%g" \ $(srcdir)/make-debug-archive.in > $@.new - chmod +x $@.new - mv -f $@.new $@ + $(AM_V_at)chmod +x $@.new + $(AM_V_at)mv -f $@.new $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/addr2line.c b/src/addr2line.c index 50fc2b3..0ce854f 100644 --- a/src/addr2line.c +++ b/src/addr2line.c @@ -1,5 +1,5 @@ /* Locate source files and line information for given addresses - Copyright (C) 2005-2010, 2012, 2013 Red Hat, Inc. + Copyright (C) 2005-2010, 2012, 2013, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -51,11 +50,17 @@ ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ #define OPT_DEMANGLER 0x100 +#define OPT_PRETTY 0x101 /* 'p' is already used to select the process. */ /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = { - { NULL, 0, NULL, 0, N_("Output selection options:"), 2 }, + { NULL, 0, NULL, 0, N_("Input format options:"), 2 }, + { "section", 'j', "NAME", 0, + N_("Treat addresses as offsets relative to NAME section."), 0 }, + + { NULL, 0, NULL, 0, N_("Output format options:"), 3 }, + { "addresses", 'a', NULL, 0, N_("Print address before each entry"), 0 }, { "basenames", 's', NULL, 0, N_("Show only base names of source files"), 0 }, { "absolute", 'A', NULL, 0, N_("Show absolute file names using compilation directory"), 0 }, @@ -63,16 +68,17 @@ static const struct argp_option options[] = { "symbols", 'S', NULL, 0, N_("Also show symbol or section names"), 0 }, { "symbols-sections", 'x', NULL, 0, N_("Also show symbol and the section names"), 0 }, { "flags", 'F', NULL, 0, N_("Also show line table flags"), 0 }, - { "section", 'j', "NAME", 0, - N_("Treat addresses as offsets relative to NAME section."), 0 }, { "inlines", 'i', NULL, 0, N_("Show all source locations that caused inline expansion of subroutines at the address."), 0 }, + { "demangle", 'C', "ARG", OPTION_ARG_OPTIONAL, + N_("Show demangled symbols (ARG is always ignored)"), 0 }, + { "pretty-print", OPT_PRETTY, NULL, 0, + N_("Print all information on one line, and indent inlines"), 0 }, { NULL, 0, NULL, 0, N_("Miscellaneous:"), 0 }, /* Unsupported options. */ { "target", 'b', "ARG", OPTION_HIDDEN, NULL, 0 }, - { "demangle", 'C', "ARG", OPTION_HIDDEN | OPTION_ARG_OPTIONAL, NULL, 0 }, { "demangler", OPT_DEMANGLER, "ARG", OPTION_HIDDEN, NULL, 0 }, { NULL, 0, NULL, 0, NULL, 0 } }; @@ -99,6 +105,8 @@ static const struct argp argp = /* Handle ADDR. */ static int handle_address (const char *addr, Dwfl *dwfl); +/* True when we should print the address for each entry. */ +static bool print_addresses; /* True if only base names of files should be shown. */ static bool only_basenames; @@ -124,6 +132,16 @@ static const char *just_section; /* True if all inlined subroutines of the current address should be shown. */ static bool show_inlines; +/* True if all names need to be demangled. */ +static bool demangle; + +/* True if all information should be printed on one line. */ +static bool pretty; + +#ifdef USE_DEMANGLE +static size_t demangle_buffer_len = 0; +static char *demangle_buffer = NULL; +#endif int main (int argc, char *argv[]) @@ -131,9 +149,6 @@ main (int argc, char *argv[]) int remaining; int result = 0; - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); @@ -184,6 +199,11 @@ main (int argc, char *argv[]) } dwfl_end (dwfl); + +#ifdef USE_DEMANGLE + free (demangle_buffer); +#endif + return result; } @@ -212,10 +232,14 @@ parse_opt (int key, char *arg, struct argp_state *state) state->child_inputs[0] = state->input; break; + case 'a': + print_addresses = true; + break; + case 'b': case 'C': case OPT_DEMANGLER: - /* Ignored for compatibility. */ + demangle = true; break; case 's': @@ -251,12 +275,49 @@ parse_opt (int key, char *arg, struct argp_state *state) show_inlines = true; break; + case OPT_PRETTY: + pretty = true; + break; + default: return ARGP_ERR_UNKNOWN; } return 0; } +static const char * +symname (const char *name) +{ +#ifdef USE_DEMANGLE + // Require GNU v3 ABI by the "_Z" prefix. + if (demangle && name[0] == '_' && name[1] == 'Z') + { + int status = -1; + char *dsymname = __cxa_demangle (name, demangle_buffer, + &demangle_buffer_len, &status); + if (status == 0) + name = demangle_buffer = dsymname; + } +#endif + return name; +} + +static const char * +get_diename (Dwarf_Die *die) +{ + Dwarf_Attribute attr; + const char *name; + + name = dwarf_formstring (dwarf_attr_integrate (die, DW_AT_MIPS_linkage_name, + &attr) + ?: dwarf_attr_integrate (die, DW_AT_linkage_name, + &attr)); + + if (name == NULL) + name = dwarf_diename (die) ?: "??"; + + return name; +} static bool print_dwarf_function (Dwfl_Module *mod, Dwarf_Addr addr) @@ -269,24 +330,36 @@ print_dwarf_function (Dwfl_Module *mod, Dwarf_Addr addr) if (nscopes <= 0) return false; + bool res = false; for (int i = 0; i < nscopes; ++i) switch (dwarf_tag (&scopes[i])) { case DW_TAG_subprogram: { - const char *name = dwarf_diename (&scopes[i]); + const char *name = get_diename (&scopes[i]); if (name == NULL) - return false; - puts (name); - return true; + goto done; + printf ("%s%c", symname (name), pretty ? ' ' : '\n'); + res = true; + goto done; } case DW_TAG_inlined_subroutine: { - const char *name = dwarf_diename (&scopes[i]); + const char *name = get_diename (&scopes[i]); if (name == NULL) - return false; - printf ("%s inlined", name); + goto done; + + /* When using --pretty-print we only show inlines on their + own line. Just print the first subroutine name. */ + if (pretty) + { + printf ("%s ", symname (name)); + res = true; + goto done; + } + else + printf ("%s inlined", symname (name)); Dwarf_Files *files; if (dwarf_getsrcfiles (cudie, &files, NULL) == 0) @@ -344,7 +417,9 @@ print_dwarf_function (Dwfl_Module *mod, Dwarf_Addr addr) } } - return false; +done: + free (scopes); + return res; } static void @@ -361,12 +436,13 @@ print_addrsym (Dwfl_Module *mod, GElf_Addr addr) if (i >= 0) name = dwfl_module_relocation_info (mod, i, NULL); if (name == NULL) - puts ("??"); + printf ("??%c", pretty ? ' ': '\n'); else - printf ("(%s)+%#" PRIx64 "\n", name, addr); + printf ("(%s)+%#" PRIx64 "%c", name, addr, pretty ? ' ' : '\n'); } else { + name = symname (name); if (off == 0) printf ("%s", name); else @@ -391,27 +467,10 @@ print_addrsym (Dwfl_Module *mod, GElf_Addr addr) } } } - puts (""); + printf ("%c", pretty ? ' ' : '\n'); } } -static void -print_diesym (Dwarf_Die *die) -{ - Dwarf_Attribute attr; - const char *name; - - name = dwarf_formstring (dwarf_attr_integrate (die, DW_AT_MIPS_linkage_name, - &attr) - ?: dwarf_attr_integrate (die, DW_AT_linkage_name, - &attr)); - - if (name == NULL) - name = dwarf_diename (die) ?: "??"; - - puts (name); -} - static int see_one_module (Dwfl_Module *mod, void **userdata __attribute__ ((unused)), @@ -531,11 +590,34 @@ print_src (const char *src, int lineno, int linecol, Dwarf_Die *cu) } static int +get_addr_width (Dwfl_Module *mod) +{ + // Try to find the address width if possible. + static int width = 0; + if (width == 0 && mod != NULL) + { + Dwarf_Addr bias; + Elf *elf = dwfl_module_getelf (mod, &bias); + if (elf != NULL) + { + GElf_Ehdr ehdr_mem; + GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); + if (ehdr != NULL) + width = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 8 : 16; + } + } + if (width == 0) + width = 16; + + return width; +} + +static int handle_address (const char *string, Dwfl *dwfl) { char *endp; - uintmax_t addr = strtoumax (string, &endp, 0); - if (endp == string) + uintmax_t addr = strtoumax (string, &endp, 16); + if (endp == string || *endp != '\0') { bool parsed = false; int i, j; @@ -584,17 +666,30 @@ handle_address (const char *string, Dwfl *dwfl) Dwfl_Module *mod = dwfl_addrmodule (dwfl, addr); + if (print_addresses) + { + int width = get_addr_width (mod); + printf ("0x%.*" PRIx64 "%s", width, addr, pretty ? ": " : "\n"); + } + if (show_functions) { /* First determine the function name. Use the DWARF information if possible. */ if (! print_dwarf_function (mod, addr) && !show_symbols) - puts (dwfl_module_addrname (mod, addr) ?: "??"); + { + const char *name = dwfl_module_addrname (mod, addr); + name = name != NULL ? symname (name) : "??"; + printf ("%s%c", name, pretty ? ' ' : '\n'); + } } if (show_symbols) print_addrsym (mod, addr); + if ((show_functions || show_symbols) && pretty) + printf ("at "); + Dwfl_Line *line = dwfl_module_getsrc (mod, addr); const char *src; @@ -654,6 +749,7 @@ handle_address (const char *string, Dwfl *dwfl) dwarf_offdie (dwfl_module_getdwarf (mod, &bias), dieoff, &subroutine); free (scopes); + scopes = NULL; nscopes = dwarf_getscopes_die (&subroutine, &scopes); if (nscopes > 1) @@ -671,8 +767,29 @@ handle_address (const char *string, Dwfl *dwfl) if (dwarf_tag (die) != DW_TAG_inlined_subroutine) continue; + if (pretty) + printf (" (inlined by) "); + if (show_functions) - print_diesym (&scopes[i + 1]); + { + /* Search for the parent inline or function. It + might not be directly above this inline -- e.g. + there could be a lexical_block in between. */ + for (int j = i + 1; j < nscopes; j++) + { + Dwarf_Die *parent = &scopes[j]; + int tag = dwarf_tag (parent); + if (tag == DW_TAG_inlined_subroutine + || tag == DW_TAG_entry_point + || tag == DW_TAG_subprogram) + { + printf ("%s%s", + symname (get_diename (parent)), + pretty ? " at " : "\n"); + break; + } + } + } src = NULL; lineno = 0; diff --git a/src/ar.c b/src/ar.c index f51f0ef..1320d07 100644 --- a/src/ar.c +++ b/src/ar.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -141,9 +140,6 @@ static enum { ipos_none, ipos_before, ipos_after } ipos; int main (int argc, char *argv[]) { - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); @@ -683,13 +679,13 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, if (preserve_dates) { - struct timeval tv[2]; + struct timespec tv[2]; tv[0].tv_sec = arhdr->ar_date; - tv[0].tv_usec = 0; + tv[0].tv_nsec = 0; tv[1].tv_sec = arhdr->ar_date; - tv[1].tv_usec = 0; + tv[1].tv_nsec = 0; - if (unlikely (futimes (xfd, tv) != 0)) + if (unlikely (futimens (xfd, tv) != 0)) { error (0, errno, gettext ("cannot change modification time of %s"), diff --git a/src/elfcmp.c b/src/elfcmp.c index 2d85f0b..852b92f 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -1,5 +1,5 @@ /* Compare relevant content of two ELF files. - Copyright (C) 2005-2012 Red Hat, Inc. + Copyright (C) 2005-2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -287,7 +287,8 @@ main (int argc, char *argv[]) /* Compare the headers. We allow the name to be at a different location. */ - if (unlikely (strcmp (sname1, sname2) != 0)) + if (unlikely (sname1 == NULL || sname2 == NULL + || strcmp (sname1, sname2) != 0)) { error (0, 0, gettext ("%s %s differ: section [%zu], [%zu] name"), fname1, fname2, elf_ndxscn (scn1), elf_ndxscn (scn2)); @@ -295,8 +296,8 @@ main (int argc, char *argv[]) } /* We ignore certain sections. */ - if (strcmp (sname1, ".gnu_debuglink") == 0 - || strcmp (sname1, ".gnu.prelink_undo") == 0) + if ((sname1 != NULL && strcmp (sname1, ".gnu_debuglink") == 0) + || (sname1 != NULL && strcmp (sname1, ".gnu.prelink_undo") == 0)) continue; if (shdr1->sh_type != shdr2->sh_type @@ -333,6 +334,11 @@ main (int argc, char *argv[]) { case SHT_DYNSYM: case SHT_SYMTAB: + if (shdr1->sh_entsize == 0) + error (2, 0, + gettext ("symbol table [%zu] in '%s' has zero sh_entsize"), + elf_ndxscn (scn1), fname1); + /* Iterate over the symbol table. We ignore the st_size value of undefined symbols. */ for (int ndx = 0; ndx < (int) (shdr1->sh_size / shdr1->sh_entsize); @@ -355,7 +361,8 @@ main (int argc, char *argv[]) sym1->st_name); const char *name2 = elf_strptr (elf2, shdr2->sh_link, sym2->st_name); - if (unlikely (strcmp (name1, name2) != 0 + if (unlikely (name1 == NULL || name2 == NULL + || strcmp (name1, name2) != 0 || sym1->st_value != sym2->st_value || (sym1->st_size != sym2->st_size && sym1->st_shndx != SHN_UNDEF) @@ -504,6 +511,7 @@ cannot read note section [%zu] '%s' in '%s': %s"), if (unlikely (data1->d_size != data2->d_size || (shdr1->sh_type != SHT_NOBITS + && data1->d_size != 0 && memcmp (data1->d_buf, data2->d_buf, data1->d_size) != 0))) { @@ -590,13 +598,13 @@ cannot read note section [%zu] '%s' in '%s': %s"), { GElf_Phdr phdr1_mem; GElf_Phdr *phdr1 = gelf_getphdr (elf1, ndx, &phdr1_mem); - if (ehdr1 == NULL) + if (phdr1 == NULL) error (2, 0, gettext ("cannot get program header entry %d of '%s': %s"), ndx, fname1, elf_errmsg (-1)); GElf_Phdr phdr2_mem; GElf_Phdr *phdr2 = gelf_getphdr (elf2, ndx, &phdr2_mem); - if (ehdr2 == NULL) + if (phdr2 == NULL) error (2, 0, gettext ("cannot get program header entry %d of '%s': %s"), ndx, fname2, elf_errmsg (-1)); @@ -647,6 +655,8 @@ cannot read note section [%zu] '%s' in '%s': %s"), out: elf_end (elf1); elf_end (elf2); + ebl_closebackend (ebl1); + ebl_closebackend (ebl2); close (fd1); close (fd2); @@ -759,7 +769,7 @@ search_for_copy_reloc (Ebl *ebl, size_t scnndx, int symndx) gettext ("cannot get content of section %zu: %s"), elf_ndxscn (scn), elf_errmsg (-1)); - if (shdr->sh_type == SHT_REL) + if (shdr->sh_type == SHT_REL && shdr->sh_entsize != 0) for (int ndx = 0; ndx < (int) (shdr->sh_size / shdr->sh_entsize); ++ndx) { @@ -773,7 +783,7 @@ search_for_copy_reloc (Ebl *ebl, size_t scnndx, int symndx) && ebl_copy_reloc_p (ebl, GELF_R_TYPE (rel->r_info))) return true; } - else + else if (shdr->sh_entsize != 0) for (int ndx = 0; ndx < (int) (shdr->sh_size / shdr->sh_entsize); ++ndx) { @@ -810,8 +820,7 @@ compare_Elf32_Word (const void *p1, const void *p2) { const Elf32_Word *w1 = p1; const Elf32_Word *w2 = p2; - assert (sizeof (int) >= sizeof (*w1)); - return (int) *w1 - (int) *w2; + return *w1 < *w2 ? -1 : *w1 > *w2 ? 1 : 0; } static int diff --git a/src/elfcompress.c b/src/elfcompress.c new file mode 100644 index 0000000..23939db --- /dev/null +++ b/src/elfcompress.c @@ -0,0 +1,1321 @@ +/* Compress or decompress an ELF file. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ELFUTILS_HEADER(elf) +#include ELFUTILS_HEADER(ebl) +#include +#include "system.h" + +/* Name and version of program. */ +static void print_version (FILE *stream, struct argp_state *state); +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + +/* Bug report address. */ +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; + +static int verbose = 0; /* < 0, no warnings, > 0 extra verbosity. */ +static bool force = false; +static bool permissive = false; +static const char *foutput = NULL; + +#define T_UNSET 0 +#define T_DECOMPRESS 1 /* none */ +#define T_COMPRESS_ZLIB 2 /* zlib */ +#define T_COMPRESS_GNU 3 /* zlib-gnu */ +static int type = T_UNSET; + +static void +print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) +{ + fprintf (stream, "elfcompress (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); +} + +struct section_pattern +{ + char *pattern; + struct section_pattern *next; +}; + +static struct section_pattern *patterns = NULL; + +static void +add_pattern (const char *pattern) +{ + struct section_pattern *p = xmalloc (sizeof *p); + p->pattern = xstrdup (pattern); + p->next = patterns; + patterns = p; +} + +static void +free_patterns (void) +{ + struct section_pattern *pattern = patterns; + while (pattern != NULL) + { + struct section_pattern *p = pattern; + pattern = p->next; + free (p->pattern); + free (p); + } +} + +static error_t +parse_opt (int key, char *arg __attribute__ ((unused)), + struct argp_state *state __attribute__ ((unused))) +{ + switch (key) + { + case 'v': + verbose++; + break; + + case 'q': + verbose--; + + case 'f': + force = true; + break; + + case 'p': + permissive = true; + break; + + case 'n': + add_pattern (arg); + break; + + case 'o': + if (foutput != NULL) + argp_error (state, N_("-o option specified twice")); + else + foutput = arg; + break; + + case 't': + if (type != T_UNSET) + argp_error (state, N_("-t option specified twice")); + + if (strcmp ("none", arg) == 0) + type = T_DECOMPRESS; + else if (strcmp ("zlib", arg) == 0 || strcmp ("zlib-gabi", arg) == 0) + type = T_COMPRESS_ZLIB; + else if (strcmp ("zlib-gnu", arg) == 0 || strcmp ("gnu", arg) == 0) + type = T_COMPRESS_GNU; + else + argp_error (state, N_("unknown compression type '%s'"), arg); + break; + + case ARGP_KEY_SUCCESS: + if (type == T_UNSET) + type = T_COMPRESS_ZLIB; + if (patterns == NULL) + add_pattern (".?(z)debug*"); + break; + + case ARGP_KEY_NO_ARGS: + /* We need at least one input file. */ + argp_error (state, N_("No input file given")); + break; + + case ARGP_KEY_ARGS: + if (foutput != NULL && state->argc - state->next > 1) + argp_error (state, + N_("Only one input file allowed together with '-o'")); + /* We only use this for checking the number of arguments, we don't + actually want to consume them, so fallthrough. */ + default: + return ARGP_ERR_UNKNOWN; + } + return 0; +} + +static bool +section_name_matches (const char *name) +{ + struct section_pattern *pattern = patterns; + while (pattern != NULL) + { + if (fnmatch (pattern->pattern, name, FNM_EXTMATCH) == 0) + return true; + pattern = pattern->next; + } + return false; +} + +static int +setshdrstrndx (Elf *elf, GElf_Ehdr *ehdr, size_t ndx) +{ + if (ndx < SHN_LORESERVE) + ehdr->e_shstrndx = ndx; + else + { + ehdr->e_shstrndx = SHN_XINDEX; + Elf_Scn *zscn = elf_getscn (elf, 0); + GElf_Shdr zshdr_mem; + GElf_Shdr *zshdr = gelf_getshdr (zscn, &zshdr_mem); + if (zshdr == NULL) + return -1; + zshdr->sh_link = ndx; + if (gelf_update_shdr (zscn, zshdr) == 0) + return -1; + } + + if (gelf_update_ehdr (elf, ehdr) == 0) + return -1; + + return 0; +} + +static int +compress_section (Elf_Scn *scn, size_t orig_size, const char *name, + const char *newname, size_t ndx, + bool gnu, bool compress, bool report_verbose) +{ + int res; + unsigned int flags = compress && force ? ELF_CHF_FORCE : 0; + if (gnu) + res = elf_compress_gnu (scn, compress ? 1 : 0, flags); + else + res = elf_compress (scn, compress ? ELFCOMPRESS_ZLIB : 0, flags); + + if (res < 0) + error (0, 0, "Couldn't decompress section [%zd] %s: %s", + ndx, name, elf_errmsg (-1)); + else + { + if (compress && res == 0) + { + if (verbose >= 0) + printf ("[%zd] %s NOT compressed, wouldn't be smaller\n", + ndx, name); + } + + if (report_verbose && res > 0) + { + printf ("[%zd] %s %s", ndx, name, + compress ? "compressed" : "decompressed"); + if (newname != NULL) + printf (" -> %s", newname); + + /* Reload shdr, it has changed. */ + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for section [%zd]", ndx); + return -1; + } + float new = shdr->sh_size; + float orig = orig_size ?: 1; + printf (" (%zu => %" PRIu64 " %.2f%%)\n", + orig_size, shdr->sh_size, (new / orig) * 100); + } + } + + return res; +} + +static int +process_file (const char *fname) +{ + if (verbose > 0) + printf ("processing: %s\n", fname); + + /* The input ELF. */ + int fd = -1; + Elf *elf = NULL; + + /* The output ELF. */ + char *fnew = NULL; + int fdnew = -1; + Elf *elfnew = NULL; + + /* Buffer for (one) new section name if necessary. */ + char *snamebuf = NULL; + + /* String table (and symbol table), if section names need adjusting. */ + struct Ebl_Strtab *names = NULL; + struct Ebl_Strent **scnstrents = NULL; + struct Ebl_Strent **symstrents = NULL; + char **scnnames = NULL; + + /* Section data from names. */ + void *namesbuf = NULL; + + /* Which sections match and need to be (un)compressed. */ + unsigned int *sections = NULL; + + /* How many sections are we talking about? */ + size_t shnum = 0; + +#define WORD_BITS (8U * sizeof (unsigned int)) + void set_section (size_t ndx) + { + sections[ndx / WORD_BITS] |= (1U << (ndx % WORD_BITS)); + } + + bool get_section (size_t ndx) + { + return (sections[ndx / WORD_BITS] & (1U << (ndx % WORD_BITS))) != 0; + } + + int cleanup (int res) + { + elf_end (elf); + close (fd); + + elf_end (elfnew); + close (fdnew); + + if (fnew != NULL) + { + unlink (fnew); + free (fnew); + fnew = NULL; + } + + free (snamebuf); + if (names != NULL) + { + ebl_strtabfree (names); + free (scnstrents); + free (symstrents); + free (namesbuf); + if (scnnames != NULL) + { + for (size_t n = 0; n < shnum; n++) + free (scnnames[n]); + free (scnnames); + } + } + + free (sections); + + return res; + } + + fd = open (fname, O_RDONLY); + if (fd < 0) + { + error (0, errno, "Couldn't open %s\n", fname); + return cleanup (-1); + } + + elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + { + error (0, 0, "Couldn't open ELF file %s for reading: %s", + fname, elf_errmsg (-1)); + return cleanup (-1); + } + + /* We dont' handle ar files (or anything else), we probably should. */ + Elf_Kind kind = elf_kind (elf); + if (kind != ELF_K_ELF) + { + if (kind == ELF_K_AR) + error (0, 0, "Cannot handle ar files: %s", fname); + else + error (0, 0, "Unknown file type: %s", fname); + return cleanup (-1); + } + + struct stat st; + if (fstat (fd, &st) != 0) + { + error (0, errno, "Couldn't fstat %s", fname); + return cleanup (-1); + } + + GElf_Ehdr ehdr; + if (gelf_getehdr (elf, &ehdr) == NULL) + { + error (0, 0, "Couldn't get ehdr for %s: %s", fname, elf_errmsg (-1)); + return cleanup (-1); + } + + /* Get the section header string table. */ + size_t shdrstrndx; + if (elf_getshdrstrndx (elf, &shdrstrndx) != 0) + { + error (0, 0, "Couldn't get section header string table index in %s: %s", + fname, elf_errmsg (-1)); + return cleanup (-1); + } + + /* How many sections are we talking about? */ + if (elf_getshdrnum (elf, &shnum) != 0) + { + error (0, 0, "Couldn't get number of sections in %s: %s", + fname, elf_errmsg (1)); + return cleanup (-1); + } + + if (shnum == 0) + { + error (0, 0, "ELF file %s has no sections", fname); + return cleanup (-1); + } + + sections = xcalloc (shnum / 8 + 1, sizeof (unsigned int)); + + size_t phnum; + if (elf_getphdrnum (elf, &phnum) != 0) + { + error (0, 0, "Couldn't get phdrnum: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + /* Whether we need to adjust any section names (going to/from GNU + naming). If so we'll need to build a new section header string + table. */ + bool adjust_names = false; + + /* If there are phdrs we want to maintain the layout of the + allocated sections in the file. */ + bool layout = phnum != 0; + + /* While going through all sections keep track of last section data + offset if needed to keep the layout. We are responsible for + adding the section offsets and headers (e_shoff) in that case + (which we will place after the last section). */ + GElf_Off last_offset = 0; + if (layout) + last_offset = (ehdr.e_phoff + + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT)); + + /* Which section, if any, is a symbol table that shares a string + table with the section header string table? */ + size_t symtabndx = 0; + + /* We do three passes over all sections. + + First an inspection pass over the old Elf to see which section + data needs to be copied and/or transformed, which sections need a + names change and whether there is a symbol table that might need + to be adjusted be if the section header name table is changed. + + Second a collection pass that creates the Elf sections and copies + the data. This pass will compress/decompress section data when + needed. And it will collect all data needed if we'll need to + construct a new string table. Afterwards the new string table is + constructed. + + Third a fixup/adjustment pass over the new Elf that will adjust + any section references (names) and adjust the layout based on the + new sizes of the sections if necessary. This pass is optional if + we aren't responsible for the layout and the section header + string table hasn't been changed. */ + + /* Inspection pass. */ + size_t maxnamelen = 0; + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + size_t ndx = elf_ndxscn (scn); + if (ndx > shnum) + { + error (0, 0, "Unexpected section number %zd, expected only %zd", + ndx, shnum); + cleanup (-1); + } + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for section %zd", ndx); + return cleanup (-1); + } + + const char *sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (sname == NULL) + { + error (0, 0, "Couldn't get name for section %zd", ndx); + return cleanup (-1); + } + + if (section_name_matches (sname)) + { + if (shdr->sh_type != SHT_NOBITS + && (shdr->sh_flags & SHF_ALLOC) == 0) + { + set_section (ndx); + /* Check if we might want to change this section name. */ + if (! adjust_names + && ((type != T_COMPRESS_GNU + && strncmp (sname, ".zdebug", + strlen (".zdebug")) == 0) + || (type == T_COMPRESS_GNU + && strncmp (sname, ".debug", + strlen (".debug")) == 0))) + adjust_names = true; + + /* We need a buffer this large if we change the names. */ + if (adjust_names) + { + size_t slen = strlen (sname); + if (slen > maxnamelen) + maxnamelen = slen; + } + } + else + if (verbose >= 0) + printf ("[%zd] %s ignoring %s section\n", ndx, sname, + (shdr->sh_type == SHT_NOBITS ? "no bits" : "allocated")); + } + + if (shdr->sh_type == SHT_SYMTAB) + { + /* Check if we might have to adjust the symbol name indexes. */ + if (shdr->sh_link == shdrstrndx) + { + if (symtabndx != 0) + { + error (0, 0, + "Multiple symbol tables (%zd, %zd) using the same string table unsupported", symtabndx, ndx); + return cleanup (-1); + } + symtabndx = ndx; + } + } + + /* Keep track of last allocated data offset. */ + if (layout) + if ((shdr->sh_flags & SHF_ALLOC) != 0) + { + GElf_Off off = shdr->sh_offset + (shdr->sh_type != SHT_NOBITS + ? shdr->sh_size : 0); + if (last_offset < off) + last_offset = off; + } + } + + if (adjust_names) + { + names = ebl_strtabinit (true); + if (names == NULL) + { + error (0, 0, "Not enough memory for new strtab"); + return cleanup (-1); + } + scnstrents = xmalloc (shnum + * sizeof (struct Ebl_Strent *)); + scnnames = xcalloc (shnum, sizeof (char *)); + } + + /* Create a new (temporary) ELF file for the result. */ + if (foutput == NULL) + { + size_t fname_len = strlen (fname); + fnew = xmalloc (fname_len + sizeof (".XXXXXX")); + strcpy (mempcpy (fnew, fname, fname_len), ".XXXXXX"); + fdnew = mkstemp (fnew); + } + else + { + fnew = xstrdup (foutput); + fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS); + } + + if (fdnew < 0) + { + error (0, errno, "Couldn't create output file %s", fnew); + /* Since we didn't create it we don't want to try to unlink it. */ + free (fnew); + fnew = NULL; + return cleanup (-1); + } + + elfnew = elf_begin (fdnew, ELF_C_WRITE, NULL); + if (elfnew == NULL) + { + error (0, 0, "Couldn't open new ELF %s for writing: %s", + fnew, elf_errmsg (-1)); + return cleanup (-1); + } + + /* Create the new ELF header and copy over all the data. */ + if (gelf_newehdr (elfnew, gelf_getclass (elf)) == 0) + { + error (0, 0, "Couldn't create new ehdr: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + GElf_Ehdr newehdr; + if (gelf_getehdr (elfnew, &newehdr) == NULL) + { + error (0, 0, "Couldn't get new ehdr: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + newehdr.e_ident[EI_DATA] = ehdr.e_ident[EI_DATA]; + newehdr.e_type = ehdr.e_type; + newehdr.e_machine = ehdr.e_machine; + newehdr.e_version = ehdr.e_version; + newehdr.e_entry = ehdr.e_entry; + newehdr.e_flags = ehdr.e_flags; + + if (gelf_update_ehdr (elfnew, &newehdr) == 0) + { + error (0, 0, "Couldn't update ehdr: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + /* Copy over the phdrs as is. */ + if (phnum != 0) + { + if (gelf_newphdr (elfnew, phnum) == 0) + { + error (0, 0, "Couldn't create phdrs: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + for (size_t cnt = 0; cnt < phnum; ++cnt) + { + GElf_Phdr phdr_mem; + GElf_Phdr *phdr = gelf_getphdr (elf, cnt, &phdr_mem); + if (phdr == NULL) + { + error (0, 0, "Couldn't get phdr %zd: %s", cnt, elf_errmsg (-1)); + return cleanup (-1); + } + if (gelf_update_phdr (elfnew, cnt, phdr) == 0) + { + error (0, 0, "Couldn't create phdr %zd: %s", cnt, + elf_errmsg (-1)); + return cleanup (-1); + } + } + } + + /* Possibly add a 'z' and zero terminator. */ + if (maxnamelen > 0) + snamebuf = xmalloc (maxnamelen + 2); + + /* We might want to read/adjust the section header strings and + symbol tables. If so, and those sections are to be compressed + then we will have to decompress it during the collection pass and + compress it again in the fixup pass. Don't compress unnecessary + and keep track of whether or not to compress them (later in the + fixup pass). Also record the original size, so we can report the + difference later when we do compress. */ + int shstrtab_compressed = T_UNSET; + size_t shstrtab_size = 0; + char *shstrtab_name = NULL; + char *shstrtab_newname = NULL; + int symtab_compressed = T_UNSET; + size_t symtab_size = 0; + char *symtab_name = NULL; + char *symtab_newname = NULL; + + /* Collection pass. Copy over the sections, (de)compresses matching + sections, collect names of sections and symbol table if + necessary. */ + scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + size_t ndx = elf_ndxscn (scn); + assert (ndx < shnum); + + /* (de)compress if section matched. */ + char *sname = NULL; + char *newname = NULL; + if (get_section (ndx)) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for section %zd", ndx); + return cleanup (-1); + } + + uint64_t size = shdr->sh_size; + sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (sname == NULL) + { + error (0, 0, "Couldn't get name for section %zd", ndx); + return cleanup (-1); + } + + /* strdup sname, the shdrstrndx section itself might be + (de)compressed, invalidating the string pointers. */ + sname = xstrdup (sname); + + /* We might want to decompress (and rename), but not + compress during this pass since we might need the section + data in later passes. Skip those sections for now and + compress them in the fixup pass. */ + bool skip_compress_section = (adjust_names + && (ndx == shdrstrndx + || ndx == symtabndx)); + + switch (type) + { + case T_DECOMPRESS: + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (compress_section (scn, size, sname, NULL, ndx, + false, false, verbose > 0) < 0) + return cleanup (-1); + } + else if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + { + snamebuf[0] = '.'; + strcpy (&snamebuf[1], &sname[2]); + newname = snamebuf; + if (compress_section (scn, size, sname, newname, ndx, + true, false, verbose > 0) < 0) + return cleanup (-1); + } + else if (verbose > 0) + printf ("[%zd] %s already decompressed\n", ndx, sname); + break; + + case T_COMPRESS_GNU: + if (strncmp (sname, ".debug", strlen (".debug")) == 0) + { + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + /* First decompress to recompress GNU style. + Don't report even when verbose. */ + if (compress_section (scn, size, sname, NULL, ndx, + false, false, false) < 0) + return cleanup (-1); + } + + snamebuf[0] = '.'; + snamebuf[1] = 'z'; + strcpy (&snamebuf[2], &sname[1]); + newname = snamebuf; + + if (skip_compress_section) + { + if (ndx == shdrstrndx) + { + shstrtab_size = size; + shstrtab_compressed = T_COMPRESS_GNU; + shstrtab_name = xstrdup (sname); + shstrtab_newname = xstrdup (newname); + } + else + { + symtab_size = size; + symtab_compressed = T_COMPRESS_GNU; + symtab_name = xstrdup (sname); + symtab_newname = xstrdup (newname); + } + } + else + { + int res = compress_section (scn, size, sname, newname, + ndx, true, true, + verbose > 0); + if (res < 0) + return cleanup (-1); + + if (res == 0) + newname = NULL; + } + } + else if (verbose >= 0) + { + if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + printf ("[%zd] %s unchanged, already GNU compressed", + ndx, sname); + else + printf ("[%zd] %s cannot GNU compress section not starting with .debug\n", + ndx, sname); + } + break; + + case T_COMPRESS_ZLIB: + if ((shdr->sh_flags & SHF_COMPRESSED) == 0) + { + if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + { + /* First decompress to recompress zlib style. + Don't report even when verbose. */ + if (compress_section (scn, size, sname, NULL, ndx, + true, false, false) < 0) + return cleanup (-1); + + snamebuf[0] = '.'; + strcpy (&snamebuf[1], &sname[2]); + newname = snamebuf; + } + + if (skip_compress_section) + { + if (ndx == shdrstrndx) + { + shstrtab_size = size; + shstrtab_compressed = T_COMPRESS_ZLIB; + shstrtab_name = xstrdup (sname); + shstrtab_newname = (newname == NULL + ? NULL : xstrdup (newname)); + } + else + { + symtab_size = size; + symtab_compressed = T_COMPRESS_ZLIB; + symtab_name = xstrdup (sname); + symtab_newname = (newname == NULL + ? NULL : xstrdup (newname)); + } + } + else if (compress_section (scn, size, sname, newname, ndx, + false, true, verbose > 0) < 0) + return cleanup (-1); + } + else if (verbose > 0) + printf ("[%zd] %s already compressed\n", ndx, sname); + break; + } + + free (sname); + } + + Elf_Scn *newscn = elf_newscn (elfnew); + if (newscn == NULL) + { + error (0, 0, "Couldn't create new section %zd", ndx); + return cleanup (-1); + } + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for section %zd", ndx); + return cleanup (-1); + } + + if (gelf_update_shdr (newscn, shdr) == 0) + { + error (0, 0, "Couldn't update section header %zd", ndx); + return cleanup (-1); + } + + /* Except for the section header string table all data can be + copied as is. The section header string table will be + created later and the symbol table might be fixed up if + necessary. */ + if (! adjust_names || ndx != shdrstrndx) + { + Elf_Data *data = elf_getdata (scn, NULL); + if (data == NULL) + { + error (0, 0, "Couldn't get data from section %zd", ndx); + return cleanup (-1); + } + + Elf_Data *newdata = elf_newdata (newscn); + if (newdata == NULL) + { + error (0, 0, "Couldn't create new data for section %zd", ndx); + return cleanup (-1); + } + + *newdata = *data; + } + + /* Keep track of the (new) section names. */ + if (adjust_names) + { + char *name; + if (newname != NULL) + name = newname; + else + { + name = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (name == NULL) + { + error (0, 0, "Couldn't get name for section [%zd]", ndx); + return cleanup (-1); + } + } + + /* We need to keep a copy of the name till the strtab is done. */ + name = scnnames[ndx] = xstrdup (name); + if ((scnstrents[ndx] = ebl_strtabadd (names, name, 0)) == NULL) + { + error (0, 0, "No memory to add section name string table"); + return cleanup (-1); + } + + /* If the symtab shares strings then add those too. */ + if (ndx == symtabndx) + { + /* If the section is (still) compressed we'll need to + uncompress it first to adjust the data, then + recompress it in the fixup pass. */ + if (symtab_compressed == T_UNSET) + { + size_t size = shdr->sh_size; + if ((shdr->sh_flags == SHF_COMPRESSED) != 0) + { + /* Don't report the (internal) uncompression. */ + if (compress_section (newscn, size, sname, NULL, ndx, + false, false, false) < 0) + return cleanup (-1); + + symtab_size = size; + symtab_compressed = T_COMPRESS_ZLIB; + } + else if (strncmp (name, ".zdebug", strlen (".zdebug")) == 0) + { + /* Don't report the (internal) uncompression. */ + if (compress_section (newscn, size, sname, NULL, ndx, + true, false, false) < 0) + return cleanup (-1); + + symtab_size = size; + symtab_compressed = T_COMPRESS_GNU; + } + } + + Elf_Data *symd = elf_getdata (newscn, NULL); + if (symd == NULL) + { + error (0, 0, "Couldn't get symtab data for section [%zd] %s", + ndx, name); + return cleanup (-1); + } + size_t elsize = gelf_fsize (elfnew, ELF_T_SYM, 1, EV_CURRENT); + size_t syms = symd->d_size / elsize; + symstrents = xmalloc (syms * sizeof (struct Ebl_Strent *)); + for (size_t i = 0; i < syms; i++) + { + GElf_Sym sym_mem; + GElf_Sym *sym = gelf_getsym (symd, i, &sym_mem); + if (sym == NULL) + { + error (0, 0, "Couldn't get symbol %zd", i); + return cleanup (-1); + } + if (sym->st_name != 0) + { + /* Note we take the name from the original ELF, + since the new one will not have setup the + strtab yet. */ + const char *symname = elf_strptr (elf, shdrstrndx, + sym->st_name); + if (symname == NULL) + { + error (0, 0, "Couldn't get symbol %zd name", i); + return cleanup (-1); + } + symstrents[i] = ebl_strtabadd (names, symname, 0); + if (symstrents[i] == NULL) + { + error (0, 0, "No memory to add to symbol name"); + return cleanup (-1); + } + } + } + } + } + } + + if (adjust_names) + { + /* We got all needed strings, put the new data in the shstrtab. */ + if (verbose > 0) + printf ("[%zd] Updating section string table\n", shdrstrndx); + + scn = elf_getscn (elfnew, shdrstrndx); + if (scn == NULL) + { + error (0, 0, "Couldn't get new section header string table [%zd]", + shdrstrndx); + return cleanup (-1); + } + + Elf_Data *data = elf_newdata (scn); + if (data == NULL) + { + error (0, 0, "Couldn't create new section header string table data"); + return cleanup (-1); + } + ebl_strtabfinalize (names, data); + namesbuf = data->d_buf; + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for new section strings %zd", + shdrstrndx); + return cleanup (-1); + } + + /* Note that we also might have to compress and possibly set + sh_off below */ + shdr->sh_name = ebl_strtaboffset (scnstrents[shdrstrndx]); + shdr->sh_type = SHT_STRTAB; + shdr->sh_flags = 0; + shdr->sh_addr = 0; + shdr->sh_offset = 0; + shdr->sh_size = data->d_size; + shdr->sh_link = SHN_UNDEF; + shdr->sh_info = SHN_UNDEF; + shdr->sh_addralign = 1; + shdr->sh_entsize = 0; + + if (gelf_update_shdr (scn, shdr) == 0) + { + error (0, 0, "Couldn't update new section strings [%zd]", + shdrstrndx); + return cleanup (-1); + } + + /* We might have to compress the data if the user asked us to, + or if the section was already compressed (and the user didn't + ask for decompression). Note somewhat identical code for + symtab below. */ + if (shstrtab_compressed == T_UNSET) + { + /* The user didn't ask for compression, but maybe it was + compressed in the original ELF file. */ + Elf_Scn *oldscn = elf_getscn (elf, shdrstrndx); + if (oldscn == NULL) + { + error (0, 0, "Couldn't get section header string table [%zd]", + shdrstrndx); + return cleanup (-1); + } + + shdr = gelf_getshdr (oldscn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for old section strings [%zd]", + shdrstrndx); + return cleanup (-1); + } + + shstrtab_name = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (shstrtab_name == NULL) + { + error (0, 0, "Couldn't get name for old section strings [%zd]", + shdrstrndx); + return cleanup (-1); + } + + shstrtab_size = shdr->sh_size; + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + shstrtab_compressed = T_COMPRESS_ZLIB; + else if (strncmp (shstrtab_name, ".zdebug", strlen (".zdebug")) == 0) + shstrtab_compressed = T_COMPRESS_GNU; + } + + /* Should we (re)compress? */ + if (shstrtab_compressed != T_UNSET) + { + if (compress_section (scn, shstrtab_size, shstrtab_name, + shstrtab_newname, shdrstrndx, + shstrtab_compressed == T_COMPRESS_GNU, + true, verbose > 0) < 0) + return cleanup (-1); + } + } + + /* Make sure to re-get the new ehdr. Adding phdrs and shdrs will + have changed it. */ + if (gelf_getehdr (elfnew, &newehdr) == NULL) + { + error (0, 0, "Couldn't re-get new ehdr: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + /* Set this after the sections have been created, otherwise section + zero might not exist yet. */ + if (setshdrstrndx (elfnew, &newehdr, shdrstrndx) != 0) + { + error (0, 0, "Couldn't set new shdrstrndx: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + /* Fixup pass. Adjust string table references, symbol table and + layout if necessary. */ + if (layout || adjust_names) + { + scn = NULL; + while ((scn = elf_nextscn (elfnew, scn)) != NULL) + { + size_t ndx = elf_ndxscn (scn); + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get shdr for section %zd", ndx); + return cleanup (-1); + } + + /* Keep the offset of allocated sections so they are at the + same place in the file. Add (possibly changed) + unallocated ones after the allocated ones. */ + if ((shdr->sh_flags & SHF_ALLOC) == 0) + { + /* Zero means one. No alignment constraints. */ + size_t addralign = shdr->sh_addralign ?: 1; + last_offset = (last_offset + addralign - 1) & ~(addralign - 1); + shdr->sh_offset = last_offset; + if (shdr->sh_type != SHT_NOBITS) + last_offset += shdr->sh_size; + } + + if (adjust_names) + shdr->sh_name = ebl_strtaboffset (scnstrents[ndx]); + + if (gelf_update_shdr (scn, shdr) == 0) + { + error (0, 0, "Couldn't update section header %zd", ndx); + return cleanup (-1); + } + + if (adjust_names && ndx == symtabndx) + { + if (verbose > 0) + printf ("[%zd] Updating symbol table\n", symtabndx); + + Elf_Data *symd = elf_getdata (scn, NULL); + if (symd == NULL) + { + error (0, 0, "Couldn't get new symtab data section [%zd]", + ndx); + return cleanup (-1); + } + size_t elsize = gelf_fsize (elfnew, ELF_T_SYM, 1, EV_CURRENT); + size_t syms = symd->d_size / elsize; + for (size_t i = 0; i < syms; i++) + { + GElf_Sym sym_mem; + GElf_Sym *sym = gelf_getsym (symd, i, &sym_mem); + if (sym == NULL) + { + error (0, 0, "2 Couldn't get symbol %zd", i); + return cleanup (-1); + } + + if (sym->st_name != 0) + { + sym->st_name = ebl_strtaboffset (symstrents[i]); + + if (gelf_update_sym (symd, i, sym) == 0) + { + error (0, 0, "Couldn't update symbol %zd", i); + return cleanup (-1); + } + } + } + + /* We might have to compress the data if the user asked + us to, or if the section was already compressed (and + the user didn't ask for decompression). Note + somewhat identical code for shstrtab above. */ + if (symtab_compressed == T_UNSET) + { + /* The user didn't ask for compression, but maybe it was + compressed in the original ELF file. */ + Elf_Scn *oldscn = elf_getscn (elf, symtabndx); + if (oldscn == NULL) + { + error (0, 0, "Couldn't get symbol table [%zd]", + symtabndx); + return cleanup (-1); + } + + shdr = gelf_getshdr (oldscn, &shdr_mem); + if (shdr == NULL) + { + error (0, 0, "Couldn't get old symbol table shdr [%zd]", + symtabndx); + return cleanup (-1); + } + + symtab_name = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (symtab_name == NULL) + { + error (0, 0, "Couldn't get old symbol table name [%zd]", + symtabndx); + return cleanup (-1); + } + + symtab_size = shdr->sh_size; + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + symtab_compressed = T_COMPRESS_ZLIB; + else if (strncmp (symtab_name, ".zdebug", + strlen (".zdebug")) == 0) + symtab_compressed = T_COMPRESS_GNU; + } + + /* Should we (re)compress? */ + if (symtab_compressed != T_UNSET) + { + if (compress_section (scn, symtab_size, symtab_name, + symtab_newname, symtabndx, + symtab_compressed == T_COMPRESS_GNU, + true, verbose > 0) < 0) + return cleanup (-1); + } + } + } + } + + /* If we have phdrs we want elf_update to layout the SHF_ALLOC + sections precisely as in the original file. In that case we are + also responsible for setting phoff and shoff */ + if (layout) + { + if (gelf_getehdr (elfnew, &newehdr) == NULL) + { + error (0, 0, "Couldn't get ehdr: %s", elf_errmsg (-1)); + return cleanup (-1); + } + + /* Position the shdrs after the last (unallocated) section. */ + const size_t offsize = gelf_fsize (elfnew, ELF_T_OFF, 1, EV_CURRENT); + newehdr.e_shoff = ((last_offset + offsize - 1) + & ~((GElf_Off) (offsize - 1))); + + /* The phdrs go in the same place as in the original file. + Normally right after the ELF header. */ + newehdr.e_phoff = ehdr.e_phoff; + + if (gelf_update_ehdr (elfnew, &newehdr) == 0) + { + error (0, 0, "Couldn't update ehdr: %s", elf_errmsg (-1)); + return cleanup (-1); + } + } + + elf_flagelf (elfnew, ELF_C_SET, ((layout ? ELF_F_LAYOUT : 0) + | (permissive ? ELF_F_PERMISSIVE : 0))); + + if (elf_update (elfnew, ELF_C_WRITE) < 0) + { + error (0, 0, "Couldn't write %s: %s", fnew, elf_errmsg (-1)); + return cleanup (-1); + } + + elf_end (elfnew); + elfnew = NULL; + + /* Try to match mode and owner.group of the original file. */ + if (fchmod (fdnew, st.st_mode & ALLPERMS) != 0) + if (verbose >= 0) + error (0, errno, "Couldn't fchmod %s", fnew); + if (fchown (fdnew, st.st_uid, st.st_gid) != 0) + if (verbose >= 0) + error (0, errno, "Couldn't fchown %s", fnew); + + /* Finally replace the old file with the new file. */ + if (foutput == NULL) + if (rename (fnew, fname) != 0) + { + error (0, errno, "Couldn't rename %s to %s", fnew, fname); + return cleanup (-1); + } + + /* We are finally done with the new file, don't unlink it now. */ + free (fnew); + fnew = NULL; + + return cleanup (0); +} + +int +main (int argc, char **argv) +{ + const struct argp_option options[] = + { + { "output", 'o', "FILE", 0, + N_("Place (de)compressed output into FILE"), + 0 }, + { "type", 't', "TYPE", 0, + N_("What type of compression to apply. TYPE can be 'none' (decompress), 'zlib' (ELF ZLIB compression, the default, 'zlib-gabi' is an alias) or 'zlib-gnu' (.zdebug GNU style compression, 'gnu' is an alias)"), + 0 }, + { "name", 'n', "SECTION", 0, + N_("SECTION name to (de)compress, SECTION is an extended wildcard pattern (defaults to '.?(z)debug*')"), + 0 }, + { "verbose", 'v', NULL, 0, + N_("Print a message for each section being (de)compressed"), + 0 }, + { "force", 'f', NULL, 0, + N_("Force compression of section even if it would become larger"), + 0 }, + { "permissive", 'p', NULL, 0, + N_("Relax a few rules to handle slightly broken ELF files"), + 0 }, + { "quiet", 'q', NULL, 0, + N_("Be silent when a section cannot be compressed"), + 0 }, + { NULL, 0, NULL, 0, NULL, 0 } + }; + + const struct argp argp = + { + .options = options, + .parser = parse_opt, + .args_doc = N_("FILE..."), + .doc = N_("Compress or decompress sections in an ELF file.") + }; + + int remaining; + if (argp_parse (&argp, argc, argv, 0, &remaining, NULL) != 0) + return EXIT_FAILURE; + + /* Should already be handled by ARGP_KEY_NO_ARGS case above, + just sanity check. */ + if (remaining >= argc) + error (EXIT_FAILURE, 0, N_("No input file given")); + + /* Likewise for the ARGP_KEY_ARGS case above, an extra sanity check. */ + if (foutput != NULL && remaining + 1 < argc) + error (EXIT_FAILURE, 0, + N_("Only one input file allowed together with '-o'")); + + elf_version (EV_CURRENT); + + /* Process all the remaining files. */ + int result = 0; + do + result |= process_file (argv[remaining]); + while (++remaining < argc); + + free_patterns (); + return result; +} diff --git a/src/elflint.c b/src/elflint.c index d6a4774..7a7b9ce 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -1,5 +1,5 @@ /* Pedantic checking of ELF files compliance with gABI/psABI spec. - Copyright (C) 2001-2014 Red Hat, Inc. + Copyright (C) 2001-2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -164,9 +164,9 @@ main (int argc, char *argv[]) else { unsigned int prev_error_count = error_count; - struct stat64 st; + struct stat st; - if (fstat64 (fd, &st) != 0) + if (fstat (fd, &st) != 0) { printf ("cannot stat '%s': %m\n", argv[remaining]); close (fd); @@ -554,7 +554,8 @@ check_scn_group (Ebl *ebl, int idx) continue; Elf_Data *data = elf_getdata (scn, NULL); - if (data == NULL || data->d_size < sizeof (Elf32_Word)) + if (data == NULL || data->d_buf == NULL + || data->d_size < sizeof (Elf32_Word)) /* Cannot check the section. */ continue; @@ -692,8 +693,8 @@ section [%2d] '%s': symbol %zu: invalid name value\n"), else { name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name); - assert (name != NULL - || strshdr->sh_type != SHT_STRTAB); + if (name == NULL) + name = ""; } if (sym->st_shndx == SHN_XINDEX) @@ -800,7 +801,11 @@ section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n"), && strcmp (name, "__bss_start") != 0 && strcmp (name, "__bss_start__") != 0 && strcmp (name, "__TMC_END__") != 0 - && strcmp (name, ".TOC.") != 0)) + && strcmp (name, ".TOC.") != 0 + && strcmp (name, "_edata") != 0 + && strcmp (name, "__edata") != 0 + && strcmp (name, "_end") != 0 + && strcmp (name, "__end") != 0)) ERROR (gettext ("\ section [%2d] '%s': symbol %zu: st_value out of bounds\n"), idx, section_name (ebl, idx), cnt); @@ -857,7 +862,13 @@ section [%2d] '%s': symbol %zu does not fit completely in referenced section [%2 section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n"), idx, section_name (ebl, idx), cnt); } - else + else if (phdr == NULL) + { + ERROR (gettext ("\ +section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program header entry\n"), + idx, section_name (ebl, idx), cnt); + } + else if (!is_debuginfo) { if (st_value < destshdr->sh_offset - phdr->p_offset) @@ -1061,12 +1072,17 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *ehdr, int idx, const GElf_Shdr *shdr, if (rcshdr == NULL) break; - if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize) + if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize != 0) { /* Found the dynamic section. Look through it. */ Elf_Data *d = elf_getdata (scn, NULL); size_t cnt; + if (d == NULL) + ERROR (gettext ("\ +section [%2d] '%s': cannot get section data.\n"), + idx, section_name (ebl, idx)); + for (cnt = 1; cnt < rcshdr->sh_size / rcshdr->sh_entsize; ++cnt) { GElf_Dyn dyn_mem; @@ -1099,7 +1115,7 @@ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"), relative. */ Elf_Data *reldata = elf_getdata (elf_getscn (ebl->elf, idx), NULL); - if (reldata != NULL) + if (reldata != NULL && shdr->sh_entsize != 0) for (size_t inner = 0; inner < shdr->sh_size / shdr->sh_entsize; ++inner) @@ -1141,7 +1157,8 @@ section [%2d] '%s': DT_RELACOUNT used for this REL section\n"), /* Does the number specified number of relative relocations exceed the total number of relocations? */ - if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize) + if (shdr->sh_entsize != 0 + && dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize) ERROR (gettext ("\ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"), idx, section_name (ebl, idx), @@ -1151,7 +1168,7 @@ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"), relative. */ Elf_Data *reldata = elf_getdata (elf_getscn (ebl->elf, idx), NULL); - if (reldata != NULL) + if (reldata != NULL && shdr->sh_entsize != 0) for (size_t inner = 0; inner < shdr->sh_size / shdr->sh_entsize; ++inner) @@ -1241,9 +1258,10 @@ section [%2d] '%s': sh_info should be zero\n"), } } - if (((*destshdrp)->sh_flags & (SHF_MERGE | SHF_STRINGS)) != 0) + if ((((*destshdrp)->sh_flags & SHF_MERGE) != 0) + && ((*destshdrp)->sh_flags & SHF_STRINGS) != 0) ERROR (gettext ("\ -section [%2d] '%s': no relocations for merge-able sections possible\n"), +section [%2d] '%s': no relocations for merge-able string sections possible\n"), idx, section_name (ebl, idx)); } } @@ -1284,7 +1302,7 @@ section [%2d] '%s': section entry size does not match ElfXX_Rel\n"), GElf_Shdr *dynshdr = gelf_getshdr (dynscn, &dynshdr_mem); Elf_Data *dyndata = elf_getdata (dynscn, NULL); if (dynshdr != NULL && dynshdr->sh_type == SHT_DYNAMIC - && dyndata != NULL) + && dyndata != NULL && dynshdr->sh_entsize != 0) for (size_t j = 0; j < dynshdr->sh_size / dynshdr->sh_entsize; ++j) { GElf_Dyn dyn_mem; @@ -1622,6 +1640,13 @@ check_dynamic (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) section [%2d] '%s': referenced as string table for section [%2d] '%s' but type is not SHT_STRTAB\n"), shdr->sh_link, section_name (ebl, shdr->sh_link), idx, section_name (ebl, idx)); + else if (strshdr == NULL) + { + ERROR (gettext ("\ +section [%2d]: referenced as string table for section [%2d] '%s' but section link value is invalid\n"), + shdr->sh_link, idx, section_name (ebl, idx)); + return; + } size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT); if (shdr->sh_entsize != sh_entsize) @@ -1685,10 +1710,10 @@ section [%2d] '%s': entry %zu: level 2 tag %s used\n"), has_dt[dyn->d_tag] = true; } - else if (dyn->d_tag <= DT_VALRNGHI + else if (dyn->d_tag >= 0 && dyn->d_tag <= DT_VALRNGHI && DT_VALTAGIDX (dyn->d_tag) < DT_VALNUM) has_val_dt[DT_VALTAGIDX (dyn->d_tag)] = true; - else if (dyn->d_tag <= DT_ADDRRNGHI + else if (dyn->d_tag >= 0 && dyn->d_tag <= DT_ADDRRNGHI && DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM) has_addr_dt[DT_ADDRTAGIDX (dyn->d_tag)] = true; @@ -1896,6 +1921,10 @@ section [%2d] '%s': only relocatable files can have extended section index\n"), ERROR (gettext ("\ section [%2d] '%s': extended section index section not for symbol table\n"), idx, section_name (ebl, idx)); + else if (symshdr == NULL) + ERROR (gettext ("\ +section [%2d] '%s': sh_link extended section index [%2d] is invalid\n"), + idx, section_name (ebl, idx), shdr->sh_link); Elf_Data *symdata = elf_getdata (symscn, NULL); if (symdata == NULL) ERROR (gettext ("cannot get data for symbol section\n")); @@ -1906,8 +1935,8 @@ section [%2d] '%s': entry size does not match Elf32_Word\n"), idx, section_name (ebl, idx)); if (symshdr != NULL - && shdr->sh_entsize - && symshdr->sh_entsize + && shdr->sh_entsize != 0 + && symshdr->sh_entsize != 0 && (shdr->sh_size / shdr->sh_entsize < symshdr->sh_size / symshdr->sh_entsize)) ERROR (gettext ("\ @@ -1934,7 +1963,7 @@ section [%2d] '%s': extended section index in section [%2zu] '%s' refers to same } Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); - if (data == NULL) + if (data == NULL || data->d_buf == NULL) { ERROR (gettext ("section [%2d] '%s': cannot get section data\n"), idx, section_name (ebl, idx)); @@ -2033,7 +2062,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"), size_t maxidx = nchain; - if (symshdr != NULL) + if (symshdr != NULL && symshdr->sh_entsize != 0) { size_t symsize = symshdr->sh_size / symshdr->sh_entsize; @@ -2073,38 +2102,55 @@ static void check_gnu_hash (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx, GElf_Shdr *symshdr) { + if (data->d_size < 4 * sizeof (Elf32_Word)) + { + ERROR (gettext ("\ +section [%2d] '%s': not enough data\n"), + idx, section_name (ebl, idx)); + return; + } + Elf32_Word nbuckets = ((Elf32_Word *) data->d_buf)[0]; Elf32_Word symbias = ((Elf32_Word *) data->d_buf)[1]; Elf32_Word bitmask_words = ((Elf32_Word *) data->d_buf)[2]; - if (!powerof2 (bitmask_words)) - ERROR (gettext ("\ -section [%2d] '%s': bitmask size not power of 2: %u\n"), - idx, section_name (ebl, idx), bitmask_words); + if (bitmask_words == 0 || !powerof2 (bitmask_words)) + { + ERROR (gettext ("\ +section [%2d] '%s': bitmask size zero or not power of 2: %u\n"), + idx, section_name (ebl, idx), bitmask_words); + return; + } size_t bitmask_idxmask = bitmask_words - 1; if (gelf_getclass (ebl->elf) == ELFCLASS64) bitmask_words *= 2; Elf32_Word shift = ((Elf32_Word *) data->d_buf)[3]; - if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)) + /* Is there still room for the sym chain? + Use uint64_t calculation to prevent 32bit overlow. */ + uint64_t used_buf = (4ULL + bitmask_words + nbuckets) * sizeof (Elf32_Word); + if (used_buf > data->d_size) { ERROR (gettext ("\ section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"), idx, section_name (ebl, idx), (long int) shdr->sh_size, - (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))); + (long int) used_buf); return; } if (shift > 31) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': 2nd hash function shift too big: %u\n"), - idx, section_name (ebl, idx), shift); + idx, section_name (ebl, idx), shift); + return; + } size_t maxidx = shdr->sh_size / sizeof (Elf32_Word) - (4 + bitmask_words + nbuckets); - if (symshdr != NULL) + if (symshdr != NULL && symshdr->sh_entsize != 0) maxidx = MIN (maxidx, symshdr->sh_size / symshdr->sh_entsize); /* We need the symbol section data. */ @@ -2155,8 +2201,10 @@ section [%2d] '%s': symbol %u referenced in chain for bucket %zu is undefined\n" idx, section_name (ebl, idx), symidx, cnt - (4 + bitmask_words)); - const char *symname = elf_strptr (ebl->elf, symshdr->sh_link, - sym->st_name); + const char *symname = (sym != NULL + ? elf_strptr (ebl->elf, symshdr->sh_link, + sym->st_name) + : NULL); if (symname != NULL) { Elf32_Word hval = elf_gnu_hash (symname); @@ -2168,6 +2216,14 @@ section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n"), /* Set the bits in the bitmask. */ size_t maskidx = (hval / classbits) & bitmask_idxmask; + if (maskidx >= bitmask_words) + { + ERROR (gettext ("\ +section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n"), + idx, section_name (ebl, idx), symidx, + cnt - (4 + bitmask_words)); + return; + } if (classbits == 32) { collected.p32[maskidx] @@ -2195,7 +2251,7 @@ section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n"), ERROR (gettext ("\ section [%2d] '%s': hash chain for bucket %zu out of bounds\n"), idx, section_name (ebl, idx), cnt - (4 + bitmask_words)); - else if (symshdr != NULL + else if (symshdr != NULL && symshdr->sh_entsize != 0 && symidx > symshdr->sh_size / symshdr->sh_entsize) ERROR (gettext ("\ section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n"), @@ -2223,7 +2279,7 @@ section [%2d] '%s': relocatable files cannot have hash tables\n"), } Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); - if (data == NULL) + if (data == NULL || data->d_buf == NULL) { ERROR (gettext ("section [%2d] '%s': cannot get section data\n"), idx, section_name (ebl, idx)); @@ -2237,6 +2293,10 @@ section [%2d] '%s': relocatable files cannot have hash tables\n"), ERROR (gettext ("\ section [%2d] '%s': hash table not for dynamic symbol table\n"), idx, section_name (ebl, idx)); + else if (symshdr == NULL) + ERROR (gettext ("\ +section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n"), + idx, section_name (ebl, idx), shdr->sh_link); if (shdr->sh_entsize != (tag == SHT_GNU_HASH ? (gelf_getclass (ebl->elf) == ELFCLASS32 @@ -2292,7 +2352,8 @@ compare_hash_gnu_hash (Ebl *ebl, GElf_Ehdr *ehdr, size_t hash_idx, GElf_Shdr *gnu_hash_shdr = gelf_getshdr (gnu_hash_scn, &gnu_hash_shdr_mem); if (hash_shdr == NULL || gnu_hash_shdr == NULL - || hash_data == NULL || gnu_hash_data == NULL) + || hash_data == NULL || hash_data->d_buf == NULL + || gnu_hash_data == NULL || gnu_hash_data->d_buf == NULL) /* None of these pointers should be NULL since we used the sections already. We are careful nonetheless. */ return; @@ -2313,28 +2374,73 @@ sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n"), GElf_Shdr sym_shdr_mem; GElf_Shdr *sym_shdr = gelf_getshdr (sym_scn, &sym_shdr_mem); - if (sym_data == NULL || sym_shdr == NULL) + if (sym_data == NULL || sym_data->d_buf == NULL + || sym_shdr == NULL || sym_shdr->sh_entsize == 0) return; - int nentries = sym_shdr->sh_size / sym_shdr->sh_entsize; + const char *hash_name; + const char *gnu_hash_name; + hash_name = elf_strptr (ebl->elf, shstrndx, hash_shdr->sh_name); + gnu_hash_name = elf_strptr (ebl->elf, shstrndx, gnu_hash_shdr->sh_name); + + if (gnu_hash_data->d_size < 4 * sizeof (Elf32_Word)) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' does not contain enough data\n"), + gnu_hash_idx, gnu_hash_name); + return; + } + + uint32_t nentries = sym_shdr->sh_size / sym_shdr->sh_entsize; char *used = alloca (nentries); memset (used, '\0', nentries); /* First go over the GNU_HASH table and mark the entries as used. */ const Elf32_Word *gnu_hasharr = (Elf32_Word *) gnu_hash_data->d_buf; Elf32_Word gnu_nbucket = gnu_hasharr[0]; + Elf32_Word gnu_symbias = gnu_hasharr[1]; const int bitmap_factor = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 1 : 2; const Elf32_Word *gnu_bucket = (gnu_hasharr + (4 + gnu_hasharr[2] * bitmap_factor)); - const Elf32_Word *gnu_chain = gnu_bucket + gnu_hasharr[0] - gnu_hasharr[1]; + const Elf32_Word *gnu_chain = gnu_bucket + gnu_hasharr[0]; + + if (gnu_hasharr[2] == 0) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' has zero bit mask words\n"), + gnu_hash_idx, gnu_hash_name); + return; + } + + uint64_t used_buf = ((4ULL + gnu_hasharr[2] * bitmap_factor + gnu_nbucket) + * sizeof (Elf32_Word)); + uint32_t max_nsyms = (gnu_hash_data->d_size - used_buf) / sizeof (Elf32_Word); + if (used_buf > gnu_hash_data->d_size) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' uses too much data\n"), + gnu_hash_idx, gnu_hash_name); + return; + } for (Elf32_Word cnt = 0; cnt < gnu_nbucket; ++cnt) { - Elf32_Word symidx = gnu_bucket[cnt]; - if (symidx != STN_UNDEF) - do - used[symidx] |= 1; - while ((gnu_chain[symidx++] & 1u) == 0); + if (gnu_bucket[cnt] != STN_UNDEF) + { + Elf32_Word symidx = gnu_bucket[cnt] - gnu_symbias; + do + { + if (symidx >= max_nsyms || symidx + gnu_symbias >= nentries) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' invalid symbol index %" PRIu32 " (max_nsyms: %" PRIu32 ", nentries: %" PRIu32 "\n"), + gnu_hash_idx, gnu_hash_name, symidx, max_nsyms, nentries); + return; + } + used[symidx + gnu_symbias] |= 1; + } + while ((gnu_chain[symidx++] & 1u) == 0); + } } /* Now go over the old hash table and check that we cover the same @@ -2342,37 +2448,82 @@ sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n"), if (hash_shdr->sh_entsize == sizeof (Elf32_Word)) { const Elf32_Word *hasharr = (Elf32_Word *) hash_data->d_buf; + if (hash_data->d_size < 2 * sizeof (Elf32_Word)) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' does not contain enough data\n"), + hash_idx, hash_name); + return; + } + Elf32_Word nbucket = hasharr[0]; + Elf32_Word nchain = hasharr[1]; + uint64_t hash_used = (2ULL + nchain + nbucket) * sizeof (Elf32_Word); + if (hash_used > hash_data->d_size) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' uses too much data\n"), + hash_idx, hash_name); + return; + } + const Elf32_Word *bucket = &hasharr[2]; const Elf32_Word *chain = &hasharr[2 + nbucket]; for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) { Elf32_Word symidx = bucket[cnt]; - while (symidx != STN_UNDEF) + while (symidx != STN_UNDEF && symidx < nentries && symidx < nchain) { used[symidx] |= 2; symidx = chain[symidx]; } } } - else + else if (hash_shdr->sh_entsize == sizeof (Elf64_Word)) { const Elf64_Xword *hasharr = (Elf64_Xword *) hash_data->d_buf; + if (hash_data->d_size < 2 * sizeof (Elf32_Word)) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' does not contain enough data\n"), + hash_idx, hash_name); + return; + } + Elf64_Xword nbucket = hasharr[0]; + Elf64_Xword nchain = hasharr[1]; + uint64_t maxwords = hash_data->d_size / sizeof (Elf64_Xword); + if (maxwords < 2 + || maxwords - 2 < nbucket + || maxwords - 2 - nbucket < nchain) + { + ERROR (gettext ("\ +hash section [%2zu] '%s' uses too much data\n"), + hash_idx, hash_name); + return; + } + const Elf64_Xword *bucket = &hasharr[2]; const Elf64_Xword *chain = &hasharr[2 + nbucket]; for (Elf64_Xword cnt = 0; cnt < nbucket; ++cnt) { Elf64_Xword symidx = bucket[cnt]; - while (symidx != STN_UNDEF) + while (symidx != STN_UNDEF && symidx < nentries && symidx < nchain) { used[symidx] |= 2; symidx = chain[symidx]; } } } + else + { + ERROR (gettext ("\ +hash section [%2zu] '%s' invalid sh_entsize\n"), + gnu_hash_idx, gnu_hash_name); + return; + } /* Now see which entries are not set in one or both hash tables (unless the symbol is undefined in which case it can be omitted @@ -2385,7 +2536,7 @@ sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n"), ERROR (gettext ("section [%2zu] '%s': reference to symbol index 0\n"), hash_idx, elf_strptr (ebl->elf, shstrndx, hash_shdr->sh_name)); - for (int cnt = 1; cnt < nentries; ++cnt) + for (uint32_t cnt = 1; cnt < nentries; ++cnt) if (used[cnt] != 0 && used[cnt] != 3) { if (used[cnt] == 1) @@ -2474,6 +2625,10 @@ section [%2d] '%s': invalid symbol index in sh_info\n"), ERROR (gettext ("\ section [%2d] '%s': cannot get symbol for signature\n"), idx, section_name (ebl, idx)); + else if (elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name) == NULL) + ERROR (gettext ("\ +section [%2d] '%s': cannot get symbol name for signature\n"), + idx, section_name (ebl, idx)); else if (strcmp (elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name), "") == 0) ERROR (gettext ("\ @@ -2487,7 +2642,7 @@ section [%2d] '%s': signature symbol cannot be empty string\n"), } Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); - if (data == NULL) + if (data == NULL || data->d_buf == NULL) ERROR (gettext ("section [%2d] '%s': cannot get data: %s\n"), idx, section_name (ebl, idx), elf_errmsg (-1)); else @@ -2536,7 +2691,7 @@ section [%2d] '%s': section group with only one member\n"), if (val > shnum) ERROR (gettext ("\ -section [%2d] '%s': section index %Zu out of range\n"), +section [%2d] '%s': section index %zu out of range\n"), idx, section_name (ebl, idx), cnt / elsize); else { @@ -2558,12 +2713,12 @@ section [%2d] '%s': section group contains another group [%2d] '%s'\n"), if ((refshdr->sh_flags & SHF_GROUP) == 0) ERROR (gettext ("\ -section [%2d] '%s': element %Zu references section [%2d] '%s' without SHF_GROUP flag set\n"), +section [%2d] '%s': element %zu references section [%2d] '%s' without SHF_GROUP flag set\n"), idx, section_name (ebl, idx), cnt / elsize, val, section_name (ebl, val)); } - if (++scnref[val] == 2) + if (val < shnum && ++scnref[val] == 2) ERROR (gettext ("\ section [%2d] '%s' is contained in more than one section group\n"), val, section_name (ebl, val)); @@ -2595,7 +2750,8 @@ section_flags_string (GElf_Word flags, char *buf, size_t len) NEWFLAG (LINK_ORDER), NEWFLAG (OS_NONCONFORMING), NEWFLAG (GROUP), - NEWFLAG (TLS) + NEWFLAG (TLS), + NEWFLAG (COMPRESSED) }; #undef NEWFLAG const size_t nknown_flags = sizeof (known_flags) / sizeof (known_flags[0]); @@ -2648,7 +2804,7 @@ has_copy_reloc (Ebl *ebl, unsigned int symscnndx, unsigned int symndx) return 0; Elf_Data *data = elf_getdata (scn, NULL); - if (data == NULL) + if (data == NULL || shdr->sh_entsize == 0) return 0; if (shdr->sh_type == SHT_REL) @@ -2762,7 +2918,7 @@ section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no dynamic s /* The number of elements in the version symbol table must be the same as the number of symbols. */ - if (shdr->sh_entsize && symshdr->sh_entsize + if (shdr->sh_entsize != 0 && symshdr->sh_entsize != 0 && (shdr->sh_size / shdr->sh_entsize != symshdr->sh_size / symshdr->sh_entsize)) ERROR (gettext ("\ @@ -2771,7 +2927,7 @@ section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\ shdr->sh_link, section_name (ebl, shdr->sh_link)); Elf_Data *symdata = elf_getdata (symscn, NULL); - if (symdata == NULL) + if (symdata == NULL || shdr->sh_entsize == 0) /* The error has already been reported. */ return; @@ -2862,7 +3018,8 @@ unknown_dependency_p (Elf *elf, const char *fname) GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); Elf_Data *data = elf_getdata (scn, NULL); - if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC && data != NULL) + if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC + && data != NULL && shdr->sh_entsize != 0) for (size_t j = 0; j < shdr->sh_size / shdr->sh_entsize; ++j) { GElf_Dyn dyn_mem; @@ -2906,8 +3063,10 @@ section [%2d] '%s': sh_link does not link to string table\n"), return; } unsigned int offset = 0; - for (int cnt = shdr->sh_info; --cnt >= 0; ) + for (Elf64_Word cnt = shdr->sh_info; cnt > 0; ) { + cnt--; + /* Get the data at the next offset. */ GElf_Verneed needmem; GElf_Verneed *need = gelf_getverneed (data, offset, &needmem); @@ -2923,9 +3082,12 @@ section [%2d] '%s': entry %d has wrong version %d\n"), if (need->vn_cnt > 0 && need->vn_aux < gelf_fsize (ebl->elf, ELF_T_VNEED, 1, EV_CURRENT)) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': entry %d has wrong offset of auxiliary data\n"), - idx, section_name (ebl, idx), cnt); + idx, section_name (ebl, idx), cnt); + break; + } const char *libname = elf_strptr (ebl->elf, shdr->sh_link, need->vn_file); @@ -2958,9 +3120,12 @@ section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n"), const char *verstr = elf_strptr (ebl->elf, shdr->sh_link, aux->vna_name); if (verstr == NULL) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': auxiliary entry %d of entry %d has invalid name reference\n"), - idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt); + idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt); + break; + } else { GElf_Word hashval = elf_hash (verstr); @@ -2974,7 +3139,6 @@ section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: %#x, ex ver_need); if (unlikely (res !=0)) { - assert (res > 0); ERROR (gettext ("\ section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version name '%s'\n"), idx, section_name (ebl, idx), need->vn_cnt - cnt2, @@ -3002,9 +3166,20 @@ section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n"), if ((need->vn_next != 0 || cnt > 0) && offset < auxoffset) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': entry %d has invalid offset to next entry\n"), - idx, section_name (ebl, idx), cnt); + idx, section_name (ebl, idx), cnt); + break; + } + + if (need->vn_next == 0 && cnt > 0) + { + ERROR (gettext ("\ +section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says there are more entries\n"), + idx, section_name (ebl, idx), cnt); + break; + } } } @@ -3049,8 +3224,10 @@ section [%2d] '%s': sh_link does not link to string table\n"), bool has_base = false; unsigned int offset = 0; - for (int cnt = shdr->sh_info; --cnt >= 0; ) + for (Elf64_Word cnt = shdr->sh_info; cnt > 0; ) { + cnt--; + /* Get the data at the next offset. */ GElf_Verdef defmem; GElf_Verdef *def = gelf_getverdef (data, offset, &defmem); @@ -3081,9 +3258,12 @@ section [%2d] '%s': entry %d has wrong version %d\n"), if (def->vd_cnt > 0 && def->vd_aux < gelf_fsize (ebl->elf, ELF_T_VDEF, 1, EV_CURRENT)) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': entry %d has wrong offset of auxiliary data\n"), - idx, section_name (ebl, idx), cnt); + idx, section_name (ebl, idx), cnt); + break; + } unsigned int auxoffset = offset + def->vd_aux; GElf_Verdaux auxmem; @@ -3109,7 +3289,6 @@ section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n"), int res = add_version (NULL, name, def->vd_ndx, ver_def); if (unlikely (res !=0)) { - assert (res > 0); ERROR (gettext ("\ section [%2d] '%s': entry %d has duplicate version name '%s'\n"), idx, section_name (ebl, idx), cnt, name); @@ -3129,9 +3308,12 @@ section [%2d] '%s': entry %d has duplicate version name '%s'\n"), name = elf_strptr (ebl->elf, shdr->sh_link, aux->vda_name); if (name == NULL) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n"), - idx, section_name (ebl, idx), cnt); + idx, section_name (ebl, idx), cnt); + break; + } else { newname = alloca (sizeof (*newname)); @@ -3160,9 +3342,20 @@ section [%2d] '%s': entry %d has wrong next field in auxiliary data\n"), if ((def->vd_next != 0 || cnt > 0) && offset < auxoffset) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': entry %d has invalid offset to next entry\n"), - idx, section_name (ebl, idx), cnt); + idx, section_name (ebl, idx), cnt); + break; + } + + if (def->vd_next == 0 && cnt > 0) + { + ERROR (gettext ("\ +section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says there are more entries\n"), + idx, section_name (ebl, idx), cnt); + break; + } } if (!has_base) @@ -3201,7 +3394,7 @@ check_attributes (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) } Elf_Data *data = elf_rawdata (elf_getscn (ebl->elf, idx), NULL); - if (data == NULL || data->d_size == 0) + if (data == NULL || data->d_size == 0 || data->d_buf == NULL) { ERROR (gettext ("section [%2d] '%s': cannot get section data\n"), idx, section_name (ebl, idx)); @@ -3256,7 +3449,7 @@ section [%2d] '%s': offset %zu: invalid length in attribute section\n"), ERROR (gettext ("\ section [%2d] '%s': offset %zu: unterminated vendor name string\n"), idx, section_name (ebl, idx), pos (p)); - continue; + break; } ++q; @@ -3266,7 +3459,7 @@ section [%2d] '%s': offset %zu: unterminated vendor name string\n"), unsigned const char *chunk = q; unsigned int subsection_tag; - get_uleb128 (subsection_tag, q); + get_uleb128 (subsection_tag, q, p); if (q >= p) { @@ -3299,7 +3492,9 @@ section [%2d] '%s': offset %zu: zero length field in attribute subsection\n"), if (MY_ELFDATA != ehdr->e_ident[EI_DATA]) CONVERT (subsection_len); - if (p - chunk < (ptrdiff_t) subsection_len) + /* Don't overflow, ptrdiff_t might be 32bits, but signed. */ + if (p - chunk < (ptrdiff_t) subsection_len + || subsection_len >= (uint32_t) PTRDIFF_MAX) { ERROR (gettext ("\ section [%2d] '%s': offset %zu: invalid length in attribute subsection\n"), @@ -3321,13 +3516,13 @@ section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n"), while (chunk < q) { unsigned int tag; - get_uleb128 (tag, chunk); + get_uleb128 (tag, chunk, q); uint64_t value = 0; const unsigned char *r = chunk; if (tag == 32 || (tag & 1) == 0) { - get_uleb128 (value, r); + get_uleb128 (value, r, q); if (r > q) { ERROR (gettext ("\ @@ -3504,7 +3699,8 @@ zeroth section has nonzero link value while ELF header does not signal overflow size_t versym_scnndx = 0; for (size_t cnt = 1; cnt < shnum; ++cnt) { - shdr = gelf_getshdr (elf_getscn (ebl->elf, cnt), &shdr_mem); + Elf_Scn *scn = elf_getscn (ebl->elf, cnt); + shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { ERROR (gettext ("\ @@ -3532,7 +3728,7 @@ cannot get section header for section [%2zu] '%s': %s\n"), GElf_Word good_type = special_sections[s].type; if (IS_KNOWN_SPECIAL (s, ".plt", false) - && ebl_bss_plt_p (ebl, ehdr)) + && ebl_bss_plt_p (ebl)) good_type = SHT_NOBITS; /* In a debuginfo file, any normal section can be SHT_NOBITS. @@ -3554,9 +3750,11 @@ section [%2d] '%s' has wrong type: expected %s, is %s\n"), if (special_sections[s].attrflag == exact || special_sections[s].attrflag == exact_or_gnuld) { - /* Except for the link order and group bit all the - other bits should match exactly. */ - if ((shdr->sh_flags & ~(SHF_LINK_ORDER | SHF_GROUP)) + /* Except for the link order, group bit and + compression flag all the other bits should + match exactly. */ + if ((shdr->sh_flags + & ~(SHF_LINK_ORDER | SHF_GROUP | SHF_COMPRESSED)) != special_sections[s].attr && (special_sections[s].attrflag == exact || !gnuld)) ERROR (gettext ("\ @@ -3572,9 +3770,10 @@ section [%2zu] '%s' has wrong flags: expected %s, is %s\n"), { if ((shdr->sh_flags & special_sections[s].attr) != special_sections[s].attr - || ((shdr->sh_flags & ~(SHF_LINK_ORDER | SHF_GROUP - | special_sections[s].attr - | special_sections[s].attr2)) + || ((shdr->sh_flags + & ~(SHF_LINK_ORDER | SHF_GROUP | SHF_COMPRESSED + | special_sections[s].attr + | special_sections[s].attr2)) != 0)) ERROR (gettext ("\ section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n"), @@ -3677,7 +3876,8 @@ section [%2zu] '%s': size not multiple of entry size\n"), #define ALL_SH_FLAGS (SHF_WRITE | SHF_ALLOC | SHF_EXECINSTR | SHF_MERGE \ | SHF_STRINGS | SHF_INFO_LINK | SHF_LINK_ORDER \ - | SHF_OS_NONCONFORMING | SHF_GROUP | SHF_TLS) + | SHF_OS_NONCONFORMING | SHF_GROUP | SHF_TLS \ + | SHF_COMPRESSED) if (shdr->sh_flags & ~(GElf_Xword) ALL_SH_FLAGS) { GElf_Xword sh_flags = shdr->sh_flags & ~(GElf_Xword) ALL_SH_FLAGS; @@ -3707,6 +3907,25 @@ section [%2zu] '%s': thread-local data sections address not zero\n"), // XXX TODO more tests!? } + if (shdr->sh_flags & SHF_COMPRESSED) + { + if (shdr->sh_flags & SHF_ALLOC) + ERROR (gettext ("\ +section [%2zu] '%s': allocated section cannot be compressed\n"), + cnt, section_name (ebl, cnt)); + + if (shdr->sh_type == SHT_NOBITS) + ERROR (gettext ("\ +section [%2zu] '%s': nobits section cannot be compressed\n"), + cnt, section_name (ebl, cnt)); + + GElf_Chdr chdr; + if (gelf_getchdr (scn, &chdr) == NULL) + ERROR (gettext ("\ +section [%2zu] '%s': compressed section with no compression header: %s\n"), + cnt, section_name (ebl, cnt), elf_errmsg (-1)); + } + if (shdr->sh_link >= shnum) ERROR (gettext ("\ section [%2zu] '%s': invalid section reference in link value\n"), @@ -3749,15 +3968,24 @@ section [%2zu] '%s' has unexpected type %d for an executable section\n"), break; } - if ((shdr->sh_flags & SHF_WRITE) - && !ebl_check_special_section (ebl, cnt, shdr, - section_name (ebl, cnt))) - ERROR (gettext ("\ + if (shdr->sh_flags & SHF_WRITE) + { + if (is_debuginfo && shdr->sh_type != SHT_NOBITS) + ERROR (gettext ("\ +section [%2zu] '%s' must be of type NOBITS in debuginfo files\n"), + cnt, section_name (ebl, cnt)); + + if (!is_debuginfo + && !ebl_check_special_section (ebl, cnt, shdr, + section_name (ebl, cnt))) + ERROR (gettext ("\ section [%2zu] '%s' is both executable and writable\n"), - cnt, section_name (ebl, cnt)); + cnt, section_name (ebl, cnt)); + } } - if (ehdr->e_type != ET_REL && (shdr->sh_flags & SHF_ALLOC) != 0) + if (ehdr->e_type != ET_REL && (shdr->sh_flags & SHF_ALLOC) != 0 + && !is_debuginfo) { /* Make sure the section is contained in a loaded segment and that the initialization part matches NOBITS sections. */ @@ -3789,9 +4017,39 @@ section [%2zu] '%s' not fully contained in segment of program header entry %d\n" { if (shdr->sh_offset < phdr->p_offset + phdr->p_filesz && !is_debuginfo) - ERROR (gettext ("\ + { + if (!gnuld) + ERROR (gettext ("\ section [%2zu] '%s' has type NOBITS but is read from the file in segment of program header entry %d\n"), - cnt, section_name (ebl, cnt), pcnt); + cnt, section_name (ebl, cnt), pcnt); + else + { + /* This is truly horrible. GNU ld might put a + NOBITS section in the middle of a PT_LOAD + segment, assuming the next gap in the file + actually consists of zero bits... + So it really is like a PROGBITS section + where the data is all zeros. Check those + zero bytes are really there. */ + bool bad; + Elf_Data *databits; + databits = elf_getdata_rawchunk (ebl->elf, + shdr->sh_offset, + shdr->sh_size, + ELF_T_BYTE); + bad = (databits == NULL + || databits->d_size != shdr->sh_size); + for (size_t idx = 0; + idx < databits->d_size && ! bad; + idx++) + bad = ((char *) databits->d_buf)[idx] != 0; + + if (bad) + ERROR (gettext ("\ +section [%2zu] '%s' has type NOBITS but is read from the file in segment of program header entry %d and file contents is non-zero\n"), + cnt, section_name (ebl, cnt), pcnt); + } + } } else { @@ -4027,7 +4285,7 @@ phdr[%d]: unknown core file note type %" PRIu32 " at offset %" PRIu64 "\n"), else ERROR (gettext ("\ section [%2d] '%s': unknown core file note type %" PRIu32 - " at offset %Zu\n"), + " at offset %zu\n"), shndx, section_name (ebl, shndx), (uint32_t) nhdr.n_type, offset); } @@ -4049,12 +4307,12 @@ section [%2d] '%s': unknown core file note type %" PRIu32 default: if (shndx == 0) ERROR (gettext ("\ -phdr[%d]: unknown object file note type %" PRIu32 " at offset %Zu\n"), +phdr[%d]: unknown object file note type %" PRIu32 " at offset %zu\n"), phndx, (uint32_t) nhdr.n_type, offset); else ERROR (gettext ("\ section [%2d] '%s': unknown object file note type %" PRIu32 - " at offset %Zu\n"), + " at offset %zu\n"), shndx, section_name (ebl, shndx), (uint32_t) nhdr.n_type, offset); } @@ -4084,7 +4342,7 @@ phdr[%d]: no note entries defined for the type of file\n"), Elf_Data *data = elf_getdata_rawchunk (ebl->elf, phdr->p_offset, phdr->p_filesz, ELF_T_NHDR); - if (data != NULL) + if (data != NULL && data->d_buf != NULL) notes_size = check_note_data (ebl, ehdr, data, 0, cnt, phdr->p_offset); if (notes_size == 0) @@ -4103,7 +4361,7 @@ check_note_section (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) return; Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); - if (data == NULL) + if (data == NULL || data->d_buf == NULL) { ERROR (gettext ("section [%2d] '%s': cannot get section data\n"), idx, section_name (ebl, idx)); @@ -4240,10 +4498,26 @@ more than one GNU_RELRO entry in program header\n")); if ((phdr2->p_flags & PF_W) == 0) ERROR (gettext ("\ loadable segment GNU_RELRO applies to is not writable\n")); - if ((phdr2->p_flags & ~PF_W) != (phdr->p_flags & ~PF_W)) - ERROR (gettext ("\ + /* Unless fully covered, relro flags could be a + subset of the phdrs2 flags. For example the load + segment could also have PF_X set. */ + if (phdr->p_vaddr == phdr2->p_vaddr + && (phdr->p_vaddr + phdr->p_memsz + == phdr2->p_vaddr + phdr2->p_memsz)) + { + if ((phdr2->p_flags & ~PF_W) + != (phdr->p_flags & ~PF_W)) + ERROR (gettext ("\ loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n"), - cnt, inner); + cnt, inner); + } + else + { + if ((phdr->p_flags & ~phdr2->p_flags) != 0) + ERROR (gettext ("\ +GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n"), + inner, cnt); + } break; } } @@ -4296,6 +4570,7 @@ program header offset in ELF header and PHDR entry do not match")); if (shdr != NULL && shdr->sh_type == (is_debuginfo ? SHT_NOBITS : SHT_PROGBITS) + && elf_strptr (ebl->elf, shstrndx, shdr->sh_name) != NULL && ! strcmp (".eh_frame_hdr", elf_strptr (ebl->elf, shstrndx, shdr->sh_name))) { diff --git a/src/findtextrel.c b/src/findtextrel.c index 9fd8163..e78d7b8 100644 --- a/src/findtextrel.c +++ b/src/findtextrel.c @@ -1,5 +1,5 @@ /* Locate source files or functions which caused text relocations. - Copyright (C) 2005-2010, 2012 Red Hat, Inc. + Copyright (C) 2005-2010, 2012, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -215,7 +215,7 @@ process_file (const char *fname, bool more_than_one) real_fname = new_fname; } - int fd = open64 (real_fname, O_RDONLY); + int fd = open (real_fname, O_RDONLY); if (fd == -1) { error (0, errno, gettext ("cannot open '%s'"), fname); @@ -324,14 +324,20 @@ process_file (const char *fname, bool more_than_one) if (segments == NULL) error (1, errno, gettext ("while reading ELF file")); - for (int i = 0; i < ehdr->e_phnum; ++i) + size_t phnum; + if (elf_getphdrnum (elf, &phnum) != 0) + error (1, 0, gettext ("cannot get program header count: %s"), + elf_errmsg (-1)); + + + for (size_t i = 0; i < phnum; ++i) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); if (phdr == NULL) { error (0, 0, - gettext ("cannot get program header index at offset %d: %s"), + gettext ("cannot get program header index at offset %zd: %s"), i, elf_errmsg (-1)); result = 1; goto next; @@ -349,7 +355,7 @@ process_file (const char *fname, bool more_than_one) if (segments == NULL) { error (0, 0, gettext ("\ -cannot get program header index at offset %d: %s"), +cannot get program header index at offset %zd: %s"), i, elf_errmsg (-1)); result = 1; goto next; @@ -382,7 +388,7 @@ cannot get program header index at offset %d: %s"), fname, fname_len), ".debug"); - fd2 = open64 (difname, O_RDONLY); + fd2 = open (difname, O_RDONLY); if (fd2 != -1 && (elf2 = elf_begin (fd2, ELF_C_READ_MMAP, NULL)) != NULL) dw = dwarf_begin_elf (elf2, DWARF_C_READ, NULL); @@ -400,7 +406,7 @@ cannot get program header index at offset %d: %s"), if (shdr == NULL) { error (0, 0, - gettext ("cannot get section header of section %Zu: %s"), + gettext ("cannot get section header of section %zu: %s"), elf_ndxscn (scn), elf_errmsg (-1)); result = 1; goto next; @@ -478,6 +484,7 @@ cannot get relocation at index %d in section %zu in '%s': %s"), if (fd2 != -1) close (fd2); + free (segments); tdestroy (knownsrcs, noop); return result; diff --git a/src/ld.c b/src/ld.c index 73e4f04..59dccb5 100644 --- a/src/ld.c +++ b/src/ld.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -277,13 +276,8 @@ main (int argc, char *argv[]) int remaining; int err; -#ifndef NDEBUG - /* Enable memory debugging. */ - mtrace (); -#endif - /* Sanity check. We always want to use the LFS functionality. */ - if (sizeof (off_t) != sizeof (off64_t)) + if (sizeof (off_t) != 8) abort (); /* We use no threads here which can interfere with handling a stream. */ @@ -1055,6 +1049,53 @@ parse_B_option_2 (const char *arg) } +static inline int +try (int fd, Elf *elf) +{ + int result = 0; + + if (elf == NULL) + return 0; + + if (elf_kind (elf) == ELF_K_ELF) + { + /* We have an ELF file. We now can find out + what the output format should be. */ + XElf_Ehdr_vardef(ehdr); + + /* Get the ELF header of the object. */ + xelf_getehdr (elf, ehdr); + if (ehdr != NULL) + ld_state.ebl = + ebl_openbackend_machine (ehdr->e_machine); + + result = 1; + } + else if (elf_kind (elf) == ELF_K_AR) + { + /* Try the archive members. This could + potentially lead to wrong results if the + archive contains files for more than one + architecture. But this is the user's + problem. */ + Elf *subelf; + Elf_Cmd cmd = ELF_C_READ_MMAP; + + while ((subelf = elf_begin (fd, cmd, elf)) != NULL) + { + cmd = elf_next (subelf); + + if (try (fd, subelf) != 0) + break; + } + } + + elf_end (elf); + + return result; +} + + static void determine_output_format (void) { @@ -1084,52 +1125,7 @@ determine_output_format (void) int fd = open (runp->name, O_RDONLY); if (fd != -1) { - int try (Elf *elf) - { - int result = 0; - - if (elf == NULL) - return 0; - - if (elf_kind (elf) == ELF_K_ELF) - { - /* We have an ELF file. We now can find out - what the output format should be. */ - XElf_Ehdr_vardef(ehdr); - - /* Get the ELF header of the object. */ - xelf_getehdr (elf, ehdr); - if (ehdr != NULL) - ld_state.ebl = - ebl_openbackend_machine (ehdr->e_machine); - - result = 1; - } - else if (elf_kind (elf) == ELF_K_AR) - { - /* Try the archive members. This could - potentially lead to wrong results if the - archive contains files for more than one - architecture. But this is the user's - problem. */ - Elf *subelf; - Elf_Cmd cmd = ELF_C_READ_MMAP; - - while ((subelf = elf_begin (fd, cmd, elf)) != NULL) - { - cmd = elf_next (subelf); - - if (try (subelf) != 0) - break; - } - } - - elf_end (elf); - - return result; - } - - if (try (elf_begin (fd, ELF_C_READ_MMAP, NULL)) != 0) + if (try (fd, elf_begin (fd, ELF_C_READ_MMAP, NULL)) != 0) /* Found a file. */ break; } diff --git a/src/ldlex.c b/src/ldlex.c index 81493c2..49f24a9 100644 --- a/src/ldlex.c +++ b/src/ldlex.c @@ -28,7 +28,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -200,6 +200,13 @@ extern FILE *ldin, *ldout; if ( ldtext[yyl] == '\n' )\ --ldlineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --ldlineno;\ + }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -1073,8 +1080,8 @@ int ld_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *ldtext; -#line 1 "ldlex.l" -#line 2 "ldlex.l" +#line 1 "/home/mark/src/elfutils/src/ldlex.l" +#line 2 "/home/mark/src/elfutils/src/ldlex.l" /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -1146,7 +1153,7 @@ static int pop_state (void); static int handle_ifdef (void); static void invalid_char (int ch); -#line 1150 "ldlex.c" +#line 1157 "ldlex.c" #define INITIAL 0 #define IGNORE 1 @@ -1332,16 +1339,6 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 88 "ldlex.l" - - if (unlikely (ld_scan_version_script)) - { - ld_scan_version_script = -1; - return kVERSION_SCRIPT; - } - -#line 1344 "ldlex.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -1368,6 +1365,17 @@ YY_DECL ld_load_buffer_state( ); } + { +#line 88 "/home/mark/src/elfutils/src/ldlex.l" + + if (unlikely (ld_scan_version_script)) + { + ld_scan_version_script = -1; + return kVERSION_SCRIPT; + } + +#line 1378 "ldlex.c" + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -1385,7 +1393,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1433,19 +1441,21 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 6); (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 95 "ldlex.l" +#line 95 "/home/mark/src/elfutils/src/ldlex.l" { BEGIN (handle_ifdef ()); } YY_BREAK case 2: /* rule 2 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 5); (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 96 "ldlex.l" +#line 96 "/home/mark/src/elfutils/src/ldlex.l" { eat_to_eol (true); push_state (skip_to_endif); BEGIN (IGNORE); } @@ -1453,10 +1463,11 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 8); (yy_c_buf_p) = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 99 "ldlex.l" +#line 99 "/home/mark/src/elfutils/src/ldlex.l" { eat_to_eol (false); push_state (skip_to_endif); BEGIN (IGNORE); } @@ -1464,29 +1475,32 @@ YY_RULE_SETUP case 4: /* rule 4 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 6); (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 102 "ldlex.l" +#line 102 "/home/mark/src/elfutils/src/ldlex.l" { eat_to_eol (true) ; } YY_BREAK case 5: /* rule 5 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 6); (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 104 "ldlex.l" +#line 104 "/home/mark/src/elfutils/src/ldlex.l" { eat_to_eol (false); push_state (skip_to_endif); } YY_BREAK case 6: /* rule 6 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 5); (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 106 "ldlex.l" +#line 106 "/home/mark/src/elfutils/src/ldlex.l" { eat_to_eol (true); assert (prepdepth > 0); if (prepstate[prepdepth - 1] == skip_if) @@ -1500,10 +1514,11 @@ YY_RULE_SETUP case 7: /* rule 7 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 8); (yy_c_buf_p) = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 115 "ldlex.l" +#line 115 "/home/mark/src/elfutils/src/ldlex.l" { assert (prepdepth > 0); if (prepstate[prepdepth - 1] == skip_if) { @@ -1516,118 +1531,119 @@ YY_RULE_SETUP case 8: /* rule 8 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up ldtext */ +YY_LINENO_REWIND_TO(yy_bp + 6); (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up ldtext again */ YY_RULE_SETUP -#line 123 "ldlex.l" +#line 123 "/home/mark/src/elfutils/src/ldlex.l" { eat_to_eol (true); BEGIN (pop_state ()); } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP -#line 125 "ldlex.l" +#line 125 "/home/mark/src/elfutils/src/ldlex.l" { /* nothing */ } YY_BREAK case 10: YY_RULE_SETUP -#line 128 "ldlex.l" +#line 128 "/home/mark/src/elfutils/src/ldlex.l" { eat_comment (); } YY_BREAK case 11: YY_RULE_SETUP -#line 130 "ldlex.l" +#line 130 "/home/mark/src/elfutils/src/ldlex.l" { return kALIGN; } YY_BREAK case 12: YY_RULE_SETUP -#line 131 "ldlex.l" +#line 131 "/home/mark/src/elfutils/src/ldlex.l" { return kAS_NEEDED; } YY_BREAK case 13: YY_RULE_SETUP -#line 132 "ldlex.l" +#line 132 "/home/mark/src/elfutils/src/ldlex.l" { return kENTRY; } YY_BREAK case 14: YY_RULE_SETUP -#line 133 "ldlex.l" +#line 133 "/home/mark/src/elfutils/src/ldlex.l" { return kEXCLUDE_FILE; } YY_BREAK case 15: YY_RULE_SETUP -#line 134 "ldlex.l" +#line 134 "/home/mark/src/elfutils/src/ldlex.l" { return kGLOBAL; } YY_BREAK case 16: YY_RULE_SETUP -#line 135 "ldlex.l" +#line 135 "/home/mark/src/elfutils/src/ldlex.l" { return kGROUP; } YY_BREAK case 17: YY_RULE_SETUP -#line 136 "ldlex.l" +#line 136 "/home/mark/src/elfutils/src/ldlex.l" { return kINPUT; } YY_BREAK case 18: YY_RULE_SETUP -#line 137 "ldlex.l" +#line 137 "/home/mark/src/elfutils/src/ldlex.l" { return kINTERP; } YY_BREAK case 19: YY_RULE_SETUP -#line 138 "ldlex.l" +#line 138 "/home/mark/src/elfutils/src/ldlex.l" { return kKEEP; } YY_BREAK case 20: YY_RULE_SETUP -#line 139 "ldlex.l" +#line 139 "/home/mark/src/elfutils/src/ldlex.l" { return kLOCAL; } YY_BREAK case 21: YY_RULE_SETUP -#line 140 "ldlex.l" +#line 140 "/home/mark/src/elfutils/src/ldlex.l" { return kOUTPUT_FORMAT; } YY_BREAK case 22: YY_RULE_SETUP -#line 141 "ldlex.l" +#line 141 "/home/mark/src/elfutils/src/ldlex.l" { return kPAGESIZE; } YY_BREAK case 23: YY_RULE_SETUP -#line 142 "ldlex.l" +#line 142 "/home/mark/src/elfutils/src/ldlex.l" { return kPROVIDE; } YY_BREAK case 24: YY_RULE_SETUP -#line 143 "ldlex.l" +#line 143 "/home/mark/src/elfutils/src/ldlex.l" { return kSEARCH_DIR; } YY_BREAK case 25: YY_RULE_SETUP -#line 144 "ldlex.l" +#line 144 "/home/mark/src/elfutils/src/ldlex.l" { return kSEGMENT; } YY_BREAK case 26: YY_RULE_SETUP -#line 145 "ldlex.l" +#line 145 "/home/mark/src/elfutils/src/ldlex.l" { return kSIZEOF_HEADERS; } YY_BREAK case 27: YY_RULE_SETUP -#line 146 "ldlex.l" +#line 146 "/home/mark/src/elfutils/src/ldlex.l" { return kSORT; } YY_BREAK case 28: YY_RULE_SETUP -#line 147 "ldlex.l" +#line 147 "/home/mark/src/elfutils/src/ldlex.l" { return kVERSION; } YY_BREAK case 29: YY_RULE_SETUP -#line 149 "ldlex.l" -{ int cnt = 1 ; +#line 149 "/home/mark/src/elfutils/src/ldlex.l" +{ unsigned int cnt = 1 ; ldlval.num = 0; while (cnt < ldleng - 1) ldlval.num |= attrib_convert (ldtext[cnt++]); @@ -1635,82 +1651,82 @@ YY_RULE_SETUP YY_BREAK case 30: YY_RULE_SETUP -#line 155 "ldlex.l" +#line 155 "/home/mark/src/elfutils/src/ldlex.l" { return '{'; } YY_BREAK case 31: YY_RULE_SETUP -#line 156 "ldlex.l" +#line 156 "/home/mark/src/elfutils/src/ldlex.l" { return '}'; } YY_BREAK case 32: YY_RULE_SETUP -#line 157 "ldlex.l" +#line 157 "/home/mark/src/elfutils/src/ldlex.l" { return '('; } YY_BREAK case 33: YY_RULE_SETUP -#line 158 "ldlex.l" +#line 158 "/home/mark/src/elfutils/src/ldlex.l" { return ')'; } YY_BREAK case 34: YY_RULE_SETUP -#line 159 "ldlex.l" +#line 159 "/home/mark/src/elfutils/src/ldlex.l" { return ':'; } YY_BREAK case 35: YY_RULE_SETUP -#line 160 "ldlex.l" +#line 160 "/home/mark/src/elfutils/src/ldlex.l" { return ';'; } YY_BREAK case 36: YY_RULE_SETUP -#line 161 "ldlex.l" +#line 161 "/home/mark/src/elfutils/src/ldlex.l" { return '='; } YY_BREAK case 37: YY_RULE_SETUP -#line 162 "ldlex.l" +#line 162 "/home/mark/src/elfutils/src/ldlex.l" { ldlval.op = exp_plus; return kADD_OP; } YY_BREAK case 38: YY_RULE_SETUP -#line 163 "ldlex.l" +#line 163 "/home/mark/src/elfutils/src/ldlex.l" { ldlval.op = exp_minus; return kADD_OP; } YY_BREAK case 39: YY_RULE_SETUP -#line 164 "ldlex.l" +#line 164 "/home/mark/src/elfutils/src/ldlex.l" { return '*'; } YY_BREAK case 40: YY_RULE_SETUP -#line 165 "ldlex.l" +#line 165 "/home/mark/src/elfutils/src/ldlex.l" { ldlval.op = exp_div; return kMUL_OP; } YY_BREAK case 41: YY_RULE_SETUP -#line 166 "ldlex.l" +#line 166 "/home/mark/src/elfutils/src/ldlex.l" { ldlval.op = exp_mod; return kMUL_OP; } YY_BREAK case 42: YY_RULE_SETUP -#line 167 "ldlex.l" +#line 167 "/home/mark/src/elfutils/src/ldlex.l" { return '&'; } YY_BREAK case 43: YY_RULE_SETUP -#line 168 "ldlex.l" +#line 168 "/home/mark/src/elfutils/src/ldlex.l" { return '|'; } YY_BREAK case 44: YY_RULE_SETUP -#line 170 "ldlex.l" +#line 170 "/home/mark/src/elfutils/src/ldlex.l" { return ','; } YY_BREAK case 45: YY_RULE_SETUP -#line 172 "ldlex.l" +#line 172 "/home/mark/src/elfutils/src/ldlex.l" { char *endp; ldlval.num = strtoumax (ldtext, &endp, 0); if (*endp != '\0') @@ -1727,14 +1743,14 @@ YY_RULE_SETUP YY_BREAK case 46: YY_RULE_SETUP -#line 186 "ldlex.l" +#line 186 "/home/mark/src/elfutils/src/ldlex.l" { ldlval.str = obstack_strndup (&ld_state.smem, ldtext, ldleng); return kID; } YY_BREAK case 47: YY_RULE_SETUP -#line 190 "ldlex.l" +#line 190 "/home/mark/src/elfutils/src/ldlex.l" { ldlval.str = obstack_strndup (&ld_state.smem, ldtext, ldleng); return kFILENAME; } @@ -1742,20 +1758,20 @@ YY_RULE_SETUP case 48: /* rule 48 can match eol */ YY_RULE_SETUP -#line 194 "ldlex.l" +#line 194 "/home/mark/src/elfutils/src/ldlex.l" { /* IGNORE */ } YY_BREAK case 49: YY_RULE_SETUP -#line 196 "ldlex.l" +#line 196 "/home/mark/src/elfutils/src/ldlex.l" { invalid_char (*ldtext); } YY_BREAK case 50: YY_RULE_SETUP -#line 198 "ldlex.l" +#line 198 "/home/mark/src/elfutils/src/ldlex.l" ECHO; YY_BREAK -#line 1759 "ldlex.c" +#line 1775 "ldlex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(IGNORE): yyterminate(); @@ -1888,6 +1904,7 @@ case YY_STATE_EOF(IGNORE): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of ldlex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2765,7 +2782,7 @@ void ldfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 198 "ldlex.l" +#line 198 "/home/mark/src/elfutils/src/ldlex.l" diff --git a/src/ldlex.l b/src/ldlex.l index bfc8bbe..835c2dc 100644 --- a/src/ldlex.l +++ b/src/ldlex.l @@ -146,7 +146,7 @@ SIZEOF_HEADERS { return kSIZEOF_HEADERS; } SORT { return kSORT; } VERSION { return kVERSION; } -"["([RWX]){0,3}"]" { int cnt = 1 ; +"["([RWX]){0,3}"]" { unsigned int cnt = 1 ; ldlval.num = 0; while (cnt < yyleng - 1) ldlval.num |= attrib_convert (yytext[cnt++]); diff --git a/src/ldscript.c b/src/ldscript.c index 5ebed84..07dc29c 100644 --- a/src/ldscript.c +++ b/src/ldscript.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -63,14 +63,14 @@ #define yyparse ldparse #define yylex ldlex #define yyerror lderror -#define yylval ldlval -#define yychar ldchar #define yydebug lddebug #define yynerrs ldnerrs +#define yylval ldlval +#define yychar ldchar + /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 1 "ldscript.y" +#line 1 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:339 */ /* Parser for linker scripts. Copyright (C) 2001-2011 Red Hat, Inc. @@ -132,14 +132,13 @@ static void add_versions (struct version *versions); extern int yylex (void); -/* Line 371 of yacc.c */ -#line 137 "ldscript.c" +#line 136 "ldscript.c" /* yacc.c:339 */ -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -155,7 +154,7 @@ extern int yylex (void); by #include "y.tab.h". */ #ifndef YY_LD_LDSCRIPT_H_INCLUDED # define YY_LD_LDSCRIPT_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -163,40 +162,39 @@ extern int yylex (void); extern int lddebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kADD_OP = 258, - kALIGN = 259, - kAS_NEEDED = 260, - kENTRY = 261, - kEXCLUDE_FILE = 262, - kFILENAME = 263, - kGLOBAL = 264, - kGROUP = 265, - kID = 266, - kINPUT = 267, - kINTERP = 268, - kKEEP = 269, - kLOCAL = 270, - kMODE = 271, - kMUL_OP = 272, - kNUM = 273, - kOUTPUT_FORMAT = 274, - kPAGESIZE = 275, - kPROVIDE = 276, - kSEARCH_DIR = 277, - kSEGMENT = 278, - kSIZEOF_HEADERS = 279, - kSORT = 280, - kVERSION = 281, - kVERSION_SCRIPT = 282, - ADD_OP = 283, - MUL_OP = 284 - }; + enum yytokentype + { + kADD_OP = 258, + kALIGN = 259, + kAS_NEEDED = 260, + kENTRY = 261, + kEXCLUDE_FILE = 262, + kFILENAME = 263, + kGLOBAL = 264, + kGROUP = 265, + kID = 266, + kINPUT = 267, + kINTERP = 268, + kKEEP = 269, + kLOCAL = 270, + kMODE = 271, + kMUL_OP = 272, + kNUM = 273, + kOUTPUT_FORMAT = 274, + kPAGESIZE = 275, + kPROVIDE = 276, + kSEARCH_DIR = 277, + kSEGMENT = 278, + kSIZEOF_HEADERS = 279, + kSORT = 280, + kVERSION = 281, + kVERSION_SCRIPT = 282, + ADD_OP = 283, + MUL_OP = 284 + }; #endif /* Tokens. */ #define kADD_OP 258 @@ -227,13 +225,12 @@ extern int lddebug; #define ADD_OP 283 #define MUL_OP 284 - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE + +union YYSTYPE { -/* Line 387 of yacc.c */ -#line 63 "ldscript.y" +#line 63 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:355 */ uintmax_t num; enum expression_tag op; @@ -248,37 +245,24 @@ typedef union YYSTYPE struct version *version; struct id_list *id_list; +#line 249 "ldscript.c" /* yacc.c:355 */ +}; -/* Line 387 of yacc.c */ -#line 254 "ldscript.c" -} YYSTYPE; +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE ldlval; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int ldparse (void *YYPARSE_PARAM); -#else -int ldparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int ldparse (void); -#else -int ldparse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_LD_LDSCRIPT_H_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 282 "ldscript.c" +#line 266 "ldscript.c" /* yacc.c:358 */ #ifdef short # undef short @@ -292,11 +276,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -316,8 +297,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -339,6 +319,33 @@ typedef short int yytype_int16; # endif #endif +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -346,23 +353,25 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -381,8 +390,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -394,8 +402,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -411,7 +419,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -419,15 +427,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -437,7 +443,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -462,16 +468,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -490,7 +496,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -506,24 +512,26 @@ union yyalloc #define YYNNTS 23 /* YYNRULES -- Number of rules. */ #define YYNRULES 66 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 159 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 284 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 29, 2, - 33, 34, 31, 2, 39, 2, 2, 2, 2, 2, + 33, 34, 32, 2, 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 35, 2, 38, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -547,54 +555,11 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 30, 32 + 25, 26, 27, 30, 31 }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 8, 11, 13, 19, 25, 31, - 37, 43, 49, 54, 59, 64, 69, 74, 77, 79, - 82, 87, 90, 94, 101, 104, 106, 108, 113, 116, - 122, 124, 129, 134, 135, 140, 144, 148, 152, 156, - 160, 164, 166, 168, 170, 172, 176, 178, 180, 181, - 186, 191, 193, 196, 198, 203, 209, 216, 219, 221, - 224, 227, 231, 234, 236, 238, 240 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 41, 0, -1, 42, -1, 27, 56, -1, 42, 43, - -1, 43, -1, 6, 33, 11, 34, 35, -1, 22, - 33, 61, 34, 35, -1, 20, 33, 18, 34, 35, - -1, 13, 33, 61, 34, 35, -1, 23, 16, 36, - 44, 37, -1, 23, 1, 36, 44, 37, -1, 10, - 33, 53, 34, -1, 12, 33, 53, 34, -1, 5, - 33, 53, 34, -1, 26, 36, 56, 37, -1, 19, - 33, 61, 34, -1, 44, 45, -1, 45, -1, 46, - 35, -1, 11, 36, 47, 37, -1, 11, 35, -1, - 11, 38, 52, -1, 21, 33, 11, 38, 52, 34, - -1, 47, 48, -1, 48, -1, 49, -1, 14, 33, - 49, 34, -1, 46, 35, -1, 62, 33, 51, 50, - 34, -1, 11, -1, 25, 33, 11, 34, -1, 7, - 33, 61, 34, -1, -1, 4, 33, 52, 34, -1, - 33, 52, 34, -1, 52, 31, 52, -1, 52, 17, - 52, -1, 52, 3, 52, -1, 52, 29, 52, -1, - 52, 28, 52, -1, 18, -1, 11, -1, 24, -1, - 20, -1, 53, 54, 55, -1, 55, -1, 39, -1, - -1, 10, 33, 53, 34, -1, 5, 33, 53, 34, - -1, 61, -1, 56, 57, -1, 57, -1, 36, 58, - 37, 35, -1, 61, 36, 58, 37, 35, -1, 61, - 36, 58, 37, 61, 35, -1, 58, 59, -1, 59, - -1, 9, 60, -1, 15, 60, -1, 60, 62, 35, - -1, 62, 35, -1, 8, -1, 11, -1, 61, -1, - 31, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 135, 135, 136, 140, 141, 144, 149, 153, 158, @@ -617,55 +582,63 @@ static const char *const yytname[] = "kINPUT", "kINTERP", "kKEEP", "kLOCAL", "kMODE", "kMUL_OP", "kNUM", "kOUTPUT_FORMAT", "kPAGESIZE", "kPROVIDE", "kSEARCH_DIR", "kSEGMENT", "kSIZEOF_HEADERS", "kSORT", "kVERSION", "kVERSION_SCRIPT", "'|'", "'&'", - "ADD_OP", "'*'", "MUL_OP", "'('", "')'", "';'", "'{'", "'}'", "'='", + "ADD_OP", "MUL_OP", "'*'", "'('", "')'", "';'", "'{'", "'}'", "'='", "','", "$accept", "script_or_version", "file", "content", "outputsections", "outputsection", "assignment", "inputsections", "inputsection", "sectionname", "sort_opt_name", "exclude_opt", "expr", "filename_id_list", "comma_opt", "filename_id_listelem", "versionlist", "version", "version_stmt_list", "version_stmt", "filename_id_star_list", - "filename_id", "filename_id_star", YY_NULL + "filename_id", "filename_id_star", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 124, 38, - 283, 42, 284, 40, 41, 59, 123, 125, 61, 44 + 283, 284, 42, 40, 41, 59, 123, 125, 61, 44 }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 40, 41, 41, 42, 42, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 44, 44, 45, - 45, 45, 46, 46, 47, 47, 48, 48, 48, 49, - 50, 50, 51, 51, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 53, 53, 54, 54, 55, - 55, 55, 56, 56, 57, 57, 57, 58, 58, 59, - 59, 60, 60, 61, 61, 62, 62 -}; +#define YYPACT_NINF -40 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-40))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = { - 0, 2, 1, 2, 2, 1, 5, 5, 5, 5, - 5, 5, 4, 4, 4, 4, 4, 2, 1, 2, - 4, 2, 3, 6, 2, 1, 1, 4, 2, 5, - 1, 4, 4, 0, 4, 3, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 3, 1, 1, 0, 4, - 4, 1, 2, 1, 4, 5, 6, 2, 1, 2, - 2, 3, 2, 1, 1, 1, 1 + 112, -14, -13, 27, 31, 48, 66, 100, 119, 9, + 26, 15, 98, 135, -40, 118, 139, 118, 118, 104, + 104, 141, 104, 133, 138, 15, -40, -40, 7, 15, + -40, 142, -40, -40, 120, 144, 103, -40, -40, 145, + 117, 134, 146, 147, 148, 149, 109, 109, 65, 89, + 89, 59, -40, -40, 7, 118, 118, -40, -40, 118, + 150, -40, -40, 151, -40, 152, 153, 108, 156, -6, + -40, 155, 73, -40, -40, 89, -40, 157, 89, 158, + -40, 76, 136, 137, -40, -40, -40, -40, -40, -40, + 95, 45, 161, -40, -40, -40, -40, 159, -40, -40, + 84, -40, -40, 160, 162, 164, 22, -40, -40, 163, + 167, -40, -40, -40, -40, 45, 54, 165, -40, -40, + 166, 89, -40, -40, -40, 177, 45, 0, 45, 45, + 45, 45, 45, 45, -40, 168, 171, 2, 18, -40, + 54, 54, 58, 21, 90, 38, -40, 104, -40, 172, + 173, -40, -40, 174, 180, -40, -40, 175, -40 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -686,7 +659,15 @@ static const yytype_uint8 yydefact[] = 0, 34, 23, 0, 0, 29, 32, 0, 31 }; -/* YYDEFGOTO[NTERM-NUM]. */ + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -40, -40, -40, 184, 169, 42, -2, -40, 105, 85, + -40, -40, 34, -16, -40, 154, 185, 29, 170, -39, + 176, -11, 30 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 12, 13, 14, 69, 70, 71, 106, 107, 108, @@ -694,103 +675,65 @@ static const yytype_int16 yydefgoto[] = 75, 76, 109 }; -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -86 -static const yytype_int16 yypact[] = -{ - 111, -18, -14, 23, 45, 70, 75, 85, 92, 97, - 91, 19, 128, 134, -86, 162, 96, 162, 162, 5, - 5, 123, 5, 93, 99, 19, -86, -86, 117, 19, - -86, 115, -86, -86, 125, 144, 71, -86, -86, 145, - 116, 135, 147, 148, 149, 150, 101, 101, 14, 83, - 83, 55, -86, -86, 117, 162, 162, -86, -86, 162, - 133, -86, -86, 143, -86, 151, 152, 107, 155, 63, - -86, 154, 74, -86, -86, 83, -86, 156, 83, 157, - -86, 56, 137, 141, -86, -86, -86, -86, -86, -86, - 88, 48, 174, -86, -86, -86, -86, 158, -86, -86, - 69, -86, -86, 159, 161, 160, 12, -86, -86, 163, - 165, -86, -86, -86, -86, 48, 59, 164, -86, -86, - 166, 83, -86, -86, -86, 183, 48, 0, 48, 48, - 48, 48, 48, 48, -86, 169, 167, 90, 7, -86, - 59, 59, 44, 66, 103, 29, -86, 5, -86, 171, - 172, -86, -86, 173, 188, -86, -86, 175, -86 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -86, -86, -86, 192, 168, 80, -85, -86, 102, 89, - -86, -86, 33, -16, -86, 153, 186, 38, 170, -39, - 176, -11, 4 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 31, 40, 41, 128, 38, 105, 38, 38, 42, 43, - 128, 45, 80, 26, 31, 15, 27, 129, 31, 16, - 26, 105, 26, 103, 129, 27, 104, 26, 130, 131, - 27, 132, 128, 68, 139, 130, 131, 31, 132, 82, - 83, 151, 80, 74, 38, 38, 129, 128, 38, 123, - 28, 73, 110, 77, 77, 28, 17, 130, 131, 111, - 132, 129, 128, 152, 49, 49, 112, 53, 113, 128, - 50, 50, 114, 131, 67, 132, 129, 26, 18, 97, - 27, 115, 97, 129, 68, 67, 53, 130, 131, 120, - 132, 26, 79, 100, 27, 68, 26, 132, 23, 103, - 93, 148, 104, 19, 119, 57, 128, 39, 20, 68, - 58, 96, 67, 24, 74, 149, 1, 2, 21, 74, - 129, 3, 68, 4, 5, 22, 49, 25, 32, 46, - 6, 7, 50, 8, 9, 47, 153, 10, 11, 1, - 2, 44, 89, 90, 3, 91, 4, 5, 127, 94, - 61, 54, 94, 6, 7, 58, 8, 9, 55, 138, - 10, 140, 141, 142, 143, 144, 145, 34, 85, 62, - 26, 101, 35, 27, 58, 102, 58, 56, 86, 60, - 58, 63, 64, 65, 66, 117, 87, 88, 92, 95, - 136, 98, 99, 118, 121, 122, 125, 91, 126, 157, - 147, 134, 133, 146, 154, 33, 155, 156, 124, 158, - 135, 48, 84, 0, 0, 72, 0, 0, 0, 0, + 31, 40, 41, 128, 38, 67, 38, 38, 42, 43, + 23, 45, 80, 148, 31, 68, 49, 129, 31, 15, + 16, 128, 50, 26, 128, 24, 27, 149, 130, 131, + 26, 93, 132, 103, 139, 129, 104, 31, 129, 82, + 83, 128, 80, 68, 38, 38, 130, 131, 38, 110, + 132, 28, 151, 132, 74, 129, 111, 128, 53, 123, + 17, 128, 25, 112, 18, 113, 130, 131, 49, 114, + 132, 129, 152, 26, 50, 129, 27, 53, 115, 77, + 77, 19, 130, 131, 67, 49, 132, 131, 105, 120, + 132, 50, 26, 128, 68, 27, 79, 26, 32, 20, + 27, 28, 73, 26, 105, 97, 103, 129, 97, 104, + 96, 94, 26, 100, 94, 27, 68, 1, 2, 119, + 67, 74, 3, 34, 4, 5, 26, 74, 35, 27, + 68, 6, 7, 21, 8, 9, 153, 57, 10, 11, + 1, 2, 58, 89, 90, 3, 91, 4, 5, 127, + 39, 61, 22, 55, 6, 7, 58, 8, 9, 44, + 138, 10, 140, 141, 142, 143, 144, 145, 62, 46, + 101, 102, 117, 58, 47, 58, 58, 56, 54, 60, + 63, 64, 65, 66, 136, 85, 86, 87, 88, 92, + 95, 157, 98, 99, 118, 121, 125, 33, 91, 122, + 126, 134, 146, 133, 147, 154, 135, 155, 156, 158, + 48, 124, 0, 84, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 81, 0, 78 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-86))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { - 11, 17, 18, 3, 15, 90, 17, 18, 19, 20, - 3, 22, 51, 8, 25, 33, 11, 17, 29, 33, - 8, 106, 8, 11, 17, 11, 14, 8, 28, 29, - 11, 31, 3, 21, 34, 28, 29, 48, 31, 55, - 56, 34, 81, 31, 55, 56, 17, 3, 59, 37, - 36, 37, 4, 49, 50, 36, 33, 28, 29, 11, - 31, 17, 3, 34, 9, 9, 18, 29, 20, 3, - 15, 15, 24, 29, 11, 31, 17, 8, 33, 75, - 11, 33, 78, 17, 21, 11, 48, 28, 29, 100, - 31, 8, 37, 37, 11, 21, 8, 31, 1, 11, - 37, 11, 14, 33, 35, 34, 3, 11, 33, 21, - 39, 37, 11, 16, 31, 25, 5, 6, 33, 31, - 17, 10, 21, 12, 13, 33, 9, 36, 0, 36, - 19, 20, 15, 22, 23, 36, 147, 26, 27, 5, - 6, 18, 35, 36, 10, 38, 12, 13, 115, 69, - 34, 36, 72, 19, 20, 39, 22, 23, 33, 126, - 26, 128, 129, 130, 131, 132, 133, 5, 35, 34, - 8, 34, 10, 11, 39, 34, 39, 33, 35, 34, - 39, 34, 34, 34, 34, 11, 35, 35, 33, 35, - 7, 35, 35, 35, 33, 35, 33, 38, 33, 11, - 33, 35, 38, 34, 33, 13, 34, 34, 106, 34, - 121, 25, 59, -1, -1, 47, -1, -1, -1, -1, + 11, 17, 18, 3, 15, 11, 17, 18, 19, 20, + 1, 22, 51, 11, 25, 21, 9, 17, 29, 33, + 33, 3, 15, 8, 3, 16, 11, 25, 28, 29, + 8, 37, 32, 11, 34, 17, 14, 48, 17, 55, + 56, 3, 81, 21, 55, 56, 28, 29, 59, 4, + 32, 36, 34, 32, 32, 17, 11, 3, 29, 37, + 33, 3, 36, 18, 33, 20, 28, 29, 9, 24, + 32, 17, 34, 8, 15, 17, 11, 48, 33, 49, + 50, 33, 28, 29, 11, 9, 32, 29, 90, 100, + 32, 15, 8, 3, 21, 11, 37, 8, 0, 33, + 11, 36, 37, 8, 106, 75, 11, 17, 78, 14, + 37, 69, 8, 37, 72, 11, 21, 5, 6, 35, + 11, 32, 10, 5, 12, 13, 8, 32, 10, 11, + 21, 19, 20, 33, 22, 23, 147, 34, 26, 27, + 5, 6, 39, 35, 36, 10, 38, 12, 13, 115, + 11, 34, 33, 33, 19, 20, 39, 22, 23, 18, + 126, 26, 128, 129, 130, 131, 132, 133, 34, 36, + 34, 34, 11, 39, 36, 39, 39, 33, 36, 34, + 34, 34, 34, 34, 7, 35, 35, 35, 35, 33, + 35, 11, 35, 35, 35, 33, 33, 13, 38, 35, + 33, 35, 34, 38, 33, 33, 121, 34, 34, 34, + 25, 106, -1, 59, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, 54, -1, 50 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 5, 6, 10, 12, 13, 19, 20, 22, 23, @@ -800,41 +743,51 @@ static const yytype_uint8 yystos[] = 53, 53, 61, 61, 18, 61, 36, 36, 56, 9, 15, 58, 59, 57, 36, 33, 33, 34, 39, 54, 34, 34, 34, 34, 34, 34, 34, 11, 21, 44, - 45, 46, 44, 37, 31, 60, 61, 62, 60, 37, + 45, 46, 44, 37, 32, 60, 61, 62, 60, 37, 59, 58, 53, 53, 55, 35, 35, 35, 35, 35, 36, 38, 33, 37, 45, 35, 37, 62, 35, 35, 37, 34, 34, 11, 14, 46, 47, 48, 49, 62, 4, 11, 18, 20, 24, 33, 52, 11, 35, 35, 61, 33, 35, 37, 48, 33, 33, 52, 3, 17, - 28, 29, 31, 38, 35, 49, 7, 51, 52, 34, + 28, 29, 32, 38, 35, 49, 7, 51, 52, 34, 52, 52, 52, 52, 52, 52, 34, 33, 11, 25, 50, 34, 34, 61, 33, 34, 34, 11, 34 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 40, 41, 41, 42, 42, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 44, 44, 45, + 45, 45, 46, 46, 47, 47, 48, 48, 48, 49, + 50, 50, 51, 51, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 53, 53, 54, 54, 55, + 55, 55, 56, 56, 57, 57, 57, 58, 58, 59, + 59, 60, 60, 61, 61, 62, 62 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 2, 2, 1, 5, 5, 5, 5, + 5, 5, 4, 4, 4, 4, 4, 2, 1, 2, + 4, 2, 3, 6, 2, 1, 1, 4, 2, 5, + 1, 4, 4, 0, 4, 3, 3, 3, 3, 3, + 3, 1, 1, 1, 1, 3, 1, 1, 0, 4, + 4, 1, 2, 1, 4, 5, 6, 2, 1, 2, + 2, 3, 2, 1, 1, 1, 1 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -851,27 +804,15 @@ do \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -881,40 +822,36 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); @@ -923,14 +860,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -938,22 +869,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -964,16 +884,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -984,49 +896,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1040,7 +945,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1063,15 +968,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1087,16 +985,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1126,27 +1016,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1169,11 +1059,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1181,10 +1071,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1234,7 +1120,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1301,31 +1187,17 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1334,18 +1206,8 @@ yydestruct (yymsg, yytype, yyvaluep) /* The lookahead symbol. */ int yychar; - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - +YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; @@ -1354,35 +1216,16 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1450,23 +1293,23 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1474,22 +1317,22 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1498,10 +1341,10 @@ yyparse () yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1530,7 +1373,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1595,7 +1438,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1609,151 +1452,150 @@ yyreduce: switch (yyn) { case 3: -/* Line 1792 of yacc.c */ -#line 137 "ldscript.y" - { add_versions ((yyvsp[(2) - (2)].version)); } +#line 137 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { add_versions ((yyvsp[0].version)); } +#line 1458 "ldscript.c" /* yacc.c:1646 */ break; case 6: -/* Line 1792 of yacc.c */ -#line 145 "ldscript.y" +#line 145 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { if (likely (ld_state.entry == NULL)) - ld_state.entry = (yyvsp[(3) - (5)].str); + ld_state.entry = (yyvsp[-2].str); } +#line 1467 "ldscript.c" /* yacc.c:1646 */ break; case 7: -/* Line 1792 of yacc.c */ -#line 150 "ldscript.y" +#line 150 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - ld_new_searchdir ((yyvsp[(3) - (5)].str)); + ld_new_searchdir ((yyvsp[-2].str)); } +#line 1475 "ldscript.c" /* yacc.c:1646 */ break; case 8: -/* Line 1792 of yacc.c */ -#line 154 "ldscript.y" +#line 154 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { if (likely (ld_state.pagesize == 0)) - ld_state.pagesize = (yyvsp[(3) - (5)].num); + ld_state.pagesize = (yyvsp[-2].num); } +#line 1484 "ldscript.c" /* yacc.c:1646 */ break; case 9: -/* Line 1792 of yacc.c */ -#line 159 "ldscript.y" +#line 159 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { if (likely (ld_state.interp == NULL) && ld_state.file_type != dso_file_type) - ld_state.interp = (yyvsp[(3) - (5)].str); + ld_state.interp = (yyvsp[-2].str); } +#line 1494 "ldscript.c" /* yacc.c:1646 */ break; case 10: -/* Line 1792 of yacc.c */ -#line 165 "ldscript.y" +#line 165 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - new_segment ((yyvsp[(2) - (5)].num), (yyvsp[(4) - (5)].output_rule)); + new_segment ((yyvsp[-3].num), (yyvsp[-1].output_rule)); } +#line 1502 "ldscript.c" /* yacc.c:1646 */ break; case 11: -/* Line 1792 of yacc.c */ -#line 169 "ldscript.y" +#line 169 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { fputs_unlocked (gettext ("mode for segment invalid\n"), stderr); - new_segment (0, (yyvsp[(4) - (5)].output_rule)); + new_segment (0, (yyvsp[-1].output_rule)); } +#line 1512 "ldscript.c" /* yacc.c:1646 */ break; case 12: -/* Line 1792 of yacc.c */ -#line 175 "ldscript.y" +#line 175 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { /* First little optimization. If there is only one file in the group don't do anything. */ - if ((yyvsp[(3) - (4)].filename_list) != (yyvsp[(3) - (4)].filename_list)->next) + if ((yyvsp[-1].filename_list) != (yyvsp[-1].filename_list)->next) { - (yyvsp[(3) - (4)].filename_list)->next->group_start = 1; - (yyvsp[(3) - (4)].filename_list)->group_end = 1; + (yyvsp[-1].filename_list)->next->group_start = 1; + (yyvsp[-1].filename_list)->group_end = 1; } - add_inputfiles ((yyvsp[(3) - (4)].filename_list)); + add_inputfiles ((yyvsp[-1].filename_list)); } +#line 1527 "ldscript.c" /* yacc.c:1646 */ break; case 13: -/* Line 1792 of yacc.c */ -#line 186 "ldscript.y" - { add_inputfiles ((yyvsp[(3) - (4)].filename_list)); } +#line 186 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { add_inputfiles ((yyvsp[-1].filename_list)); } +#line 1533 "ldscript.c" /* yacc.c:1646 */ break; case 14: -/* Line 1792 of yacc.c */ -#line 188 "ldscript.y" - { add_inputfiles (mark_as_needed ((yyvsp[(3) - (4)].filename_list))); } +#line 188 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { add_inputfiles (mark_as_needed ((yyvsp[-1].filename_list))); } +#line 1539 "ldscript.c" /* yacc.c:1646 */ break; case 15: -/* Line 1792 of yacc.c */ -#line 190 "ldscript.y" - { add_versions ((yyvsp[(3) - (4)].version)); } +#line 190 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { add_versions ((yyvsp[-1].version)); } +#line 1545 "ldscript.c" /* yacc.c:1646 */ break; case 16: -/* Line 1792 of yacc.c */ -#line 192 "ldscript.y" +#line 192 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { /* XXX TODO */ } +#line 1551 "ldscript.c" /* yacc.c:1646 */ break; case 17: -/* Line 1792 of yacc.c */ -#line 196 "ldscript.y" +#line 196 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(2) - (2)].output_rule)->next = (yyvsp[(1) - (2)].output_rule)->next; - (yyval.output_rule) = (yyvsp[(1) - (2)].output_rule)->next = (yyvsp[(2) - (2)].output_rule); + (yyvsp[0].output_rule)->next = (yyvsp[-1].output_rule)->next; + (yyval.output_rule) = (yyvsp[-1].output_rule)->next = (yyvsp[0].output_rule); } +#line 1560 "ldscript.c" /* yacc.c:1646 */ break; case 18: -/* Line 1792 of yacc.c */ -#line 201 "ldscript.y" - { (yyval.output_rule) = (yyvsp[(1) - (1)].output_rule); } +#line 201 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.output_rule) = (yyvsp[0].output_rule); } +#line 1566 "ldscript.c" /* yacc.c:1646 */ break; case 19: -/* Line 1792 of yacc.c */ -#line 205 "ldscript.y" +#line 205 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.output_rule) = new_output_rule (output_assignment); - (yyval.output_rule)->val.assignment = (yyvsp[(1) - (2)].assignment); + (yyval.output_rule)->val.assignment = (yyvsp[-1].assignment); } +#line 1575 "ldscript.c" /* yacc.c:1646 */ break; case 20: -/* Line 1792 of yacc.c */ -#line 210 "ldscript.y" +#line 210 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.output_rule) = new_output_rule (output_section); - (yyval.output_rule)->val.section.name = (yyvsp[(1) - (4)].str); - (yyval.output_rule)->val.section.input = (yyvsp[(3) - (4)].input_rule)->next; + (yyval.output_rule)->val.section.name = (yyvsp[-3].str); + (yyval.output_rule)->val.section.input = (yyvsp[-1].input_rule)->next; if (ld_state.strip == strip_debug - && ebl_debugscn_p (ld_state.ebl, (yyvsp[(1) - (4)].str))) + && ebl_debugscn_p (ld_state.ebl, (yyvsp[-3].str))) (yyval.output_rule)->val.section.ignored = true; else (yyval.output_rule)->val.section.ignored = false; - (yyvsp[(3) - (4)].input_rule)->next = NULL; + (yyvsp[-1].input_rule)->next = NULL; } +#line 1591 "ldscript.c" /* yacc.c:1646 */ break; case 21: -/* Line 1792 of yacc.c */ -#line 222 "ldscript.y" +#line 222 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { /* This is a short cut for "ID { *(ID) }". */ (yyval.output_rule) = new_output_rule (output_section); - (yyval.output_rule)->val.section.name = (yyvsp[(1) - (2)].str); + (yyval.output_rule)->val.section.name = (yyvsp[-1].str); (yyval.output_rule)->val.section.input = new_input_rule (input_section); (yyval.output_rule)->val.section.input->next = NULL; (yyval.output_rule)->val.section.input->val.section = @@ -1763,358 +1605,358 @@ yyreduce: (yyval.output_rule)->val.section.input->val.section->filemask = NULL; (yyval.output_rule)->val.section.input->val.section->excludemask = NULL; (yyval.output_rule)->val.section.input->val.section->section_name = - new_input_section_name ((yyvsp[(1) - (2)].str), false); + new_input_section_name ((yyvsp[-1].str), false); (yyval.output_rule)->val.section.input->val.section->keep_flag = false; if (ld_state.strip == strip_debug - && ebl_debugscn_p (ld_state.ebl, (yyvsp[(1) - (2)].str))) + && ebl_debugscn_p (ld_state.ebl, (yyvsp[-1].str))) (yyval.output_rule)->val.section.ignored = true; else (yyval.output_rule)->val.section.ignored = false; } +#line 1617 "ldscript.c" /* yacc.c:1646 */ break; case 22: -/* Line 1792 of yacc.c */ -#line 246 "ldscript.y" - { (yyval.assignment) = new_assignment ((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].expr), false); } +#line 246 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.assignment) = new_assignment ((yyvsp[-2].str), (yyvsp[0].expr), false); } +#line 1623 "ldscript.c" /* yacc.c:1646 */ break; case 23: -/* Line 1792 of yacc.c */ -#line 248 "ldscript.y" - { (yyval.assignment) = new_assignment ((yyvsp[(3) - (6)].str), (yyvsp[(5) - (6)].expr), true); } +#line 248 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.assignment) = new_assignment ((yyvsp[-3].str), (yyvsp[-1].expr), true); } +#line 1629 "ldscript.c" /* yacc.c:1646 */ break; case 24: -/* Line 1792 of yacc.c */ -#line 252 "ldscript.y" +#line 252 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(2) - (2)].input_rule)->next = (yyvsp[(1) - (2)].input_rule)->next; - (yyval.input_rule) = (yyvsp[(1) - (2)].input_rule)->next = (yyvsp[(2) - (2)].input_rule); + (yyvsp[0].input_rule)->next = (yyvsp[-1].input_rule)->next; + (yyval.input_rule) = (yyvsp[-1].input_rule)->next = (yyvsp[0].input_rule); } +#line 1638 "ldscript.c" /* yacc.c:1646 */ break; case 25: -/* Line 1792 of yacc.c */ -#line 257 "ldscript.y" - { (yyval.input_rule) = (yyvsp[(1) - (1)].input_rule); } +#line 257 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.input_rule) = (yyvsp[0].input_rule); } +#line 1644 "ldscript.c" /* yacc.c:1646 */ break; case 26: -/* Line 1792 of yacc.c */ -#line 261 "ldscript.y" +#line 261 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.input_rule) = new_input_rule (input_section); - (yyval.input_rule)->val.section = (yyvsp[(1) - (1)].filemask_section_name); + (yyval.input_rule)->val.section = (yyvsp[0].filemask_section_name); } +#line 1653 "ldscript.c" /* yacc.c:1646 */ break; case 27: -/* Line 1792 of yacc.c */ -#line 266 "ldscript.y" +#line 266 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(3) - (4)].filemask_section_name)->keep_flag = true; + (yyvsp[-1].filemask_section_name)->keep_flag = true; (yyval.input_rule) = new_input_rule (input_section); - (yyval.input_rule)->val.section = (yyvsp[(3) - (4)].filemask_section_name); + (yyval.input_rule)->val.section = (yyvsp[-1].filemask_section_name); } +#line 1664 "ldscript.c" /* yacc.c:1646 */ break; case 28: -/* Line 1792 of yacc.c */ -#line 273 "ldscript.y" +#line 273 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.input_rule) = new_input_rule (input_assignment); - (yyval.input_rule)->val.assignment = (yyvsp[(1) - (2)].assignment); + (yyval.input_rule)->val.assignment = (yyvsp[-1].assignment); } +#line 1673 "ldscript.c" /* yacc.c:1646 */ break; case 29: -/* Line 1792 of yacc.c */ -#line 280 "ldscript.y" +#line 280 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.filemask_section_name) = (struct filemask_section_name *) obstack_alloc (&ld_state.smem, sizeof (*(yyval.filemask_section_name))); - (yyval.filemask_section_name)->filemask = (yyvsp[(1) - (5)].str); - (yyval.filemask_section_name)->excludemask = (yyvsp[(3) - (5)].str); - (yyval.filemask_section_name)->section_name = (yyvsp[(4) - (5)].sectionname); + (yyval.filemask_section_name)->filemask = (yyvsp[-4].str); + (yyval.filemask_section_name)->excludemask = (yyvsp[-2].str); + (yyval.filemask_section_name)->section_name = (yyvsp[-1].sectionname); (yyval.filemask_section_name)->keep_flag = false; } +#line 1686 "ldscript.c" /* yacc.c:1646 */ break; case 30: -/* Line 1792 of yacc.c */ -#line 291 "ldscript.y" - { (yyval.sectionname) = new_input_section_name ((yyvsp[(1) - (1)].str), false); } +#line 291 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.sectionname) = new_input_section_name ((yyvsp[0].str), false); } +#line 1692 "ldscript.c" /* yacc.c:1646 */ break; case 31: -/* Line 1792 of yacc.c */ -#line 293 "ldscript.y" - { (yyval.sectionname) = new_input_section_name ((yyvsp[(3) - (4)].str), true); } +#line 293 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.sectionname) = new_input_section_name ((yyvsp[-1].str), true); } +#line 1698 "ldscript.c" /* yacc.c:1646 */ break; case 32: -/* Line 1792 of yacc.c */ -#line 297 "ldscript.y" - { (yyval.str) = (yyvsp[(3) - (4)].str); } +#line 297 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[-1].str); } +#line 1704 "ldscript.c" /* yacc.c:1646 */ break; case 33: -/* Line 1792 of yacc.c */ -#line 299 "ldscript.y" +#line 299 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.str) = NULL; } +#line 1710 "ldscript.c" /* yacc.c:1646 */ break; case 34: -/* Line 1792 of yacc.c */ -#line 303 "ldscript.y" +#line 303 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_align); - (yyval.expr)->val.child = (yyvsp[(3) - (4)].expr); + (yyval.expr)->val.child = (yyvsp[-1].expr); } +#line 1719 "ldscript.c" /* yacc.c:1646 */ break; case 35: -/* Line 1792 of yacc.c */ -#line 308 "ldscript.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); } +#line 308 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[-1].expr); } +#line 1725 "ldscript.c" /* yacc.c:1646 */ break; case 36: -/* Line 1792 of yacc.c */ -#line 310 "ldscript.y" +#line 310 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_mult); - (yyval.expr)->val.binary.left = (yyvsp[(1) - (3)].expr); - (yyval.expr)->val.binary.right = (yyvsp[(3) - (3)].expr); + (yyval.expr)->val.binary.left = (yyvsp[-2].expr); + (yyval.expr)->val.binary.right = (yyvsp[0].expr); } +#line 1735 "ldscript.c" /* yacc.c:1646 */ break; case 37: -/* Line 1792 of yacc.c */ -#line 316 "ldscript.y" +#line 316 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyval.expr) = new_expr ((yyvsp[(2) - (3)].op)); - (yyval.expr)->val.binary.left = (yyvsp[(1) - (3)].expr); - (yyval.expr)->val.binary.right = (yyvsp[(3) - (3)].expr); + (yyval.expr) = new_expr ((yyvsp[-1].op)); + (yyval.expr)->val.binary.left = (yyvsp[-2].expr); + (yyval.expr)->val.binary.right = (yyvsp[0].expr); } +#line 1745 "ldscript.c" /* yacc.c:1646 */ break; case 38: -/* Line 1792 of yacc.c */ -#line 322 "ldscript.y" +#line 322 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyval.expr) = new_expr ((yyvsp[(2) - (3)].op)); - (yyval.expr)->val.binary.left = (yyvsp[(1) - (3)].expr); - (yyval.expr)->val.binary.right = (yyvsp[(3) - (3)].expr); + (yyval.expr) = new_expr ((yyvsp[-1].op)); + (yyval.expr)->val.binary.left = (yyvsp[-2].expr); + (yyval.expr)->val.binary.right = (yyvsp[0].expr); } +#line 1755 "ldscript.c" /* yacc.c:1646 */ break; case 39: -/* Line 1792 of yacc.c */ -#line 328 "ldscript.y" +#line 328 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_and); - (yyval.expr)->val.binary.left = (yyvsp[(1) - (3)].expr); - (yyval.expr)->val.binary.right = (yyvsp[(3) - (3)].expr); + (yyval.expr)->val.binary.left = (yyvsp[-2].expr); + (yyval.expr)->val.binary.right = (yyvsp[0].expr); } +#line 1765 "ldscript.c" /* yacc.c:1646 */ break; case 40: -/* Line 1792 of yacc.c */ -#line 334 "ldscript.y" +#line 334 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_or); - (yyval.expr)->val.binary.left = (yyvsp[(1) - (3)].expr); - (yyval.expr)->val.binary.right = (yyvsp[(3) - (3)].expr); + (yyval.expr)->val.binary.left = (yyvsp[-2].expr); + (yyval.expr)->val.binary.right = (yyvsp[0].expr); } +#line 1775 "ldscript.c" /* yacc.c:1646 */ break; case 41: -/* Line 1792 of yacc.c */ -#line 340 "ldscript.y" +#line 340 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_num); - (yyval.expr)->val.num = (yyvsp[(1) - (1)].num); + (yyval.expr)->val.num = (yyvsp[0].num); } +#line 1784 "ldscript.c" /* yacc.c:1646 */ break; case 42: -/* Line 1792 of yacc.c */ -#line 345 "ldscript.y" +#line 345 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_id); - (yyval.expr)->val.str = (yyvsp[(1) - (1)].str); + (yyval.expr)->val.str = (yyvsp[0].str); } +#line 1793 "ldscript.c" /* yacc.c:1646 */ break; case 43: -/* Line 1792 of yacc.c */ -#line 350 "ldscript.y" +#line 350 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_sizeof_headers); } +#line 1799 "ldscript.c" /* yacc.c:1646 */ break; case 44: -/* Line 1792 of yacc.c */ -#line 352 "ldscript.y" +#line 352 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.expr) = new_expr (exp_pagesize); } +#line 1805 "ldscript.c" /* yacc.c:1646 */ break; case 45: -/* Line 1792 of yacc.c */ -#line 356 "ldscript.y" +#line 356 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(3) - (3)].filename_list)->next = (yyvsp[(1) - (3)].filename_list)->next; - (yyval.filename_list) = (yyvsp[(1) - (3)].filename_list)->next = (yyvsp[(3) - (3)].filename_list); + (yyvsp[0].filename_list)->next = (yyvsp[-2].filename_list)->next; + (yyval.filename_list) = (yyvsp[-2].filename_list)->next = (yyvsp[0].filename_list); } +#line 1814 "ldscript.c" /* yacc.c:1646 */ break; case 46: -/* Line 1792 of yacc.c */ -#line 361 "ldscript.y" - { (yyval.filename_list) = (yyvsp[(1) - (1)].filename_list); } +#line 361 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.filename_list) = (yyvsp[0].filename_list); } +#line 1820 "ldscript.c" /* yacc.c:1646 */ break; case 49: -/* Line 1792 of yacc.c */ -#line 369 "ldscript.y" +#line 369 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { /* First little optimization. If there is only one file in the group don't do anything. */ - if ((yyvsp[(3) - (4)].filename_list) != (yyvsp[(3) - (4)].filename_list)->next) + if ((yyvsp[-1].filename_list) != (yyvsp[-1].filename_list)->next) { - (yyvsp[(3) - (4)].filename_list)->next->group_start = 1; - (yyvsp[(3) - (4)].filename_list)->group_end = 1; + (yyvsp[-1].filename_list)->next->group_start = 1; + (yyvsp[-1].filename_list)->group_end = 1; } - (yyval.filename_list) = (yyvsp[(3) - (4)].filename_list); + (yyval.filename_list) = (yyvsp[-1].filename_list); } +#line 1835 "ldscript.c" /* yacc.c:1646 */ break; case 50: -/* Line 1792 of yacc.c */ -#line 380 "ldscript.y" - { (yyval.filename_list) = mark_as_needed ((yyvsp[(3) - (4)].filename_list)); } +#line 380 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.filename_list) = mark_as_needed ((yyvsp[-1].filename_list)); } +#line 1841 "ldscript.c" /* yacc.c:1646 */ break; case 51: -/* Line 1792 of yacc.c */ -#line 382 "ldscript.y" - { (yyval.filename_list) = new_filename_listelem ((yyvsp[(1) - (1)].str)); } +#line 382 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.filename_list) = new_filename_listelem ((yyvsp[0].str)); } +#line 1847 "ldscript.c" /* yacc.c:1646 */ break; case 52: -/* Line 1792 of yacc.c */ -#line 387 "ldscript.y" +#line 387 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(2) - (2)].version)->next = (yyvsp[(1) - (2)].version)->next; - (yyval.version) = (yyvsp[(1) - (2)].version)->next = (yyvsp[(2) - (2)].version); + (yyvsp[0].version)->next = (yyvsp[-1].version)->next; + (yyval.version) = (yyvsp[-1].version)->next = (yyvsp[0].version); } +#line 1856 "ldscript.c" /* yacc.c:1646 */ break; case 53: -/* Line 1792 of yacc.c */ -#line 392 "ldscript.y" - { (yyval.version) = (yyvsp[(1) - (1)].version); } +#line 392 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.version) = (yyvsp[0].version); } +#line 1862 "ldscript.c" /* yacc.c:1646 */ break; case 54: -/* Line 1792 of yacc.c */ -#line 396 "ldscript.y" +#line 396 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(2) - (4)].version)->versionname = ""; - (yyvsp[(2) - (4)].version)->parentname = NULL; - (yyval.version) = (yyvsp[(2) - (4)].version); + (yyvsp[-2].version)->versionname = ""; + (yyvsp[-2].version)->parentname = NULL; + (yyval.version) = (yyvsp[-2].version); } +#line 1872 "ldscript.c" /* yacc.c:1646 */ break; case 55: -/* Line 1792 of yacc.c */ -#line 402 "ldscript.y" +#line 402 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(3) - (5)].version)->versionname = (yyvsp[(1) - (5)].str); - (yyvsp[(3) - (5)].version)->parentname = NULL; - (yyval.version) = (yyvsp[(3) - (5)].version); + (yyvsp[-2].version)->versionname = (yyvsp[-4].str); + (yyvsp[-2].version)->parentname = NULL; + (yyval.version) = (yyvsp[-2].version); } +#line 1882 "ldscript.c" /* yacc.c:1646 */ break; case 56: -/* Line 1792 of yacc.c */ -#line 408 "ldscript.y" +#line 408 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - (yyvsp[(3) - (6)].version)->versionname = (yyvsp[(1) - (6)].str); - (yyvsp[(3) - (6)].version)->parentname = (yyvsp[(5) - (6)].str); - (yyval.version) = (yyvsp[(3) - (6)].version); + (yyvsp[-3].version)->versionname = (yyvsp[-5].str); + (yyvsp[-3].version)->parentname = (yyvsp[-1].str); + (yyval.version) = (yyvsp[-3].version); } +#line 1892 "ldscript.c" /* yacc.c:1646 */ break; case 57: -/* Line 1792 of yacc.c */ -#line 417 "ldscript.y" - { (yyval.version) = merge_versions ((yyvsp[(1) - (2)].version), (yyvsp[(2) - (2)].version)); } +#line 417 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.version) = merge_versions ((yyvsp[-1].version), (yyvsp[0].version)); } +#line 1898 "ldscript.c" /* yacc.c:1646 */ break; case 58: -/* Line 1792 of yacc.c */ -#line 419 "ldscript.y" - { (yyval.version) = (yyvsp[(1) - (1)].version); } +#line 419 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.version) = (yyvsp[0].version); } +#line 1904 "ldscript.c" /* yacc.c:1646 */ break; case 59: -/* Line 1792 of yacc.c */ -#line 423 "ldscript.y" - { (yyval.version) = new_version (NULL, (yyvsp[(2) - (2)].id_list)); } +#line 423 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.version) = new_version (NULL, (yyvsp[0].id_list)); } +#line 1910 "ldscript.c" /* yacc.c:1646 */ break; case 60: -/* Line 1792 of yacc.c */ -#line 425 "ldscript.y" - { (yyval.version) = new_version ((yyvsp[(2) - (2)].id_list), NULL); } +#line 425 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.version) = new_version ((yyvsp[0].id_list), NULL); } +#line 1916 "ldscript.c" /* yacc.c:1646 */ break; case 61: -/* Line 1792 of yacc.c */ -#line 430 "ldscript.y" +#line 430 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { - struct id_list *newp = new_id_listelem ((yyvsp[(2) - (3)].str)); - newp->next = (yyvsp[(1) - (3)].id_list)->next; - (yyval.id_list) = (yyvsp[(1) - (3)].id_list)->next = newp; + struct id_list *newp = new_id_listelem ((yyvsp[-1].str)); + newp->next = (yyvsp[-2].id_list)->next; + (yyval.id_list) = (yyvsp[-2].id_list)->next = newp; } +#line 1926 "ldscript.c" /* yacc.c:1646 */ break; case 62: -/* Line 1792 of yacc.c */ -#line 436 "ldscript.y" - { (yyval.id_list) = new_id_listelem ((yyvsp[(1) - (2)].str)); } +#line 436 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.id_list) = new_id_listelem ((yyvsp[-1].str)); } +#line 1932 "ldscript.c" /* yacc.c:1646 */ break; case 63: -/* Line 1792 of yacc.c */ -#line 440 "ldscript.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } +#line 440 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].str); } +#line 1938 "ldscript.c" /* yacc.c:1646 */ break; case 64: -/* Line 1792 of yacc.c */ -#line 442 "ldscript.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } +#line 442 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].str); } +#line 1944 "ldscript.c" /* yacc.c:1646 */ break; case 65: -/* Line 1792 of yacc.c */ -#line 446 "ldscript.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } +#line 446 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].str); } +#line 1950 "ldscript.c" /* yacc.c:1646 */ break; case 66: -/* Line 1792 of yacc.c */ -#line 448 "ldscript.y" +#line 448 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1646 */ { (yyval.str) = NULL; } +#line 1956 "ldscript.c" /* yacc.c:1646 */ break; -/* Line 1792 of yacc.c */ -#line 2118 "ldscript.c" +#line 1960 "ldscript.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2136,7 +1978,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2151,9 +1993,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2204,20 +2046,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2236,7 +2078,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2249,29 +2091,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2322,14 +2164,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2340,13 +2182,9 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -/* Line 2055 of yacc.c */ -#line 451 "ldscript.y" +#line 451 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1906 */ static void @@ -2634,7 +2472,7 @@ add_id_list (const char *versionname, struct id_list *runp, _Bool local) if (defp != NULL && defp->u.s.local != local) error (EXIT_FAILURE, 0, versionname[0] == '\0' ? gettext ("\ -symbol '%s' is declared both local and global for unnamed version") +symbol '%s' is declared both local and global for unnamed version '%s'") : gettext ("\ symbol '%s' is declared both local and global for version '%s'"), runp->id, versionname); diff --git a/src/ldscript.h b/src/ldscript.h index f96b1bd..2e82470 100644 --- a/src/ldscript.h +++ b/src/ldscript.h @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,13 +26,13 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_LD_LDSCRIPT_H_INCLUDED # define YY_LD_LDSCRIPT_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -40,40 +40,39 @@ extern int lddebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kADD_OP = 258, - kALIGN = 259, - kAS_NEEDED = 260, - kENTRY = 261, - kEXCLUDE_FILE = 262, - kFILENAME = 263, - kGLOBAL = 264, - kGROUP = 265, - kID = 266, - kINPUT = 267, - kINTERP = 268, - kKEEP = 269, - kLOCAL = 270, - kMODE = 271, - kMUL_OP = 272, - kNUM = 273, - kOUTPUT_FORMAT = 274, - kPAGESIZE = 275, - kPROVIDE = 276, - kSEARCH_DIR = 277, - kSEGMENT = 278, - kSIZEOF_HEADERS = 279, - kSORT = 280, - kVERSION = 281, - kVERSION_SCRIPT = 282, - ADD_OP = 283, - MUL_OP = 284 - }; + enum yytokentype + { + kADD_OP = 258, + kALIGN = 259, + kAS_NEEDED = 260, + kENTRY = 261, + kEXCLUDE_FILE = 262, + kFILENAME = 263, + kGLOBAL = 264, + kGROUP = 265, + kID = 266, + kINPUT = 267, + kINTERP = 268, + kKEEP = 269, + kLOCAL = 270, + kMODE = 271, + kMUL_OP = 272, + kNUM = 273, + kOUTPUT_FORMAT = 274, + kPAGESIZE = 275, + kPROVIDE = 276, + kSEARCH_DIR = 277, + kSEGMENT = 278, + kSIZEOF_HEADERS = 279, + kSORT = 280, + kVERSION = 281, + kVERSION_SCRIPT = 282, + ADD_OP = 283, + MUL_OP = 284 + }; #endif /* Tokens. */ #define kADD_OP 258 @@ -104,13 +103,12 @@ extern int lddebug; #define ADD_OP 283 #define MUL_OP 284 - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE + +union YYSTYPE { -/* Line 2058 of yacc.c */ -#line 63 "ldscript.y" +#line 63 "/home/mark/src/elfutils/src/ldscript.y" /* yacc.c:1909 */ uintmax_t num; enum expression_tag op; @@ -125,29 +123,17 @@ typedef union YYSTYPE struct version *version; struct id_list *id_list; +#line 127 "ldscript.h" /* yacc.c:1909 */ +}; -/* Line 2058 of yacc.c */ -#line 131 "ldscript.h" -} YYSTYPE; +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE ldlval; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int ldparse (void *YYPARSE_PARAM); -#else -int ldparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int ldparse (void); -#else -int ldparse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_LD_LDSCRIPT_H_INCLUDED */ diff --git a/src/ldscript.y b/src/ldscript.y index ec58e21..3502ce1 100644 --- a/src/ldscript.y +++ b/src/ldscript.y @@ -735,7 +735,7 @@ add_id_list (const char *versionname, struct id_list *runp, _Bool local) if (defp != NULL && defp->u.s.local != local) error (EXIT_FAILURE, 0, versionname[0] == '\0' ? gettext ("\ -symbol '%s' is declared both local and global for unnamed version") +symbol '%s' is declared both local and global for unnamed version '%s'") : gettext ("\ symbol '%s' is declared both local and global for version '%s'"), runp->id, versionname); diff --git a/src/nm.c b/src/nm.c index 4f2e0e7..2911afa 100644 --- a/src/nm.c +++ b/src/nm.c @@ -1,5 +1,5 @@ /* Print symbol information from ELF file in human-readable form. - Copyright (C) 2000-2008, 2009, 2011, 2012, 2014 Red Hat, Inc. + Copyright (C) 2000-2008, 2009, 2011, 2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,7 @@ #include #include "../libebl/libeblP.h" +#include "../libdwfl/libdwflP.h" /* Name and version of program. */ @@ -132,13 +132,13 @@ static int handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, const char *suffix); /* Handle ELF file. */ -static int handle_elf (Elf *elf, const char *prefix, const char *fname, +static int handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, const char *suffix); #define INTERNAL_ERROR(fname) \ - error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s-%s): %s"), \ - fname, __LINE__, PACKAGE_VERSION, __DATE__, elf_errmsg (-1)) + error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"), \ + fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1)) /* Internal representation of symbols. */ @@ -217,9 +217,6 @@ main (int argc, char *argv[]) int remaining; int result = 0; - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); @@ -388,7 +385,7 @@ process_file (const char *fname, bool more_than_one) { if (elf_kind (elf) == ELF_K_ELF) { - int result = handle_elf (elf, more_than_one ? "" : NULL, + int result = handle_elf (fd, elf, more_than_one ? "" : NULL, fname, NULL); if (elf_end (elf) != 0) @@ -468,7 +465,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, { error (0, 0, gettext ("invalid offset %zu for symbol %s"), arsym->as_off, arsym->as_name); - continue; + break; } printf (gettext ("%s in %s\n"), arsym->as_name, arhdr->ar_name); @@ -493,10 +490,11 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, /* Skip over the index entries. */ if (strcmp (arhdr->ar_name, "/") != 0 - && strcmp (arhdr->ar_name, "//") != 0) + && strcmp (arhdr->ar_name, "//") != 0 + && strcmp (arhdr->ar_name, "/SYM64/") != 0) { if (elf_kind (subelf) == ELF_K_ELF) - result |= handle_elf (subelf, new_prefix, arhdr->ar_name, + result |= handle_elf (fd, subelf, new_prefix, arhdr->ar_name, new_suffix); else if (elf_kind (subelf) == ELF_K_AR) result |= handle_ar (fd, subelf, new_prefix, arhdr->ar_name, @@ -711,11 +709,16 @@ get_local_names (Dwarf *dbg) newp->lowpc = lowpc; newp->highpc = highpc; - /* Since we cannot deallocate individual memory we do not test - for duplicates in the tree. This should not happen anyway. */ - if (tsearch (newp, &local_root, local_compare) == NULL) - error (EXIT_FAILURE, errno, - gettext ("cannot create search tree")); + /* Check whether a similar local_name is already in the + cache. That should not happen. But if it does, we + don't want to leak memory. */ + struct local_name **tres = tsearch (newp, &local_root, + local_compare); + if (tres == NULL) + error (EXIT_FAILURE, errno, + gettext ("cannot create search tree")); + else if (*tres != newp) + free (newp); } while (dwarf_siblingof (die, die) == 0); } @@ -1151,8 +1154,63 @@ sort_by_name (const void *p1, const void *p2) return reverse_sort ? -result : result; } +/* Stub libdwfl callback, only the ELF handle already open is ever + used. Only used for finding the alternate debug file if the Dwarf + comes from the main file. We are not interested in separate + debuginfo. */ +static int +find_no_debuginfo (Dwfl_Module *mod, + void **userdata, + const char *modname, + Dwarf_Addr base, + const char *file_name, + const char *debuglink_file, + GElf_Word debuglink_crc, + char **debuginfo_file_name) +{ + Dwarf_Addr dwbias; + dwfl_module_info (mod, NULL, NULL, NULL, &dwbias, NULL, NULL, NULL); + + /* We are only interested if the Dwarf has been setup on the main + elf file but is only missing the alternate debug link. If dwbias + hasn't even been setup, this is searching for separate debuginfo + for the main elf. We don't care in that case. */ + if (dwbias == (Dwarf_Addr) -1) + return -1; + + return dwfl_standard_find_debuginfo (mod, userdata, modname, base, + file_name, debuglink_file, + debuglink_crc, debuginfo_file_name); +} + +/* Get the Dwarf for the module/file we want. */ +struct getdbg +{ + const char *name; + Dwarf **dbg; +}; + +static int +getdbg_dwflmod (Dwfl_Module *dwflmod, + void **userdata __attribute__ ((unused)), + const char *name, + Dwarf_Addr base __attribute__ ((unused)), + void *arg) +{ + struct getdbg *get = (struct getdbg *) arg; + if (get != NULL && get->name != NULL && strcmp (get->name, name) == 0) + { + Dwarf_Addr bias; + *get->dbg = dwfl_module_getdwarf (dwflmod, &bias); + return DWARF_CB_ABORT; + } + + return DWARF_CB_OK; +} + static void -show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, +show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr, + Elf_Scn *scn, Elf_Scn *xndxscn, GElf_Shdr *shdr, const char *prefix, const char *fname, const char *fullname) { @@ -1168,14 +1226,17 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, size_t entsize = shdr->sh_entsize; /* Consistency checks. */ - if (entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, ehdr->e_version)) + if (entsize == 0 + || entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT)) error (0, 0, - gettext ("%s: entry size in section `%s' is not what we expect"), - fullname, elf_strptr (ebl->elf, shstrndx, shdr->sh_name)); + gettext ("%s: entry size in section %zd `%s' is not what we expect"), + fullname, elf_ndxscn (scn), + elf_strptr (ebl->elf, shstrndx, shdr->sh_name)); else if (size % entsize != 0) error (0, 0, - gettext ("%s: size of section `%s' is not multiple of entry size"), - fullname, elf_strptr (ebl->elf, shstrndx, shdr->sh_name)); + gettext ("%s: size of section %zd `%s' is not multiple of entry size"), + fullname, elf_ndxscn (scn), + elf_strptr (ebl->elf, shstrndx, shdr->sh_name)); /* Compute number of entries. Handle buggy entsize values. */ size_t nentries = size / (entsize ?: 1); @@ -1189,9 +1250,48 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, /* Get a DWARF debugging descriptor. It's no problem if this isn't possible. We just won't print any line number information. */ Dwarf *dbg = NULL; + Dwfl *dwfl = NULL; if (format == format_sysv) { - dbg = dwarf_begin_elf (ebl->elf, DWARF_C_READ, NULL); + if (ehdr->e_type != ET_REL) + dbg = dwarf_begin_elf (ebl->elf, DWARF_C_READ, NULL); + else + { + /* Abuse libdwfl to do the relocations for us. This is just + for the ET_REL file containing Dwarf, so no need for + fancy lookups. */ + + /* Duplicate an fd for dwfl_report_offline to swallow. */ + int dwfl_fd = dup (fd); + if (likely (dwfl_fd >= 0)) + { + static const Dwfl_Callbacks callbacks = + { + .section_address = dwfl_offline_section_address, + .find_debuginfo = find_no_debuginfo + }; + dwfl = dwfl_begin (&callbacks); + if (likely (dwfl != NULL)) + { + /* Let 0 be the logical address of the file (or + first in archive). */ + dwfl->offline_next_address = 0; + if (dwfl_report_offline (dwfl, fname, fname, dwfl_fd) + == NULL) + { + /* Consumed on success, not on failure. */ + close (dwfl_fd); + } + else + { + dwfl_report_end (dwfl, NULL, NULL); + + struct getdbg get = { .name = fname, .dbg = &dbg }; + dwfl_getmodules (dwfl, &getdbg_dwflmod, &get, 0); + } + } + } + } if (dbg != NULL) { (void) dwarf_getpubnames (dbg, get_global, NULL, 0); @@ -1200,6 +1300,12 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, } } + /* Get the data of the section. */ + Elf_Data *data = elf_getdata (scn, NULL); + Elf_Data *xndxdata = elf_getdata (xndxscn, NULL); + if (data == NULL || (xndxscn != NULL && xndxdata == NULL)) + INTERNAL_ERROR (fullname); + /* Allocate the memory. XXX We can use a dirty trick here. Since GElf_Sym == Elf64_Sym we @@ -1211,12 +1317,6 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, else sym_mem = (GElf_SymX *) xmalloc (nentries * sizeof (GElf_SymX)); - /* Get the data of the section. */ - Elf_Data *data = elf_getdata (scn, NULL); - Elf_Data *xndxdata = elf_getdata (xndxscn, NULL); - if (data == NULL || (xndxscn != NULL && xndxdata == NULL)) - INTERNAL_ERROR (fullname); - /* Iterate over all symbols. */ #ifdef USE_DEMANGLE size_t demangle_buffer_len = 0; @@ -1297,11 +1397,10 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, /* We found the line. */ int lineno; (void) dwarf_lineno (line, &lineno); + const char *file = dwarf_linesrc (line, NULL, NULL); + file = (file != NULL) ? basename (file) : "???"; int n; - n = obstack_printf (&whereob, "%s:%d%c", - basename (dwarf_linesrc (line, - NULL, - NULL)), + n = obstack_printf (&whereob, "%s:%d%c", file, lineno, '\0'); sym_mem[nentries_used].where = obstack_finish (&whereob); @@ -1384,7 +1483,7 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, } /* Free all memory. */ - if (nentries * sizeof (GElf_Sym) >= MAX_STACK_ALLOC) + if (nentries * sizeof (sym_mem[0]) >= MAX_STACK_ALLOC) free (sym_mem); obstack_free (&whereob, NULL); @@ -1397,13 +1496,16 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, tdestroy (local_root, free); local_root = NULL; - (void) dwarf_end (dbg); + if (dwfl == NULL) + (void) dwarf_end (dbg); } + if (dwfl != NULL) + dwfl_end (dwfl); } static int -handle_elf (Elf *elf, const char *prefix, const char *fname, +handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, const char *suffix) { size_t prefix_len = prefix == NULL ? 0 : strlen (prefix); @@ -1482,7 +1584,7 @@ handle_elf (Elf *elf, const char *prefix, const char *fname, } } - show_symbols (ebl, ehdr, scn, xndxscn, shdr, prefix, fname, + show_symbols (fd, ebl, ehdr, scn, xndxscn, shdr, prefix, fname, fullname); } } diff --git a/src/objdump.c b/src/objdump.c index ebad25d..0aa41e8 100644 --- a/src/objdump.c +++ b/src/objdump.c @@ -1,5 +1,5 @@ /* Print information from ELF file in human-readable form. - Copyright (C) 2005, 2006, 2007, 2009, 2011, 2012 Red Hat, Inc. + Copyright (C) 2005, 2006, 2007, 2009, 2011, 2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -101,8 +100,8 @@ static int handle_elf (Elf *elf, const char *prefix, const char *fname, #define INTERNAL_ERROR(fname) \ - error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s-%s): %s"), \ - fname, __LINE__, PACKAGE_VERSION, __DATE__, elf_errmsg (-1)) + error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"), \ + fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1)) /* List of sections which should be used. */ @@ -131,9 +130,6 @@ static bool print_disasm; int main (int argc, char *argv[]) { - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); @@ -389,7 +385,7 @@ show_relocs_x (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *symdata, ? xndx : sym->st_shndx), &destshdr_mem); - if (shdr == NULL) + if (shdr == NULL || destshdr == NULL) printf ("<%s %ld>", gettext ("INVALID SECTION"), (long int) (sym->st_shndx == SHN_XINDEX @@ -418,7 +414,8 @@ show_relocs_rel (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, Elf_Data *symdata, Elf_Data *xndxdata, size_t symstrndx, size_t shstrndx) { - int nentries = shdr->sh_size / shdr->sh_entsize; + size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT); + int nentries = shdr->sh_size / sh_entsize; for (int cnt = 0; cnt < nentries; ++cnt) { @@ -438,7 +435,8 @@ show_relocs_rela (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, Elf_Data *symdata, Elf_Data *xndxdata, size_t symstrndx, size_t shstrndx) { - int nentries = shdr->sh_size / shdr->sh_entsize; + size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT); + int nentries = shdr->sh_size / sh_entsize; for (int cnt = 0; cnt < nentries; ++cnt) { @@ -460,13 +458,13 @@ section_match (Elf *elf, uint32_t scnndx, GElf_Shdr *shdr, size_t shstrndx) return true; struct section_list *runp = section_list; + const char *name = elf_strptr (elf, shstrndx, shdr->sh_name); do { if (runp->is_name) { - if (strcmp (runp->name, - elf_strptr (elf, shstrndx, shdr->sh_name)) == 0) + if (name && strcmp (runp->name, name) == 0) return true; } else @@ -506,6 +504,8 @@ show_relocs (Ebl *ebl, const char *fname, uint32_t shstrndx) GElf_Shdr *destshdr = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_info), &destshdr_mem); + if (unlikely (destshdr == NULL)) + continue; printf (gettext ("\nRELOCATION RECORDS FOR [%s]:\n" "%-*s TYPE VALUE\n"), @@ -522,6 +522,8 @@ show_relocs (Ebl *ebl, const char *fname, uint32_t shstrndx) GElf_Shdr symshdr_mem; GElf_Shdr *symshdr = gelf_getshdr (symscn, &symshdr_mem); Elf_Data *symdata = elf_getdata (symscn, NULL); + if (unlikely (symshdr == NULL || symdata == NULL)) + continue; /* Search for the optional extended section index table. */ Elf_Data *xndxdata = NULL; diff --git a/src/ranlib.c b/src/ranlib.c index 8435fc1..c93c5ac 100644 --- a/src/ranlib.c +++ b/src/ranlib.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -78,9 +77,6 @@ static const struct argp argp = int main (int argc, char *argv[]) { - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); diff --git a/src/readelf.c b/src/readelf.c index 6bbe436..0db192e 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -1,5 +1,5 @@ /* Print information from ELF file in human-readable form. - Copyright (C) 1999-2014 Red Hat, Inc. + Copyright (C) 1999-2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1999. @@ -48,6 +48,7 @@ #include "../libelf/libelfP.h" #include "../libelf/common.h" #include "../libebl/libeblP.h" +#include "../libdwelf/libdwelf.h" #include "../libdw/libdwP.h" #include "../libdwfl/libdwflP.h" #include "../libdw/memory-access.h" @@ -112,6 +113,8 @@ static const struct argp_option options[] = N_("Display just offsets instead of resolving values to addresses in DWARF data"), 0 }, { "wide", 'W', NULL, 0, N_("Ignored for compatibility (lines always wide)"), 0 }, + { "decompress", 'z', NULL, 0, + N_("Show compression information for compressed sections (when used with -S); decompress section before dumping data (when used with -p or -x)"), 0 }, { NULL, 0, NULL, 0, NULL, 0 } }; @@ -190,6 +193,9 @@ static bool decodedaranges = false; /* True if we should print the .debug_aranges section using libdw. */ static bool decodedline = false; +/* True if we want to show more information about compressed sections. */ +static bool print_decompress = false; + /* Select printing of debugging sections. */ static enum section_e { @@ -479,6 +485,9 @@ parse_opt (int key, char *arg, break; case 'W': /* Ignored. */ break; + case 'z': + print_decompress = true; + break; case ELF_INPUT_SECTION: if (arg == NULL) elf_input_section = ".gnu_debugdata"; @@ -764,8 +773,8 @@ process_file (int fd, const char *fname, bool only_one) dwfl->offline_next_address = 0; if (dwfl_report_offline (dwfl, fname, fname, dwfl_fd) == NULL) { - struct stat64 st; - if (fstat64 (dwfl_fd, &st) != 0) + struct stat st; + if (fstat (dwfl_fd, &st) != 0) error (0, errno, gettext ("cannot stat input file")); else if (unlikely (st.st_size == 0)) error (0, 0, gettext ("input file is empty")); @@ -797,6 +806,20 @@ process_file (int fd, const char *fname, bool only_one) close (fd); } +/* Check whether there are any compressed sections in the ELF file. */ +static bool +elf_contains_chdrs (Elf *elf) +{ + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr != NULL && (shdr->sh_flags & SHF_COMPRESSED) != 0) + return true; + } + return false; +} /* Process one ELF file. */ static void @@ -835,20 +858,24 @@ process_elf_file (Dwfl_Module *dwflmod, int fd) gettext ("cannot determine number of program headers: %s"), elf_errmsg (-1)); - /* For an ET_REL file, libdwfl has adjusted the in-core shdrs - and may have applied relocation to some sections. - So we need to get a fresh Elf handle on the file to display those. */ - bool print_unrelocated = (print_section_header - || print_relocations - || dump_data_sections != NULL - || print_notes); + /* For an ET_REL file, libdwfl has adjusted the in-core shdrs and + may have applied relocation to some sections. If there are any + compressed sections, any pass (or libdw/libdwfl) might have + uncompressed them. So we need to get a fresh Elf handle on the + file to display those. */ + bool print_unchanged = ((print_section_header + || print_relocations + || dump_data_sections != NULL + || print_notes) + && (ehdr->e_type == ET_REL + || elf_contains_chdrs (ebl->elf))); Elf *pure_elf = NULL; Ebl *pure_ebl = ebl; - if (ehdr->e_type == ET_REL && print_unrelocated) + if (print_unchanged) { /* Read the file afresh. */ - off64_t aroff = elf_getaroff (elf); + off_t aroff = elf_getaroff (elf); pure_elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); if (aroff > 0) { @@ -1065,6 +1092,17 @@ get_visibility_type (int value) } } +static const char * +elf_ch_type_name (unsigned int code) +{ + if (code == 0) + return "NONE"; + + if (code == ELFCOMPRESS_ZLIB) + return "ZLIB"; + + return "UNKNOWN"; +} /* Print the section headers. */ static void @@ -1091,6 +1129,14 @@ There are %d section headers, starting at offset %#" PRIx64 ":\n\ else puts (gettext ("[Nr] Name Type Addr Off Size ES Flags Lk Inf Al")); + if (print_decompress) + { + if (ehdr->e_ident[EI_CLASS] == ELFCLASS32) + puts (gettext (" [Compression Size Al]")); + else + puts (gettext (" [Compression Size Al]")); + } + for (cnt = 0; cnt < shnum; ++cnt) { Elf_Scn *scn = elf_getscn (ebl->elf, cnt); @@ -1128,25 +1174,57 @@ There are %d section headers, starting at offset %#" PRIx64 ":\n\ *cp++ = 'G'; if (shdr->sh_flags & SHF_TLS) *cp++ = 'T'; + if (shdr->sh_flags & SHF_COMPRESSED) + *cp++ = 'C'; if (shdr->sh_flags & SHF_ORDERED) *cp++ = 'O'; if (shdr->sh_flags & SHF_EXCLUDE) *cp++ = 'E'; *cp = '\0'; + const char *sname; char buf[128]; + sname = elf_strptr (ebl->elf, shstrndx, shdr->sh_name) ?: ""; printf ("[%2zu] %-20s %-12s %0*" PRIx64 " %0*" PRIx64 " %0*" PRIx64 " %2" PRId64 " %-5s %2" PRId32 " %3" PRId32 " %2" PRId64 "\n", - cnt, - elf_strptr (ebl->elf, shstrndx, shdr->sh_name) - ?: "", + cnt, sname, ebl_section_type_name (ebl, shdr->sh_type, buf, sizeof (buf)), ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 8 : 16, shdr->sh_addr, ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, shdr->sh_offset, ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, shdr->sh_size, shdr->sh_entsize, flagbuf, shdr->sh_link, shdr->sh_info, shdr->sh_addralign); + + if (print_decompress) + { + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + GElf_Chdr chdr; + if (gelf_getchdr (scn, &chdr) != NULL) + printf (" [ELF %s (%" PRId32 ") %0*" PRIx64 + " %2" PRId64 "]\n", + elf_ch_type_name (chdr.ch_type), + chdr.ch_type, + ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, + chdr.ch_size, chdr.ch_addralign); + else + error (0, 0, + gettext ("bad compression header for section %zd: %s"), + elf_ndxscn (scn), elf_errmsg (-1)); + } + else if (strncmp(".zdebug", sname, strlen (".zdebug")) == 0) + { + ssize_t size; + if ((size = dwelf_scn_gnu_compressed_size (scn)) >= 0) + printf (" [GNU ZLIB %0*zx ]\n", + ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, size); + else + error (0, 0, + gettext ("bad gnu compressed size for section %zd: %s"), + elf_ndxscn (scn), elf_errmsg (-1)); + } + } } fputc_unlocked ('\n', stdout); @@ -1157,7 +1235,7 @@ There are %d section headers, starting at offset %#" PRIx64 ":\n\ static void print_phdr (Ebl *ebl, GElf_Ehdr *ehdr) { - if (ehdr->e_phnum == 0) + if (phnum == 0) /* No program header, this is OK in relocatable objects. */ return; @@ -1315,10 +1393,10 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr) { /* Determine the segment this section is part of. */ size_t cnt2; + GElf_Phdr phdr2_mem; GElf_Phdr *phdr2 = NULL; for (cnt2 = 0; cnt2 < phnum; ++cnt2) { - GElf_Phdr phdr2_mem; phdr2 = gelf_getphdr (ebl->elf, cnt2, &phdr2_mem); if (phdr2 != NULL && phdr2->p_type == PT_LOAD @@ -1443,7 +1521,17 @@ print_scngrp (Ebl *ebl) GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); if (shdr != NULL && shdr->sh_type == SHT_GROUP) - handle_scngrp (ebl, scn, shdr); + { + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (elf_compress (scn, 0, 0) < 0) + printf ("WARNING: %s [%zd]\n", + gettext ("Couldn't uncompress section"), + elf_ndxscn (scn)); + shdr = gelf_getshdr (scn, &shdr_mem); + } + handle_scngrp (ebl, scn, shdr); + } } } @@ -1582,7 +1670,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); if (glink == NULL) - error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), + error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); printf (ngettext ("\ @@ -1894,12 +1982,15 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name)); else { - destshdr = gelf_getshdr (elf_getscn (ebl->elf, - sym->st_shndx == SHN_XINDEX - ? xndx : sym->st_shndx), - &destshdr_mem); - - if (unlikely (destshdr == NULL)) + /* This is a relocation against a STT_SECTION symbol. */ + GElf_Shdr secshdr_mem; + GElf_Shdr *secshdr; + secshdr = gelf_getshdr (elf_getscn (ebl->elf, + sym->st_shndx == SHN_XINDEX + ? xndx : sym->st_shndx), + &secshdr_mem); + + if (unlikely (secshdr == NULL)) printf (" %#0*" PRIx64 " %-20s <%s %ld>\n", class == ELFCLASS32 ? 10 : 18, rel->r_offset, ebl_reloc_type_check (ebl, GELF_R_TYPE (rel->r_info)) @@ -1921,7 +2012,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) buf, sizeof (buf)) + 2 : gettext (""), class == ELFCLASS32 ? 10 : 18, sym->st_value, - elf_strptr (ebl->elf, shstrndx, destshdr->sh_name)); + elf_strptr (ebl->elf, shstrndx, secshdr->sh_name)); } } } @@ -2085,12 +2176,15 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name)); else { - destshdr = gelf_getshdr (elf_getscn (ebl->elf, - sym->st_shndx == SHN_XINDEX - ? xndx : sym->st_shndx), - &destshdr_mem); - - if (unlikely (shdr == NULL)) + /* This is a relocation against a STT_SECTION symbol. */ + GElf_Shdr secshdr_mem; + GElf_Shdr *secshdr; + secshdr = gelf_getshdr (elf_getscn (ebl->elf, + sym->st_shndx == SHN_XINDEX + ? xndx : sym->st_shndx), + &secshdr_mem); + + if (unlikely (secshdr == NULL)) printf (" %#0*" PRIx64 " %-15s <%s %ld>\n", class == ELFCLASS32 ? 10 : 18, rel->r_offset, ebl_reloc_type_check (ebl, GELF_R_TYPE (rel->r_info)) @@ -2114,7 +2208,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) : gettext (""), class == ELFCLASS32 ? 10 : 18, sym->st_value, rel->r_addend, - elf_strptr (ebl->elf, shstrndx, destshdr->sh_name)); + elf_strptr (ebl->elf, shstrndx, secshdr->sh_name)); } } } @@ -2136,7 +2230,17 @@ print_symtab (Ebl *ebl, int type) GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); if (shdr != NULL && shdr->sh_type == (GElf_Word) type) - handle_symtab (ebl, scn, shdr); + { + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (elf_compress (scn, 0, 0) < 0) + printf ("WARNING: %s [%zd]\n", + gettext ("Couldn't uncompress section"), + elf_ndxscn (scn)); + shdr = gelf_getshdr (scn, &shdr_mem); + } + handle_symtab (ebl, scn, shdr); + } } } @@ -2199,7 +2303,7 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); if (glink == NULL) - error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), + error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); /* Now we can compute the number of entries in the section. */ @@ -2457,7 +2561,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); if (glink == NULL) - error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), + error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); printf (ngettext ("\ @@ -2500,10 +2604,16 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) get_ver_flags (aux->vna_flags), (unsigned short int) aux->vna_other); + if (aux->vna_next == 0) + break; + auxoffset += aux->vna_next; } /* Find the next offset. */ + if (need->vn_next == 0) + break; + offset += need->vn_next; } } @@ -2527,7 +2637,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); if (glink == NULL) - error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), + error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); int class = gelf_getclass (ebl->elf); @@ -2578,10 +2688,15 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) auxoffset, cnt2, elf_strptr (ebl->elf, shdr->sh_link, aux->vda_name)); + if (aux->vda_next == 0) + break; + auxoffset += aux->vda_next; } /* Find the next offset. */ + if (def->vd_next == 0) + break; offset += def->vd_next; } } @@ -2660,6 +2775,8 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) nvername = MAX (nvername, (size_t) (def->vd_ndx & 0x7fff)); + if (def->vd_next == 0) + break; offset += def->vd_next; } } @@ -2704,9 +2821,13 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) nvername = MAX (nvername, (size_t) (aux->vna_other & 0x7fff)); + if (aux->vna_next == 0) + break; auxoffset += aux->vna_next; } + if (need->vn_next == 0) + break; offset += need->vn_next; } } @@ -2716,7 +2837,9 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) /* Allocate the array. */ vername = (const char **) alloca (nvername * sizeof (const char *)); + memset(vername, 0, nvername * sizeof (const char *)); filename = (const char **) alloca (nvername * sizeof (const char *)); + memset(filename, 0, nvername * sizeof (const char *)); /* Run through the data structures again and collect the strings. */ if (defscn != NULL) @@ -2742,17 +2865,22 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) /* Get the data at the next offset. */ GElf_Verdef defmem; GElf_Verdef *def = gelf_getverdef (defdata, offset, &defmem); + if (unlikely (def == NULL)) + break; + GElf_Verdaux auxmem; GElf_Verdaux *aux = gelf_getverdaux (defdata, offset + def->vd_aux, &auxmem); - if (unlikely (def == NULL || aux == NULL)) + if (unlikely (aux == NULL)) break; vername[def->vd_ndx & 0x7fff] = elf_strptr (ebl->elf, defshdr->sh_link, aux->vda_name); filename[def->vd_ndx & 0x7fff] = NULL; + if (def->vd_next == 0) + break; offset += def->vd_next; } } @@ -2790,9 +2918,13 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) filename[aux->vna_other & 0x7fff] = elf_strptr (ebl->elf, needshdr->sh_link, need->vn_file); + if (aux->vna_next == 0) + break; auxoffset += aux->vna_next; } + if (need->vn_next == 0) + break; offset += need->vn_next; } } @@ -2809,7 +2941,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) &glink_mem); size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_HALF, 1, EV_CURRENT); if (glink == NULL) - error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), + error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); /* Print the header. */ @@ -2853,10 +2985,11 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) default: n = printf ("%4d%c%s", *sym & 0x7fff, *sym & 0x8000 ? 'h' : ' ', - (unsigned int) (*sym & 0x7fff) < nvername + (vername != NULL + && (unsigned int) (*sym & 0x7fff) < nvername) ? vername[*sym & 0x7fff] : "???"); if ((unsigned int) (*sym & 0x7fff) < nvername - && filename[*sym & 0x7fff] != NULL) + && filename != NULL && filename[*sym & 0x7fff] != NULL) n += printf ("(%s)", filename[*sym & 0x7fff]); printf ("%*s", MAX (0, 33 - (int) n), " "); break; @@ -2882,7 +3015,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx, &glink_mem); if (glink == NULL) { - error (0, 0, gettext ("invalid sh_link value in section %Zu"), + error (0, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); return; } @@ -2954,8 +3087,21 @@ handle_sysv_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) return; } + if (unlikely (data->d_size < 2 * sizeof (Elf32_Word))) + { + invalid_data: + error (0, 0, gettext ("invalid data in sysv.hash section %d"), + (int) elf_ndxscn (scn)); + return; + } + Elf32_Word nbucket = ((Elf32_Word *) data->d_buf)[0]; Elf32_Word nchain = ((Elf32_Word *) data->d_buf)[1]; + + uint64_t used_buf = (2ULL + nchain + nbucket) * sizeof (Elf32_Word); + if (used_buf > data->d_size) + goto invalid_data; + Elf32_Word *bucket = &((Elf32_Word *) data->d_buf)[2]; Elf32_Word *chain = &((Elf32_Word *) data->d_buf)[2 + nbucket]; @@ -2996,8 +3142,23 @@ handle_sysv_hash64 (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) return; } + if (unlikely (data->d_size < 2 * sizeof (Elf64_Xword))) + { + invalid_data: + error (0, 0, gettext ("invalid data in sysv.hash64 section %d"), + (int) elf_ndxscn (scn)); + return; + } + Elf64_Xword nbucket = ((Elf64_Xword *) data->d_buf)[0]; Elf64_Xword nchain = ((Elf64_Xword *) data->d_buf)[1]; + + uint64_t maxwords = data->d_size / sizeof (Elf64_Xword); + if (maxwords < 2 + || maxwords - 2 < nbucket + || maxwords - 2 - nbucket < nchain) + goto invalid_data; + Elf64_Xword *bucket = &((Elf64_Xword *) data->d_buf)[2]; Elf64_Xword *chain = &((Elf64_Xword *) data->d_buf)[2 + nbucket]; @@ -3029,6 +3190,7 @@ handle_sysv_hash64 (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) static void handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) { + uint32_t *lengths = NULL; Elf_Data *data = elf_getdata (scn, NULL); if (unlikely (data == NULL)) { @@ -3037,19 +3199,39 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) return; } + if (unlikely (data->d_size < 4 * sizeof (Elf32_Word))) + { + invalid_data: + free (lengths); + error (0, 0, gettext ("invalid data in gnu.hash section %d"), + (int) elf_ndxscn (scn)); + return; + } + Elf32_Word nbucket = ((Elf32_Word *) data->d_buf)[0]; Elf32_Word symbias = ((Elf32_Word *) data->d_buf)[1]; /* Next comes the size of the bitmap. It's measured in words for the architecture. It's 32 bits for 32 bit archs, and 64 bits for - 64 bit archs. */ + 64 bit archs. There is always a bloom filter present, so zero is + an invalid value. */ Elf32_Word bitmask_words = ((Elf32_Word *) data->d_buf)[2]; if (gelf_getclass (ebl->elf) == ELFCLASS64) bitmask_words *= 2; + if (bitmask_words == 0) + goto invalid_data; + Elf32_Word shift = ((Elf32_Word *) data->d_buf)[3]; - uint32_t *lengths = (uint32_t *) xcalloc (nbucket, sizeof (uint32_t)); + /* Is there still room for the sym chain? + Use uint64_t calculation to prevent 32bit overlow. */ + uint64_t used_buf = (4ULL + bitmask_words + nbucket) * sizeof (Elf32_Word); + uint32_t max_nsyms = (data->d_size - used_buf) / sizeof (Elf32_Word); + if (used_buf > data->d_size) + goto invalid_data; + + lengths = (uint32_t *) xcalloc (nbucket, sizeof (uint32_t)); Elf32_Word *bitmask = &((Elf32_Word *) data->d_buf)[4]; Elf32_Word *bucket = &((Elf32_Word *) data->d_buf)[4 + bitmask_words]; @@ -3068,6 +3250,8 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) ++nsyms; if (maxlength < ++lengths[cnt]) ++maxlength; + if (inner > max_nsyms) + goto invalid_data; } while ((chain[inner++] & 1) == 0); } @@ -3125,6 +3309,16 @@ handle_hash (Ebl *ebl) if (likely (shdr != NULL)) { + if ((shdr->sh_type == SHT_HASH || shdr->sh_type == SHT_GNU_HASH) + && (shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (elf_compress (scn, 0, 0) < 0) + printf ("WARNING: %s [%zd]\n", + gettext ("Couldn't uncompress section"), + elf_ndxscn (scn)); + shdr = gelf_getshdr (scn, &shdr_mem); + } + if (shdr->sh_type == SHT_HASH) { if (ebl_sysvhash_entrysize (ebl) == sizeof (Elf64_Xword)) @@ -3233,11 +3427,12 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) shdr->sh_size, shdr->sh_offset); Elf_Data *data = elf_rawdata (scn, NULL); - if (data == NULL) + if (unlikely (data == NULL || data->d_size == 0)) return; const unsigned char *p = data->d_buf; + /* There is only one 'version', A. */ if (unlikely (*p++ != 'A')) return; @@ -3248,8 +3443,10 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) return (const unsigned char *) data->d_buf + data->d_size - p; } + /* Loop over the sections. */ while (left () >= 4) { + /* Section length. */ uint32_t len; memcpy (&len, p, sizeof len); @@ -3259,25 +3456,29 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) if (unlikely (len > left ())) break; + /* Section vendor name. */ const unsigned char *name = p + sizeof len; p += len; unsigned const char *q = memchr (name, '\0', len); if (unlikely (q == NULL)) - continue; + break; ++q; printf (gettext (" %-13s %4" PRIu32 "\n"), name, len); + bool gnu_vendor = (q - name == sizeof "gnu" + && !memcmp (name, "gnu", sizeof "gnu")); + + /* Loop over subsections. */ if (shdr->sh_type != SHT_GNU_ATTRIBUTES - || (q - name == sizeof "gnu" - && !memcmp (name, "gnu", sizeof "gnu"))) + || gnu_vendor) while (q < p) { const unsigned char *const sub = q; unsigned int subsection_tag; - get_uleb128 (subsection_tag, q); + get_uleb128 (subsection_tag, q, p); if (unlikely (q >= p)) break; @@ -3290,7 +3491,10 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) if (MY_ELFDATA != ehdr->e_ident[EI_DATA]) CONVERT (subsection_len); - if (unlikely (p - sub < (ptrdiff_t) subsection_len)) + /* Don't overflow, ptrdiff_t might be 32bits, but signed. */ + if (unlikely (subsection_len == 0 + || subsection_len >= (uint32_t) PTRDIFF_MAX + || p - sub < (ptrdiff_t) subsection_len)) break; const unsigned char *r = q + sizeof subsection_len; @@ -3299,6 +3503,7 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) switch (subsection_tag) { default: + /* Unknown subsection, print and skip. */ printf (gettext (" %-4u %12" PRIu32 "\n"), subsection_tag, subsection_len); break; @@ -3310,20 +3515,34 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) while (r < q) { unsigned int tag; - get_uleb128 (tag, r); + get_uleb128 (tag, r, q); if (unlikely (r >= q)) break; + /* GNU style tags have either a uleb128 value, + when lowest bit is not set, or a string + when the lowest bit is set. + "compatibility" (32) is special. It has + both a string and a uleb128 value. For + non-gnu we assume 6 till 31 only take ints. + XXX see arm backend, do we need a separate + hook? */ uint64_t value = 0; const char *string = NULL; - if (tag == 32 || (tag & 1) == 0) + if (tag == 32 || (tag & 1) == 0 + || (! gnu_vendor && (tag > 5 && tag < 32))) { - get_uleb128 (value, r); + get_uleb128 (value, r, q); if (r > q) break; } - if (tag == 32 || (tag & 1) != 0) + if (tag == 32 + || ((tag & 1) != 0 + && (gnu_vendor + || (! gnu_vendor && tag > 32))) + || (! gnu_vendor && tag > 3 && tag < 6)) { + string = (const char *) r; r = memchr (r, '\0', q - r); if (r == NULL) break; @@ -3350,7 +3569,10 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) } else { - assert (tag != 32); + /* For "gnu" vendor 32 "compatibility" has + already been handled above. */ + assert (tag != 32 + || strcmp ((const char *) name, "gnu")); if (string == NULL) printf (gettext (" %u: %" PRId64 "\n"), tag, value); @@ -3454,9 +3676,9 @@ dwarf_tag_string (unsigned int tag) { switch (tag) { -#define ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME; - ALL_KNOWN_DW_TAG -#undef ONE_KNOWN_DW_TAG +#define DWARF_ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_TAG +#undef DWARF_ONE_KNOWN_DW_TAG default: return NULL; } @@ -3468,9 +3690,9 @@ dwarf_attr_string (unsigned int attrnum) { switch (attrnum) { -#define ONE_KNOWN_DW_AT(NAME, CODE) case CODE: return #NAME; - ALL_KNOWN_DW_AT -#undef ONE_KNOWN_DW_AT +#define DWARF_ONE_KNOWN_DW_AT(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_AT +#undef DWARF_ONE_KNOWN_DW_AT default: return NULL; } @@ -3482,11 +3704,9 @@ dwarf_form_string (unsigned int form) { switch (form) { -#define ONE_KNOWN_DW_FORM_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_FORM (NAME, CODE) -#define ONE_KNOWN_DW_FORM(NAME, CODE) case CODE: return #NAME; - ALL_KNOWN_DW_FORM -#undef ONE_KNOWN_DW_FORM -#undef ONE_KNOWN_DW_FORM_DESC +#define DWARF_ONE_KNOWN_DW_FORM(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_FORM +#undef DWARF_ONE_KNOWN_DW_FORM default: return NULL; } @@ -3498,9 +3718,9 @@ dwarf_lang_string (unsigned int lang) { switch (lang) { -#define ONE_KNOWN_DW_LANG_DESC(NAME, CODE, DESC) case CODE: return #NAME; - ALL_KNOWN_DW_LANG -#undef ONE_KNOWN_DW_LANG_DESC +#define DWARF_ONE_KNOWN_DW_LANG(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_LANG +#undef DWARF_ONE_KNOWN_DW_LANG default: return NULL; } @@ -3512,9 +3732,9 @@ dwarf_inline_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_INL(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_INL -#undef ONE_KNOWN_DW_INL +#define DWARF_ONE_KNOWN_DW_INL(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_INL +#undef DWARF_ONE_KNOWN_DW_INL }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3529,9 +3749,9 @@ dwarf_encoding_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ATE -#undef ONE_KNOWN_DW_ATE +#define DWARF_ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ATE +#undef DWARF_ONE_KNOWN_DW_ATE }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3546,9 +3766,9 @@ dwarf_access_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ACCESS(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ACCESS -#undef ONE_KNOWN_DW_ACCESS +#define DWARF_ONE_KNOWN_DW_ACCESS(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ACCESS +#undef DWARF_ONE_KNOWN_DW_ACCESS }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3563,9 +3783,9 @@ dwarf_visibility_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_VIS(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_VIS -#undef ONE_KNOWN_DW_VIS +#define DWARF_ONE_KNOWN_DW_VIS(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_VIS +#undef DWARF_ONE_KNOWN_DW_VIS }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3580,9 +3800,9 @@ dwarf_virtuality_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_VIRTUALITY(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_VIRTUALITY -#undef ONE_KNOWN_DW_VIRTUALITY +#define DWARF_ONE_KNOWN_DW_VIRTUALITY(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_VIRTUALITY +#undef DWARF_ONE_KNOWN_DW_VIRTUALITY }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3597,9 +3817,9 @@ dwarf_identifier_case_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ID(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ID -#undef ONE_KNOWN_DW_ID +#define DWARF_ONE_KNOWN_DW_ID(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ID +#undef DWARF_ONE_KNOWN_DW_ID }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3614,9 +3834,9 @@ dwarf_calling_convention_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_CC(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_CC -#undef ONE_KNOWN_DW_CC +#define DWARF_ONE_KNOWN_DW_CC(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_CC +#undef DWARF_ONE_KNOWN_DW_CC }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3631,9 +3851,9 @@ dwarf_ordering_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ORD(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ORD -#undef ONE_KNOWN_DW_ORD +#define DWARF_ONE_KNOWN_DW_ORD(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ORD +#undef DWARF_ONE_KNOWN_DW_ORD }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3648,9 +3868,9 @@ dwarf_discr_list_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_DSC(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_DSC -#undef ONE_KNOWN_DW_DSC +#define DWARF_ONE_KNOWN_DW_DSC(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_DSC +#undef DWARF_ONE_KNOWN_DW_DSC }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3668,11 +3888,9 @@ dwarf_locexpr_opcode_string (unsigned int code) /* Normally we can't affort building huge table of 64K entries, most of them zero, just because there are a couple defined values at the far end. In case of opcodes, it's OK. */ -#define ONE_KNOWN_DW_OP_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_OP (NAME, CODE) -#define ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP_DESC +#define DWARF_ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_OP +#undef DWARF_ONE_KNOWN_DW_OP }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -3869,11 +4087,10 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, NEED (addrsize); if (addrsize == 4) addr = read_4ubyte_unaligned (dbg, data); + else if (addrsize == 8) + addr = read_8ubyte_unaligned (dbg, data); else - { - assert (addrsize == 8); - addr = read_8ubyte_unaligned (dbg, data); - } + goto invalid; data += addrsize; CONSUME (addrsize); @@ -3887,14 +4104,13 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_call_ref: /* Offset operand. */ + if (ref_size != 4 && ref_size != 8) + goto invalid; /* Cannot be used in CFA. */ NEED (ref_size); if (ref_size == 4) addr = read_4ubyte_unaligned (dbg, data); else - { - assert (ref_size == 8); - addr = read_8ubyte_unaligned (dbg, data); - } + addr = read_8ubyte_unaligned (dbg, data); data += ref_size; CONSUME (ref_size); @@ -4002,7 +4218,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, const unsigned char *start = data; uint64_t uleb; NEED (1); - get_uleb128 (uleb, data); /* XXX check overrun */ + get_uleb128 (uleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 "\n", indent, "", (uintmax_t) offset, op_name, uleb); CONSUME (data - start); @@ -4012,9 +4228,10 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_bit_piece: start = data; uint64_t uleb2; - NEED (2); - get_uleb128 (uleb, data); /* XXX check overrun */ - get_uleb128 (uleb2, data); /* XXX check overrun */ + NEED (1); + get_uleb128 (uleb, data, data + len); + NEED (1); + get_uleb128 (uleb2, data, data + len); printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 ", %" PRIu64 "\n", indent, "", (uintmax_t) offset, op_name, uleb, uleb2); CONSUME (data - start); @@ -4027,7 +4244,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, start = data; int64_t sleb; NEED (1); - get_sleb128 (sleb, data); /* XXX check overrun */ + get_sleb128 (sleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s %" PRId64 "\n", indent, "", (uintmax_t) offset, op_name, sleb); CONSUME (data - start); @@ -4036,9 +4253,10 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_bregx: start = data; - NEED (2); - get_uleb128 (uleb, data); /* XXX check overrun */ - get_sleb128 (sleb, data); /* XXX check overrun */ + NEED (1); + get_uleb128 (uleb, data, data + len); + NEED (1); + get_sleb128 (sleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 " %" PRId64 "\n", indent, "", (uintmax_t) offset, op_name, uleb, sleb); CONSUME (data - start); @@ -4077,7 +4295,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_implicit_value: start = data; NEED (1); - get_uleb128 (uleb, data); /* XXX check overrun */ + get_uleb128 (uleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s: ", indent, "", (uintmax_t) offset, op_name); NEED (uleb); @@ -4090,17 +4308,17 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_GNU_implicit_pointer: /* DIE offset operand. */ start = data; - NEED (ref_size + 1); + NEED (ref_size); + if (ref_size != 4 && ref_size != 8) + goto invalid; /* Cannot be used in CFA. */ if (ref_size == 4) addr = read_4ubyte_unaligned (dbg, data); else - { - assert (ref_size == 8); - addr = read_8ubyte_unaligned (dbg, data); - } + addr = read_8ubyte_unaligned (dbg, data); data += ref_size; /* Byte offset operand. */ - get_sleb128 (sleb, data); /* XXX check overrun */ + NEED (1); + get_sleb128 (sleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "] %+" PRId64 "\n", indent, "", (intmax_t) offset, @@ -4113,7 +4331,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, /* Size plus expression block. */ start = data; NEED (1); - get_uleb128 (uleb, data); /* XXX check overrun */ + get_uleb128 (uleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s:\n", indent, "", (uintmax_t) offset, op_name); NEED (uleb); @@ -4128,10 +4346,11 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, /* uleb128 CU relative DW_TAG_base_type DIE offset, 1-byte unsigned size plus block. */ start = data; - NEED (2); - get_uleb128 (uleb, data); /* XXX check overrun */ + NEED (1); + get_uleb128 (uleb, data, data + len); if (! print_unresolved_addresses && cu != NULL) uleb += cu->start; + NEED (1); uint8_t usize = *(uint8_t *) data++; NEED (usize); printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "] ", @@ -4146,9 +4365,10 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, /* uleb128 register number, uleb128 CU relative DW_TAG_base_type DIE offset. */ start = data; - NEED (2); - get_uleb128 (uleb, data); /* XXX check overrun */ - get_uleb128 (uleb2, data); /* XXX check overrun */ + NEED (1); + get_uleb128 (uleb, data, data + len); + NEED (1); + get_uleb128 (uleb2, data, data + len); if (! print_unresolved_addresses && cu != NULL) uleb2 += cu->start; printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 " [%6" PRIx64 "]\n", @@ -4161,9 +4381,10 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, /* 1-byte unsigned size of value, uleb128 CU relative DW_TAG_base_type DIE offset. */ start = data; - NEED (2); + NEED (1); usize = *(uint8_t *) data++; - get_uleb128 (uleb, data); /* XXX check overrun */ + NEED (1); + get_uleb128 (uleb, data, data + len); if (! print_unresolved_addresses && cu != NULL) uleb += cu->start; printf ("%*s[%4" PRIuMAX "] %s %" PRIu8 " [%6" PRIxMAX "]\n", @@ -4179,7 +4400,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, for conversion to untyped. */ start = data; NEED (1); - get_uleb128 (uleb, data); /* XXX check overrun */ + get_uleb128 (uleb, data, data + len); if (uleb != 0 && ! print_unresolved_addresses && cu != NULL) uleb += cu->start; printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "]\n", @@ -4311,7 +4532,8 @@ reset_listptr (struct listptr_table *table) table->n = table->alloc = 0; } -static void +/* Returns false if offset doesn't fit. See struct listptr. */ +static bool notice_listptr (enum section_e section, struct listptr_table *table, uint_fast8_t address_size, uint_fast8_t offset_size, struct Dwarf_CU *cu, Dwarf_Off offset) @@ -4337,8 +4559,14 @@ notice_listptr (enum section_e section, struct listptr_table *table, .offset = offset, .cu = cu }; - assert (p->offset == offset); + + if (p->offset != offset) + { + table->n--; + return false; + } } + return true; } static void @@ -4485,7 +4713,7 @@ print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); if (glink == NULL) { - error (0, 0, gettext ("invalid sh_link value in section %Zu"), + error (0, 0, gettext ("invalid sh_link value in section %zu"), elf_ndxscn (scn)); return; } @@ -4566,7 +4794,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), const unsigned char *hdrstart = readp; size_t start_offset = hdrstart - (const unsigned char *) data->d_buf; - printf (gettext ("\nTable at offset %Zu:\n"), start_offset); + printf (gettext ("\nTable at offset %zu:\n"), start_offset); if (readp + 4 > readendp) { invalid_data: @@ -4589,7 +4817,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), printf (gettext ("\n Length: %6" PRIu64 "\n"), (uint64_t) length); - if (nexthdr > readendp) + if (unlikely (length > (size_t) (readendp - readp))) goto invalid_data; if (length == 0) @@ -4684,7 +4912,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), if (readp != nexthdr) { size_t padding = nexthdr - readp; - printf (gettext (" %Zu padding bytes\n"), padding); + printf (gettext (" %zu padding bytes\n"), padding); readp = nexthdr; } } @@ -4849,54 +5077,70 @@ print_cfa_program (const unsigned char *readp, const unsigned char *const endp, puts (" nop"); break; case DW_CFA_set_loc: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); op1 += vma_base; printf (" set_loc %" PRIu64 "\n", op1 * code_align); break; case DW_CFA_advance_loc1: + if ((uint64_t) (endp - readp) < 1) + goto invalid; printf (" advance_loc1 %u to %#" PRIx64 "\n", *readp, pc += *readp * code_align); ++readp; break; case DW_CFA_advance_loc2: + if ((uint64_t) (endp - readp) < 2) + goto invalid; op1 = read_2ubyte_unaligned_inc (dbg, readp); printf (" advance_loc2 %" PRIu64 " to %#" PRIx64 "\n", op1, pc += op1 * code_align); break; case DW_CFA_advance_loc4: + if ((uint64_t) (endp - readp) < 4) + goto invalid; op1 = read_4ubyte_unaligned_inc (dbg, readp); printf (" advance_loc4 %" PRIu64 " to %#" PRIx64 "\n", op1, pc += op1 * code_align); break; case DW_CFA_offset_extended: - // XXX overflow check - get_uleb128 (op1, readp); - get_uleb128 (op2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op2, readp, endp); printf (" offset_extended r%" PRIu64 " (%s) at cfa%+" PRId64 "\n", op1, regname (op1), op2 * data_align); break; case DW_CFA_restore_extended: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); printf (" restore_extended r%" PRIu64 " (%s)\n", op1, regname (op1)); break; case DW_CFA_undefined: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); printf (" undefined r%" PRIu64 " (%s)\n", op1, regname (op1)); break; case DW_CFA_same_value: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); printf (" same_value r%" PRIu64 " (%s)\n", op1, regname (op1)); break; case DW_CFA_register: - // XXX overflow check - get_uleb128 (op1, readp); - get_uleb128 (op2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op2, readp, endp); printf (" register r%" PRIu64 " (%s) in r%" PRIu64 " (%s)\n", op1, regname (op1), op2, regname (op2)); break; @@ -4907,86 +5151,123 @@ print_cfa_program (const unsigned char *readp, const unsigned char *const endp, puts (" restore_state"); break; case DW_CFA_def_cfa: - // XXX overflow check - get_uleb128 (op1, readp); - get_uleb128 (op2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op2, readp, endp); printf (" def_cfa r%" PRIu64 " (%s) at offset %" PRIu64 "\n", op1, regname (op1), op2); break; case DW_CFA_def_cfa_register: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); printf (" def_cfa_register r%" PRIu64 " (%s)\n", op1, regname (op1)); break; case DW_CFA_def_cfa_offset: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); printf (" def_cfa_offset %" PRIu64 "\n", op1); break; case DW_CFA_def_cfa_expression: - // XXX overflow check - get_uleb128 (op1, readp); /* Length of DW_FORM_block. */ + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); /* Length of DW_FORM_block. */ printf (" def_cfa_expression %" PRIu64 "\n", op1); + if ((uint64_t) (endp - readp) < op1) + { + invalid: + fputs (gettext (" \n"), stdout); + return; + } print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, NULL, op1, readp); readp += op1; break; case DW_CFA_expression: - // XXX overflow check - get_uleb128 (op1, readp); - get_uleb128 (op2, readp); /* Length of DW_FORM_block. */ + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op2, readp, endp); /* Length of DW_FORM_block. */ printf (" expression r%" PRIu64 " (%s) \n", op1, regname (op1)); + if ((uint64_t) (endp - readp) < op2) + goto invalid; print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, NULL, op2, readp); readp += op2; break; case DW_CFA_offset_extended_sf: - // XXX overflow check - get_uleb128 (op1, readp); - get_sleb128 (sop2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_sleb128 (sop2, readp, endp); printf (" offset_extended_sf r%" PRIu64 " (%s) at cfa%+" PRId64 "\n", op1, regname (op1), sop2 * data_align); break; case DW_CFA_def_cfa_sf: - // XXX overflow check - get_uleb128 (op1, readp); - get_sleb128 (sop2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_sleb128 (sop2, readp, endp); printf (" def_cfa_sf r%" PRIu64 " (%s) at offset %" PRId64 "\n", op1, regname (op1), sop2 * data_align); break; case DW_CFA_def_cfa_offset_sf: - // XXX overflow check - get_sleb128 (sop1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_sleb128 (sop1, readp, endp); printf (" def_cfa_offset_sf %" PRId64 "\n", sop1 * data_align); break; case DW_CFA_val_offset: - // XXX overflow check - get_uleb128 (op1, readp); - get_uleb128 (op2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op2, readp, endp); printf (" val_offset %" PRIu64 " at offset %" PRIu64 "\n", op1, op2 * data_align); break; case DW_CFA_val_offset_sf: - // XXX overflow check - get_uleb128 (op1, readp); - get_sleb128 (sop2, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_sleb128 (sop2, readp, endp); printf (" val_offset_sf %" PRIu64 " at offset %" PRId64 "\n", op1, sop2 * data_align); break; case DW_CFA_val_expression: - // XXX overflow check - get_uleb128 (op1, readp); - get_uleb128 (op2, readp); /* Length of DW_FORM_block. */ + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op2, readp, endp); /* Length of DW_FORM_block. */ printf (" val_expression r%" PRIu64 " (%s)\n", op1, regname (op1)); + if ((uint64_t) (endp - readp) < op2) + goto invalid; print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, NULL, op2, readp); readp += op2; break; case DW_CFA_MIPS_advance_loc8: + if ((uint64_t) (endp - readp) < 8) + goto invalid; op1 = read_8ubyte_unaligned_inc (dbg, readp); printf (" MIPS_advance_loc8 %" PRIu64 " to %#" PRIx64 "\n", op1, pc += op1 * code_align); @@ -4995,8 +5276,9 @@ print_cfa_program (const unsigned char *readp, const unsigned char *const endp, puts (" GNU_window_save"); break; case DW_CFA_GNU_args_size: - // XXX overflow check - get_uleb128 (op1, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (op1, readp, endp); printf (" args_size %" PRIu64 "\n", op1); break; default: @@ -5009,8 +5291,9 @@ print_cfa_program (const unsigned char *readp, const unsigned char *const endp, else if (opcode < DW_CFA_restore) { uint64_t offset; - // XXX overflow check - get_uleb128 (offset, readp); + if ((uint64_t) (endp - readp) < 1) + goto invalid; + get_uleb128 (offset, readp, endp); printf (" offset r%u (%s) at cfa%+" PRId64 "\n", opcode & 0x3f, regname (opcode & 0x3f), offset * data_align); } @@ -5026,15 +5309,17 @@ encoded_ptr_size (int encoding, unsigned int ptr_size) { switch (encoding & 7) { - case 2: - return 2; - case 3: + case DW_EH_PE_udata4: return 4; - case 4: + case DW_EH_PE_udata8: return 8; - default: + case 0: return ptr_size; } + + fprintf (stderr, "Unsupported pointer encoding: %#x, " + "assuming pointer size of %d.\n", encoding, ptr_size); + return ptr_size; } @@ -5147,12 +5432,10 @@ read_encoded (unsigned int encoding, const unsigned char *readp, switch (encoding & 0xf) { case DW_EH_PE_uleb128: - // XXX buffer overrun check - get_uleb128 (*res, readp); + get_uleb128 (*res, readp, endp); break; case DW_EH_PE_sleb128: - // XXX buffer overrun check - get_sleb128 (*res, readp); + get_sleb128 (*res, readp, endp); break; case DW_EH_PE_udata2: if (readp + 2 > endp) @@ -5278,6 +5561,10 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, continue; } + Dwarf_Word maxsize = dataend - readp; + if (unlikely (unit_length > maxsize)) + goto invalid_data; + unsigned int ptr_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; ptrdiff_t start = readp - (unsigned char *) data->d_buf; @@ -5321,21 +5608,24 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, segment_size = *readp++; } - // XXX Check overflow - get_uleb128 (code_alignment_factor, readp); - // XXX Check overflow - get_sleb128 (data_alignment_factor, readp); + if (cieend - readp < 1) + goto invalid_data; + get_uleb128 (code_alignment_factor, readp, cieend); + if (cieend - readp < 1) + goto invalid_data; + get_sleb128 (data_alignment_factor, readp, cieend); /* In some variant for unwind data there is another field. */ if (strcmp (augmentation, "eh") == 0) readp += ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; unsigned int return_address_register; + if (cieend - readp < 1) + goto invalid_data; if (unlikely (version == 1)) return_address_register = *readp++; else - // XXX Check overflow - get_uleb128 (return_address_register, readp); + get_uleb128 (return_address_register, readp, cieend); printf ("\n [%6tx] CIE length=%" PRIu64 "\n" " CIE_id: %" PRIu64 "\n" @@ -5356,14 +5646,18 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, if (augmentation[0] == 'z') { unsigned int augmentationlen; - get_uleb128 (augmentationlen, readp); + get_uleb128 (augmentationlen, readp, cieend); - if (augmentationlen > (size_t) (dataend - readp)) - error (1, 0, gettext ("invalid augmentation length")); + if (augmentationlen > (size_t) (cieend - readp)) + { + error (0, 0, gettext ("invalid augmentation length")); + readp = cieend; + continue; + } const char *hdr = "Augmentation data:"; const char *cp = augmentation + 1; - while (*cp != '\0') + while (*cp != '\0' && cp < augmentation + augmentationlen + 1) { printf (" %-26s%#x ", hdr, *readp); hdr = ""; @@ -5435,8 +5729,8 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, struct cieinfo *cie = cies; while (cie != NULL) if (is_eh_frame - ? start - (ptrdiff_t) cie_id == cie->cie_offset - : (ptrdiff_t) cie_id == cie->cie_offset) + ? ((Dwarf_Off) start - cie_id) == (Dwarf_Off) cie->cie_offset + : cie_id == (Dwarf_Off) cie->cie_offset) break; else cie = cie->next; @@ -5455,9 +5749,9 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, const unsigned char *base = readp; // XXX There are sometimes relocations for this value - initial_location = read_ubyte_unaligned_inc (ptr_size, dbg, readp); + initial_location = read_addr_unaligned_inc (ptr_size, dbg, readp); Dwarf_Word address_range - = read_ubyte_unaligned_inc (ptr_size, dbg, readp); + = read_addr_unaligned_inc (ptr_size, dbg, readp); /* pcrel for an FDE address is relative to the runtime address of the start_address field itself. Sign extend @@ -5505,14 +5799,24 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, if (cie->augmentation[0] == 'z') { unsigned int augmentationlen; - get_uleb128 (augmentationlen, readp); + if (cieend - readp < 1) + goto invalid_data; + get_uleb128 (augmentationlen, readp, cieend); + + if (augmentationlen > (size_t) (cieend - readp)) + { + error (0, 0, gettext ("invalid augmentation length")); + readp = cieend; + continue; + } if (augmentationlen > 0) { const char *hdr = "Augmentation data:"; const char *cp = cie->augmentation + 1; unsigned int u = 0; - while (*cp != '\0') + while (*cp != '\0' + && cp < cie->augmentation + augmentationlen + 1) { if (*cp == 'L') { @@ -5542,9 +5846,12 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } /* Handle the initialization instructions. */ - print_cfa_program (readp, cieend, vma_base, code_alignment_factor, - data_alignment_factor, version, ptr_size, - dwflmod, ebl, dbg); + if (ptr_size != 4 && ptr_size !=8) + printf ("invalid CIE pointer size (%u), must be 4 or 8.\n", ptr_size); + else + print_cfa_program (readp, cieend, vma_base, code_alignment_factor, + data_alignment_factor, version, ptr_size, + dwflmod, ebl, dbg); readp = cieend; } } @@ -5693,23 +6000,29 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_AT_GNU_call_site_data_value: case DW_AT_GNU_call_site_target: case DW_AT_GNU_call_site_target_clobbered: - notice_listptr (section_loc, &known_loclistptr, - cbargs->addrsize, cbargs->offset_size, - cbargs->cu, num); - if (!cbargs->silent) - printf (" %*s%-20s (%s) location list [%6" PRIxMAX "]\n", - (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), (uintmax_t) num); + { + bool nlpt = notice_listptr (section_loc, &known_loclistptr, + cbargs->addrsize, cbargs->offset_size, + cbargs->cu, num); + if (!cbargs->silent) + printf (" %*s%-20s (%s) location list [%6" PRIxMAX "]%s\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), (uintmax_t) num, + nlpt ? "" : " "); + } return DWARF_CB_OK; case DW_AT_ranges: - notice_listptr (section_ranges, &known_rangelistptr, - cbargs->addrsize, cbargs->offset_size, - cbargs->cu, num); - if (!cbargs->silent) - printf (" %*s%-20s (%s) range list [%6" PRIxMAX "]\n", - (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), (uintmax_t) num); + { + bool nlpt = notice_listptr (section_ranges, &known_rangelistptr, + cbargs->addrsize, cbargs->offset_size, + cbargs->cu, num); + if (!cbargs->silent) + printf (" %*s%-20s (%s) range list [%6" PRIxMAX "]%s\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), (uintmax_t) num, + nlpt ? "" : " "); + } return DWARF_CB_OK; case DW_AT_language: @@ -6087,9 +6400,19 @@ print_decoded_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, for (size_t n = 0; n < nlines; n++) { Dwarf_Line *line = dwarf_onesrcline (lines, n); + if (line == NULL) + { + printf (" dwarf_onesrcline: %s\n", dwarf_errmsg (-1)); + continue; + } Dwarf_Word mtime, length; const char *file = dwarf_linesrc (line, &mtime, &length); - if (strcmp (last_file, file) != 0) + if (file == NULL) + { + printf (" <%s> (mtime: ?, length: ?)\n", dwarf_errmsg (-1)); + last_file = ""; + } + else if (strcmp (last_file, file) != 0) { printf (" %s (mtime: %" PRIu64 ", length: %" PRIu64 ")\n", file, mtime, length); @@ -6168,8 +6491,10 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, { size_t start_offset = linep - (const unsigned char *) data->d_buf; - printf (gettext ("\nTable at offset %Zu:\n"), start_offset); + printf (gettext ("\nTable at offset %zu:\n"), start_offset); + if (unlikely (linep + 4 > lineendp)) + goto invalid_data; Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, linep); unsigned int length = 4; if (unlikely (unit_length == 0xffffffff)) @@ -6186,8 +6511,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } /* Check whether we have enough room in the section. */ - if (unit_length < 2 + length + 5 * 1 - || unlikely (linep + unit_length > lineendp)) + if (unlikely (unit_length > (size_t) (lineendp - linep) + || unit_length < 2 + length + 5 * 1)) goto invalid_data; lineendp = linep + unit_length; @@ -6296,15 +6621,21 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, /* Then the index. */ unsigned int diridx; - get_uleb128 (diridx, linep); + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (diridx, linep, lineendp); /* Next comes the modification time. */ unsigned int mtime; - get_uleb128 (mtime, linep); + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (mtime, linep, lineendp); /* Finally the length of the file. */ unsigned int fsize; - get_uleb128 (fsize, linep); + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (fsize, linep, lineendp); printf (" %-5u %-5u %-9u %-9u %s\n", cnt, diridx, mtime, fsize, fname); @@ -6360,6 +6691,14 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, op_index = (op_index + op_advance) % max_ops_per_instr; } + if (max_ops_per_instr == 0) + { + error (0, 0, + gettext ("invalid maximum operations per instruction is zero")); + linep = lineendp; + continue; + } + while (linep < lineendp) { size_t offset = linep - (const unsigned char *) data->d_buf; @@ -6373,6 +6712,9 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, /* Is this a special opcode? */ if (likely (opcode >= opcode_base)) { + if (unlikely (line_range == 0)) + goto invalid_unit; + /* Yes. Handling this is quite easy since the opcode value is computed with @@ -6429,6 +6771,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, case DW_LNE_set_address: op_index = 0; + if (unlikely ((size_t) (lineendp - linep) < address_size)) + goto invalid_unit; if (address_size == 4) address = read_4ubyte_unaligned_inc (dbg, linep); else @@ -6450,11 +6794,17 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, linep = endp + 1; unsigned int diridx; - get_uleb128 (diridx, linep); + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (diridx, linep, lineendp); Dwarf_Word mtime; - get_uleb128 (mtime, linep); + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (mtime, linep, lineendp); Dwarf_Word filelength; - get_uleb128 (filelength, linep); + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (filelength, linep, lineendp); printf (gettext ("\ define new file: dir=%u, mtime=%" PRIu64 ", length=%" PRIu64 ", name=%s\n"), @@ -6468,7 +6818,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, if (unlikely (standard_opcode_lengths[opcode] != 1)) goto invalid_unit; - get_uleb128 (u128, linep); + get_uleb128 (u128, linep, lineendp); printf (gettext (" set discriminator to %u\n"), u128); break; @@ -6492,7 +6842,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, case DW_LNS_advance_pc: /* Takes one uleb128 parameter which is added to the address. */ - get_uleb128 (u128, linep); + get_uleb128 (u128, linep, lineendp); advance_pc (u128); { char *a = format_dwarf_addr (dwflmod, 0, address, address); @@ -6510,7 +6860,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, case DW_LNS_advance_line: /* Takes one sleb128 parameter which is added to the line. */ - get_sleb128 (s128, linep); + get_sleb128 (s128, linep, lineendp); line += s128; printf (gettext ("\ advance line by constant %d to %" PRId64 "\n"), @@ -6519,7 +6869,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, case DW_LNS_set_file: /* Takes one uleb128 parameter which is stored in file. */ - get_uleb128 (u128, linep); + get_uleb128 (u128, linep, lineendp); printf (gettext (" set file to %" PRIu64 "\n"), (uint64_t) u128); break; @@ -6529,7 +6879,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, if (unlikely (standard_opcode_lengths[opcode] != 1)) goto invalid_unit; - get_uleb128 (u128, linep); + get_uleb128 (u128, linep, lineendp); printf (gettext (" set column to %" PRIu64 "\n"), (uint64_t) u128); break; @@ -6548,6 +6898,10 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, case DW_LNS_const_add_pc: /* Takes no argument. */ + + if (unlikely (line_range == 0)) + goto invalid_unit; + advance_pc ((255 - opcode_base) / line_range); { char *a = format_dwarf_addr (dwflmod, 0, address, address); @@ -6596,7 +6950,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, if (unlikely (standard_opcode_lengths[opcode] != 1)) goto invalid_unit; - get_uleb128 (u128, linep); + get_uleb128 (u128, linep, lineendp); printf (gettext (" set isa to %u\n"), u128); break; } @@ -6612,7 +6966,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, standard_opcode_lengths[opcode]); for (int n = standard_opcode_lengths[opcode]; n > 0; --n) { - get_uleb128 (u128, linep); + get_uleb128 (u128, linep, lineendp); if (n != standard_opcode_lengths[opcode]) putc_unlocked (',', stdout); printf (" %u", u128); @@ -6813,6 +7167,7 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)), * sizeof (*cus)); /* Add sentinel. */ cus[nculist].offset = data->d_size; + cus[nculist].files = (Dwarf_Files *) -1l; if (nculist > 0) { for (size_t cnt = nculist - 1; culist != NULL; --cnt) @@ -6848,7 +7203,7 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)), For the latter number, string. We can treat these cases together. */ - get_uleb128 (u128, readp); + get_uleb128 (u128, readp, readendp); endp = memchr (readp, '\0', readendp - readp); if (unlikely (endp == NULL)) @@ -6873,15 +7228,22 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)), case DW_MACINFO_start_file: /* The two parameters are line and file index, in this order. */ - get_uleb128 (u128, readp); - get_uleb128 (u128_2, readp); + get_uleb128 (u128, readp, readendp); + if (readendp - readp < 1) + { + printf (gettext ("\ +%*s*** missing DW_MACINFO_start_file argument at end of section"), + level, ""); + return; + } + get_uleb128 (u128_2, readp, readendp); /* Find the CU DIE for this file. */ size_t macoff = readp - (const unsigned char *) data->d_buf; const char *fname = "???"; if (macoff >= cus[0].offset) { - while (macoff >= cus[1].offset) + while (macoff >= cus[1].offset && cus[1].offset != data->d_size) ++cus; if (cus[0].files == NULL @@ -7085,8 +7447,10 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), switch (opcode) { case DW_MACRO_GNU_start_file: - get_uleb128 (u128, readp); - get_uleb128 (u128_2, readp); + get_uleb128 (u128, readp, readendp); + if (readp >= readendp) + goto invalid_data; + get_uleb128 (u128_2, readp, readendp); /* Find the CU DIE that matches this line offset. */ const char *fname = "???"; @@ -7118,7 +7482,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), break; case DW_MACRO_GNU_define: - get_uleb128 (u128, readp); + get_uleb128 (u128, readp, readendp); endp = memchr (readp, '\0', readendp - readp); if (endp == NULL) goto invalid_data; @@ -7128,7 +7492,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), break; case DW_MACRO_GNU_undef: - get_uleb128 (u128, readp); + get_uleb128 (u128, readp, readendp); endp = memchr (readp, '\0', readendp - readp); if (endp == NULL) goto invalid_data; @@ -7138,7 +7502,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), break; case DW_MACRO_GNU_define_indirect: - get_uleb128 (u128, readp); + get_uleb128 (u128, readp, readendp); if (readp + offset_len > readendp) goto invalid_data; if (offset_len == 8) @@ -7150,7 +7514,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), break; case DW_MACRO_GNU_undef_indirect: - get_uleb128 (u128, readp); + get_uleb128 (u128, readp, readendp); if (readp + offset_len > readendp) goto invalid_data; if (offset_len == 8) @@ -7220,17 +7584,17 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), break; case DW_FORM_sdata: - get_sleb128 (val, readp); + get_sleb128 (val, readp, readendp); printf (" %" PRIx64, val); break; case DW_FORM_udata: - get_uleb128 (val, readp); + get_uleb128 (val, readp, readendp); printf (" %" PRIx64, val); break; case DW_FORM_block: - get_uleb128 (val, readp); + get_uleb128 (val, readp, readendp); printf (" block[%" PRIu64 "]", val); if (readp + val > readendp) goto invalid_data; @@ -7546,9 +7910,10 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), if (ttype_encoding != DW_EH_PE_omit) { unsigned int ttype_base_offset; - get_uleb128 (ttype_base_offset, readp); + get_uleb128 (ttype_base_offset, readp, dataend); printf (" TType base offset: %#x\n", ttype_base_offset); - ttype_base = readp + ttype_base_offset; + if ((size_t) (dataend - readp) > ttype_base_offset) + ttype_base = readp + ttype_base_offset; } if (unlikely (readp + 1 > dataend)) @@ -7557,7 +7922,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), printf (gettext (" Call site encoding: %#x "), call_site_encoding); print_encoding_base ("", call_site_encoding); unsigned int call_site_table_len; - get_uleb128 (call_site_table_len, readp); + get_uleb128 (call_site_table_len, readp, dataend); const unsigned char *const action_table = readp + call_site_table_len; if (unlikely (action_table > dataend)) @@ -7579,7 +7944,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), readp = read_encoded (call_site_encoding, readp, dataend, &landing_pad, dbg); unsigned int action; - get_uleb128 (action, readp); + get_uleb128 (action, readp, dataend); max_action = MAX (action, max_action); printf (gettext (" [%4u] Call site start: %#" PRIx64 "\n" " Call site length: %" PRIu64 "\n" @@ -7587,13 +7952,22 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), " Action: %u\n"), u++, call_site_start, call_site_length, landing_pad, action); } - assert (readp == action_table); + if (readp != action_table) + goto invalid_data; unsigned int max_ar_filter = 0; if (max_action > 0) { puts ("\n Action table:"); + size_t maxdata = (size_t) (dataend - action_table); + if (max_action > maxdata || maxdata - max_action < 1) + { + invalid_action_table: + fputs (gettext (" \n"), stdout); + return; + } + const unsigned char *const action_table_end = action_table + max_action + 1; @@ -7601,11 +7975,13 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), do { int ar_filter; - get_sleb128 (ar_filter, readp); + get_sleb128 (ar_filter, readp, action_table_end); if (ar_filter > 0 && (unsigned int) ar_filter > max_ar_filter) max_ar_filter = ar_filter; int ar_disp; - get_sleb128 (ar_disp, readp); + if (readp >= action_table_end) + goto invalid_action_table; + get_sleb128 (ar_disp, readp, action_table_end); printf (" [%4u] ar_filter: % d\n" " ar_disp: % -5d", @@ -7621,8 +7997,9 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), while (readp < action_table_end); } - if (max_ar_filter > 0) + if (max_ar_filter > 0 && ttype_base != NULL) { + unsigned char dsize; puts ("\n TType table:"); // XXX Not *4, size of encoding; @@ -7630,20 +8007,26 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)), { case DW_EH_PE_udata2: case DW_EH_PE_sdata2: - readp = ttype_base - max_ar_filter * 2; + dsize = 2; break; case DW_EH_PE_udata4: case DW_EH_PE_sdata4: - readp = ttype_base - max_ar_filter * 4; + dsize = 4; break; case DW_EH_PE_udata8: case DW_EH_PE_sdata8: - readp = ttype_base - max_ar_filter * 8; + dsize = 8; break; default: + dsize = 0; error (1, 0, gettext ("invalid TType encoding")); } + if (max_ar_filter + > (size_t) (ttype_base - (const unsigned char *) data->d_buf) / dsize) + goto invalid_data; + + readp = ttype_base - max_ar_filter * dsize; do { uint64_t ttype; @@ -7739,9 +8122,16 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, uint32_t const_off = read_4ubyte_unaligned (dbg, readp); printf (gettext (" constant offset: %#" PRIx32 "\n"), const_off); + if (unlikely ((size_t) (dataend - (const unsigned char *) data->d_buf) + < const_off)) + goto invalid_data; + readp = data->d_buf + cu_off; const unsigned char *nextp = data->d_buf + tu_off; + if (tu_off >= data->d_size) + goto invalid_data; + size_t cu_nr = (nextp - readp) / 16; printf (gettext ("\n CU list at offset %#" PRIx32 @@ -7749,7 +8139,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, cu_off, cu_nr); size_t n = 0; - while (readp + 16 <= dataend && n < cu_nr) + while (dataend - readp >= 16 && n < cu_nr) { uint64_t off = read_8ubyte_unaligned (dbg, readp); readp += 8; @@ -7764,6 +8154,9 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, readp = data->d_buf + tu_off; nextp = data->d_buf + addr_off; + if (addr_off >= data->d_size) + goto invalid_data; + size_t tu_nr = (nextp - readp) / 24; printf (gettext ("\n TU list at offset %#" PRIx32 @@ -7771,7 +8164,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, tu_off, tu_nr); n = 0; - while (readp + 24 <= dataend && n < tu_nr) + while (dataend - readp >= 24 && n < tu_nr) { uint64_t off = read_8ubyte_unaligned (dbg, readp); readp += 8; @@ -7790,6 +8183,9 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, readp = data->d_buf + addr_off; nextp = data->d_buf + sym_off; + if (sym_off >= data->d_size) + goto invalid_data; + size_t addr_nr = (nextp - readp) / 20; printf (gettext ("\n Address list at offset %#" PRIx32 @@ -7797,7 +8193,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, addr_off, addr_nr); n = 0; - while (readp + 20 <= dataend && n < addr_nr) + while (dataend - readp >= 20 && n < addr_nr) { uint64_t low = read_8ubyte_unaligned (dbg, readp); readp += 8; @@ -7817,8 +8213,12 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, n++; } + const unsigned char *const_start = data->d_buf + const_off; + if (const_off >= data->d_size) + goto invalid_data; + readp = data->d_buf + sym_off; - nextp = data->d_buf + const_off; + nextp = const_start; size_t sym_nr = (nextp - readp) / 8; printf (gettext ("\n Symbol table at offset %#" PRIx32 @@ -7826,7 +8226,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, addr_off, sym_nr); n = 0; - while (readp + 8 <= dataend && n < sym_nr) + while (dataend - readp >= 8 && n < sym_nr) { uint32_t name = read_4ubyte_unaligned (dbg, readp); readp += 4; @@ -7836,22 +8236,24 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, if (name != 0 || vector != 0) { - const unsigned char *sym = data->d_buf + const_off + name; - if (unlikely (sym > dataend)) + const unsigned char *sym = const_start + name; + if (unlikely ((size_t) (dataend - const_start) < name + || memchr (sym, '\0', dataend - sym) == NULL)) goto invalid_data; printf (" [%4zu] symbol: %s, CUs: ", n, sym); - const unsigned char *readcus = data->d_buf + const_off + vector; - if (unlikely (readcus + 8 > dataend)) + const unsigned char *readcus = const_start + vector; + if (unlikely ((size_t) (dataend - const_start) < vector)) goto invalid_data; - uint32_t cus = read_4ubyte_unaligned (dbg, readcus); while (cus--) { uint32_t cu_kind, cu, kind; bool is_static; readcus += 4; + if (unlikely (readcus + 4 > dataend)) + goto invalid_data; cu_kind = read_4ubyte_unaligned (dbg, readcus); cu = cu_kind & ((1 << 24) - 1); kind = (cu_kind >> 28) & 7; @@ -7908,8 +8310,6 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) if ((print_debug_sections & ~section_exception) != 0) error (0, 0, gettext ("cannot get debug context descriptor: %s"), dwfl_errmsg (-1)); - if ((print_debug_sections & section_exception) == 0) - return; dbg = &dummy_dbg; } @@ -7968,11 +8368,9 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) int n; for (n = 0; n < ndebug_sections; ++n) if (strcmp (name, debug_sections[n].name) == 0 -#if USE_ZLIB || (name[0] == '.' && name[1] == 'z' && debug_sections[n].name[1] == 'd' && strcmp (&name[2], &debug_sections[n].name[1]) == 0) -#endif ) { if ((print_debug_sections | implicit_debug_sections) @@ -8078,6 +8476,9 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, unsigned int colno, size_t *repeated_size) { uint_fast16_t count = item->count ?: 1; + /* Ebl_Core_Item count is always a small number. + Make sure the backend didn't put in some large bogus value. */ + assert (count < 128); #define TYPES \ DO_TYPE (BYTE, Byte, "0x%.2" PRIx8, "%" PRId8); \ @@ -8087,11 +8488,16 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, DO_TYPE (XWORD, Xword, "0x%.16" PRIx64, "%" PRId64); \ DO_TYPE (SXWORD, Sxword, "%" PRId64, "%" PRId64) -#define DO_TYPE(NAME, Name, hex, dec) GElf_##Name Name[count] - union { TYPES; } value; +#define DO_TYPE(NAME, Name, hex, dec) GElf_##Name Name + typedef union { TYPES; } value_t; + void *data = alloca (count * sizeof (value_t)); +#undef DO_TYPE + +#define DO_TYPE(NAME, Name, hex, dec) \ + GElf_##Name *value_##Name __attribute__((unused)) = data + TYPES; #undef DO_TYPE - void *data = &value; size_t size = gelf_fsize (core, item->type, count, EV_CURRENT); size_t convsize = size; if (repeated_size != NULL) @@ -8122,7 +8528,7 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, #define DO_TYPE(NAME, Name, hex, dec) \ case ELF_T_##NAME: \ colno = print_core_item (colno, ',', WRAP_COLUMN, \ - 0, item->name, dec, value.Name[0]); \ + 0, item->name, dec, value_##Name[0]); \ break TYPES; #undef DO_TYPE @@ -8138,7 +8544,7 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, #define DO_TYPE(NAME, Name, hex, dec) \ case ELF_T_##NAME: \ colno = print_core_item (colno, ',', WRAP_COLUMN, \ - 0, item->name, hex, value.Name[0]); \ + 0, item->name, hex, value_##Name[0]); \ break TYPES; #undef DO_TYPE @@ -8183,8 +8589,16 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, unsigned int w = negate ? ~*i : *i; while (w != 0) { - int n = ffs (w); - w >>= n; + /* Note that a right shift equal to (or greater than) + the number of bits of w is undefined behaviour. In + particular when the least significant bit is bit 32 + (w = 0x8000000) then w >>= n is undefined. So + explicitly handle that case separately. */ + unsigned int n = ffs (w); + if (n < sizeof (w) * 8) + w >>= n; + else + w = 0; bit += n; if (lastbit != 0 && lastbit + 1 == bit) @@ -8220,8 +8634,8 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, { #define DO_TYPE(NAME, Name, hex, dec) \ case ELF_T_##NAME: \ - sec = value.Name[0]; \ - usec = value.Name[1]; \ + sec = value_##Name[0]; \ + usec = value_##Name[1]; \ break TYPES; #undef DO_TYPE @@ -8251,12 +8665,12 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const void *desc, case 'c': assert (count == 1); colno = print_core_item (colno, ',', WRAP_COLUMN, 0, item->name, - "%c", value.Byte[0]); + "%c", value_Byte[0]); break; case 's': colno = print_core_item (colno, ',', WRAP_COLUMN, 0, item->name, - "%.*s", (int) count, value.Byte); + "%.*s", (int) count, value_Byte); break; case '\n': @@ -8855,9 +9269,13 @@ handle_file_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos) return; } + size_t addrsize = gelf_fsize (core, ELF_T_ADDR, 1, EV_CURRENT); + uint64_t maxcount = (size_t) (end - ptr) / (3 * addrsize); + if (count > maxcount) + goto fail; + /* Where file names are stored. */ - unsigned char const *const fstart - = ptr + 3 * count * gelf_fsize (core, ELF_T_ADDR, 1, EV_CURRENT); + unsigned char const *const fstart = ptr + 3 * count * addrsize; char const *fptr = (char *) fstart; printf (" %" PRId64 " files:\n", count); @@ -9052,7 +9470,7 @@ hex_dump (const uint8_t *data, size_t len) size_t pos = 0; while (pos < len) { - printf (" 0x%08Zx ", pos); + printf (" 0x%08zx ", pos); const size_t chunk = MIN (len - pos, 16); @@ -9080,20 +9498,38 @@ static void dump_data_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name) { if (shdr->sh_size == 0 || shdr->sh_type == SHT_NOBITS) - printf (gettext ("\nSection [%Zu] '%s' has no data to dump.\n"), + printf (gettext ("\nSection [%zu] '%s' has no data to dump.\n"), elf_ndxscn (scn), name); else { + if (print_decompress) + { + /* We try to decompress the section, but keep the old shdr around + so we can show both the original shdr size and the uncompressed + data size. */ + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + elf_compress (scn, 0, 0); + else if (strncmp (name, ".zdebug", strlen (".zdebug")) == 0) + elf_compress_gnu (scn, 0, 0); + } + Elf_Data *data = elf_rawdata (scn, NULL); if (data == NULL) - error (0, 0, gettext ("cannot get data for section [%Zu] '%s': %s"), + error (0, 0, gettext ("cannot get data for section [%zu] '%s': %s"), elf_ndxscn (scn), name, elf_errmsg (-1)); else { - printf (gettext ("\nHex dump of section [%Zu] '%s', %" PRIu64 - " bytes at offset %#0" PRIx64 ":\n"), - elf_ndxscn (scn), name, - shdr->sh_size, shdr->sh_offset); + if (data->d_size == shdr->sh_size) + printf (gettext ("\nHex dump of section [%zu] '%s', %" PRIu64 + " bytes at offset %#0" PRIx64 ":\n"), + elf_ndxscn (scn), name, + shdr->sh_size, shdr->sh_offset); + else + printf (gettext ("\nHex dump of section [%zu] '%s', %" PRIu64 + " bytes (%zd uncompressed) at offset %#0" + PRIx64 ":\n"), + elf_ndxscn (scn), name, + shdr->sh_size, data->d_size, shdr->sh_offset); hex_dump (data->d_buf, data->d_size); } } @@ -9103,20 +9539,38 @@ static void print_string_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name) { if (shdr->sh_size == 0 || shdr->sh_type == SHT_NOBITS) - printf (gettext ("\nSection [%Zu] '%s' has no strings to dump.\n"), + printf (gettext ("\nSection [%zu] '%s' has no strings to dump.\n"), elf_ndxscn (scn), name); else { + if (print_decompress) + { + /* We try to decompress the section, but keep the old shdr around + so we can show both the original shdr size and the uncompressed + data size. */ + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + elf_compress (scn, 0, 0); + else if (strncmp (name, ".zdebug", strlen (".zdebug")) == 0) + elf_compress_gnu (scn, 0, 0); + } + Elf_Data *data = elf_rawdata (scn, NULL); if (data == NULL) - error (0, 0, gettext ("cannot get data for section [%Zu] '%s': %s"), + error (0, 0, gettext ("cannot get data for section [%zu] '%s': %s"), elf_ndxscn (scn), name, elf_errmsg (-1)); else { - printf (gettext ("\nString section [%Zu] '%s' contains %" PRIu64 - " bytes at offset %#0" PRIx64 ":\n"), - elf_ndxscn (scn), name, - shdr->sh_size, shdr->sh_offset); + if (data->d_size == shdr->sh_size) + printf (gettext ("\nString section [%zu] '%s' contains %" PRIu64 + " bytes at offset %#0" PRIx64 ":\n"), + elf_ndxscn (scn), name, + shdr->sh_size, shdr->sh_offset); + else + printf (gettext ("\nString section [%zu] '%s' contains %" PRIu64 + " bytes (%zd uncompressed) at offset %#0" + PRIx64 ":\n"), + elf_ndxscn (scn), name, + shdr->sh_size, data->d_size, shdr->sh_offset); const char *start = data->d_buf; const char *const limit = start + data->d_size; @@ -9126,11 +9580,11 @@ print_string_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name) const size_t pos = start - (const char *) data->d_buf; if (unlikely (end == NULL)) { - printf (" [%6Zx]- %.*s\n", + printf (" [%6zx]- %.*s\n", pos, (int) (limit - start), start); break; } - printf (" [%6Zx] %s\n", pos, start); + printf (" [%6zx] %s\n", pos, start); start = end + 1; } while (start < limit); } @@ -9254,7 +9708,7 @@ dump_archive_index (Elf *elf, const char *fname) return; } - printf (gettext ("\nIndex of archive '%s' has %Zu entries:\n"), + printf (gettext ("\nIndex of archive '%s' has %zu entries:\n"), fname, narsym); size_t as_off = 0; @@ -9264,7 +9718,7 @@ dump_archive_index (Elf *elf, const char *fname) { as_off = s->as_off; - Elf *subelf; + Elf *subelf = NULL; if (unlikely (elf_rand (elf, as_off) == 0) || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) == NULL)) @@ -9272,7 +9726,7 @@ dump_archive_index (Elf *elf, const char *fname) while (1) #endif error (EXIT_FAILURE, 0, - gettext ("cannot extract member at offset %Zu in '%s': %s"), + gettext ("cannot extract member at offset %zu in '%s': %s"), as_off, fname, elf_errmsg (-1)); const Elf_Arhdr *h = elf_getarhdr (subelf); diff --git a/src/size.c b/src/size.c index 9db55c8..7c03cce 100644 --- a/src/size.c +++ b/src/size.c @@ -1,5 +1,5 @@ /* Print size information from ELF file. - Copyright (C) 2000-2007,2009,2012,2014 Red Hat, Inc. + Copyright (C) 2000-2007,2009,2012,2014,2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -106,8 +105,8 @@ static void handle_elf (Elf *elf, const char *fullname, const char *fname); static void show_bsd_totals (void); #define INTERNAL_ERROR(fname) \ - error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s-%s): %s"), \ - fname, __LINE__, PACKAGE_VERSION, __DATE__, elf_errmsg (-1)) + error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"), \ + fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1)) /* User-selectable options. */ @@ -160,9 +159,6 @@ main (int argc, char *argv[]) int remaining; int result = 0; - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ __fsetlocking (stdin, FSETLOCKING_BYCALLER); __fsetlocking (stdout, FSETLOCKING_BYCALLER); @@ -427,10 +423,9 @@ show_sysv (Elf *elf, const char *prefix, const char *fname, INTERNAL_ERROR (fullname); /* Ignore all sections which are not used at runtime. */ - if ((shdr->sh_flags & SHF_ALLOC) != 0) - maxlen = MAX (maxlen, - (int) strlen (elf_strptr (elf, shstrndx, - shdr->sh_name))); + const char *name = elf_strptr (elf, shstrndx, shdr->sh_name); + if (name != NULL && (shdr->sh_flags & SHF_ALLOC) != 0) + maxlen = MAX (maxlen, (int) strlen (name)); } fputs_unlocked (fname, stdout); @@ -601,14 +596,13 @@ show_bsd_totals (void) static void show_segments (Elf *elf, const char *fullname) { - GElf_Ehdr ehdr_mem; - GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); - if (ehdr == NULL) + size_t phnum; + if (elf_getphdrnum (elf, &phnum) != 0) INTERNAL_ERROR (fullname); GElf_Off total = 0; bool first = true; - for (size_t cnt = 0; cnt < ehdr->e_phnum; ++cnt) + for (size_t cnt = 0; cnt < phnum; ++cnt) { GElf_Phdr phdr_mem; GElf_Phdr *phdr; diff --git a/src/strings.c b/src/strings.c index f60e4b4..c1d63cd 100644 --- a/src/strings.c +++ b/src/strings.c @@ -43,10 +43,14 @@ #include +#ifndef MAP_POPULATE +# define MAP_POPULATE 0 +#endif + /* Prototypes of local functions. */ -static int read_fd (int fd, const char *fname, off64_t fdlen); -static int read_elf (Elf *elf, int fd, const char *fname, off64_t fdlen); +static int read_fd (int fd, const char *fname, off_t fdlen); +static int read_elf (Elf *elf, int fd, const char *fname, off_t fdlen); /* Name and version of program. */ @@ -134,7 +138,7 @@ static size_t ps; static unsigned char *elfmap; static unsigned char *elfmap_base; static size_t elfmap_size; -static off64_t elfmap_off; +static off_t elfmap_off; int @@ -163,14 +167,14 @@ main (int argc, char *argv[]) /* Determine the page size. We will likely need it a couple of times. */ ps = sysconf (_SC_PAGESIZE); - struct stat64 st; + struct stat st; int result = 0; if (remaining == argc) /* We read from standard input. This we cannot do for a structured file. */ result = read_fd (STDIN_FILENO, print_file_name ? "{standard input}" : NULL, - (fstat64 (STDIN_FILENO, &st) == 0 && S_ISREG (st.st_mode)) + (fstat (STDIN_FILENO, &st) == 0 && S_ISREG (st.st_mode)) ? st.st_size : INT64_C (0x7fffffffffffffff)); else do @@ -185,10 +189,10 @@ main (int argc, char *argv[]) else { const char *fname = print_file_name ? argv[remaining] : NULL; - int fstat_fail = fstat64 (fd, &st); - off64_t fdlen = (fstat_fail + int fstat_fail = fstat (fd, &st); + off_t fdlen = (fstat_fail ? INT64_C (0x7fffffffffffffff) : st.st_size); - if (fdlen > (off64_t) min_len_bytes) + if (fdlen > (off_t) min_len_bytes) { Elf *elf = NULL; if (entire_file @@ -322,7 +326,7 @@ parse_opt (int key, char *arg, static void -process_chunk_mb (const char *fname, const unsigned char *buf, off64_t to, +process_chunk_mb (const char *fname, const unsigned char *buf, off_t to, size_t len, char **unprinted) { size_t curlen = *unprinted == NULL ? 0 : strlen (*unprinted); @@ -399,7 +403,7 @@ process_chunk_mb (const char *fname, const unsigned char *buf, off64_t to, static void -process_chunk (const char *fname, const unsigned char *buf, off64_t to, +process_chunk (const char *fname, const unsigned char *buf, off_t to, size_t len, char **unprinted) { /* We are not going to slow the check down for the 2- and 4-byte @@ -463,7 +467,7 @@ process_chunk (const char *fname, const unsigned char *buf, off64_t to, /* Map a file in as large chunks as possible. */ static void * -map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep) +map_file (int fd, off_t start_off, off_t fdlen, size_t *map_sizep) { /* Maximum size we mmap. We use an #ifdef to avoid overflows on 32-bit machines. 64-bit machines these days do not have usable @@ -476,7 +480,7 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep) # endif /* Try to mmap the file. */ - size_t map_size = MIN ((off64_t) mmap_max, fdlen); + size_t map_size = MIN ((off_t) mmap_max, fdlen); const size_t map_size_min = MAX (MAX (SIZE_MAX / 16, 2 * ps), roundup (2 * min_len_bytes + 1, ps)); void *mem; @@ -485,8 +489,8 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep) /* We map the memory for reading only here. Since we will always look at every byte of the file it makes sense to use MAP_POPULATE. */ - mem = mmap64 (NULL, map_size, PROT_READ, MAP_PRIVATE | MAP_POPULATE, - fd, start_off); + mem = mmap (NULL, map_size, PROT_READ, MAP_PRIVATE | MAP_POPULATE, + fd, start_off); if (mem != MAP_FAILED) { /* We will go through the mapping sequentially. */ @@ -511,7 +515,7 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep) /* Read the file without mapping. */ static int -read_block_no_mmap (int fd, const char *fname, off64_t from, off64_t fdlen) +read_block_no_mmap (int fd, const char *fname, off_t from, off_t fdlen) { char *unprinted = NULL; #define CHUNKSIZE 65536 @@ -573,7 +577,7 @@ read_block_no_mmap (int fd, const char *fname, off64_t from, off64_t fdlen) static int -read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to) +read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to) { if (elfmap == NULL) { @@ -592,23 +596,23 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to) read pointer. */ // XXX Eventually add flag which avoids this if the position // XXX is known to match. - if (from != 0 && lseek64 (fd, from, SEEK_SET) != from) - error (EXIT_FAILURE, errno, gettext ("lseek64 failed")); + if (from != 0 && lseek (fd, from, SEEK_SET) != from) + error (EXIT_FAILURE, errno, gettext ("lseek failed")); return read_block_no_mmap (fd, fname, from, to - from); } - assert ((off64_t) min_len_bytes < fdlen); + assert ((off_t) min_len_bytes < fdlen); - if (to < (off64_t) elfmap_off || from > (off64_t) (elfmap_off + elfmap_size)) + if (to < (off_t) elfmap_off || from > (off_t) (elfmap_off + elfmap_size)) { /* The existing mapping cannot fit at all. Map the new area. We always map the full range of ELFMAP_SIZE bytes even if this extend beyond the end of the file. The Linux kernel handles this OK if the access pages are not touched. */ elfmap_off = from & ~(ps - 1); - if (mmap64 (elfmap, elfmap_size, PROT_READ, - MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, from) + if (mmap (elfmap, elfmap_size, PROT_READ, + MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, from) == MAP_FAILED) error (EXIT_FAILURE, errno, gettext ("re-mmap failed")); elfmap_base = elfmap; @@ -618,23 +622,23 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to) /* Use the existing mapping as much as possible. If necessary, map new pages. */ - if (from >= (off64_t) elfmap_off - && from < (off64_t) (elfmap_off + elfmap_size)) + if (from >= (off_t) elfmap_off + && from < (off_t) (elfmap_off + elfmap_size)) /* There are at least a few bytes in this mapping which we can use. */ process_chunk (fname, elfmap_base + (from - elfmap_off), - MIN (to, (off64_t) (elfmap_off + elfmap_size)), - MIN (to, (off64_t) (elfmap_off + elfmap_size)) - from, + MIN (to, (off_t) (elfmap_off + elfmap_size)), + MIN (to, (off_t) (elfmap_off + elfmap_size)) - from, &unprinted); - if (to > (off64_t) (elfmap_off + elfmap_size)) + if (to > (off_t) (elfmap_off + elfmap_size)) { unsigned char *remap_base = elfmap_base; size_t read_now = elfmap_size - (elfmap_base - elfmap); - assert (from >= (off64_t) elfmap_off - && from < (off64_t) (elfmap_off + elfmap_size)); - off64_t handled_to = elfmap_off + elfmap_size; + assert (from >= (off_t) elfmap_off + && from < (off_t) (elfmap_off + elfmap_size)); + off_t handled_to = elfmap_off + elfmap_size; assert (elfmap == elfmap_base || (elfmap_base - elfmap == (ptrdiff_t) ((min_len_bytes + ps - 1) & ~(ps - 1)))); @@ -671,8 +675,8 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to) assert (handled_to % ps == 0); assert (handled_to % bytes_per_char == 0); - if (mmap64 (remap_base, read_now, PROT_READ, - MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, handled_to) + if (mmap (remap_base, read_now, PROT_READ, + MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, handled_to) == MAP_FAILED) error (EXIT_FAILURE, errno, gettext ("re-mmap failed")); elfmap_off = handled_to; @@ -696,14 +700,14 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to) static int -read_fd (int fd, const char *fname, off64_t fdlen) +read_fd (int fd, const char *fname, off_t fdlen) { return read_block (fd, fname, fdlen, 0, fdlen); } static int -read_elf (Elf *elf, int fd, const char *fname, off64_t fdlen) +read_elf (Elf *elf, int fd, const char *fname, off_t fdlen) { assert (fdlen >= 0); @@ -725,8 +729,25 @@ read_elf (Elf *elf, int fd, const char *fname, off64_t fdlen) actually have content. */ if (shdr != NULL && shdr->sh_type != SHT_NOBITS && (shdr->sh_flags & SHF_ALLOC) != 0) - result |= read_block (fd, fname, fdlen, shdr->sh_offset, - shdr->sh_offset + shdr->sh_size); + { + if (shdr->sh_offset > (Elf64_Off) fdlen + || fdlen - shdr->sh_offset < shdr->sh_size) + { + size_t strndx = 0; + const char *sname; + if (unlikely (elf_getshdrstrndx (elf, &strndx) < 0)) + sname = ""; + else + sname = elf_strptr (elf, strndx, shdr->sh_name) ?: ""; + error (0, 0, + gettext ("Skipping section %zd '%s' data outside file"), + elf_ndxscn (scn), sname); + result = 1; + } + else + result |= read_block (fd, fname, fdlen, shdr->sh_offset, + shdr->sh_offset + shdr->sh_size); + } } while ((scn = elf_nextscn (elf, scn)) != NULL); diff --git a/src/strip.c b/src/strip.c index c9a1d8d..06d7cfd 100644 --- a/src/strip.c +++ b/src/strip.c @@ -1,5 +1,5 @@ /* Discard section not used at runtime from object files. - Copyright (C) 2000-2012, 2014 Red Hat, Inc. + Copyright (C) 2000-2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -110,15 +109,24 @@ static int process_file (const char *fname); /* Handle one ELF file. */ static int handle_elf (int fd, Elf *elf, const char *prefix, - const char *fname, mode_t mode, struct timeval tvp[2]); + const char *fname, mode_t mode, struct timespec tvp[2]); /* Handle all files contained in the archive. */ static int handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, - struct timeval tvp[2]); + struct timespec tvp[2]) __attribute__ ((unused)); + +static int debug_fd = -1; +static char *tmp_debug_fname = NULL; + +/* Close debug file descriptor, if opened. And remove temporary debug file. */ +static void cleanup_debug (void); #define INTERNAL_ERROR(fname) \ - error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s-%s): %s"), \ - fname, __LINE__, PACKAGE_VERSION, __DATE__, elf_errmsg (-1)) + do { \ + cleanup_debug (); \ + error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"), \ + fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1)); \ + } while (0) /* Name of the output file. */ @@ -155,9 +163,6 @@ main (int argc, char *argv[]) int remaining; int result = 0; - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ __fsetlocking (stdin, FSETLOCKING_BYCALLER); __fsetlocking (stdout, FSETLOCKING_BYCALLER); @@ -305,12 +310,12 @@ process_file (const char *fname) /* If we have to preserve the modify and access timestamps get them now. We cannot use fstat() after opening the file since the open would change the access time. */ - struct stat64 pre_st; - struct timeval tv[2]; + struct stat pre_st; + struct timespec tv[2]; again: if (preserve_dates) { - if (stat64 (fname, &pre_st) != 0) + if (stat (fname, &pre_st) != 0) { error (0, errno, gettext ("cannot stat input file '%s'"), fname); return 1; @@ -318,8 +323,8 @@ process_file (const char *fname) /* If we have to preserve the timestamp, we need it in the format utimes() understands. */ - TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim); - TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim); + tv[0] = pre_st.st_atim; + tv[1] = pre_st.st_mtim; } /* Open the file. */ @@ -333,8 +338,8 @@ process_file (const char *fname) /* We always use fstat() even if we called stat() before. This is done to make sure the information returned by stat() is for the same file. */ - struct stat64 st; - if (fstat64 (fd, &st) != 0) + struct stat st; + if (fstat (fd, &st) != 0) { error (0, errno, gettext ("cannot stat input file '%s'"), fname); return 1; @@ -369,7 +374,17 @@ process_file (const char *fname) result = 1; } else - result = handle_ar (fd, elf, NULL, fname, preserve_dates ? tv : NULL); + { + /* We would like to support ar archives, but currently it just + doesn't work at all since we call elf_clone on the members + which doesn't really support ar members. + result = handle_ar (fd, elf, NULL, fname, + preserve_dates ? tv : NULL); + */ + error (0, 0, gettext ("%s: no support for stripping archive"), + fname); + result = 1; + } break; default: @@ -392,14 +407,14 @@ process_file (const char *fname) static int handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, - mode_t mode, struct timeval tvp[2]) + mode_t mode, struct timespec tvp[2]) { size_t prefix_len = prefix == NULL ? 0 : strlen (prefix); size_t fname_len = strlen (fname) + 1; char *fullname = alloca (prefix_len + 1 + fname_len); char *cp = fullname; Elf *debugelf = NULL; - char *tmp_debug_fname = NULL; + tmp_debug_fname = NULL; int result = 0; size_t shdridx = 0; size_t shstrndx; @@ -453,7 +468,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, } } - int debug_fd = -1; + debug_fd = -1; /* Get the EBL handling. Removing all debugging symbols with the -g option or resolving all relocations between debug sections with @@ -478,7 +493,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, the debug file if the file would not contain any information. */ size_t debug_fname_len = strlen (debug_fname); - tmp_debug_fname = (char *) alloca (debug_fname_len + sizeof (".XXXXXX")); + tmp_debug_fname = (char *) xmalloc (debug_fname_len + sizeof (".XXXXXX")); strcpy (mempcpy (tmp_debug_fname, debug_fname, debug_fname_len), ".XXXXXX"); @@ -499,8 +514,19 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Get the section header string table index. */ if (unlikely (elf_getshdrstrndx (elf, &shstrndx) < 0)) - error (EXIT_FAILURE, 0, - gettext ("cannot get section header string table index")); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, + gettext ("cannot get section header string table index")); + } + + /* Get the number of phdrs in the old file. */ + size_t phnum; + if (elf_getphdrnum (elf, &phnum) != 0) + { + cleanup_debug (); + error (EXIT_FAILURE, 0, gettext ("cannot get number of phdrs")); + } /* We now create a new ELF descriptor for the same file. We construct it almost exactly in the same way with some information @@ -513,16 +539,16 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (unlikely (gelf_newehdr (newelf, gelf_getclass (elf)) == 0) || (ehdr->e_type != ET_REL - && unlikely (gelf_newphdr (newelf, ehdr->e_phnum) == 0))) + && unlikely (gelf_newphdr (newelf, phnum) == 0))) { error (0, 0, gettext ("cannot create new file '%s': %s"), - output_fname, elf_errmsg (-1)); + output_fname ?: fname, elf_errmsg (-1)); goto fail; } /* Copy over the old program header if needed. */ if (ehdr->e_type != ET_REL) - for (cnt = 0; cnt < ehdr->e_phnum; ++cnt) + for (cnt = 0; cnt < phnum; ++cnt) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (elf, cnt, &phdr_mem); @@ -537,7 +563,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, debugelf = elf_begin (debug_fd, ELF_C_WRITE_MMAP, NULL); if (unlikely (gelf_newehdr (debugelf, gelf_getclass (elf)) == 0) || (ehdr->e_type != ET_REL - && unlikely (gelf_newphdr (debugelf, ehdr->e_phnum) == 0))) + && unlikely (gelf_newphdr (debugelf, phnum) == 0))) { error (0, 0, gettext ("cannot create new file '%s': %s"), debug_fname, elf_errmsg (-1)); @@ -546,7 +572,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Copy over the old program header if needed. */ if (ehdr->e_type != ET_REL) - for (cnt = 0; cnt < ehdr->e_phnum; ++cnt) + for (cnt = 0; cnt < phnum; ++cnt) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (elf, cnt, &phdr_mem); @@ -618,8 +644,11 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, goto illformed; /* Sections in files other than relocatable object files which - are not loaded can be freely moved by us. In relocatable - object files everything can be moved. */ + not loaded can be freely moved by us. In theory we can also + freely move around allocated nobits sections. But we don't + to keep the layout of all allocated sections as similar as + possible to the original file. In relocatable object files + everything can be moved. */ if (ehdr->e_type == ET_REL || (shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0) shdr_info[cnt].shdr.sh_offset = 0; @@ -636,7 +665,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Cross-reference the sections contained in the section group. */ shdr_info[cnt].data = elf_getdata (shdr_info[cnt].scn, NULL); - if (shdr_info[cnt].data == NULL) + if (shdr_info[cnt].data == NULL + || shdr_info[cnt].data->d_size < sizeof (Elf32_Word)) INTERNAL_ERROR (fname); /* XXX Fix for unaligned access. */ @@ -707,7 +737,9 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, while (idx != 0) { /* The section group data is already loaded. */ - assert (shdr_info[idx].data != NULL); + elf_assert (shdr_info[idx].data != NULL + && shdr_info[idx].data->d_buf != NULL + && shdr_info[idx].data->d_size >= sizeof (Elf32_Word)); /* If the references section group is a normal section group and has one element remaining, or if it is an @@ -763,11 +795,16 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, for (size_t in = 1; in < shdr_info[cnt].data->d_size / sizeof (Elf32_Word); ++in) - if (shdr_info[grpref[in]].idx != 0) + if (grpref[in] < shnum) { - shdr_info[cnt].idx = 1; - break; + if (shdr_info[grpref[in]].idx != 0) + { + shdr_info[cnt].idx = 1; + break; + } } + else + goto illformed; } } @@ -809,8 +846,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Go through all symbols and make sure the section they reference is not removed. */ - size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, - ehdr->e_version); + size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); for (size_t inner = 0; inner < shdr_info[cnt].data->d_size / elsize; @@ -897,7 +933,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, inline void check_preserved (size_t i) { - if (i != 0 && shdr_info[i].idx != 0 + if (i != 0 && i < shnum + 2 && shdr_info[i].idx != 0 && shdr_info[i].debug_data == NULL) { if (shdr_info[i].data == NULL) @@ -926,9 +962,12 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, { scn = elf_newscn (debugelf); if (scn == NULL) - error (EXIT_FAILURE, 0, - gettext ("while generating output file: %s"), - elf_errmsg (-1)); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, + gettext ("while generating output file: %s"), + elf_errmsg (-1)); + } bool discard_section = (shdr_info[cnt].idx > 0 && shdr_info[cnt].debug_data == NULL @@ -968,6 +1007,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, { /* Copy the original data before it gets modified. */ shdr_info[cnt].debug_data = debugdata; + if (debugdata->d_buf == NULL) + INTERNAL_ERROR (fname); debugdata->d_buf = memcpy (xmalloc (debugdata->d_size), debugdata->d_buf, debugdata->d_size); } @@ -996,15 +1037,19 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, } } - /* Mark the section header string table as unused, we will create - a new one. */ - shdr_info[shstrndx].idx = 0; + /* Although we always create a new section header string table we + don't explicitly mark the existing one as unused. It can still + be used through a symbol table section we are keeping. If not it + will already be marked as unused. */ /* We need a string table for the section headers. */ shst = ebl_strtabinit (true); if (shst == NULL) - error (EXIT_FAILURE, errno, gettext ("while preparing output for '%s'"), - output_fname ?: fname); + { + cleanup_debug (); + error (EXIT_FAILURE, errno, gettext ("while preparing output for '%s'"), + output_fname ?: fname); + } /* Assign new section numbers. */ shdr_info[0].idx = 0; @@ -1016,8 +1061,12 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Create a new section. */ shdr_info[cnt].newscn = elf_newscn (newelf); if (shdr_info[cnt].newscn == NULL) - error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"), - elf_errmsg (-1)); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, + gettext ("while generating output file: %s"), + elf_errmsg (-1)); + } elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx); @@ -1053,15 +1102,21 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Create the section. */ shdr_info[cnt].newscn = elf_newscn (newelf); if (shdr_info[cnt].newscn == NULL) - error (EXIT_FAILURE, 0, - gettext ("while create section header section: %s"), - elf_errmsg (-1)); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, + gettext ("while create section header section: %s"), + elf_errmsg (-1)); + } elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx); shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn); if (shdr_info[cnt].data == NULL) - error (EXIT_FAILURE, 0, gettext ("cannot allocate section data: %s"), - elf_errmsg (-1)); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, gettext ("cannot allocate section data: %s"), + elf_errmsg (-1)); + } char *debug_basename = basename (debug_fname_embed ?: debug_fname); off_t crc_offset = strlen (debug_basename) + 1; @@ -1110,18 +1165,24 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Create the section. */ shdr_info[cnt].newscn = elf_newscn (newelf); if (shdr_info[cnt].newscn == NULL) - error (EXIT_FAILURE, 0, - gettext ("while create section header section: %s"), - elf_errmsg (-1)); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, + gettext ("while create section header section: %s"), + elf_errmsg (-1)); + } elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx); /* Finalize the string table and fill in the correct indices in the section headers. */ shstrtab_data = elf_newdata (shdr_info[cnt].newscn); if (shstrtab_data == NULL) - error (EXIT_FAILURE, 0, - gettext ("while create section header string table: %s"), - elf_errmsg (-1)); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, + gettext ("while create section header string table: %s"), + elf_errmsg (-1)); + } ebl_strtabfinalize (shst, shstrtab_data); /* We have to set the section size. */ @@ -1135,7 +1196,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, Elf_Data *newdata; scn = elf_getscn (newelf, shdr_info[cnt].idx); - assert (scn != NULL); + elf_assert (scn != NULL); /* Update the name. */ shdr_info[cnt].shdr.sh_name = ebl_strtaboffset (shdr_info[cnt].se); @@ -1148,13 +1209,17 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (shdr_info[cnt].shdr.sh_type == SHT_GROUP) { - assert (shdr_info[cnt].data != NULL); + elf_assert (shdr_info[cnt].data != NULL + && shdr_info[cnt].data->d_buf != NULL); Elf32_Word *grpref = (Elf32_Word *) shdr_info[cnt].data->d_buf; for (size_t inner = 0; inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word); ++inner) - grpref[inner] = shdr_info[grpref[inner]].idx; + if (grpref[inner] < shnum) + grpref[inner] = shdr_info[grpref[inner]].idx; + else + goto illformed; } /* Handle the SHT_REL, SHT_RELA, and SHF_INFO_LINK flag. */ @@ -1192,19 +1257,18 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, Elf_Data *versiondata = NULL; Elf_Data *shndxdata = NULL; - size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, - ehdr->e_version); + size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); if (shdr_info[cnt].symtab_idx != 0) { - assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX); + elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX); /* This section has extended section information. We have to modify that information, too. */ shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, NULL); elf_assert ((versiondata->d_size / sizeof (Elf32_Word)) - >= shdr_info[cnt].data->d_size / elsize); + >= shdr_info[cnt].data->d_size / elsize); } if (shdr_info[cnt].version_idx != 0) @@ -1216,8 +1280,10 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn, NULL); - elf_assert ((versiondata->d_size / sizeof (GElf_Versym)) - >= shdr_info[cnt].data->d_size / elsize); + elf_assert (versiondata != NULL + && versiondata->d_buf != NULL + && ((versiondata->d_size / sizeof (GElf_Versym)) + >= shdr_info[cnt].data->d_size / elsize)); } shdr_info[cnt].newsymidx @@ -1271,7 +1337,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, sec = shdr_info[sym->st_shndx].idx; else { - elf_assert (shndxdata != NULL); + elf_assert (shndxdata != NULL + && shndxdata->d_buf != NULL); sec = shdr_info[xshndx].idx; } @@ -1312,9 +1379,11 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, shdr_info[cnt].shdr.sh_info = destidx - 1; } } - else if (debug_fname == NULL - || shdr_info[cnt].debug_data == NULL) - /* This is a section or group signature symbol + else if (debug_fname != NULL + && shdr_info[cnt].debug_data == NULL) + /* The symbol points to a section that is discarded + but isn't preserved in the debug file. Check that + this is a section or group signature symbol for a section which has been removed. */ { size_t sidx = (sym->st_shndx != SHN_XINDEX @@ -1380,6 +1449,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* libelf will use d_size to set sh_size. */ Elf_Data *debugdata = elf_getdata (elf_getscn (debugelf, cnt), NULL); + if (debugdata == NULL) + INTERNAL_ERROR (fname); debugdata->d_size = newdata->d_size; } } @@ -1391,6 +1462,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, continue; const Elf32_Word symtabidx = shdr_info[cnt].old_sh_link; + elf_assert (symtabidx < shnum + 2); const Elf32_Word *const newsymidx = shdr_info[symtabidx].newsymidx; switch (shdr_info[cnt].shdr.sh_type) { @@ -1417,10 +1489,14 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, : elf_getscn (newelf, shdr_info[cnt].idx), NULL); - assert (d != NULL); + elf_assert (d != NULL && d->d_buf != NULL + && shdr_info[cnt].shdr.sh_entsize != 0); size_t nrels = (shdr_info[cnt].shdr.sh_size / shdr_info[cnt].shdr.sh_entsize); + size_t symsize = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); + const Elf32_Word symidxn = (shdr_info[symtabidx].data->d_size + / symsize); if (shdr_info[cnt].shdr.sh_type == SHT_REL) for (size_t relidx = 0; relidx < nrels; ++relidx) { @@ -1429,6 +1505,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, INTERNAL_ERROR (fname); size_t symidx = GELF_R_SYM (rel_mem.r_info); + elf_assert (symidx < symidxn); if (newsymidx[symidx] != symidx) { rel_mem.r_info @@ -1447,6 +1524,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, INTERNAL_ERROR (fname); size_t symidx = GELF_R_SYM (rel_mem.r_info); + elf_assert (symidx < symidxn); if (newsymidx[symidx] != symidx) { rel_mem.r_info @@ -1465,7 +1543,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* We have to recompute the hash table. */ - assert (shdr_info[cnt].idx > 0); + elf_assert (shdr_info[cnt].idx > 0); /* The hash section in the new file. */ scn = elf_getscn (newelf, shdr_info[cnt].idx); @@ -1474,31 +1552,38 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, Elf_Data *symd = elf_getdata (elf_getscn (newelf, shdr_info[symtabidx].idx), NULL); - assert (symd != NULL); + elf_assert (symd != NULL && symd->d_buf != NULL); /* The hash table data. */ Elf_Data *hashd = elf_getdata (scn, NULL); - assert (hashd != NULL); + elf_assert (hashd != NULL && hashd->d_buf != NULL); if (shdr_info[cnt].shdr.sh_entsize == sizeof (Elf32_Word)) { /* Sane arches first. */ + elf_assert (hashd->d_size >= 2 * sizeof (Elf32_Word)); Elf32_Word *bucket = (Elf32_Word *) hashd->d_buf; size_t strshndx = shdr_info[symtabidx].old_sh_link; - size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, - ehdr->e_version); + size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); + + Elf32_Word nchain = bucket[1]; + Elf32_Word nbucket = bucket[0]; + uint64_t used_buf = ((2ULL + nchain + nbucket) + * sizeof (Elf32_Word)); + elf_assert (used_buf <= hashd->d_size); /* Adjust the nchain value. The symbol table size changed. We keep the same size for the bucket array. */ bucket[1] = symd->d_size / elsize; - Elf32_Word nbucket = bucket[0]; bucket += 2; Elf32_Word *chain = bucket + nbucket; /* New size of the section. */ - hashd->d_size = ((2 + symd->d_size / elsize + nbucket) + size_t n_size = ((2 + symd->d_size / elsize + nbucket) * sizeof (Elf32_Word)); + elf_assert (n_size <= hashd->d_size); + hashd->d_size = n_size; update_section_size (hashd); /* Clear the arrays. */ @@ -1515,7 +1600,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, const char *name = elf_strptr (elf, strshndx, sym->st_name); - elf_assert (name != NULL); + elf_assert (name != NULL && nbucket != 0); size_t hidx = elf_hash (name) % nbucket; if (bucket[hidx] == 0) @@ -1524,7 +1609,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, { hidx = bucket[hidx]; - while (chain[hidx] != 0) + while (chain[hidx] != 0 && chain[hidx] < nchain) hidx = chain[hidx]; chain[hidx] = inner; @@ -1540,19 +1625,27 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf; size_t strshndx = shdr_info[symtabidx].old_sh_link; - size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, - ehdr->e_version); + size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); + + elf_assert (symd->d_size >= 2 * sizeof (Elf64_Xword)); + Elf64_Xword nbucket = bucket[0]; + Elf64_Xword nchain = bucket[1]; + uint64_t maxwords = hashd->d_size / sizeof (Elf64_Xword); + elf_assert (maxwords >= 2 + && maxwords - 2 >= nbucket + && maxwords - 2 - nbucket >= nchain); /* Adjust the nchain value. The symbol table size changed. We keep the same size for the bucket array. */ bucket[1] = symd->d_size / elsize; - Elf64_Xword nbucket = bucket[0]; bucket += 2; Elf64_Xword *chain = bucket + nbucket; /* New size of the section. */ - hashd->d_size = ((2 + symd->d_size / elsize + nbucket) + size_t n_size = ((2 + symd->d_size / elsize + nbucket) * sizeof (Elf64_Xword)); + elf_assert (n_size <= hashd->d_size); + hashd->d_size = n_size; update_section_size (hashd); /* Clear the arrays. */ @@ -1569,7 +1662,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, const char *name = elf_strptr (elf, strshndx, sym->st_name); - elf_assert (name != NULL); + elf_assert (name != NULL && nbucket != 0); size_t hidx = elf_hash (name) % nbucket; if (bucket[hidx] == 0) @@ -1578,7 +1671,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, { hidx = bucket[hidx]; - while (chain[hidx] != 0) + while (chain[hidx] != 0 && chain[hidx] < nchain) hidx = chain[hidx]; chain[hidx] = inner; @@ -1592,7 +1685,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (no_symtab_updates ()) break; - assert (shdr_info[cnt].idx > 0); + elf_assert (shdr_info[cnt].idx > 0); /* The symbol version section in the new file. */ scn = elf_getscn (newelf, shdr_info[cnt].idx); @@ -1600,20 +1693,22 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* The symbol table data. */ symd = elf_getdata (elf_getscn (newelf, shdr_info[symtabidx].idx), NULL); - assert (symd != NULL); + elf_assert (symd != NULL && symd->d_buf != NULL); + size_t symz = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); + const Elf32_Word syms = (shdr_info[symtabidx].data->d_size / symz); /* The version symbol data. */ Elf_Data *verd = elf_getdata (scn, NULL); - assert (verd != NULL); + elf_assert (verd != NULL && verd->d_buf != NULL); /* The symbol version array. */ GElf_Half *verstab = (GElf_Half *) verd->d_buf; /* Walk through the list and */ - size_t elsize = gelf_fsize (elf, verd->d_type, 1, - ehdr->e_version); - for (size_t inner = 1; inner < verd->d_size / elsize; ++inner) - if (newsymidx[inner] != 0) + size_t elsize = gelf_fsize (elf, verd->d_type, 1, EV_CURRENT); + Elf32_Word vers = verd->d_size / elsize; + for (size_t inner = 1; inner < vers && inner < syms; ++inner) + if (newsymidx[inner] != 0 && newsymidx[inner] < vers) /* Overwriting the same array works since the reordering can only move entries to lower indices in the array. */ @@ -1623,8 +1718,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, verd->d_size = gelf_fsize (newelf, verd->d_type, symd->d_size / gelf_fsize (elf, symd->d_type, 1, - ehdr->e_version), - ehdr->e_version); + EV_CURRENT), + EV_CURRENT); update_section_size (verd); break; @@ -1637,8 +1732,12 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, scn = elf_getscn (newelf, shdr_info[cnt].idx); GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); - assert (shdr != NULL); + elf_assert (shdr != NULL); + size_t symsz = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); + const Elf32_Word symn = (shdr_info[symtabidx].data->d_size + / symsz); + elf_assert (shdr->sh_info < symn); shdr->sh_info = newsymidx[shdr->sh_info]; (void) gelf_update_shdr (scn, shdr); @@ -1682,18 +1781,23 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* OK, lets relocate all trivial cross debug section relocations. */ Elf_Data *reldata = elf_getdata (scn, NULL); + if (reldata == NULL || reldata->d_buf == NULL) + INTERNAL_ERROR (fname); /* We actually wanted the rawdata, but since we already accessed it earlier as elf_getdata () that won't work. But debug sections are all ELF_T_BYTE, so it doesn't really matter. */ Elf_Data *tdata = elf_getdata (tscn, NULL); - if (tdata->d_type != ELF_T_BYTE) + if (tdata == NULL || tdata->d_buf == NULL + || tdata->d_type != ELF_T_BYTE) INTERNAL_ERROR (fname); /* Pick up the symbol table and shndx table to resolve relocation symbol indexes. */ Elf64_Word symt = shdr->sh_link; Elf_Data *symdata, *xndxdata; + elf_assert (symt < shnum + 2); + elf_assert (shdr_info[symt].symtab_idx < shnum + 2); symdata = (shdr_info[symt].debug_data ?: shdr_info[symt].data); xndxdata = (shdr_info[shdr_info[symt].symtab_idx].debug_data @@ -1726,6 +1830,9 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, &xndx); Elf32_Word sec = (sym->st_shndx == SHN_XINDEX ? xndx : sym->st_shndx); + if (sec >= shnum + 2) + INTERNAL_ERROR (fname); + if (ebl_debugscn_p (ebl, shdr_info[sec].name)) { size_t size; @@ -1749,7 +1856,10 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (offset > tdata->d_size || tdata->d_size - offset < size) - error (0, 0, gettext ("bad relocation")); + { + cleanup_debug (); + error (EXIT_FAILURE, 0, gettext ("bad relocation")); + } /* When the symbol value is zero then for SHT_REL sections this is all that needs to be checked. @@ -1821,6 +1931,9 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, return false; } + if (shdr->sh_entsize == 0) + INTERNAL_ERROR (fname); + size_t nrels = shdr->sh_size / shdr->sh_entsize; size_t next = 0; if (shdr->sh_type == SHT_REL) @@ -1867,7 +1980,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (unlikely (elf_update (debugelf, ELF_C_WRITE) == -1)) { error (0, 0, gettext ("while writing '%s': %s"), - debug_fname, elf_errmsg (-1)); + tmp_debug_fname, elf_errmsg (-1)); result = 1; goto fail_close; } @@ -1883,6 +1996,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, } /* The temporary file does not exist anymore. */ + free (tmp_debug_fname); tmp_debug_fname = NULL; if (!remove_shdrs) @@ -1955,7 +2069,8 @@ while computing checksum for debug information")); if (gelf_update_ehdr (newelf, newehdr) == 0) { error (0, 0, gettext ("%s: error while creating ELF header: %s"), - fname, elf_errmsg (-1)); + output_fname ?: fname, elf_errmsg (-1)); + cleanup_debug (); return 1; } @@ -1964,6 +2079,7 @@ while computing checksum for debug information")); { error (0, 0, gettext ("%s: error while reading the file: %s"), fname, elf_errmsg (-1)); + cleanup_debug (); return 1; } @@ -1977,7 +2093,7 @@ while computing checksum for debug information")); if (elf_update (newelf, ELF_C_WRITE) == -1) { error (0, 0, gettext ("while writing '%s': %s"), - fname, elf_errmsg (-1)); + output_fname ?: fname, elf_errmsg (-1)); result = 1; } @@ -1999,10 +2115,10 @@ while computing checksum for debug information")); || (pwrite_retry (fd, zero, sizeof zero, offsetof (Elf32_Ehdr, e_shentsize)) != sizeof zero) - || ftruncate64 (fd, shdr_info[shdridx].shdr.sh_offset) < 0) + || ftruncate (fd, shdr_info[shdridx].shdr.sh_offset) < 0) { error (0, errno, gettext ("while writing '%s'"), - fname); + output_fname ?: fname); result = 1; } } @@ -2019,10 +2135,10 @@ while computing checksum for debug information")); || (pwrite_retry (fd, zero, sizeof zero, offsetof (Elf64_Ehdr, e_shentsize)) != sizeof zero) - || ftruncate64 (fd, shdr_info[shdridx].shdr.sh_offset) < 0) + || ftruncate (fd, shdr_info[shdridx].shdr.sh_offset) < 0) { error (0, errno, gettext ("while writing '%s'"), - fname); + output_fname ?: fname); result = 1; } } @@ -2058,8 +2174,8 @@ while computing checksum for debug information")); /* That was it. Close the descriptors. */ if (elf_end (newelf) != 0) { - error (0, 0, gettext ("error while finishing '%s': %s"), fname, - elf_errmsg (-1)); + error (0, 0, gettext ("error while finishing '%s': %s"), + output_fname ?: fname, elf_errmsg (-1)); result = 1; } @@ -2075,18 +2191,12 @@ while computing checksum for debug information")); if (ebl != NULL) ebl_closebackend (ebl); - /* Close debug file descriptor, if opened */ - if (debug_fd >= 0) - { - if (tmp_debug_fname != NULL) - unlink (tmp_debug_fname); - close (debug_fd); - } + cleanup_debug (); /* If requested, preserve the timestamp. */ if (tvp != NULL) { - if (futimes (fd, tvp) != 0) + if (futimens (fd, tvp) != 0) { error (0, errno, gettext ("\ cannot set access and modification date of '%s'"), @@ -2102,10 +2212,25 @@ cannot set access and modification date of '%s'"), return result; } +static void +cleanup_debug (void) +{ + if (debug_fd >= 0) + { + if (tmp_debug_fname != NULL) + { + unlink (tmp_debug_fname); + free (tmp_debug_fname); + tmp_debug_fname = NULL; + } + close (debug_fd); + debug_fd = -1; + } +} static int handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, - struct timeval tvp[2]) + struct timespec tvp[2]) { size_t prefix_len = prefix == NULL ? 0 : strlen (prefix); size_t fname_len = strlen (fname) + 1; @@ -2143,7 +2268,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname, if (tvp != NULL) { - if (unlikely (futimes (fd, tvp) != 0)) + if (unlikely (futimens (fd, tvp) != 0)) { error (0, errno, gettext ("\ cannot set access and modification date of '%s'"), fname); diff --git a/src/unstrip.c b/src/unstrip.c index f6af450..85e0a1d 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -1,5 +1,5 @@ /* Combine stripped files with separate symbols and debug information. - Copyright (C) 2007-2012, 2014 Red Hat, Inc. + Copyright (C) 2007-2012, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Roland McGrath , 2007. @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -177,9 +176,9 @@ parse_opt (int key, char *arg, struct argp_state *state) if (info->output_dir != NULL) { - struct stat64 st; + struct stat st; error_t fail = 0; - if (stat64 (info->output_dir, &st) < 0) + if (stat (info->output_dir, &st) < 0) fail = errno; else if (!S_ISDIR (st.st_mode)) fail = ENOTDIR; @@ -241,7 +240,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ #define ELF_CHECK(call, msg) \ do \ { \ - if (!(call)) \ + if (unlikely (!(call))) \ error (EXIT_FAILURE, 0, msg, elf_errmsg (-1)); \ } while (0) @@ -257,13 +256,17 @@ copy_elf (Elf *outelf, Elf *inelf) ELF_CHECK (gelf_update_ehdr (outelf, ehdr), _("cannot copy ELF header: %s")); - if (ehdr->e_phnum > 0) + size_t phnum; + ELF_CHECK (elf_getphdrnum (inelf, &phnum) == 0, + _("cannot get number of program headers: %s")); + + if (phnum > 0) { - ELF_CHECK (gelf_newphdr (outelf, ehdr->e_phnum), + ELF_CHECK (gelf_newphdr (outelf, phnum), _("cannot create program headers: %s")); GElf_Phdr phdr_mem; - for (uint_fast16_t i = 0; i < ehdr->e_phnum; ++i) + for (size_t i = 0; i < phnum; ++i) ELF_CHECK (gelf_update_phdr (outelf, i, gelf_getphdr (inelf, i, &phdr_mem)), _("cannot copy program header: %s")); @@ -308,6 +311,38 @@ make_directories (const char *path) error (EXIT_FAILURE, errno, _("cannot create directory '%s'"), dir); } +/* Keep track of new section data we are creating, so we can free it + when done. */ +struct data_list +{ + void *data; + struct data_list *next; +}; + +struct data_list *new_data_list; + +static void +record_new_data (void *data) +{ + struct data_list *next = new_data_list; + new_data_list = xmalloc (sizeof (struct data_list)); + new_data_list->data = data; + new_data_list->next = next; +} + +static void +free_new_data (void) +{ + struct data_list *list = new_data_list; + while (list != NULL) + { + struct data_list *next = list->next; + free (list->data); + free (list); + list = next; + } + new_data_list = NULL; +} /* The binutils linker leaves gratuitous section symbols in .symtab that strip has to remove. Older linkers likewise include a @@ -469,6 +504,7 @@ adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, if (old_chain[i] != STN_UNDEF) \ new_chain[map[i - 1]] = map[old_chain[i] - 1]; \ \ + record_new_data (new_hash); \ data->d_buf = new_hash; \ data->d_size = nent * sizeof new_hash[0]; \ } @@ -511,6 +547,7 @@ adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, ELF_CHECK (v != NULL, _("cannot get symbol version: %s")); } + record_new_data (versym); data->d_buf = versym; data->d_size = nent * shdr->sh_entsize; elf_flagdata (data, ELF_C_SET, ELF_F_DIRTY); @@ -520,7 +557,7 @@ adjust_relocs (Elf_Scn *outscn, Elf_Scn *inscn, const GElf_Shdr *shdr, default: error (EXIT_FAILURE, 0, - _("unexpected section type in [%Zu] with sh_link to symtab"), + _("unexpected section type in [%zu] with sh_link to symtab"), elf_ndxscn (inscn)); } } @@ -568,6 +605,7 @@ add_new_section_symbols (Elf_Scn *old_symscn, size_t old_shnum, symdata->d_size = shdr->sh_size; symdata->d_buf = xmalloc (symdata->d_size); + record_new_data (symdata->d_buf); /* Copy the existing section symbols. */ Elf_Data *old_symdata = elf_getdata (old_symscn, NULL); @@ -768,7 +806,7 @@ collect_symbols (Elf *outelf, bool rel, Elf_Scn *symscn, Elf_Scn *strscn, if (sym->st_name >= strdata->d_size) error (EXIT_FAILURE, 0, - _("invalid string offset in symbol [%Zu]"), i); + _("invalid string offset in symbol [%zu]"), i); struct symbol *s = &table[i - 1]; s->map = &map[i - 1]; @@ -864,12 +902,28 @@ compare_symbols_output (const void *a, const void *b) #undef CMP +/* Return true if the flags of the sections match, ignoring the SHF_INFO_LINK + flag if the section contains relocation information. */ +static bool +sections_flags_match (Elf64_Xword sh_flags1, Elf64_Xword sh_flags2, + Elf64_Word sh_type) +{ + if (sh_type == SHT_REL || sh_type == SHT_RELA) + { + sh_flags1 &= ~SHF_INFO_LINK; + sh_flags2 &= ~SHF_INFO_LINK; + } + + return sh_flags1 == sh_flags2; +} + /* Return true iff the flags, size, and name match. */ static bool sections_match (const struct section *sections, size_t i, const GElf_Shdr *shdr, const char *name) { - return (sections[i].shdr.sh_flags == shdr->sh_flags + return (sections_flags_match (sections[i].shdr.sh_flags, shdr->sh_flags, + sections[i].shdr.sh_type) && (sections[i].shdr.sh_size == shdr->sh_size || (sections[i].shdr.sh_size < shdr->sh_size && section_can_shrink (§ions[i].shdr))) @@ -910,7 +964,7 @@ static inline const char * get_section_name (size_t ndx, const GElf_Shdr *shdr, const Elf_Data *shstrtab) { if (shdr->sh_name >= shstrtab->d_size) - error (EXIT_FAILURE, 0, _("cannot read section [%Zu] name: %s"), + error (EXIT_FAILURE, 0, _("cannot read section [%zu] name: %s"), ndx, elf_errmsg (-1)); return shstrtab->d_buf + shdr->sh_name; } @@ -927,10 +981,6 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, struct section *sections, size_t nalloc, size_t nsections) { - /* Clear assignments that might have been bogus. */ - for (size_t i = 0; i < nalloc; ++i) - sections[i].outscn = NULL; - Elf_Scn *undo = NULL; for (size_t i = nalloc; i < nsections; ++i) { @@ -949,6 +999,10 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, size_t undo_nalloc = 0; if (undo != NULL) { + /* Clear assignments that might have been bogus. */ + for (size_t i = 0; i < nalloc; ++i) + sections[i].outscn = NULL; + Elf_Data *undodata = elf_rawdata (undo, NULL); ELF_CHECK (undodata != NULL, _("cannot read '.gnu.prelink_undo' section: %s")); @@ -994,13 +1048,15 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, error (EXIT_FAILURE, 0, _("invalid contents in '%s' section"), ".gnu.prelink_undo"); - union - { - Elf32_Shdr s32[shnum - 1]; - Elf64_Shdr s64[shnum - 1]; - } shdr; - dst.d_buf = &shdr; - dst.d_size = sizeof shdr; + bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; + size_t shsize = class32 ? sizeof (Elf32_Shdr) : sizeof (Elf64_Shdr); + if (unlikely ((shnum - 1) > SIZE_MAX / shsize)) + error (EXIT_FAILURE, 0, _("overflow with shnum = %zu in '%s' section"), + (size_t) shnum, ".gnu.prelink_undo"); + const size_t shdr_bytes = (shnum - 1) * shsize; + void *shdr = xmalloc (shdr_bytes); + dst.d_buf = shdr; + dst.d_size = shdr_bytes; ELF_CHECK (gelf_xlatetom (main, &dst, &src, main_ehdr->e_ident[EI_DATA]) != NULL, _("cannot read '.gnu.prelink_undo' section: %s")); @@ -1009,9 +1065,11 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, for (size_t i = 0; i < shnum - 1; ++i) { struct section *sec = &undo_sections[undo_nalloc]; - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) + Elf32_Shdr (*s32)[shnum - 1] = shdr; + Elf64_Shdr (*s64)[shnum - 1] = shdr; + if (class32) { -#define COPY(field) sec->shdr.field = shdr.s32[i].field +#define COPY(field) sec->shdr.field = (*s32)[i].field COPY (sh_name); COPY (sh_type); COPY (sh_flags); @@ -1025,7 +1083,7 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, #undef COPY } else - sec->shdr = shdr.s64[i]; + sec->shdr = (*s64)[i]; if (sec->shdr.sh_flags & SHF_ALLOC) { sec->shdr.sh_addr += bias; @@ -1038,6 +1096,7 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, } qsort (undo_sections, undo_nalloc, sizeof undo_sections[0], compare_sections_nonrel); + free (shdr); } bool fail = false; @@ -1046,7 +1105,7 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, if (!match) { fail = true; - error (0, 0, _("cannot find matching section for [%Zu] '%s'"), + error (0, 0, _("cannot find matching section for [%zu] '%s'"), elf_ndxscn (scn), name); } } @@ -1251,7 +1310,7 @@ more sections in stripped file than debug file -- arguments reversed?")); sections[i].name = elf_strptr (stripped, stripped_shstrndx, shdr->sh_name); if (sections[i].name == NULL) - error (EXIT_FAILURE, 0, _("cannot read section [%Zu] name: %s"), + error (EXIT_FAILURE, 0, _("cannot read section [%zu] name: %s"), elf_ndxscn (scn), elf_errmsg (-1)); sections[i].scn = scn; sections[i].outscn = NULL; @@ -1371,7 +1430,7 @@ more sections in stripped file than debug file -- arguments reversed?")); if (sec == NULL) error (EXIT_FAILURE, 0, - _("cannot find matching section for [%Zu] '%s'"), + _("cannot find matching section for [%zu] '%s'"), elf_ndxscn (scn), name); sec->outscn = scn; @@ -1497,9 +1556,17 @@ more sections in stripped file than debug file -- arguments reversed?")); shdr_mem.sh_size = sec->shdr.sh_size; shdr_mem.sh_info = sec->shdr.sh_info; shdr_mem.sh_link = sec->shdr.sh_link; + + /* Buggy binutils objdump might have stripped the SHF_INFO_LINK + put it back if necessary. */ + if ((sec->shdr.sh_type == SHT_REL || sec->shdr.sh_type == SHT_RELA) + && sec->shdr.sh_flags != shdr_mem.sh_flags + && (sec->shdr.sh_flags & SHF_INFO_LINK) != 0) + shdr_mem.sh_flags |= SHF_INFO_LINK; + if (sec->shdr.sh_link != SHN_UNDEF) shdr_mem.sh_link = ndx_section[sec->shdr.sh_link - 1]; - if (shdr_mem.sh_flags & SHF_INFO_LINK) + if (SH_INFO_LINK_P (&sec->shdr) && sec->shdr.sh_info != 0) shdr_mem.sh_info = ndx_section[sec->shdr.sh_info - 1]; if (strtab != NULL) @@ -1548,7 +1615,7 @@ more sections in stripped file than debug file -- arguments reversed?")); { if (shndx >= stripped_shnum) error (EXIT_FAILURE, 0, - _("symbol [%Zu] has invalid section index"), i); + _("symbol [%zu] has invalid section index"), i); shndx = ndx_section[shndx - 1]; if (shndx < SHN_LORESERVE) @@ -1682,11 +1749,55 @@ more sections in stripped file than debug file -- arguments reversed?")); symstrdata = elf_getdata (unstripped_strtab, NULL); Elf_Data *shndxdata = NULL; /* XXX */ + /* If symtab and the section header table share the string table + add the section names to the strtab and then (after finalizing) + fixup the section header sh_names. Also dispose of the old data. */ + struct Ebl_Strent *unstripped_strent[unstripped_shnum - 1]; + if (unstripped_shstrndx == elf_ndxscn (unstripped_strtab)) + { + for (size_t i = 0; i < unstripped_shnum - 1; ++i) + { + Elf_Scn *sec = elf_getscn (unstripped, i + 1); + GElf_Shdr mem; + GElf_Shdr *hdr = gelf_getshdr (sec, &mem); + const char *name = get_section_name (i + 1, hdr, shstrtab); + unstripped_strent[i + 1] = ebl_strtabadd (symstrtab, name, 0); + ELF_CHECK (unstripped_strent[i + 1] != NULL, + _("cannot add section name to string table: %s")); + } + + if (strtab != NULL) + { + ebl_strtabfree (strtab); + free (strtab_data->d_buf); + strtab = NULL; + } + } + ebl_strtabfinalize (symstrtab, symstrdata); elf_flagdata (symstrdata, ELF_C_SET, ELF_F_DIRTY); + /* And update the section header names if necessary. */ + if (unstripped_shstrndx == elf_ndxscn (unstripped_strtab)) + { + for (size_t i = 0; i < unstripped_shnum - 1; ++i) + { + Elf_Scn *sec = elf_getscn (unstripped, i + 1); + GElf_Shdr mem; + GElf_Shdr *hdr = gelf_getshdr (sec, &mem); + shdr->sh_name = ebl_strtaboffset (unstripped_strent[i + 1]); + update_shdr (sec, hdr); + } + } + + /* Now update the symtab shdr. Reload symtab shdr because sh_name + might have changed above. */ + shdr = gelf_getshdr (unstripped_symtab, &shdr_mem); + ELF_CHECK (shdr != NULL, _("cannot get section header: %s")); + shdr->sh_size = symdata->d_size = (1 + nsym) * shdr->sh_entsize; symdata->d_buf = xmalloc (symdata->d_size); + record_new_data (symdata->d_buf); GElf_Sym sym; memset (&sym, 0, sizeof sym); @@ -1823,12 +1934,16 @@ more sections in stripped file than debug file -- arguments reversed?")); } while (skip_reloc); - if (stripped_ehdr->e_phnum > 0) - ELF_CHECK (gelf_newphdr (unstripped, stripped_ehdr->e_phnum), + size_t phnum; + ELF_CHECK (elf_getphdrnum (stripped, &phnum) == 0, + _("cannot get number of program headers: %s")); + + if (phnum > 0) + ELF_CHECK (gelf_newphdr (unstripped, phnum), _("cannot create program headers: %s")); /* Copy each program header from the stripped file. */ - for (uint_fast16_t i = 0; i < stripped_ehdr->e_phnum; ++i) + for (size_t i = 0; i < phnum; ++i) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (stripped, i, &phdr_mem); @@ -1848,13 +1963,12 @@ more sections in stripped file than debug file -- arguments reversed?")); free (strtab_data->d_buf); } - if (symdata != NULL) - free (symdata->d_buf); if (symstrtab != NULL) { ebl_strtabfree (symstrtab); free (symstrdata->d_buf); } + free_new_data (); } /* Process one pair of files, already opened. */ @@ -1863,11 +1977,15 @@ handle_file (const char *output_file, bool create_dirs, Elf *stripped, const GElf_Ehdr *stripped_ehdr, Elf *unstripped) { + size_t phnum; + ELF_CHECK (elf_getphdrnum (stripped, &phnum) == 0, + _("cannot get number of program headers: %s")); + /* Determine the address bias between the debuginfo file and the main file, which may have been modified by prelinking. */ GElf_Addr bias = 0; if (unstripped != NULL) - for (uint_fast16_t i = 0; i < stripped_ehdr->e_phnum; ++i) + for (size_t i = 0; i < phnum; ++i) { GElf_Phdr phdr_mem; GElf_Phdr *phdr = gelf_getphdr (stripped, i, &phdr_mem); @@ -1905,7 +2023,7 @@ DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u"), make_directories (output_file); /* Copy the unstripped file and then modify it. */ - int outfd = open64 (output_file, O_RDWR | O_CREAT, + int outfd = open (output_file, O_RDWR | O_CREAT, stripped_ehdr->e_type == ET_REL ? 0666 : 0777); if (outfd < 0) error (EXIT_FAILURE, errno, _("cannot open '%s'"), output_file); @@ -1935,7 +2053,7 @@ DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u"), static int open_file (const char *file, bool writable) { - int fd = open64 (file, writable ? O_RDWR : O_RDONLY); + int fd = open (file, writable ? O_RDWR : O_RDONLY); if (fd < 0) error (EXIT_FAILURE, errno, _("cannot open '%s'"), file); return fd; @@ -2240,9 +2358,6 @@ handle_implicit_modules (const struct arg_info *info) int main (int argc, char **argv) { - /* Make memory leak detection possible. */ - mtrace (); - /* We use no threads here which can interfere with handling a stream. */ __fsetlocking (stdin, FSETLOCKING_BYCALLER); __fsetlocking (stdout, FSETLOCKING_BYCALLER); diff --git a/tests/ChangeLog b/tests/ChangeLog index dce6ebe..366aea9 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,552 @@ +2016-01-08 Mark Wielaard + + * elfputzdata.c (main): Fix parentheses in strncmp test. + +2016-01-08 Mark Wielaard + + * elfputzdata.c (main): Use PRId64 to print 64 bit value. + +2016-01-08 Mark Wielaard + + * Makefile.am (TESTS): Always unconditionally add + run-readelf-zdebug.sh and run-readelf-zdebug-rel.sh. + +2015-12-16 Mark Wielaard + + * run-compress-test.sh: New test. + * Makefile.am (TESTS): Add run-compress-test.sh. + (EXTRA_DISTS): Likewise. + +2015-11-26 Mark Wielaard + + * zstrptr.c: New file. + * run-zstrptr.sh: New test. + * elfputzdata.c (main): (re)compress .shstrtab. + * run-elfputzdata.sh: Expect .shstrtab compression. + * Makefile.am (check_PROGRAMS): Add zstrptr. + (TESTS): Add run-zstrptr.sh. + (EXTRA_DIST): Likewise. + (zstrptr_LDADD): New variable. + +2015-10-20 Mark Wielaard + + * run-readelf-zx.sh: New test. + * run-readelf-zp.sh: Likewise. + * Makefile.am (TESTS): Add run-readelf-zx.sh and run-readelf-zp.sh. + (EXTRA_DIST): Likewise. + +2015-10-21 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add elfgetzdata and elfputzdata. + (TESTS): Add run-elfgetzdata.sh and run-elfputzdata.sh. + (EXTRA_DIST: Likewise. + (elfgetzdata_LDADD): New variable. + (elfputzdata_LDADD): Likewise. + * elfgetzdata.c: New file. + * elfputzdata.c: Likewise. + * msg_tst.c: Handle ELF_E_ALREADY_COMPRESSED, + ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and + ELF_E_DECOMPRESS_ERROR. + * run-elfgetzdata.sh: New test. + * run-elfputzdata.sh: Likewise. + +2015-10-28 Mark Wielaard + + * run-readelf-z.sh: New test. + * Makefile.am (TESTS): Add run-readelf-z.sh. + (EXTRA_DIST): Likewise. + +2015-10-28 Mark Wielaard + + * elfgetchdr.c: New file. + * run-elfgetchdr.sh: New test. + * testfile-zgabi32.bz2: New testfile. + * testfile-zgabi32be.bz2: Likewise. + * testfile-zgabi64.bz2: Likewise. + * testfile-zgabi64be.bz2: Likewise. + * Makefile.am (check_PROGRAMS): Add elfgetchdr. + (TESTS): Add run-elfgetchdr.sh. + (EXTRA_DIST): Add run-elfgetchdr.sh, testfile-zgabi32.bz2, + testfile-zgabi32be.bz2, testfile-zgabi64.bz2, testfile-zgabi64be.bz2. + (welfgetchdr_LDADD): New variable. + * msg_tst.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE + and ELF_E_INVALID_SECTION_FLAGS, + + +2015-10-28 Mark Wielaard + + * dwelfgnucompressed.c: New file. + * run-dwelfgnucompressed.sh: New test. + * testfile-zgnu32.bz2: New testfile. + * testfile-zgnu64.bz2: Likewise. + * Makefile.am (check_PROGRAMS): Add dwelfgnucompressed. + (TESTS): Add run-dwelfgnucompressed.sh. + (EXTRA_DIST): Add run-dwelfgnucompressed.sh, testfile-zgnu32.bz2, + testfile-zgnu64.bz2, testfile-zgnu32be.bz2, testfile-zgnu64be.bz2. + (dwelfgnucompressed_LDADD): New variable. + +2015-12-31 Mark Wielaard + + * elfstrmerge.c (main): Warn about STT_SECTION symbol for shstrhndx. + * run-elfstrmerge-test.sh: New test. + * Makefile.am (TESTS): Add run-elfstrmerge-test.sh + (EXTRA_DIST): Likewise. + +2015-12-08 Jose E. Marchesi + + * run-backtrace-core-sparc.sh: New file. + * backtrace.sparc.core.bz2: New file. + * backtrace.sparc.exec.bz2: New file. + * Makefile.am (EXTRA_DIST): ... and added all here. + (TESTS): Added run-backtrace-core-sparc.sh. + +2015-12-02 Mark Wielaard + + * Makefile.am (valgrind_cmd): Use --leak-check=full. + * run-backtrace-demangle.sh: Disable valgrind. + * run-stack-demangled-test.sh: Likewise. + * run-stack-d-test.sh: Likewise. + * run-stack-i-test.sh: Likewise. + +2015-12-01 Mark Wielaard + + * test-flag-nobits.c (main): Call elf_end. + * rerequest_tag.c (main): Call dwarf_end. + * funcscopes.c (handle_function): Free scopes. + * dwarf-getstring.c (main): Call dwarf_end. + * allregs.c (main): Free state.info. + * alldts.c (main): Free dyn. + * addrcfi.c (handle_address): Free stuff.frame between handle_cfi + calls. + * addrscopes.c (handle_address): Free scopes. + +2015-10-16 Mark Wielaard + + * Makefile.am [BUILD_STATIC] (libdw): Add -lz. + [BUILD_STATIC] (libelf): Likewise. + +2015-10-16 Mark Wielaard + + * Makefile.am (dwfl_proc_attach_LDFLAGS): Add AM_LDFLAGS. + +2015-10-09 Josh Stone + + * lfs-symbols: New list of LFS-related symbols from lintian. + * testfile-nolfs.bz2: New test binary for sanity checking. + * run-lfs-symbols.sh: New test. + * Makefile.am (TESTS): Add run-lfs-symbols.sh. + (EXTRA_DIST): Add lfs-symbols, testfile-nolfs.bz2, and + run-lfs-symbols.sh. + * alldts.c (main): Replace open64 with open. + * dwarf-getstring.c (main): Likewise. + * arls.c: Include config.h. + * ecp.c: Likewise. + * rdwrmmap.c: Likewise. + * test-elf_cntl_gelf_getshdr.c: Likewise. + * test-flag-nobits.c: Include config.h. + (main): Replace open64 with open. + +2015-10-09 Mark Wielaard + + * elfshphehdr.c (check): Rename argument from check to statement. + (check_elf): Likewise. + +2015-10-05 Josh Stone + + * Makefile.am (backtrace-child-biarch): Add AM_V_CC silencer. + +2015-10-02 Mark Wielaard + + * elfstrmerge.c: New check program. + * run-strip-strmerge.sh: New test. + * Makefile.am (check_PROGRAMS): Add elfstrmerge. + (EXTRA_DIST): Add run-strip-strmerge.sh + (elfstrmerge_LDADD): New variable. + +2015-09-29 Mark Wielaard + + * elfshphehdr.c: New test. + * Makefile.am (check_PROGRAMS): Add elfshphehdr. + (TESTS): Likewise. + (elfshphehdr_LDADD): New variable. + +2015-09-08 Mark Wielaard + + * dwfl-proc-attach.c: New test. + * Makefile.am (check_PROGRAMS): Add dwfl-proc-attach. + (TESTS): Likewise. + (dwfl_proc_attach_LDADD): New variable. + (dwfl_proc_attach_LDFLAGS): Likewise. + +2015-09-04 Chih-Hung Hsieh + + * varlocs.c (print_base_type): Initialize enctype. + +2015-09-04 Chih-Hung Hsieh + + * md5-sha1-test.c (md5_expected): Removed. + (sha1_expected): Likewise. + +2015-09-04 Chih-Hung Hsieh + + * asm-tst1.c (main): Replace %Z length modifier with %z. + * asm-tst2.c (main): Likewise. + * asm-tst3.c (main): Likewise. + * asm-tst4.c (main): Likewise. + * asm-tst5.c (main): Likewise. + * asm-tst6.c (main): Likewise. + * asm-tst7.c (main): Likewise. + * asm-tst8.c (main): Likewise. + * asm-tst9.c (main): Likewise. + * sectiondump.c (print_bytes): Likewise. + +2015-08-14 Mark Wielaard + + * run-addr2line-alt-debugpath.sh: New test. + * Makefile.am (TESTS): Add run-addr2line-alt-debugpath.sh + (EXTRA_DIST): Likewise. + +2015-07-29 Mark Wielaard + + * run-unstrip-test3.sh: New test. + * testfile-info-link.bz2: New file. + * testfile-info-link.debuginfo.bz2: Likewise. + * testfile-info-link.stripped.bz2: Likewise. + * Makefile.am (TESTS): Add run-unstrip-test3.sh. + (EXTRA_DIST): Add run-unstrip-test3.sh, testfile-info-link.bz2, + testfile-info-link.debuginfo.bz2, testfile-info-link.stripped.bz2. + +2015-06-27 Pino Toscano + + * tests/run-deleted.sh: Skip when detecting a not implemented + dwfl_linux_proc_attach. + +2015-06-27 Pino Toscano + + * tests/dwfl-bug-fd-leak.c (elfutils_open): Check for null results of + dwfl_addrmodule. + +2015-06-26 Pino Toscano + + * tests/vdsosyms.c [!__linux__] (main): Mark argv as unused. + +2015-06-26 Pino Toscano + + * tests/backtrace-data.c: Reduce scope of some includes to match their + usage. + * tests/backtrace.c: Likewise. + * tests/deleted.c: Likewise. + +2015-06-16 Mark Wielaard + + * run-strip-test.sh: Add strip-in-place (eu-strip without -o) test + for non-ET_REL files. + +2015-05-30 Mark Wielaard + + * backtrace-subr.sh (check_native_core): Notice core file couldn't be + generated before skipping. + * run-addr2line-i-demangle-test.sh: Notice demangler is unsupported + before skipping. + * run-backtrace-demangle.sh: Likewise. + * run-stack-demangled-test.sh: Likewise. + * run-backtrace-native-biarch.sh: Notice biarch testing is disabled + before skipping. + * run-backtrace-native-core-biarch.sh: Likewise. + * test-subr.sh (testfiles): Notice how bunzip2 fails before skipping. + +2015-05-20 Mark Wielaard + + * run-addr2line-i-test.sh: Add pretty test. + * run-addr2line-test.sh: Likewise. + +2015-05-20 Mark Wielaard + + * run-addr2line-i-demangle-test.sh: New test. + * Makefile.am (TESTS): Add run-addr2line-i-demangle-test.sh. + (EXTRA_DIST): Likewise. + +2015-05-20 Mark Wielaard + + * run-addr2line-test.sh: Add -a test variants. + * run-addr2line-i-test.sh: Likewise. + +2015-05-20 Mark Wielaard + + * run-addrname-test.sh: Make sure all input addresses are hex. + +2015-05-04 Max Filippov + + * backtrace-child.c (stdarg, main): Replace assert_perror with assert. + * backtrace-data.c (memory_read, maps_lookup, set_initial_registers) + (main): Likewise. + * backtrace-dwarf.c (main): Likewise. + * backtrace.c (prepare_thread, exec_dump): Likewise. + +2015-05-04 Anthony G. Basile + + * Makefile.am (line2addr_LDADD, addrscopes_LDADD, funcscopes_LDADD) + (funcretval_LDADD, allregs_LDADD, find_prologues_LDADD) + (dwflmodtest_LDADD, dwfl_addr_sect_LDADD, addrcfi_LDADD) + (low_high_pc_LDADD, dwflsyms_LDADD, dwfllines_LDADD, varlocs_LDADD) + (backtrace_LDADD, aggregate_size_LDADD): Append $(argp_LDADD). + +2015-05-01 Mark Wielaard + + * run-stack-d-test.sh: Use --raw and mangled output. + * run-stack-i-test.sh: Likewise. + * run-stack-demangled-test.sh: New test. + * Makefile.am (EXTRA_DIST): Add run-stack-demangled-test.sh. + (TESTS): Likewise. + +2015-04-01 H.J. Lu + + * Makefile.am (TESTS): Add run-strip-test10.sh. + (EXTRA_DIST): Likewise. Add testfile-x32-d.bz2. + Add testfile-x32-debug.bz2. + * run-strip-test10.sh: New file. + * testfile-x32-d.bz2: Likewise. + * testfile-x32-debug.bz2: Likewise. + +2015-04-01 H.J. Lu + + * Makefile.am (TESTS): Add run-strip-test9.sh. + (EXTRA_DIST): Likewise. Add testfile-x32-s.bz2. + * run-strip-test9.sh: New file. + * testfile-x32-s.bz2: Likewise. + +2015-04-01 H.J. Lu + + * Makefile.am (TESTS): Add run-backtrace-core-x32.sh. + (EXTRA_DIST): Likewise. Add backtrace.x32.core.bz2. + Add backtrace.x32.exec.bz2. + * backtrace.x32.core.bz2 : New file. + * backtrace.x32.exec.bz2: Likewise. + * run-backtrace-core-x32.sh: Likewise. + +2015-04-01 H.J. Lu + + * run-addrcfi.sh: Add a test for testfile-x32. + * testfile-x32.bz2: New file. + * Makefile.am (EXTRA_DIST): Add testfile-x32.bz2. + +2015-04-01 H.J. Lu + + * run-allregs.sh: Add a test for testfile-x32-core. + +2015-04-01 H.J. Lu + + * run-readelf-mixed-corenote.sh: Add a test for testfile-x32-core. + * testfile-x32-core.bz2: New file. + * Makefile.am (EXTRA_DIST): Add testfile-x32-core.bz2. + +2015-03-18 Petr Machata + + * addrcfi.c (op_name): Adjust uses of know-dwarf.h macros to match + the API changes. + * allregs.c (dwarf_encoding_string): Likewise. + * show-die-info.c (dwarf_tag_string, dwarf_attr_string): Likewise. + * varlocs.c (dwarf_encoding_string, dwarf_opcode_string): Likewise. + +2015-03-18 Petr Machata + + * Makefile.am (EXTRA_DIST): Add run-dwarf-ranges.sh, + debug-ranges-no-lowpc.o.bz2. + +2015-03-13 Mark Wielaard + + * backtrace-dwarf.c: Add explicit includes. + (cleanup_13_abort): Remove unused static declaration. + (thread_callback): Add explicit return. + +2015-03-13 H.J. Lu + + * backtrace.c (prepare_thread): Use PTRACE_GETREGS/PTRACE_SETREGS + instead of PTRACE_POKEUSER. + (exec_dump): Check EM_X86_64 instead of ELFCLASS64 for + is_x86_64_native. + +2015-02-18 Mark Wielaard + + * newdata.c (check_section_data): Use PRId64 for printing loff_t. + +2015-02-11 Josh Stone + + * backtrace.c (exec_dump): Initialize jmp. + +2015-02-11 Petr Machata + + * run-dwarf-ranges.sh: New test. + * dwarf-ranges.c: New file. + * debug-ranges-no-lowpc.s, debug-ranges-no-lowpc.o.bz2: New test case. + +2015-01-21 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add elfstrtab. + (TESTS): Likewise. + (elfstrtab_LDADD): New variable. + * elfstrtab.c: New test. + +2015-01-20 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add newdata. + (TESTS): Likewise. + (newdata_LDADD): new variable. + * newdata.c: New test. + +2015-01-20 Mark Wielaard + + * strptr.c: New file. + * run-strptr.sh: New test. + * Makefile.am (check_PROGRAMS): Add strptr. + (TESTS): Add run-strptr.sh. + (EXTRA_DIST): Likewise. + (strptr_LDADD): New variable. + +2015-01-15 Mark Wielaard + + * deleted.c (main): Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY). + * vdsosyms.c (main): Use getpid () instead of getppid (). + +2014-12-27 Mark Wielaard + + * addrscopes.c (handle_address): Last address in scope is highpc - 1. + * funcscopes.c (handle_function): Likewise. + * run-addrscopes.sh: Adjust last address in scope. + * run-funcscopes.sh: Likewise. + +2015-01-07 Mark Wielaard + + * run-addrcfi.sh: Add test for ppc32 eh_frame_hdr address search. + +2015-01-14 Mark Wielaard + + * testfile-debug-types.bz2: New testfile. + * Makefile.am (EXTRA_DIST): Add testfile-debug-types.bz2. + * typeiter2.c (main): Print both name and offset of found form DIE. + * run-typeiter.s: Adjust output and add testfile-debug-types. + +2014-12-26 Mark Wielaard + + * run-test-archive64.sh: Add nm test. + +2014-12-19 Mark Wielaard + + * run-deleted.sh: Don't check libfunc on ppc64. + +2014-12-19 Mark Wielaard + + * vdsosyms.c (vdso_seen): Removed. + (vdso_syms): New global. + (module_callback): Set and check vdso_syms. + (main): Return value depends on vdso_syms. + +2014-12-19 Mark Wielaard + + * backtrace-subr.sh (check_native_unsupported): Relax special ARM + grep a little. + * run-deleted.sh: Call check_native_unsupported. + +2014-12-18 Mark Wielaard + + * Makefile.am (EXTRA_DIST): Add testfile-macros-0xff.bz2. + +2014-12-12 Mark Wielaard + + * Makefile.am (deleted_lib_so_CFLAGS): Add + -fasynchronous-unwind-tables. + +2014-12-11 Josh Stone + + * run-addr2line-i-lex-test.sh: New test. + * testfile-lex-inlines.bz2: New testfile. + * Makefile.am (EXTRA_DIST): Add run-addr2line-i-lex-test.sh and + testfile-lex-inlines.bz2. + (TESTS): Add run-addr2line-i-lex-test.sh. + +2014-12-10 Josh Stone + + * run-addr2line-i-test.sh: Test 0x5f0 to make sure linkage_name is + preferred over the plain die name. + +2014-12-02 Petr Machata + + * dwarf-getmacros.c (mac): Skip over DW_MACINFO_undef, + DW_MACRO_GNU_undef_indirect opcodes. Add a default branch. + (main): Initialize off to DWARF_GETMACROS_START when an extra + command line argument is passed. + * testfile-macros-0xff.bz2: New test case. + * testfile-macros-0xff.s: New file (source for the above). + * run-dwarf-getmacros.sh: Add two tests. + +2014-11-27 Mark Wielaard + + * vdsosyms.c (main): Call dwfl_linux_proc_attach. + +2014-11-21 Mark Wielaard + + * run-readelf-A.sh: New test. + * testfileppc32attrs.o.bz2: New test file. + * Makefile.am (TESTS): Add run-readelf-A.sh. + (EXTRA_DIST): Add run-readelf-A.sh and testfileppc32attrs.o.bz2. + +2014-11-10 Mark Wielaard + + * vdsosyms.c: New test. + * Makefile.am (check_PROGRAMS): Add vdsosyms. + (TESTS): Likewise. + (vdsosyms_LDADD): New variable. + +2014-09-10 Petr Machata + + * dwarf-getmacros.c: Update to use the new macro iteration + interfaces. + * run-dwarf-getmacros.sh: Adjust, add a test that uses + testfile-macros. + +2014-10-06 Mark Wielaard + + * run-aggregate-size.sh: Add testfile-sizes3.o test case. + * testfile-sizes3.o.bz2: New test file. + * Makefile.am (EXTRA_DIST): Add testfile-sizes3.o.bz2. + +2014-10-02 Mark Wielaard + + * run-deleted.sh: Unset VALGRIND_CMD before running deleted. + +2014-10-02 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add aggregate_size.c. + (TESTS): Add run-aggregate-size.sh. + (EXTRA_DIST): Add run-aggregate-size.sh, testfile-sizes1.o.bz2 + and testfile-sizes2.o.bz2. + (aggregate_size_LDADD): New variable. + * aggregate_size.c: New file. + * run-aggregate-size.sh: New test. + * testfile-sizes1.o.bz2: New test file. + * testfile-sizes2.o.bz2: Likewise. + +2014-09-26 Jan Kratochvil + + Support NT_FILE for locating files. + * Makefile.am (TESTS): Add run-linkmap-cut.sh. + (EXTRA_DIST): Add run-linkmap-cut.sh, linkmap-cut-lib.so.bz2, + linkmap-cut.bz2 and linkmap-cut.core.bz2 . + * linkmap-cut-lib.so.bz2: New file. + * linkmap-cut.bz2: New file. + * linkmap-cut.core.bz2: New file. + * run-linkmap-cut.sh: New file. + * run-unstrip-n.sh: Update its expected output. + +2014-08-28 Jan Kratochvil + + * Makefile.am (check_PROGRAMS): Add deleted and deleted-lib.so. + (TESTS, EXTRA_DIST): Add run-deleted.sh. + (deleted_LDADD, deleted_lib_so_LDFLAGS, deleted_lib_so_CFLAGS): New. + * deleted-lib.c: New file. + * deleted.c: New file. + * run-deleted.sh: New file. + 2014-06-15 Mark Wielaard * backtrace.c (frame_callback): Error on seeing more than 16 frames. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4cc81c9..d09a6d7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2014 Red Hat, Inc. +## Copyright (C) 1996-2015 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -44,13 +44,16 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \ find-prologues funcretval allregs rdwrmmap \ dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \ dwfl-addr-sect dwfl-bug-report early-offscn \ - dwfl-bug-getmodules dwarf-getmacros addrcfi \ + dwfl-bug-getmodules dwarf-getmacros dwarf-ranges addrcfi \ test-flag-nobits dwarf-getstring rerequest_tag \ alldts md5-sha1-test typeiter typeiter2 low_high_pc \ test-elf_cntl_gelf_getshdr dwflsyms dwfllines \ dwfl-report-elf-align varlocs backtrace backtrace-child \ backtrace-data backtrace-dwarf debuglink debugaltlink \ - buildid + buildid deleted deleted-lib.so aggregate_size vdsosyms \ + getsrc_die strptr newdata elfstrtab dwfl-proc-attach \ + elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \ + elfgetzdata elfputzdata zstrptr asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ asm-tst6 asm-tst7 asm-tst8 asm-tst9 @@ -61,7 +64,7 @@ endif # Substitute $(COMPILE). backtrace-child-biarch$(EXEEXT): backtrace-child.c - $(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_V_CC)$(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \ @@ -75,8 +78,10 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ newscn run-strip-test.sh run-strip-test2.sh \ run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \ run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \ - run-strip-groups.sh run-strip-reloc.sh \ - run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh \ + run-strip-test9.sh run-strip-test10.sh \ + run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \ + run-unstrip-test.sh run-unstrip-test2.sh \ + run-unstrip-test3.sh run-unstrip-M.sh run-elfstrmerge-test.sh \ run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \ run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \ run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \ @@ -86,14 +91,14 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \ run-readelf-test4.sh run-readelf-twofiles.sh \ run-readelf-macro.sh run-readelf-loc.sh \ - run-readelf-aranges.sh run-readelf-line.sh \ + run-readelf-aranges.sh run-readelf-line.sh run-readelf-z.sh \ run-native-test.sh run-bug1-test.sh \ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \ dwfl-bug-addr-overflow run-addrname-test.sh \ dwfl-bug-fd-leak dwfl-bug-report \ run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \ run-disasm-x86.sh run-disasm-x86-64.sh \ - run-early-offscn.sh run-dwarf-getmacros.sh \ + run-early-offscn.sh run-dwarf-getmacros.sh run-dwarf-ranges.sh \ run-test-flag-nobits.sh run-prelink-addr-test.sh \ run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \ run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \ @@ -101,15 +106,26 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-test-archive64.sh run-readelf-vmcoreinfo.sh \ run-readelf-mixed-corenote.sh run-dwfllines.sh \ run-dwfl-report-elf-align.sh run-addr2line-test.sh \ - run-addr2line-i-test.sh run-varlocs.sh run-funcretval.sh \ + run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \ + run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \ + run-varlocs.sh run-funcretval.sh \ run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \ run-backtrace-native-biarch.sh run-backtrace-native-core.sh \ run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \ + run-backtrace-core-x32.sh \ run-backtrace-core-i386.sh run-backtrace-core-ppc.sh \ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ - run-backtrace-core-aarch64.sh \ + run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \ run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \ - run-readelf-dwz-multi.sh run-allfcts-multi.sh + run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \ + run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \ + run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh \ + run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \ + elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \ + run-elfgetchdr.sh \ + run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \ + run-compress-test.sh \ + run-readelf-zdebug.sh run-readelf-zdebug-rel.sh if !BIARCH export ELFUTILS_DISABLE_BIARCH = 1 @@ -128,10 +144,6 @@ if LZMA TESTS += run-readelf-s.sh run-dwflsyms.sh endif -if ZLIB -TESTS += run-readelf-zdebug.sh -endif - if HAVE_LIBASM check_PROGRAMS += $(asm_TESTS) TESTS += $(asm_TESTS) @@ -150,9 +162,13 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-line2addr.sh run-elflint-test.sh testfile14.bz2 \ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \ + run-strip-test9.sh run-strip-test10.sh run-strip-strmerge.sh \ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \ hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \ - run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh\ + run-unstrip-test.sh run-unstrip-test2.sh \ + testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \ + testfile-info-link.stripped.bz2 run-unstrip-test3.sh \ + run-unstrip-M.sh run-elfstrmerge-test.sh \ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \ run-ranlib-test3.sh run-ranlib-test4.sh \ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ @@ -160,7 +176,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-find-prologues.sh run-allregs.sh run-native-test.sh \ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \ run-dwfl-addr-sect.sh run-early-offscn.sh \ - run-dwarf-getmacros.sh run-test-flag-nobits.sh \ + run-dwarf-getmacros.sh \ + run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \ + run-test-flag-nobits.sh \ run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \ testfile15.bz2 testfile15.debug.bz2 \ testfile16.bz2 testfile16.debug.bz2 \ @@ -187,9 +205,11 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \ testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \ testfile49.bz2 testfile50.bz2 testfile51.bz2 \ + testfile-macros-0xff.bz2 \ run-readelf-macro.sh testfilemacro.bz2 \ run-readelf-loc.sh testfileloc.bz2 \ run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \ + run-readelf-z.sh \ run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \ testfile_multi.dwz.bz2 testfile_multi_main.bz2 \ testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \ @@ -242,6 +262,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \ test-core.exec.bz2 run-addr2line-test.sh \ run-addr2line-i-test.sh testfile-inlines.bz2 \ + run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \ + run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \ testfileppc32.bz2 testfileppc64.bz2 \ testfiles390.bz2 testfiles390x.bz2 \ testfilearm.bz2 testfileaarch64.bz2 \ @@ -257,6 +279,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-backtrace-native.sh run-backtrace-native-biarch.sh \ run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \ + run-backtrace-core-x32.sh \ backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \ backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \ backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \ @@ -266,15 +289,39 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ run-backtrace-core-aarch64.sh \ backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \ + run-backtrace-core-sparc.sh \ + backtrace.sparc.core.bz2 backtrace.sparc.exec.bz2 \ run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \ testfile-backtrace-demangle.cc \ testfile-backtrace-demangle.core.bz2 \ run-stack-d-test.sh run-stack-i-test.sh \ + run-stack-demangled-test.sh \ testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \ - run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 + run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \ + run-readelf-zdebug-rel.sh testfile-debug-rel.o.bz2 \ + testfile-debug-rel-g.o.bz2 testfile-debug-rel-z.o.bz2 \ + run-readelf-zx.sh run-readelf-zp.sh \ + run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \ + linkmap-cut.bz2 linkmap-cut.core.bz2 \ + run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \ + testfile-sizes3.o.bz2 \ + run-readelf-A.sh testfileppc32attrs.o.bz2 \ + testfile-debug-types.bz2 \ + run-getsrc-die.sh run-strptr.sh \ + testfile-x32-core.bz2 testfile-x32.bz2 \ + backtrace.x32.core.bz2 backtrace.x32.exec.bz2 \ + testfile-x32-s.bz2 testfile-x32-d.bz2 testfile-x32-debug.bz2 \ + run-lfs-symbols.sh lfs-symbols testfile-nolfs.bz2 \ + testfile-zgnu32.bz2 testfile-zgnu64.bz2 \ + testfile-zgnu32be.bz2 testfile-zgnu64be.bz2 \ + run-dwelfgnucompressed.sh \ + testfile-zgabi32.bz2 testfile-zgabi64.bz2 \ + testfile-zgabi32be.bz2 testfile-zgabi64be.bz2 \ + run-elfgetchdr.sh run-elfgetzdata.sh run-elfputzdata.sh \ + run-zstrptr.sh run-compress-test.sh if USE_VALGRIND -valgrind_cmd='valgrind -q --error-exitcode=1 --run-libc-freeres=no' +valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1' endif @@ -320,8 +367,8 @@ libasm = -lasm libebl = -lebl else !STANDALONE if BUILD_STATIC -libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl -libelf = ../libelf/libelf.a +libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl +libelf = ../libelf/libelf.a -lz libasm = ../libasm/libasm.a else libdw = ../libdw/libdw.so @@ -356,12 +403,12 @@ get_lines_LDADD = $(libdw) $(libelf) get_files_LDADD = $(libdw) $(libelf) get_aranges_LDADD = $(libdw) $(libelf) allfcts_LDADD = $(libdw) $(libelf) -line2addr_LDADD = $(libdw) -addrscopes_LDADD = $(libdw) -funcscopes_LDADD = $(libdw) -funcretval_LDADD = $(libdw) -allregs_LDADD = $(libdw) -find_prologues_LDADD = $(libdw) +line2addr_LDADD = $(libdw) $(argp_LDADD) +addrscopes_LDADD = $(libdw) $(argp_LDADD) +funcscopes_LDADD = $(libdw) $(argp_LDADD) +funcretval_LDADD = $(libdw) $(argp_LDADD) +allregs_LDADD = $(libdw) $(argp_LDADD) +find_prologues_LDADD = $(libdw) $(argp_LDADD) #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) -ldl @@ -372,30 +419,31 @@ asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) -ldl -dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) -ldl +dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl rdwrmmap_LDADD = $(libelf) dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl arls_LDADD = $(libelf) dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl -dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) -ldl +dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl dwarf_getmacros_LDADD = $(libdw) +dwarf_ranges_LDADD = $(libdw) dwarf_getstring_LDADD = $(libdw) -addrcfi_LDADD = $(libdw) $(libebl) $(libelf) -ldl +addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl test_flag_nobits_LDADD = $(libelf) rerequest_tag_LDADD = $(libdw) alldts_LDADD = $(libebl) $(libelf) md5_sha1_test_LDADD = $(libeu) typeiter_LDADD = $(libdw) $(libelf) typeiter2_LDADD = $(libdw) $(libelf) -low_high_pc_LDADD = $(libdw) $(libelf) +low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD) test_elf_cntl_gelf_getshdr_LDADD = $(libelf) -dwflsyms_LDADD = $(libdw) $(libelf) -dwfllines_LDADD = $(libdw) $(libelf) +dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD) +dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD) dwfl_report_elf_align_LDADD = $(libdw) -varlocs_LDADD = $(libdw) $(libelf) -backtrace_LDADD = $(libdw) $(libelf) +varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD) +backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD) # backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables: backtrace_child_CFLAGS = -fPIE backtrace_child_LDFLAGS = -pie -pthread @@ -406,6 +454,24 @@ backtrace_dwarf_LDADD = $(libdw) $(libelf) debuglink_LDADD = $(libdw) $(libelf) debugaltlink_LDADD = $(libdw) $(libelf) buildid_LDADD = $(libdw) $(libelf) +deleted_LDADD = ./deleted-lib.so +deleted_lib_so_LDFLAGS = -shared -rdynamic +deleted_lib_so_CFLAGS = -fPIC -fasynchronous-unwind-tables +aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD) +vdsosyms_LDADD = $(libdw) $(libelf) +getsrc_die_LDADD = $(libdw) $(libelf) +strptr_LDADD = $(libelf) +newdata_LDADD = $(libelf) +elfstrtab_LDADD = $(libelf) +dwfl_proc_attach_LDADD = $(libdw) +dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS) +elfshphehdr_LDADD =$(libelf) +elfstrmerge_LDADD = $(libebl) $(libelf) +dwelfgnucompressed_LDADD = $(libelf) $(libdw) +elfgetchdr_LDADD = $(libelf) $(libdw) +elfgetzdata_LDADD = $(libelf) +elfputzdata_LDADD = $(libelf) +zstrptr_LDADD = $(libelf) if GCOV check: check-am coverage diff --git a/tests/Makefile.in b/tests/Makefile.in index 5ecc710..357f09f 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -77,16 +87,14 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/test-driver ChangeLog -@STANDALONE_FALSE@am__append_1 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ +@SYMBOL_VERSIONING_TRUE@am__append_1 = -DSYMBOL_VERSIONING +@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ @STANDALONE_FALSE@ -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \ @STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ @STANDALONE_FALSE@ -I$(top_srcdir)/lib -I.. -@STANDALONE_FALSE@am__append_2 = -Wl,-rpath-link,../libasm:../libdw:../libelf -@TESTS_RPATH_TRUE@am__append_3 = -Wl,-rpath,$(BUILD_RPATH) +@STANDALONE_FALSE@am__append_3 = -Wl,-rpath-link,../libasm:../libdw:../libelf +@TESTS_RPATH_TRUE@am__append_4 = -Wl,-rpath,$(BUILD_RPATH) check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \ sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \ @@ -101,17 +109,25 @@ check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ arls$(EXEEXT) dwfl-bug-fd-leak$(EXEEXT) \ dwfl-addr-sect$(EXEEXT) dwfl-bug-report$(EXEEXT) \ early-offscn$(EXEEXT) dwfl-bug-getmodules$(EXEEXT) \ - dwarf-getmacros$(EXEEXT) addrcfi$(EXEEXT) \ - test-flag-nobits$(EXEEXT) dwarf-getstring$(EXEEXT) \ - rerequest_tag$(EXEEXT) alldts$(EXEEXT) md5-sha1-test$(EXEEXT) \ - typeiter$(EXEEXT) typeiter2$(EXEEXT) low_high_pc$(EXEEXT) \ + dwarf-getmacros$(EXEEXT) dwarf-ranges$(EXEEXT) \ + addrcfi$(EXEEXT) test-flag-nobits$(EXEEXT) \ + dwarf-getstring$(EXEEXT) rerequest_tag$(EXEEXT) \ + alldts$(EXEEXT) md5-sha1-test$(EXEEXT) typeiter$(EXEEXT) \ + typeiter2$(EXEEXT) low_high_pc$(EXEEXT) \ test-elf_cntl_gelf_getshdr$(EXEEXT) dwflsyms$(EXEEXT) \ dwfllines$(EXEEXT) dwfl-report-elf-align$(EXEEXT) \ varlocs$(EXEEXT) backtrace$(EXEEXT) backtrace-child$(EXEEXT) \ backtrace-data$(EXEEXT) backtrace-dwarf$(EXEEXT) \ debuglink$(EXEEXT) debugaltlink$(EXEEXT) buildid$(EXEEXT) \ - $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) -@BIARCH_TRUE@am__append_4 = backtrace-child-biarch + deleted$(EXEEXT) deleted-lib.so$(EXEEXT) \ + aggregate_size$(EXEEXT) vdsosyms$(EXEEXT) getsrc_die$(EXEEXT) \ + strptr$(EXEEXT) newdata$(EXEEXT) elfstrtab$(EXEEXT) \ + dwfl-proc-attach$(EXEEXT) elfshphehdr$(EXEEXT) \ + elfstrmerge$(EXEEXT) dwelfgnucompressed$(EXEEXT) \ + elfgetchdr$(EXEEXT) elfgetzdata$(EXEEXT) elfputzdata$(EXEEXT) \ + zstrptr$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ + $(am__EXEEXT_4) +@BIARCH_TRUE@am__append_5 = backtrace-child-biarch TESTS = run-arextract.sh run-arsymtest.sh newfile$(EXEEXT) \ test-nlist$(EXEEXT) update1$(EXEEXT) update2$(EXEEXT) \ update3$(EXEEXT) update4$(EXEEXT) run-show-die-info.sh \ @@ -120,47 +136,59 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile$(EXEEXT) \ run-line2addr.sh hash$(EXEEXT) newscn$(EXEEXT) \ run-strip-test.sh run-strip-test2.sh run-strip-test3.sh \ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \ - run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \ - run-strip-reloc.sh run-unstrip-test.sh run-unstrip-test2.sh \ - run-unstrip-M.sh run-ecp-test.sh run-ecp-test2.sh \ - run-alldts.sh run-elflint-test.sh run-elflint-self.sh \ - run-ranlib-test.sh run-ranlib-test2.sh run-ranlib-test3.sh \ - run-ranlib-test4.sh run-addrscopes.sh run-strings-test.sh \ - run-funcscopes.sh run-find-prologues.sh run-allregs.sh \ - run-addrcfi.sh run-nm-self.sh run-readelf-self.sh \ - run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \ - run-readelf-test4.sh run-readelf-twofiles.sh \ - run-readelf-macro.sh run-readelf-loc.sh run-readelf-aranges.sh \ - run-readelf-line.sh run-native-test.sh run-bug1-test.sh \ + run-strip-test7.sh run-strip-test8.sh run-strip-test9.sh \ + run-strip-test10.sh run-strip-groups.sh run-strip-reloc.sh \ + run-strip-strmerge.sh run-unstrip-test.sh run-unstrip-test2.sh \ + run-unstrip-test3.sh run-unstrip-M.sh run-elfstrmerge-test.sh \ + run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \ + run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \ + run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \ + run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ + run-find-prologues.sh run-allregs.sh run-addrcfi.sh \ + run-nm-self.sh run-readelf-self.sh run-readelf-test1.sh \ + run-readelf-test2.sh run-readelf-test3.sh run-readelf-test4.sh \ + run-readelf-twofiles.sh run-readelf-macro.sh \ + run-readelf-loc.sh run-readelf-aranges.sh run-readelf-line.sh \ + run-readelf-z.sh run-native-test.sh run-bug1-test.sh \ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \ dwfl-bug-addr-overflow$(EXEEXT) run-addrname-test.sh \ dwfl-bug-fd-leak$(EXEEXT) dwfl-bug-report$(EXEEXT) \ run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \ run-disasm-x86.sh run-disasm-x86-64.sh run-early-offscn.sh \ - run-dwarf-getmacros.sh run-test-flag-nobits.sh \ - run-prelink-addr-test.sh run-dwarf-getstring.sh \ - run-rerequest_tag.sh run-typeiter.sh run-readelf-d.sh \ - run-readelf-gdb_index.sh run-unstrip-n.sh run-low_high_pc.sh \ - run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \ - run-test-archive64.sh run-readelf-vmcoreinfo.sh \ - run-readelf-mixed-corenote.sh run-dwfllines.sh \ - run-dwfl-report-elf-align.sh run-addr2line-test.sh \ - run-addr2line-i-test.sh run-varlocs.sh run-funcretval.sh \ - run-backtrace-native.sh run-backtrace-data.sh \ - run-backtrace-dwarf.sh run-backtrace-native-biarch.sh \ - run-backtrace-native-core.sh \ + run-dwarf-getmacros.sh run-dwarf-ranges.sh \ + run-test-flag-nobits.sh run-prelink-addr-test.sh \ + run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \ + run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \ + run-low_high_pc.sh run-macro-test.sh \ + run-elf_cntl_gelf_getshdr.sh run-test-archive64.sh \ + run-readelf-vmcoreinfo.sh run-readelf-mixed-corenote.sh \ + run-dwfllines.sh run-dwfl-report-elf-align.sh \ + run-addr2line-test.sh run-addr2line-i-test.sh \ + run-addr2line-i-lex-test.sh run-addr2line-i-demangle-test.sh \ + run-addr2line-alt-debugpath.sh run-varlocs.sh \ + run-funcretval.sh run-backtrace-native.sh \ + run-backtrace-data.sh run-backtrace-dwarf.sh \ + run-backtrace-native-biarch.sh run-backtrace-native-core.sh \ run-backtrace-native-core-biarch.sh \ - run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \ - run-backtrace-core-ppc.sh run-backtrace-core-s390x.sh \ - run-backtrace-core-s390.sh run-backtrace-core-aarch64.sh \ + run-backtrace-core-x86_64.sh run-backtrace-core-x32.sh \ + run-backtrace-core-i386.sh run-backtrace-core-ppc.sh \ + run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ + run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \ run-backtrace-demangle.sh run-stack-d-test.sh \ - run-stack-i-test.sh run-readelf-dwz-multi.sh \ - run-allfcts-multi.sh $(am__EXEEXT_2) $(am__append_7) \ - $(am__append_8) $(am__EXEEXT_4) -@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test + run-stack-i-test.sh run-stack-demangled-test.sh \ + run-readelf-zx.sh run-readelf-zp.sh run-readelf-dwz-multi.sh \ + run-allfcts-multi.sh run-deleted.sh run-linkmap-cut.sh \ + run-aggregate-size.sh vdsosyms$(EXEEXT) run-readelf-A.sh \ + run-getsrc-die.sh run-strptr.sh newdata$(EXEEXT) \ + elfstrtab$(EXEEXT) dwfl-proc-attach$(EXEEXT) \ + elfshphehdr$(EXEEXT) run-lfs-symbols.sh \ + run-dwelfgnucompressed.sh run-elfgetchdr.sh run-elfgetzdata.sh \ + run-elfputzdata.sh run-zstrptr.sh run-compress-test.sh \ + run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \ + $(am__EXEEXT_2) $(am__append_8) $(am__EXEEXT_4) @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test -@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh -@ZLIB_TRUE@am__append_8 = run-readelf-zdebug.sh +@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test +@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh @HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) @HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS) subdir = tests @@ -171,6 +199,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -198,10 +227,14 @@ am__DEPENDENCIES_1 = @BUILD_STATIC_TRUE@@STANDALONE_FALSE@ $(am__DEPENDENCIES_2) \ @BUILD_STATIC_TRUE@@STANDALONE_FALSE@ $(am__DEPENDENCIES_3) addrcfi_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_3) \ - $(am__DEPENDENCIES_2) + $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) addrscopes_SOURCES = addrscopes.c addrscopes_OBJECTS = addrscopes.$(OBJEXT) -addrscopes_DEPENDENCIES = $(am__DEPENDENCIES_4) +addrscopes_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) +aggregate_size_SOURCES = aggregate_size.c +aggregate_size_OBJECTS = aggregate_size.$(OBJEXT) +aggregate_size_DEPENDENCIES = $(am__DEPENDENCIES_4) \ + $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) alldts_SOURCES = alldts.c alldts_OBJECTS = alldts.$(OBJEXT) alldts_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) @@ -210,7 +243,7 @@ allfcts_OBJECTS = allfcts.$(OBJEXT) allfcts_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) allregs_SOURCES = allregs.c allregs_OBJECTS = allregs.$(OBJEXT) -allregs_DEPENDENCIES = $(am__DEPENDENCIES_4) +allregs_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) arextract_SOURCES = arextract.c arextract_OBJECTS = arextract.$(OBJEXT) arextract_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -262,7 +295,8 @@ asm_tst9_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_2) backtrace_SOURCES = backtrace.c backtrace_OBJECTS = backtrace.$(OBJEXT) -backtrace_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +backtrace_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) backtrace_child_SOURCES = backtrace-child.c backtrace_child_OBJECTS = backtrace_child-backtrace-child.$(OBJEXT) backtrace_child_LDADD = $(LDADD) @@ -291,16 +325,32 @@ debugaltlink_DEPENDENCIES = $(am__DEPENDENCIES_4) \ debuglink_SOURCES = debuglink.c debuglink_OBJECTS = debuglink.$(OBJEXT) debuglink_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +deleted_SOURCES = deleted.c +deleted_OBJECTS = deleted.$(OBJEXT) +deleted_DEPENDENCIES = ./deleted-lib.so +deleted_lib_so_SOURCES = deleted-lib.c +deleted_lib_so_OBJECTS = deleted_lib_so-deleted-lib.$(OBJEXT) +deleted_lib_so_LDADD = $(LDADD) +deleted_lib_so_LINK = $(CCLD) $(deleted_lib_so_CFLAGS) $(CFLAGS) \ + $(deleted_lib_so_LDFLAGS) $(LDFLAGS) -o $@ dwarf_getmacros_SOURCES = dwarf-getmacros.c dwarf_getmacros_OBJECTS = dwarf-getmacros.$(OBJEXT) dwarf_getmacros_DEPENDENCIES = $(am__DEPENDENCIES_4) dwarf_getstring_SOURCES = dwarf-getstring.c dwarf_getstring_OBJECTS = dwarf-getstring.$(OBJEXT) dwarf_getstring_DEPENDENCIES = $(am__DEPENDENCIES_4) +dwarf_ranges_SOURCES = dwarf-ranges.c +dwarf_ranges_OBJECTS = dwarf-ranges.$(OBJEXT) +dwarf_ranges_DEPENDENCIES = $(am__DEPENDENCIES_4) +dwelfgnucompressed_SOURCES = dwelfgnucompressed.c +dwelfgnucompressed_OBJECTS = dwelfgnucompressed.$(OBJEXT) +dwelfgnucompressed_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_4) dwfl_addr_sect_SOURCES = dwfl-addr-sect.c dwfl_addr_sect_OBJECTS = dwfl-addr-sect.$(OBJEXT) dwfl_addr_sect_DEPENDENCIES = $(am__DEPENDENCIES_4) \ - $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) + $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) dwfl_bug_addr_overflow_SOURCES = dwfl-bug-addr-overflow.c dwfl_bug_addr_overflow_OBJECTS = dwfl-bug-addr-overflow.$(OBJEXT) dwfl_bug_addr_overflow_DEPENDENCIES = $(am__DEPENDENCIES_4) \ @@ -317,34 +367,60 @@ dwfl_bug_report_SOURCES = dwfl-bug-report.c dwfl_bug_report_OBJECTS = dwfl-bug-report.$(OBJEXT) dwfl_bug_report_DEPENDENCIES = $(am__DEPENDENCIES_4) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) +dwfl_proc_attach_SOURCES = dwfl-proc-attach.c +dwfl_proc_attach_OBJECTS = dwfl-proc-attach.$(OBJEXT) +dwfl_proc_attach_DEPENDENCIES = $(am__DEPENDENCIES_4) +dwfl_proc_attach_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(dwfl_proc_attach_LDFLAGS) $(LDFLAGS) -o $@ dwfl_report_elf_align_SOURCES = dwfl-report-elf-align.c dwfl_report_elf_align_OBJECTS = dwfl-report-elf-align.$(OBJEXT) dwfl_report_elf_align_DEPENDENCIES = $(am__DEPENDENCIES_4) dwfllines_SOURCES = dwfllines.c dwfllines_OBJECTS = dwfllines.$(OBJEXT) -dwfllines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +dwfllines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) dwflmodtest_SOURCES = dwflmodtest.c dwflmodtest_OBJECTS = dwflmodtest.$(OBJEXT) dwflmodtest_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_3) \ - $(am__DEPENDENCIES_2) + $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) dwflsyms_SOURCES = dwflsyms.c dwflsyms_OBJECTS = dwflsyms.$(OBJEXT) -dwflsyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +dwflsyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) early_offscn_SOURCES = early-offscn.c early_offscn_OBJECTS = early-offscn.$(OBJEXT) early_offscn_DEPENDENCIES = $(am__DEPENDENCIES_2) ecp_SOURCES = ecp.c ecp_OBJECTS = ecp.$(OBJEXT) ecp_DEPENDENCIES = $(am__DEPENDENCIES_2) +elfgetchdr_SOURCES = elfgetchdr.c +elfgetchdr_OBJECTS = elfgetchdr.$(OBJEXT) +elfgetchdr_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_4) +elfgetzdata_SOURCES = elfgetzdata.c +elfgetzdata_OBJECTS = elfgetzdata.$(OBJEXT) +elfgetzdata_DEPENDENCIES = $(am__DEPENDENCIES_2) +elfputzdata_SOURCES = elfputzdata.c +elfputzdata_OBJECTS = elfputzdata.$(OBJEXT) +elfputzdata_DEPENDENCIES = $(am__DEPENDENCIES_2) +elfshphehdr_SOURCES = elfshphehdr.c +elfshphehdr_OBJECTS = elfshphehdr.$(OBJEXT) +elfshphehdr_DEPENDENCIES = $(am__DEPENDENCIES_2) +elfstrmerge_SOURCES = elfstrmerge.c +elfstrmerge_OBJECTS = elfstrmerge.$(OBJEXT) +elfstrmerge_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) +elfstrtab_SOURCES = elfstrtab.c +elfstrtab_OBJECTS = elfstrtab.$(OBJEXT) +elfstrtab_DEPENDENCIES = $(am__DEPENDENCIES_2) find_prologues_SOURCES = find-prologues.c find_prologues_OBJECTS = find-prologues.$(OBJEXT) -find_prologues_DEPENDENCIES = $(am__DEPENDENCIES_4) +find_prologues_DEPENDENCIES = $(am__DEPENDENCIES_4) \ + $(am__DEPENDENCIES_1) funcretval_SOURCES = funcretval.c funcretval_OBJECTS = funcretval.$(OBJEXT) -funcretval_DEPENDENCIES = $(am__DEPENDENCIES_4) +funcretval_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) funcscopes_SOURCES = funcscopes.c funcscopes_OBJECTS = funcscopes.$(OBJEXT) -funcscopes_DEPENDENCIES = $(am__DEPENDENCIES_4) +funcscopes_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) get_aranges_SOURCES = get-aranges.c get_aranges_OBJECTS = get-aranges.$(OBJEXT) get_aranges_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) @@ -358,21 +434,28 @@ get_pubnames_SOURCES = get-pubnames.c get_pubnames_OBJECTS = get-pubnames.$(OBJEXT) get_pubnames_DEPENDENCIES = $(am__DEPENDENCIES_4) \ $(am__DEPENDENCIES_2) +getsrc_die_SOURCES = getsrc_die.c +getsrc_die_OBJECTS = getsrc_die.$(OBJEXT) +getsrc_die_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) hash_SOURCES = hash.c hash_OBJECTS = hash.$(OBJEXT) hash_DEPENDENCIES = $(am__DEPENDENCIES_2) line2addr_SOURCES = line2addr.c line2addr_OBJECTS = line2addr.$(OBJEXT) -line2addr_DEPENDENCIES = $(am__DEPENDENCIES_4) +line2addr_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) low_high_pc_SOURCES = low_high_pc.c low_high_pc_OBJECTS = low_high_pc.$(OBJEXT) -low_high_pc_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +low_high_pc_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) md5_sha1_test_SOURCES = md5-sha1-test.c md5_sha1_test_OBJECTS = md5-sha1-test.$(OBJEXT) md5_sha1_test_DEPENDENCIES = $(libeu) msg_tst_SOURCES = msg_tst.c msg_tst_OBJECTS = msg_tst.$(OBJEXT) msg_tst_DEPENDENCIES = $(am__DEPENDENCIES_2) +newdata_SOURCES = newdata.c +newdata_OBJECTS = newdata.$(OBJEXT) +newdata_DEPENDENCIES = $(am__DEPENDENCIES_2) newfile_SOURCES = newfile.c newfile_OBJECTS = newfile.$(OBJEXT) newfile_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -404,6 +487,9 @@ show_die_info_DEPENDENCIES = $(am__DEPENDENCIES_4) \ showptable_SOURCES = showptable.c showptable_OBJECTS = showptable.$(OBJEXT) showptable_DEPENDENCIES = $(am__DEPENDENCIES_2) +strptr_SOURCES = strptr.c +strptr_OBJECTS = strptr.$(OBJEXT) +strptr_DEPENDENCIES = $(am__DEPENDENCIES_2) test_elf_cntl_gelf_getshdr_SOURCES = test-elf_cntl_gelf_getshdr.c test_elf_cntl_gelf_getshdr_OBJECTS = \ test-elf_cntl_gelf_getshdr.$(OBJEXT) @@ -434,7 +520,14 @@ update4_OBJECTS = update4.$(OBJEXT) update4_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) varlocs_SOURCES = varlocs.c varlocs_OBJECTS = varlocs.$(OBJEXT) -varlocs_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +varlocs_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) +vdsosyms_SOURCES = vdsosyms.c +vdsosyms_OBJECTS = vdsosyms.$(OBJEXT) +vdsosyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2) +zstrptr_SOURCES = zstrptr.c +zstrptr_OBJECTS = zstrptr.$(OBJEXT) +zstrptr_DEPENDENCIES = $(am__DEPENDENCIES_2) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -467,44 +560,48 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = addrcfi.c addrscopes.c alldts.c allfcts.c allregs.c \ - arextract.c arls.c arsymtest.c asm-tst1.c asm-tst2.c \ +SOURCES = addrcfi.c addrscopes.c aggregate_size.c alldts.c allfcts.c \ + allregs.c arextract.c arls.c arsymtest.c asm-tst1.c asm-tst2.c \ asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c asm-tst7.c \ asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \ $(backtrace_child_biarch_SOURCES) backtrace-data.c \ backtrace-dwarf.c buildid.c debugaltlink.c debuglink.c \ - dwarf-getmacros.c dwarf-getstring.c dwfl-addr-sect.c \ + deleted.c deleted-lib.c dwarf-getmacros.c dwarf-getstring.c \ + dwarf-ranges.c dwelfgnucompressed.c dwfl-addr-sect.c \ dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \ - dwfl-bug-getmodules.c dwfl-bug-report.c \ + dwfl-bug-getmodules.c dwfl-bug-report.c dwfl-proc-attach.c \ dwfl-report-elf-align.c dwfllines.c dwflmodtest.c dwflsyms.c \ - early-offscn.c ecp.c find-prologues.c funcretval.c \ - funcscopes.c get-aranges.c get-files.c get-lines.c \ - get-pubnames.c hash.c line2addr.c low_high_pc.c \ - md5-sha1-test.c msg_tst.c newfile.c newscn.c rdwrmmap.c \ - rerequest_tag.c saridx.c scnnames.c sectiondump.c \ - show-abbrev.c show-die-info.c showptable.c \ - test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \ - typeiter.c typeiter2.c update1.c update2.c update3.c update4.c \ - varlocs.c -DIST_SOURCES = addrcfi.c addrscopes.c alldts.c allfcts.c allregs.c \ - arextract.c arls.c arsymtest.c asm-tst1.c asm-tst2.c \ - asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c asm-tst7.c \ - asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \ + early-offscn.c ecp.c elfgetchdr.c elfgetzdata.c elfputzdata.c \ + elfshphehdr.c elfstrmerge.c elfstrtab.c find-prologues.c \ + funcretval.c funcscopes.c get-aranges.c get-files.c \ + get-lines.c get-pubnames.c getsrc_die.c hash.c line2addr.c \ + low_high_pc.c md5-sha1-test.c msg_tst.c newdata.c newfile.c \ + newscn.c rdwrmmap.c rerequest_tag.c saridx.c scnnames.c \ + sectiondump.c show-abbrev.c show-die-info.c showptable.c \ + strptr.c test-elf_cntl_gelf_getshdr.c test-flag-nobits.c \ + test-nlist.c typeiter.c typeiter2.c update1.c update2.c \ + update3.c update4.c varlocs.c vdsosyms.c zstrptr.c +DIST_SOURCES = addrcfi.c addrscopes.c aggregate_size.c alldts.c \ + allfcts.c allregs.c arextract.c arls.c arsymtest.c asm-tst1.c \ + asm-tst2.c asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c \ + asm-tst7.c asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \ $(backtrace_child_biarch_SOURCES) backtrace-data.c \ backtrace-dwarf.c buildid.c debugaltlink.c debuglink.c \ - dwarf-getmacros.c dwarf-getstring.c dwfl-addr-sect.c \ + deleted.c deleted-lib.c dwarf-getmacros.c dwarf-getstring.c \ + dwarf-ranges.c dwelfgnucompressed.c dwfl-addr-sect.c \ dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \ - dwfl-bug-getmodules.c dwfl-bug-report.c \ + dwfl-bug-getmodules.c dwfl-bug-report.c dwfl-proc-attach.c \ dwfl-report-elf-align.c dwfllines.c dwflmodtest.c dwflsyms.c \ - early-offscn.c ecp.c find-prologues.c funcretval.c \ - funcscopes.c get-aranges.c get-files.c get-lines.c \ - get-pubnames.c hash.c line2addr.c low_high_pc.c \ - md5-sha1-test.c msg_tst.c newfile.c newscn.c rdwrmmap.c \ - rerequest_tag.c saridx.c scnnames.c sectiondump.c \ - show-abbrev.c show-die-info.c showptable.c \ - test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \ - typeiter.c typeiter2.c update1.c update2.c update3.c update4.c \ - varlocs.c + early-offscn.c ecp.c elfgetchdr.c elfgetzdata.c elfputzdata.c \ + elfshphehdr.c elfstrmerge.c elfstrtab.c find-prologues.c \ + funcretval.c funcscopes.c get-aranges.c get-files.c \ + get-lines.c get-pubnames.c getsrc_die.c hash.c line2addr.c \ + low_high_pc.c md5-sha1-test.c msg_tst.c newdata.c newfile.c \ + newscn.c rdwrmmap.c rerequest_tag.c saridx.c scnnames.c \ + sectiondump.c show-abbrev.c show-die-info.c showptable.c \ + strptr.c test-elf_cntl_gelf_getshdr.c test-flag-nobits.c \ + test-nlist.c typeiter.c typeiter2.c update1.c update2.c \ + update3.c update4.c varlocs.c vdsosyms.c zstrptr.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -733,6 +830,9 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/eu.am $(top_srcdir)/config/test-driver \ + ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -742,6 +842,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BZ2_LIB = @BZ2_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_BIARCH = @CC_BIARCH@ @@ -761,6 +862,9 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_BISON = @HAVE_BISON@ +HAVE_BUNZIP2 = @HAVE_BUNZIP2@ +HAVE_FLEX = @HAVE_FLEX@ HAVE_VALGRIND = @HAVE_VALGRIND@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -772,6 +876,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ +LIBLZMA = @LIBLZMA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ @@ -815,6 +920,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +argp_LDADD = @argp_LDADD@ base_cpu = @base_cpu@ bindir = @bindir@ build = @build@ @@ -858,17 +964,31 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_1) +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) + +# Drop the 'u' flag that automake adds by default. It is incompatible +# with deterministic archives. +ARFLAGS = cr +@ADD_STACK_USAGE_WARNING_FALSE@STACK_USAGE_WARNING = + +# Warn about stack usage of more than 256K = 262144 bytes. +@ADD_STACK_USAGE_WARNING_TRUE@STACK_USAGE_WARNING = -Wstack-usage=262144 AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + -Wold-style-definition -Wstrict-prototypes \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) +DEFS.os = -DPIC -DSHARED $(am__append_1) CLEANFILES = *.gcno *.gcda -textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_msg = echo "WARNING: TEXTREL found in '$@'" +@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg) +@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf -AM_LDFLAGS = $(am__append_2) $(am__append_3) +AM_LDFLAGS = $(am__append_3) $(am__append_4) @TESTS_RPATH_FALSE@tests_rpath = no @TESTS_RPATH_TRUE@tests_rpath = yes asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ @@ -887,9 +1007,13 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-line2addr.sh run-elflint-test.sh testfile14.bz2 \ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \ + run-strip-test9.sh run-strip-test10.sh run-strip-strmerge.sh \ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \ hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \ - run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh\ + run-unstrip-test.sh run-unstrip-test2.sh \ + testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \ + testfile-info-link.stripped.bz2 run-unstrip-test3.sh \ + run-unstrip-M.sh run-elfstrmerge-test.sh \ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \ run-ranlib-test3.sh run-ranlib-test4.sh \ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ @@ -897,7 +1021,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-find-prologues.sh run-allregs.sh run-native-test.sh \ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \ run-dwfl-addr-sect.sh run-early-offscn.sh \ - run-dwarf-getmacros.sh run-test-flag-nobits.sh \ + run-dwarf-getmacros.sh \ + run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \ + run-test-flag-nobits.sh \ run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \ testfile15.bz2 testfile15.debug.bz2 \ testfile16.bz2 testfile16.debug.bz2 \ @@ -924,9 +1050,11 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \ testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \ testfile49.bz2 testfile50.bz2 testfile51.bz2 \ + testfile-macros-0xff.bz2 \ run-readelf-macro.sh testfilemacro.bz2 \ run-readelf-loc.sh testfileloc.bz2 \ run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \ + run-readelf-z.sh \ run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \ testfile_multi.dwz.bz2 testfile_multi_main.bz2 \ testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \ @@ -979,6 +1107,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \ test-core.exec.bz2 run-addr2line-test.sh \ run-addr2line-i-test.sh testfile-inlines.bz2 \ + run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \ + run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \ testfileppc32.bz2 testfileppc64.bz2 \ testfiles390.bz2 testfiles390x.bz2 \ testfilearm.bz2 testfileaarch64.bz2 \ @@ -994,6 +1124,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-backtrace-native.sh run-backtrace-native-biarch.sh \ run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \ + run-backtrace-core-x32.sh \ backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \ backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \ backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \ @@ -1003,14 +1134,38 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ run-backtrace-core-aarch64.sh \ backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \ + run-backtrace-core-sparc.sh \ + backtrace.sparc.core.bz2 backtrace.sparc.exec.bz2 \ run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \ testfile-backtrace-demangle.cc \ testfile-backtrace-demangle.core.bz2 \ run-stack-d-test.sh run-stack-i-test.sh \ + run-stack-demangled-test.sh \ testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \ - run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 - -@USE_VALGRIND_TRUE@valgrind_cmd = 'valgrind -q --error-exitcode=1 --run-libc-freeres=no' + run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \ + run-readelf-zdebug-rel.sh testfile-debug-rel.o.bz2 \ + testfile-debug-rel-g.o.bz2 testfile-debug-rel-z.o.bz2 \ + run-readelf-zx.sh run-readelf-zp.sh \ + run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \ + linkmap-cut.bz2 linkmap-cut.core.bz2 \ + run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \ + testfile-sizes3.o.bz2 \ + run-readelf-A.sh testfileppc32attrs.o.bz2 \ + testfile-debug-types.bz2 \ + run-getsrc-die.sh run-strptr.sh \ + testfile-x32-core.bz2 testfile-x32.bz2 \ + backtrace.x32.core.bz2 backtrace.x32.exec.bz2 \ + testfile-x32-s.bz2 testfile-x32-d.bz2 testfile-x32-debug.bz2 \ + run-lfs-symbols.sh lfs-symbols testfile-nolfs.bz2 \ + testfile-zgnu32.bz2 testfile-zgnu64.bz2 \ + testfile-zgnu32be.bz2 testfile-zgnu64be.bz2 \ + run-dwelfgnucompressed.sh \ + testfile-zgabi32.bz2 testfile-zgabi64.bz2 \ + testfile-zgabi32be.bz2 testfile-zgabi64be.bz2 \ + run-elfgetchdr.sh run-elfgetzdata.sh run-elfputzdata.sh \ + run-zstrptr.sh run-compress-test.sh + +@USE_VALGRIND_TRUE@valgrind_cmd = 'valgrind -q --leak-check=full --error-exitcode=1' installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \ bindir=$(DESTDIR)$(bindir); \ LC_ALL=C; LANG=C; \ @@ -1042,10 +1197,10 @@ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ @STANDALONE_TRUE@LOG_COMPILER = $(installed_LOG_COMPILER) @BUILD_STATIC_FALSE@@STANDALONE_FALSE@libdw = ../libdw/libdw.so -@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl +@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl @STANDALONE_TRUE@libdw = -ldw @BUILD_STATIC_FALSE@@STANDALONE_FALSE@libelf = ../libelf/libelf.so -@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libelf = ../libelf/libelf.a +@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libelf = ../libelf/libelf.a -lz @STANDALONE_TRUE@libelf = -lelf @BUILD_STATIC_FALSE@@STANDALONE_FALSE@libasm = ../libasm/libasm.so @BUILD_STATIC_TRUE@@STANDALONE_FALSE@libasm = ../libasm/libasm.a @@ -1077,12 +1232,12 @@ get_lines_LDADD = $(libdw) $(libelf) get_files_LDADD = $(libdw) $(libelf) get_aranges_LDADD = $(libdw) $(libelf) allfcts_LDADD = $(libdw) $(libelf) -line2addr_LDADD = $(libdw) -addrscopes_LDADD = $(libdw) -funcscopes_LDADD = $(libdw) -funcretval_LDADD = $(libdw) -allregs_LDADD = $(libdw) -find_prologues_LDADD = $(libdw) +line2addr_LDADD = $(libdw) $(argp_LDADD) +addrscopes_LDADD = $(libdw) $(argp_LDADD) +funcscopes_LDADD = $(libdw) $(argp_LDADD) +funcretval_LDADD = $(libdw) $(argp_LDADD) +allregs_LDADD = $(libdw) $(argp_LDADD) +find_prologues_LDADD = $(libdw) $(argp_LDADD) #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) -ldl @@ -1093,30 +1248,31 @@ asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) -ldl asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) -ldl -dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) -ldl +dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl rdwrmmap_LDADD = $(libelf) dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl arls_LDADD = $(libelf) dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl -dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) -ldl +dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl dwarf_getmacros_LDADD = $(libdw) +dwarf_ranges_LDADD = $(libdw) dwarf_getstring_LDADD = $(libdw) -addrcfi_LDADD = $(libdw) $(libebl) $(libelf) -ldl +addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl test_flag_nobits_LDADD = $(libelf) rerequest_tag_LDADD = $(libdw) alldts_LDADD = $(libebl) $(libelf) md5_sha1_test_LDADD = $(libeu) typeiter_LDADD = $(libdw) $(libelf) typeiter2_LDADD = $(libdw) $(libelf) -low_high_pc_LDADD = $(libdw) $(libelf) +low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD) test_elf_cntl_gelf_getshdr_LDADD = $(libelf) -dwflsyms_LDADD = $(libdw) $(libelf) -dwfllines_LDADD = $(libdw) $(libelf) +dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD) +dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD) dwfl_report_elf_align_LDADD = $(libdw) -varlocs_LDADD = $(libdw) $(libelf) -backtrace_LDADD = $(libdw) $(libelf) +varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD) +backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD) # backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables: backtrace_child_CFLAGS = -fPIE backtrace_child_LDFLAGS = -pie -pthread @@ -1127,6 +1283,24 @@ backtrace_dwarf_LDADD = $(libdw) $(libelf) debuglink_LDADD = $(libdw) $(libelf) debugaltlink_LDADD = $(libdw) $(libelf) buildid_LDADD = $(libdw) $(libelf) +deleted_LDADD = ./deleted-lib.so +deleted_lib_so_LDFLAGS = -shared -rdynamic +deleted_lib_so_CFLAGS = -fPIC -fasynchronous-unwind-tables +aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD) +vdsosyms_LDADD = $(libdw) $(libelf) +getsrc_die_LDADD = $(libdw) $(libelf) +strptr_LDADD = $(libelf) +newdata_LDADD = $(libelf) +elfstrtab_LDADD = $(libelf) +dwfl_proc_attach_LDADD = $(libdw) +dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS) +elfshphehdr_LDADD = $(libelf) +elfstrmerge_LDADD = $(libebl) $(libelf) +dwelfgnucompressed_LDADD = $(libelf) $(libdw) +elfgetchdr_LDADD = $(libelf) $(libdw) +elfgetzdata_LDADD = $(libelf) +elfputzdata_LDADD = $(libelf) +zstrptr_LDADD = $(libelf) all: all-am .SUFFIXES: @@ -1143,7 +1317,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits tests/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1152,7 +1325,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/config/eu.am: +$(top_srcdir)/config/eu.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1174,6 +1347,10 @@ addrscopes$(EXEEXT): $(addrscopes_OBJECTS) $(addrscopes_DEPENDENCIES) $(EXTRA_ad @rm -f addrscopes$(EXEEXT) $(AM_V_CCLD)$(LINK) $(addrscopes_OBJECTS) $(addrscopes_LDADD) $(LIBS) +aggregate_size$(EXEEXT): $(aggregate_size_OBJECTS) $(aggregate_size_DEPENDENCIES) $(EXTRA_aggregate_size_DEPENDENCIES) + @rm -f aggregate_size$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aggregate_size_OBJECTS) $(aggregate_size_LDADD) $(LIBS) + alldts$(EXEEXT): $(alldts_OBJECTS) $(alldts_DEPENDENCIES) $(EXTRA_alldts_DEPENDENCIES) @rm -f alldts$(EXEEXT) $(AM_V_CCLD)$(LINK) $(alldts_OBJECTS) $(alldts_LDADD) $(LIBS) @@ -1262,6 +1439,14 @@ debuglink$(EXEEXT): $(debuglink_OBJECTS) $(debuglink_DEPENDENCIES) $(EXTRA_debug @rm -f debuglink$(EXEEXT) $(AM_V_CCLD)$(LINK) $(debuglink_OBJECTS) $(debuglink_LDADD) $(LIBS) +deleted$(EXEEXT): $(deleted_OBJECTS) $(deleted_DEPENDENCIES) $(EXTRA_deleted_DEPENDENCIES) + @rm -f deleted$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(deleted_OBJECTS) $(deleted_LDADD) $(LIBS) + +deleted-lib.so$(EXEEXT): $(deleted_lib_so_OBJECTS) $(deleted_lib_so_DEPENDENCIES) $(EXTRA_deleted_lib_so_DEPENDENCIES) + @rm -f deleted-lib.so$(EXEEXT) + $(AM_V_CCLD)$(deleted_lib_so_LINK) $(deleted_lib_so_OBJECTS) $(deleted_lib_so_LDADD) $(LIBS) + dwarf-getmacros$(EXEEXT): $(dwarf_getmacros_OBJECTS) $(dwarf_getmacros_DEPENDENCIES) $(EXTRA_dwarf_getmacros_DEPENDENCIES) @rm -f dwarf-getmacros$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dwarf_getmacros_OBJECTS) $(dwarf_getmacros_LDADD) $(LIBS) @@ -1270,6 +1455,14 @@ dwarf-getstring$(EXEEXT): $(dwarf_getstring_OBJECTS) $(dwarf_getstring_DEPENDENC @rm -f dwarf-getstring$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dwarf_getstring_OBJECTS) $(dwarf_getstring_LDADD) $(LIBS) +dwarf-ranges$(EXEEXT): $(dwarf_ranges_OBJECTS) $(dwarf_ranges_DEPENDENCIES) $(EXTRA_dwarf_ranges_DEPENDENCIES) + @rm -f dwarf-ranges$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dwarf_ranges_OBJECTS) $(dwarf_ranges_LDADD) $(LIBS) + +dwelfgnucompressed$(EXEEXT): $(dwelfgnucompressed_OBJECTS) $(dwelfgnucompressed_DEPENDENCIES) $(EXTRA_dwelfgnucompressed_DEPENDENCIES) + @rm -f dwelfgnucompressed$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dwelfgnucompressed_OBJECTS) $(dwelfgnucompressed_LDADD) $(LIBS) + dwfl-addr-sect$(EXEEXT): $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_DEPENDENCIES) $(EXTRA_dwfl_addr_sect_DEPENDENCIES) @rm -f dwfl-addr-sect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_LDADD) $(LIBS) @@ -1290,6 +1483,10 @@ dwfl-bug-report$(EXEEXT): $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_DEPENDENC @rm -f dwfl-bug-report$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_LDADD) $(LIBS) +dwfl-proc-attach$(EXEEXT): $(dwfl_proc_attach_OBJECTS) $(dwfl_proc_attach_DEPENDENCIES) $(EXTRA_dwfl_proc_attach_DEPENDENCIES) + @rm -f dwfl-proc-attach$(EXEEXT) + $(AM_V_CCLD)$(dwfl_proc_attach_LINK) $(dwfl_proc_attach_OBJECTS) $(dwfl_proc_attach_LDADD) $(LIBS) + dwfl-report-elf-align$(EXEEXT): $(dwfl_report_elf_align_OBJECTS) $(dwfl_report_elf_align_DEPENDENCIES) $(EXTRA_dwfl_report_elf_align_DEPENDENCIES) @rm -f dwfl-report-elf-align$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dwfl_report_elf_align_OBJECTS) $(dwfl_report_elf_align_LDADD) $(LIBS) @@ -1314,6 +1511,30 @@ ecp$(EXEEXT): $(ecp_OBJECTS) $(ecp_DEPENDENCIES) $(EXTRA_ecp_DEPENDENCIES) @rm -f ecp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ecp_OBJECTS) $(ecp_LDADD) $(LIBS) +elfgetchdr$(EXEEXT): $(elfgetchdr_OBJECTS) $(elfgetchdr_DEPENDENCIES) $(EXTRA_elfgetchdr_DEPENDENCIES) + @rm -f elfgetchdr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfgetchdr_OBJECTS) $(elfgetchdr_LDADD) $(LIBS) + +elfgetzdata$(EXEEXT): $(elfgetzdata_OBJECTS) $(elfgetzdata_DEPENDENCIES) $(EXTRA_elfgetzdata_DEPENDENCIES) + @rm -f elfgetzdata$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfgetzdata_OBJECTS) $(elfgetzdata_LDADD) $(LIBS) + +elfputzdata$(EXEEXT): $(elfputzdata_OBJECTS) $(elfputzdata_DEPENDENCIES) $(EXTRA_elfputzdata_DEPENDENCIES) + @rm -f elfputzdata$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfputzdata_OBJECTS) $(elfputzdata_LDADD) $(LIBS) + +elfshphehdr$(EXEEXT): $(elfshphehdr_OBJECTS) $(elfshphehdr_DEPENDENCIES) $(EXTRA_elfshphehdr_DEPENDENCIES) + @rm -f elfshphehdr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfshphehdr_OBJECTS) $(elfshphehdr_LDADD) $(LIBS) + +elfstrmerge$(EXEEXT): $(elfstrmerge_OBJECTS) $(elfstrmerge_DEPENDENCIES) $(EXTRA_elfstrmerge_DEPENDENCIES) + @rm -f elfstrmerge$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfstrmerge_OBJECTS) $(elfstrmerge_LDADD) $(LIBS) + +elfstrtab$(EXEEXT): $(elfstrtab_OBJECTS) $(elfstrtab_DEPENDENCIES) $(EXTRA_elfstrtab_DEPENDENCIES) + @rm -f elfstrtab$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elfstrtab_OBJECTS) $(elfstrtab_LDADD) $(LIBS) + find-prologues$(EXEEXT): $(find_prologues_OBJECTS) $(find_prologues_DEPENDENCIES) $(EXTRA_find_prologues_DEPENDENCIES) @rm -f find-prologues$(EXEEXT) $(AM_V_CCLD)$(LINK) $(find_prologues_OBJECTS) $(find_prologues_LDADD) $(LIBS) @@ -1342,6 +1563,10 @@ get-pubnames$(EXEEXT): $(get_pubnames_OBJECTS) $(get_pubnames_DEPENDENCIES) $(EX @rm -f get-pubnames$(EXEEXT) $(AM_V_CCLD)$(LINK) $(get_pubnames_OBJECTS) $(get_pubnames_LDADD) $(LIBS) +getsrc_die$(EXEEXT): $(getsrc_die_OBJECTS) $(getsrc_die_DEPENDENCIES) $(EXTRA_getsrc_die_DEPENDENCIES) + @rm -f getsrc_die$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsrc_die_OBJECTS) $(getsrc_die_LDADD) $(LIBS) + hash$(EXEEXT): $(hash_OBJECTS) $(hash_DEPENDENCIES) $(EXTRA_hash_DEPENDENCIES) @rm -f hash$(EXEEXT) $(AM_V_CCLD)$(LINK) $(hash_OBJECTS) $(hash_LDADD) $(LIBS) @@ -1362,6 +1587,10 @@ msg_tst$(EXEEXT): $(msg_tst_OBJECTS) $(msg_tst_DEPENDENCIES) $(EXTRA_msg_tst_DEP @rm -f msg_tst$(EXEEXT) $(AM_V_CCLD)$(LINK) $(msg_tst_OBJECTS) $(msg_tst_LDADD) $(LIBS) +newdata$(EXEEXT): $(newdata_OBJECTS) $(newdata_DEPENDENCIES) $(EXTRA_newdata_DEPENDENCIES) + @rm -f newdata$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newdata_OBJECTS) $(newdata_LDADD) $(LIBS) + newfile$(EXEEXT): $(newfile_OBJECTS) $(newfile_DEPENDENCIES) $(EXTRA_newfile_DEPENDENCIES) @rm -f newfile$(EXEEXT) $(AM_V_CCLD)$(LINK) $(newfile_OBJECTS) $(newfile_LDADD) $(LIBS) @@ -1402,6 +1631,10 @@ showptable$(EXEEXT): $(showptable_OBJECTS) $(showptable_DEPENDENCIES) $(EXTRA_sh @rm -f showptable$(EXEEXT) $(AM_V_CCLD)$(LINK) $(showptable_OBJECTS) $(showptable_LDADD) $(LIBS) +strptr$(EXEEXT): $(strptr_OBJECTS) $(strptr_DEPENDENCIES) $(EXTRA_strptr_DEPENDENCIES) + @rm -f strptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(strptr_OBJECTS) $(strptr_LDADD) $(LIBS) + test-elf_cntl_gelf_getshdr$(EXEEXT): $(test_elf_cntl_gelf_getshdr_OBJECTS) $(test_elf_cntl_gelf_getshdr_DEPENDENCIES) $(EXTRA_test_elf_cntl_gelf_getshdr_DEPENDENCIES) @rm -f test-elf_cntl_gelf_getshdr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_elf_cntl_gelf_getshdr_OBJECTS) $(test_elf_cntl_gelf_getshdr_LDADD) $(LIBS) @@ -1442,6 +1675,14 @@ varlocs$(EXEEXT): $(varlocs_OBJECTS) $(varlocs_DEPENDENCIES) $(EXTRA_varlocs_DEP @rm -f varlocs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(varlocs_OBJECTS) $(varlocs_LDADD) $(LIBS) +vdsosyms$(EXEEXT): $(vdsosyms_OBJECTS) $(vdsosyms_DEPENDENCIES) $(EXTRA_vdsosyms_DEPENDENCIES) + @rm -f vdsosyms$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vdsosyms_OBJECTS) $(vdsosyms_LDADD) $(LIBS) + +zstrptr$(EXEEXT): $(zstrptr_OBJECTS) $(zstrptr_DEPENDENCIES) $(EXTRA_zstrptr_DEPENDENCIES) + @rm -f zstrptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(zstrptr_OBJECTS) $(zstrptr_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1450,6 +1691,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrcfi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrscopes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aggregate_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alldts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allfcts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allregs.Po@am__quote@ @@ -1473,19 +1715,30 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugaltlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debuglink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deleted.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deleted_lib_so-deleted-lib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf-getmacros.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf-getstring.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf-ranges.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwelfgnucompressed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-addr-sect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-addr-overflow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-fd-leak.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-getmodules.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-report.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-proc-attach.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-report-elf-align.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfllines.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwflmodtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwflsyms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/early-offscn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfgetchdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfgetzdata.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfputzdata.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfshphehdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfstrmerge.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfstrtab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find-prologues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcretval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcscopes.Po@am__quote@ @@ -1493,11 +1746,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-files.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-lines.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-pubnames.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsrc_die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line2addr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/low_high_pc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5-sha1-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_tst.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newdata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newscn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdwrmmap.Po@am__quote@ @@ -1508,6 +1763,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show-abbrev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show-die-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/showptable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strptr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-elf_cntl_gelf_getshdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-flag-nobits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nlist.Po@am__quote@ @@ -1518,20 +1774,22 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varlocs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdsosyms.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zstrptr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` backtrace_child-backtrace-child.o: backtrace-child.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -MT backtrace_child-backtrace-child.o -MD -MP -MF $(DEPDIR)/backtrace_child-backtrace-child.Tpo -c -o backtrace_child-backtrace-child.o `test -f 'backtrace-child.c' || echo '$(srcdir)/'`backtrace-child.c @@ -1561,6 +1819,20 @@ backtrace_dwarf-backtrace-dwarf.obj: backtrace-dwarf.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -c -o backtrace_dwarf-backtrace-dwarf.obj `if test -f 'backtrace-dwarf.c'; then $(CYGPATH_W) 'backtrace-dwarf.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-dwarf.c'; fi` +deleted_lib_so-deleted-lib.o: deleted-lib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -MT deleted_lib_so-deleted-lib.o -MD -MP -MF $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo -c -o deleted_lib_so-deleted-lib.o `test -f 'deleted-lib.c' || echo '$(srcdir)/'`deleted-lib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo $(DEPDIR)/deleted_lib_so-deleted-lib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='deleted-lib.c' object='deleted_lib_so-deleted-lib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -c -o deleted_lib_so-deleted-lib.o `test -f 'deleted-lib.c' || echo '$(srcdir)/'`deleted-lib.c + +deleted_lib_so-deleted-lib.obj: deleted-lib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -MT deleted_lib_so-deleted-lib.obj -MD -MP -MF $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo -c -o deleted_lib_so-deleted-lib.obj `if test -f 'deleted-lib.c'; then $(CYGPATH_W) 'deleted-lib.c'; else $(CYGPATH_W) '$(srcdir)/deleted-lib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo $(DEPDIR)/deleted_lib_so-deleted-lib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='deleted-lib.c' object='deleted_lib_so-deleted-lib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -c -o deleted_lib_so-deleted-lib.obj `if test -f 'deleted-lib.c'; then $(CYGPATH_W) 'deleted-lib.c'; else $(CYGPATH_W) '$(srcdir)/deleted-lib.c'; fi` + ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am @@ -1643,7 +1915,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -1936,6 +2208,20 @@ run-strip-test8.sh.log: run-strip-test8.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-strip-test9.sh.log: run-strip-test9.sh + @p='run-strip-test9.sh'; \ + b='run-strip-test9.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-strip-test10.sh.log: run-strip-test10.sh + @p='run-strip-test10.sh'; \ + b='run-strip-test10.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-strip-groups.sh.log: run-strip-groups.sh @p='run-strip-groups.sh'; \ b='run-strip-groups.sh'; \ @@ -1950,6 +2236,13 @@ run-strip-reloc.sh.log: run-strip-reloc.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-strip-strmerge.sh.log: run-strip-strmerge.sh + @p='run-strip-strmerge.sh'; \ + b='run-strip-strmerge.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-unstrip-test.sh.log: run-unstrip-test.sh @p='run-unstrip-test.sh'; \ b='run-unstrip-test.sh'; \ @@ -1964,6 +2257,13 @@ run-unstrip-test2.sh.log: run-unstrip-test2.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-unstrip-test3.sh.log: run-unstrip-test3.sh + @p='run-unstrip-test3.sh'; \ + b='run-unstrip-test3.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-unstrip-M.sh.log: run-unstrip-M.sh @p='run-unstrip-M.sh'; \ b='run-unstrip-M.sh'; \ @@ -1971,6 +2271,13 @@ run-unstrip-M.sh.log: run-unstrip-M.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-elfstrmerge-test.sh.log: run-elfstrmerge-test.sh + @p='run-elfstrmerge-test.sh'; \ + b='run-elfstrmerge-test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-ecp-test.sh.log: run-ecp-test.sh @p='run-ecp-test.sh'; \ b='run-ecp-test.sh'; \ @@ -2153,6 +2460,13 @@ run-readelf-line.sh.log: run-readelf-line.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-readelf-z.sh.log: run-readelf-z.sh + @p='run-readelf-z.sh'; \ + b='run-readelf-z.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-native-test.sh.log: run-native-test.sh @p='run-native-test.sh'; \ b='run-native-test.sh'; \ @@ -2258,6 +2572,13 @@ run-dwarf-getmacros.sh.log: run-dwarf-getmacros.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-dwarf-ranges.sh.log: run-dwarf-ranges.sh + @p='run-dwarf-ranges.sh'; \ + b='run-dwarf-ranges.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-test-flag-nobits.sh.log: run-test-flag-nobits.sh @p='run-test-flag-nobits.sh'; \ b='run-test-flag-nobits.sh'; \ @@ -2384,6 +2705,27 @@ run-addr2line-i-test.sh.log: run-addr2line-i-test.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-addr2line-i-lex-test.sh.log: run-addr2line-i-lex-test.sh + @p='run-addr2line-i-lex-test.sh'; \ + b='run-addr2line-i-lex-test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-addr2line-i-demangle-test.sh.log: run-addr2line-i-demangle-test.sh + @p='run-addr2line-i-demangle-test.sh'; \ + b='run-addr2line-i-demangle-test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-addr2line-alt-debugpath.sh.log: run-addr2line-alt-debugpath.sh + @p='run-addr2line-alt-debugpath.sh'; \ + b='run-addr2line-alt-debugpath.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-varlocs.sh.log: run-varlocs.sh @p='run-varlocs.sh'; \ b='run-varlocs.sh'; \ @@ -2447,6 +2789,13 @@ run-backtrace-core-x86_64.sh.log: run-backtrace-core-x86_64.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-backtrace-core-x32.sh.log: run-backtrace-core-x32.sh + @p='run-backtrace-core-x32.sh'; \ + b='run-backtrace-core-x32.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-backtrace-core-i386.sh.log: run-backtrace-core-i386.sh @p='run-backtrace-core-i386.sh'; \ b='run-backtrace-core-i386.sh'; \ @@ -2482,6 +2831,13 @@ run-backtrace-core-aarch64.sh.log: run-backtrace-core-aarch64.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-backtrace-core-sparc.sh.log: run-backtrace-core-sparc.sh + @p='run-backtrace-core-sparc.sh'; \ + b='run-backtrace-core-sparc.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-backtrace-demangle.sh.log: run-backtrace-demangle.sh @p='run-backtrace-demangle.sh'; \ b='run-backtrace-demangle.sh'; \ @@ -2503,6 +2859,27 @@ run-stack-i-test.sh.log: run-stack-i-test.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-stack-demangled-test.sh.log: run-stack-demangled-test.sh + @p='run-stack-demangled-test.sh'; \ + b='run-stack-demangled-test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-readelf-zx.sh.log: run-readelf-zx.sh + @p='run-readelf-zx.sh'; \ + b='run-readelf-zx.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-readelf-zp.sh.log: run-readelf-zp.sh + @p='run-readelf-zp.sh'; \ + b='run-readelf-zp.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) run-readelf-dwz-multi.sh.log: run-readelf-dwz-multi.sh @p='run-readelf-dwz-multi.sh'; \ b='run-readelf-dwz-multi.sh'; \ @@ -2517,6 +2894,146 @@ run-allfcts-multi.sh.log: run-allfcts-multi.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +run-deleted.sh.log: run-deleted.sh + @p='run-deleted.sh'; \ + b='run-deleted.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-linkmap-cut.sh.log: run-linkmap-cut.sh + @p='run-linkmap-cut.sh'; \ + b='run-linkmap-cut.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-aggregate-size.sh.log: run-aggregate-size.sh + @p='run-aggregate-size.sh'; \ + b='run-aggregate-size.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +vdsosyms.log: vdsosyms$(EXEEXT) + @p='vdsosyms$(EXEEXT)'; \ + b='vdsosyms'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-readelf-A.sh.log: run-readelf-A.sh + @p='run-readelf-A.sh'; \ + b='run-readelf-A.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-getsrc-die.sh.log: run-getsrc-die.sh + @p='run-getsrc-die.sh'; \ + b='run-getsrc-die.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-strptr.sh.log: run-strptr.sh + @p='run-strptr.sh'; \ + b='run-strptr.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +newdata.log: newdata$(EXEEXT) + @p='newdata$(EXEEXT)'; \ + b='newdata'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +elfstrtab.log: elfstrtab$(EXEEXT) + @p='elfstrtab$(EXEEXT)'; \ + b='elfstrtab'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +dwfl-proc-attach.log: dwfl-proc-attach$(EXEEXT) + @p='dwfl-proc-attach$(EXEEXT)'; \ + b='dwfl-proc-attach'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +elfshphehdr.log: elfshphehdr$(EXEEXT) + @p='elfshphehdr$(EXEEXT)'; \ + b='elfshphehdr'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-lfs-symbols.sh.log: run-lfs-symbols.sh + @p='run-lfs-symbols.sh'; \ + b='run-lfs-symbols.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-dwelfgnucompressed.sh.log: run-dwelfgnucompressed.sh + @p='run-dwelfgnucompressed.sh'; \ + b='run-dwelfgnucompressed.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-elfgetchdr.sh.log: run-elfgetchdr.sh + @p='run-elfgetchdr.sh'; \ + b='run-elfgetchdr.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-elfgetzdata.sh.log: run-elfgetzdata.sh + @p='run-elfgetzdata.sh'; \ + b='run-elfgetzdata.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-elfputzdata.sh.log: run-elfputzdata.sh + @p='run-elfputzdata.sh'; \ + b='run-elfputzdata.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-zstrptr.sh.log: run-zstrptr.sh + @p='run-zstrptr.sh'; \ + b='run-zstrptr.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-compress-test.sh.log: run-compress-test.sh + @p='run-compress-test.sh'; \ + b='run-compress-test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-readelf-zdebug.sh.log: run-readelf-zdebug.sh + @p='run-readelf-zdebug.sh'; \ + b='run-readelf-zdebug.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-readelf-zdebug-rel.sh.log: run-readelf-zdebug-rel.sh + @p='run-readelf-zdebug-rel.sh'; \ + b='run-readelf-zdebug-rel.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) msg_tst.log: msg_tst$(EXEEXT) @p='msg_tst$(EXEEXT)'; \ b='msg_tst'; \ @@ -2545,13 +3062,6 @@ run-dwflsyms.sh.log: run-dwflsyms.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -run-readelf-zdebug.sh.log: run-readelf-zdebug.sh - @p='run-readelf-zdebug.sh'; \ - b='run-readelf-zdebug.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) asm-tst1.log: asm-tst1$(EXEEXT) @p='asm-tst1$(EXEEXT)'; \ b='asm-tst1'; \ @@ -2785,19 +3295,24 @@ uninstall-am: mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am recheck tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + %.os: %.c %.o -@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ +@AMDEP_TRUE@ $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ @AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ @AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ @AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \ @AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @AMDEP_TRUE@ fi -@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +@AMDEP_FALSE@ $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + +print-%: + @echo $*=$($*) # Substitute $(COMPILE). backtrace-child-biarch$(EXEEXT): backtrace-child.c - $(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_V_CC)$(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \ diff --git a/tests/addrcfi.c b/tests/addrcfi.c index 8a2d126..589b851 100644 --- a/tests/addrcfi.c +++ b/tests/addrcfi.c @@ -1,5 +1,5 @@ /* Test program for CFI handling. - Copyright (C) 2009-2010, 2013 Red Hat, Inc. + Copyright (C) 2009-2010, 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -34,11 +34,9 @@ op_name (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_OP_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_OP (NAME, CODE) -#define ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP_DESC +#define DWARF_ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_OP +#undef DWARF_ONE_KNOWN_DW_OP }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -162,10 +160,19 @@ handle_address (GElf_Addr pc, Dwfl *dwfl) Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc); struct stuff stuff; - return (handle_cfi (dwfl, ".eh_frame", - dwfl_module_eh_cfi (mod, &stuff.bias), pc, &stuff) - & handle_cfi (dwfl, ".debug_frame", - dwfl_module_dwarf_cfi (mod, &stuff.bias), pc, &stuff)); + stuff.frame = NULL; + stuff.bias = 0; + int res = handle_cfi (dwfl, ".eh_frame", + dwfl_module_eh_cfi (mod, &stuff.bias), pc, &stuff); + free (stuff.frame); + + stuff.frame = NULL; + stuff.bias = 0; + res &= handle_cfi (dwfl, ".debug_frame", + dwfl_module_dwarf_cfi (mod, &stuff.bias), pc, &stuff); + free (stuff.frame); + + return res; } int diff --git a/tests/addrscopes.c b/tests/addrscopes.c index fca61d3..791569f 100644 --- a/tests/addrscopes.c +++ b/tests/addrscopes.c @@ -1,5 +1,5 @@ /* Test program for dwarf_getscopes. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -125,15 +125,16 @@ handle_address (GElf_Addr pc, Dwfl *dwfl) lowpc += cubias; highpc += cubias; Dwfl_Line *loline = dwfl_getsrc (dwfl, lowpc); - Dwfl_Line *hiline = dwfl_getsrc (dwfl, highpc); + Dwfl_Line *hiline = dwfl_getsrc (dwfl, highpc - 1); paddr (": ", lowpc, loline); if (highpc != lowpc) - paddr (" .. ", lowpc, hiline == loline ? NULL : hiline); + paddr (" .. ", highpc - 1, hiline == loline ? NULL : hiline); } puts (""); print_vars (indent + INDENT, die); } + free (scopes); } } diff --git a/tests/aggregate_size.c b/tests/aggregate_size.c new file mode 100644 index 0000000..930eafa --- /dev/null +++ b/tests/aggregate_size.c @@ -0,0 +1,83 @@ +/* Test program for dwarf_aggregate_size. Prints size of top-level vars. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include ELFUTILS_HEADER(dwfl) +#include +#include +#include + +void +print_var_type_size (Dwarf_Die *var) +{ + Dwarf_Attribute attr_mem; + Dwarf_Die type_mem; + Dwarf_Die *type; + const char *name = dwarf_diename (var); + + type = dwarf_formref_die (dwarf_attr (var, DW_AT_type, &attr_mem), + &type_mem); + if (type != NULL) + { + Dwarf_Word size; + if (dwarf_aggregate_size (type, &size) < 0) + printf ("%s no size: %s\n", name, dwarf_errmsg (-1)); + else + printf ("%s size %" PRIu64 "\n", name, size); + } + else + printf ("%s has no type.\n", name); +} + +int +main (int argc, char *argv[]) +{ + + int remaining; + Dwfl *dwfl; + (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, + &dwfl); + assert (dwfl != NULL); + + Dwarf_Die *cu = NULL; + Dwarf_Addr dwbias; + while ((cu = dwfl_nextcu (dwfl, cu, &dwbias)) != NULL) + { + Dwarf_Die die_mem; + Dwarf_Die *die = &die_mem; + dwarf_child (cu, &die_mem); + + while (1) + { + if (dwarf_tag (die) == DW_TAG_variable) + print_var_type_size (die); + + if (dwarf_siblingof (die, &die_mem) != 0) + break; + } + } + + dwfl_end (dwfl); +} diff --git a/tests/alldts.c b/tests/alldts.c index 378aa41..eaecaf5 100644 --- a/tests/alldts.c +++ b/tests/alldts.c @@ -68,7 +68,7 @@ main (void) (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); /* Open the file. */ - int fd = open64 (fname, O_RDWR | O_CREAT | O_TRUNC, 0666); + int fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666); if (fd == -1) { printf ("cannot open `%s': %m\n", fname); @@ -256,6 +256,9 @@ main (void) /* And the data allocated in the .shstrtab section. */ free (data->d_buf); + /* And the dynamic entries. */ + free (dyn); + /* All done. */ if (elf_end (elf) != 0) { diff --git a/tests/allregs.c b/tests/allregs.c index b103ce1..286f7e3 100644 --- a/tests/allregs.c +++ b/tests/allregs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Red Hat, Inc. +/* Copyright (C) 2005, 2006, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -35,9 +35,9 @@ dwarf_encoding_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ATE -#undef ONE_KNOWN_DW_ATE +#define DWARF_ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ATE +#undef DWARF_ONE_KNOWN_DW_ATE }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -184,6 +184,7 @@ main (int argc, char **argv) dwarf_encoding_string (state.info[i].type), state.info[i].bits); } + free (state.info); } else do diff --git a/tests/arls.c b/tests/arls.c index cd8e4b8..ca0d3e6 100644 --- a/tests/arls.c +++ b/tests/arls.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/tests/asm-tst1.c b/tests/asm-tst1.c index f611d66..9afc676 100644 --- a/tests/asm-tst1.c +++ b/tests/asm-tst1.c @@ -160,7 +160,7 @@ main (void) scn = elf_getscn (elf, cnt); if (scn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -168,7 +168,7 @@ main (void) shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; @@ -177,7 +177,7 @@ main (void) if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]) != 0) { - printf ("section %Zd's name differs: %s vs %s\n", cnt, + printf ("section %zd's name differs: %s vs %s\n", cnt, elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]); result = 1; @@ -185,7 +185,7 @@ main (void) if (shdr->sh_type != (cnt == 3 ? SHT_STRTAB : SHT_PROGBITS)) { - printf ("section %Zd's type differs\n", cnt); + printf ("section %zd's type differs\n", cnt); result = 1; } @@ -193,51 +193,51 @@ main (void) || (cnt == 2 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) || (cnt == 3 && shdr->sh_flags != 0)) { - printf ("section %Zd's flags differs\n", cnt); + printf ("section %zd's flags differs\n", cnt); result = 1; } if (shdr->sh_addr != 0) { - printf ("section %Zd's address differs\n", cnt); + printf ("section %zd's address differs\n", cnt); result = 1; } if (shdr->sh_offset != ((sizeof (Elf32_Ehdr) + 31) & ~31)) { - printf ("section %Zd's offset differs\n", cnt); + printf ("section %zd's offset differs\n", cnt); result = 1; } if ((cnt != 3 && shdr->sh_size != 0) || (cnt == 3 && shdr->sh_size != 23)) { - printf ("section %Zd's size differs\n", cnt); + printf ("section %zd's size differs\n", cnt); result = 1; } if (shdr->sh_link != 0) { - printf ("section %Zd's link differs\n", cnt); + printf ("section %zd's link differs\n", cnt); result = 1; } if (shdr->sh_info != 0) { - printf ("section %Zd's info differs\n", cnt); + printf ("section %zd's info differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_addralign != 32) || (cnt != 1 && shdr->sh_addralign != 1)) { - printf ("section %Zd's addralign differs\n", cnt); + printf ("section %zd's addralign differs\n", cnt); result = 1; } if (shdr->sh_entsize != 0) { - printf ("section %Zd's entsize differs\n", cnt); + printf ("section %zd's entsize differs\n", cnt); result = 1; } } diff --git a/tests/asm-tst2.c b/tests/asm-tst2.c index 41bf13a..2556d0c 100644 --- a/tests/asm-tst2.c +++ b/tests/asm-tst2.c @@ -176,7 +176,7 @@ main (void) scn = elf_getscn (elf, cnt); if (scn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -184,7 +184,7 @@ main (void) shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; @@ -193,7 +193,7 @@ main (void) if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]) != 0) { - printf ("section %Zd's name differs: %s vs %s\n", cnt, + printf ("section %zd's name differs: %s vs %s\n", cnt, elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]); result = 1; @@ -201,20 +201,20 @@ main (void) if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS)) { - printf ("section %Zd's type differs\n", cnt); + printf ("section %zd's type differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) || (cnt == 2 && shdr->sh_flags != 0)) { - printf ("section %Zd's flags differs\n", cnt); + printf ("section %zd's flags differs\n", cnt); result = 1; } if (shdr->sh_addr != 0) { - printf ("section %Zd's address differs\n", cnt); + printf ("section %zd's address differs\n", cnt); result = 1; } @@ -225,7 +225,7 @@ main (void) + strlen ("two") + 1 + strlen ("three") + 1))) { - printf ("section %Zd's offset differs\n", cnt); + printf ("section %zd's offset differs\n", cnt); result = 1; } @@ -234,32 +234,32 @@ main (void) + strlen ("three") + 1)) || (cnt == 2 && shdr->sh_size != 17)) { - printf ("section %Zd's size differs\n", cnt); + printf ("section %zd's size differs\n", cnt); result = 1; } if (shdr->sh_link != 0) { - printf ("section %Zd's link differs\n", cnt); + printf ("section %zd's link differs\n", cnt); result = 1; } if (shdr->sh_info != 0) { - printf ("section %Zd's info differs\n", cnt); + printf ("section %zd's info differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_addralign != 16) || (cnt != 1 && shdr->sh_addralign != 1)) { - printf ("section %Zd's addralign differs\n", cnt); + printf ("section %zd's addralign differs\n", cnt); result = 1; } if (shdr->sh_entsize != 0) { - printf ("section %Zd's entsize differs\n", cnt); + printf ("section %zd's entsize differs\n", cnt); result = 1; } } diff --git a/tests/asm-tst3.c b/tests/asm-tst3.c index acec1a4..e52cfbe 100644 --- a/tests/asm-tst3.c +++ b/tests/asm-tst3.c @@ -176,7 +176,7 @@ main (void) scn = elf_getscn (elf, cnt); if (scn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -184,7 +184,7 @@ main (void) shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; @@ -193,7 +193,7 @@ main (void) if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]) != 0) { - printf ("section %Zd's name differs: %s vs %s\n", cnt, + printf ("section %zd's name differs: %s vs %s\n", cnt, elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]); result = 1; @@ -201,20 +201,20 @@ main (void) if (shdr->sh_type != scntypes[cnt]) { - printf ("section %Zd's type differs\n", cnt); + printf ("section %zd's type differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) || (cnt != 1 && shdr->sh_flags != 0)) { - printf ("section %Zd's flags differs\n", cnt); + printf ("section %zd's flags differs\n", cnt); result = 1; } if (shdr->sh_addr != 0) { - printf ("section %Zd's address differs\n", cnt); + printf ("section %zd's address differs\n", cnt); result = 1; } diff --git a/tests/asm-tst4.c b/tests/asm-tst4.c index 4788b79..52e9e20 100644 --- a/tests/asm-tst4.c +++ b/tests/asm-tst4.c @@ -62,7 +62,7 @@ main (void) AsmScn_t *scn; /* Create a unique name. */ - snprintf (buf, sizeof (buf), ".data.%Zu", cnt); + snprintf (buf, sizeof (buf), ".data.%zu", cnt); /* Create the section. */ scn = asm_newscn (ctx, buf, SHT_PROGBITS, SHF_ALLOC | SHF_WRITE); diff --git a/tests/asm-tst5.c b/tests/asm-tst5.c index d97d4be..5a29b01 100644 --- a/tests/asm-tst5.c +++ b/tests/asm-tst5.c @@ -64,7 +64,7 @@ main (void) AsmScn_t *scn; /* Create a unique name. */ - snprintf (buf, sizeof (buf), ".data.%Zu", cnt); + snprintf (buf, sizeof (buf), ".data.%zu", cnt); /* Create the section. */ scn = asm_newscn (ctx, buf, SHT_PROGBITS, SHF_ALLOC | SHF_WRITE); @@ -77,7 +77,7 @@ main (void) } /* Add a name. */ - snprintf (buf, sizeof (buf), "%Zu", cnt); + snprintf (buf, sizeof (buf), "%zu", cnt); if (asm_newsym (scn, buf, sizeof (uint32_t), STT_OBJECT, STB_GLOBAL) == NULL) { diff --git a/tests/asm-tst6.c b/tests/asm-tst6.c index 35854d5..bd9b362 100644 --- a/tests/asm-tst6.c +++ b/tests/asm-tst6.c @@ -62,11 +62,11 @@ main (void) AsmScn_t *scn; AsmSym_t *sym; - snprintf (buf, sizeof (buf), ".grp%Zu", cnt); + snprintf (buf, sizeof (buf), ".grp%zu", cnt); grp = asm_newscngrp (ctx, buf, NULL, 0); if (grp == NULL) { - printf ("cannot section group %Zu: %s\n", cnt, asm_errmsg (-1)); + printf ("cannot section group %zu: %s\n", cnt, asm_errmsg (-1)); asm_abort (ctx); return 1; } @@ -75,14 +75,14 @@ main (void) SHF_ALLOC | SHF_WRITE, grp); if (scn == NULL) { - printf ("cannot data section for group %Zu: %s\n", + printf ("cannot data section for group %zu: %s\n", cnt, asm_errmsg (-1)); asm_abort (ctx); return 1; } /* Add a name. */ - snprintf (buf, sizeof (buf), "%Zu", cnt); + snprintf (buf, sizeof (buf), "%zu", cnt); sym = asm_newsym (scn, buf, sizeof (uint32_t), STT_OBJECT, STB_GLOBAL); if (sym == NULL) @@ -104,7 +104,7 @@ main (void) /* Now we have a symbol, use it as the signature. */ if (asm_scngrp_newsignature (grp, sym) != 0) { - printf ("cannot set signature for section group %Zu: %s\n", + printf ("cannot set signature for section group %zu: %s\n", cnt, asm_errmsg (-1)); asm_abort (ctx); return 1; @@ -114,7 +114,7 @@ main (void) scn = asm_newscn_ingrp (ctx, ".stab", SHT_PROGBITS, 0, grp); if (scn == NULL) { - printf ("cannot stab section for group %Zu: %s\n", + printf ("cannot stab section for group %zu: %s\n", cnt, asm_errmsg (-1)); asm_abort (ctx); return 1; diff --git a/tests/asm-tst7.c b/tests/asm-tst7.c index a875eb4..00cb2bf 100644 --- a/tests/asm-tst7.c +++ b/tests/asm-tst7.c @@ -102,7 +102,7 @@ main (void) scn = elf_getscn (elf, cnt); if (scn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -110,7 +110,7 @@ main (void) shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; diff --git a/tests/asm-tst8.c b/tests/asm-tst8.c index 597c5cb..4fb0d99 100644 --- a/tests/asm-tst8.c +++ b/tests/asm-tst8.c @@ -103,7 +103,7 @@ main (void) scn = elf_getscn (elf, cnt); if (scn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -111,7 +111,7 @@ main (void) shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; diff --git a/tests/asm-tst9.c b/tests/asm-tst9.c index b9fcdd4..b6d0e43 100644 --- a/tests/asm-tst9.c +++ b/tests/asm-tst9.c @@ -210,7 +210,7 @@ main (void) escn = elf_getscn (elf, cnt); if (escn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -218,7 +218,7 @@ main (void) shdr = gelf_getshdr (escn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; @@ -227,7 +227,7 @@ main (void) if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]) != 0) { - printf ("section %Zd's name differs: %s vs %s\n", cnt, + printf ("section %zd's name differs: %s vs %s\n", cnt, elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]); result = 1; @@ -235,20 +235,20 @@ main (void) if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS)) { - printf ("section %Zd's type differs\n", cnt); + printf ("section %zd's type differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) || (cnt == 2 && shdr->sh_flags != 0)) { - printf ("section %Zd's flags differs\n", cnt); + printf ("section %zd's flags differs\n", cnt); result = 1; } if (shdr->sh_addr != 0) { - printf ("section %Zd's address differs\n", cnt); + printf ("section %zd's address differs\n", cnt); result = 1; } @@ -257,39 +257,39 @@ main (void) && shdr->sh_offset != (((sizeof (Elf32_Ehdr) + 15) & ~15) + sizeof (expecteddata)))) { - printf ("section %Zd's offset differs\n", cnt); + printf ("section %zd's offset differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_size != sizeof (expecteddata)) || (cnt == 2 && shdr->sh_size != 17)) { - printf ("section %Zd's size differs\n", cnt); + printf ("section %zd's size differs\n", cnt); result = 1; } if (shdr->sh_link != 0) { - printf ("section %Zd's link differs\n", cnt); + printf ("section %zd's link differs\n", cnt); result = 1; } if (shdr->sh_info != 0) { - printf ("section %Zd's info differs\n", cnt); + printf ("section %zd's info differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_addralign != 16) || (cnt != 1 && shdr->sh_addralign != 1)) { - printf ("section %Zd's addralign differs\n", cnt); + printf ("section %zd's addralign differs\n", cnt); result = 1; } if (shdr->sh_entsize != 0) { - printf ("section %Zd's entsize differs\n", cnt); + printf ("section %zd's entsize differs\n", cnt); result = 1; } @@ -299,14 +299,14 @@ main (void) if (data == NULL) { - printf ("cannot get data of section %Zd\n", cnt); + printf ("cannot get data of section %zd\n", cnt); result = 1; } else { if (data->d_size != sizeof (expecteddata)) { - printf ("data block size of section %Zd wrong: got %Zd, " + printf ("data block size of section %zd wrong: got %zd, " "expected 96\n", cnt, data->d_size); result = 1; } @@ -314,7 +314,7 @@ main (void) if (memcmp (data->d_buf, expecteddata, sizeof (expecteddata)) != 0) { - printf ("data block content of section %Zd wrong\n", cnt); + printf ("data block content of section %zd wrong\n", cnt); result = 1; } } diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c index 788801c..40e7b32 100644 --- a/tests/backtrace-child.c +++ b/tests/backtrace-child.c @@ -154,7 +154,7 @@ stdarg (int f UNUSED, ...) if (ptraceme) { long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL); - assert_perror (errno); + assert (errno == 0); assert (l == 0); } #ifdef __x86_64__ @@ -226,7 +226,7 @@ main (int argc UNUSED, char **argv) { errno = 0; long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL); - assert_perror (errno); + assert (errno == 0); assert (l == 0); } if (gencore) diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c index 01c1c00..bc5ceba 100644 --- a/tests/backtrace-data.c +++ b/tests/backtrace-data.c @@ -30,6 +30,7 @@ #include #include #include +#if defined(__x86_64__) && defined(__linux__) #include #include #include @@ -39,6 +40,7 @@ #include #include #include ELFUTILS_HEADER(dwfl) +#endif #if !defined(__x86_64__) || !defined(__linux__) @@ -74,7 +76,7 @@ memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result, errno = 0; long l = ptrace (PTRACE_PEEKDATA, child, (void *) (uintptr_t) addr, NULL); - assert_perror (errno); + assert (errno == 0); *result = l; /* We could also return false for failed ptrace. */ @@ -89,10 +91,10 @@ maps_lookup (pid_t pid, Dwarf_Addr addr, GElf_Addr *basep) { char *fname; int i = asprintf (&fname, "/proc/%ld/maps", (long) pid); - assert_perror (errno); + assert (errno == 0); assert (i > 0); FILE *f = fopen (fname, "r"); - assert_perror (errno); + assert (errno == 0); assert (f); free (fname); for (;;) @@ -100,7 +102,7 @@ maps_lookup (pid_t pid, Dwarf_Addr addr, GElf_Addr *basep) // 37e3c22000-37e3c23000 rw-p 00022000 00:11 49532 /lib64/ld-2.14.90.so */ unsigned long start, end, offset; i = fscanf (f, "%lx-%lx %*s %lx %*x:%*x %*x", &start, &end, &offset); - assert_perror (errno); + assert (errno == 0); assert (i == 3); char *filename = strdup (""); assert (filename); @@ -121,7 +123,7 @@ maps_lookup (pid_t pid, Dwarf_Addr addr, GElf_Addr *basep) if (start <= addr && addr < end) { i = fclose (f); - assert_perror (errno); + assert (errno == 0); assert (i == 0); *basep = start - offset; @@ -171,7 +173,7 @@ set_initial_registers (Dwfl_Thread *thread, struct user_regs_struct user_regs; long l = ptrace (PTRACE_GETREGS, child, NULL, &user_regs); - assert_perror (errno); + assert (errno == 0); assert (l == 0); Dwarf_Word dwarf_regs[17]; @@ -271,11 +273,11 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) switch (child) { case -1: - assert_perror (errno); + assert (errno == 0); assert (0); case 0:; long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL); - assert_perror (errno); + assert (errno == 0); assert (l == 0); raise (SIGUSR1); return 0; @@ -285,7 +287,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) int status; pid_t pid = waitpid (child, &status, 0); - assert_perror (errno); + assert (errno == 0); assert (pid == child); assert (WIFSTOPPED (status)); assert (WSTOPSIG (status) == SIGUSR1); @@ -303,7 +305,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) struct user_regs_struct user_regs; long l = ptrace (PTRACE_GETREGS, child, NULL, &user_regs); - assert_perror (errno); + assert (errno == 0); assert (l == 0); report_module (dwfl, child, user_regs.rip); @@ -317,7 +319,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) dwfl_end (dwfl); kill (child, SIGKILL); pid = waitpid (child, &status, 0); - assert_perror (errno); + assert (errno == 0); assert (pid == child); assert (WIFSIGNALED (status)); assert (WTERMSIG (status) == SIGKILL); diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c index 87d088a..a644c8a 100644 --- a/tests/backtrace-dwarf.c +++ b/tests/backtrace-dwarf.c @@ -1,5 +1,5 @@ /* Test program for unwinding of complicated DWARF expressions. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -22,7 +22,11 @@ #include #include #include +#include +#include #include +#include +#include #include ELFUTILS_HEADER(dwfl) #ifndef __linux__ @@ -37,7 +41,6 @@ main (int argc __attribute__ ((unused)), char **argv) #else /* __linux__ */ -static void cleanup_13_abort (void); #define main cleanup_13_main #include "cleanup-13.c" #undef main @@ -115,7 +118,9 @@ static int thread_callback (Dwfl_Thread *thread, void *thread_arg) { dwfl_thread_getframes (thread, frame_callback, NULL); + /* frame_callback shall exit (0) on success. */ error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1)); + return DWARF_CB_ABORT; } int @@ -138,7 +143,7 @@ main (int argc __attribute__ ((unused)), char **argv) abort (); case 0:; long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL); - assert_perror (errno); + assert (errno == 0); assert (l == 0); cleanup_13_main (); abort (); @@ -149,7 +154,7 @@ main (int argc __attribute__ ((unused)), char **argv) errno = 0; int status; pid_t got = waitpid (pid, &status, 0); - assert_perror (errno); + assert (errno == 0); assert (got == pid); assert (WIFSTOPPED (status)); assert (WSTOPSIG (status) == SIGABRT); diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh index 1d3d6d4..790b4f4 100644 --- a/tests/backtrace-subr.sh +++ b/tests/backtrace-subr.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -87,7 +87,7 @@ check_native_unsupported() # and we can fall back on .debug_frame for the CFI. case "`uname -m`" in arm* ) - if grep 'dwfl_thread_getframes: No DWARF information found' $err; then + if egrep 'dwfl_thread_getframes(.*)No DWARF information found' $err; then echo >&2 $testname: arm needs debuginfo installed for all libraries exit 77 fi @@ -135,7 +135,7 @@ check_native_core() if [ -f core ]; then mv core "$core" fi - if [ ! -f "$core" ]; then exit 77; fi + if [ ! -f "$core" ]; then echo "No $core file generated"; exit 77; fi if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then VALGRIND_CMD="$SAVED_VALGRIND_CMD" diff --git a/tests/backtrace.c b/tests/backtrace.c index 331ba0f..1247643 100644 --- a/tests/backtrace.c +++ b/tests/backtrace.c @@ -27,6 +27,7 @@ #include #include #include +#ifdef __linux__ #include #include #include @@ -37,6 +38,7 @@ #include #include #include ELFUTILS_HEADER(dwfl) +#endif #ifndef __linux__ @@ -260,15 +262,19 @@ prepare_thread (pid_t pid2 __attribute__ ((unused)), abort (); #else /* x86_64 */ long l; + struct user_regs_struct user_regs; errno = 0; - l = ptrace (PTRACE_POKEUSER, pid2, - (void *) (intptr_t) offsetof (struct user_regs_struct, rip), jmp); - assert_perror (errno); + l = ptrace (PTRACE_GETREGS, pid2, 0, (intptr_t) &user_regs); + assert (errno == 0); + assert (l == 0); + user_regs.rip = (intptr_t) jmp; + l = ptrace (PTRACE_SETREGS, pid2, 0, (intptr_t) &user_regs); + assert (errno == 0); assert (l == 0); l = ptrace (PTRACE_CONT, pid2, NULL, (void *) (intptr_t) SIGUSR2); int status; pid_t got = waitpid (pid2, &status, __WALL); - assert_perror (errno); + assert (errno == 0); assert (got == pid2); assert (WIFSTOPPED (status)); assert (WSTOPSIG (status) == SIGUSR1); @@ -336,7 +342,7 @@ exec_dump (const char *exec) errno = 0; int status; pid_t got = waitpid (pid, &status, 0); - assert_perror (errno); + assert (errno == 0); assert (got == pid); assert (WIFSTOPPED (status)); // Main thread will signal SIGUSR2. Other thread will signal SIGUSR1. @@ -346,7 +352,7 @@ exec_dump (const char *exec) __WCLONE, probably despite pthread_create already had to be called the new task is not yet alive enough for waitpid. */ pid_t pid2 = waitpid (-1, &status, __WALL); - assert_perror (errno); + assert (errno == 0); assert (pid2 > 0); assert (pid2 != pid); assert (WIFSTOPPED (status)); @@ -375,9 +381,9 @@ exec_dump (const char *exec) #ifndef __x86_64__ is_x86_64_native = false; #else /* __x86_64__ */ - is_x86_64_native = ehdr->e_ident[EI_CLASS] == ELFCLASS64; + is_x86_64_native = ehdr->e_machine == EM_X86_64; #endif /* __x86_64__ */ - void (*jmp) (void); + void (*jmp) (void) = 0; if (is_x86_64_native) { // Find inferior symbol named "jmp". diff --git a/tests/backtrace.sparc.core.bz2 b/tests/backtrace.sparc.core.bz2 new file mode 100644 index 0000000..ad37f75 Binary files /dev/null and b/tests/backtrace.sparc.core.bz2 differ diff --git a/tests/backtrace.sparc.exec.bz2 b/tests/backtrace.sparc.exec.bz2 new file mode 100755 index 0000000..b049ec5 Binary files /dev/null and b/tests/backtrace.sparc.exec.bz2 differ diff --git a/tests/backtrace.x32.core.bz2 b/tests/backtrace.x32.core.bz2 new file mode 100644 index 0000000..c06d70a Binary files /dev/null and b/tests/backtrace.x32.core.bz2 differ diff --git a/tests/backtrace.x32.exec.bz2 b/tests/backtrace.x32.exec.bz2 new file mode 100644 index 0000000..e89401b Binary files /dev/null and b/tests/backtrace.x32.exec.bz2 differ diff --git a/tests/debug-ranges-no-lowpc.o.bz2 b/tests/debug-ranges-no-lowpc.o.bz2 new file mode 100644 index 0000000..871a3fb Binary files /dev/null and b/tests/debug-ranges-no-lowpc.o.bz2 differ diff --git a/tests/deleted-lib.c b/tests/deleted-lib.c new file mode 100644 index 0000000..1ff411b --- /dev/null +++ b/tests/deleted-lib.c @@ -0,0 +1,27 @@ +/* Test program for opening already deleted running binaries. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include + +void +libfunc (void) +{ + sleep (60000); + /* Avoid tail call optimization for the sleep call. */ + asm volatile (""); +} diff --git a/tests/deleted.c b/tests/deleted.c new file mode 100644 index 0000000..6be35bc --- /dev/null +++ b/tests/deleted.c @@ -0,0 +1,58 @@ +/* Test program for opening already deleted running binaries. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef __linux__ +#include +#endif + +extern void libfunc (void); + +int +main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) +{ + /* Set locale. */ + (void) setlocale (LC_ALL, ""); + + pid_t pid = fork (); + assert (pid != -1); + if (pid == 0) + { + int err = close (0); + assert (!err); + err = close (1); + assert (!err); + err = close (2); + assert (!err); + /* Make sure eu-stack -p works on this process even with + "restricted ptrace". */ +#ifdef PR_SET_PTRACER_ANY + prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0); +#endif + libfunc (); + abort (); + } + printf ("%d\n", pid); + return EXIT_SUCCESS; +} diff --git a/tests/dwarf-getmacros.c b/tests/dwarf-getmacros.c index 7972edc..92e093c 100644 --- a/tests/dwarf-getmacros.c +++ b/tests/dwarf-getmacros.c @@ -1,5 +1,5 @@ -/* Test program for dwfl_module_return_value_location. - Copyright (C) 2009 Red Hat, Inc. +/* Test program for dwarf_getmacros and related + Copyright (C) 2009, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -24,33 +24,121 @@ #include #include #include +#include +#include + +static void include (Dwarf *dbg, Dwarf_Off macoff, ptrdiff_t token); + +static int +mac (Dwarf_Macro *macro, void *dbg) +{ + static int level = 0; + + unsigned int opcode; + dwarf_macro_opcode (macro, &opcode); + switch (opcode) + { + case DW_MACRO_GNU_transparent_include: + { + Dwarf_Attribute at; + int r = dwarf_macro_param (macro, 0, &at); + assert (r == 0); + + Dwarf_Word w; + r = dwarf_formudata (&at, &w); + assert (r == 0); + + printf ("%*sinclude %#" PRIx64 "\n", level, "", w); + ++level; + include (dbg, w, DWARF_GETMACROS_START); + --level; + printf ("%*s/include\n", level, ""); + break; + } + + case DW_MACRO_GNU_start_file: + { + Dwarf_Files *files; + size_t nfiles; + if (dwarf_macro_getsrcfiles (dbg, macro, &files, &nfiles) < 0) + printf ("dwarf_macro_getsrcfiles: %s\n", + dwarf_errmsg (dwarf_errno ())); + + Dwarf_Word w = 0; + dwarf_macro_param2 (macro, &w, NULL); + + const char *name = dwarf_filesrc (files, (size_t) w, NULL, NULL); + printf ("%*sfile %s\n", level, "", name); + ++level; + break; + } + + case DW_MACRO_GNU_end_file: + { + --level; + printf ("%*s/file\n", level, ""); + break; + } + + case DW_MACINFO_define: + case DW_MACRO_GNU_define_indirect: + { + const char *value; + dwarf_macro_param2 (macro, NULL, &value); + printf ("%*s%s\n", level, "", value); + break; + } + + case DW_MACINFO_undef: + case DW_MACRO_GNU_undef_indirect: + break; + + default: + { + size_t paramcnt; + dwarf_macro_getparamcnt (macro, ¶mcnt); + printf ("%*sopcode %u with %zd arguments\n", + level, "", opcode, paramcnt); + break; + } + } + + return DWARF_CB_ABORT; +} + +static void +include (Dwarf *dbg, Dwarf_Off macoff, ptrdiff_t token) +{ + while ((token = dwarf_getmacros_off (dbg, macoff, mac, dbg, token)) != 0) + if (token == -1) + { + puts (dwarf_errmsg (dwarf_errno ())); + break; + } +} int -main (int argc __attribute__ ((unused)), char *argv[]) +main (int argc, char *argv[]) { + assert (argc >= 3); const char *name = argv[1]; ptrdiff_t cuoff = strtol (argv[2], NULL, 0); + bool new_style = argc > 3; int fd = open (name, O_RDONLY); Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); Dwarf_Die cudie_mem, *cudie = dwarf_offdie (dbg, cuoff, &cudie_mem); - int mac (Dwarf_Macro *macro, void *data __attribute__ ((unused))) - { - unsigned int opcode; - dwarf_macro_opcode (macro, &opcode); - if (opcode == DW_MACINFO_define) + + for (ptrdiff_t off = new_style ? DWARF_GETMACROS_START : 0; + (off = dwarf_getmacros (cudie, mac, dbg, off)); ) + if (off == -1) { - const char *value; - dwarf_macro_param2 (macro, NULL, &value); - puts (value); + puts (dwarf_errmsg (dwarf_errno ())); + break; } - return DWARF_CB_ABORT; - } - ptrdiff_t off = 0; - while ((off = dwarf_getmacros (cudie, mac, NULL, off)) > 0) - ; + dwarf_end (dbg); return 0; } diff --git a/tests/dwarf-getstring.c b/tests/dwarf-getstring.c index b70c2a7..ffa3e37 100644 --- a/tests/dwarf-getstring.c +++ b/tests/dwarf-getstring.c @@ -37,7 +37,7 @@ main (int argc, char *argv[]) Dwarf_Off offset = 0; size_t len; - int fd = open64 (argv[cnt], O_RDONLY); + int fd = open (argv[cnt], O_RDONLY); if (fd == -1) { printf ("cannot open '%s': %m\n", argv[cnt]); @@ -70,6 +70,7 @@ main (int argc, char *argv[]) offset += len + 1; } + dwarf_end (dbg); close (fd); } diff --git a/tests/dwarf-ranges.c b/tests/dwarf-ranges.c new file mode 100644 index 0000000..4bcf96c --- /dev/null +++ b/tests/dwarf-ranges.c @@ -0,0 +1,57 @@ +/* Test program for dwarf_ranges + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + assert (argc >= 3); + const char *name = argv[1]; + ptrdiff_t cuoff = strtol (argv[2], NULL, 0); + + int fd = open (name, O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + + Dwarf_Die cudie_mem, *cudie = dwarf_offdie (dbg, cuoff, &cudie_mem); + + Dwarf_Addr base, start, end; + for (ptrdiff_t off = 0; + (off = dwarf_ranges (cudie, off, &base, &start, &end)); ) + if (off == -1) + { + puts (dwarf_errmsg (dwarf_errno ())); + break; + } + else + fprintf (stderr, "%"PRIx64"..%"PRIx64" (base %"PRIx64")\n", + start, end, base); + + dwarf_end (dbg); + + return 0; +} diff --git a/tests/dwelfgnucompressed.c b/tests/dwelfgnucompressed.c new file mode 100644 index 0000000..0132271 --- /dev/null +++ b/tests/dwelfgnucompressed.c @@ -0,0 +1,104 @@ +/* Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include ELFUTILS_HEADER(dwelf) +#include + +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + int result = 0; + int cnt; + + elf_version (EV_CURRENT); + + for (cnt = 1; cnt < argc; ++cnt) + { + int fd = open (argv[cnt], O_RDONLY); + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("%s not usable %s\n", argv[cnt], elf_errmsg (-1)); + result = 1; + close (fd); + continue; + } + + size_t shdrstrndx; + if (elf_getshdrstrndx (elf, &shdrstrndx) == -1) + { + printf ("elf_getshdrstrnd failed %s\n", elf_errmsg (-1)); + result = 1; + close (fd); + continue; + } + + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + int idx = elf_ndxscn (scn); + GElf_Shdr shdr; + if (gelf_getshdr (scn, &shdr) == NULL) + { + printf ("gelf_getshdr failed: %s\n", elf_errmsg (-1)); + result = 1; + break; + } + + const char *sname = elf_strptr (elf, shdrstrndx, shdr.sh_name); + if (sname == NULL) + { + printf ("couldn't get section name: %s\n", elf_errmsg (-1)); + result = 1; + break; + } + + if (strncmp(".zdebug", sname, strlen (".zdebug")) == 0) + { + ssize_t size; + if ((size = dwelf_scn_gnu_compressed_size (scn)) == -1) + { + printf ("dwelf_scn_gnu_compressed_size failed: %s\n", + elf_errmsg (-1)); + result = 1; + break; + } + printf ("section %d: GNU Compressed size: %zx\n", idx, size); + } + } + + elf_end (elf); + close (fd); + } + + return result; +} diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c index 170a61a..bcbfb29 100644 --- a/tests/dwfl-bug-fd-leak.c +++ b/tests/dwfl-bug-fd-leak.c @@ -65,7 +65,11 @@ elfutils_open (pid_t pid, Dwarf_Addr address) } else { - Elf *elf = dwfl_module_getelf (dwfl_addrmodule (dwfl, address), &bias); + Dwfl_Module *module = dwfl_addrmodule (dwfl, address); + if (module == NULL) + error (2, 0, "dwfl_addrmodule: no module available for 0x%" PRIx64 "", + address); + Elf *elf = dwfl_module_getelf (module, &bias); if (elf == NULL) error (2, 0, "dwfl_module_getelf: %s", dwfl_errmsg (-1)); } diff --git a/tests/dwfl-proc-attach.c b/tests/dwfl-proc-attach.c new file mode 100644 index 0000000..0ba0be2 --- /dev/null +++ b/tests/dwfl-proc-attach.c @@ -0,0 +1,101 @@ +/* Test dwfl_linux_proc_attach works without any modules. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ELFUTILS_HEADER(dwfl) +#include + +#ifndef __linux__ +int +main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) +{ + printf ("dwfl_linux_proc_attach unsupported.\n"); + return 77; +} +#else /* __linux__ */ + +static pthread_t thread1; +static pthread_t thread2; + +static void * +sleeper (void* d __attribute__ ((unused))) +{ + sleep (60); + return NULL; +} + +static char *debuginfo_path = NULL; + +static const Dwfl_Callbacks proc_callbacks = + { + .find_elf = dwfl_linux_proc_find_elf, + .find_debuginfo = dwfl_standard_find_debuginfo, + .debuginfo_path = &debuginfo_path, + }; + +static int +thread_callback (Dwfl_Thread *thread, void *thread_arg) +{ + int *threads = (int *) thread_arg; + pid_t tid = dwfl_thread_tid (thread); + printf ("thread tid: %d\n", tid); + (*threads)++; + + return DWARF_CB_OK; +} + +int +main (int argc __attribute__ ((unused)), + char **argv __attribute__ ((unused))) +{ + /* Create two extra threads to iterate through. */ + int err; + if ((err = pthread_create (&thread1, NULL, sleeper, NULL)) != 0) + error (-1, err, "Couldn't create thread1"); + if ((err = pthread_create (&thread2, NULL, sleeper, NULL)) != 0) + error (-1, err, "Couldn't create thread2"); + + Dwfl *dwfl = dwfl_begin (&proc_callbacks); + if (dwfl == NULL) + error (-1, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); + + pid_t pid = getpid (); + /* This used to fail, since we don't have any modules yet. */ + if (dwfl_linux_proc_attach (dwfl, pid, false) < 0) + error (-1, 0, "dwfl_linux_proc_attach pid %d: %s", pid, + dwfl_errmsg (-1)); + + /* Did we see all 3 threads? */ + int threads = 0; + if (dwfl_getthreads (dwfl, thread_callback, &threads) != DWARF_CB_OK) + error (-1, 0, "dwfl_getthreads failed: %s", dwfl_errmsg (-1)); + + return (threads == 3) ? 0 : -1; +} + +#endif /* __linux__ */ diff --git a/tests/ecp.c b/tests/ecp.c index 39a4851..38a6859 100644 --- a/tests/ecp.c +++ b/tests/ecp.c @@ -15,6 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/tests/elfgetchdr.c b/tests/elfgetchdr.c new file mode 100644 index 0000000..44ba178 --- /dev/null +++ b/tests/elfgetchdr.c @@ -0,0 +1,124 @@ +/* Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include ELFUTILS_HEADER(dwelf) +#include + +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + int result = 0; + int cnt; + + elf_version (EV_CURRENT); + + for (cnt = 1; cnt < argc; ++cnt) + { + int fd = open (argv[cnt], O_RDONLY); + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("%s not usable %s\n", argv[cnt], elf_errmsg (-1)); + result = 1; + close (fd); + continue; + } + + size_t shdrstrndx; + if (elf_getshdrstrndx (elf, &shdrstrndx) == -1) + { + printf ("elf_getshdrstrnd failed %s\n", elf_errmsg (-1)); + result = 1; + close (fd); + continue; + } + + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + int idx = elf_ndxscn (scn); + GElf_Shdr shdr; + if (gelf_getshdr (scn, &shdr) == NULL) + { + printf ("gelf_getshdr failed: %s\n", elf_errmsg (-1)); + result = 1; + break; + } + + if ((shdr.sh_flags & SHF_COMPRESSED) != 0) + { + GElf_Chdr chdr; + if (gelf_getchdr (scn, &chdr) == NULL) + { + printf ("gelf_getchdr failed: %s\n", elf_errmsg (-1)); + result = 1; + break; + } + + printf ("section %d: ELF Compressed ch_type: %" PRId32 + ", ch_size: %" PRIx64 ", ch_addralign: %" PRIx64 "\n", + idx, chdr.ch_type, chdr.ch_size, chdr.ch_addralign); + } + else + { + const char *sname = elf_strptr (elf, shdrstrndx, shdr.sh_name); + if (sname == NULL) + { + printf ("couldn't get section name: %s\n", elf_errmsg (-1)); + result = 1; + break; + } + + /* This duplicates what the dwelfgnucompressed testcase does. */ + if (strncmp(".zdebug", sname, strlen (".zdebug")) == 0) + { + ssize_t size; + if ((size = dwelf_scn_gnu_compressed_size (scn)) == -1) + { + printf ("dwelf_scn_gnu_compressed_size failed: %s\n", + elf_errmsg (-1)); + result = 1; + break; + } + printf ("section %d: GNU Compressed size: %zx\n", idx, size); + } + else + printf ("section %d: NOT Compressed\n", idx); + } + } + + elf_end (elf); + close (fd); + } + + return result; +} diff --git a/tests/elfgetzdata.c b/tests/elfgetzdata.c new file mode 100644 index 0000000..82afbe5 --- /dev/null +++ b/tests/elfgetzdata.c @@ -0,0 +1,113 @@ +/* Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + int result = 0; + int cnt; + + if (argc < 3 + || (strcmp (argv[1], "read") != 0 + && strcmp (argv[1], "mmap") != 0)) + { + printf ("Usage: (read|mmap) files...\n"); + return -1; + } + + bool mmap = strcmp (argv[1], "mmap") == 0; + + elf_version (EV_CURRENT); + + for (cnt = 2; cnt < argc; ++cnt) + { + int fd = open (argv[cnt], O_RDONLY); + + Elf *elf = elf_begin (fd, mmap ? ELF_C_READ_MMAP : ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("%s not usable %s\n", argv[cnt], elf_errmsg (-1)); + result = 1; + close (fd); + continue; + } + + /* To get the section names. */ + size_t strndx; + elf_getshdrstrndx (elf, &strndx); + + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + size_t idx = elf_ndxscn (scn); + GElf_Shdr mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &mem); + const char *name = elf_strptr (elf, strndx, shdr->sh_name); + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + /* Real compressed section. */ + if (elf_compress (scn, 0, 0) < 0) + { + printf ("elf_compress failed for section %zd: %s\n", + idx, elf_errmsg (-1)); + return -1; + } + Elf_Data *d = elf_getdata (scn, NULL); + printf ("%zd: %s, ELF compressed, size: %zx\n", + idx, name, d->d_size); + } + else + { + /* Maybe an old GNU compressed .z section? */ + if (name[0] == '.' && name[1] == 'z') + { + if (elf_compress_gnu (scn, 0, 0) < 0) + { + printf ("elf_compress_gnu failed for section %zd: %s\n", + idx, elf_errmsg (-1)); + return -1; + } + Elf_Data *d = elf_getdata (scn, NULL); + printf ("%zd: %s, GNU compressed, size: %zx\n", + idx, name, d->d_size); + } + else + printf ("%zd: %s, NOT compressed\n", idx, name); + } + } + + elf_end (elf); + close (fd); + } + + return result; +} diff --git a/tests/elfputzdata.c b/tests/elfputzdata.c new file mode 100644 index 0000000..66ab77b --- /dev/null +++ b/tests/elfputzdata.c @@ -0,0 +1,237 @@ +/* Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + int result = 0; + int cnt; + + if (argc < 3 + || (strcmp (argv[1], "elf") != 0 + && strcmp (argv[1], "gnu") != 0)) + { + printf ("Usage: (elf|gnu) files...\n"); + return -1; + } + + int gnu; + if (strcmp (argv[1], "gnu") == 0) + gnu = 1; + else + gnu = 0; + + elf_version (EV_CURRENT); + + for (cnt = 2; cnt < argc; ++cnt) + { + int fd = open (argv[cnt], O_RDONLY); + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("%s not usable %s\n", argv[cnt], elf_errmsg (-1)); + result = 1; + close (fd); + continue; + } + + /* To get the section names. */ + size_t strndx; + elf_getshdrstrndx (elf, &strndx); + + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + size_t idx = elf_ndxscn (scn); + GElf_Shdr mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &mem); + const char *name = elf_strptr (elf, strndx, shdr->sh_name); + if (shdr->sh_type == SHT_NOBITS + || (shdr->sh_flags & SHF_ALLOC) != 0) + { + printf ("Cannot compress %zd %s\n", idx, name); + } + else if ((shdr->sh_flags & SHF_COMPRESSED) != 0 + || strncmp (name, ".zdebug", strlen (".zdebug")) == 0) + { + printf ("Already compressed %zd %s\n", idx, name); + } + else + { + size_t orig_size = shdr->sh_size; + printf ("Lets compress %zd %s, size: %" PRId64 "\n", + idx, name, shdr->sh_size); + Elf_Data *d = elf_getdata (scn, NULL); + if (d == NULL) + { + printf ("Couldn't get orig data for section %zd\n", idx); + return -1; + } + /* Make a copy so we can compare after + compression/decompression. */ + if (d->d_size != orig_size) + { + printf ("Unexpected data size for orig section %zd\n", idx); + return -1; + } + char *orig_buf = malloc (d->d_size); + if (orig_size > 0 && orig_buf == NULL) + { + printf ("No memory to copy section %zd data\n", idx); + return -1; + } + if (orig_size > 0) + memcpy (orig_buf, d->d_buf, orig_size); + + bool forced = false; + if (gnu) + { + int res = elf_compress_gnu (scn, 1, 0); + if (res == 0) + { + forced = true; + res = elf_compress_gnu (scn, 1, ELF_CHF_FORCE); + } + if (res < 0) + { + printf ("elf_compress_gnu%sfailed for section %zd: %s\n", + forced ? " (forced) " : " ", + idx, elf_errmsg (-1)); + return -1; + } + } + else + { + int res = elf_compress (scn, ELFCOMPRESS_ZLIB, 0); + if (res == 0) + { + forced = true; + res = elf_compress (scn, ELFCOMPRESS_ZLIB, ELF_CHF_FORCE); + } + if (res < 0) + { + printf ("elf_compress%sfailed for section %zd: %s\n", + forced ? " (forced) " : " ", + idx, elf_errmsg (-1)); + return -1; + } + } + GElf_Shdr newmem; + GElf_Shdr *newshdr = gelf_getshdr (scn, &newmem); + size_t new_size = newshdr->sh_size; + d = elf_getdata (scn, NULL); + // Don't check this, might depend on zlib implementation. + // fprintf (stderr, " new_size: %zd\n", new_size); + if (d->d_size != new_size) + { + printf ("Unexpected data size for compressed section %zd\n", + idx); + return -1; + } + + if (forced && new_size < orig_size) + { + printf ("section %zd forced to compress, but size smaller\n", + idx); + return -1; + } + + if (! forced && new_size >= orig_size) + { + printf ("section %zd compressed to bigger size\n", + idx); + return -1; + } + + if (new_size == orig_size + && memcmp (orig_buf, d->d_buf, orig_size) == 0) + { + printf ("section %zd didn't compress\n", idx); + return -1; + } + + if (gnu) + { + if (elf_compress_gnu (scn, 0, 0) < 0) + { + printf ("elf_[un]compress_gnu failed for section %zd: %s\n", + idx, elf_errmsg (-1)); + return -1; + } + } + else + { + if (elf_compress (scn, 0, 0) < 0) + { + printf ("elf_[un]compress failed for section %zd: %s\n", + idx, elf_errmsg (-1)); + return -1; + } + } + GElf_Shdr newermem; + GElf_Shdr *newershdr = gelf_getshdr (scn, &newermem); + size_t newer_size = newershdr->sh_size; + d = elf_getdata (scn, NULL); + // fprintf (stderr, " newer_size: %zd\n", newer_size); + if (d->d_size != newer_size) + { + printf ("Unexpected data size for compressed section %zd\n", + idx); + return -1; + } + if (newer_size != orig_size + && memcmp (orig_buf, d->d_buf, orig_size) != 0) + { + printf ("section %zd didn't correctly uncompress\n", idx); + return -1; + } + free (orig_buf); + // Recompress the string table, just to make sure + // everything keeps working. See elf_strptr above. + if (! gnu && idx == strndx + && elf_compress (scn, ELFCOMPRESS_ZLIB, 0) < 0) + { + printf ("couldn't recompress section header strings: %s\n", + elf_errmsg (-1)); + return -1; + } + } + } + + elf_end (elf); + close (fd); + } + + return result; +} diff --git a/tests/elfshphehdr.c b/tests/elfshphehdr.c new file mode 100644 index 0000000..0d92934 --- /dev/null +++ b/tests/elfshphehdr.c @@ -0,0 +1,182 @@ +/* Test program for adding section and program headers and ehdr updates. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include ELFUTILS_HEADER(elf) +#include + +#include +#include + +#include +#include +#include +#include + +#include + +void +check (const char *msg, bool statement) +{ + if (! statement) + { + fprintf (stderr, "%s FAILED\n", msg); + exit (-1); + } + else + fprintf (stderr, "%s OK\n", msg); +} + +void +check_elf (const char *msg, bool statement) +{ + if (! statement) + { + fprintf (stderr, "%s: %s\n", msg, elf_errmsg (-1)); + exit (-1); + } + else + fprintf (stderr, "%s OK\n", msg); +} + +void +test (Elf *elf, int class, bool layout) +{ + fprintf (stderr, "testing ELF class: %d, layout: %d\n", class, layout); + + check_elf ("gelf_newehdr", gelf_newehdr (elf, class) != 0); + check_elf ("gelf_getclass", gelf_getclass (elf) == class); + + check_elf ("elf_flagelf", elf_flagelf (elf, layout ? ELF_C_SET : ELF_C_CLR, + ELF_F_LAYOUT) != 0); + + GElf_Ehdr ehdr; + check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); + check ("e_shnum == 0", ehdr.e_shnum == 0); + check ("e_phnum == 0", ehdr.e_phnum == 0); + check ("e_shoff == 0", ehdr.e_shoff == 0); + check ("e_phoff == 0", ehdr.e_phoff == 0); + + size_t shnum; + check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); + check ("shnum == 0", shnum == 0); + + size_t phnum; + check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); + check ("phnum == 0", phnum == 0); + + /* Lets fill in some info we are always responsible for. */ + ehdr.e_ident[EI_DATA] = ELFDATANONE; /* Ask for native encoding. */ + ehdr.e_type = ET_EXEC; + ehdr.e_machine = EM_386; + ehdr.e_version = EV_NONE; /* Ask for current version. */ + check_elf ("gelf_update_ehdr", gelf_update_ehdr (elf, &ehdr) != 0); + + check_elf ("elf_update", elf_update (elf, ELF_C_NULL) > 0); + + check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); + check ("EI_DATA", ehdr.e_ident[EI_DATA] != ELFDATANONE); + check ("e_version", ehdr.e_version == EV_CURRENT); + + /* The sh/ph values shouldn't have changed. */ + check ("e_shnum == 0", ehdr.e_shnum == 0); + check ("e_phnum == 0", ehdr.e_phnum == 0); + check ("e_shoff == 0", ehdr.e_shoff == 0); + check ("e_phoff == 0", ehdr.e_phoff == 0); + + check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); + check ("shnum == 0", shnum == 0); + + check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); + check ("phnum == 0", phnum == 0); + + /* Lets add a header. */ + check_elf ("elf_newscn", elf_newscn (elf) != NULL); + check_elf ("gelf_newphdr", gelf_newphdr (elf, 1) != 0); + + /* If we are responsible for the layout ourselves we should also + tell where to put them. */ + if (layout) + { + check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); + /* phdrs go right after the ehdr. */ + ehdr.e_phoff = ehdr.e_ehsize; + /* shdrs go right after the phdrs. */ + ehdr.e_shoff = ehdr.e_phoff + ehdr.e_phnum * ehdr.e_phentsize; + check_elf ("gelf_update_ehdr", gelf_update_ehdr (elf, &ehdr) != 0); + } + + check_elf ("elf_update", elf_update (elf, ELF_C_NULL) > 0); + + check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); + check ("shnum == 1", shnum == 2); /* section zero is also created. */ + + check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) != 0); + check ("phnum == 1", phnum == 1); + + check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); + + check ("EI_DATA", ehdr.e_ident[EI_DATA] != ELFDATANONE); + check ("e_version", ehdr.e_version == EV_CURRENT); + + check ("e_shnum == 2", ehdr.e_shnum == 2); + check ("e_phnum == 1", ehdr.e_phnum == 1); + check ("e_shoff != 0", ehdr.e_shoff != 0); + check ("e_phoff != 0", ehdr.e_phoff != 0); + + size_t shentsize = (class == ELFCLASS32 + ? sizeof (Elf32_Shdr) : sizeof (Elf64_Shdr)); + check ("e_shentsize", ehdr.e_shentsize == shentsize); + size_t phentsize = (class == ELFCLASS32 + ? sizeof (Elf32_Phdr) : sizeof (Elf64_Phdr)); + check ("e_phentsize", ehdr.e_phentsize == phentsize); +} + +int +main (int argc __attribute__ ((unused)), char **argv __attribute ((unused))) +{ + elf_version (EV_CURRENT); + + int fd = fd = open("/dev/zero", O_WRONLY); + check ("open", fd >= 0); + + Elf *elf; + + elf = elf_begin (fd, ELF_C_WRITE, NULL); + check_elf ("elf_begin", elf != NULL); + test (elf, ELFCLASS32, false); + elf_end (elf); + + elf = elf_begin (fd, ELF_C_WRITE, NULL); + check_elf ("elf_begin", elf != NULL); + test (elf, ELFCLASS32, true); + elf_end (elf); + + elf = elf_begin (fd, ELF_C_WRITE, NULL); + check_elf ("elf_begin", elf != NULL); + test (elf, ELFCLASS64, false); + elf_end (elf); + + elf = elf_begin (fd, ELF_C_WRITE, NULL); + check_elf ("elf_begin", elf != NULL); + test (elf, ELFCLASS64, true); + elf_end (elf); + + close (fd); + return 0; +} diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c new file mode 100644 index 0000000..4149ca6 --- /dev/null +++ b/tests/elfstrmerge.c @@ -0,0 +1,672 @@ +/* Merge string sections. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include ELFUTILS_HEADER(ebl) + +/* The original ELF file. */ +static int fd = -1; +static Elf *elf = NULL; +static bool replace; + +/* The new ELF file. */ +static char *fnew = NULL; +static int fdnew = -1; +static Elf *elfnew = NULL; + +/* The merged string table. */ +static struct Ebl_Strtab *strings = NULL; + +/* Section name strents. */ +static struct Ebl_Strent **scnstrents = NULL; + +/* Symbol name strends. */ +static struct Ebl_Strent **symstrents = NULL; + +/* New ELF file buffers. */ +static Elf_Data newstrtabdata = { .d_buf = NULL }; +static size_t newshnums = 0; +static void **newscnbufs = NULL; + +/* Release all files and resources allocated. */ +static void +release (void) +{ + /* The new string table. */ + if (strings != NULL) + ebl_strtabfree (strings); + + free (scnstrents); + free (symstrents); + free (newstrtabdata.d_buf); + + /* Any new data buffers allocated. */ + for (size_t i = 0; i < newshnums; i++) + free (newscnbufs[i]); + free (newscnbufs); + + /* The new ELF file. */ + if (fdnew != -1) + { + unlink (fnew); + elf_end (elfnew); + close (fdnew); + } + // Don't release, we might need it in the error message. + // if (replace) + // free (fnew); + + /* The original ELF file. */ + elf_end (elf); + close (fd); +} + +/* The various ways we can fail... Cleanup and show some message to + the user. The file name may be NULL. */ +static void __attribute__ ((noreturn)) +fail (const char *msg, const char *fname) +{ + release (); + if (fname != NULL) + error (1, 0, "%s: %s", fname, msg); + else + error (1, 0, "%s", msg); + abort(); +} + +static void __attribute__ ((noreturn)) +fail_errno (const char *msg, const char *fname) +{ + release (); + if (fname != NULL) + error (1, errno, "%s: %s", fname, msg); + else + error (1, errno, "%s", msg); + abort(); +} + +static void __attribute__ ((noreturn)) +fail_idx (const char *msg, const char *fname, size_t idx) +{ + release (); + if (fname != NULL) + error (1, 0, "%s: %s %zd", fname, msg, idx); + else + error (1, 0, "%s %zd", msg, idx); + abort(); +} + +static void __attribute__ ((noreturn)) +fail_elf (const char *msg, const char *fname) +{ + release (); + if (fname != NULL) + error (1, 0, "%s: %s: %s", fname, msg, elf_errmsg (-1)); + else + error (1, 0, "%s: %s", msg, elf_errmsg (-1)); + abort(); +} + +static void __attribute__ ((noreturn)) +fail_elf_idx (const char *msg, const char *fname, size_t idx) +{ + release (); + if (fname != NULL) + error (1, 0, "%s: %s %zd: %s", fname, msg, idx, elf_errmsg (-1)); + else + error (1, 0, "%s %zd: %s", msg, idx, elf_errmsg (-1)); + abort(); +} + +int +main (int argc, char **argv) +{ + elf_version (EV_CURRENT); + + /* Basic command line handling. Need to replace the input file? */ + if ((argc != 2 && argc != 4) + || (argc == 4 && strcmp (argv[1], "-o") != 0)) + fail ("Usage argument: [-o ] ", NULL); + replace = argc == 2; + + /* Get the ELF file. */ + const char *fname; + if (replace) + fname = argv[1]; + else + fname = argv[3]; + fd = open (fname, O_RDONLY); + if (fd < 0) + fail_errno ("couldn't open", fname); + + elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + fail_elf ("couldn't open ELF file for reading", fname); + + GElf_Ehdr ehdr; + if (gelf_getehdr (elf, &ehdr) == NULL) + fail_elf ("Couldn't get ehdr", fname); + + /* Get the section header string table. */ + size_t shdrstrndx; + if (elf_getshdrstrndx (elf, &shdrstrndx) != 0) + fail_elf ("couldn't get section header string table index", fname); + + Elf_Scn *shdrstrscn = elf_getscn (elf, shdrstrndx); + GElf_Shdr shdrstrshdr_mem; + GElf_Shdr *shdrstrshdr = gelf_getshdr (shdrstrscn, &shdrstrshdr_mem); + if (shdrstrshdr == NULL) + fail_elf ("couldn't get section header string table section", fname); + + if ((shdrstrshdr->sh_flags & SHF_ALLOC) != 0) + fail ("section header string table is an allocated section", fname); + + /* Get the symtab section. */ + size_t symtabndx = 0; + Elf_Scn *symtabscn = NULL; + GElf_Shdr symtabshdr_mem; + GElf_Shdr *symtabshdr; + while ((symtabscn = elf_nextscn (elf, symtabscn)) != NULL) + { + symtabshdr = gelf_getshdr (symtabscn, &symtabshdr_mem); + if (symtabshdr == NULL) + fail_elf ("couldn't get shdr", fname); + + if (symtabshdr->sh_type == SHT_SYMTAB) + { + /* Just pick the first, we don't expect more than one. */ + symtabndx = elf_ndxscn (symtabscn); + break; + } + } + + if (symtabndx == 0) + fail ("No symtab found", fname); + + if ((symtabshdr->sh_flags & SHF_ALLOC) != 0) + fail ("symtab is an allocated section", fname); + + /* Get the strtab of the symtab. */ + size_t strtabndx = symtabshdr->sh_link; + Elf_Scn *strtabscn = elf_getscn (elf, strtabndx); + GElf_Shdr strtabshdr_mem; + GElf_Shdr *strtabshdr = gelf_getshdr (strtabscn, &strtabshdr_mem); + if (strtabshdr == NULL) + fail_elf ("Couldn't get strtab section", fname); + + if (shdrstrndx == strtabndx) + { + error (0, 0, "%s: Nothing to do, shstrtab == strtab", fname); + release (); + return 0; + } + + if ((strtabshdr->sh_flags & SHF_ALLOC) != 0) + fail ("strtab is an allocated section", fname); + + size_t phnum; + if (elf_getphdrnum (elf, &phnum) != 0) + fail_elf ("Couldn't get number of phdrs", fname); + + /* If there are phdrs we want to maintain the layout of the + allocated sections in the file. */ + bool layout = phnum != 0; + + /* Create a new merged strings table that starts with the empty string. */ + strings = ebl_strtabinit (true); + if (strings == NULL) + fail ("No memory to create merged string table", NULL); + + /* Add the strings from all the sections. */ + size_t shdrnum; + if (elf_getshdrnum (elf, &shdrnum) != 0) + fail_elf ("Couldn't get number of sections", fname); + scnstrents = malloc (shdrnum * sizeof (struct Ebl_Strent *)); + if (scnstrents == NULL) + fail ("couldn't allocate memory for section strings", NULL); + + /* While going through all sections keep track of last allocated + offset if needed to keep the layout. We'll put any unallocated + sections behind those (strtab is unallocated and will change + size). */ + GElf_Off last_offset = 0; + if (layout) + last_offset = (ehdr.e_phoff + + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT)); + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + size_t scnnum = elf_ndxscn (scn); + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + fail_elf_idx ("couldn't get shdr", fname, scnnum); + /* Don't add the .shstrtab section itself, we'll not use it. */ + if (shdr->sh_name != 0 && scnnum != shdrstrndx) + { + const char *sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (sname == NULL) + fail_elf_idx ("couldn't get section name", fname, scnnum); + if ((scnstrents[scnnum] = ebl_strtabadd (strings, sname, 0)) == NULL) + fail ("No memory to add to merged string table", NULL); + } + + if (layout) + if ((shdr->sh_flags & SHF_ALLOC) != 0) + { + GElf_Off off = shdr->sh_offset + (shdr->sh_type != SHT_NOBITS + ? shdr->sh_size : 0); + if (last_offset < off) + last_offset = off; + } + } + + /* Add the strings from all the symbols. */ + size_t elsize = gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT); + Elf_Data *symd = elf_getdata (symtabscn, NULL); + if (symd == NULL) + fail_elf ("couldn't get symtab data", fname); + size_t symsnum = symd->d_size / elsize; + symstrents = malloc (symsnum * sizeof (struct Ebl_Strent *)); + if (symstrents == NULL) + fail_errno ("Couldn't allocate memory for symbol strings", NULL); + for (size_t i = 0; i < symsnum; i++) + { + GElf_Sym sym_mem; + GElf_Sym *sym = gelf_getsym (symd, i, &sym_mem); + if (sym == NULL) + fail_elf_idx ("Couldn't get symbol", fname, i); + if (sym->st_name != 0) + { + const char *sname = elf_strptr (elf, strtabndx, sym->st_name); + if (sname == NULL) + fail_elf_idx ("Couldn't get symbol name", fname, i); + if ((symstrents[i] = ebl_strtabadd (strings, sname, 0)) == NULL) + fail_idx ("No memory to add to merged string table symbol", + fname, i); + } + } + + /* We got all strings, build the new string table and store it as + new strtab. */ + ebl_strtabfinalize (strings, &newstrtabdata); + + /* We share at least the empty string so the result is at least 1 + byte smaller. */ + if (newstrtabdata.d_size >= shdrstrshdr->sh_size + strtabshdr->sh_size) + fail ("Impossible, merged string table is larger", fname); + + /* section index mapping and sanity checking. */ + size_t newsecndx (size_t secndx, const char *what, size_t widx, + const char *member, size_t midx) + { + if (unlikely (secndx == 0 || secndx == shdrstrndx || secndx >= shdrnum)) + { + /* Don't use fail... too specialized messages. Call release + outselves and then error. Ignores midx if widx is + zero. */ + release (); + if (widx == 0) + error (1, 0, "%s: bad section index %zd in %s for %s", + fname, secndx, what, member); + else if (midx == 0) + error (1, 0, "%s: bad section index %zd in %s %zd for %s", + fname, secndx, what, widx, member); + else + error (1, 0, "%s: bad section index %zd in %s %zd for %s %zd", + fname, secndx, what, widx, member, midx); + } + + return secndx < shdrstrndx ? secndx : secndx - 1; + } + + struct stat st; + if (fstat (fd, &st) != 0) + fail_errno("Couldn't fstat", fname); + + /* Create a new (temporary) ELF file for the result. */ + if (replace) + { + size_t fname_len = strlen (fname); + fnew = malloc (fname_len + sizeof (".XXXXXX")); + if (fnew == NULL) + fail_errno ("couldn't allocate memory for new file name", NULL); + strcpy (mempcpy (fnew, fname, fname_len), ".XXXXXX"); + + fdnew = mkstemp (fnew); + } + else + { + fnew = argv[2]; + fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS); + } + + if (fdnew < 0) + fail_errno ("couldn't create output file", fnew); + + elfnew = elf_begin (fdnew, ELF_C_WRITE, NULL); + if (elfnew == NULL) + fail_elf ("couldn't open new ELF for writing", fnew); + + /* Create the new ELF header and copy over all the data. */ + if (gelf_newehdr (elfnew, gelf_getclass (elf)) == 0) + fail_elf ("Couldn't create new ehdr", fnew); + GElf_Ehdr newehdr; + if (gelf_getehdr (elfnew, &newehdr) == NULL) + fail_elf ("Couldn't get ehdr", fnew); + + newehdr.e_ident[EI_DATA] = ehdr.e_ident[EI_DATA]; + newehdr.e_type = ehdr.e_type; + newehdr.e_machine = ehdr.e_machine; + newehdr.e_version = ehdr.e_version; + newehdr.e_entry = ehdr.e_entry; + newehdr.e_flags = ehdr.e_flags; + + /* The new file uses the new strtab as shstrtab. */ + size_t newstrtabndx = newsecndx (strtabndx, "ehdr", 0, "e_shstrndx", 0); + if (newstrtabndx < SHN_LORESERVE) + newehdr.e_shstrndx = newstrtabndx; + else + { + Elf_Scn *zscn = elf_getscn (elfnew, 0); + GElf_Shdr zshdr_mem; + GElf_Shdr *zshdr = gelf_getshdr (zscn, &zshdr_mem); + if (zshdr == NULL) + fail_elf ("Couldn't get section zero", fnew); + zshdr->sh_link = strtabndx; + if (gelf_update_shdr (zscn, zshdr) == 0) + fail_elf ("Couldn't update section zero", fnew); + newehdr.e_shstrndx = SHN_XINDEX; + } + + if (gelf_update_ehdr (elfnew, &newehdr) == 0) + fail ("Couldn't update ehdr", fnew); + + /* Copy the program headers if any. */ + if (phnum != 0) + { + if (gelf_newphdr (elfnew, phnum) == 0) + fail_elf ("Couldn't create phdrs", fnew); + + for (size_t cnt = 0; cnt < phnum; ++cnt) + { + GElf_Phdr phdr_mem; + GElf_Phdr *phdr = gelf_getphdr (elf, cnt, &phdr_mem); + if (phdr == NULL) + fail_elf_idx ("Couldn't get phdr", fname, cnt); + if (gelf_update_phdr (elfnew, cnt, phdr) == 0) + fail_elf_idx ("Couldn't create phdr", fnew, cnt); + } + } + + newshnums = shdrnum - 1; + newscnbufs = calloc (sizeof (void *), newshnums); + if (newscnbufs == NULL) + fail_errno ("Couldn't allocate memory for new section buffers", NULL); + + /* Copy the sections, except the shstrtab, fill the strtab with the + combined strings and adjust section references. */ + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + size_t ndx = elf_ndxscn (scn); + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + fail_elf_idx ("Couldn't get shdr", fname, ndx); + + /* Section zero is always created. Skip the shtrtab. */ + if (ndx == 0 || ndx == shdrstrndx) + continue; + + Elf_Scn *newscn = elf_newscn (elfnew); + if (newscn == NULL) + fail_elf_idx ("couldn't create new section", fnew, ndx); + + GElf_Shdr newshdr; + newshdr.sh_name = (shdr->sh_name != 0 + ? ebl_strtaboffset (scnstrents[ndx]) : 0); + newshdr.sh_type = shdr->sh_type; + newshdr.sh_flags = shdr->sh_flags; + newshdr.sh_addr = shdr->sh_addr; + newshdr.sh_size = shdr->sh_size; + if (shdr->sh_link != 0) + newshdr.sh_link = newsecndx (shdr->sh_link, "shdr", ndx, "sh_link", 0); + else + newshdr.sh_link = 0; + if (SH_INFO_LINK_P (shdr) && shdr->sh_info != 0) + newshdr.sh_info = newsecndx (shdr->sh_info, "shdr", ndx, "sh_info", 0); + else + newshdr.sh_info = shdr->sh_info; + newshdr.sh_entsize = shdr->sh_entsize; + + /* Some sections need a new data buffer because they need to + manipulate the original data. Allocate and check here, so we + have a list of all data buffers we might need to release when + done. */ + void new_data_buf (Elf_Data *d) + { + size_t s = d->d_size; + if (s == 0) + fail_idx ("Expected data in section", fname, ndx); + void *b = malloc (d->d_size); + if (b == NULL) + fail_idx ("Couldn't allocated buffer for section", NULL, ndx); + newscnbufs[newsecndx (ndx, "section", ndx, "d_buf", 0)] = d->d_buf = b; + } + + Elf_Data *newdata = elf_newdata (newscn); + if (newdata == NULL) + fail_elf_idx ("Couldn't create new data for section", fnew, ndx); + if (ndx == strtabndx) + *newdata = newstrtabdata; + else + { + /* The symtab, dynsym, group and symtab_shndx sections + contain section indexes. Symbol tables (symtab and + dynsym) contain indexes to strings. Update both if + necessary. */ + Elf_Data *data = elf_getdata (scn, NULL); + if (data == NULL) + fail_elf_idx ("Couldn't get data from section", fname, ndx); + *newdata = *data; + switch (shdr->sh_type) + { + case SHT_SYMTAB: + case SHT_DYNSYM: + { + /* We need to update the section numbers of the + symbols and if this symbol table uses the strtab + section also the name indexes. */ + const bool update_name = shdr->sh_link == strtabndx; + if (update_name && ndx != symtabndx) + fail ("Only one symbol table using strtab expected", fname); + new_data_buf (newdata); + size_t syms = (data->d_size + / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT)); + for (size_t i = 0; i < syms; i++) + { + GElf_Sym sym; + if (gelf_getsym (data, i, &sym) == NULL) + fail_elf_idx ("Couldn't get symbol", fname, i); + + if (GELF_ST_TYPE (sym.st_info) == STT_SECTION + && sym.st_shndx == shdrstrndx) + fprintf (stderr, "WARNING:" + " symbol table [%zd] contains section symbol %zd" + " for old shdrstrndx %zd\n", ndx, i, shdrstrndx); + else if (sym.st_shndx != SHN_UNDEF + && sym.st_shndx < SHN_LORESERVE) + sym.st_shndx = newsecndx (sym.st_shndx, "section", ndx, + "symbol", i); + if (update_name && sym.st_name != 0) + sym.st_name = ebl_strtaboffset (symstrents[i]); + + /* We explicitly don't update the SHNDX table at + the same time, we do that below. */ + if (gelf_update_sym (newdata, i, &sym) == 0) + fail_elf_idx ("Couldn't update symbol", fnew, i); + } + } + break; + + case SHT_GROUP: + { + new_data_buf (newdata); + /* A section group contains Elf32_Words. The first + word is a falg value, the rest of the words are + indexes of the sections belonging to the group. */ + Elf32_Word *group = (Elf32_Word *) data->d_buf; + Elf32_Word *newgroup = (Elf32_Word *) newdata->d_buf; + size_t words = data->d_size / sizeof (Elf32_Word); + if (words == 0) + fail_idx ("Not enough data in group section", fname, ndx); + newgroup[0] = group[0]; + for (size_t i = 1; i < words; i++) + newgroup[i] = newsecndx (group[i], "section", ndx, + "group", i); + } + break; + + case SHT_SYMTAB_SHNDX: + { + new_data_buf (newdata); + /* A SHNDX just contains an array of section indexes + for the corresponding symbol table. The entry is + SHN_UNDEF unless the corresponding symbol is + SHN_XINDEX. */ + Elf32_Word *shndx = (Elf32_Word *) data->d_buf; + Elf32_Word *newshndx = (Elf32_Word *) newdata->d_buf; + size_t words = data->d_size / sizeof (Elf32_Word); + for (size_t i = 0; i < words; i++) + if (shndx[i] == SHN_UNDEF) + newshndx[i] = SHN_UNDEF; + else + newshndx[i] = newsecndx (shndx[i], "section", ndx, + "shndx", i); + } + break; + + case SHT_DYNAMIC: + /* Fallthrough. There are string indexes in here, but + they (should) point to a allocated string table, + which we don't alter. */ + default: + /* Nothing to do. Section data doesn't contain section + or strtab indexes. */ + break; + } + } + + /* When we are responsible for the layout explicitly set + sh_addralign, sh_size and sh_offset. Otherwise libelf will + calculate those from the Elf_Data. */ + if (layout) + { + /* We have just one Elf_Data. */ + newshdr.sh_size = newdata->d_size; + newshdr.sh_addralign = newdata->d_align; + + /* Keep the offset of allocated sections so they are at the + same place in the file. Add unallocated ones after the + allocated ones. */ + if ((shdr->sh_flags & SHF_ALLOC) != 0) + newshdr.sh_offset = shdr->sh_offset; + else + { + /* Zero means one. No alignment constraints. */ + size_t addralign = newshdr.sh_addralign ?: 1; + last_offset = (last_offset + addralign - 1) & ~(addralign - 1); + newshdr.sh_offset = last_offset; + if (newshdr.sh_type != SHT_NOBITS) + last_offset += newshdr.sh_size; + } + } + else + { + newshdr.sh_addralign = 0; + newshdr.sh_size = 0; + newshdr.sh_offset = 0; + } + + if (gelf_update_shdr (newscn, &newshdr) == 0) + fail_elf_idx ("Couldn't update section header", fnew, ndx); + } + + /* If we have phdrs we want elf_update to layout the SHF_ALLOC + sections precisely as in the original file. In that case we are + also responsible for setting phoff and shoff */ + if (layout) + { + /* Position the shdrs after the last (unallocated) section. */ + if (gelf_getehdr (elfnew, &newehdr) == NULL) + fail_elf ("Couldn't get ehdr", fnew); + const size_t offsize = gelf_fsize (elf, ELF_T_OFF, 1, EV_CURRENT); + newehdr.e_shoff = ((last_offset + offsize - 1) + & ~((GElf_Off) (offsize - 1))); + + /* The phdrs go in the same place as in the original file. + Normally right after the ELF header. */ + newehdr.e_phoff = ehdr.e_phoff; + + if (gelf_update_ehdr (elfnew, &newehdr) == 0) + fail_elf ("Couldn't update ehdr", fnew); + + elf_flagelf (elfnew, ELF_C_SET, ELF_F_LAYOUT); + } + + if (elf_update (elfnew, ELF_C_WRITE) == -1) + fail_elf ("Couldn't write ELF", fnew); + + elf_end (elfnew); + elfnew = NULL; + + /* Try to match mode and owner.group of the original file. */ + if (fchmod (fdnew, st.st_mode & ALLPERMS) != 0) + error (0, errno, "Couldn't fchmod %s", fnew); + if (fchown (fdnew, st.st_uid, st.st_gid) != 0) + error (0, errno, "Couldn't fchown %s", fnew); + + /* Finally replace the old file with the new merged strings file. */ + if (replace) + if (rename (fnew, fname) != 0) + fail_errno ("rename", fnew); + + /* We are finally done with the new file, don't unlink it now. */ + close (fdnew); + if (replace) + free (fnew); + fnew = NULL; + fdnew = -1; + + release (); + return 0; +} diff --git a/tests/elfstrtab.c b/tests/elfstrtab.c new file mode 100644 index 0000000..c27d6cf --- /dev/null +++ b/tests/elfstrtab.c @@ -0,0 +1,396 @@ +/* Test program for elf_strptr function. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include + + +/* Index of last string added. Returned by add_string (). */ +static size_t stridx = 0; + +/* Some random strings. */ +static char *str1; +static size_t str1_off; +static char *str2; +static size_t str2_off; +static char *str3; +static size_t str3_off; + +/* First three strings we write out. They should always be there. */ +static char *orig_str1; +static size_t orig_str1_off; +static char *orig_str2; +static size_t orig_str2_off; +static char *orig_str3; +static size_t orig_str3_off; + +static void +check_orig_strings (Elf *elf, int ndx, const char *msg) +{ + printf ("checking orig strings: %s\n", msg); + + const char *str = elf_strptr (elf, ndx, 0); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp ("", str) != 0) + exit (1); + + str = elf_strptr (elf, ndx, 1); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (".strings", str) != 0) + exit (1); + + str = elf_strptr (elf, ndx, orig_str1_off); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (orig_str1, str) != 0) + exit (1); + + str = elf_strptr (elf, ndx, orig_str2_off); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (orig_str2, str) != 0) + exit (1); + + str = elf_strptr (elf, ndx, orig_str3_off); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (orig_str3, str) != 0) + exit (1); +} + +static void +check_strings (Elf *elf, int ndx, const char *msg) +{ + check_orig_strings (elf, ndx, msg); + + const char *str = elf_strptr (elf, ndx, str1_off); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (str1, str) != 0) + exit (1); + + str = elf_strptr (elf, ndx, str2_off); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (str2, str) != 0) + exit (1); + + str = elf_strptr (elf, ndx, str3_off); + printf ("\t'%s'\n", str); + if (str == NULL || strcmp (str3, str) != 0) + exit (1); +} + +/* Adds a string and returns the offset in the section. */ +static size_t +add_string (Elf_Scn *scn, char *str) +{ + size_t lastidx = stridx; + size_t size = strlen (str) + 1; + + Elf_Data *data = elf_newdata (scn); + if (data == NULL) + { + printf ("cannot create data SHSTRTAB section: %s\n", elf_errmsg (-1)); + exit (1); + } + + data->d_buf = str; + data->d_type = ELF_T_BYTE; + data->d_size = size; + data->d_align = 1; + data->d_version = EV_CURRENT; + + stridx += size; + printf ("add_string: '%s', stridx: %zd, lastidx: %zd\n", + str, stridx, lastidx); + return lastidx; +} + +static void +check_elf (const char *fname, int class, int use_mmap) +{ + printf ("\nfname: %s\n", fname); + stridx = 0; + + int fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666); + if (fd == -1) + { + printf ("cannot open `%s': %s\n", fname, strerror (errno)); + exit (1); + } + + Elf *elf = elf_begin (fd, use_mmap ? ELF_C_WRITE_MMAP : ELF_C_WRITE, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Create an ELF header. + if (gelf_newehdr (elf, class) == 0) + { + printf ("cannot create ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + GElf_Ehdr ehdr_mem; + GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); + if (ehdr == NULL) + { + printf ("cannot get ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Initialize header. + ehdr->e_ident[EI_DATA] = class == ELFCLASS64 ? ELFDATA2LSB : ELFDATA2MSB; + ehdr->e_ident[EI_OSABI] = ELFOSABI_GNU; + ehdr->e_type = ET_NONE; + ehdr->e_machine = EM_X86_64; + ehdr->e_version = EV_CURRENT; + + // Create strings section. + Elf_Scn *scn = elf_newscn (elf); + if (scn == NULL) + { + printf ("cannot create strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Add an empty string to the table as NUL entry for section zero. + add_string (scn, ""); + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + shdr->sh_type = SHT_STRTAB; + shdr->sh_flags = 0; + shdr->sh_addr = 0; + shdr->sh_link = SHN_UNDEF; + shdr->sh_info = SHN_UNDEF; + shdr->sh_addralign = 1; + shdr->sh_entsize = 0; + shdr->sh_name = add_string (scn, ".strings"); + + // We have to store the section strtab index in the ELF header. + // So sections have actual names. + int ndx = elf_ndxscn (scn); + ehdr->e_shstrndx = ndx; + + if (gelf_update_ehdr (elf, ehdr) == 0) + { + printf ("cannot update ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Add some random strings. These are the original ones. They should + // always be there (together with the empty "" and .strings section + // name strings. + orig_str1 = "elfutils"; + orig_str1_off = add_string (scn, orig_str1); + orig_str2 = "strtabelf"; + orig_str2_off = add_string (scn, orig_str2); + orig_str3 = "three"; + orig_str3_off = add_string (scn, orig_str3); + + // Finished strings section, update the header. + if (gelf_update_shdr (scn, shdr) == 0) + { + printf ("cannot update STRTAB section header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Let the library compute the internal structure information. + if (elf_update (elf, ELF_C_NULL) < 0) + { + printf ("failure in elf_update(NULL): %s\n", elf_errmsg (-1)); + exit (1); + } + + // Check our strings are there. + check_orig_strings (elf, ndx, "first elf_update, before write"); + + // Write everything to disk. + if (elf_update (elf, ELF_C_WRITE) < 0) + { + printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1)); + exit (1); + } + + // Check out strings are there. + check_orig_strings (elf, ndx, "first elf_update, after write"); + + // Add some more random strings. These will not be written to disk. + scn = elf_getscn (elf, ndx); + if (scn == NULL) + { + printf ("couldn't re-get strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + str1 = "elfutils2"; + str1_off = add_string (scn, str1); + str2 = "strtabelf2"; + str2_off = add_string (scn, str2); + str3 = "three2"; + str3_off = add_string (scn, str3); + + // Update internal structure information again. + if (elf_update (elf, ELF_C_NULL) < 0) + { + printf ("failure in re-elf_update(NULL): %s\n", elf_errmsg (-1)); + exit (1); + } + + // Check our new strings are there. + check_strings (elf, ndx, "first extra strings"); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + /* Read the ELF from disk now. */ + fd = open (fname, O_RDWR, 0666); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + elf = elf_begin (fd, use_mmap ? ELF_C_RDWR_MMAP : ELF_C_RDWR, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-only: %s\n", elf_errmsg (-1)); + exit (1); + } + + /* Are our strings there? */ + check_orig_strings (elf, ndx, "read ELF file, orig strings"); + + // Add some more random strings. + scn = elf_getscn (elf, ndx); + if (scn == NULL) + { + printf ("couldn't re-get strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Reset stridx to end of section. + printf ("sh_size: %" PRIu64 "\n", shdr->sh_size); + stridx = shdr->sh_size; + + str1 = "0123456789"; + str1_off = add_string (scn, str1); + str2 = "supercalifragilisticexpialidocious"; + str2_off = add_string (scn, str2); + str3 = "forty-two"; + str3_off = add_string (scn, str3); + + // Update internal structure information. + if (elf_update (elf, ELF_C_NULL) < 0) + { + printf ("failure in rw-elf_update(NULL): %s\n", elf_errmsg (-1)); + exit (1); + } + + /* Check our new strings are there. */ + check_strings (elf, ndx, "read file, added strings"); + + // Write updated ELF file. + if (elf_update (elf, ELF_C_WRITE) < 0) + { + printf ("failure in re-elf_update(NULL): %s\n", elf_errmsg (-1)); + exit (1); + } + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + // And read it in one last time. + fd = open (fname, O_RDONLY, 0666); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + elf = elf_begin (fd, use_mmap ? ELF_C_READ_MMAP : ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-only: %s\n", elf_errmsg (-1)); + exit (1); + } + + /* Are all our strings there? */ + check_strings (elf, ndx, "all together now"); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + unlink (fname); +} + +int +main (int argc __attribute__ ((unused)), char *argv[] __attribute__ ((unused))) +{ + elf_version (EV_CURRENT); + + // Fill holes with something non-zero to more easily spot + // unterminated strings. + elf_fill ('X'); + + check_elf ("strtab.elf.32", ELFCLASS32, 0); + check_elf ("strtab.elf.32.mmap", ELFCLASS32, 1); + check_elf ("strtab.elf.64", ELFCLASS64, 0); + check_elf ("strtab.elf.64.mmap", ELFCLASS64, 1); + + return 0; +} + diff --git a/tests/funcscopes.c b/tests/funcscopes.c index 720ff3b..9c90185 100644 --- a/tests/funcscopes.c +++ b/tests/funcscopes.c @@ -1,5 +1,5 @@ /* Test program for dwarf_getscopes. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -153,15 +153,16 @@ handle_function (Dwarf_Die *funcdie, void *arg) lowpc += a->dwbias; highpc += a->dwbias; Dwfl_Line *loline = dwfl_getsrc (a->dwfl, lowpc); - Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc); + Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc - 1); paddr (": ", lowpc, loline); if (highpc != lowpc) - paddr (" .. ", lowpc, hiline == loline ? NULL : hiline); + paddr (" .. ", highpc - 1, hiline == loline ? NULL : hiline); } puts (""); print_vars (indent + INDENT, die); } + free (scopes); } return 0; diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c new file mode 100644 index 0000000..055aede --- /dev/null +++ b/tests/getsrc_die.c @@ -0,0 +1,72 @@ +/* Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + /* file addr+ */ + int fd = open (argv[1], O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + error (-1, 0, "dwarf_begin (%s): %s\n", argv[1], dwarf_errmsg (-1)); + + for (int i = 2; i < argc; i++) + { + Dwarf_Addr addr; + char *endptr; + Dwarf_Die cudie; + Dwarf_Line *line; + + errno = 0; + addr = strtoull (argv[i], &endptr, 16); + if (errno != 0) + error (-1, errno, "Cannot parrse '%s'", argv[1]); + + if (dwarf_addrdie (dbg, addr, &cudie) == NULL) + error (-1, 0, "dwarf_addrdie (%s): %s", argv[i], dwarf_errmsg (-1)); + + line = dwarf_getsrc_die (&cudie, addr); + if (line == NULL) + error (-1, 0, "dwarf_getsrc_die (%s): %s", argv[i], dwarf_errmsg (-1)); + + const char *f = dwarf_linesrc (line, NULL, NULL); + int l; + if (dwarf_lineno (line, &l) != 0) + l = 0; + + printf ("%s:%d\n", f ?: "???", l); + } + + dwarf_end (dbg); + close (fd); + + return 0; +} diff --git a/tests/lfs-symbols b/tests/lfs-symbols new file mode 100644 index 0000000..282a4ad --- /dev/null +++ b/tests/lfs-symbols @@ -0,0 +1,73 @@ +# Imported from lintian/data/binaries/lfs-symbols +# +# Exceptions: +# fts* - linux-kernel-modules.c is careful with FTS_NOSTAT + +# Manually maintained list of non-lfs symbols +# +# List was found by grepping around in /usr/include on an i386 system +# with build-essential installed +# +# Please keep this sorted by key. + +__fxstat +__fxstatat +__lxstat +__xstat +aio_cancel +aio_error +aio_fsync +aio_read +aio_return +aio_suspend +aio_write +alphasort +creat +fallocate +fgetpos +fopen +freopen +fseeko +fsetpos +fstatfs +fstatvfs +ftello +ftruncate +#fts_open +#fts_read +#fts_children +#fts_set +#fts_close +ftw +getdirentries +getrlimit +glob +globfree +lio_listio +lockf +lseek +mkostemp +mkostemps +mkstemp +mkstemps +mmap +nftw +open +openat +posix_fadvise +posix_fallocate +pread +preadv +prlimit +pwrite +pwritev +readdir +readdir_r +scandir +sendfile +setrlimit +statfs +statvfs +tmpfile +truncate +versionsort diff --git a/tests/linkmap-cut-lib.so.bz2 b/tests/linkmap-cut-lib.so.bz2 new file mode 100644 index 0000000..a1bda5c Binary files /dev/null and b/tests/linkmap-cut-lib.so.bz2 differ diff --git a/tests/linkmap-cut.bz2 b/tests/linkmap-cut.bz2 new file mode 100644 index 0000000..f2ccd7c Binary files /dev/null and b/tests/linkmap-cut.bz2 differ diff --git a/tests/linkmap-cut.core.bz2 b/tests/linkmap-cut.core.bz2 new file mode 100644 index 0000000..b55b2f2 Binary files /dev/null and b/tests/linkmap-cut.core.bz2 differ diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c index 49de078..d50355e 100644 --- a/tests/md5-sha1-test.c +++ b/tests/md5-sha1-test.c @@ -61,14 +61,6 @@ static const struct expected #define md5_size 16 #define sha1_size 20 -static const char md5_expected[] = - { - }; - -static const char sha1_expected[] = - { - }; - #define TEST_HASH(ALGO, I) \ { \ struct ALGO##_ctx ctx; \ diff --git a/tests/msg_tst.c b/tests/msg_tst.c index 10ff0f7..7baea0a 100644 --- a/tests/msg_tst.c +++ b/tests/msg_tst.c @@ -74,7 +74,14 @@ static struct "program header only allowed in executables, shared objects, \ and core files" }, { ELF_E_NO_PHDR, "file has no program header" }, - { ELF_E_INVALID_OFFSET, "invalid offset" } + { ELF_E_INVALID_OFFSET, "invalid offset" }, + { ELF_E_INVALID_SECTION_TYPE , "invalid section type" }, + { ELF_E_INVALID_SECTION_FLAGS , "invalid section flags" }, + { ELF_E_NOT_COMPRESSED, "section does not contain compressed data" }, + { ELF_E_ALREADY_COMPRESSED, "section contains compressed data" }, + { ELF_E_UNKNOWN_COMPRESSION_TYPE, "unknown compression type" }, + { ELF_E_COMPRESS_ERROR, "cannot compress data" }, + { ELF_E_DECOMPRESS_ERROR, "cannot decompress data" } }; diff --git a/tests/newdata.c b/tests/newdata.c new file mode 100644 index 0000000..9af9956 --- /dev/null +++ b/tests/newdata.c @@ -0,0 +1,403 @@ +/* Test program for elf_newdata function. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include + +// Random data string (16 bytes). +static char *DATA = "123456789ABCDEF"; +static size_t DATA_LEN = 16; + +static void +add_section_data (Elf *elf, char *buf, size_t len) +{ + printf ("Adding %zd bytes.\n", len); + + Elf_Scn *scn = elf_getscn (elf, 1); + if (scn == NULL) + { + printf ("couldn't get data section: %s\n", elf_errmsg (-1)); + exit (1); + } + + Elf_Data *data = elf_newdata (scn); + if (data == NULL) + { + printf ("cannot create newdata for section: %s\n", elf_errmsg (-1)); + exit (1); + } + + data->d_buf = buf; + data->d_type = ELF_T_BYTE; + data->d_size = len; + data->d_align = 1; + data->d_version = EV_CURRENT; + + // Let the library compute the internal structure information. + if (elf_update (elf, ELF_C_NULL) < 0) + { + printf ("failure in elf_update(NULL): %s\n", elf_errmsg (-1)); + exit (1); + } + +} + +static Elf * +create_elf (int fd, int class, int use_mmap) +{ + Elf *elf = elf_begin (fd, use_mmap ? ELF_C_WRITE_MMAP : ELF_C_WRITE, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Create an ELF header. + if (gelf_newehdr (elf, class) == 0) + { + printf ("cannot create ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + GElf_Ehdr ehdr_mem; + GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); + if (ehdr == NULL) + { + printf ("cannot get ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Initialize header. + ehdr->e_ident[EI_DATA] = class == ELFCLASS32 ? ELFDATA2LSB : ELFDATA2MSB; + ehdr->e_ident[EI_OSABI] = ELFOSABI_GNU; + ehdr->e_type = ET_NONE; + ehdr->e_machine = class == ELFCLASS32 ? EM_PPC : EM_X86_64; + ehdr->e_version = EV_CURRENT; + + // Update the ELF header. + if (gelf_update_ehdr (elf, ehdr) == 0) + { + printf ("cannot update ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Create a section. + Elf_Scn *scn = elf_newscn (elf); + if (scn == NULL) + { + printf ("cannot create new section: %s\n", elf_errmsg (-1)); + exit (1); + } + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for data section: %s\n", elf_errmsg (-1)); + exit (1); + } + + shdr->sh_type = SHT_PROGBITS; + shdr->sh_flags = 0; + shdr->sh_addr = 0; + shdr->sh_link = SHN_UNDEF; + shdr->sh_info = SHN_UNDEF; + shdr->sh_addralign = 1; + shdr->sh_entsize = 1; + shdr->sh_name = 0; + + // Finish section, update the header. + if (gelf_update_shdr (scn, shdr) == 0) + { + printf ("cannot update header for DATA section: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Add some data to the section. + add_section_data (elf, DATA, DATA_LEN); + + // Write everything to disk. + if (elf_update (elf, ELF_C_WRITE) < 0) + { + printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1)); + exit (1); + } + + return elf; +} + +static Elf * +read_elf (int fd, int use_mmap) +{ + printf ("Reading ELF file\n"); + Elf *elf = elf_begin (fd, use_mmap ? ELF_C_RDWR_MMAP : ELF_C_RDWR, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-again: %s\n", elf_errmsg (-1)); + exit (1); + } + + return elf; +} + +static void +check_section_size (Elf *elf, size_t size) +{ + Elf_Scn *scn = elf_getscn (elf, 1); + if (scn == NULL) + { + printf ("couldn't get data section: %s\n", elf_errmsg (-1)); + exit (1); + } + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for DATA section: %s\n", elf_errmsg (-1)); + exit (1); + } + + if (shdr->sh_size == size) + printf ("OK %zd bytes.\n", size); + else + { + printf ("BAD size, expected %zd, got %" PRIu64 "\n", + size, shdr->sh_size); + exit (-1); + } +} + +static void +check_section_data (Elf *elf, char *data, size_t len, size_t times) +{ + Elf_Scn *scn = elf_getscn (elf, 1); + if (scn == NULL) + { + printf ("couldn't get data section: %s\n", elf_errmsg (-1)); + exit (1); + } + + Elf_Data *d = NULL; + for (size_t i = 0; i < times; i++) + { + if (d == NULL || i * len >= d->d_off + d->d_size) + { + d = elf_getdata (scn, d); + if (d == NULL) + { + printf ("cannot get data for section item %zd: %s\n", + i, elf_errmsg (-1)); + exit (1); + } + else + printf ("OK, section data item %zd (d_off: %" PRId64 + ", d_size: %zd)\n", i, d->d_off, d->d_size); + } + char *d_data = (char *) d->d_buf + (len * i) - d->d_off; + printf ("%zd data (d_off: %" PRId64 + ", len * i: %zd): (%p + %" PRId64 ") %s\n", + i, d->d_off, len * i, d->d_buf, (len * i) - d->d_off, d_data); + if (memcmp (data, d_data, len) != 0) + { + printf ("Got bad data in section for item %zd.\n", i); + exit (1); + } + } +} + +static void +check_elf (int class, int use_mmap) +{ + static const char *fname; + if (class == ELFCLASS32) + fname = use_mmap ? "newdata.elf32.mmap" : "newdata.elf32"; + else + fname = use_mmap ? "newdata.elf64.mmap" : "newdata.elf64"; + + printf ("\ncheck_elf: %s\n", fname); + + int fd = open (fname, O_RDWR|O_CREAT|O_TRUNC, 00666); + if (fd == -1) + { + printf ("cannot create `%s': %s\n", fname, strerror (errno)); + exit (1); + } + + Elf *elf = create_elf (fd, class, use_mmap); + check_section_size (elf, DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 1); + + // Add some more data (won't be written to disk). + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 2 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 2); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + // Read the ELF from disk now. And add new data directly. + fd = open (fname, O_RDONLY); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + elf = read_elf (fd, use_mmap); + check_section_size (elf, DATA_LEN); + // But don't check contents, that would read the data... + + // Add some more data. + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 2 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 2); + + // And some more. + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 3 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 3); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + // Read the ELF from disk now. And add new data after raw reading. + fd = open (fname, O_RDONLY); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + elf = read_elf (fd, use_mmap); + check_section_size (elf, DATA_LEN); + // But don't check contents, that would read the data... + + // Get raw data before adding new data. + Elf_Scn *scn = elf_getscn (elf, 1); + if (scn == NULL) + { + printf ("couldn't get data section: %s\n", elf_errmsg (-1)); + exit (1); + } + + printf ("elf_rawdata\n"); + Elf_Data *data = elf_rawdata (scn, NULL); + if (data == NULL) + { + printf ("couldn't get raw data from section: %s\n", elf_errmsg (-1)); + exit (1); + } + + if (data->d_size != DATA_LEN) + { + printf ("Unexpected Elf_Data: %zd", data->d_size); + exit (1); + } + + // Now add more data. + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 2 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 2); + + // And some more. + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 3 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 3); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + // Read the ELF from disk now. And add new data after data reading. + fd = open (fname, O_RDONLY); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + elf = read_elf (fd, use_mmap); + check_section_size (elf, DATA_LEN); + // Get (converted) data before adding new data. + check_section_data (elf, DATA, DATA_LEN, 1); + + printf ("elf_getdata\n"); + + // Now add more data. + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 2 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 2); + + // And some more. + add_section_data (elf, DATA, DATA_LEN); + check_section_size (elf, 3 * DATA_LEN); + check_section_data (elf, DATA, DATA_LEN, 3); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + unlink (fname); +} + +int +main (int argc __attribute__ ((unused)), char *argv[] __attribute__ ((unused))) +{ + // Initialize libelf. + elf_version (EV_CURRENT); + + // Fill holes with something non-zero to more easily spot bad data. + elf_fill ('X'); + + check_elf (ELFCLASS32, 0); + check_elf (ELFCLASS32, 1); + check_elf (ELFCLASS64, 0); + check_elf (ELFCLASS64, 1); + + return 0; +} diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c index 95a4df3..6f027df 100644 --- a/tests/rdwrmmap.c +++ b/tests/rdwrmmap.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/tests/rerequest_tag.c b/tests/rerequest_tag.c index d0bf5f2..b4d4627 100644 --- a/tests/rerequest_tag.c +++ b/tests/rerequest_tag.c @@ -42,5 +42,6 @@ main (int argc, char **argv) assert (die == &die_mem); assert (dwarf_tag (die) == 0); + dwarf_end (dw); return 0; } diff --git a/tests/run-addr2line-alt-debugpath.sh b/tests/run-addr2line-alt-debugpath.sh new file mode 100755 index 0000000..b508700 --- /dev/null +++ b/tests/run-addr2line-alt-debugpath.sh @@ -0,0 +1,67 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-addr2line-i-test.sh +testfiles testfile-inlines + +# Split off the debuginfo and put it under a separate subdir from the +# original binary. Use --debuginfo-path to connect the dots again. +# Note that we use separate subdirs/roots for the binaries and debug files. +abs_test_bindir=$(pwd)/bindir +abs_test_debugdir=$(pwd)/debugdir + +mkdir ${abs_test_bindir} +mkdir ${abs_test_bindir}/bin +mkdir ${abs_test_debugdir} +mkdir ${abs_test_debugdir}/bin + +testrun ${abs_top_builddir}/src/strip -f ${abs_test_debugdir}/bin/testfile-inlines.debug -o ${abs_test_bindir}/bin/testfile-inlines testfile-inlines + +# Can we find the separate debuginfo file now? +testrun_compare ${abs_top_builddir}/src/addr2line --pretty-print -a -f -i -e ${abs_test_bindir}/bin/testfile-inlines --debuginfo-path=${abs_test_debugdir} 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF +0x00000000000005a0: foobar at /tmp/x.cpp:5 +0x00000000000005a1: foobar at /tmp/x.cpp:6 +0x00000000000005b0: fubar at /tmp/x.cpp:10 +0x00000000000005b1: fubar at /tmp/x.cpp:11 +0x00000000000005c0: foobar at /tmp/x.cpp:5 + (inlined by) bar at /tmp/x.cpp:15 +0x00000000000005d0: fubar at /tmp/x.cpp:10 + (inlined by) baz at /tmp/x.cpp:20 +0x00000000000005e0: foobar at /tmp/x.cpp:5 + (inlined by) bar at /tmp/x.cpp:15 + (inlined by) _Z3foov at /tmp/x.cpp:25 +0x00000000000005e1: fubar at /tmp/x.cpp:10 + (inlined by) baz at /tmp/x.cpp:20 + (inlined by) _Z3foov at /tmp/x.cpp:26 +0x00000000000005f0: _Z2fuv at /tmp/x.cpp:31 +0x00000000000005f1: fubar at /tmp/x.cpp:10 + (inlined by) _Z2fuv at /tmp/x.cpp:32 +0x00000000000005f2: foobar at /tmp/x.cpp:5 + (inlined by) _Z2fuv at /tmp/x.cpp:33 +EOF + +# Cleanup +rm ${abs_test_bindir}/bin/testfile-inlines +rm ${abs_test_debugdir}/bin/testfile-inlines.debug +rmdir ${abs_test_bindir}/bin +rmdir ${abs_test_bindir} +rmdir ${abs_test_debugdir}/bin +rmdir ${abs_test_debugdir} + +exit 0 diff --git a/tests/run-addr2line-i-demangle-test.sh b/tests/run-addr2line-i-demangle-test.sh new file mode 100755 index 0000000..1af8562 --- /dev/null +++ b/tests/run-addr2line-i-demangle-test.sh @@ -0,0 +1,70 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then + echo "demangler unsupported" + exit 77 +fi + +. $srcdir/test-subr.sh + +# See run-addr2line-i-test.sh for how to generate test files. +testfiles testfile-inlines + +# All together now plus (demangled) function names. +testrun_compare ${abs_top_builddir}/src/addr2line -C -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF +foobar +/tmp/x.cpp:5 +foobar +/tmp/x.cpp:6 +fubar +/tmp/x.cpp:10 +fubar +/tmp/x.cpp:11 +foobar inlined at /tmp/x.cpp:15 in bar() +/tmp/x.cpp:5 +bar +/tmp/x.cpp:15 +fubar inlined at /tmp/x.cpp:20 in baz() +/tmp/x.cpp:10 +baz +/tmp/x.cpp:20 +foobar inlined at /tmp/x.cpp:15 in foo() +/tmp/x.cpp:5 +bar +/tmp/x.cpp:15 +foo() +/tmp/x.cpp:25 +fubar inlined at /tmp/x.cpp:20 in foo() +/tmp/x.cpp:10 +baz +/tmp/x.cpp:20 +foo() +/tmp/x.cpp:26 +fu() +/tmp/x.cpp:31 +fubar inlined at /tmp/x.cpp:32 in fu() +/tmp/x.cpp:10 +fu() +/tmp/x.cpp:32 +foobar inlined at /tmp/x.cpp:33 in fu() +/tmp/x.cpp:5 +fu() +/tmp/x.cpp:33 +EOF + +exit 0 diff --git a/tests/run-addr2line-i-lex-test.sh b/tests/run-addr2line-i-lex-test.sh new file mode 100755 index 0000000..c391fd9 --- /dev/null +++ b/tests/run-addr2line-i-lex-test.sh @@ -0,0 +1,71 @@ +#! /bin/sh +# Copyright (C) 2014 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# // g++ x.cpp -g -fPIC -olibx.so -shared -O3 -fvisibility=hidden +# +# void foobar() +# { +# __asm__ ( "nop" ::: ); +# } +# +# void foo() +# { +# { +# void (*bar) () = foobar; +# bar(); +# } +# } + +testfiles testfile-lex-inlines + +testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000680 <<\EOF +/tmp/x.cpp:5 +EOF + +testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000681 <<\EOF +/tmp/x.cpp:5 +EOF + +testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000690 <<\EOF +/tmp/x.cpp:5 +/tmp/x.cpp:12 +EOF + +testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000691 <<\EOF +/tmp/x.cpp:5 +/tmp/x.cpp:12 +EOF + +# All together now (plus function names). +testrun_compare ${abs_top_builddir}/src/addr2line -f -i -e testfile-lex-inlines 0x0000000000000680 0x0000000000000681 0x0000000000000690 0x0000000000000691 <<\EOF +_Z6foobarv +/tmp/x.cpp:5 +_Z6foobarv +/tmp/x.cpp:5 +foobar inlined at /tmp/x.cpp:12 in _Z3foov +/tmp/x.cpp:5 +_Z3foov +/tmp/x.cpp:12 +foobar inlined at /tmp/x.cpp:12 in _Z3foov +/tmp/x.cpp:5 +_Z3foov +/tmp/x.cpp:12 +EOF + +exit 0 diff --git a/tests/run-addr2line-i-test.sh b/tests/run-addr2line-i-test.sh index e98adda..d08f3cb 100755 --- a/tests/run-addr2line-i-test.sh +++ b/tests/run-addr2line-i-test.sh @@ -103,7 +103,7 @@ testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000 EOF # All together now (plus function names). -testrun_compare ${abs_top_builddir}/src/addr2line -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f1 0x00000000000005f2 <<\EOF +testrun_compare ${abs_top_builddir}/src/addr2line -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF foobar /tmp/x.cpp:5 foobar @@ -132,14 +132,92 @@ baz /tmp/x.cpp:20 _Z3foov /tmp/x.cpp:26 +_Z2fuv +/tmp/x.cpp:31 +fubar inlined at /tmp/x.cpp:32 in _Z2fuv +/tmp/x.cpp:10 +_Z2fuv +/tmp/x.cpp:32 +foobar inlined at /tmp/x.cpp:33 in _Z2fuv +/tmp/x.cpp:5 +_Z2fuv +/tmp/x.cpp:33 +EOF + +# All together now (plus function names plus addresses). +testrun_compare ${abs_top_builddir}/src/addr2line -a -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF +0x00000000000005a0 +foobar +/tmp/x.cpp:5 +0x00000000000005a1 +foobar +/tmp/x.cpp:6 +0x00000000000005b0 +fubar +/tmp/x.cpp:10 +0x00000000000005b1 +fubar +/tmp/x.cpp:11 +0x00000000000005c0 +foobar inlined at /tmp/x.cpp:15 in _Z3barv +/tmp/x.cpp:5 +bar +/tmp/x.cpp:15 +0x00000000000005d0 +fubar inlined at /tmp/x.cpp:20 in _Z3bazv +/tmp/x.cpp:10 +baz +/tmp/x.cpp:20 +0x00000000000005e0 +foobar inlined at /tmp/x.cpp:15 in _Z3foov +/tmp/x.cpp:5 +bar +/tmp/x.cpp:15 +_Z3foov +/tmp/x.cpp:25 +0x00000000000005e1 +fubar inlined at /tmp/x.cpp:20 in _Z3foov +/tmp/x.cpp:10 +baz +/tmp/x.cpp:20 +_Z3foov +/tmp/x.cpp:26 +0x00000000000005f0 +_Z2fuv +/tmp/x.cpp:31 +0x00000000000005f1 fubar inlined at /tmp/x.cpp:32 in _Z2fuv /tmp/x.cpp:10 _Z2fuv /tmp/x.cpp:32 +0x00000000000005f2 foobar inlined at /tmp/x.cpp:33 in _Z2fuv /tmp/x.cpp:5 _Z2fuv /tmp/x.cpp:33 EOF +# All together now (plus function names and addresses and pretty) +testrun_compare ${abs_top_builddir}/src/addr2line --pretty-print -a -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF +0x00000000000005a0: foobar at /tmp/x.cpp:5 +0x00000000000005a1: foobar at /tmp/x.cpp:6 +0x00000000000005b0: fubar at /tmp/x.cpp:10 +0x00000000000005b1: fubar at /tmp/x.cpp:11 +0x00000000000005c0: foobar at /tmp/x.cpp:5 + (inlined by) bar at /tmp/x.cpp:15 +0x00000000000005d0: fubar at /tmp/x.cpp:10 + (inlined by) baz at /tmp/x.cpp:20 +0x00000000000005e0: foobar at /tmp/x.cpp:5 + (inlined by) bar at /tmp/x.cpp:15 + (inlined by) _Z3foov at /tmp/x.cpp:25 +0x00000000000005e1: fubar at /tmp/x.cpp:10 + (inlined by) baz at /tmp/x.cpp:20 + (inlined by) _Z3foov at /tmp/x.cpp:26 +0x00000000000005f0: _Z2fuv at /tmp/x.cpp:31 +0x00000000000005f1: fubar at /tmp/x.cpp:10 + (inlined by) _Z2fuv at /tmp/x.cpp:32 +0x00000000000005f2: foobar at /tmp/x.cpp:5 + (inlined by) _Z2fuv at /tmp/x.cpp:33 +EOF + exit 0 diff --git a/tests/run-addr2line-test.sh b/tests/run-addr2line-test.sh index 768006b..1079c3e 100755 --- a/tests/run-addr2line-test.sh +++ b/tests/run-addr2line-test.sh @@ -71,4 +71,46 @@ echo "# stdin without newline symbol, just EOF." echo -n "foo" | testrun ${abs_top_builddir}/src/addr2line -f -e testfile > stdin.nl.out || exit 1 cmp foo.out stdin.nonl.out || exit 1 +tempfiles good.addr.out + +cat > good.addr.out <<\EOF +0x08048468 +foo +/home/drepper/gnu/new-bu/build/ttt/f.c:3 +0x0804845c +bar +/home/drepper/gnu/new-bu/build/ttt/b.c:4 +0x08048468 +foo +/home/drepper/gnu/new-bu/build/ttt/f.c:3 +0x0804845c +bar +/home/drepper/gnu/new-bu/build/ttt/b.c:4 +0x08048468 +foo +/home/drepper/gnu/new-bu/build/ttt/f.c:3 +0x0804845c +bar +/home/drepper/gnu/new-bu/build/ttt/b.c:4 +0x08048468 +foo +/home/drepper/gnu/new-bu/build/ttt/f.c:3 +0x0804845c +bar +/home/drepper/gnu/new-bu/build/ttt/b.c:4 +EOF + +echo "# Everything on the command line with addresses" +cat good.addr.out | testrun_compare ${abs_top_builddir}/src/addr2line -a -f -e testfile 0x08048468 0x0804845c foo bar foo+0x0 bar+0x0 foo-0x0 bar-0x0 + +echo "# Everything from stdin (with newlines) with addresses." +cat stdin.nl | testrun ${abs_top_builddir}/src/addr2line -a -f -e testfile > stdin.nl.out || exit 1 +cmp good.addr.out stdin.nl.out || exit 1 + +echo "# Pretty with functions and addresses." +testrun_compare ${abs_top_builddir}/src/addr2line --pretty -a -f -e testfile 0x08048468 0x0804845c << EOF +0x08048468: foo at /home/drepper/gnu/new-bu/build/ttt/f.c:3 +0x0804845c: bar at /home/drepper/gnu/new-bu/build/ttt/b.c:4 +EOF + exit 0 diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh index 5d33246..c864eea 100755 --- a/tests/run-addrcfi.sh +++ b/tests/run-addrcfi.sh @@ -1,5 +1,6 @@ #! /bin/sh # Copyright (C) 2013 +# Copyright (C) H.J. Lu , 2015. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -260,7 +261,7 @@ testrun_compare ${abs_builddir}/addrcfi -e testfile12 0x00000000000009d0 <<\EOF EOF # EM_PPC (function bar 0x100004c0) -# Note. Only in .debug_frame, not in .eh_frame. +# Note. First only in .debug_frame, second only in .eh_frame. # # = bar.c = # @@ -1316,6 +1317,1029 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range vector reg1155 (vr31): undefined EOF +testrun_compare ${abs_builddir}/addrcfi -e testfileppc32 0x100004d2 <<\EOF +.eh_frame has 0x100004d2 => [0x100004d0, 0x100004d4): + return address in reg65 + CFA location expression: bregx(1) + integer reg0 (r0): undefined + integer reg1 (r1): location expression: call_frame_cfa stack_value + integer reg2 (r2): same_value + integer reg3 (r3): undefined + integer reg4 (r4): undefined + integer reg5 (r5): undefined + integer reg6 (r6): undefined + integer reg7 (r7): undefined + integer reg8 (r8): undefined + integer reg9 (r9): undefined + integer reg10 (r10): undefined + integer reg11 (r11): undefined + integer reg12 (r12): undefined + integer reg13 (r13): same_value + integer reg14 (r14): same_value + integer reg15 (r15): same_value + integer reg16 (r16): same_value + integer reg17 (r17): same_value + integer reg18 (r18): same_value + integer reg19 (r19): same_value + integer reg20 (r20): same_value + integer reg21 (r21): same_value + integer reg22 (r22): same_value + integer reg23 (r23): same_value + integer reg24 (r24): same_value + integer reg25 (r25): same_value + integer reg26 (r26): same_value + integer reg27 (r27): same_value + integer reg28 (r28): same_value + integer reg29 (r29): same_value + integer reg30 (r30): same_value + integer reg31 (r31): same_value + FPU reg32 (f0): undefined + FPU reg33 (f1): undefined + FPU reg34 (f2): undefined + FPU reg35 (f3): undefined + FPU reg36 (f4): undefined + FPU reg37 (f5): undefined + FPU reg38 (f6): undefined + FPU reg39 (f7): undefined + FPU reg40 (f8): undefined + FPU reg41 (f9): undefined + FPU reg42 (f10): undefined + FPU reg43 (f11): undefined + FPU reg44 (f12): undefined + FPU reg45 (f13): undefined + FPU reg46 (f14): undefined + FPU reg47 (f15): undefined + FPU reg48 (f16): undefined + FPU reg49 (f17): undefined + FPU reg50 (f18): undefined + FPU reg51 (f19): undefined + FPU reg52 (f20): undefined + FPU reg53 (f21): undefined + FPU reg54 (f22): undefined + FPU reg55 (f23): undefined + FPU reg56 (f24): undefined + FPU reg57 (f25): undefined + FPU reg58 (f26): undefined + FPU reg59 (f27): undefined + FPU reg60 (f28): undefined + FPU reg61 (f29): undefined + FPU reg62 (f30): undefined + FPU reg63 (f31): undefined + integer reg64 (cr): undefined + FPU reg65 (fpscr): same_value + integer reg66 (msr): undefined + vector reg67 (vscr): undefined + privileged reg70 (sr0): undefined + privileged reg71 (sr1): undefined + privileged reg72 (sr2): undefined + privileged reg73 (sr3): undefined + privileged reg74 (sr4): undefined + privileged reg75 (sr5): undefined + privileged reg76 (sr6): undefined + privileged reg77 (sr7): undefined + privileged reg78 (sr8): undefined + privileged reg79 (sr9): undefined + privileged reg80 (sr10): undefined + privileged reg81 (sr11): undefined + privileged reg82 (sr12): undefined + privileged reg83 (sr13): undefined + privileged reg84 (sr14): undefined + privileged reg85 (sr15): undefined + privileged reg100 (mq): undefined + privileged reg101 (xer): undefined + privileged reg102 (spr2): undefined + privileged reg103 (spr3): undefined + privileged reg104 (spr4): undefined + privileged reg105 (spr5): undefined + privileged reg106 (spr6): undefined + privileged reg107 (spr7): undefined + privileged reg108 (lr): undefined + privileged reg109 (ctr): undefined + privileged reg110 (spr10): undefined + privileged reg111 (spr11): undefined + privileged reg112 (spr12): undefined + privileged reg113 (spr13): undefined + privileged reg114 (spr14): undefined + privileged reg115 (spr15): undefined + privileged reg116 (spr16): undefined + privileged reg117 (spr17): undefined + privileged reg118 (dsisr): undefined + privileged reg119 (dar): undefined + privileged reg120 (spr20): undefined + privileged reg121 (spr21): undefined + privileged reg122 (dec): undefined + privileged reg123 (spr23): undefined + privileged reg124 (spr24): undefined + privileged reg125 (spr25): undefined + privileged reg126 (spr26): undefined + privileged reg127 (spr27): undefined + privileged reg128 (spr28): undefined + privileged reg129 (spr29): undefined + privileged reg130 (spr30): undefined + privileged reg131 (spr31): undefined + privileged reg132 (spr32): undefined + privileged reg133 (spr33): undefined + privileged reg134 (spr34): undefined + privileged reg135 (spr35): undefined + privileged reg136 (spr36): undefined + privileged reg137 (spr37): undefined + privileged reg138 (spr38): undefined + privileged reg139 (spr39): undefined + privileged reg140 (spr40): undefined + privileged reg141 (spr41): undefined + privileged reg142 (spr42): undefined + privileged reg143 (spr43): undefined + privileged reg144 (spr44): undefined + privileged reg145 (spr45): undefined + privileged reg146 (spr46): undefined + privileged reg147 (spr47): undefined + privileged reg148 (spr48): undefined + privileged reg149 (spr49): undefined + privileged reg150 (spr50): undefined + privileged reg151 (spr51): undefined + privileged reg152 (spr52): undefined + privileged reg153 (spr53): undefined + privileged reg154 (spr54): undefined + privileged reg155 (spr55): undefined + privileged reg156 (spr56): undefined + privileged reg157 (spr57): undefined + privileged reg158 (spr58): undefined + privileged reg159 (spr59): undefined + privileged reg160 (spr60): undefined + privileged reg161 (spr61): undefined + privileged reg162 (spr62): undefined + privileged reg163 (spr63): undefined + privileged reg164 (spr64): undefined + privileged reg165 (spr65): undefined + privileged reg166 (spr66): undefined + privileged reg167 (spr67): undefined + privileged reg168 (spr68): undefined + privileged reg169 (spr69): undefined + privileged reg170 (spr70): undefined + privileged reg171 (spr71): undefined + privileged reg172 (spr72): undefined + privileged reg173 (spr73): undefined + privileged reg174 (spr74): undefined + privileged reg175 (spr75): undefined + privileged reg176 (spr76): undefined + privileged reg177 (spr77): undefined + privileged reg178 (spr78): undefined + privileged reg179 (spr79): undefined + privileged reg180 (spr80): undefined + privileged reg181 (spr81): undefined + privileged reg182 (spr82): undefined + privileged reg183 (spr83): undefined + privileged reg184 (spr84): undefined + privileged reg185 (spr85): undefined + privileged reg186 (spr86): undefined + privileged reg187 (spr87): undefined + privileged reg188 (spr88): undefined + privileged reg189 (spr89): undefined + privileged reg190 (spr90): undefined + privileged reg191 (spr91): undefined + privileged reg192 (spr92): undefined + privileged reg193 (spr93): undefined + privileged reg194 (spr94): undefined + privileged reg195 (spr95): undefined + privileged reg196 (spr96): undefined + privileged reg197 (spr97): undefined + privileged reg198 (spr98): undefined + privileged reg199 (spr99): undefined + privileged reg200 (spr100): undefined + privileged reg201 (spr101): undefined + privileged reg202 (spr102): undefined + privileged reg203 (spr103): undefined + privileged reg204 (spr104): undefined + privileged reg205 (spr105): undefined + privileged reg206 (spr106): undefined + privileged reg207 (spr107): undefined + privileged reg208 (spr108): undefined + privileged reg209 (spr109): undefined + privileged reg210 (spr110): undefined + privileged reg211 (spr111): undefined + privileged reg212 (spr112): undefined + privileged reg213 (spr113): undefined + privileged reg214 (spr114): undefined + privileged reg215 (spr115): undefined + privileged reg216 (spr116): undefined + privileged reg217 (spr117): undefined + privileged reg218 (spr118): undefined + privileged reg219 (spr119): undefined + privileged reg220 (spr120): undefined + privileged reg221 (spr121): undefined + privileged reg222 (spr122): undefined + privileged reg223 (spr123): undefined + privileged reg224 (spr124): undefined + privileged reg225 (spr125): undefined + privileged reg226 (spr126): undefined + privileged reg227 (spr127): undefined + privileged reg228 (spr128): undefined + privileged reg229 (spr129): undefined + privileged reg230 (spr130): undefined + privileged reg231 (spr131): undefined + privileged reg232 (spr132): undefined + privileged reg233 (spr133): undefined + privileged reg234 (spr134): undefined + privileged reg235 (spr135): undefined + privileged reg236 (spr136): undefined + privileged reg237 (spr137): undefined + privileged reg238 (spr138): undefined + privileged reg239 (spr139): undefined + privileged reg240 (spr140): undefined + privileged reg241 (spr141): undefined + privileged reg242 (spr142): undefined + privileged reg243 (spr143): undefined + privileged reg244 (spr144): undefined + privileged reg245 (spr145): undefined + privileged reg246 (spr146): undefined + privileged reg247 (spr147): undefined + privileged reg248 (spr148): undefined + privileged reg249 (spr149): undefined + privileged reg250 (spr150): undefined + privileged reg251 (spr151): undefined + privileged reg252 (spr152): undefined + privileged reg253 (spr153): undefined + privileged reg254 (spr154): undefined + privileged reg255 (spr155): undefined + privileged reg256 (spr156): undefined + privileged reg257 (spr157): undefined + privileged reg258 (spr158): undefined + privileged reg259 (spr159): undefined + privileged reg260 (spr160): undefined + privileged reg261 (spr161): undefined + privileged reg262 (spr162): undefined + privileged reg263 (spr163): undefined + privileged reg264 (spr164): undefined + privileged reg265 (spr165): undefined + privileged reg266 (spr166): undefined + privileged reg267 (spr167): undefined + privileged reg268 (spr168): undefined + privileged reg269 (spr169): undefined + privileged reg270 (spr170): undefined + privileged reg271 (spr171): undefined + privileged reg272 (spr172): undefined + privileged reg273 (spr173): undefined + privileged reg274 (spr174): undefined + privileged reg275 (spr175): undefined + privileged reg276 (spr176): undefined + privileged reg277 (spr177): undefined + privileged reg278 (spr178): undefined + privileged reg279 (spr179): undefined + privileged reg280 (spr180): undefined + privileged reg281 (spr181): undefined + privileged reg282 (spr182): undefined + privileged reg283 (spr183): undefined + privileged reg284 (spr184): undefined + privileged reg285 (spr185): undefined + privileged reg286 (spr186): undefined + privileged reg287 (spr187): undefined + privileged reg288 (spr188): undefined + privileged reg289 (spr189): undefined + privileged reg290 (spr190): undefined + privileged reg291 (spr191): undefined + privileged reg292 (spr192): undefined + privileged reg293 (spr193): undefined + privileged reg294 (spr194): undefined + privileged reg295 (spr195): undefined + privileged reg296 (spr196): undefined + privileged reg297 (spr197): undefined + privileged reg298 (spr198): undefined + privileged reg299 (spr199): undefined + privileged reg300 (spr200): undefined + privileged reg301 (spr201): undefined + privileged reg302 (spr202): undefined + privileged reg303 (spr203): undefined + privileged reg304 (spr204): undefined + privileged reg305 (spr205): undefined + privileged reg306 (spr206): undefined + privileged reg307 (spr207): undefined + privileged reg308 (spr208): undefined + privileged reg309 (spr209): undefined + privileged reg310 (spr210): undefined + privileged reg311 (spr211): undefined + privileged reg312 (spr212): undefined + privileged reg313 (spr213): undefined + privileged reg314 (spr214): undefined + privileged reg315 (spr215): undefined + privileged reg316 (spr216): undefined + privileged reg317 (spr217): undefined + privileged reg318 (spr218): undefined + privileged reg319 (spr219): undefined + privileged reg320 (spr220): undefined + privileged reg321 (spr221): undefined + privileged reg322 (spr222): undefined + privileged reg323 (spr223): undefined + privileged reg324 (spr224): undefined + privileged reg325 (spr225): undefined + privileged reg326 (spr226): undefined + privileged reg327 (spr227): undefined + privileged reg328 (spr228): undefined + privileged reg329 (spr229): undefined + privileged reg330 (spr230): undefined + privileged reg331 (spr231): undefined + privileged reg332 (spr232): undefined + privileged reg333 (spr233): undefined + privileged reg334 (spr234): undefined + privileged reg335 (spr235): undefined + privileged reg336 (spr236): undefined + privileged reg337 (spr237): undefined + privileged reg338 (spr238): undefined + privileged reg339 (spr239): undefined + privileged reg340 (spr240): undefined + privileged reg341 (spr241): undefined + privileged reg342 (spr242): undefined + privileged reg343 (spr243): undefined + privileged reg344 (spr244): undefined + privileged reg345 (spr245): undefined + privileged reg346 (spr246): undefined + privileged reg347 (spr247): undefined + privileged reg348 (spr248): undefined + privileged reg349 (spr249): undefined + privileged reg350 (spr250): undefined + privileged reg351 (spr251): undefined + privileged reg352 (spr252): undefined + privileged reg353 (spr253): undefined + privileged reg354 (spr254): undefined + privileged reg355 (spr255): undefined + vector reg356 (vrsave): undefined + privileged reg357 (spr257): undefined + privileged reg358 (spr258): undefined + privileged reg359 (spr259): undefined + privileged reg360 (spr260): undefined + privileged reg361 (spr261): undefined + privileged reg362 (spr262): undefined + privileged reg363 (spr263): undefined + privileged reg364 (spr264): undefined + privileged reg365 (spr265): undefined + privileged reg366 (spr266): undefined + privileged reg367 (spr267): undefined + privileged reg368 (spr268): undefined + privileged reg369 (spr269): undefined + privileged reg370 (spr270): undefined + privileged reg371 (spr271): undefined + privileged reg372 (spr272): undefined + privileged reg373 (spr273): undefined + privileged reg374 (spr274): undefined + privileged reg375 (spr275): undefined + privileged reg376 (spr276): undefined + privileged reg377 (spr277): undefined + privileged reg378 (spr278): undefined + privileged reg379 (spr279): undefined + privileged reg380 (spr280): undefined + privileged reg381 (spr281): undefined + privileged reg382 (spr282): undefined + privileged reg383 (spr283): undefined + privileged reg384 (spr284): undefined + privileged reg385 (spr285): undefined + privileged reg386 (spr286): undefined + privileged reg387 (spr287): undefined + privileged reg388 (spr288): undefined + privileged reg389 (spr289): undefined + privileged reg390 (spr290): undefined + privileged reg391 (spr291): undefined + privileged reg392 (spr292): undefined + privileged reg393 (spr293): undefined + privileged reg394 (spr294): undefined + privileged reg395 (spr295): undefined + privileged reg396 (spr296): undefined + privileged reg397 (spr297): undefined + privileged reg398 (spr298): undefined + privileged reg399 (spr299): undefined + privileged reg400 (spr300): undefined + privileged reg401 (spr301): undefined + privileged reg402 (spr302): undefined + privileged reg403 (spr303): undefined + privileged reg404 (spr304): undefined + privileged reg405 (spr305): undefined + privileged reg406 (spr306): undefined + privileged reg407 (spr307): undefined + privileged reg408 (spr308): undefined + privileged reg409 (spr309): undefined + privileged reg410 (spr310): undefined + privileged reg411 (spr311): undefined + privileged reg412 (spr312): undefined + privileged reg413 (spr313): undefined + privileged reg414 (spr314): undefined + privileged reg415 (spr315): undefined + privileged reg416 (spr316): undefined + privileged reg417 (spr317): undefined + privileged reg418 (spr318): undefined + privileged reg419 (spr319): undefined + privileged reg420 (spr320): undefined + privileged reg421 (spr321): undefined + privileged reg422 (spr322): undefined + privileged reg423 (spr323): undefined + privileged reg424 (spr324): undefined + privileged reg425 (spr325): undefined + privileged reg426 (spr326): undefined + privileged reg427 (spr327): undefined + privileged reg428 (spr328): undefined + privileged reg429 (spr329): undefined + privileged reg430 (spr330): undefined + privileged reg431 (spr331): undefined + privileged reg432 (spr332): undefined + privileged reg433 (spr333): undefined + privileged reg434 (spr334): undefined + privileged reg435 (spr335): undefined + privileged reg436 (spr336): undefined + privileged reg437 (spr337): undefined + privileged reg438 (spr338): undefined + privileged reg439 (spr339): undefined + privileged reg440 (spr340): undefined + privileged reg441 (spr341): undefined + privileged reg442 (spr342): undefined + privileged reg443 (spr343): undefined + privileged reg444 (spr344): undefined + privileged reg445 (spr345): undefined + privileged reg446 (spr346): undefined + privileged reg447 (spr347): undefined + privileged reg448 (spr348): undefined + privileged reg449 (spr349): undefined + privileged reg450 (spr350): undefined + privileged reg451 (spr351): undefined + privileged reg452 (spr352): undefined + privileged reg453 (spr353): undefined + privileged reg454 (spr354): undefined + privileged reg455 (spr355): undefined + privileged reg456 (spr356): undefined + privileged reg457 (spr357): undefined + privileged reg458 (spr358): undefined + privileged reg459 (spr359): undefined + privileged reg460 (spr360): undefined + privileged reg461 (spr361): undefined + privileged reg462 (spr362): undefined + privileged reg463 (spr363): undefined + privileged reg464 (spr364): undefined + privileged reg465 (spr365): undefined + privileged reg466 (spr366): undefined + privileged reg467 (spr367): undefined + privileged reg468 (spr368): undefined + privileged reg469 (spr369): undefined + privileged reg470 (spr370): undefined + privileged reg471 (spr371): undefined + privileged reg472 (spr372): undefined + privileged reg473 (spr373): undefined + privileged reg474 (spr374): undefined + privileged reg475 (spr375): undefined + privileged reg476 (spr376): undefined + privileged reg477 (spr377): undefined + privileged reg478 (spr378): undefined + privileged reg479 (spr379): undefined + privileged reg480 (spr380): undefined + privileged reg481 (spr381): undefined + privileged reg482 (spr382): undefined + privileged reg483 (spr383): undefined + privileged reg484 (spr384): undefined + privileged reg485 (spr385): undefined + privileged reg486 (spr386): undefined + privileged reg487 (spr387): undefined + privileged reg488 (spr388): undefined + privileged reg489 (spr389): undefined + privileged reg490 (spr390): undefined + privileged reg491 (spr391): undefined + privileged reg492 (spr392): undefined + privileged reg493 (spr393): undefined + privileged reg494 (spr394): undefined + privileged reg495 (spr395): undefined + privileged reg496 (spr396): undefined + privileged reg497 (spr397): undefined + privileged reg498 (spr398): undefined + privileged reg499 (spr399): undefined + privileged reg500 (spr400): undefined + privileged reg501 (spr401): undefined + privileged reg502 (spr402): undefined + privileged reg503 (spr403): undefined + privileged reg504 (spr404): undefined + privileged reg505 (spr405): undefined + privileged reg506 (spr406): undefined + privileged reg507 (spr407): undefined + privileged reg508 (spr408): undefined + privileged reg509 (spr409): undefined + privileged reg510 (spr410): undefined + privileged reg511 (spr411): undefined + privileged reg512 (spr412): undefined + privileged reg513 (spr413): undefined + privileged reg514 (spr414): undefined + privileged reg515 (spr415): undefined + privileged reg516 (spr416): undefined + privileged reg517 (spr417): undefined + privileged reg518 (spr418): undefined + privileged reg519 (spr419): undefined + privileged reg520 (spr420): undefined + privileged reg521 (spr421): undefined + privileged reg522 (spr422): undefined + privileged reg523 (spr423): undefined + privileged reg524 (spr424): undefined + privileged reg525 (spr425): undefined + privileged reg526 (spr426): undefined + privileged reg527 (spr427): undefined + privileged reg528 (spr428): undefined + privileged reg529 (spr429): undefined + privileged reg530 (spr430): undefined + privileged reg531 (spr431): undefined + privileged reg532 (spr432): undefined + privileged reg533 (spr433): undefined + privileged reg534 (spr434): undefined + privileged reg535 (spr435): undefined + privileged reg536 (spr436): undefined + privileged reg537 (spr437): undefined + privileged reg538 (spr438): undefined + privileged reg539 (spr439): undefined + privileged reg540 (spr440): undefined + privileged reg541 (spr441): undefined + privileged reg542 (spr442): undefined + privileged reg543 (spr443): undefined + privileged reg544 (spr444): undefined + privileged reg545 (spr445): undefined + privileged reg546 (spr446): undefined + privileged reg547 (spr447): undefined + privileged reg548 (spr448): undefined + privileged reg549 (spr449): undefined + privileged reg550 (spr450): undefined + privileged reg551 (spr451): undefined + privileged reg552 (spr452): undefined + privileged reg553 (spr453): undefined + privileged reg554 (spr454): undefined + privileged reg555 (spr455): undefined + privileged reg556 (spr456): undefined + privileged reg557 (spr457): undefined + privileged reg558 (spr458): undefined + privileged reg559 (spr459): undefined + privileged reg560 (spr460): undefined + privileged reg561 (spr461): undefined + privileged reg562 (spr462): undefined + privileged reg563 (spr463): undefined + privileged reg564 (spr464): undefined + privileged reg565 (spr465): undefined + privileged reg566 (spr466): undefined + privileged reg567 (spr467): undefined + privileged reg568 (spr468): undefined + privileged reg569 (spr469): undefined + privileged reg570 (spr470): undefined + privileged reg571 (spr471): undefined + privileged reg572 (spr472): undefined + privileged reg573 (spr473): undefined + privileged reg574 (spr474): undefined + privileged reg575 (spr475): undefined + privileged reg576 (spr476): undefined + privileged reg577 (spr477): undefined + privileged reg578 (spr478): undefined + privileged reg579 (spr479): undefined + privileged reg580 (spr480): undefined + privileged reg581 (spr481): undefined + privileged reg582 (spr482): undefined + privileged reg583 (spr483): undefined + privileged reg584 (spr484): undefined + privileged reg585 (spr485): undefined + privileged reg586 (spr486): undefined + privileged reg587 (spr487): undefined + privileged reg588 (spr488): undefined + privileged reg589 (spr489): undefined + privileged reg590 (spr490): undefined + privileged reg591 (spr491): undefined + privileged reg592 (spr492): undefined + privileged reg593 (spr493): undefined + privileged reg594 (spr494): undefined + privileged reg595 (spr495): undefined + privileged reg596 (spr496): undefined + privileged reg597 (spr497): undefined + privileged reg598 (spr498): undefined + privileged reg599 (spr499): undefined + privileged reg600 (spr500): undefined + privileged reg601 (spr501): undefined + privileged reg602 (spr502): undefined + privileged reg603 (spr503): undefined + privileged reg604 (spr504): undefined + privileged reg605 (spr505): undefined + privileged reg606 (spr506): undefined + privileged reg607 (spr507): undefined + privileged reg608 (spr508): undefined + privileged reg609 (spr509): undefined + privileged reg610 (spr510): undefined + privileged reg611 (spr511): undefined + vector reg612 (spefscr): undefined + privileged reg613 (spr513): undefined + privileged reg614 (spr514): undefined + privileged reg615 (spr515): undefined + privileged reg616 (spr516): undefined + privileged reg617 (spr517): undefined + privileged reg618 (spr518): undefined + privileged reg619 (spr519): undefined + privileged reg620 (spr520): undefined + privileged reg621 (spr521): undefined + privileged reg622 (spr522): undefined + privileged reg623 (spr523): undefined + privileged reg624 (spr524): undefined + privileged reg625 (spr525): undefined + privileged reg626 (spr526): undefined + privileged reg627 (spr527): undefined + privileged reg628 (spr528): undefined + privileged reg629 (spr529): undefined + privileged reg630 (spr530): undefined + privileged reg631 (spr531): undefined + privileged reg632 (spr532): undefined + privileged reg633 (spr533): undefined + privileged reg634 (spr534): undefined + privileged reg635 (spr535): undefined + privileged reg636 (spr536): undefined + privileged reg637 (spr537): undefined + privileged reg638 (spr538): undefined + privileged reg639 (spr539): undefined + privileged reg640 (spr540): undefined + privileged reg641 (spr541): undefined + privileged reg642 (spr542): undefined + privileged reg643 (spr543): undefined + privileged reg644 (spr544): undefined + privileged reg645 (spr545): undefined + privileged reg646 (spr546): undefined + privileged reg647 (spr547): undefined + privileged reg648 (spr548): undefined + privileged reg649 (spr549): undefined + privileged reg650 (spr550): undefined + privileged reg651 (spr551): undefined + privileged reg652 (spr552): undefined + privileged reg653 (spr553): undefined + privileged reg654 (spr554): undefined + privileged reg655 (spr555): undefined + privileged reg656 (spr556): undefined + privileged reg657 (spr557): undefined + privileged reg658 (spr558): undefined + privileged reg659 (spr559): undefined + privileged reg660 (spr560): undefined + privileged reg661 (spr561): undefined + privileged reg662 (spr562): undefined + privileged reg663 (spr563): undefined + privileged reg664 (spr564): undefined + privileged reg665 (spr565): undefined + privileged reg666 (spr566): undefined + privileged reg667 (spr567): undefined + privileged reg668 (spr568): undefined + privileged reg669 (spr569): undefined + privileged reg670 (spr570): undefined + privileged reg671 (spr571): undefined + privileged reg672 (spr572): undefined + privileged reg673 (spr573): undefined + privileged reg674 (spr574): undefined + privileged reg675 (spr575): undefined + privileged reg676 (spr576): undefined + privileged reg677 (spr577): undefined + privileged reg678 (spr578): undefined + privileged reg679 (spr579): undefined + privileged reg680 (spr580): undefined + privileged reg681 (spr581): undefined + privileged reg682 (spr582): undefined + privileged reg683 (spr583): undefined + privileged reg684 (spr584): undefined + privileged reg685 (spr585): undefined + privileged reg686 (spr586): undefined + privileged reg687 (spr587): undefined + privileged reg688 (spr588): undefined + privileged reg689 (spr589): undefined + privileged reg690 (spr590): undefined + privileged reg691 (spr591): undefined + privileged reg692 (spr592): undefined + privileged reg693 (spr593): undefined + privileged reg694 (spr594): undefined + privileged reg695 (spr595): undefined + privileged reg696 (spr596): undefined + privileged reg697 (spr597): undefined + privileged reg698 (spr598): undefined + privileged reg699 (spr599): undefined + privileged reg700 (spr600): undefined + privileged reg701 (spr601): undefined + privileged reg702 (spr602): undefined + privileged reg703 (spr603): undefined + privileged reg704 (spr604): undefined + privileged reg705 (spr605): undefined + privileged reg706 (spr606): undefined + privileged reg707 (spr607): undefined + privileged reg708 (spr608): undefined + privileged reg709 (spr609): undefined + privileged reg710 (spr610): undefined + privileged reg711 (spr611): undefined + privileged reg712 (spr612): undefined + privileged reg713 (spr613): undefined + privileged reg714 (spr614): undefined + privileged reg715 (spr615): undefined + privileged reg716 (spr616): undefined + privileged reg717 (spr617): undefined + privileged reg718 (spr618): undefined + privileged reg719 (spr619): undefined + privileged reg720 (spr620): undefined + privileged reg721 (spr621): undefined + privileged reg722 (spr622): undefined + privileged reg723 (spr623): undefined + privileged reg724 (spr624): undefined + privileged reg725 (spr625): undefined + privileged reg726 (spr626): undefined + privileged reg727 (spr627): undefined + privileged reg728 (spr628): undefined + privileged reg729 (spr629): undefined + privileged reg730 (spr630): undefined + privileged reg731 (spr631): undefined + privileged reg732 (spr632): undefined + privileged reg733 (spr633): undefined + privileged reg734 (spr634): undefined + privileged reg735 (spr635): undefined + privileged reg736 (spr636): undefined + privileged reg737 (spr637): undefined + privileged reg738 (spr638): undefined + privileged reg739 (spr639): undefined + privileged reg740 (spr640): undefined + privileged reg741 (spr641): undefined + privileged reg742 (spr642): undefined + privileged reg743 (spr643): undefined + privileged reg744 (spr644): undefined + privileged reg745 (spr645): undefined + privileged reg746 (spr646): undefined + privileged reg747 (spr647): undefined + privileged reg748 (spr648): undefined + privileged reg749 (spr649): undefined + privileged reg750 (spr650): undefined + privileged reg751 (spr651): undefined + privileged reg752 (spr652): undefined + privileged reg753 (spr653): undefined + privileged reg754 (spr654): undefined + privileged reg755 (spr655): undefined + privileged reg756 (spr656): undefined + privileged reg757 (spr657): undefined + privileged reg758 (spr658): undefined + privileged reg759 (spr659): undefined + privileged reg760 (spr660): undefined + privileged reg761 (spr661): undefined + privileged reg762 (spr662): undefined + privileged reg763 (spr663): undefined + privileged reg764 (spr664): undefined + privileged reg765 (spr665): undefined + privileged reg766 (spr666): undefined + privileged reg767 (spr667): undefined + privileged reg768 (spr668): undefined + privileged reg769 (spr669): undefined + privileged reg770 (spr670): undefined + privileged reg771 (spr671): undefined + privileged reg772 (spr672): undefined + privileged reg773 (spr673): undefined + privileged reg774 (spr674): undefined + privileged reg775 (spr675): undefined + privileged reg776 (spr676): undefined + privileged reg777 (spr677): undefined + privileged reg778 (spr678): undefined + privileged reg779 (spr679): undefined + privileged reg780 (spr680): undefined + privileged reg781 (spr681): undefined + privileged reg782 (spr682): undefined + privileged reg783 (spr683): undefined + privileged reg784 (spr684): undefined + privileged reg785 (spr685): undefined + privileged reg786 (spr686): undefined + privileged reg787 (spr687): undefined + privileged reg788 (spr688): undefined + privileged reg789 (spr689): undefined + privileged reg790 (spr690): undefined + privileged reg791 (spr691): undefined + privileged reg792 (spr692): undefined + privileged reg793 (spr693): undefined + privileged reg794 (spr694): undefined + privileged reg795 (spr695): undefined + privileged reg796 (spr696): undefined + privileged reg797 (spr697): undefined + privileged reg798 (spr698): undefined + privileged reg799 (spr699): undefined + privileged reg800 (spr700): undefined + privileged reg801 (spr701): undefined + privileged reg802 (spr702): undefined + privileged reg803 (spr703): undefined + privileged reg804 (spr704): undefined + privileged reg805 (spr705): undefined + privileged reg806 (spr706): undefined + privileged reg807 (spr707): undefined + privileged reg808 (spr708): undefined + privileged reg809 (spr709): undefined + privileged reg810 (spr710): undefined + privileged reg811 (spr711): undefined + privileged reg812 (spr712): undefined + privileged reg813 (spr713): undefined + privileged reg814 (spr714): undefined + privileged reg815 (spr715): undefined + privileged reg816 (spr716): undefined + privileged reg817 (spr717): undefined + privileged reg818 (spr718): undefined + privileged reg819 (spr719): undefined + privileged reg820 (spr720): undefined + privileged reg821 (spr721): undefined + privileged reg822 (spr722): undefined + privileged reg823 (spr723): undefined + privileged reg824 (spr724): undefined + privileged reg825 (spr725): undefined + privileged reg826 (spr726): undefined + privileged reg827 (spr727): undefined + privileged reg828 (spr728): undefined + privileged reg829 (spr729): undefined + privileged reg830 (spr730): undefined + privileged reg831 (spr731): undefined + privileged reg832 (spr732): undefined + privileged reg833 (spr733): undefined + privileged reg834 (spr734): undefined + privileged reg835 (spr735): undefined + privileged reg836 (spr736): undefined + privileged reg837 (spr737): undefined + privileged reg838 (spr738): undefined + privileged reg839 (spr739): undefined + privileged reg840 (spr740): undefined + privileged reg841 (spr741): undefined + privileged reg842 (spr742): undefined + privileged reg843 (spr743): undefined + privileged reg844 (spr744): undefined + privileged reg845 (spr745): undefined + privileged reg846 (spr746): undefined + privileged reg847 (spr747): undefined + privileged reg848 (spr748): undefined + privileged reg849 (spr749): undefined + privileged reg850 (spr750): undefined + privileged reg851 (spr751): undefined + privileged reg852 (spr752): undefined + privileged reg853 (spr753): undefined + privileged reg854 (spr754): undefined + privileged reg855 (spr755): undefined + privileged reg856 (spr756): undefined + privileged reg857 (spr757): undefined + privileged reg858 (spr758): undefined + privileged reg859 (spr759): undefined + privileged reg860 (spr760): undefined + privileged reg861 (spr761): undefined + privileged reg862 (spr762): undefined + privileged reg863 (spr763): undefined + privileged reg864 (spr764): undefined + privileged reg865 (spr765): undefined + privileged reg866 (spr766): undefined + privileged reg867 (spr767): undefined + privileged reg868 (spr768): undefined + privileged reg869 (spr769): undefined + privileged reg870 (spr770): undefined + privileged reg871 (spr771): undefined + privileged reg872 (spr772): undefined + privileged reg873 (spr773): undefined + privileged reg874 (spr774): undefined + privileged reg875 (spr775): undefined + privileged reg876 (spr776): undefined + privileged reg877 (spr777): undefined + privileged reg878 (spr778): undefined + privileged reg879 (spr779): undefined + privileged reg880 (spr780): undefined + privileged reg881 (spr781): undefined + privileged reg882 (spr782): undefined + privileged reg883 (spr783): undefined + privileged reg884 (spr784): undefined + privileged reg885 (spr785): undefined + privileged reg886 (spr786): undefined + privileged reg887 (spr787): undefined + privileged reg888 (spr788): undefined + privileged reg889 (spr789): undefined + privileged reg890 (spr790): undefined + privileged reg891 (spr791): undefined + privileged reg892 (spr792): undefined + privileged reg893 (spr793): undefined + privileged reg894 (spr794): undefined + privileged reg895 (spr795): undefined + privileged reg896 (spr796): undefined + privileged reg897 (spr797): undefined + privileged reg898 (spr798): undefined + privileged reg899 (spr799): undefined + privileged reg900 (spr800): undefined + privileged reg901 (spr801): undefined + privileged reg902 (spr802): undefined + privileged reg903 (spr803): undefined + privileged reg904 (spr804): undefined + privileged reg905 (spr805): undefined + privileged reg906 (spr806): undefined + privileged reg907 (spr807): undefined + privileged reg908 (spr808): undefined + privileged reg909 (spr809): undefined + privileged reg910 (spr810): undefined + privileged reg911 (spr811): undefined + privileged reg912 (spr812): undefined + privileged reg913 (spr813): undefined + privileged reg914 (spr814): undefined + privileged reg915 (spr815): undefined + privileged reg916 (spr816): undefined + privileged reg917 (spr817): undefined + privileged reg918 (spr818): undefined + privileged reg919 (spr819): undefined + privileged reg920 (spr820): undefined + privileged reg921 (spr821): undefined + privileged reg922 (spr822): undefined + privileged reg923 (spr823): undefined + privileged reg924 (spr824): undefined + privileged reg925 (spr825): undefined + privileged reg926 (spr826): undefined + privileged reg927 (spr827): undefined + privileged reg928 (spr828): undefined + privileged reg929 (spr829): undefined + privileged reg930 (spr830): undefined + privileged reg931 (spr831): undefined + privileged reg932 (spr832): undefined + privileged reg933 (spr833): undefined + privileged reg934 (spr834): undefined + privileged reg935 (spr835): undefined + privileged reg936 (spr836): undefined + privileged reg937 (spr837): undefined + privileged reg938 (spr838): undefined + privileged reg939 (spr839): undefined + privileged reg940 (spr840): undefined + privileged reg941 (spr841): undefined + privileged reg942 (spr842): undefined + privileged reg943 (spr843): undefined + privileged reg944 (spr844): undefined + privileged reg945 (spr845): undefined + privileged reg946 (spr846): undefined + privileged reg947 (spr847): undefined + privileged reg948 (spr848): undefined + privileged reg949 (spr849): undefined + privileged reg950 (spr850): undefined + privileged reg951 (spr851): undefined + privileged reg952 (spr852): undefined + privileged reg953 (spr853): undefined + privileged reg954 (spr854): undefined + privileged reg955 (spr855): undefined + privileged reg956 (spr856): undefined + privileged reg957 (spr857): undefined + privileged reg958 (spr858): undefined + privileged reg959 (spr859): undefined + privileged reg960 (spr860): undefined + privileged reg961 (spr861): undefined + privileged reg962 (spr862): undefined + privileged reg963 (spr863): undefined + privileged reg964 (spr864): undefined + privileged reg965 (spr865): undefined + privileged reg966 (spr866): undefined + privileged reg967 (spr867): undefined + privileged reg968 (spr868): undefined + privileged reg969 (spr869): undefined + privileged reg970 (spr870): undefined + privileged reg971 (spr871): undefined + privileged reg972 (spr872): undefined + privileged reg973 (spr873): undefined + privileged reg974 (spr874): undefined + privileged reg975 (spr875): undefined + privileged reg976 (spr876): undefined + privileged reg977 (spr877): undefined + privileged reg978 (spr878): undefined + privileged reg979 (spr879): undefined + privileged reg980 (spr880): undefined + privileged reg981 (spr881): undefined + privileged reg982 (spr882): undefined + privileged reg983 (spr883): undefined + privileged reg984 (spr884): undefined + privileged reg985 (spr885): undefined + privileged reg986 (spr886): undefined + privileged reg987 (spr887): undefined + privileged reg988 (spr888): undefined + privileged reg989 (spr889): undefined + privileged reg990 (spr890): undefined + privileged reg991 (spr891): undefined + privileged reg992 (spr892): undefined + privileged reg993 (spr893): undefined + privileged reg994 (spr894): undefined + privileged reg995 (spr895): undefined + privileged reg996 (spr896): undefined + privileged reg997 (spr897): undefined + privileged reg998 (spr898): undefined + privileged reg999 (spr899): undefined + vector reg1124 (vr0): undefined + vector reg1125 (vr1): undefined + vector reg1126 (vr2): undefined + vector reg1127 (vr3): undefined + vector reg1128 (vr4): undefined + vector reg1129 (vr5): undefined + vector reg1130 (vr6): undefined + vector reg1131 (vr7): undefined + vector reg1132 (vr8): undefined + vector reg1133 (vr9): undefined + vector reg1134 (vr10): undefined + vector reg1135 (vr11): undefined + vector reg1136 (vr12): undefined + vector reg1137 (vr13): undefined + vector reg1138 (vr14): undefined + vector reg1139 (vr15): undefined + vector reg1140 (vr16): undefined + vector reg1141 (vr17): undefined + vector reg1142 (vr18): undefined + vector reg1143 (vr19): undefined + vector reg1144 (vr20): undefined + vector reg1145 (vr21): undefined + vector reg1146 (vr22): undefined + vector reg1147 (vr23): undefined + vector reg1148 (vr24): undefined + vector reg1149 (vr25): undefined + vector reg1150 (vr26): undefined + vector reg1151 (vr27): undefined + vector reg1152 (vr28): undefined + vector reg1153 (vr29): undefined + vector reg1154 (vr30): undefined + vector reg1155 (vr31): undefined +dwarf_cfi_addrframe (.debug_frame): no matching address range +EOF + # EM_PPC64 (function bar 0x00000000100005b0) # Note. Only in .debug_frame, not in .eh_frame. # Same as testfileppc32 but without -m32. @@ -2648,3 +3672,78 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range FP/SIMD reg94 (v30): undefined FP/SIMD reg95 (v31): undefined EOF + +# EM_X86_64/ELFCLASS32 (function bar 0x00400390) +# +# Note. Only in .eh_frame, there is no .debug_frame. +# Same as PPC above but with -mx32. +testfiles testfile-x32 +testrun_compare ${abs_builddir}/addrcfi -e testfile-x32 0x00400390 <<\EOF +.eh_frame has 0x400390 => [0x400390, 0x40039c): + return address in reg16 + CFA location expression: bregx(7,8) + integer reg0 (%rax): same_value + integer reg1 (%rdx): undefined + integer reg2 (%rcx): undefined + integer reg3 (%rbx): undefined + integer reg4 (%rsi): undefined + integer reg5 (%rdi): undefined + integer reg6 (%rbp): same_value + integer reg7 (%rsp): location expression: call_frame_cfa stack_value + integer reg8 (%r8): undefined + integer reg9 (%r9): undefined + integer reg10 (%r10): undefined + integer reg11 (%r11): undefined + integer reg12 (%r12): same_value + integer reg13 (%r13): same_value + integer reg14 (%r14): same_value + integer reg15 (%r15): same_value + integer reg16 (%rip): location expression: call_frame_cfa plus_uconst(-8) + SSE reg17 (%xmm0): undefined + SSE reg18 (%xmm1): undefined + SSE reg19 (%xmm2): undefined + SSE reg20 (%xmm3): undefined + SSE reg21 (%xmm4): undefined + SSE reg22 (%xmm5): undefined + SSE reg23 (%xmm6): undefined + SSE reg24 (%xmm7): undefined + SSE reg25 (%xmm8): undefined + SSE reg26 (%xmm9): undefined + SSE reg27 (%xmm10): undefined + SSE reg28 (%xmm11): undefined + SSE reg29 (%xmm12): undefined + SSE reg30 (%xmm13): undefined + SSE reg31 (%xmm14): undefined + SSE reg32 (%xmm15): undefined + x87 reg33 (%st0): undefined + x87 reg34 (%st1): undefined + x87 reg35 (%st2): undefined + x87 reg36 (%st3): undefined + x87 reg37 (%st4): undefined + x87 reg38 (%st5): undefined + x87 reg39 (%st6): undefined + x87 reg40 (%st7): undefined + MMX reg41 (%mm0): undefined + MMX reg42 (%mm1): undefined + MMX reg43 (%mm2): undefined + MMX reg44 (%mm3): undefined + MMX reg45 (%mm4): undefined + MMX reg46 (%mm5): undefined + MMX reg47 (%mm6): undefined + MMX reg48 (%mm7): undefined + integer reg49 (%rflags): undefined + segment reg50 (%es): undefined + segment reg51 (%cs): undefined + segment reg52 (%ss): undefined + segment reg53 (%ds): undefined + segment reg54 (%fs): undefined + segment reg55 (%gs): undefined + segment reg58 (%fs.base): undefined + segment reg59 (%gs.base): undefined + control reg62 (%tr): undefined + control reg63 (%ldtr): undefined + control reg64 (%mxcsr): undefined + control reg65 (%fcw): undefined + control reg66 (%fsw): undefined +handle_cfi no CFI (.debug_frame): no error +EOF diff --git a/tests/run-addrname-test.sh b/tests/run-addrname-test.sh index f954ee4..90e19df 100755 --- a/tests/run-addrname-test.sh +++ b/tests/run-addrname-test.sh @@ -277,7 +277,7 @@ EOF # local l0local2, 0 # offset 12 testfiles testfile64 -testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF +testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile64 1 4 5 8 9 c <<\EOF gglobal2 ??:0 g0global2 diff --git a/tests/run-addrscopes.sh b/tests/run-addrscopes.sh index 4f5c9d7..8f1bf0e 100755 --- a/tests/run-addrscopes.sh +++ b/tests/run-addrscopes.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2005, 2014 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -21,9 +21,9 @@ testfiles testfile22 testrun_compare ${abs_builddir}/addrscopes -e testfile22 0x8048353 <<\EOF 0x8048353: - tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837e (tests/foo.c:16) + tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837c (tests/foo.c:16) global [ be] - function (0x2e): 0x8048348 (tests/foo.c:5) .. 0x804835b (tests/foo.c:14) + function (0x2e): 0x8048348 (tests/foo.c:5) .. 0x8048359 (tests/foo.c:11) local [ 8f] EOF @@ -32,8 +32,8 @@ test_cleanup testfiles testfile24 testrun_compare ${abs_builddir}/addrscopes -e testfile24 0x804834e <<\EOF 0x804834e: - inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048364 (/home/roland/build/stock-elfutils/inline-test.c:16) - add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x8048350 (/home/roland/build/stock-elfutils/inline-test.c:9) + inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048360 (/home/roland/build/stock-elfutils/inline-test.c:16) + add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x804834f y [ 9d] x [ a2] x (abstract) diff --git a/tests/run-aggregate-size.sh b/tests/run-aggregate-size.sh new file mode 100755 index 0000000..42b0742 --- /dev/null +++ b/tests/run-aggregate-size.sh @@ -0,0 +1,105 @@ +#! /bin/sh +# Copyright (C) 2014 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# char c; +# int i; +# long l; +# +# void *v; +# +# struct s +# { +# char *a; +# int i; +# } s; +# +# char ca[16]; +# int ia[32]; +# void *va[64]; +# struct s sa[8]; + +# On x86_64 (LP64): +# gcc -g -c -o testfile-sizes1.o sizes.c +# clang -g -c -o testfile-sizes2.o sizes.c + +# const char c; +# volatile int i; +# const volatile long l; +# +# void * restrict v; +# +# struct s +# { +# const char *a; +# volatile int i; +# } s; +# +# const char ca[16]; +# volatile int ia[32]; +# const volatile void * const volatile restrict va[64]; +# struct s sa[8]; +# +# typedef const int foo; +# typedef volatile foo bar; +# foo f; +# bar b; +# +# gcc -std=c99 -g -c -o testfile-sizes3.o sizes.c + +testfiles testfile-sizes1.o testfile-sizes2.o testfile-sizes3.o + +testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes1.o <<\EOF +c size 1 +i size 4 +l size 8 +v size 8 +s size 16 +ca size 16 +ia size 128 +va size 512 +sa size 128 +EOF + +testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes2.o <<\EOF +c size 1 +i size 4 +l size 8 +v size 8 +s size 16 +ca size 16 +ia size 128 +va size 512 +sa size 128 +EOF + +testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes3.o <<\EOF +c size 1 +i size 4 +l size 8 +v size 8 +s size 16 +ca size 16 +ia size 128 +va size 512 +sa size 128 +f size 4 +b size 4 +EOF + +exit 0 diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh index 6f3862e..1f86429 100755 --- a/tests/run-allregs.sh +++ b/tests/run-allregs.sh @@ -1,5 +1,6 @@ #! /bin/sh # Copyright (C) 2005, 2006, 2007, 2012, 2013 Red Hat, Inc. +# Copyright (C) H.J. Lu , 2015. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -2796,4 +2797,77 @@ FP/SIMD registers: 95: v31 (v31), unsigned 128 bits EOF +# See run-readelf-mixed-corenote.sh for instructions to regenerate +# this core file. +regs_test testfile-x32-core <<\EOF +integer registers: + 0: %rax (rax), signed 64 bits + 1: %rdx (rdx), signed 64 bits + 2: %rcx (rcx), signed 64 bits + 3: %rbx (rbx), signed 64 bits + 4: %rsi (rsi), signed 64 bits + 5: %rdi (rdi), signed 64 bits + 6: %rbp (rbp), address 64 bits + 7: %rsp (rsp), address 64 bits + 8: %r8 (r8), signed 64 bits + 9: %r9 (r9), signed 64 bits + 10: %r10 (r10), signed 64 bits + 11: %r11 (r11), signed 64 bits + 12: %r12 (r12), signed 64 bits + 13: %r13 (r13), signed 64 bits + 14: %r14 (r14), signed 64 bits + 15: %r15 (r15), signed 64 bits + 16: %rip (rip), address 64 bits + 49: %rflags (rflags), unsigned 64 bits +MMX registers: + 41: %mm0 (mm0), unsigned 64 bits + 42: %mm1 (mm1), unsigned 64 bits + 43: %mm2 (mm2), unsigned 64 bits + 44: %mm3 (mm3), unsigned 64 bits + 45: %mm4 (mm4), unsigned 64 bits + 46: %mm5 (mm5), unsigned 64 bits + 47: %mm6 (mm6), unsigned 64 bits + 48: %mm7 (mm7), unsigned 64 bits +SSE registers: + 17: %xmm0 (xmm0), unsigned 128 bits + 18: %xmm1 (xmm1), unsigned 128 bits + 19: %xmm2 (xmm2), unsigned 128 bits + 20: %xmm3 (xmm3), unsigned 128 bits + 21: %xmm4 (xmm4), unsigned 128 bits + 22: %xmm5 (xmm5), unsigned 128 bits + 23: %xmm6 (xmm6), unsigned 128 bits + 24: %xmm7 (xmm7), unsigned 128 bits + 25: %xmm8 (xmm8), unsigned 128 bits + 26: %xmm9 (xmm9), unsigned 128 bits + 27: %xmm10 (xmm10), unsigned 128 bits + 28: %xmm11 (xmm11), unsigned 128 bits + 29: %xmm12 (xmm12), unsigned 128 bits + 30: %xmm13 (xmm13), unsigned 128 bits + 31: %xmm14 (xmm14), unsigned 128 bits + 32: %xmm15 (xmm15), unsigned 128 bits +control registers: + 62: %tr (tr), unsigned 64 bits + 63: %ldtr (ldtr), unsigned 64 bits + 64: %mxcsr (mxcsr), unsigned 64 bits + 65: %fcw (fcw), unsigned 16 bits + 66: %fsw (fsw), unsigned 16 bits +segment registers: + 50: %es (es), unsigned 16 bits + 51: %cs (cs), unsigned 16 bits + 52: %ss (ss), unsigned 16 bits + 53: %ds (ds), unsigned 16 bits + 54: %fs (fs), unsigned 16 bits + 55: %gs (gs), unsigned 16 bits + 58: %fs.base (fs.base), address 64 bits + 59: %gs.base (gs.base), address 64 bits +x87 registers: + 33: %st0 (st0), float 80 bits + 34: %st1 (st1), float 80 bits + 35: %st2 (st2), float 80 bits + 36: %st3 (st3), float 80 bits + 37: %st4 (st4), float 80 bits + 38: %st5 (st5), float 80 bits + 39: %st6 (st6), float 80 bits + 40: %st7 (st7), float 80 bits +EOF exit 0 diff --git a/tests/run-backtrace-core-sparc.sh b/tests/run-backtrace-core-sparc.sh new file mode 100755 index 0000000..60399ba --- /dev/null +++ b/tests/run-backtrace-core-sparc.sh @@ -0,0 +1,20 @@ +#! /bin/bash +# Copyright (C) 2015 Oracle, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +check_core sparc diff --git a/tests/run-backtrace-core-x32.sh b/tests/run-backtrace-core-x32.sh new file mode 100755 index 0000000..2ad76bc --- /dev/null +++ b/tests/run-backtrace-core-x32.sh @@ -0,0 +1,23 @@ +#! /bin/bash +# Copyright (C) H.J. Lu , 2015. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +# backtrace.x32.exec is created by +# gcc -mx32 -static -o backtrace.x32.exec backtrace_child-backtrace-child.o -lpthread +# backtrace.x32.core was generated by running "backtrace.x32.exec --gencore" +check_core x32 diff --git a/tests/run-backtrace-demangle.sh b/tests/run-backtrace-demangle.sh index 6e18e77..2d25324 100755 --- a/tests/run-backtrace-demangle.sh +++ b/tests/run-backtrace-demangle.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2014 Red Hat, Inc. +# Copyright (C) 2014, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -16,6 +16,7 @@ # along with this program. If not, see . if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then + echo "demangler unsupported" exit 77 fi @@ -25,6 +26,11 @@ child=testfile-backtrace-demangle testfiles $child{,.core} tempfiles $child.{bt,err} +# Disable valgrind while dumping because of a bug unmapping libc.so. +# https://bugs.kde.org/show_bug.cgi?id=327427 +SAVED_VALGRIND_CMD="$VALGRIND_CMD" +unset VALGRIND_CMD + # There can be more than 3 frames, but depending on the system/installed # glibc we might not be able to unwind fully till the end. # cxxfunc -> f -> main @@ -32,6 +38,12 @@ tempfiles $child.{bt,err} # (exit code 1) testrun ${abs_top_builddir}/src/stack -n 2 -e $child --core $child.core >$child.bt 2>$child.err || exitcode=$? cat $child.{bt,err} + +if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then + VALGRIND_CMD="$SAVED_VALGRIND_CMD" + export VALGRIND_CMD +fi + if test $exitcode != 1 || ! grep "shown max number of frames" $child.err; then echo >&2 $2: expected more than 2 frames false diff --git a/tests/run-backtrace-native-biarch.sh b/tests/run-backtrace-native-biarch.sh index 3a407c8..2afe38a 100755 --- a/tests/run-backtrace-native-biarch.sh +++ b/tests/run-backtrace-native-biarch.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -16,6 +16,7 @@ # along with this program. If not, see . if test -n "$ELFUTILS_DISABLE_BIARCH"; then + echo "biarch testing disabled" exit 77 fi diff --git a/tests/run-backtrace-native-core-biarch.sh b/tests/run-backtrace-native-core-biarch.sh index fbd8025..02552ce 100755 --- a/tests/run-backtrace-native-core-biarch.sh +++ b/tests/run-backtrace-native-core-biarch.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -16,6 +16,7 @@ # along with this program. If not, see . if test -n "$ELFUTILS_DISABLE_BIARCH"; then + echo "biarch testing disabled" exit 77 fi diff --git a/tests/run-compress-test.sh b/tests/run-compress-test.sh new file mode 100755 index 0000000..a6a298f --- /dev/null +++ b/tests/run-compress-test.sh @@ -0,0 +1,102 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# uncompress -> gnucompress -> uncompress -> elfcompress -> uncompress +testrun_elfcompress_file() +{ + infile="$1" + uncompressedfile="${infile}.uncompressed" + tempfiles "$uncompressedfile" + + echo "uncompress $infile -> $uncompressedfile" + testrun ${abs_top_builddir}/src/elfcompress -v -t none -o ${uncompressedfile} ${infile} + testrun ${abs_top_builddir}/src/elflint --gnu-ld ${uncompressedfile} + + SIZE_uncompressed=$(stat -c%s $uncompressedfile) + + gnucompressedfile="${infile}.gnu" + tempfiles "$gnucompressedfile" + echo "compress gnu $uncompressedfile -> $gnucompressedfile" + testrun ${abs_top_builddir}/src/elfcompress -v -t gnu -o ${gnucompressedfile} ${uncompressedfile} + testrun ${abs_top_builddir}/src/elflint --gnu-ld ${gnucompressedfile} + + SIZE_gnucompressed=$(stat -c%s $gnucompressedfile) + test $SIZE_gnucompressed -lt $SIZE_uncompressed || + { echo "*** failure $gnucompressedfile not smaller"; exit -1; } + + gnuuncompressedfile="${infile}.gnu.uncompressed" + tempfiles "$gnuuncompressedfile" + echo "uncompress $gnucompressedfile -> $gnuuncompressedfile" + testrun ${abs_top_builddir}/src/elfcompress -v -t none -o ${gnuuncompressedfile} ${gnucompressedfile} + testrun ${abs_top_builddir}/src/elfcmp ${uncompressedfile} ${gnuuncompressedfile} + + elfcompressedfile="${infile}.gabi" + tempfiles "$elfcompressedfile" + echo "compress gabi $uncompressedfile -> $elfcompressedfile" + testrun ${abs_top_builddir}/src/elfcompress -v -t zlib -o ${elfcompressedfile} ${uncompressedfile} + testrun ${abs_top_builddir}/src/elflint --gnu-ld ${elfcompressedfile} + + SIZE_elfcompressed=$(stat -c%s $elfcompressedfile) + test $SIZE_elfcompressed -lt $SIZE_uncompressed || + { echo "*** failure $elfcompressedfile not smaller"; exit -1; } + + elfuncompressedfile="${infile}.gabi.uncompressed" + tempfiles "$elfuncompressedfile" + echo "uncompress $elfcompressedfile -> $elfuncompressedfile" + testrun ${abs_top_builddir}/src/elfcompress -v -t none -o ${elfuncompressedfile} ${elfcompressedfile} + testrun ${abs_top_builddir}/src/elfcmp ${uncompressedfile} ${elfuncompressedfile} +} + +testrun_elfcompress() +{ + testfile="$1" + testfiles ${testfile} + testrun_elfcompress_file ${testfile} + + # Merge the string tables to make things a little more interesting. + mergedfile="${testfile}.merged" + tempfiles ${mergedfile} + echo "merging string tables ${testfile} -> ${mergedfile}" + testrun ${abs_top_builddir}/tests/elfstrmerge -o ${mergedfile} ${testfile} + testrun_elfcompress_file ${mergedfile} +} + +# Random ELF32 testfile +testrun_elfcompress testfile4 + +# Random ELF64 testfile +testrun_elfcompress testfile12 + +# Random ELF64BE testfile +testrun_elfcompress testfileppc64 + +# Random ELF32BE testfile +testrun_elfcompress testfileppc32 + +# Already compressed files +testrun_elfcompress testfile-zgnu64 +testrun_elfcompress testfile-zgnu64be +testrun_elfcompress testfile-zgabi64 +testrun_elfcompress testfile-zgabi64be +testrun_elfcompress testfile-zgnu32 +testrun_elfcompress testfile-zgnu32be +testrun_elfcompress testfile-zgabi32 +testrun_elfcompress testfile-zgabi32be + +exit 0 diff --git a/tests/run-deleted.sh b/tests/run-deleted.sh new file mode 100755 index 0000000..0f64762 --- /dev/null +++ b/tests/run-deleted.sh @@ -0,0 +1,52 @@ +#! /bin/bash +# Copyright (C) 2014 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +tempfiles deleted deleted-lib.so +cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so . + +# We don't want to run the deleted process under valgrind then +# stack will see the valgrind process backtrace. +OLD_VALGRIND_CMD="$VALGRIND_CMD" +unset VALGRIND_CMD + +pid=$(testrun ${abs_builddir}/deleted) +sleep 1 +rm -f deleted deleted-lib.so +tempfiles bt bt.err + +set VALGRIND_CMD="$OLD_VALGRIND_CMD" +# It may have non-zero exit code with: +# .../elfutils/src/stack: dwfl_thread_getframes tid 26376 at 0x4006c8 in .../elfutils/tests/deleted: no matching address range +testrun ${abs_top_builddir}/src/stack -p $pid 1>bt 2>bt.err || true +cat bt bt.err +kill -9 $pid +wait +check_native_unsupported bt.err deleted +if grep -q -E ': dwfl_linux_proc_attach pid ([[:digit:]]+): Function not implemented$' bt.err; then + echo >&2 deleted: OS not supported + exit 77 +fi +# For PPC64 we need access to the OPD table which we get through the shdrs +# (see backends/ppc64_init.c) but for the deleted-lib we only have phdrs. +# So we don't have the name of the function. But since we should find +# the EH_FRAME through phdrs just fine, we can unwind into main. +if test "`uname -m`" != "ppc64"; then + grep -qw libfunc bt +fi +grep -qw main bt diff --git a/tests/run-dwarf-getmacros.sh b/tests/run-dwarf-getmacros.sh index ddb58e8..0a488fa 100755 --- a/tests/run-dwarf-getmacros.sh +++ b/tests/run-dwarf-getmacros.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2009 Red Hat, Inc. +# Copyright (C) 2009, 2014 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -20,103 +20,294 @@ testfiles testfile51 testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0xb <<\EOF +file /home/petr/proj/elfutils/pending/elfutils/tests/decom/x.c + __STDC__ 1 + __STDC_HOSTED__ 1 + __GNUC__ 4 + __GNUC_MINOR__ 3 + __GNUC_PATCHLEVEL__ 2 + __GNUC_RH_RELEASE__ 7 + __SIZE_TYPE__ long unsigned int + __PTRDIFF_TYPE__ long int + __WCHAR_TYPE__ int + __WINT_TYPE__ unsigned int + __INTMAX_TYPE__ long int + __UINTMAX_TYPE__ long unsigned int + __GXX_ABI_VERSION 1002 + __SCHAR_MAX__ 127 + __SHRT_MAX__ 32767 + __INT_MAX__ 2147483647 + __LONG_MAX__ 9223372036854775807L + __LONG_LONG_MAX__ 9223372036854775807LL + __WCHAR_MAX__ 2147483647 + __CHAR_BIT__ 8 + __INTMAX_MAX__ 9223372036854775807L + __FLT_EVAL_METHOD__ 0 + __DEC_EVAL_METHOD__ 2 + __FLT_RADIX__ 2 + __FLT_MANT_DIG__ 24 + __FLT_DIG__ 6 + __FLT_MIN_EXP__ (-125) + __FLT_MIN_10_EXP__ (-37) + __FLT_MAX_EXP__ 128 + __FLT_MAX_10_EXP__ 38 + __FLT_MAX__ 3.40282347e+38F + __FLT_MIN__ 1.17549435e-38F + __FLT_EPSILON__ 1.19209290e-7F + __FLT_DENORM_MIN__ 1.40129846e-45F + __FLT_HAS_DENORM__ 1 + __FLT_HAS_INFINITY__ 1 + __FLT_HAS_QUIET_NAN__ 1 + __DBL_MANT_DIG__ 53 + __DBL_DIG__ 15 + __DBL_MIN_EXP__ (-1021) + __DBL_MIN_10_EXP__ (-307) + __DBL_MAX_EXP__ 1024 + __DBL_MAX_10_EXP__ 308 + __DBL_MAX__ 1.7976931348623157e+308 + __DBL_MIN__ 2.2250738585072014e-308 + __DBL_EPSILON__ 2.2204460492503131e-16 + __DBL_DENORM_MIN__ 4.9406564584124654e-324 + __DBL_HAS_DENORM__ 1 + __DBL_HAS_INFINITY__ 1 + __DBL_HAS_QUIET_NAN__ 1 + __LDBL_MANT_DIG__ 64 + __LDBL_DIG__ 18 + __LDBL_MIN_EXP__ (-16381) + __LDBL_MIN_10_EXP__ (-4931) + __LDBL_MAX_EXP__ 16384 + __LDBL_MAX_10_EXP__ 4932 + __DECIMAL_DIG__ 21 + __LDBL_MAX__ 1.18973149535723176502e+4932L + __LDBL_MIN__ 3.36210314311209350626e-4932L + __LDBL_EPSILON__ 1.08420217248550443401e-19L + __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L + __LDBL_HAS_DENORM__ 1 + __LDBL_HAS_INFINITY__ 1 + __LDBL_HAS_QUIET_NAN__ 1 + __DEC32_MANT_DIG__ 7 + __DEC32_MIN_EXP__ (-95) + __DEC32_MAX_EXP__ 96 + __DEC32_MIN__ 1E-95DF + __DEC32_MAX__ 9.999999E96DF + __DEC32_EPSILON__ 1E-6DF + __DEC32_DEN__ 0.000001E-95DF + __DEC64_MANT_DIG__ 16 + __DEC64_MIN_EXP__ (-383) + __DEC64_MAX_EXP__ 384 + __DEC64_MIN__ 1E-383DD + __DEC64_MAX__ 9.999999999999999E384DD + __DEC64_EPSILON__ 1E-15DD + __DEC64_DEN__ 0.000000000000001E-383DD + __DEC128_MANT_DIG__ 34 + __DEC128_MIN_EXP__ (-6143) + __DEC128_MAX_EXP__ 6144 + __DEC128_MIN__ 1E-6143DL + __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL + __DEC128_EPSILON__ 1E-33DL + __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL + __REGISTER_PREFIX__ + __USER_LABEL_PREFIX__ + __VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" + __GNUC_GNU_INLINE__ 1 + _LP64 1 + __LP64__ 1 + __NO_INLINE__ 1 + __FINITE_MATH_ONLY__ 0 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 + __SIZEOF_INT__ 4 + __SIZEOF_LONG__ 8 + __SIZEOF_LONG_LONG__ 8 + __SIZEOF_SHORT__ 2 + __SIZEOF_FLOAT__ 4 + __SIZEOF_DOUBLE__ 8 + __SIZEOF_LONG_DOUBLE__ 16 + __SIZEOF_SIZE_T__ 8 + __SIZEOF_WCHAR_T__ 4 + __SIZEOF_WINT_T__ 4 + __SIZEOF_PTRDIFF_T__ 8 + __SIZEOF_POINTER__ 8 + __amd64 1 + __amd64__ 1 + __x86_64 1 + __x86_64__ 1 + __k8 1 + __k8__ 1 + __MMX__ 1 + __SSE__ 1 + __SSE2__ 1 + __SSE_MATH__ 1 + __SSE2_MATH__ 1 + __gnu_linux__ 1 + __linux 1 + __linux__ 1 + linux 1 + __unix 1 + __unix__ 1 + unix 1 + __ELF__ 1 + __DECIMAL_BID_FORMAT__ 1 + macro1 ble +/file +EOF + +testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0x84 <<\EOF +file /home/petr/proj/elfutils/pending/elfutils/tests/decom/y.c + __STDC__ 1 + __STDC_HOSTED__ 1 + __GNUC__ 4 + __GNUC_MINOR__ 3 + __GNUC_PATCHLEVEL__ 2 + __GNUC_RH_RELEASE__ 7 + __SIZE_TYPE__ long unsigned int + __PTRDIFF_TYPE__ long int + __WCHAR_TYPE__ int + __WINT_TYPE__ unsigned int + __INTMAX_TYPE__ long int + __UINTMAX_TYPE__ long unsigned int + __GXX_ABI_VERSION 1002 + __SCHAR_MAX__ 127 + __SHRT_MAX__ 32767 + __INT_MAX__ 2147483647 + __LONG_MAX__ 9223372036854775807L + __LONG_LONG_MAX__ 9223372036854775807LL + __WCHAR_MAX__ 2147483647 + __CHAR_BIT__ 8 + __INTMAX_MAX__ 9223372036854775807L + __FLT_EVAL_METHOD__ 0 + __DEC_EVAL_METHOD__ 2 + __FLT_RADIX__ 2 + __FLT_MANT_DIG__ 24 + __FLT_DIG__ 6 + __FLT_MIN_EXP__ (-125) + __FLT_MIN_10_EXP__ (-37) + __FLT_MAX_EXP__ 128 + __FLT_MAX_10_EXP__ 38 + __FLT_MAX__ 3.40282347e+38F + __FLT_MIN__ 1.17549435e-38F + __FLT_EPSILON__ 1.19209290e-7F + __FLT_DENORM_MIN__ 1.40129846e-45F + __FLT_HAS_DENORM__ 1 + __FLT_HAS_INFINITY__ 1 + __FLT_HAS_QUIET_NAN__ 1 + __DBL_MANT_DIG__ 53 + __DBL_DIG__ 15 + __DBL_MIN_EXP__ (-1021) + __DBL_MIN_10_EXP__ (-307) + __DBL_MAX_EXP__ 1024 + __DBL_MAX_10_EXP__ 308 + __DBL_MAX__ 1.7976931348623157e+308 + __DBL_MIN__ 2.2250738585072014e-308 + __DBL_EPSILON__ 2.2204460492503131e-16 + __DBL_DENORM_MIN__ 4.9406564584124654e-324 + __DBL_HAS_DENORM__ 1 + __DBL_HAS_INFINITY__ 1 + __DBL_HAS_QUIET_NAN__ 1 + __LDBL_MANT_DIG__ 64 + __LDBL_DIG__ 18 + __LDBL_MIN_EXP__ (-16381) + __LDBL_MIN_10_EXP__ (-4931) + __LDBL_MAX_EXP__ 16384 + __LDBL_MAX_10_EXP__ 4932 + __DECIMAL_DIG__ 21 + __LDBL_MAX__ 1.18973149535723176502e+4932L + __LDBL_MIN__ 3.36210314311209350626e-4932L + __LDBL_EPSILON__ 1.08420217248550443401e-19L + __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L + __LDBL_HAS_DENORM__ 1 + __LDBL_HAS_INFINITY__ 1 + __LDBL_HAS_QUIET_NAN__ 1 + __DEC32_MANT_DIG__ 7 + __DEC32_MIN_EXP__ (-95) + __DEC32_MAX_EXP__ 96 + __DEC32_MIN__ 1E-95DF + __DEC32_MAX__ 9.999999E96DF + __DEC32_EPSILON__ 1E-6DF + __DEC32_DEN__ 0.000001E-95DF + __DEC64_MANT_DIG__ 16 + __DEC64_MIN_EXP__ (-383) + __DEC64_MAX_EXP__ 384 + __DEC64_MIN__ 1E-383DD + __DEC64_MAX__ 9.999999999999999E384DD + __DEC64_EPSILON__ 1E-15DD + __DEC64_DEN__ 0.000000000000001E-383DD + __DEC128_MANT_DIG__ 34 + __DEC128_MIN_EXP__ (-6143) + __DEC128_MAX_EXP__ 6144 + __DEC128_MIN__ 1E-6143DL + __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL + __DEC128_EPSILON__ 1E-33DL + __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL + __REGISTER_PREFIX__ + __USER_LABEL_PREFIX__ + __VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" + __GNUC_GNU_INLINE__ 1 + _LP64 1 + __LP64__ 1 + __NO_INLINE__ 1 + __FINITE_MATH_ONLY__ 0 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 + __SIZEOF_INT__ 4 + __SIZEOF_LONG__ 8 + __SIZEOF_LONG_LONG__ 8 + __SIZEOF_SHORT__ 2 + __SIZEOF_FLOAT__ 4 + __SIZEOF_DOUBLE__ 8 + __SIZEOF_LONG_DOUBLE__ 16 + __SIZEOF_SIZE_T__ 8 + __SIZEOF_WCHAR_T__ 4 + __SIZEOF_WINT_T__ 4 + __SIZEOF_PTRDIFF_T__ 8 + __SIZEOF_POINTER__ 8 + __amd64 1 + __amd64__ 1 + __x86_64 1 + __x86_64__ 1 + __k8 1 + __k8__ 1 + __MMX__ 1 + __SSE__ 1 + __SSE2__ 1 + __SSE_MATH__ 1 + __SSE2_MATH__ 1 + __gnu_linux__ 1 + __linux 1 + __linux__ 1 + linux 1 + __unix 1 + __unix__ 1 + unix 1 + __ELF__ 1 + __DECIMAL_BID_FORMAT__ 1 + macro2 ble +/file +EOF + +testfiles testfile-macros + +testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros 0xb <<\EOF __STDC__ 1 __STDC_HOSTED__ 1 __GNUC__ 4 -__GNUC_MINOR__ 3 -__GNUC_PATCHLEVEL__ 2 -__GNUC_RH_RELEASE__ 7 -__SIZE_TYPE__ long unsigned int -__PTRDIFF_TYPE__ long int -__WCHAR_TYPE__ int -__WINT_TYPE__ unsigned int -__INTMAX_TYPE__ long int -__UINTMAX_TYPE__ long unsigned int -__GXX_ABI_VERSION 1002 -__SCHAR_MAX__ 127 -__SHRT_MAX__ 32767 -__INT_MAX__ 2147483647 -__LONG_MAX__ 9223372036854775807L -__LONG_LONG_MAX__ 9223372036854775807LL -__WCHAR_MAX__ 2147483647 -__CHAR_BIT__ 8 -__INTMAX_MAX__ 9223372036854775807L -__FLT_EVAL_METHOD__ 0 -__DEC_EVAL_METHOD__ 2 -__FLT_RADIX__ 2 -__FLT_MANT_DIG__ 24 -__FLT_DIG__ 6 -__FLT_MIN_EXP__ (-125) -__FLT_MIN_10_EXP__ (-37) -__FLT_MAX_EXP__ 128 -__FLT_MAX_10_EXP__ 38 -__FLT_MAX__ 3.40282347e+38F -__FLT_MIN__ 1.17549435e-38F -__FLT_EPSILON__ 1.19209290e-7F -__FLT_DENORM_MIN__ 1.40129846e-45F -__FLT_HAS_DENORM__ 1 -__FLT_HAS_INFINITY__ 1 -__FLT_HAS_QUIET_NAN__ 1 -__DBL_MANT_DIG__ 53 -__DBL_DIG__ 15 -__DBL_MIN_EXP__ (-1021) -__DBL_MIN_10_EXP__ (-307) -__DBL_MAX_EXP__ 1024 -__DBL_MAX_10_EXP__ 308 -__DBL_MAX__ 1.7976931348623157e+308 -__DBL_MIN__ 2.2250738585072014e-308 -__DBL_EPSILON__ 2.2204460492503131e-16 -__DBL_DENORM_MIN__ 4.9406564584124654e-324 -__DBL_HAS_DENORM__ 1 -__DBL_HAS_INFINITY__ 1 -__DBL_HAS_QUIET_NAN__ 1 -__LDBL_MANT_DIG__ 64 -__LDBL_DIG__ 18 -__LDBL_MIN_EXP__ (-16381) -__LDBL_MIN_10_EXP__ (-4931) -__LDBL_MAX_EXP__ 16384 -__LDBL_MAX_10_EXP__ 4932 -__DECIMAL_DIG__ 21 -__LDBL_MAX__ 1.18973149535723176502e+4932L -__LDBL_MIN__ 3.36210314311209350626e-4932L -__LDBL_EPSILON__ 1.08420217248550443401e-19L -__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L -__LDBL_HAS_DENORM__ 1 -__LDBL_HAS_INFINITY__ 1 -__LDBL_HAS_QUIET_NAN__ 1 -__DEC32_MANT_DIG__ 7 -__DEC32_MIN_EXP__ (-95) -__DEC32_MAX_EXP__ 96 -__DEC32_MIN__ 1E-95DF -__DEC32_MAX__ 9.999999E96DF -__DEC32_EPSILON__ 1E-6DF -__DEC32_DEN__ 0.000001E-95DF -__DEC64_MANT_DIG__ 16 -__DEC64_MIN_EXP__ (-383) -__DEC64_MAX_EXP__ 384 -__DEC64_MIN__ 1E-383DD -__DEC64_MAX__ 9.999999999999999E384DD -__DEC64_EPSILON__ 1E-15DD -__DEC64_DEN__ 0.000000000000001E-383DD -__DEC128_MANT_DIG__ 34 -__DEC128_MIN_EXP__ (-6143) -__DEC128_MAX_EXP__ 6144 -__DEC128_MIN__ 1E-6143DL -__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -__DEC128_EPSILON__ 1E-33DL -__DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL -__REGISTER_PREFIX__ -__USER_LABEL_PREFIX__ -__VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" -__GNUC_GNU_INLINE__ 1 +__GNUC_MINOR__ 7 +__GNUC_PATCHLEVEL__ 0 +__VERSION__ "4.7.0 20120507 (Red Hat 4.7.0-5)" +__GNUC_RH_RELEASE__ 5 +__ATOMIC_RELAXED 0 +__ATOMIC_SEQ_CST 5 +__ATOMIC_ACQUIRE 2 +__ATOMIC_RELEASE 3 +__ATOMIC_ACQ_REL 4 +__ATOMIC_CONSUME 1 +__FINITE_MATH_ONLY__ 0 _LP64 1 __LP64__ 1 -__NO_INLINE__ 1 -__FINITE_MATH_ONLY__ 0 -__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 __SIZEOF_INT__ 4 __SIZEOF_LONG__ 8 __SIZEOF_LONG_LONG__ 8 @@ -125,46 +316,49 @@ __SIZEOF_FLOAT__ 4 __SIZEOF_DOUBLE__ 8 __SIZEOF_LONG_DOUBLE__ 16 __SIZEOF_SIZE_T__ 8 -__SIZEOF_WCHAR_T__ 4 -__SIZEOF_WINT_T__ 4 -__SIZEOF_PTRDIFF_T__ 8 +__CHAR_BIT__ 8 +__BIGGEST_ALIGNMENT__ 16 +__ORDER_LITTLE_ENDIAN__ 1234 +__ORDER_BIG_ENDIAN__ 4321 +__ORDER_PDP_ENDIAN__ 3412 +__BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +__FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ __SIZEOF_POINTER__ 8 -__amd64 1 -__amd64__ 1 -__x86_64 1 -__x86_64__ 1 -__k8 1 -__k8__ 1 -__MMX__ 1 -__SSE__ 1 -__SSE2__ 1 -__SSE_MATH__ 1 -__SSE2_MATH__ 1 -__gnu_linux__ 1 -__linux 1 -__linux__ 1 -linux 1 -__unix 1 -__unix__ 1 -unix 1 -__ELF__ 1 -__DECIMAL_BID_FORMAT__ 1 -macro1 ble -EOF - -testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0x84 <<\EOF -__STDC__ 1 -__STDC_HOSTED__ 1 -__GNUC__ 4 -__GNUC_MINOR__ 3 -__GNUC_PATCHLEVEL__ 2 -__GNUC_RH_RELEASE__ 7 __SIZE_TYPE__ long unsigned int __PTRDIFF_TYPE__ long int __WCHAR_TYPE__ int __WINT_TYPE__ unsigned int __INTMAX_TYPE__ long int __UINTMAX_TYPE__ long unsigned int +__CHAR16_TYPE__ short unsigned int +__CHAR32_TYPE__ unsigned int +__SIG_ATOMIC_TYPE__ int +__INT8_TYPE__ signed char +__INT16_TYPE__ short int +__INT32_TYPE__ int +__INT64_TYPE__ long int +__UINT8_TYPE__ unsigned char +__UINT16_TYPE__ short unsigned int +__UINT32_TYPE__ unsigned int +__UINT64_TYPE__ long unsigned int +__INT_LEAST8_TYPE__ signed char +__INT_LEAST16_TYPE__ short int +__INT_LEAST32_TYPE__ int +__INT_LEAST64_TYPE__ long int +__UINT_LEAST8_TYPE__ unsigned char +__UINT_LEAST16_TYPE__ short unsigned int +__UINT_LEAST32_TYPE__ unsigned int +__UINT_LEAST64_TYPE__ long unsigned int +__INT_FAST8_TYPE__ signed char +__INT_FAST16_TYPE__ long int +__INT_FAST32_TYPE__ long int +__INT_FAST64_TYPE__ long int +__UINT_FAST8_TYPE__ unsigned char +__UINT_FAST16_TYPE__ long unsigned int +__UINT_FAST32_TYPE__ long unsigned int +__UINT_FAST64_TYPE__ long unsigned int +__INTPTR_TYPE__ long int +__UINTPTR_TYPE__ long unsigned int __GXX_ABI_VERSION 1002 __SCHAR_MAX__ 127 __SHRT_MAX__ 32767 @@ -172,8 +366,51 @@ __INT_MAX__ 2147483647 __LONG_MAX__ 9223372036854775807L __LONG_LONG_MAX__ 9223372036854775807LL __WCHAR_MAX__ 2147483647 -__CHAR_BIT__ 8 +__WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +__WINT_MAX__ 4294967295U +__WINT_MIN__ 0U +__PTRDIFF_MAX__ 9223372036854775807L +__SIZE_MAX__ 18446744073709551615UL __INTMAX_MAX__ 9223372036854775807L +__INTMAX_C(c) c ## L +__UINTMAX_MAX__ 18446744073709551615UL +__UINTMAX_C(c) c ## UL +__SIG_ATOMIC_MAX__ 2147483647 +__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +__INT8_MAX__ 127 +__INT16_MAX__ 32767 +__INT32_MAX__ 2147483647 +__INT64_MAX__ 9223372036854775807L +__UINT8_MAX__ 255 +__UINT16_MAX__ 65535 +__UINT32_MAX__ 4294967295U +__UINT64_MAX__ 18446744073709551615UL +__INT_LEAST8_MAX__ 127 +__INT8_C(c) c +__INT_LEAST16_MAX__ 32767 +__INT16_C(c) c +__INT_LEAST32_MAX__ 2147483647 +__INT32_C(c) c +__INT_LEAST64_MAX__ 9223372036854775807L +__INT64_C(c) c ## L +__UINT_LEAST8_MAX__ 255 +__UINT8_C(c) c +__UINT_LEAST16_MAX__ 65535 +__UINT16_C(c) c +__UINT_LEAST32_MAX__ 4294967295U +__UINT32_C(c) c ## U +__UINT_LEAST64_MAX__ 18446744073709551615UL +__UINT64_C(c) c ## UL +__INT_FAST8_MAX__ 127 +__INT_FAST16_MAX__ 9223372036854775807L +__INT_FAST32_MAX__ 9223372036854775807L +__INT_FAST64_MAX__ 9223372036854775807L +__UINT_FAST8_MAX__ 255 +__UINT_FAST16_MAX__ 18446744073709551615UL +__UINT_FAST32_MAX__ 18446744073709551615UL +__UINT_FAST64_MAX__ 18446744073709551615UL +__INTPTR_MAX__ 9223372036854775807L +__UINTPTR_MAX__ 18446744073709551615UL __FLT_EVAL_METHOD__ 0 __DEC_EVAL_METHOD__ 2 __FLT_RADIX__ 2 @@ -183,10 +420,11 @@ __FLT_MIN_EXP__ (-125) __FLT_MIN_10_EXP__ (-37) __FLT_MAX_EXP__ 128 __FLT_MAX_10_EXP__ 38 -__FLT_MAX__ 3.40282347e+38F -__FLT_MIN__ 1.17549435e-38F -__FLT_EPSILON__ 1.19209290e-7F -__FLT_DENORM_MIN__ 1.40129846e-45F +__FLT_DECIMAL_DIG__ 9 +__FLT_MAX__ 3.40282346638528859812e+38F +__FLT_MIN__ 1.17549435082228750797e-38F +__FLT_EPSILON__ 1.19209289550781250000e-7F +__FLT_DENORM_MIN__ 1.40129846432481707092e-45F __FLT_HAS_DENORM__ 1 __FLT_HAS_INFINITY__ 1 __FLT_HAS_QUIET_NAN__ 1 @@ -196,10 +434,11 @@ __DBL_MIN_EXP__ (-1021) __DBL_MIN_10_EXP__ (-307) __DBL_MAX_EXP__ 1024 __DBL_MAX_10_EXP__ 308 -__DBL_MAX__ 1.7976931348623157e+308 -__DBL_MIN__ 2.2250738585072014e-308 -__DBL_EPSILON__ 2.2204460492503131e-16 -__DBL_DENORM_MIN__ 4.9406564584124654e-324 +__DBL_DECIMAL_DIG__ 17 +__DBL_MAX__ ((double)1.79769313486231570815e+308L) +__DBL_MIN__ ((double)2.22507385850720138309e-308L) +__DBL_EPSILON__ ((double)2.22044604925031308085e-16L) +__DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) __DBL_HAS_DENORM__ 1 __DBL_HAS_INFINITY__ 1 __DBL_HAS_QUIET_NAN__ 1 @@ -218,50 +457,51 @@ __LDBL_HAS_DENORM__ 1 __LDBL_HAS_INFINITY__ 1 __LDBL_HAS_QUIET_NAN__ 1 __DEC32_MANT_DIG__ 7 -__DEC32_MIN_EXP__ (-95) -__DEC32_MAX_EXP__ 96 +__DEC32_MIN_EXP__ (-94) +__DEC32_MAX_EXP__ 97 __DEC32_MIN__ 1E-95DF __DEC32_MAX__ 9.999999E96DF __DEC32_EPSILON__ 1E-6DF -__DEC32_DEN__ 0.000001E-95DF +__DEC32_SUBNORMAL_MIN__ 0.000001E-95DF __DEC64_MANT_DIG__ 16 -__DEC64_MIN_EXP__ (-383) -__DEC64_MAX_EXP__ 384 +__DEC64_MIN_EXP__ (-382) +__DEC64_MAX_EXP__ 385 __DEC64_MIN__ 1E-383DD __DEC64_MAX__ 9.999999999999999E384DD __DEC64_EPSILON__ 1E-15DD -__DEC64_DEN__ 0.000000000000001E-383DD +__DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD __DEC128_MANT_DIG__ 34 -__DEC128_MIN_EXP__ (-6143) -__DEC128_MAX_EXP__ 6144 +__DEC128_MIN_EXP__ (-6142) +__DEC128_MAX_EXP__ 6145 __DEC128_MIN__ 1E-6143DL __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL __DEC128_EPSILON__ 1E-33DL -__DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL +__DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL __REGISTER_PREFIX__ __USER_LABEL_PREFIX__ -__VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" __GNUC_GNU_INLINE__ 1 -_LP64 1 -__LP64__ 1 __NO_INLINE__ 1 -__FINITE_MATH_ONLY__ 0 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -__SIZEOF_INT__ 4 -__SIZEOF_LONG__ 8 -__SIZEOF_LONG_LONG__ 8 -__SIZEOF_SHORT__ 2 -__SIZEOF_FLOAT__ 4 -__SIZEOF_DOUBLE__ 8 -__SIZEOF_LONG_DOUBLE__ 16 -__SIZEOF_SIZE_T__ 8 +__GCC_ATOMIC_BOOL_LOCK_FREE 2 +__GCC_ATOMIC_CHAR_LOCK_FREE 2 +__GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +__GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +__GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +__GCC_ATOMIC_SHORT_LOCK_FREE 2 +__GCC_ATOMIC_INT_LOCK_FREE 2 +__GCC_ATOMIC_LONG_LOCK_FREE 2 +__GCC_ATOMIC_LLONG_LOCK_FREE 2 +__GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +__GCC_ATOMIC_POINTER_LOCK_FREE 2 +__GCC_HAVE_DWARF2_CFI_ASM 1 +__PRAGMA_REDEFINE_EXTNAME 1 +__SIZEOF_INT128__ 16 __SIZEOF_WCHAR_T__ 4 __SIZEOF_WINT_T__ 4 __SIZEOF_PTRDIFF_T__ 8 -__SIZEOF_POINTER__ 8 __amd64 1 __amd64__ 1 __x86_64 1 @@ -282,7 +522,189 @@ __unix__ 1 unix 1 __ELF__ 1 __DECIMAL_BID_FORMAT__ 1 -macro2 ble +file /home/mark/src/tests/macro.c + file /usr/include/string.h + _STRING_H 1 + file /usr/include/features.h + include 0x5d8 + _FEATURES_H 1 + __KERNEL_STRICT_NAMES + __USE_ANSI 1 + __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) + _BSD_SOURCE 1 + _SVID_SOURCE 1 + _POSIX_SOURCE 1 + _POSIX_C_SOURCE 200809L + __USE_POSIX_IMPLICITLY 1 + __USE_POSIX 1 + __USE_POSIX2 1 + __USE_POSIX199309 1 + __USE_POSIX199506 1 + __USE_XOPEN2K 1 + __USE_ISOC95 1 + __USE_ISOC99 1 + __USE_XOPEN2K8 1 + _ATFILE_SOURCE 1 + __USE_MISC 1 + __USE_BSD 1 + __USE_SVID 1 + __USE_ATFILE 1 + __USE_FORTIFY_LEVEL 0 + /include + file /usr/include/stdc-predef.h + include 0x733 + _STDC_PREDEF_H 1 + __STDC_IEC_559__ 1 + __STDC_IEC_559_COMPLEX__ 1 + __STDC_ISO_10646__ 201103L + __STDC_NO_THREADS__ 1 + /include + /file + include 0x755 + __GNU_LIBRARY__ 6 + __GLIBC__ 2 + __GLIBC_MINOR__ 15 + __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + __GLIBC_HAVE_LONG_LONG 1 + /include + file /usr/include/sys/cdefs.h + include 0x783 + _SYS_CDEFS_H 1 + __LEAF , __leaf__ + __LEAF_ATTR __attribute__ ((__leaf__)) + __THROW __attribute__ ((__nothrow__ __LEAF)) + __THROWNL __attribute__ ((__nothrow__)) + __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct + __P(args) args + __PMT(args) args + __CONCAT(x,y) x ## y + __STRING(x) #x + __ptr_t void * + __long_double_t long double + __BEGIN_DECLS + __END_DECLS + __BEGIN_NAMESPACE_STD + __END_NAMESPACE_STD + __USING_NAMESPACE_STD(name) + __BEGIN_NAMESPACE_C99 + __END_NAMESPACE_C99 + __USING_NAMESPACE_C99(name) + __bounded + __unbounded + __ptrvalue + __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) + __bos0(ptr) __builtin_object_size (ptr, 0) + __fortify_function __extern_always_inline __attribute_artificial__ + __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) + __warnattr(msg) __attribute__((__warning__ (msg))) + __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) + __flexarr [] + __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) + __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW + __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL + __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) + __ASMNAME2(prefix,cname) __STRING (prefix) cname + __attribute_malloc__ __attribute__ ((__malloc__)) + __attribute_pure__ __attribute__ ((__pure__)) + __attribute_const__ __attribute__ ((__const__)) + __attribute_used__ __attribute__ ((__used__)) + __attribute_noinline__ __attribute__ ((__noinline__)) + __attribute_deprecated__ __attribute__ ((__deprecated__)) + __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) + __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) + __nonnull(params) __attribute__ ((__nonnull__ params)) + __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) + __wur + __always_inline __inline __attribute__ ((__always_inline__)) + __attribute_artificial__ __attribute__ ((__artificial__)) + __extern_inline extern __inline + __extern_always_inline extern __always_inline + __va_arg_pack() __builtin_va_arg_pack () + __va_arg_pack_len() __builtin_va_arg_pack_len () + __restrict_arr __restrict + __glibc_unlikely(cond) __builtin_expect((cond), 0) + /include + file /usr/include/bits/wordsize.h + include 0x8fa + __WORDSIZE 64 + __WORDSIZE_TIME64_COMPAT32 1 + __SYSCALL_WORDSIZE 64 + /include + /file + include 0x910 + __LDBL_REDIR1(name,proto,alias) name proto + __LDBL_REDIR(name,proto) name proto + __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW + __LDBL_REDIR_NTH(name,proto) name proto __THROW + __LDBL_REDIR_DECL(name) + __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) + __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) + /include + /file + file /usr/include/gnu/stubs.h + file /usr/include/gnu/stubs-64.h + include 0x945 + __stub_bdflush + __stub_chflags + __stub_fattach + __stub_fchflags + __stub_fdetach + __stub_getmsg + __stub_gtty + __stub_lchmod + __stub_putmsg + __stub_revoke + __stub_setlogin + __stub_sigreturn + __stub_sstk + __stub_stty + /include + /file + /file + /file + include 0x99d + __need_size_t + __need_NULL + /include + file /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/stddef.h + include 0x9ad + __size_t__ + __SIZE_T__ + _SIZE_T + _SYS_SIZE_T_H + _T_SIZE_ + _T_SIZE + __SIZE_T + _SIZE_T_ + _BSD_SIZE_T_ + _SIZE_T_DEFINED_ + _SIZE_T_DEFINED + _BSD_SIZE_T_DEFINED_ + _SIZE_T_DECLARED + ___int_size_t_h + _GCC_SIZE_T + _SIZET_ + __size_t + NULL ((void *)0) + /include + /file + file /usr/include/xlocale.h + _XLOCALE_H 1 + /file + /file + HELLO "world" +/file +EOF + +testfiles testfile-macros-0xff +testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros-0xff 0xb <<\EOF +invalid opcode +EOF +testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros-0xff 0xb '' <<\EOF +opcode 255 with 0 arguments +file /home/petr/proj/elfutils/master/elfutils/x.c + FOO 0 +/file EOF exit 0 diff --git a/tests/run-dwarf-ranges.sh b/tests/run-dwarf-ranges.sh new file mode 100755 index 0000000..d202ed3 --- /dev/null +++ b/tests/run-dwarf-ranges.sh @@ -0,0 +1,27 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +testfiles debug-ranges-no-lowpc.o + +testrun_compare ${abs_builddir}/dwarf-ranges debug-ranges-no-lowpc.o 0xb <<\EOF +1..2 (base 0) +3..4 (base 0) +EOF + +exit 0 diff --git a/tests/run-dwelfgnucompressed.sh b/tests/run-dwelfgnucompressed.sh new file mode 100755 index 0000000..b93a56f --- /dev/null +++ b/tests/run-dwelfgnucompressed.sh @@ -0,0 +1,108 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# = funcs.s = +# .globl testfunc +# testfunc: +# nop +# ret +# .type testfunc, @function +# .size testfunc, .-testfunc +# +# .globl testfunc2 +# testfunc2: +# call testfunc +# nop +# nop +# ret +# .type testfunc2, @function +# .size testfunc2, .-testfunc2 +# +# .globl functest3 +# functest3: +# jmp local +# nop +# nop +# local: +# call testfunc2 +# ret +# .type functest3, @function +# .size functest3, .-functest3 + +# = start.s = +# .global _start +# _start: +# call functest3 +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# ret +# .type _start, @function +# .size _start, .-_start + +# gas --compress-debug-sections=zlib-gnu -32 -g -o start.o start.s +# gas --compress-debug-sections=zlib-gnu -32 -g -o funcs.o funcs.s +# ld --compress-debug-sections=zlib-gnu -melf_i386 -g -o zgnu32 funcs.o start.o + +# gas --compress-debug-sections=zlib-gnu -64 -g -o start.o start.s +# gas --compress-debug-sections=zlib-gnu -64 -g -o funcs.o funcs.s +# ld --compress-debug-sections=zlib-gnu -g -o zgnu32 funcs.o start.o + +testfiles testfile-zgnu64 +testrun_compare ${abs_top_builddir}/tests/dwelfgnucompressed testfile-zgnu64 <<\EOF +section 2: GNU Compressed size: 60 +section 3: GNU Compressed size: aa +section 5: GNU Compressed size: 8d +EOF + +testfiles testfile-zgnu64be +testrun_compare ${abs_top_builddir}/tests/dwelfgnucompressed testfile-zgnu64be <<\EOF +section 3: GNU Compressed size: 60 +section 4: GNU Compressed size: 7e +section 6: GNU Compressed size: 8d +EOF + +testfiles testfile-zgnu32 +testrun_compare ${abs_top_builddir}/tests/dwelfgnucompressed testfile-zgnu32 <<\EOF +section 2: GNU Compressed size: 40 +section 3: GNU Compressed size: 9a +section 5: GNU Compressed size: 85 +EOF + +testfiles testfile-zgnu32be +testrun_compare ${abs_top_builddir}/tests/dwelfgnucompressed testfile-zgnu32be <<\EOF +section 3: GNU Compressed size: 40 +section 4: GNU Compressed size: 6e +section 6: GNU Compressed size: 85 +EOF + +exit 0 diff --git a/tests/run-elfgetchdr.sh b/tests/run-elfgetchdr.sh new file mode 100755 index 0000000..7a422f3 --- /dev/null +++ b/tests/run-elfgetchdr.sh @@ -0,0 +1,188 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# = funcs.s = +# .globl testfunc +# testfunc: +# nop +# ret +# .type testfunc, @function +# .size testfunc, .-testfunc +# +# .globl testfunc2 +# testfunc2: +# call testfunc +# nop +# nop +# ret +# .type testfunc2, @function +# .size testfunc2, .-testfunc2 +# +# .globl functest3 +# functest3: +# jmp local +# nop +# nop +# local: +# call testfunc2 +# ret +# .type functest3, @function +# .size functest3, .-functest3 + +# = start.s = +# .global _start +# _start: +# call functest3 +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# nop +# ret +# .type _start, @function +# .size _start, .-_start + +# gas --compress-debug-sections=zlib-gnu -32 -g -o start.o start.s +# gas --compress-debug-sections=zlib-gnu -32 -g -o funcs.o funcs.s +# ld --compress-debug-sections=zlib-gnu -melf_i386 -g -o zgnu32 funcs.o start.o + +# gas --compress-debug-sections=zlib-gnu -64 -g -o start.o start.s +# gas --compress-debug-sections=zlib-gnu -64 -g -o funcs.o funcs.s +# ld --compress-debug-sections=zlib-gnu -g -o zgnu64 funcs.o start.o + +# gas --compress-debug-sections=zlib-gabi -32 -g -o start.o start.s +# gas --compress-debug-sections=zlib-gabi -32 -g -o funcs.o funcs.s +# ld --compress-debug-sections=zlib-gabi -melf_i386 -g -o zgabi32 funcs.o start.o + +# gas --compress-debug-sections=zlib-gabi -64 -g -o start.o start.s +# gas --compress-debug-sections=zlib-gabi -64 -g -o funcs.o funcs.s +# ld --compress-debug-sections=zlib-gabi -g -o zgabi64 funcs.o start.o + +testfiles testfile-zgnu64 +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgnu64 <<\EOF +section 1: NOT Compressed +section 2: GNU Compressed size: 60 +section 3: GNU Compressed size: aa +section 4: NOT Compressed +section 5: GNU Compressed size: 8d +section 6: NOT Compressed +section 7: NOT Compressed +section 8: NOT Compressed +EOF + +testfiles testfile-zgabi64 +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgabi64 <<\EOF +section 1: NOT Compressed +section 2: ELF Compressed ch_type: 1, ch_size: 60, ch_addralign: 10 +section 3: ELF Compressed ch_type: 1, ch_size: aa, ch_addralign: 1 +section 4: NOT Compressed +section 5: ELF Compressed ch_type: 1, ch_size: 8d, ch_addralign: 1 +section 6: NOT Compressed +section 7: NOT Compressed +section 8: NOT Compressed +EOF + +testfiles testfile-zgnu32 +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgnu32 <<\EOF +section 1: NOT Compressed +section 2: GNU Compressed size: 40 +section 3: GNU Compressed size: 9a +section 4: NOT Compressed +section 5: GNU Compressed size: 85 +section 6: NOT Compressed +section 7: NOT Compressed +section 8: NOT Compressed +EOF + +testfiles testfile-zgabi32 +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgabi32 <<\EOF +section 1: NOT Compressed +section 2: ELF Compressed ch_type: 1, ch_size: 40, ch_addralign: 8 +section 3: ELF Compressed ch_type: 1, ch_size: 9a, ch_addralign: 1 +section 4: NOT Compressed +section 5: ELF Compressed ch_type: 1, ch_size: 85, ch_addralign: 1 +section 6: NOT Compressed +section 7: NOT Compressed +section 8: NOT Compressed +EOF + +testfiles testfile-zgnu64be +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgnu64be <<\EOF +section 1: NOT Compressed +section 2: NOT Compressed +section 3: GNU Compressed size: 60 +section 4: GNU Compressed size: 7e +section 5: NOT Compressed +section 6: GNU Compressed size: 8d +section 7: NOT Compressed +section 8: NOT Compressed +section 9: NOT Compressed +EOF + +testfiles testfile-zgabi64be +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgabi64be <<\EOF +section 1: NOT Compressed +section 2: NOT Compressed +section 3: ELF Compressed ch_type: 1, ch_size: 60, ch_addralign: 10 +section 4: ELF Compressed ch_type: 1, ch_size: 7e, ch_addralign: 1 +section 5: NOT Compressed +section 6: ELF Compressed ch_type: 1, ch_size: 8d, ch_addralign: 1 +section 7: NOT Compressed +section 8: NOT Compressed +section 9: NOT Compressed +EOF + +testfiles testfile-zgnu32be +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgnu32be <<\EOF +section 1: NOT Compressed +section 2: NOT Compressed +section 3: GNU Compressed size: 40 +section 4: GNU Compressed size: 6e +section 5: NOT Compressed +section 6: GNU Compressed size: 85 +section 7: NOT Compressed +section 8: NOT Compressed +section 9: NOT Compressed +EOF + +testfiles testfile-zgabi32be +testrun_compare ${abs_top_builddir}/tests/elfgetchdr testfile-zgabi32be <<\EOF +section 1: NOT Compressed +section 2: NOT Compressed +section 3: ELF Compressed ch_type: 1, ch_size: 40, ch_addralign: 8 +section 4: ELF Compressed ch_type: 1, ch_size: 6e, ch_addralign: 1 +section 5: NOT Compressed +section 6: ELF Compressed ch_type: 1, ch_size: 85, ch_addralign: 1 +section 7: NOT Compressed +section 8: NOT Compressed +section 9: NOT Compressed +EOF + +exit 0 diff --git a/tests/run-elfgetzdata.sh b/tests/run-elfgetzdata.sh new file mode 100755 index 0000000..e2df308 --- /dev/null +++ b/tests/run-elfgetzdata.sh @@ -0,0 +1,214 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-elfgetchdr.sh for testfiles. + +testfiles testfile-zgnu64 +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu64 <<\EOF +1: .text, NOT compressed +2: .zdebug_aranges, GNU compressed, size: 60 +3: .zdebug_info, GNU compressed, size: aa +4: .debug_abbrev, NOT compressed +5: .zdebug_line, GNU compressed, size: 8d +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu64 <<\EOF +1: .text, NOT compressed +2: .zdebug_aranges, GNU compressed, size: 60 +3: .zdebug_info, GNU compressed, size: aa +4: .debug_abbrev, NOT compressed +5: .zdebug_line, GNU compressed, size: 8d +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testfiles testfile-zgnu64be +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu64be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .zdebug_aranges, GNU compressed, size: 60 +4: .zdebug_info, GNU compressed, size: 7e +5: .debug_abbrev, NOT compressed +6: .zdebug_line, GNU compressed, size: 8d +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu64be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .zdebug_aranges, GNU compressed, size: 60 +4: .zdebug_info, GNU compressed, size: 7e +5: .debug_abbrev, NOT compressed +6: .zdebug_line, GNU compressed, size: 8d +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testfiles testfile-zgabi64 +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi64 <<\EOF +1: .text, NOT compressed +2: .debug_aranges, ELF compressed, size: 60 +3: .debug_info, ELF compressed, size: aa +4: .debug_abbrev, NOT compressed +5: .debug_line, ELF compressed, size: 8d +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi64 <<\EOF +1: .text, NOT compressed +2: .debug_aranges, ELF compressed, size: 60 +3: .debug_info, ELF compressed, size: aa +4: .debug_abbrev, NOT compressed +5: .debug_line, ELF compressed, size: 8d +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testfiles testfile-zgabi64be +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi64be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .debug_aranges, ELF compressed, size: 60 +4: .debug_info, ELF compressed, size: 7e +5: .debug_abbrev, NOT compressed +6: .debug_line, ELF compressed, size: 8d +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi64be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .debug_aranges, ELF compressed, size: 60 +4: .debug_info, ELF compressed, size: 7e +5: .debug_abbrev, NOT compressed +6: .debug_line, ELF compressed, size: 8d +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testfiles testfile-zgnu32 +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu32 <<\EOF +1: .text, NOT compressed +2: .zdebug_aranges, GNU compressed, size: 40 +3: .zdebug_info, GNU compressed, size: 9a +4: .debug_abbrev, NOT compressed +5: .zdebug_line, GNU compressed, size: 85 +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu32 <<\EOF +1: .text, NOT compressed +2: .zdebug_aranges, GNU compressed, size: 40 +3: .zdebug_info, GNU compressed, size: 9a +4: .debug_abbrev, NOT compressed +5: .zdebug_line, GNU compressed, size: 85 +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testfiles testfile-zgnu32be +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu32be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .zdebug_aranges, GNU compressed, size: 40 +4: .zdebug_info, GNU compressed, size: 6e +5: .debug_abbrev, NOT compressed +6: .zdebug_line, GNU compressed, size: 85 +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu32be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .zdebug_aranges, GNU compressed, size: 40 +4: .zdebug_info, GNU compressed, size: 6e +5: .debug_abbrev, NOT compressed +6: .zdebug_line, GNU compressed, size: 85 +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testfiles testfile-zgabi32 +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi32 <<\EOF +1: .text, NOT compressed +2: .debug_aranges, ELF compressed, size: 40 +3: .debug_info, ELF compressed, size: 9a +4: .debug_abbrev, NOT compressed +5: .debug_line, ELF compressed, size: 85 +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi32 <<\EOF +1: .text, NOT compressed +2: .debug_aranges, ELF compressed, size: 40 +3: .debug_info, ELF compressed, size: 9a +4: .debug_abbrev, NOT compressed +5: .debug_line, ELF compressed, size: 85 +6: .shstrtab, NOT compressed +7: .symtab, NOT compressed +8: .strtab, NOT compressed +EOF + +testfiles testfile-zgabi32be +testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi32be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .debug_aranges, ELF compressed, size: 40 +4: .debug_info, ELF compressed, size: 6e +5: .debug_abbrev, NOT compressed +6: .debug_line, ELF compressed, size: 85 +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi32be <<\EOF +1: .text, NOT compressed +2: .eh_frame, NOT compressed +3: .debug_aranges, ELF compressed, size: 40 +4: .debug_info, ELF compressed, size: 6e +5: .debug_abbrev, NOT compressed +6: .debug_line, ELF compressed, size: 85 +7: .shstrtab, NOT compressed +8: .symtab, NOT compressed +9: .strtab, NOT compressed +EOF + +exit 0 diff --git a/tests/run-elfputzdata.sh b/tests/run-elfputzdata.sh new file mode 100755 index 0000000..b882b3f --- /dev/null +++ b/tests/run-elfputzdata.sh @@ -0,0 +1,340 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Random ELF32 testfile +testfiles testfile4 + +testrun_compare ${abs_top_builddir}/tests/elfputzdata gnu testfile4 <<\EOF +Cannot compress 1 .interp +Cannot compress 2 .note.ABI-tag +Cannot compress 3 .hash +Cannot compress 4 .dynsym +Cannot compress 5 .dynstr +Cannot compress 6 .gnu.version +Cannot compress 7 .gnu.version_r +Cannot compress 8 .rel.got +Cannot compress 9 .rel.plt +Cannot compress 10 .init +Cannot compress 11 .plt +Cannot compress 12 .text +Cannot compress 13 .fini +Cannot compress 14 .rodata +Cannot compress 15 .data +Cannot compress 16 .eh_frame +Cannot compress 17 .gcc_except_table +Cannot compress 18 .ctors +Cannot compress 19 .dtors +Cannot compress 20 .got +Cannot compress 21 .dynamic +Lets compress 22 .sbss, size: 0 +Cannot compress 23 .bss +Lets compress 24 .stab, size: 21540 +Lets compress 25 .stabstr, size: 57297 +Lets compress 26 .comment, size: 648 +Lets compress 27 .debug_aranges, size: 56 +Lets compress 28 .debug_pubnames, size: 93 +Lets compress 29 .debug_info, size: 960 +Lets compress 30 .debug_abbrev, size: 405 +Lets compress 31 .debug_line, size: 189 +Lets compress 32 .note, size: 240 +Lets compress 33 .shstrtab, size: 320 +Lets compress 34 .symtab, size: 5488 +Lets compress 35 .strtab, size: 5727 +EOF + +testrun_compare ${abs_top_builddir}/tests/elfputzdata elf testfile4 <<\EOF +Cannot compress 1 .interp +Cannot compress 2 .note.ABI-tag +Cannot compress 3 .hash +Cannot compress 4 .dynsym +Cannot compress 5 .dynstr +Cannot compress 6 .gnu.version +Cannot compress 7 .gnu.version_r +Cannot compress 8 .rel.got +Cannot compress 9 .rel.plt +Cannot compress 10 .init +Cannot compress 11 .plt +Cannot compress 12 .text +Cannot compress 13 .fini +Cannot compress 14 .rodata +Cannot compress 15 .data +Cannot compress 16 .eh_frame +Cannot compress 17 .gcc_except_table +Cannot compress 18 .ctors +Cannot compress 19 .dtors +Cannot compress 20 .got +Cannot compress 21 .dynamic +Lets compress 22 .sbss, size: 0 +Cannot compress 23 .bss +Lets compress 24 .stab, size: 21540 +Lets compress 25 .stabstr, size: 57297 +Lets compress 26 .comment, size: 648 +Lets compress 27 .debug_aranges, size: 56 +Lets compress 28 .debug_pubnames, size: 93 +Lets compress 29 .debug_info, size: 960 +Lets compress 30 .debug_abbrev, size: 405 +Lets compress 31 .debug_line, size: 189 +Lets compress 32 .note, size: 240 +Lets compress 33 .shstrtab, size: 320 +Lets compress 34 .symtab, size: 5488 +Lets compress 35 .strtab, size: 5727 +EOF + +# Random ELF64 testfile +testfiles testfile12 + +testrun_compare ${abs_top_builddir}/tests/elfputzdata gnu testfile12 <<\EOF +Cannot compress 1 .hash +Cannot compress 2 .dynsym +Cannot compress 3 .dynstr +Cannot compress 4 .gnu.version +Cannot compress 5 .gnu.version_r +Cannot compress 6 .rela.dyn +Cannot compress 7 .rela.plt +Cannot compress 8 .init +Cannot compress 9 .plt +Cannot compress 10 .text +Cannot compress 11 .fini +Cannot compress 12 .rodata +Cannot compress 13 .eh_frame_hdr +Cannot compress 14 .eh_frame +Cannot compress 15 .data +Cannot compress 16 .dynamic +Cannot compress 17 .ctors +Cannot compress 18 .dtors +Cannot compress 19 .jcr +Cannot compress 20 .got +Cannot compress 21 .bss +Lets compress 22 .comment, size: 246 +Lets compress 23 .debug_aranges, size: 192 +Lets compress 24 .debug_pubnames, size: 26 +Lets compress 25 .debug_info, size: 3468 +Lets compress 26 .debug_abbrev, size: 341 +Lets compress 27 .debug_line, size: 709 +Lets compress 28 .debug_frame, size: 56 +Lets compress 29 .debug_str, size: 2235 +Lets compress 30 .debug_macinfo, size: 10518 +Lets compress 31 .shstrtab, size: 308 +Lets compress 32 .symtab, size: 1944 +Lets compress 33 .strtab, size: 757 +EOF + +testrun_compare ${abs_top_builddir}/tests/elfputzdata elf testfile12 <<\EOF +Cannot compress 1 .hash +Cannot compress 2 .dynsym +Cannot compress 3 .dynstr +Cannot compress 4 .gnu.version +Cannot compress 5 .gnu.version_r +Cannot compress 6 .rela.dyn +Cannot compress 7 .rela.plt +Cannot compress 8 .init +Cannot compress 9 .plt +Cannot compress 10 .text +Cannot compress 11 .fini +Cannot compress 12 .rodata +Cannot compress 13 .eh_frame_hdr +Cannot compress 14 .eh_frame +Cannot compress 15 .data +Cannot compress 16 .dynamic +Cannot compress 17 .ctors +Cannot compress 18 .dtors +Cannot compress 19 .jcr +Cannot compress 20 .got +Cannot compress 21 .bss +Lets compress 22 .comment, size: 246 +Lets compress 23 .debug_aranges, size: 192 +Lets compress 24 .debug_pubnames, size: 26 +Lets compress 25 .debug_info, size: 3468 +Lets compress 26 .debug_abbrev, size: 341 +Lets compress 27 .debug_line, size: 709 +Lets compress 28 .debug_frame, size: 56 +Lets compress 29 .debug_str, size: 2235 +Lets compress 30 .debug_macinfo, size: 10518 +Lets compress 31 .shstrtab, size: 308 +Lets compress 32 .symtab, size: 1944 +Lets compress 33 .strtab, size: 757 +EOF + +# Random ELF64BE testfile +testfiles testfileppc64 + +testrun_compare ${abs_top_builddir}/tests/elfputzdata gnu testfileppc64 <<\EOF +Cannot compress 1 .interp +Cannot compress 2 .note.ABI-tag +Cannot compress 3 .note.gnu.build-id +Cannot compress 4 .gnu.hash +Cannot compress 5 .dynsym +Cannot compress 6 .dynstr +Cannot compress 7 .gnu.version +Cannot compress 8 .gnu.version_r +Cannot compress 9 .rela.plt +Cannot compress 10 .init +Cannot compress 11 .text +Cannot compress 12 .fini +Cannot compress 13 .rodata +Cannot compress 14 .eh_frame_hdr +Cannot compress 15 .eh_frame +Cannot compress 16 .init_array +Cannot compress 17 .fini_array +Cannot compress 18 .jcr +Cannot compress 19 .dynamic +Cannot compress 20 .data +Cannot compress 21 .opd +Cannot compress 22 .got +Cannot compress 23 .plt +Cannot compress 24 .bss +Lets compress 25 .comment, size: 88 +Lets compress 26 .debug_aranges, size: 96 +Lets compress 27 .debug_info, size: 363 +Lets compress 28 .debug_abbrev, size: 315 +Lets compress 29 .debug_line, size: 119 +Lets compress 30 .debug_frame, size: 96 +Lets compress 31 .debug_str, size: 174 +Lets compress 32 .debug_loc, size: 171 +Lets compress 33 .debug_ranges, size: 32 +Lets compress 34 .shstrtab, size: 352 +Lets compress 35 .symtab, size: 1800 +Lets compress 36 .strtab, size: 602 +EOF + +testrun_compare ${abs_top_builddir}/tests/elfputzdata elf testfileppc64 <<\EOF +Cannot compress 1 .interp +Cannot compress 2 .note.ABI-tag +Cannot compress 3 .note.gnu.build-id +Cannot compress 4 .gnu.hash +Cannot compress 5 .dynsym +Cannot compress 6 .dynstr +Cannot compress 7 .gnu.version +Cannot compress 8 .gnu.version_r +Cannot compress 9 .rela.plt +Cannot compress 10 .init +Cannot compress 11 .text +Cannot compress 12 .fini +Cannot compress 13 .rodata +Cannot compress 14 .eh_frame_hdr +Cannot compress 15 .eh_frame +Cannot compress 16 .init_array +Cannot compress 17 .fini_array +Cannot compress 18 .jcr +Cannot compress 19 .dynamic +Cannot compress 20 .data +Cannot compress 21 .opd +Cannot compress 22 .got +Cannot compress 23 .plt +Cannot compress 24 .bss +Lets compress 25 .comment, size: 88 +Lets compress 26 .debug_aranges, size: 96 +Lets compress 27 .debug_info, size: 363 +Lets compress 28 .debug_abbrev, size: 315 +Lets compress 29 .debug_line, size: 119 +Lets compress 30 .debug_frame, size: 96 +Lets compress 31 .debug_str, size: 174 +Lets compress 32 .debug_loc, size: 171 +Lets compress 33 .debug_ranges, size: 32 +Lets compress 34 .shstrtab, size: 352 +Lets compress 35 .symtab, size: 1800 +Lets compress 36 .strtab, size: 602 +EOF + +# Random ELF32BE testfile +testfiles testfileppc32 + +testrun_compare ${abs_top_builddir}/tests/elfputzdata gnu testfileppc32 <<\EOF +Cannot compress 1 .interp +Cannot compress 2 .note.ABI-tag +Cannot compress 3 .note.gnu.build-id +Cannot compress 4 .gnu.hash +Cannot compress 5 .dynsym +Cannot compress 6 .dynstr +Cannot compress 7 .gnu.version +Cannot compress 8 .gnu.version_r +Cannot compress 9 .rela.dyn +Cannot compress 10 .rela.plt +Cannot compress 11 .init +Cannot compress 12 .text +Cannot compress 13 .fini +Cannot compress 14 .rodata +Cannot compress 15 .eh_frame_hdr +Cannot compress 16 .eh_frame +Cannot compress 17 .init_array +Cannot compress 18 .fini_array +Cannot compress 19 .jcr +Cannot compress 20 .got2 +Cannot compress 21 .dynamic +Cannot compress 22 .got +Cannot compress 23 .plt +Cannot compress 24 .data +Cannot compress 25 .sdata +Cannot compress 26 .bss +Lets compress 27 .comment, size: 88 +Lets compress 28 .debug_aranges, size: 64 +Lets compress 29 .debug_info, size: 319 +Lets compress 30 .debug_abbrev, size: 318 +Lets compress 31 .debug_line, size: 109 +Lets compress 32 .debug_frame, size: 64 +Lets compress 33 .debug_str, size: 179 +Lets compress 34 .debug_loc, size: 99 +Lets compress 35 .debug_ranges, size: 16 +Lets compress 36 .shstrtab, size: 370 +Lets compress 37 .symtab, size: 1232 +Lets compress 38 .strtab, size: 569 +EOF + +testrun_compare ${abs_top_builddir}/tests/elfputzdata elf testfileppc32 <<\EOF +Cannot compress 1 .interp +Cannot compress 2 .note.ABI-tag +Cannot compress 3 .note.gnu.build-id +Cannot compress 4 .gnu.hash +Cannot compress 5 .dynsym +Cannot compress 6 .dynstr +Cannot compress 7 .gnu.version +Cannot compress 8 .gnu.version_r +Cannot compress 9 .rela.dyn +Cannot compress 10 .rela.plt +Cannot compress 11 .init +Cannot compress 12 .text +Cannot compress 13 .fini +Cannot compress 14 .rodata +Cannot compress 15 .eh_frame_hdr +Cannot compress 16 .eh_frame +Cannot compress 17 .init_array +Cannot compress 18 .fini_array +Cannot compress 19 .jcr +Cannot compress 20 .got2 +Cannot compress 21 .dynamic +Cannot compress 22 .got +Cannot compress 23 .plt +Cannot compress 24 .data +Cannot compress 25 .sdata +Cannot compress 26 .bss +Lets compress 27 .comment, size: 88 +Lets compress 28 .debug_aranges, size: 64 +Lets compress 29 .debug_info, size: 319 +Lets compress 30 .debug_abbrev, size: 318 +Lets compress 31 .debug_line, size: 109 +Lets compress 32 .debug_frame, size: 64 +Lets compress 33 .debug_str, size: 179 +Lets compress 34 .debug_loc, size: 99 +Lets compress 35 .debug_ranges, size: 16 +Lets compress 36 .shstrtab, size: 370 +Lets compress 37 .symtab, size: 1232 +Lets compress 38 .strtab, size: 569 +EOF + +exit 0 diff --git a/tests/run-elfstrmerge-test.sh b/tests/run-elfstrmerge-test.sh new file mode 100755 index 0000000..d08b6fc --- /dev/null +++ b/tests/run-elfstrmerge-test.sh @@ -0,0 +1,40 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Merge string tables of file and check result with elflint. +testrun_elfcompress() +{ + testfile="$1" + testfiles ${testfile} + + mergedfile="${testfile}.merged" + tempfiles ${mergedfile} + + echo "merging string tables ${testfile} -> ${mergedfile}" + testrun ${abs_top_builddir}/tests/elfstrmerge -o ${mergedfile} ${testfile} + testrun ${abs_top_builddir}/src/elflint --gnu-ld ${mergedfile} +} + +# Random ELF32 testfile with extra STT_SECTION symbols +testrun_elfcompress testfile4 + +# Random ELF64 testfile with extra STT_SECTION symbols +testrun_elfcompress testfile12 + +exit 0 diff --git a/tests/run-funcscopes.sh b/tests/run-funcscopes.sh index d236f5c..367729a 100755 --- a/tests/run-funcscopes.sh +++ b/tests/run-funcscopes.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2005, 2014 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -21,8 +21,8 @@ testfiles testfile25 testrun_compare ${abs_builddir}/funcscopes -e testfile25 incr <<\EOF testfile25: 0x8048000 .. 0x8049528 - inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9) - incr (0x2e): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9) + inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:9) + incr (0x2e): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:9) x [ 66] EOF diff --git a/tests/run-getsrc-die.sh b/tests/run-getsrc-die.sh new file mode 100755 index 0000000..4da16e7 --- /dev/null +++ b/tests/run-getsrc-die.sh @@ -0,0 +1,51 @@ +#! /bin/sh +# Copyright (C) 2014 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-addr2line-test.sh run-addr2line-i-test.sh run-addr2line-i-lex-test.sh +# Output/files/lines matched should equal what is done through addr2line +# which uses dwfl_module_getsrc. This test uses dwarf_addrdie and +# dwarf_getsrc_die +testfiles testfile testfile-inlines testfile-lex-inlines + +testrun_compare ${abs_top_builddir}/tests/getsrc_die testfile 0x08048468 0x0804845c <<\EOF +/home/drepper/gnu/new-bu/build/ttt/f.c:3 +/home/drepper/gnu/new-bu/build/ttt/b.c:4 +EOF + +testrun_compare ${abs_top_builddir}/tests/getsrc_die testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f1 0x00000000000005f2 <<\EOF +/tmp/x.cpp:5 +/tmp/x.cpp:6 +/tmp/x.cpp:10 +/tmp/x.cpp:11 +/tmp/x.cpp:5 +/tmp/x.cpp:10 +/tmp/x.cpp:5 +/tmp/x.cpp:10 +/tmp/x.cpp:10 +/tmp/x.cpp:5 +EOF + +testrun_compare ${abs_top_builddir}/tests/getsrc_die testfile-lex-inlines 0x0000000000000680 0x0000000000000681 0x0000000000000690 0x0000000000000691 <<\EOF +/tmp/x.cpp:5 +/tmp/x.cpp:5 +/tmp/x.cpp:5 +/tmp/x.cpp:5 +EOF + +exit 0 diff --git a/tests/run-lfs-symbols.sh b/tests/run-lfs-symbols.sh new file mode 100755 index 0000000..f089440 --- /dev/null +++ b/tests/run-lfs-symbols.sh @@ -0,0 +1,86 @@ +#! /bin/bash +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +if ! grep -q -F '#define _FILE_OFFSET_BITS' ${abs_top_builddir}/config.h; then + echo "LFS testing is irrelevent on this system" + exit 77 +fi + +# #include +# int main () { +# FILE *f = fopen ("/dev/null", "r"); +# return f == NULL; +# } +# +# Built for Linux i686, without setting _FILE_OFFSET_BITS. +# $ gcc -m32 -O2 nolfs.c -o testfile-nolfs +testfiles testfile-nolfs + +LFS_FORMAT='BEGIN { + while ((getline < "%s") > 0) + /^\w/ && bad[$0] + FS="@" +} +/@@GLIBC_/ && $1 in bad { print $1 }' + +LFS=$(printf "$LFS_FORMAT" "${abs_srcdir}/lfs-symbols") + +makeprint() { + make print-$1 -C $2 |& awk -F= "/^$1=/{ print \$2 }" +} + +testrun_lfs() { + bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | awk "$LFS") + if [ -n "$bad" ]; then + echo "$1 contains non-lfs symbols:" $bad + exit_status=1 + fi +} + +# First sanity-check that LFS detection works. +exit_status=0 +testrun_lfs ./testfile-nolfs +if [ $exit_status -eq 0 ]; then + echo "Didn't detect any problem with testfile-nolfs!" + exit 99 +fi + +exit_status=0 + +# Check all normal build targets. +for dir in libelf libdw libasm libcpu src; do + dir=${abs_top_builddir}/$dir + for program in $(makeprint PROGRAMS $dir); do + testrun_lfs $dir/$program + done +done + +# Check all libebl modules. +dir=${abs_top_builddir}/backends +for module in $(makeprint modules $dir); do + testrun_lfs $dir/libebl_$module.so +done + +# Check all test programs. +dir=${abs_builddir} +for program in $(makeprint check_PROGRAMS $dir); do + testrun_lfs $dir/$program +done + +exit $exit_status diff --git a/tests/run-linkmap-cut.sh b/tests/run-linkmap-cut.sh new file mode 100755 index 0000000..de2bc7c --- /dev/null +++ b/tests/run-linkmap-cut.sh @@ -0,0 +1,32 @@ +#! /bin/bash +# Copyright (C) 2014 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# The core file has patched: +# * _r_debug.r_map.l_next.l_next (vma 0x3fdf621718, offset 0x7718) = NULL, +# therefore all libraries after the main executable and vDSO are removed. +# * NT_FILE absolute filenames are relativized to: ./////basename + +testfiles linkmap-cut-lib.so linkmap-cut linkmap-cut.core +tempfiles bt +# It may have non-zero exit code with: +# .../elfutils/src/stack: dwfl_thread_getframes tid 3130 at 0x3fdf821d64 in /usr/lib64/libc-2.18.so: no matching address range +testrun ${abs_top_builddir}/src/stack --core=linkmap-cut.core -e linkmap-cut -m >bt || true +cat bt +grep -q '^#0 0x00007f08bc24d681 libfunc - .////////////////////////////////////linkmap-cut-lib\.so$' bt +grep -q '^#1 0x00000000004006b4 main - linkmap-cut$' bt diff --git a/tests/run-readelf-A.sh b/tests/run-readelf-A.sh new file mode 100755 index 0000000..6ca9be8 --- /dev/null +++ b/tests/run-readelf-A.sh @@ -0,0 +1,65 @@ +#! /bin/sh +# Copyright (C) 2014 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-addrcfi.sh for testfilearm. + +# = testfileppc32attrs.s = +# .gnu_attribute 8,1 +# .gnu_attribute 12,1 +# +# gcc -m32 -c testfileppc32attrs.s + +testfiles testfilearm testfileppc32attrs.o + +testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF + +Object attributes section [27] '.ARM.attributes' of 53 bytes at offset 0x718: + Owner Size + aeabi 52 + File: 42 + CPU_name: 7-A + CPU_arch: v7 + CPU_arch_profile: Application + ARM_ISA_use: Yes + THUMB_ISA_use: Thumb-2 + VFP_arch: VFPv3-D16 + ABI_PCS_wchar_t: 4 + ABI_FP_rounding: Needed + ABI_FP_denormal: Needed + ABI_FP_exceptions: Needed + ABI_FP_number_model: IEEE 754 + ABI_align8_needed: Yes + ABI_align8_preserved: Yes, except leaf SP + ABI_enum_size: int + ABI_HardFP_use: SP and DP + ABI_VFP_args: VFP registers + CPU_unaligned_access: v6 +EOF + +testrun_compare ${abs_top_builddir}/src/readelf -A testfileppc32attrs.o <<\EOF + +Object attributes section [ 4] '.gnu.attributes' of 18 bytes at offset 0x34: + Owner Size + gnu 17 + File: 9 + GNU_Power_ABI_Vector: Generic + GNU_Power_ABI_Struct_Return: r3/r4 +EOF + +exit 0 diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh index 01e4594..69d0c02 100755 --- a/tests/run-readelf-mixed-corenote.sh +++ b/tests/run-readelf-mixed-corenote.sh @@ -1,5 +1,6 @@ #! /bin/sh # Copyright (C) 2012, 2013, 2014 Red Hat, Inc. +# Copyright (C) H.J. Lu , 2015. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -490,4 +491,95 @@ Note segment of 1000 bytes at offset 0x214: index: 8, base: 0x00000000, limit: 0x00000000, flags: 0x00000028 EOF +# To reproduce this core dump, do this on x86_64 machine with Linux +# 3.7 or later: +# $ gcc -mx32 -x c <(echo 'int main () { return *(int *)0x12345678; }') +# $ ./a.out +testfiles testfile-x32-core +testrun_compare ${abs_top_builddir}/src/readelf -n testfile-x32-core <<\EOF + +Note segment of 2548 bytes at offset 0x234: + Owner Data size Type + CORE 296 PRSTATUS + info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11 + sigpend: <> + sighold: <> + pid: 6885, ppid: 2792, pgrp: 6885, sid: 2792 + utime: 0.000000, stime: 0.001000, cutime: 0.000000, cstime: 0.000000 + orig_rax: -1, fpvalid: 1 + r15: 0 r14: 0 + r13: 4290830656 r12: 4194960 + rbp: 0x00000000ffc0e070 rbx: 0 + r11: 4145779200 r10: 0 + r9: 4149627024 r8: 4149551744 + rax: 305419896 rcx: 4195216 + rdx: 4290830668 rsi: 4290830660 + rdi: 1 rip: 0x0000000000400380 + rflags: 0x0000000000010246 rsp: 0x00000000ffc0e070 + fs.base: 0x00000000f7754700 gs.base: 0x0000000000000000 + cs: 0x0033 ss: 0x002b ds: 0x002b es: 0x002b fs: 0x0063 gs: 0x0000 + CORE 124 PRPSINFO + state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00406600 + uid: 1000, gid: 1000, pid: 6885, ppid: 2792, pgrp: 6885, sid: 2792 + fname: a.out, psargs: ./a.out + CORE 128 SIGINFO + si_signo: 11, si_errno: 0, si_code: 1 + fault address: 0x12345678 + CORE 152 AUXV + SYSINFO_EHDR: 0xffd49000 + HWCAP: 0xbfebfbff + PAGESZ: 4096 + CLKTCK: 100 + PHDR: 0x400034 + PHENT: 32 + PHNUM: 8 + BASE: 0xf7555000 + FLAGS: 0 + ENTRY: 0x400290 + UID: 1000 + EUID: 1000 + GID: 1000 + EGID: 1000 + SECURE: 0 + RANDOM: 0xffc0e2cb + EXECFN: 0xffc0fff0 + PLATFORM: 0xffc0e2db + NULL + CORE 361 FILE + 9 files: + 00400000-00401000 00000000 4096 /export/home/hjl/bugs/gdb/x32-1/a.out + 00600000-00601000 00000000 4096 /export/home/hjl/bugs/gdb/x32-1/a.out + f71a2000-f734f000 00000000 1757184 /usr/libx32/libc-2.20.so + f734f000-f754e000 001ad000 2093056 /usr/libx32/libc-2.20.so + f754e000-f7551000 001ac000 12288 /usr/libx32/libc-2.20.so + f7551000-f7552000 001af000 4096 /usr/libx32/libc-2.20.so + f7555000-f7575000 00000000 131072 /usr/libx32/ld-2.20.so + f7774000-f7775000 0001f000 4096 /usr/libx32/ld-2.20.so + f7775000-f7776000 00020000 4096 /usr/libx32/ld-2.20.so + CORE 512 FPREGSET + xmm0: 0x0000000000000000000000000000ff00 + xmm1: 0x2f2f2f2f2f2f2f2f2f2f2f2f2f2f2f2f + xmm2: 0x00000000000000000000000000000000 + xmm3: 0x0000000000000000ff00000000000000 + xmm4: 0x000000000000000000ff000000000000 + xmm5: 0x00000000000000000000000000000000 + xmm6: 0x00000000000000000000000000000000 + xmm7: 0x00000000000000000000000000000000 + xmm8: 0x00000000000000000000000000000000 + xmm9: 0x00000000000000000000000000000000 + xmm10: 0x00000000000000000000000000000000 + xmm11: 0x00000000000000000000000000000000 + xmm12: 0x00000000000000000000000000000000 + xmm13: 0x00000000000000000000000000000000 + xmm14: 0x00000000000000000000000000000000 + xmm15: 0x00000000000000000000000000000000 + st0: 0x00000000000000000000 st1: 0x00000000000000000000 + st2: 0x00000000000000000000 st3: 0x00000000000000000000 + st4: 0x00000000000000000000 st5: 0x00000000000000000000 + st6: 0x00000000000000000000 st7: 0x00000000000000000000 + mxcsr: 0x0000ffff00001f80 + fcw: 0x037f fsw: 0x0000 + LINUX 832 X86_XSTATE +EOF + exit 0 diff --git a/tests/run-readelf-z.sh b/tests/run-readelf-z.sh new file mode 100755 index 0000000..6dbd2f1 --- /dev/null +++ b/tests/run-readelf-z.sh @@ -0,0 +1,202 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-elfgetchdr.sh for testfiles. + +testfiles testfile-zgnu64 +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgnu64 <<\EOF +There are 9 section headers, starting at offset 0x3e0: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .text PROGBITS 0000000000400078 00000078 0000002a 0 AX 0 0 1 +[ 2] .zdebug_aranges PROGBITS 0000000000000000 00000260 00000032 0 0 0 16 + [GNU ZLIB 00000060 ] +[ 3] .zdebug_info PROGBITS 0000000000000000 00000292 0000006f 0 0 0 1 + [GNU ZLIB 000000aa ] +[ 4] .debug_abbrev PROGBITS 0000000000000000 00000301 00000028 0 0 0 1 +[ 5] .zdebug_line PROGBITS 0000000000000000 00000329 0000005b 0 0 0 1 + [GNU ZLIB 0000008d ] +[ 6] .shstrtab STRTAB 0000000000000000 00000384 00000059 0 0 0 1 +[ 7] .symtab SYMTAB 0000000000000000 000000a8 00000168 24 8 8 8 +[ 8] .strtab STRTAB 0000000000000000 00000210 0000004b 0 0 0 1 + +EOF + +testfiles testfile-zgnu64be +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgnu64be <<\EOF +There are 10 section headers, starting at offset 0x438: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .text PROGBITS 0000000010000078 00000078 00000074 0 AX 0 0 8 +[ 2] .eh_frame PROGBITS 00000000100000ec 000000ec 00000000 0 A 0 0 4 +[ 3] .zdebug_aranges PROGBITS 0000000000000000 000002c0 00000034 0 0 0 16 + [GNU ZLIB 00000060 ] +[ 4] .zdebug_info PROGBITS 0000000000000000 000002f4 00000059 0 0 0 1 + [GNU ZLIB 0000007e ] +[ 5] .debug_abbrev PROGBITS 0000000000000000 0000034d 00000028 0 0 0 1 +[ 6] .zdebug_line PROGBITS 0000000000000000 00000375 0000005b 0 0 0 1 + [GNU ZLIB 0000008d ] +[ 7] .shstrtab STRTAB 0000000000000000 000003d0 00000063 0 0 0 1 +[ 8] .symtab SYMTAB 0000000000000000 000000f0 00000180 24 9 9 8 +[ 9] .strtab STRTAB 0000000000000000 00000270 00000044 0 0 0 1 + +EOF + +testfiles testfile-zgabi64 +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgabi64 <<\EOF +There are 9 section headers, starting at offset 0x400: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .text PROGBITS 0000000000400078 00000078 0000002a 0 AX 0 0 1 +[ 2] .debug_aranges PROGBITS 0000000000000000 00000260 0000003e 0 C 0 0 16 + [ELF ZLIB (1) 00000060 16] +[ 3] .debug_info PROGBITS 0000000000000000 0000029e 0000007b 0 C 0 0 1 + [ELF ZLIB (1) 000000aa 1] +[ 4] .debug_abbrev PROGBITS 0000000000000000 00000319 00000028 0 0 0 1 +[ 5] .debug_line PROGBITS 0000000000000000 00000341 00000067 0 C 0 0 1 + [ELF ZLIB (1) 0000008d 1] +[ 6] .shstrtab STRTAB 0000000000000000 000003a8 00000056 0 0 0 1 +[ 7] .symtab SYMTAB 0000000000000000 000000a8 00000168 24 8 8 8 +[ 8] .strtab STRTAB 0000000000000000 00000210 0000004b 0 0 0 1 + +EOF + +testfiles testfile-zgabi64be +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgabi64be <<\EOF +There are 10 section headers, starting at offset 0x458: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .text PROGBITS 0000000010000078 00000078 00000074 0 AX 0 0 8 +[ 2] .eh_frame PROGBITS 00000000100000ec 000000ec 00000000 0 A 0 0 4 +[ 3] .debug_aranges PROGBITS 0000000000000000 000002c0 00000040 0 C 0 0 16 + [ELF ZLIB (1) 00000060 16] +[ 4] .debug_info PROGBITS 0000000000000000 00000300 00000065 0 C 0 0 1 + [ELF ZLIB (1) 0000007e 1] +[ 5] .debug_abbrev PROGBITS 0000000000000000 00000365 00000028 0 0 0 1 +[ 6] .debug_line PROGBITS 0000000000000000 0000038d 00000067 0 C 0 0 1 + [ELF ZLIB (1) 0000008d 1] +[ 7] .shstrtab STRTAB 0000000000000000 000003f4 00000060 0 0 0 1 +[ 8] .symtab SYMTAB 0000000000000000 000000f0 00000180 24 9 9 8 +[ 9] .strtab STRTAB 0000000000000000 00000270 00000044 0 0 0 1 + +EOF + +testfiles testfile-zgnu32 +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgnu32 <<\EOF +There are 9 section headers, starting at offset 0x33c: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .text PROGBITS 08048054 000054 00002a 0 AX 0 0 1 +[ 2] .zdebug_aranges PROGBITS 00000000 0001c0 000031 0 0 0 8 + [GNU ZLIB 000040 ] +[ 3] .zdebug_info PROGBITS 00000000 0001f1 00006f 0 0 0 1 + [GNU ZLIB 00009a ] +[ 4] .debug_abbrev PROGBITS 00000000 000260 000028 0 0 0 1 +[ 5] .zdebug_line PROGBITS 00000000 000288 00005a 0 0 0 1 + [GNU ZLIB 000085 ] +[ 6] .shstrtab STRTAB 00000000 0002e2 000059 0 0 0 1 +[ 7] .symtab SYMTAB 00000000 000080 0000f0 16 8 8 4 +[ 8] .strtab STRTAB 00000000 000170 00004b 0 0 0 1 + +EOF + +testfiles testfile-zgnu32be +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgnu32be <<\EOF +There are 10 section headers, starting at offset 0x390: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .text PROGBITS 01800054 000054 000074 0 AX 0 0 1 +[ 2] .eh_frame PROGBITS 018000c8 0000c8 000000 0 A 0 0 4 +[ 3] .zdebug_aranges PROGBITS 00000000 000220 000033 0 0 0 8 + [GNU ZLIB 000040 ] +[ 4] .zdebug_info PROGBITS 00000000 000253 000058 0 0 0 1 + [GNU ZLIB 00006e ] +[ 5] .debug_abbrev PROGBITS 00000000 0002ab 000028 0 0 0 1 +[ 6] .zdebug_line PROGBITS 00000000 0002d3 000059 0 0 0 1 + [GNU ZLIB 000085 ] +[ 7] .shstrtab STRTAB 00000000 00032c 000063 0 0 0 1 +[ 8] .symtab SYMTAB 00000000 0000c8 000110 16 9 9 4 +[ 9] .strtab STRTAB 00000000 0001d8 000045 0 0 0 1 + +EOF + +testfiles testfile-zgabi32 +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgabi32 <<\EOF +There are 9 section headers, starting at offset 0x338: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .text PROGBITS 08048054 000054 00002a 0 AX 0 0 1 +[ 2] .debug_aranges PROGBITS 00000000 0001c0 000031 0 C 0 0 8 + [ELF ZLIB (1) 000040 8] +[ 3] .debug_info PROGBITS 00000000 0001f1 00006f 0 C 0 0 1 + [ELF ZLIB (1) 00009a 1] +[ 4] .debug_abbrev PROGBITS 00000000 000260 000028 0 0 0 1 +[ 5] .debug_line PROGBITS 00000000 000288 00005a 0 C 0 0 1 + [ELF ZLIB (1) 000085 1] +[ 6] .shstrtab STRTAB 00000000 0002e2 000056 0 0 0 1 +[ 7] .symtab SYMTAB 00000000 000080 0000f0 16 8 8 4 +[ 8] .strtab STRTAB 00000000 000170 00004b 0 0 0 1 + +EOF + +testfiles testfile-zgabi32be +testrun_compare ${abs_top_builddir}/src/readelf -z -S testfile-zgabi32be <<\EOF +There are 10 section headers, starting at offset 0x38c: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al + [Compression Size Al] +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .text PROGBITS 01800054 000054 000074 0 AX 0 0 1 +[ 2] .eh_frame PROGBITS 018000c8 0000c8 000000 0 A 0 0 4 +[ 3] .debug_aranges PROGBITS 00000000 000220 000033 0 C 0 0 8 + [ELF ZLIB (1) 000040 8] +[ 4] .debug_info PROGBITS 00000000 000253 000058 0 C 0 0 1 + [ELF ZLIB (1) 00006e 1] +[ 5] .debug_abbrev PROGBITS 00000000 0002ab 000028 0 0 0 1 +[ 6] .debug_line PROGBITS 00000000 0002d3 000059 0 C 0 0 1 + [ELF ZLIB (1) 000085 1] +[ 7] .shstrtab STRTAB 00000000 00032c 000060 0 0 0 1 +[ 8] .symtab SYMTAB 00000000 0000c8 000110 16 9 9 4 +[ 9] .strtab STRTAB 00000000 0001d8 000045 0 0 0 1 + +EOF + +exit 0 diff --git a/tests/run-readelf-zdebug-rel.sh b/tests/run-readelf-zdebug-rel.sh new file mode 100755 index 0000000..88ea5bf --- /dev/null +++ b/tests/run-readelf-zdebug-rel.sh @@ -0,0 +1,144 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# - testfile-zdebug-rel.c +# #define UINT64_MAX 18446744073709551615UL +# +# int +# main (int argc, char **argv) +# { +# unsigned long a = UINT64_MAX - 8; +# unsigned long b = 42 + argc; +# +# if ( a + b < b ) +# argc = a + argc; +# else +# b--; +# +# return a - b; +# } +# +# gcc -Og -g -Xassembler --compress-debug-sections=none \ +# -c -o testfile-debug-rel.o testfile-zdebug-rel.c +# gcc -Og -g -Xassembler --compress-debug-sections=zlib-gnu \ +# -c -o testfile-debug-rel-g.o testfile-zdebug-rel.c +# gcc -Og -g -Xassembler --compress-debug-sections=zlib-gabi \ +# -c -o testfile-debug-rel-z.o testfile-zdebug-rel.c + +testfiles testfile-debug-rel.o testfile-debug-rel-g.o testfile-debug-rel-z.o +tempfiles readelf.out +tempfiles info.out loc.out + +cat > info.out << \EOF + +DWARF section [ 4] '.debug_info' at offset 0x58: + [Offset] + Compilation unit at offset 0: + Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + [ b] compile_unit + producer (strp) "GNU C11 5.3.1 20151207 (Red Hat 5.3.1-2) -mtune=generic -march=x86-64 -g -Og" + language (data1) C99 (12) + name (strp) "testfile-zdebug-rel.c" + comp_dir (strp) "/tmp" + low_pc (addr) 000000000000000000 + high_pc (data8) 24 (0x0000000000000018) + stmt_list (sec_offset) 0 + [ 2d] subprogram + external (flag_present) + name (strp) "main" + decl_file (data1) 1 + decl_line (data1) 4 + prototyped (flag_present) + type (ref4) [ 80] + low_pc (addr) 000000000000000000 + high_pc (data8) 24 (0x0000000000000018) + frame_base (exprloc) + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) + sibling (ref4) [ 80] + [ 4e] formal_parameter + name (strp) "argc" + decl_file (data1) 1 + decl_line (data1) 4 + type (ref4) [ 80] + location (sec_offset) location list [ 0] + [ 5d] formal_parameter + name (strp) "argv" + decl_file (data1) 1 + decl_line (data1) 4 + type (ref4) [ 87] + location (exprloc) + [ 0] reg4 + [ 6a] variable + name (string) "a" + decl_file (data1) 1 + decl_line (data1) 6 + type (ref4) [ 9a] + const_value (sdata) -9 + [ 74] variable + name (string) "b" + decl_file (data1) 1 + decl_line (data1) 7 + type (ref4) [ 9a] + location (exprloc) + [ 0] reg5 + [ 80] base_type + byte_size (data1) 4 + encoding (data1) signed (5) + name (string) "int" + [ 87] pointer_type + byte_size (data1) 8 + type (ref4) [ 8d] + [ 8d] pointer_type + byte_size (data1) 8 + type (ref4) [ 93] + [ 93] base_type + byte_size (data1) 1 + encoding (data1) signed_char (6) + name (strp) "char" + [ 9a] base_type + byte_size (data1) 8 + encoding (data1) unsigned (7) + name (strp) "long unsigned int" +EOF + +cat info.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=info testfile-debug-rel.o + +cat info.out | sed -e "s/'.debug_info'/'.zdebug_info'/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=info testfile-debug-rel-g.o + +cat info.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=info testfile-debug-rel-z.o + +cat > loc.out << \EOF + +DWARF section [ 7] '.debug_loc' at offset 0x185: + [ 0] 000000000000000000..0x0000000000000003 [ 0] reg5 + 0x0000000000000003..0x0000000000000010 [ 0] breg5 -42 + [ 2] stack_value + 0x0000000000000010..0x0000000000000018 [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value +EOF + +cat loc.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug-rel.o + +cat loc.out | sed -e "s/'.debug_loc' at offset 0x185/'.zdebug_loc' at offset 0x138/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug-rel-g.o + +cat loc.out | sed -e "s/at offset 0x185/at offset 0x150/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug-rel-z.o + +exit 0 diff --git a/tests/run-readelf-zp.sh b/tests/run-readelf-zp.sh new file mode 100755 index 0000000..872126c --- /dev/null +++ b/tests/run-readelf-zp.sh @@ -0,0 +1,271 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-readelf-zdebug.sh for testfile. + +testfiles testfile-zdebug +testrun_compare ${abs_top_builddir}/src/readelf -z -p.zdebug_str testfile-zdebug <<\EOF + +String section [35] '.zdebug_str' contains 2431 bytes (6433 uncompressed) at offset 0x1da3: + [ 0] UINT64_MAX 18446744073709551615UL + [ 22] __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) + [ 5c] __linux 1 + [ 66] __SIZEOF_SIZE_T__ 8 + [ 7a] __UINTPTR_TYPE__ long unsigned int + [ 9d] __SIZEOF_POINTER__ 8 + [ b2] __UINT8_MAX__ 255 + [ c4] __PTRDIFF_MAX__ 9223372036854775807L + [ e9] __DEC64_MANT_DIG__ 16 + [ ff] __FLT_RADIX__ 2 + [ 10f] __DEC32_MIN__ 1E-95DF + [ 125] __unix__ 1 + [ 130] testfile-zdebug.c + [ 142] __UINT_LEAST64_MAX__ 18446744073709551615UL + [ 16e] __SIZEOF_WINT_T__ 4 + [ 182] __LONG_MAX__ 9223372036854775807L + [ 1a4] __LDBL_MIN__ 3.36210314311209350626e-4932L + [ 1cf] __GCC_ATOMIC_SHORT_LOCK_FREE 2 + [ 1ee] __LP64__ 1 + [ 1f9] __UINT64_C(c) c ## UL + [ 20f] __DBL_HAS_INFINITY__ 1 + [ 226] __SSE2_MATH__ 1 + [ 236] __linux__ 1 + [ 242] __STDC_HOSTED__ 1 + [ 254] __WINT_MIN__ 0U + [ 264] __x86_64__ 1 + [ 271] __UINT32_TYPE__ unsigned int + [ 28e] __UINT_LEAST8_MAX__ 255 + [ 2a6] __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD + [ 2d7] __FLT_MAX__ 3.40282346638528859812e+38F + [ 2ff] long unsigned int + [ 311] __DBL_MANT_DIG__ 53 + [ 325] linux 1 + [ 32d] __DBL_HAS_QUIET_NAN__ 1 + [ 345] __UINT8_TYPE__ unsigned char + [ 362] __DEC32_MAX_EXP__ 97 + [ 377] __INT32_TYPE__ int + [ 38a] __SIG_ATOMIC_TYPE__ int + [ 3a2] __DEC64_MAX_EXP__ 385 + [ 3b8] __DBL_MIN_EXP__ (-1021) + [ 3d0] _LP64 1 + [ 3d8] __LDBL_HAS_INFINITY__ 1 + [ 3f0] __INT_FAST64_TYPE__ long int + [ 40d] __gnu_linux__ 1 + [ 41d] __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 + [ 43e] __UINT_FAST64_TYPE__ long unsigned int + [ 465] __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ + [ 48c] __UINT16_MAX__ 65535 + [ 4a1] __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ + [ 4ce] __PRAGMA_REDEFINE_EXTNAME 1 + [ 4ea] __INT_LEAST16_TYPE__ short int + [ 509] __k8__ 1 + [ 512] __DECIMAL_DIG__ 21 + [ 525] main + [ 52a] __DBL_MAX__ ((double)1.79769313486231570815e+308L) + [ 55d] __INT16_TYPE__ short int + [ 576] __LDBL_HAS_QUIET_NAN__ 1 + [ 58f] __SIZEOF_DOUBLE__ 8 + [ 5a3] __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF + [ 5ca] __ATOMIC_SEQ_CST 5 + [ 5dd] __UINT64_TYPE__ long unsigned int + [ 5ff] __INT_LEAST32_TYPE__ int + [ 618] __INT_LEAST64_MAX__ 9223372036854775807L + [ 641] __OPTIMIZE__ 1 + [ 650] __INTMAX_C(c) c ## L + [ 665] __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 + [ 687] __INT_FAST8_MAX__ 127 + [ 69d] __PTRDIFF_TYPE__ long int + [ 6b7] __LDBL_MIN_EXP__ (-16381) + [ 6d1] __SIZEOF_LONG_LONG__ 8 + [ 6e8] __FLT_DIG__ 6 + [ 6f6] __UINTMAX_MAX__ 18446744073709551615UL + [ 71d] __SIZEOF_WCHAR_T__ 4 + [ 732] __INT64_C(c) c ## L + [ 746] __UINTPTR_MAX__ 18446744073709551615UL + [ 76d] __FLT_MAX_10_EXP__ 38 + [ 783] __FLT_MIN__ 1.17549435082228750797e-38F + [ 7ab] __UINT_LEAST64_TYPE__ long unsigned int + [ 7d3] __SIZEOF_LONG_DOUBLE__ 16 + [ 7ed] __SIZE_MAX__ 18446744073709551615UL + [ 811] __INT8_C(c) c + [ 81f] __amd64__ 1 + [ 82b] __INT_LEAST64_TYPE__ long int + [ 849] __INT_FAST64_MAX__ 9223372036854775807L + [ 871] __DEC_EVAL_METHOD__ 2 + [ 887] __DEC32_MAX__ 9.999999E96DF + [ 8a3] __GNUC_MINOR__ 8 + [ 8b4] __WCHAR_MAX__ 2147483647 + [ 8cd] __SIZE_TYPE__ long unsigned int + [ 8ed] __INT8_MAX__ 127 + [ 8fe] __INTMAX_MAX__ 9223372036854775807L + [ 922] __ATOMIC_HLE_RELEASE 131072 + [ 93e] __FLT_HAS_QUIET_NAN__ 1 + [ 956] __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) + [ 98c] __FLT_MIN_EXP__ (-125) + [ 9a3] __INT_LEAST8_MAX__ 127 + [ 9ba] __SIZEOF_INT128__ 16 + [ 9cf] __INTPTR_MAX__ 9223372036854775807L + [ 9f3] __INTPTR_TYPE__ long int + [ a0c] __LDBL_MIN_10_EXP__ (-4931) + [ a28] __GCC_ATOMIC_POINTER_LOCK_FREE 2 + [ a49] __UINT_LEAST32_MAX__ 4294967295U + [ a6a] __SIZEOF_SHORT__ 2 + [ a7d] __LDBL_MAX_10_EXP__ 4932 + [ a96] __INT16_C(c) c + [ aa5] __MMX__ 1 + [ aaf] unix 1 + [ ab6] __FLT_MAX_EXP__ 128 + [ aca] __DEC64_MAX__ 9.999999999999999E384DD + [ af0] __FLT_EPSILON__ 1.19209289550781250000e-7F + [ b1b] __INT_FAST16_TYPE__ long int + [ b38] __VERSION__ "4.8.2 20140120 (Red Hat 4.8.2-15)" + [ b68] __GCC_ATOMIC_LLONG_LOCK_FREE 2 + [ b87] __DEC128_MIN_EXP__ (-6142) + [ ba2] __ATOMIC_RELEASE 3 + [ bb5] __GNUC_PATCHLEVEL__ 2 + [ bcb] __UINT_FAST64_MAX__ 18446744073709551615UL + [ bf6] __DBL_DECIMAL_DIG__ 17 + [ c0d] __DBL_DIG__ 15 + [ c1c] __FLT_MANT_DIG__ 24 + [ c30] __FLT_DECIMAL_DIG__ 9 + [ c46] __INT16_MAX__ 32767 + [ c5a] __DEC128_MIN__ 1E-6143DL + [ c73] __BIGGEST_ALIGNMENT__ 16 + [ c8c] __INT64_MAX__ 9223372036854775807L + [ caf] __INT_FAST32_TYPE__ long int + [ ccc] __GCC_ATOMIC_INT_LOCK_FREE 2 + [ ce9] __DEC128_MAX_EXP__ 6145 + [ d01] __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 + [ d26] __FXSR__ 1 + [ d31] __INT8_TYPE__ signed char + [ d4b] __ATOMIC_ACQ_REL 4 + [ d5e] __UINT_LEAST16_MAX__ 65535 + [ d79] __UINTMAX_TYPE__ long unsigned int + [ d9c] __UINT_FAST8_MAX__ 255 + [ db3] __ORDER_BIG_ENDIAN__ 4321 + [ dcd] __INT_LEAST32_MAX__ 2147483647 + [ dec] __UINT_LEAST16_TYPE__ short unsigned int + [ e15] __INT_FAST8_TYPE__ signed char + [ e34] __DBL_MAX_EXP__ 1024 + [ e49] __STDC__ 1 + [ e54] __ELF__ 1 + [ e5e] __FLT_EVAL_METHOD__ 0 + [ e74] __ATOMIC_ACQUIRE 2 + [ e87] __DEC64_EPSILON__ 1E-15DD + [ ea1] __INT32_MAX__ 2147483647 + [ eba] __GCC_ATOMIC_CHAR_LOCK_FREE 2 + [ ed8] __DEC128_EPSILON__ 1E-33DL + [ ef3] __UINT_FAST8_TYPE__ unsigned char + [ f15] __amd64 1 + [ f1f] __DEC32_MIN_EXP__ (-94) + [ f37] __GCC_HAVE_DWARF2_CFI_ASM 1 + [ f53] __LDBL_DIG__ 18 + [ f63] __UINT32_MAX__ 4294967295U + [ f7e] __GNUC_GNU_INLINE__ 1 + [ f94] __SSE2__ 1 + [ f9f] __ATOMIC_HLE_ACQUIRE 65536 + [ fba] __SSE_MATH__ 1 + [ fc9] __INT_FAST16_MAX__ 9223372036854775807L + [ ff1] __LDBL_MAX__ 1.18973149535723176502e+4932L + [ 101c] __DBL_MIN__ ((double)2.22507385850720138309e-308L) + [ 104f] __DEC128_MANT_DIG__ 34 + [ 1066] __INT32_C(c) c + [ 1075] __DEC64_MIN_EXP__ (-382) + [ 108e] __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) + [ 10b1] __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 + [ 10d3] __LDBL_MAX_EXP__ 16384 + [ 10ea] __DEC32_MANT_DIG__ 7 + [ 10ff] __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL + [ 1139] __CHAR32_TYPE__ unsigned int + [ 1156] __INT_LEAST8_TYPE__ signed char + [ 1176] __UINT16_C(c) c + [ 1186] __GCC_ATOMIC_BOOL_LOCK_FREE 2 + [ 11a4] __SIZEOF_FLOAT__ 4 + [ 11b7] __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 + [ 11dc] __DBL_MAX_10_EXP__ 308 + [ 11f3] __LDBL_EPSILON__ 1.08420217248550443401e-19L + [ 1220] __ORDER_PDP_ENDIAN__ 3412 + [ 123a] __ORDER_LITTLE_ENDIAN__ 1234 + [ 1257] __WINT_TYPE__ unsigned int + [ 1272] __unix 1 + [ 127b] __ATOMIC_RELAXED 0 + [ 128e] __UINT_FAST32_MAX__ 18446744073709551615UL + [ 12b9] __INT_FAST32_MAX__ 9223372036854775807L + [ 12e1] __SIG_ATOMIC_MAX__ 2147483647 + [ 12ff] __UINT_FAST32_TYPE__ long unsigned int + [ 1326] __INT_MAX__ 2147483647 + [ 133d] __GXX_ABI_VERSION 1002 + [ 1354] __SIZEOF_INT__ 4 + [ 1365] char + [ 136a] __UINT_FAST16_TYPE__ long unsigned int + [ 1391] __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L + [ 13c3] __WINT_MAX__ 4294967295U + [ 13dc] __FLT_HAS_INFINITY__ 1 + [ 13f3] __SHRT_MAX__ 32767 + [ 1406] __INT_LEAST16_MAX__ 32767 + [ 1420] __LONG_LONG_MAX__ 9223372036854775807LL + [ 1448] __SIZEOF_LONG__ 8 + [ 145a] __INTMAX_TYPE__ long int + [ 1473] __LDBL_HAS_DENORM__ 1 + [ 1489] __code_model_small__ 1 + [ 14a0] __REGISTER_PREFIX__ + [ 14b5] __ATOMIC_CONSUME 1 + [ 14c8] __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL + [ 150d] __GNUC__ 4 + [ 1518] __UINT16_TYPE__ short unsigned int + [ 153b] __SSE__ 1 + [ 1545] __UINT32_C(c) c ## U + [ 155a] __k8 1 + [ 1561] __UINTMAX_C(c) c ## UL + [ 1578] __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 + [ 159d] __SIZEOF_PTRDIFF_T__ 8 + [ 15b4] __CHAR_BIT__ 8 + [ 15c3] __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) + [ 15f0] __DEC32_EPSILON__ 1E-6DF + [ 1609] __UINT_LEAST32_TYPE__ unsigned int + [ 162c] __DBL_HAS_DENORM__ 1 + [ 1641] /tmp + [ 1646] __LDBL_MANT_DIG__ 64 + [ 165b] __GCC_ATOMIC_LONG_LOCK_FREE 2 + [ 1679] __DECIMAL_BID_FORMAT__ 1 + [ 1692] __FLT_MIN_10_EXP__ (-37) + [ 16ab] __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 + [ 16cf] __WCHAR_TYPE__ int + [ 16e2] __FINITE_MATH_ONLY__ 0 + [ 16f9] argc + [ 16fe] __USER_LABEL_PREFIX__ + [ 1715] __CHAR16_TYPE__ short unsigned int + [ 1738] __UINT64_MAX__ 18446744073709551615UL + [ 175e] __UINT8_C(c) c + [ 176d] __x86_64 1 + [ 1778] __UINT_LEAST8_TYPE__ unsigned char + [ 179b] __INT64_TYPE__ long int + [ 17b3] __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 + [ 17d8] argv + [ 17dd] __GNUC_RH_RELEASE__ 15 + [ 17f4] __UINT_FAST16_MAX__ 18446744073709551615UL + [ 181f] __FLT_HAS_DENORM__ 1 + [ 1834] __DEC64_MIN__ 1E-383DD + [ 184b] __DBL_MIN_10_EXP__ (-307) + [ 1865] __FLT_DENORM_MIN__ 1.40129846432481707092e-45F + [ 1894] GNU C 4.8.2 20140120 (Red Hat 4.8.2-15) -mtune=generic -march=x86-64 -g3 -O3 -fuse-ld=gold -fno-asynchronous-unwind-tables + [ 190f] __SCHAR_MAX__ 127 +EOF + +exit 0 diff --git a/tests/run-readelf-zx.sh b/tests/run-readelf-zx.sh new file mode 100755 index 0000000..994528c --- /dev/null +++ b/tests/run-readelf-zx.sh @@ -0,0 +1,66 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-elfgetchdr.sh for testfiles. + +testfiles testfile-zgnu64 +testrun_compare ${abs_top_builddir}/src/readelf -z -x.zdebug_aranges testfile-zgnu64 <<\EOF + +Hex dump of section [2] '.zdebug_aranges', 50 bytes (96 uncompressed) at offset 0x260: + 0x00000000 2c000000 02000000 00000800 00000000 ,............... + 0x00000010 78004000 00000000 14000000 00000000 x.@............. + 0x00000020 00000000 00000000 00000000 00000000 ................ + 0x00000030 2c000000 02005500 00000800 00000000 ,.....U......... + 0x00000040 8c004000 00000000 16000000 00000000 ..@............. + 0x00000050 00000000 00000000 00000000 00000000 ................ +EOF + +testfiles testfile-zgabi64 +testrun_compare ${abs_top_builddir}/src/readelf -z -x.debug_aranges testfile-zgabi64 <<\EOF + +Hex dump of section [2] '.debug_aranges', 62 bytes (96 uncompressed) at offset 0x260: + 0x00000000 2c000000 02000000 00000800 00000000 ,............... + 0x00000010 78004000 00000000 14000000 00000000 x.@............. + 0x00000020 00000000 00000000 00000000 00000000 ................ + 0x00000030 2c000000 02005500 00000800 00000000 ,.....U......... + 0x00000040 8c004000 00000000 16000000 00000000 ..@............. + 0x00000050 00000000 00000000 00000000 00000000 ................ +EOF + +testfiles testfile-zgnu32 +testrun_compare ${abs_top_builddir}/src/readelf -z -x.zdebug_aranges testfile-zgnu32 <<\EOF + +Hex dump of section [2] '.zdebug_aranges', 49 bytes (64 uncompressed) at offset 0x1c0: + 0x00000000 1c000000 02000000 00000400 00000000 ................ + 0x00000010 54800408 14000000 00000000 00000000 T............... + 0x00000020 1c000000 02004d00 00000400 00000000 ......M......... + 0x00000030 68800408 16000000 00000000 00000000 h............... +EOF + +testfiles testfile-zgabi32 +testrun_compare ${abs_top_builddir}/src/readelf -z -x.debug_aranges testfile-zgabi32 <<\EOF + +Hex dump of section [2] '.debug_aranges', 49 bytes (64 uncompressed) at offset 0x1c0: + 0x00000000 1c000000 02000000 00000400 00000000 ................ + 0x00000010 54800408 14000000 00000000 00000000 T............... + 0x00000020 1c000000 02004d00 00000400 00000000 ......M......... + 0x00000030 68800408 16000000 00000000 00000000 h............... +EOF + +exit 0 diff --git a/tests/run-stack-d-test.sh b/tests/run-stack-d-test.sh index 040c2fa..a9f0380 100755 --- a/tests/run-stack-d-test.sh +++ b/tests/run-stack-d-test.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2014 Red Hat, Inc. +# Copyright (C) 2014, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -68,21 +68,26 @@ else STACKCMD=${abs_top_builddir}/src/stack fi -# Without -d the top function comes out as fu. -testrun_compare ${abs_top_builddir}/src/stack -n 2 -e testfiledwarfinlines --core testfiledwarfinlines.core<. + +if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then + echo "demangler unsupported" + exit 77 +fi + +. $srcdir/test-subr.sh + +# See run-stack-d-test.sh and run-stack-i-test.sh +# Same tests, now with demangler support, no -r, and without -d. +# Only change in output is an explit fu(int) instead of _Z2fui. + +testfiles testfiledwarfinlines testfiledwarfinlines.core + +# Depending on whether we are running make check or make installcheck +# the actual binary name under test might be different. It is used in +# the error message, which we also try to match. +if test "$elfutils_testrun" = "installed"; then +STACKCMD=${bindir}/`program_transform stack` +else +STACKCMD=${abs_top_builddir}/src/stack +fi + +# Disable valgrind while dumping because of a bug unmapping libc.so. +# https://bugs.kde.org/show_bug.cgi?id=327427 +SAVED_VALGRIND_CMD="$VALGRIND_CMD" +unset VALGRIND_CMD + +# Without -d the top function comes out as fu. +testrun_compare ${abs_top_builddir}/src/stack -n 2 -e testfiledwarfinlines --core testfiledwarfinlines.core<. + +. $srcdir/test-subr.sh + +# Generate a file with merged .shstrtab/.strtab table. +# strip and unstrip it. Check all files with elflint. + +# A random ET_EXEC file +input=${abs_top_builddir}/tests/elfstrmerge +merged=merged.elf +stripped=${merged}.stripped +debugfile=${merged}.debug +remerged=remerged.elf + +tempfiles $merged $stripped $debugfile $remerged + +echo elflint $input +testrun ${abs_top_builddir}/src/elflint --gnu $input +echo elfstrmerge +testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input +echo elflint $merged +testrun ${abs_top_builddir}/src/elflint --gnu $merged +echo strip +testrun ${abs_top_builddir}/src/strip -o $stripped -f $debugfile $merged +echo elflint $stripped +testrun ${abs_top_builddir}/src/elflint --gnu $stripped +echo elflint $debugfile +testrun ${abs_top_builddir}/src/elflint --gnu -d $debugfile +echo unstrip +testrun ${abs_top_builddir}/src/unstrip -o $remerged $stripped $debugfile +echo elflint $remerged +testrun ${abs_top_builddir}/src/elflint --gnu $remerged +echo elfcmp +testrun ${abs_top_builddir}/src/elfcmp $merged $remerged + +# A random ET_REL file +input=${abs_top_builddir}/tests/elfstrmerge.o +merged=merged.elf +stripped=${merged}.stripped +debugfile=${merged}.debug +remerged=remerged.elf + +tempfiles $merged $stripped $debugfile $remerged + +echo elflint $input +testrun ${abs_top_builddir}/src/elflint --gnu $input +echo elfstrmerge +testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input +echo elflint $merged +testrun ${abs_top_builddir}/src/elflint --gnu $merged +echo strip +testrun ${abs_top_builddir}/src/strip -o $stripped -f $debugfile $merged +echo elflint $stripped +testrun ${abs_top_builddir}/src/elflint --gnu $stripped +echo elflint $debugfile +testrun ${abs_top_builddir}/src/elflint --gnu -d $debugfile +echo unstrip +testrun ${abs_top_builddir}/src/unstrip -o $remerged $stripped $debugfile +echo elflint $remerged +testrun ${abs_top_builddir}/src/elflint --gnu $remerged +echo elfcmp +testrun ${abs_top_builddir}/src/elfcmp $merged $remerged + +exit 0 diff --git a/tests/run-strip-test.sh b/tests/run-strip-test.sh index c558e90..43d27e5 100755 --- a/tests/run-strip-test.sh +++ b/tests/run-strip-test.sh @@ -49,6 +49,13 @@ testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip testfile.temp testfi testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip } +# Now strip in-place and make sure it is smaller. +SIZE_original=$(stat -c%s $original) +testrun ${abs_top_builddir}/src/strip $original +SIZE_stripped=$(stat -c%s $original) +test $SIZE_stripped -lt $SIZE_original || + { echo "*** failure in-place strip file not smaller $original"; status=1; } + tempfiles testfile.sections testrun ${abs_top_builddir}/src/readelf -S testfile.temp > testfile.sections || status=$? fgrep ' .debug_' testfile.sections && status=1 diff --git a/tests/run-strip-test10.sh b/tests/run-strip-test10.sh new file mode 100755 index 0000000..a867b1b --- /dev/null +++ b/tests/run-strip-test10.sh @@ -0,0 +1,22 @@ +#! /bin/sh +# Copyright (C) H.J. Lu , 2015. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +original=testfile-x32 +stripped=testfile-x32-d +debugfile=testfile-x32-debug + +. $srcdir/run-strip-test.sh diff --git a/tests/run-strip-test9.sh b/tests/run-strip-test9.sh new file mode 100755 index 0000000..0c6fae2 --- /dev/null +++ b/tests/run-strip-test9.sh @@ -0,0 +1,21 @@ +#! /bin/sh +# Copyright (C) H.J. Lu , 2015. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +original=testfile-x32 +stripped=testfile-x32-s +. $srcdir/run-strip-test.sh diff --git a/tests/run-strptr.sh b/tests/run-strptr.sh new file mode 100755 index 0000000..af90a02 --- /dev/null +++ b/tests/run-strptr.sh @@ -0,0 +1,98 @@ +#! /bin/sh +# Copyright (C) 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# A random 32bit and 64bit testfile +testfiles testfile testfile10 + +testrun_compare ${abs_top_builddir}/tests/strptr testfile <<\EOF +Strings in section 32: +[0] '' +[1] '.symtab' +[9] '.strtab' +[11] '.shstrtab' +[1b] '.interp' +[23] '.note.ABI-tag' +[31] '.hash' +[37] '.dynsym' +[3f] '.dynstr' +[47] '.gnu.version' +[54] '.gnu.version_r' +[63] '.rel.got' +[6c] '.rel.plt' +[75] '.init' +[7b] '.plt' +[80] '.text' +[86] '.fini' +[8c] '.rodata' +[94] '.data' +[9a] '.eh_frame' +[a4] '.ctors' +[ab] '.dtors' +[b2] '.got' +[b7] '.dynamic' +[c0] '.sbss' +[c6] '.bss' +[cb] '.stab' +[d1] '.stabstr' +[da] '.comment' +[e3] '.debug_aranges' +[f2] '.debug_pubnames' +[102] '.debug_info' +[10e] '.debug_abbrev' +[11c] '.debug_line' +[128] '.note' +EOF + +testrun_compare ${abs_top_builddir}/tests/strptr testfile10 <<\EOF +Strings in section 30: +[0] '' +[1] '.symtab' +[9] '.strtab' +[11] '.shstrtab' +[1b] '.hash' +[21] '.dynsym' +[29] '.dynstr' +[31] '.gnu.version' +[3e] '.gnu.version_r' +[4d] '.rela.dyn' +[57] '.init' +[5d] '.text' +[63] '.fini' +[69] '.eh_frame' +[73] '.data' +[79] '.dynamic' +[82] '.ctors' +[89] '.dtors' +[90] '.jcr' +[95] '.plt' +[9a] '.got' +[9f] '.sdata' +[a6] '.sbss' +[ac] '.bss' +[b1] '.comment' +[ba] '.debug_aranges' +[c9] '.debug_pubnames' +[d9] '.debug_abbrev' +[e7] '.debug_line' +[f3] '.debug_frame' +[100] '.debug_str' +[10b] '.rela.debug_info' +EOF + +exit 0 diff --git a/tests/run-test-archive64.sh b/tests/run-test-archive64.sh index 43df16e..2d8c21d 100755 --- a/tests/run-test-archive64.sh +++ b/tests/run-test-archive64.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2012 Red Hat, Inc. +# Copyright (C) 2012, 2014 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -40,4 +40,16 @@ Archive member 'ccc.o' contains: ccc3 EOF +testrun_compare ${abs_top_builddir}/src/nm -P -g testarchive64.a <<\EOF +testarchive64.a[aaa.o]: +aaa T 0000000000000000 0000000000000016 +testarchive64.a[bbb.o]: +bbb T 0000000000000000 0000000000000016 +bbb2 T 0000000000000018 0000000000000016 +testarchive64.a[ccc.o]: +ccc T 0000000000000000 0000000000000016 +ccc2 T 0000000000000018 0000000000000016 +ccc3 T 0000000000000030 0000000000000016 +EOF + exit 0 diff --git a/tests/run-typeiter.sh b/tests/run-typeiter.sh index 605ee2a..2687bab 100755 --- a/tests/run-typeiter.sh +++ b/tests/run-typeiter.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2012 Red Hat, Inc. +# Copyright (C) 2012, 2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -41,14 +41,22 @@ # # g++ -gdwarf-4 -g -fdebug-types-section -testfiles testfile59 +# echo 'struct A{ struct B {} x;};A a; A::B b;int main(){return 0;}' \ +# | g++ -x c++ -g -fdebug-types-section -o testfile-debug-types - + +testfiles testfile59 testfile-debug-types testrun_compare ${abs_builddir}/typeiter testfile59 <<\EOF ok EOF testrun_compare ${abs_builddir}/typeiter2 testfile59 <<\EOF -ok +ok s1 [25] +EOF + +testrun_compare ${abs_builddir}/typeiter2 testfile-debug-types <<\EOF +ok A [68] +ok B [38] EOF exit 0 diff --git a/tests/run-unstrip-n.sh b/tests/run-unstrip-n.sh index 12c3822..37cbd60 100755 --- a/tests/run-unstrip-n.sh +++ b/tests/run-unstrip-n.sh @@ -67,7 +67,7 @@ remove_files="$remove_files $outfile2" grep -v libc.so.6 $outfile | sort >$outfile2 diff -u $outfile2 - <. + +. $srcdir/test-subr.sh + +# A random 32bit and 64bit testfile +testfiles testfile testfile10 + +testrun_compare ${abs_top_builddir}/tests/zstrptr testfile <<\EOF +Strings in section 32 (compressed): +[0] '' +[1] '.symtab' +[9] '.strtab' +[11] '.shstrtab' +[1b] '.interp' +[23] '.note.ABI-tag' +[31] '.hash' +[37] '.dynsym' +[3f] '.dynstr' +[47] '.gnu.version' +[54] '.gnu.version_r' +[63] '.rel.got' +[6c] '.rel.plt' +[75] '.init' +[7b] '.plt' +[80] '.text' +[86] '.fini' +[8c] '.rodata' +[94] '.data' +[9a] '.eh_frame' +[a4] '.ctors' +[ab] '.dtors' +[b2] '.got' +[b7] '.dynamic' +[c0] '.sbss' +[c6] '.bss' +[cb] '.stab' +[d1] '.stabstr' +[da] '.comment' +[e3] '.debug_aranges' +[f2] '.debug_pubnames' +[102] '.debug_info' +[10e] '.debug_abbrev' +[11c] '.debug_line' +[128] '.note' +Strings in section 32 (uncompressed): +[0] '' +[1] '.symtab' +[9] '.strtab' +[11] '.shstrtab' +[1b] '.interp' +[23] '.note.ABI-tag' +[31] '.hash' +[37] '.dynsym' +[3f] '.dynstr' +[47] '.gnu.version' +[54] '.gnu.version_r' +[63] '.rel.got' +[6c] '.rel.plt' +[75] '.init' +[7b] '.plt' +[80] '.text' +[86] '.fini' +[8c] '.rodata' +[94] '.data' +[9a] '.eh_frame' +[a4] '.ctors' +[ab] '.dtors' +[b2] '.got' +[b7] '.dynamic' +[c0] '.sbss' +[c6] '.bss' +[cb] '.stab' +[d1] '.stabstr' +[da] '.comment' +[e3] '.debug_aranges' +[f2] '.debug_pubnames' +[102] '.debug_info' +[10e] '.debug_abbrev' +[11c] '.debug_line' +[128] '.note' +EOF + +testrun_compare ${abs_top_builddir}/tests/zstrptr testfile10 <<\EOF +Strings in section 30 (compressed): +[0] '' +[1] '.symtab' +[9] '.strtab' +[11] '.shstrtab' +[1b] '.hash' +[21] '.dynsym' +[29] '.dynstr' +[31] '.gnu.version' +[3e] '.gnu.version_r' +[4d] '.rela.dyn' +[57] '.init' +[5d] '.text' +[63] '.fini' +[69] '.eh_frame' +[73] '.data' +[79] '.dynamic' +[82] '.ctors' +[89] '.dtors' +[90] '.jcr' +[95] '.plt' +[9a] '.got' +[9f] '.sdata' +[a6] '.sbss' +[ac] '.bss' +[b1] '.comment' +[ba] '.debug_aranges' +[c9] '.debug_pubnames' +[d9] '.debug_abbrev' +[e7] '.debug_line' +[f3] '.debug_frame' +[100] '.debug_str' +[10b] '.rela.debug_info' +Strings in section 30 (uncompressed): +[0] '' +[1] '.symtab' +[9] '.strtab' +[11] '.shstrtab' +[1b] '.hash' +[21] '.dynsym' +[29] '.dynstr' +[31] '.gnu.version' +[3e] '.gnu.version_r' +[4d] '.rela.dyn' +[57] '.init' +[5d] '.text' +[63] '.fini' +[69] '.eh_frame' +[73] '.data' +[79] '.dynamic' +[82] '.ctors' +[89] '.dtors' +[90] '.jcr' +[95] '.plt' +[9a] '.got' +[9f] '.sdata' +[a6] '.sbss' +[ac] '.bss' +[b1] '.comment' +[ba] '.debug_aranges' +[c9] '.debug_pubnames' +[d9] '.debug_abbrev' +[e7] '.debug_line' +[f3] '.debug_frame' +[100] '.debug_str' +[10b] '.rela.debug_info' +EOF + +exit 0 diff --git a/tests/sectiondump.c b/tests/sectiondump.c index f865954..3033fed 100644 --- a/tests/sectiondump.c +++ b/tests/sectiondump.c @@ -149,7 +149,7 @@ print_bytes (Elf_Data *data) { size_t inner; - printf ("%*Zx: ", sizeof (size_t) == 4 ? 8 : 16, (size_t) offset + cnt); + printf ("%*zx: ", sizeof (size_t) == 4 ? 8 : 16, (size_t) offset + cnt); for (inner = 0; inner < 16 && cnt + inner < size; ++inner) printf (" %02hhx", buf[cnt + inner]); @@ -172,7 +172,7 @@ print_symtab (Elf *elf, Elf_Data *data) GElf_Sym sym_mem; GElf_Sym *sym = gelf_getsym (data, cnt, &sym_mem); - printf ("%5Zu: %*" PRIx64 " %6" PRIx64 " %4d\n", + printf ("%5zu: %*" PRIx64 " %6" PRIx64 " %4d\n", cnt, class == ELFCLASS32 ? 8 : 16, sym->st_value, diff --git a/tests/show-die-info.c b/tests/show-die-info.c index 0c298ac..34e27a3 100644 --- a/tests/show-die-info.c +++ b/tests/show-die-info.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002, 2004, 2006, 2012 Red Hat, Inc. +/* Copyright (C) 1998-2002, 2004, 2006, 2012, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 1998. @@ -33,9 +33,9 @@ dwarf_tag_string (unsigned int tag) { switch (tag) { -#define ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME; - ALL_KNOWN_DW_TAG -#undef ONE_KNOWN_DW_TAG +#define DWARF_ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_TAG +#undef DWARF_ONE_KNOWN_DW_TAG default: return NULL; } @@ -46,9 +46,9 @@ dwarf_attr_string (unsigned int attrnum) { switch (attrnum) { -#define ONE_KNOWN_DW_AT(NAME, CODE) case CODE: return #NAME; - ALL_KNOWN_DW_AT -#undef ONE_KNOWN_DW_AT +#define DWARF_ONE_KNOWN_DW_AT(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_AT +#undef DWARF_ONE_KNOWN_DW_AT default: return NULL; } diff --git a/tests/strptr.c b/tests/strptr.c new file mode 100644 index 0000000..759664a --- /dev/null +++ b/tests/strptr.c @@ -0,0 +1,95 @@ +/* Test program for elf_strptr function. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include + +int +main (int argc, char *argv[]) +{ + if (argc != 2) + { + printf ("No ELF file given as argument"); + exit (1); + } + + const char *fname = argv[1]; + + // Initialize libelf. + elf_version (EV_CURRENT); + + /* Read the ELF from disk now. */ + int fd = open (fname, O_RDONLY); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-only: %s\n", elf_errmsg (-1)); + exit (1); + } + + size_t ndx; + if (elf_getshdrstrndx (elf, &ndx) != 0) + { + printf ("cannot get section header table index: %s\n", elf_errmsg (-1)); + exit (1); + } + + if (ndx == SHN_UNDEF) + { + printf ("ELF file `%s' doesn't have a section header table index", fname); + exit (1); + } + + printf ("Strings in section %zd:\n", ndx); + + size_t off = 0; + const char *str = elf_strptr (elf, ndx, off); + while (str != NULL) + { + printf ("[%zx] '%s'\n", off, str); + off += strlen (str) + 1; + str = elf_strptr (elf, ndx, off); + } + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + return 0; +} diff --git a/tests/test-elf_cntl_gelf_getshdr.c b/tests/test-elf_cntl_gelf_getshdr.c index b561b53..7371110 100644 --- a/tests/test-elf_cntl_gelf_getshdr.c +++ b/tests/test-elf_cntl_gelf_getshdr.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/tests/test-flag-nobits.c b/tests/test-flag-nobits.c index e58d8c3..15d44ea 100644 --- a/tests/test-flag-nobits.c +++ b/tests/test-flag-nobits.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include @@ -26,10 +30,13 @@ main (int argc, char **argv) elf_version (EV_CURRENT); - int fd = open64 (argv[1], O_RDONLY); + int fd = open (argv[1], O_RDONLY); Elf *stripped = elf_begin (fd, ELF_C_READ, NULL); Elf_Scn *scn = NULL; while ((scn = elf_nextscn (stripped, scn)) != NULL) elf_flagdata (elf_getdata (scn, NULL), ELF_C_SET, ELF_F_DIRTY); + + elf_end (stripped); + return 0; } diff --git a/tests/test-subr.sh b/tests/test-subr.sh index 5e796b4..f397aed 100644 --- a/tests/test-subr.sh +++ b/tests/test-subr.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005-2014 Red Hat, Inc. +# Copyright (C) 2005-2015 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -47,7 +47,7 @@ tempfiles() testfiles() { for file; do - bunzip2 -c ${abs_srcdir}/${file}.bz2 > ${file} 2>/dev/null || exit 77 + bunzip2 -c ${abs_srcdir}/${file}.bz2 > ${file} || exit 77 remove_files="$remove_files $file" done } diff --git a/tests/testfile-debug-rel-g.o.bz2 b/tests/testfile-debug-rel-g.o.bz2 new file mode 100644 index 0000000..b8c94e7 Binary files /dev/null and b/tests/testfile-debug-rel-g.o.bz2 differ diff --git a/tests/testfile-debug-rel-z.o.bz2 b/tests/testfile-debug-rel-z.o.bz2 new file mode 100644 index 0000000..1cdac79 Binary files /dev/null and b/tests/testfile-debug-rel-z.o.bz2 differ diff --git a/tests/testfile-debug-rel.o.bz2 b/tests/testfile-debug-rel.o.bz2 new file mode 100644 index 0000000..a3f8dff Binary files /dev/null and b/tests/testfile-debug-rel.o.bz2 differ diff --git a/tests/testfile-debug-types.bz2 b/tests/testfile-debug-types.bz2 new file mode 100755 index 0000000..a41f493 Binary files /dev/null and b/tests/testfile-debug-types.bz2 differ diff --git a/tests/testfile-info-link.bz2 b/tests/testfile-info-link.bz2 new file mode 100755 index 0000000..073b761 Binary files /dev/null and b/tests/testfile-info-link.bz2 differ diff --git a/tests/testfile-info-link.debuginfo.bz2 b/tests/testfile-info-link.debuginfo.bz2 new file mode 100755 index 0000000..3225d19 Binary files /dev/null and b/tests/testfile-info-link.debuginfo.bz2 differ diff --git a/tests/testfile-info-link.stripped.bz2 b/tests/testfile-info-link.stripped.bz2 new file mode 100755 index 0000000..dcbc9a2 Binary files /dev/null and b/tests/testfile-info-link.stripped.bz2 differ diff --git a/tests/testfile-lex-inlines.bz2 b/tests/testfile-lex-inlines.bz2 new file mode 100755 index 0000000..716e792 Binary files /dev/null and b/tests/testfile-lex-inlines.bz2 differ diff --git a/tests/testfile-macros-0xff.bz2 b/tests/testfile-macros-0xff.bz2 new file mode 100755 index 0000000..a19662a Binary files /dev/null and b/tests/testfile-macros-0xff.bz2 differ diff --git a/tests/testfile-nolfs.bz2 b/tests/testfile-nolfs.bz2 new file mode 100644 index 0000000..ab8351e Binary files /dev/null and b/tests/testfile-nolfs.bz2 differ diff --git a/tests/testfile-sizes1.o.bz2 b/tests/testfile-sizes1.o.bz2 new file mode 100644 index 0000000..479ecb2 Binary files /dev/null and b/tests/testfile-sizes1.o.bz2 differ diff --git a/tests/testfile-sizes2.o.bz2 b/tests/testfile-sizes2.o.bz2 new file mode 100644 index 0000000..7bd7b47 Binary files /dev/null and b/tests/testfile-sizes2.o.bz2 differ diff --git a/tests/testfile-sizes3.o.bz2 b/tests/testfile-sizes3.o.bz2 new file mode 100644 index 0000000..7fa6a8a Binary files /dev/null and b/tests/testfile-sizes3.o.bz2 differ diff --git a/tests/testfile-x32-core.bz2 b/tests/testfile-x32-core.bz2 new file mode 100644 index 0000000..d519851 Binary files /dev/null and b/tests/testfile-x32-core.bz2 differ diff --git a/tests/testfile-x32-d.bz2 b/tests/testfile-x32-d.bz2 new file mode 100755 index 0000000..ad5836e Binary files /dev/null and b/tests/testfile-x32-d.bz2 differ diff --git a/tests/testfile-x32-debug.bz2 b/tests/testfile-x32-debug.bz2 new file mode 100755 index 0000000..d55a004 Binary files /dev/null and b/tests/testfile-x32-debug.bz2 differ diff --git a/tests/testfile-x32-s.bz2 b/tests/testfile-x32-s.bz2 new file mode 100755 index 0000000..a909d33 Binary files /dev/null and b/tests/testfile-x32-s.bz2 differ diff --git a/tests/testfile-x32.bz2 b/tests/testfile-x32.bz2 new file mode 100755 index 0000000..f6df180 Binary files /dev/null and b/tests/testfile-x32.bz2 differ diff --git a/tests/testfile-zgabi32.bz2 b/tests/testfile-zgabi32.bz2 new file mode 100755 index 0000000..6159dbc Binary files /dev/null and b/tests/testfile-zgabi32.bz2 differ diff --git a/tests/testfile-zgabi32be.bz2 b/tests/testfile-zgabi32be.bz2 new file mode 100755 index 0000000..f1f5eb5 Binary files /dev/null and b/tests/testfile-zgabi32be.bz2 differ diff --git a/tests/testfile-zgabi64.bz2 b/tests/testfile-zgabi64.bz2 new file mode 100755 index 0000000..3b44f08 Binary files /dev/null and b/tests/testfile-zgabi64.bz2 differ diff --git a/tests/testfile-zgabi64be.bz2 b/tests/testfile-zgabi64be.bz2 new file mode 100755 index 0000000..d819ae3 Binary files /dev/null and b/tests/testfile-zgabi64be.bz2 differ diff --git a/tests/testfile-zgnu32.bz2 b/tests/testfile-zgnu32.bz2 new file mode 100755 index 0000000..9d622ca Binary files /dev/null and b/tests/testfile-zgnu32.bz2 differ diff --git a/tests/testfile-zgnu32be.bz2 b/tests/testfile-zgnu32be.bz2 new file mode 100755 index 0000000..c1dd589 Binary files /dev/null and b/tests/testfile-zgnu32be.bz2 differ diff --git a/tests/testfile-zgnu64.bz2 b/tests/testfile-zgnu64.bz2 new file mode 100755 index 0000000..1bc2c09 Binary files /dev/null and b/tests/testfile-zgnu64.bz2 differ diff --git a/tests/testfile-zgnu64be.bz2 b/tests/testfile-zgnu64be.bz2 new file mode 100755 index 0000000..390c9c9 Binary files /dev/null and b/tests/testfile-zgnu64be.bz2 differ diff --git a/tests/testfileppc32attrs.o.bz2 b/tests/testfileppc32attrs.o.bz2 new file mode 100644 index 0000000..c8d80a9 Binary files /dev/null and b/tests/testfileppc32attrs.o.bz2 differ diff --git a/tests/typeiter2.c b/tests/typeiter2.c index 6ddfa38..35b6a12 100644 --- a/tests/typeiter2.c +++ b/tests/typeiter2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2012, 2013 Red Hat, Inc. +/* Copyright (C) 2012, 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -23,6 +23,7 @@ #include #include #include +#include int main (int argc, char *argv[]) @@ -71,7 +72,8 @@ main (int argc, char *argv[]) if (form == NULL) printf ("fail\n"); else - printf ("ok\n"); + printf ("ok %s [%" PRIx64 "]\n", + dwarf_diename (form), dwarf_dieoffset (form)); } if (dwarf_siblingof (iter, &iter_mem) != 0) diff --git a/tests/varlocs.c b/tests/varlocs.c index 04f17ff..c3fba89 100644 --- a/tests/varlocs.c +++ b/tests/varlocs.c @@ -1,5 +1,5 @@ /* Test program for dwarf location functions. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -64,9 +64,9 @@ dwarf_encoding_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ATE -#undef ONE_KNOWN_DW_ATE +#define DWARF_ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ATE +#undef DWARF_ONE_KNOWN_DW_ATE }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -82,7 +82,7 @@ print_base_type (Dwarf_Die *base) assert (dwarf_tag (base) == DW_TAG_base_type); Dwarf_Attribute encoding; - Dwarf_Word enctype; + Dwarf_Word enctype = 0; if (dwarf_attr (base, DW_AT_encoding, &encoding) == NULL || dwarf_formudata (&encoding, &enctype) != 0) error (EXIT_FAILURE, 0, "base type without encoding"); @@ -108,11 +108,9 @@ dwarf_opcode_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_OP_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_OP (NAME, CODE) -#define ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP_DESC +#define DWARF_ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_OP +#undef DWARF_ONE_KNOWN_DW_OP }; if (likely (code < sizeof (known) / sizeof (known[0]))) diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c new file mode 100644 index 0000000..b876c10 --- /dev/null +++ b/tests/vdsosyms.c @@ -0,0 +1,110 @@ +/* Test program for getting symbol table from vdso module. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ELFUTILS_HEADER(dwfl) + +#ifndef __linux__ +int +main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) +{ + printf ("Getting the vdso is unsupported.\n"); + return 77; +} +#else /* __linux__ */ +static int vdso_syms = 0; + +static int +module_callback (Dwfl_Module *mod, void **userdata __attribute__((unused)), + const char *name, Dwarf_Addr start __attribute__((unused)), + void *arg __attribute__((unused))) +{ + /* We can only recognize the vdso by inspecting the "magic name". */ + printf ("module name: %s\n", name); + if (strncmp ("[vdso: ", name, 7) == 0) + { + vdso_syms = dwfl_module_getsymtab (mod); + printf ("vdso syms: %d\n", vdso_syms); + if (vdso_syms < 0) + error (2, 0, "dwfl_module_getsymtab: %s", dwfl_errmsg (-1)); + + for (int i = 0; i < vdso_syms; i++) + { + GElf_Sym sym; + GElf_Addr addr; + const char *sname = dwfl_module_getsym_info (mod, i, &sym, &addr, + NULL, NULL, NULL); + assert (sname != NULL); + printf ("%d: '%s' %" PRIx64 " (%" PRIx64 ")\n", + i, sname, sym.st_value, addr); + } + } + + return DWARF_CB_OK; +} + +int +main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) +{ + static char *debuginfo_path; + static const Dwfl_Callbacks proc_callbacks = + { + .find_debuginfo = dwfl_standard_find_debuginfo, + .debuginfo_path = &debuginfo_path, + + .find_elf = dwfl_linux_proc_find_elf, + }; + Dwfl *dwfl = dwfl_begin (&proc_callbacks); + if (dwfl == NULL) + error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); + + /* Take ourself as "arbitrary" process to inspect. This should work + even with "restricted ptrace". */ + pid_t pid = getpid(); + + int result = dwfl_linux_proc_report (dwfl, pid); + if (result < 0) + error (2, 0, "dwfl_linux_proc_report: %s", dwfl_errmsg (-1)); + else if (result > 0) + error (2, result, "dwfl_linux_proc_report"); + + /* Also explicitly attach for older kernels (cannot read vdso otherwise). */ + result = dwfl_linux_proc_attach (dwfl, pid, false); + if (result < 0) + error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1)); + else if (result > 0) + error (2, result, "dwfl_linux_proc_attach"); + + if (dwfl_report_end (dwfl, NULL, NULL) != 0) + error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1)); + + if (dwfl_getmodules (dwfl, module_callback, NULL, 0) != 0) + error (1, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1)); + + /* No symbols is ok, then we haven't seen the vdso at all on this arch. */ + return vdso_syms >= 0 ? 0 : -1; +} + +#endif /* ! __linux__ */ diff --git a/tests/zstrptr.c b/tests/zstrptr.c new file mode 100644 index 0000000..6d8e19f --- /dev/null +++ b/tests/zstrptr.c @@ -0,0 +1,124 @@ +/* Test program for elf_strptr function. + Copyright (C) 2015 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include + +int +main (int argc, char *argv[]) +{ + if (argc != 2) + { + printf ("No ELF file given as argument"); + exit (1); + } + + const char *fname = argv[1]; + + // Initialize libelf. + elf_version (EV_CURRENT); + + /* Read the ELF from disk now. */ + int fd = open (fname, O_RDONLY); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-only: %s\n", elf_errmsg (-1)); + exit (1); + } + + size_t ndx; + if (elf_getshdrstrndx (elf, &ndx) != 0) + { + printf ("cannot get section header table index: %s\n", elf_errmsg (-1)); + exit (1); + } + + if (ndx == SHN_UNDEF) + { + printf ("ELF file `%s' doesn't have a section header table index", fname); + exit (1); + } + + Elf_Scn *scn = elf_getscn (elf, ndx); + if (scn == NULL) + { + printf ("Couldn't get section %zd: %s\n", ndx, elf_errmsg (-1)); + exit (1); + } + + void print_strings (void) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + + printf ("Strings in section %zd (%s):\n", ndx, + ((shdr->sh_flags & SHF_COMPRESSED) != 0 + ? "compressed" : "uncompressed")); + + size_t off = 0; + const char *str = elf_strptr (elf, ndx, off); + while (str != NULL) + { + printf ("[%zx] '%s'\n", off, str); + off += strlen (str) + 1; + str = elf_strptr (elf, ndx, off); + } + } + + if (elf_compress (scn, ELFCOMPRESS_ZLIB, 0) < 0) + { + printf ("Couldn't compress section %zd: %s\n", ndx, elf_errmsg (-1)); + exit (1); + } + print_strings (); + + if (elf_compress (scn, 0, 0) < 0) + { + printf ("Couldn't decompress section %zd: %s\n", ndx, elf_errmsg (-1)); + exit (1); + } + print_strings (); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + return 0; +} diff --git a/version.h b/version.h index a7f509d..a1ee493 100644 --- a/version.h +++ b/version.h @@ -30,7 +30,7 @@ #ifndef _ELFUTILS_VERSION_H #define _ELFUTILS_VERSION_H 1 -#define _ELFUTILS_VERSION 160 +#define _ELFUTILS_VERSION 165 #define _ELFUTILS_PREREQ(major, minor) \ (_ELFUTILS_VERSION >= ((major) * 1000 + (minor)))