diff options
138 files changed, 7739 insertions, 3430 deletions
@@ -26,6 +26,7 @@ config.h.in config.log config.status config/ar-lib +config/compile config/config.guess config/config.sub config/depcomp @@ -1,3 +1,20 @@ +2014-12-18 Mark Wielaard <[email protected]> + + * configure.ac: Set version to 0.161. + * NEWS: Add dwarf.h additions. + +2014-12-15 Josh Stone <[email protected]> + + * .gitignore: Add config/compile as installed by automake 1.14. + +2014-11-27 Mark Wielaard <[email protected]> + + * configure.ac: Add --disable-textrelcheck. + +2014-10-06 Mark Wielaard <[email protected]> + + * NEWS: New section 0.161. Add dwarf_peel_type. + 2014-08-25 Mark Wielaard <[email protected]> * configure.ac: Set version to 0.160. @@ -1,3 +1,15 @@ +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/backends/ChangeLog b/backends/ChangeLog index a3dd59bc..6a862487 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,23 @@ +2014-12-18 Ulrich Drepper <[email protected]> + + * Makefile.am: Suppress output of textrel_check command. + +2014-11-22 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * ppc64_init.c (ppc64_init): Check section name is not NULL. + +2014-10-06 Mark Wielaard <[email protected]> + + * libebl_CPU.h (dwarf_peel_type): Removed. + (dwarf_peeled_die_type): Use libdw dwarf_peel_type. + 2014-07-18 Kyle McMartin <[email protected]> Mark Wielaard <[email protected]> diff --git a/backends/Makefile.am b/backends/Makefile.am index 5b49108b..5ab9f9fd 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -120,7 +120,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ -Wl,--version-script,$(@:.so=.map) \ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) - $(textrel_check) + @$(textrel_check) libebl_i386.so: $(cpu_i386) libebl_x86_64.so: $(cpu_x86_64) diff --git a/backends/libebl_CPU.h b/backends/libebl_CPU.h index fa0d4f2d..ef2b922b 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/ppc64_init.c b/backends/ppc64_init.c index 7ea2b236..56e1828e 100644 --- a/backends/ppc64_init.c +++ b/backends/ppc64_init.c @@ -90,13 +90,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_symbol.c b/backends/ppc64_symbol.c index 5a020d8d..0feddcee 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_symbol.c b/backends/ppc_symbol.c index 220f243e..c17ab374 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 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 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); @@ -127,7 +131,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. */ @@ -154,8 +158,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/config/ChangeLog b/config/ChangeLog index 250827e1..058dd88a 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,12 @@ +2014-12-18 Mark Wielaard <[email protected]> + + * elfutils.spec.in: Update for 0.161. + +2014-11-27 Mark Wielaard <[email protected]> + + * eu.am: Define textrel_msg, textrel_found and textrel_check based + on FATAL_TEXTREL. + 2014-08-25 Mark Wielaard <[email protected]> * elfutils.spec.in: Update for 0.160. diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index 912f2378..06f73fc9 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -196,6 +196,17 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libelf.a %changelog +* Thu Dec 18 2014 Mark Wielaard <[email protected]> 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 <[email protected]> 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 3b7ed41f..6ca36a53 100644 --- a/config/eu.am +++ b/config/eu.am @@ -60,4 +60,10 @@ 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 diff --git a/configure.ac b/configure.ac index 8040a2d6..a1ad6dbe 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ 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 <http://www.gnu.org/licenses/>. -AC_INIT([elfutils],[0.160],[https://bugzilla.redhat.com/],[elfutils]) +AC_INIT([elfutils],[0.161],[https://bugzilla.redhat.com/],[elfutils]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES([config/Makefile]) @@ -268,6 +268,11 @@ 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) +AC_ARG_ENABLE([textrelcheck], +AS_HELP_STRING([--disable-textrelcheck], + [Disable textrelcheck being a fatal error])) +AM_CONDITIONAL(FATAL_TEXTREL, [test "x$enable_textrelcheck" != "xno"]) + dnl The directories with content. dnl Documentation. diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 7ebb6e71..32b9fd0d 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,11 @@ +2014-12-18 Ulrich Drepper <[email protected]> + + * Makefile.am: Suppress output of textrel_check command. + +2014-11-27 Mark Wielaard <[email protected]> + + * Makefile.am (libasm.so): Use textrel_check. + 2014-04-13 Mark Wielaard <[email protected]> * Makefile.am: Remove !MUDFLAP conditions. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index 3d6a2e58..6ea2a8e8 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -66,7 +66,7 @@ libasm.so$(EXEEXT): libasm_pic.a libasm.map -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 + @$(textrel_check) ln -fs $@ $@.$(VERSION) install: install-am libasm.so diff --git a/libdw/ChangeLog b/libdw/ChangeLog index d084a04b..a9ee0b07 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,281 @@ +2014-12-18 Ulrich Drepper <[email protected]> + + * Makefile.am: Suppress output of textrel_check command. + +2014-12-16 Mark Wielaard <[email protected]> + + * dwarf_getsrclines.c (read_srclines): Check diridx is valid under + DW_LNE_define_file. + +2014-12-16 Mark Wielaard <[email protected]> + + * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough + space to read die offset. + +2014-12-16 Mark Wielaard <[email protected]> + + * dwarf_getsrclines.c (read_srclines): Correct overflow check for + unit_length. + +2014-12-15 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset. + +2014-12-13 Mark Wielaard <[email protected]> + + * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr + difference doesn't wrap around before returning as int. + +2014-12-11 Josh Stone <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence. + +2014-12-10 Josh Stone <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * Makefile.am (libdw.so): Use textrel_check. + +2014-11-27 Mark Wielaard <[email protected]> + + * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize + search_table_entries and search_table_encoding. + +2014-11-24 Mark Wielaard <[email protected]> + + * dwarf_getsrclines.c (read_srclines): Check line_range is not zero + before usage. + +2014-11-23 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF. + Set libdw errno and return NULL. + +2014-11-24 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * dwarf.h (DW_AT_noreturn): Added. + +2014-11-11 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * libdwP.h (struct Dwarf_Files_s.cu): Drop field. + * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it. + +2014-10-05 Mark Wielaard <[email protected]> + + * dwarf.h: Add DW_AT_GNU_deleted. + +2014-10-02 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> * dwarf_cu_die.c: New file. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 2e42a376..887da6b0 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -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 @@ -111,7 +113,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ -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 + @$(textrel_check) ln -fs $@ $@.$(VERSION) install: install-am libdw.so diff --git a/libdw/cfi.c b/libdw/cfi.c index a146f129..632e91d3 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -132,12 +132,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 +156,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 +169,33 @@ execute_cfi (Dwarf_CFI *cache, continue; case DW_CFA_def_cfa_register: - get_uleb128 (regno, program); + get_uleb128 (regno, program, end); require_cfa_offset (); 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 (); 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 +204,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 +277,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)) @@ -347,7 +358,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/dwarf.h b/libdw/dwarf.h index d98a4bdc..da8cf3a6 100644 --- a/libdw/dwarf.h +++ b/libdw/dwarf.h @@ -221,6 +221,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 +270,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 +586,10 @@ enum DW_LANG_D = 0x0013, /* D */ DW_LANG_Python = 0x0014, /* Python */ DW_LANG_Go = 0x0016, /* Go */ + 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_lo_user = 0x8000, DW_LANG_Mips_Assembler = 0x8001, /* Assembler */ diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c index 07c53a22..667c2743 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; @@ -198,13 +207,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. */ @@ -217,6 +233,12 @@ dwarf_aggregate_size (die, size) 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_attr.c b/libdw/dwarf_attr.c index 97b08068..f247c1af 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 <[email protected]>, 2003. @@ -50,6 +50,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_elf.c b/libdw/dwarf_begin_elf.c index b3396a09..7ea14308 100644 --- a/libdw/dwarf_begin_elf.c +++ b/libdw/dwarf_begin_elf.c @@ -243,6 +243,28 @@ valid_p (Dwarf *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)) + { + __libdw_free_zdata (result); + 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; } diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c index 1d3a3371..58a438b5 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 <[email protected]>, 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; } } @@ -136,33 +123,32 @@ dwarf_child (die, result) 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_cuoffset.c b/libdw/dwarf_cuoffset.c index 7aea3f91..3ceffdb0 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 <[email protected]>, 2003. @@ -41,5 +41,5 @@ dwarf_cuoffset (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_dieoffset.c b/libdw/dwarf_dieoffset.c index c92123ce..965b2c8d 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 <[email protected]>, 2003. @@ -41,6 +41,6 @@ dwarf_dieoffset (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 241a257a..922dc8f3 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -93,6 +93,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) @@ -111,6 +117,9 @@ dwarf_end (dwarf) if (dwarf->free_elf) elf_end (dwarf->elf); + /* Free the fake location list CU. */ + free (dwarf->fake_loc_cu); + /* Free the context descriptor. */ free (dwarf); } diff --git a/libdw/dwarf_error.c b/libdw/dwarf_error.c index 22929141..08b691aa 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 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -92,6 +92,7 @@ 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"), }; #define nerrmsgs (sizeof (errmsgs) / sizeof (errmsgs[0])) diff --git a/libdw/dwarf_formblock.c b/libdw/dwarf_formblock.c index 799d8776..3d56f222 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 <[email protected]>, 2004. @@ -43,29 +43,37 @@ dwarf_formblock (attr, 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 +82,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_formref.c b/libdw/dwarf_formref.c index 86da7eae..25924371 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 <[email protected]>, 2003. @@ -39,7 +39,8 @@ __libdw_formref (attr, return_offset) 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 +51,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: diff --git a/libdw/dwarf_formref_die.c b/libdw/dwarf_formref_die.c index b54e2166..63f66971 100644 --- a/libdw/dwarf_formref_die.c +++ b/libdw/dwarf_formref_die.c @@ -70,7 +70,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,7 +93,8 @@ dwarf_formref_die (attr, result) } while (cu->type_sig8 != sig); - data = cu->dbg->sectiondata[IDX_debug_types]; + datap = cu->dbg->sectiondata[IDX_debug_types]->d_buf; + size = cu->dbg->sectiondata[IDX_debug_types]->d_size; offset = cu->type_offset; } else @@ -101,17 +103,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 85621988..2380bf43 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 <[email protected]>, 2003. @@ -43,34 +43,49 @@ dwarf_formsdata (attr, 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_formudata.c b/libdw/dwarf_formudata.c index 41b09e1a..a01ff312 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 <[email protected]>, 2003. @@ -101,15 +101,24 @@ dwarf_formudata (attr, 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 +212,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_register.c b/libdw/dwarf_frame_register.c index 2bc5ff1c..10d2fe49 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 @@ -102,7 +102,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_getabbrev.c b/libdw/dwarf_getabbrev.c index 87d89c1b..0efde45b 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 <[email protected]>, 2003. @@ -31,7 +31,6 @@ # include <config.h> #endif -#include <assert.h> #include <dwarf.h> #include "libdwP.h" @@ -78,9 +77,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 +98,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 +116,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 +131,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); diff --git a/libdw/dwarf_getabbrevattr.c b/libdw/dwarf_getabbrevattr.c index 64668fe4..574467ce 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 <[email protected]>, 2003. @@ -57,9 +57,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_getaranges.c b/libdw/dwarf_getaranges.c index 20ac7ec6..4953af53 100644 --- a/libdw/dwarf_getaranges.c +++ b/libdw/dwarf_getaranges.c @@ -48,7 +48,9 @@ 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 diff --git a/libdw/dwarf_getattrs.c b/libdw/dwarf_getattrs.c index 82eb3f8f..0da8b5ba 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 <[email protected]>, 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_elf.c b/libdw/dwarf_getcfi_elf.c index a423ef3d..61ca60de 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -140,8 +140,8 @@ getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) } 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, diff --git a/libdw/dwarf_getfuncs.c b/libdw/dwarf_getfuncs.c index 82894c98..f79b0a79 100644 --- a/libdw/dwarf_getfuncs.c +++ b/libdw/dwarf_getfuncs.c @@ -103,7 +103,8 @@ 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), diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c index 8dffb83f..068f3853 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, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 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; @@ -390,28 +395,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 +427,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. */ @@ -434,23 +438,22 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, 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 (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; @@ -551,6 +554,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 diff --git a/libdw/dwarf_getlocation_attr.c b/libdw/dwarf_getlocation_attr.c index cb290456..3229baf6 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,6 +33,24 @@ #include <dwarf.h> #include <libdwP.h> +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) @@ -43,26 +61,27 @@ dwarf_getlocation_attr (attr, op, 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 +93,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 +107,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_implicit_pointer.c b/libdw/dwarf_getlocation_implicit_pointer.c index f93d17ec..f1c16be7 100644 --- a/libdw/dwarf_getlocation_implicit_pointer.c +++ b/libdw/dwarf_getlocation_implicit_pointer.c @@ -35,15 +35,17 @@ 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 @@ -69,7 +71,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 a3d2c816..f9f29961 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 <[email protected]>, 2002. @@ -31,114 +31,518 @@ # include <config.h> #endif +#include <assert.h> #include <dwarf.h> +#include <search.h> +#include <stdlib.h> #include <string.h> #include <libdwP.h> +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; +} + +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] = + { + [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) + INTUSE(dwarf_formudata) (attr, &line_offset); + + 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; + } + + uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); + if (version != 4) + { + __libdw_seterrno (DWARF_E_INVALID_VERSION); + return NULL; + } - Elf_Data *d = die->cu->dbg->sectiondata[IDX_debug_macinfo]; - if (unlikely (d == NULL) || unlikely (d->d_buf == NULL)) + uint8_t flags = *readp++; + bool is_64bit = (flags & 0x1) != 0; + + 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; + } + else if (cudie != NULL) + { + Dwarf_Attribute attr_mem, *attr + = INTUSE(dwarf_attr) (cudie, DW_AT_stmt_list, &attr_mem); + if (attr != NULL) + INTUSE(dwarf_formudata) (attr, &line_offset); + } + + /* """The macinfo entry types defined in this standard may, but + might not, be described in the table""". + + 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. */ + + 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); + + Dwarf_Macro_Op_Proto op_protos[255] = + { + [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. */ + }; + + if ((flags & 0x4) != 0) + { + unsigned count = *readp++; + for (unsigned i = 0; i < count; ++i) + { + 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); + + if (table == NULL) + return NULL; + + Dwarf_Macro_Op_Table **ret = tsearch (table, &dbg->macro_ops, + macro_op_compare); + if (unlikely (ret == NULL)) + { + __libdw_seterrno (DWARF_E_NOMEM); + return NULL; + } + + return *ret; +} + +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; } - if (offset == 0) + if (unlikely (macoff >= d->d_size)) { - /* 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_DWARF); + return -1; + } - /* Offset into the .debug_macinfo section. */ - Dwarf_Word macoff; - if (INTUSE(dwarf_formudata) (&attr, &macoff) != 0) - return -1; + const unsigned char *const startp = d->d_buf + macoff; + const unsigned char *const endp = d->d_buf + d->d_size; - offset = macoff; - } - if (unlikely (offset > (ptrdiff_t) d->d_size)) - goto invalid; + Dwarf_Macro_Op_Table *table = cache_op_table (dbg, sec_index, macoff, + startp, endp, cudie); + if (table == NULL) + return -1; - const unsigned char *readp = d->d_buf + offset; - const unsigned char *readendp = d->d_buf + d->d_size; + if (offset == 0) + offset = table->header_len; - if (readp == readendp) - return 0; + assert (offset >= 0); + assert (offset < endp - startp); + const unsigned char *readp = startp + offset; - while (readp < readendp) + while (readp < endp) { unsigned int opcode = *readp++; - unsigned int u128; - unsigned int u128_2 = 0; - const char *str = NULL; - const unsigned char *endp; + if (opcode == 0) + /* Nothing more to do. */ + return 0; - switch (opcode) + if (unlikely (opcode == 0xff && ! accept_0xff)) { - 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) - goto invalid; + /* See comment below at dwarf_getmacros for explanation of + why we are doing this. */ + __libdw_seterrno (DWARF_E_INVALID_OPCODE); + return -1; + } - str = (char *) readp; - readp = endp + 1; - break; + unsigned int idx = table->opcodes[opcode - 1]; + if (idx == 0xff) + { + __libdw_seterrno (DWARF_E_INVALID_OPCODE); + return -1; + } - 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_Proto *proto = &table->table[idx]; - case DW_MACINFO_end_file: - /* No parameters for this one. */ - u128 = 0; - break; + /* 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, + }; - case 0: - /* Nothing more to do. */ - return 0; + Dwarf_Attribute attributes[proto->nforms]; + 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; - default: - goto invalid; + size_t len = __libdw_form_val_len (&fake_cu, proto->forms[i], readp); + if (len == (size_t) -1) + return -1; + + readp += len; } - Dwarf_Macro mac; - mac.opcode = opcode; - mac.param1 = u128; - if (str == NULL) - mac.param2.u = u128_2; - else - mac.param2.s = str; + Dwarf_Macro macro = { + .table = table, + .opcode = opcode, + .attributes = attributes, + }; + + if (callback (¯o, arg) != DWARF_CB_OK) + return readp - startp; + } + + return 0; +} + +/* Token layout: - if (callback (&mac, arg) != DWARF_CB_OK) - return readp - (const unsigned char *) d->d_buf; + - 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; +} + +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 (cudie, callback, arg, token) + 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 12728a34..19f4eae1 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,7 +125,7 @@ get_offsets (Dwarf *dbg) readp += len; } - if (mem == NULL) + if (mem == NULL || cnt == 0) { __libdw_seterrno (DWARF_E_NO_ENTRY); return -1; @@ -184,6 +186,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 +199,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 +214,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_getsrclines.c b/libdw/dwarf_getsrclines.c index 7b174cfc..053b30f2 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 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2004. @@ -34,6 +34,8 @@ #include <assert.h> #include <stdlib.h> #include <string.h> +#include <search.h> + #include "dwarf.h" #include "libdwP.h" @@ -48,6 +50,7 @@ struct linelist { Dwarf_Line line; struct linelist *next; + size_t sequence; }; @@ -55,28 +58,36 @@ struct linelist static int compare_lines (const void *a, const void *b) { - Dwarf_Line *const *p1 = a; - Dwarf_Line *const *p2 = b; - - if ((*p1)->addr == (*p2)->addr) - /* An end_sequence marker precedes a normal record at the same address. */ - return (*p2)->end_sequence - (*p1)->end_sequence; - - return (*p1)->addr - (*p2)->addr; + 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; } -int -dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) +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) { - if (unlikely (cudie == NULL - || (INTUSE(dwarf_tag) (cudie) != DW_TAG_compile_unit - && INTUSE(dwarf_tag) (cudie) != DW_TAG_partial_unit))) - return -1; - int res = -1; struct linelist *linelist = NULL; - unsigned int nlinelist = 0; + size_t nlinelist = 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 @@ -84,675 +95,787 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) #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) + if (unlikely (linep + 4 > lineendp)) { - /* 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. */ - 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 *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; - } + invalid_data: + __libdw_seterrno (DWARF_E_INVALID_DEBUG_LINE); + goto out; + } - /* Check whether we have enough room in the section. */ - if (unit_length < 2 + length + 5 * 1 - || unlikely (linep + unit_length > lineendp)) + 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; - 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; - } - - /* 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; + unit_length = read_8ubyte_unaligned_inc (dbg, linep); + length = 8; + } - /* Next the minimum instruction length. */ - uint_fast8_t minimum_instr_len = *linep++; + /* 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; - /* 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; - } + /* 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; + } - /* Then the flag determining the default value of the is_stmt - register. */ - uint_fast8_t default_is_stmt = *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; - /* Now the line base. */ - int_fast8_t line_base = (int8_t) *linep++; + /* Next the minimum instruction length. */ + uint_fast8_t minimum_instr_len = *linep++; - /* And the line range. */ - uint_fast8_t line_range = *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; + } - /* The opcode base. */ - uint_fast8_t opcode_base = *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++; + + /* And the line range. */ + uint_fast8_t line_range = *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; + + /* 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) + { + struct dirlist *new_dir = + (struct dirlist *) alloca (sizeof (*new_dir)); - /* 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)) + new_dir->dir = (char *) linep; + uint8_t *endp = memchr (linep, '\0', lineendp - linep); + if (endp == NULL) goto invalid_data; - 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 - { - 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) - { - struct dirlist *new_dir = - (struct dirlist *) alloca (sizeof (*new_dir)); + new_dir->len = endp - linep; + new_dir->next = dirlist; + dirlist = new_dir; + ++ndirlist; + linep = endp + 1; + } + /* Skip the final NUL byte. */ + ++linep; - 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; - } - /* 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; - /* 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; + /* 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; + + if (unlikely (linep >= lineendp)) + goto invalid_data; + while (*linep != 0) + { + struct filelist *new_file = + (struct filelist *) alloca (sizeof (*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); - /* Process the instructions. */ + new_file->next = filelist; + filelist = new_file; + ++nfilelist; + } + /* Skip the final NUL byte. */ + ++linep; - /* Adds a new line to the matrix. - We cannot simply define a function because we want to use alloca. */ + /* Consistency check. */ + if (unlikely (linep != header_start + header_length)) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + goto out; + } + + /* 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; + } + + /* Process the instructions. */ + + /* Adds a new line to the matrix. + We cannot simply define a function because we want to use alloca. */ #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. */ + 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; + new_line->sequence = nlinelist; + 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 { \ + 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); #undef SET - return false; - } + return false; + } - while (linep < lineendp) + while (linep < lineendp) + { + unsigned int opcode; + unsigned int u128; + int s128; + + /* Read the opcode. */ + opcode = *linep++; + + /* Is this a special opcode? */ + if (likely (opcode >= opcode_base)) { - unsigned int opcode; - unsigned int u128; - int s128; + if (unlikely (line_range == 0)) + goto invalid_data; - /* Read the opcode. */ - opcode = *linep++; + /* Yes. Handling this is quite easy since the opcode value + is computed with - /* Is this a special opcode? */ - if (likely (opcode >= opcode_base)) - { - /* 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); - 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. */ + line += line_increment; + advance_pc ((opcode - opcode_base) / line_range); - /* Perform the increments. */ - line += line_increment; - advance_pc ((opcode - opcode_base) / line_range); + /* Add a new line with the current state machine values. */ + NEW_LINE (0); - /* 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)) + goto invalid_data; - /* Reset the flags. */ + /* The length. */ + uint_fast8_t len = *linep++; + + if (unlikely ((size_t) (lineendp - linep) < len)) + goto invalid_data; + + /* 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; - } - else if (opcode == 0) - { - /* This an extended opcode. */ - if (unlikely (lineendp - linep < 2)) - goto invalid_data; - - /* The length. */ - uint_fast8_t len = *linep++; - - if (unlikely ((size_t) (lineendp - linep) < len)) + 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 < (uint8_t) address_size)) goto invalid_data; - - /* 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)) + if (__libdw_read_address_inc (dbg, IDX_debug_line, &linep, + address_size, &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; - if (__libdw_read_address_inc (dbg, IDX_debug_line, &linep, - cu->address_size, &addr)) - goto out; - break; - - case DW_LNE_define_file: + } + 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 = + (struct filelist *) alloca (sizeof (*new_file)); + if (fname[0] == '/') + new_file->info.name = fname; + else { - 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; + 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); } - break; - case DW_LNE_set_discriminator: - /* Takes one ULEB128 parameter, the discriminator. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + new_file->info.mtime = mtime; + new_file->info.length = filelength; + new_file->next = filelist; + filelist = new_file; + ++nfilelist; + } + break; + + case DW_LNE_set_discriminator: + /* Takes one ULEB128 parameter, the discriminator. */ + if (unlikely (standard_opcode_lengths[opcode] != 1)) + goto invalid_data; - get_uleb128 (discriminator, linep); - break; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (discriminator, linep, lineendp); + break; - default: - /* Unknown, ignore it. */ - if (unlikely ((size_t) (lineendp - (linep - 1)) < len)) - goto invalid_data; - linep += len - 1; - 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) + } + else if (opcode <= DW_LNS_set_isa) + { + /* This is a known standard opcode. */ + switch (opcode) { - /* 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_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); + /* 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; - break; + /* Reset the flags. */ + basic_block = false; + prologue_end = false; + epilogue_begin = false; + 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; + 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; - get_uleb128 (u128, linep); - advance_pc (u128); - break; + 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; - 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 (linep >= lineendp)) + goto invalid_data; + get_sleb128 (s128, linep, lineendp); + line += s128; + break; - get_sleb128 (s128, linep); - line += s128; - 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_set_file: - /* Takes one uleb128 parameter which is stored in file. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (u128, linep, lineendp); + file = u128; + break; - get_uleb128 (u128, linep); - file = u128; - 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_column: - /* Takes one uleb128 parameter which is stored in column. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - goto invalid_data; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (u128, linep, lineendp); + column = u128; + break; - get_uleb128 (u128, linep); - column = u128; - break; + case DW_LNS_negate_stmt: + /* 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; + is_stmt = 1 - is_stmt; + break; - is_stmt = 1 - is_stmt; - break; + case DW_LNS_set_basic_block: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - case DW_LNS_set_basic_block: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + basic_block = true; + break; - basic_block = true; - break; + case DW_LNS_const_add_pc: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - case DW_LNS_const_add_pc: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + if (unlikely (line_range == 0)) + goto invalid_data; - advance_pc ((255 - opcode_base) / line_range); - break; + advance_pc ((255 - opcode_base) / line_range); + break; - 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; + 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; - addr += read_2ubyte_unaligned_inc (dbg, linep); - op_index = 0; - break; + addr += read_2ubyte_unaligned_inc (dbg, linep); + op_index = 0; + break; - case DW_LNS_set_prologue_end: - /* Takes no argument. */ - if (unlikely (standard_opcode_lengths[opcode] != 0)) - goto invalid_data; + case DW_LNS_set_prologue_end: + /* Takes no argument. */ + if (unlikely (standard_opcode_lengths[opcode] != 0)) + goto invalid_data; - prologue_end = true; - break; + prologue_end = true; + break; - case DW_LNS_set_epilogue_begin: - /* 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; - epilogue_begin = true; - break; + epilogue_begin = true; + break; - case DW_LNS_set_isa: - /* Takes one uleb128 parameter which is stored in isa. */ - if (unlikely (standard_opcode_lengths[opcode] != 1)) - 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; - 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; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (isa, linep, lineendp); + 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]; - - 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) + else { - sortlines[i] = &linelist->line; - linelist = linelist->next; - } - assert (linelist == NULL); - - /* Sort by ascending address. */ - qsort (sortlines, nlinelist, sizeof sortlines[0], &compare_lines); + /* 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); + } - /* 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) - { - cu->lines->info[i] = *sortlines[i]; - cu->lines->info[i].files = files; + /* Next round, ignore this opcode. */ + continue; } + } - /* 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; + /* 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]; - /* Success. */ - res = 0; + 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; + + /* Pass the file data structure to the caller. */ + if (filesp != NULL) + *filesp = files; + + size_t buf_size = (sizeof (Dwarf_Lines) + (sizeof (Dwarf_Line) * 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 **) * 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. */ + for (size_t i = nlinelist; i-- > 0; ) + { + sortlines[i] = linelist; + linelist = linelist->next; } - else if (cu->lines != (void *) -1l) - /* We already have the information. */ - res = 0; + assert (linelist == NULL); + + /* Sort by ascending address. */ + qsort (sortlines, nlinelist, sizeof sortlines[0], &compare_lines); - if (likely (res == 0)) + /* 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 = nlinelist; + for (size_t i = 0; i < nlinelist; ++i) { - *lines = cu->lines; - *nlines = cu->lines->nlines; + lines->info[i] = sortlines[i]->line; + lines->info[i].files = files; } - out: + /* 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) + lines->info[nlinelist - 1].end_sequence = 1; + + /* Pass the line structure back to the caller. */ + if (linesp != NULL) + *linesp = lines; + + /* Success. */ + res = 0; + + out: /* Free malloced line records, if any. */ - for (unsigned int i = MAX_STACK_ALLOC; i < nlinelist; i++) + for (size_t i = MAX_STACK_ALLOC; i < nlinelist; i++) { struct linelist *ll = malloc_linelist->next; free (malloc_linelist); malloc_linelist = ll; } + return res; +} + +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; + + if (t1->debug_line_offset < t2->debug_line_offset) + return -1; + if (t1->debug_line_offset > t2->debug_line_offset) + return 1; + + 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); + + if (read_srclines (dbg, linep, lineendp, comp_dir, address_size, + &node->lines, &node->files) != 0) + return -1; + + node->debug_line_offset = debug_line_offset; + + found = tsearch (node, &dbg->files_lines, files_lines_compare); + if (found == NULL) + { + __libdw_seterrno (DWARF_E_NOMEM); + return -1; + } + } + + if (linesp != NULL) + *linesp = (*found)->lines; + + if (filesp != NULL) + *filesp = (*found)->files; + + 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 (unlikely (cudie == NULL + || (INTUSE(dwarf_tag) (cudie) != DW_TAG_compile_unit + && INTUSE(dwarf_tag) (cudie) != DW_TAG_partial_unit))) + return -1; + + /* Get the information if it is not already known. */ + struct Dwarf_CU *const cu = cudie->cu; + if (cu->lines == NULL) + { + /* 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_hasattr.c b/libdw/dwarf_hasattr.c index 7933c1c3..812c09bc 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 <[email protected]>, 2003. @@ -43,10 +43,43 @@ dwarf_hasattr (die, 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 b2273982..d0ce51ea 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 <[email protected]>, 2003. @@ -40,25 +40,13 @@ dwarf_haschildren (die) 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_macro_getparamcnt.c b/libdw/dwarf_macro_getparamcnt.c new file mode 100644 index 00000000..e218eb1d --- /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 <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#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 00000000..cc190437 --- /dev/null +++ b/libdw/dwarf_macro_getsrcfiles.c @@ -0,0 +1,88 @@ +/* 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 <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdwP.h" + +int +dwarf_macro_getsrcfiles (Dwarf *dbg, Dwarf_Macro *macro, + Dwarf_Files **files, size_t *nfiles) +{ + if (macro == NULL) + return -1; + + 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 00000000..bd846a7f --- /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 <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#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 35d4a718..87ce0035 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 <[email protected]>, 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 b49e60ea..cc902c99 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 <[email protected]>, 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 80b7dfaa..b5af49e3 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 @@ -170,11 +170,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 +192,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_peel_type.c b/libdw/dwarf_peel_type.c new file mode 100644 index 00000000..a110bc54 --- /dev/null +++ b/libdw/dwarf_peel_type.c @@ -0,0 +1,74 @@ +/* Peel type aliases and qualifier tags from a type DIE. + 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 <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdwP.h" +#include <dwarf.h> +#include <string.h> + + +int +dwarf_peel_type (die, result) + 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) + { + Dwarf_Attribute attr_mem; + Dwarf_Attribute *attr = INTUSE (dwarf_attr_integrate) (die, DW_AT_type, + &attr_mem); + if (attr == NULL) + return 1; + + result = INTUSE (dwarf_formref_die) (attr, result); + if (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_siblingof.c b/libdw/dwarf_siblingof.c index c54b6c8d..27830ea4 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 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2003. @@ -62,8 +62,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 +71,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; @@ -81,8 +80,7 @@ dwarf_siblingof (die, result) 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_tag.c b/libdw/dwarf_tag.c index ff012cf4..0b1a4b08 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 <[email protected]>, 2003. @@ -82,24 +82,14 @@ int dwarf_tag (die) 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/encoded-value.h b/libdw/encoded-value.h index 4b59f62f..ae9a38f9 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -163,11 +163,13 @@ read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, const uint8_t **p, break; case DW_EH_PE_uleb128: - get_uleb128 (value, *p); + // XXX we trust there is enough data. + get_uleb128 (value, *p, *p + len_leb128 (Dwarf_Addr)); break; case DW_EH_PE_sleb128: - get_sleb128 (value, *p); + // XXX we trust there is enough data. + get_sleb128 (value, *p, *p + len_leb128 (Dwarf_Addr)); break; default: diff --git a/libdw/fde.c b/libdw/fde.c index 91ce7327..18a522bd 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -97,7 +97,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); diff --git a/libdw/libdw.h b/libdw/libdw.h index 52856460..722c589b 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -32,6 +32,7 @@ #include <gelf.h> #include <stdbool.h> #include <stddef.h> +#include <stdint.h> #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) @@ -398,6 +399,24 @@ 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). 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 +845,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 55bc5371..1d4cbb0c 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -306,4 +306,19 @@ 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; diff --git a/libdw/libdwP.h b/libdw/libdwP.h index ce8a83d5..5ab72194 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -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 { @@ -118,7 +126,8 @@ 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, }; @@ -167,12 +176,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 +228,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 +314,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 +341,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. */ @@ -390,7 +452,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 +463,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 +514,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. */ @@ -630,12 +724,6 @@ 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) -{ - return cu->dbg->sectiondata[cu_sec_idx (cu)]; -} - /* Read up begin/end pair and increment read pointer. - If it's normal range record, set up *BEGINP and *ENDP and return 0. - If it's base address selection record, set up *BASEP and return 1. @@ -653,9 +741,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 +792,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 c0bff2af..d8da2e38 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 <[email protected]>, 2003. @@ -94,6 +94,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 +119,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) { diff --git a/libdw/libdw_form.c b/libdw/libdw_form.c index 53505564..72e2390c 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 <[email protected]>, 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/memory-access.h b/libdw/memory-access.h index f41f783d..a53f7912 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -39,6 +39,14 @@ #define len_leb128(var) ((8 * sizeof (var) + 6) / 7) +static inline size_t +__libdw_max_len_leb128 (const unsigned char *addr, const unsigned char *end) +{ + const size_t type_len = len_leb128 (uint64_t); + const size_t pointer_len = likely (addr < end) ? end - addr : 0; + return likely (type_len <= pointer_len) ? type_len : pointer_len; +} + #define get_uleb128_step(var, addr, nth) \ do { \ unsigned char __b = *(addr)++; \ @@ -48,20 +56,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_leb128 (*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 +90,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_leb128 (*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 +236,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 +264,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 9f95ea81..342cb9cf 100644 --- a/libdwelf/ChangeLog +++ b/libdwelf/ChangeLog @@ -1,3 +1,8 @@ +2014-11-14 Mark Wielaard <[email protected]> + + * dwelf_elf_gnu_debuglink.c (dwelf_elf_gnu_debuglink): Check d_buf + is not NULL. + 2014-04-30 Mark Wielaard <[email protected]> * Makefile.am (AM_CPPFLAGS): Add libdwfl and libebl include dirs. diff --git a/libdwelf/dwelf_elf_gnu_debuglink.c b/libdwelf/dwelf_elf_gnu_debuglink.c index 7b5fc93c..6e22cf67 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/libdwfl/ChangeLog b/libdwfl/ChangeLog index 5b826f14..2c731f6e 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,99 @@ +2014-12-18 Mark Wielaard <[email protected]> + + * relocate.c (resolve_symbol): Make sure symstrdata->d_buf != NULL. + +2014-12-13 Mark Wielaard <[email protected]> + + * dwfl_module_getdwarf.c (find_dynsym): elf_getdata_rawchunk takes + a size_t, make sure it doesn't overflow. + +2014-12-13 Mark Wielaard <[email protected]> + + * cu.c (cudie_offset): Make sure Dwarf_Off difference doesn't + wrap around before returning as int. + +2014-12-11 Josh Stone <[email protected]> + + * dwfl_module_getsrc.c (dwfl_module_getsrc): Return the *last* line + record <= addr, rather than returning immediately on matches. + +2014-12-09 Mark Wielaard <[email protected]> + + * dwfl_segment_report_module.c (handle_file_note): Check count doesn't + overflow. + +2014-12-07 Mark Wielaard <[email protected]> + + * relocate.c (relocate_section): Sanity check section overlap against + actually used ehsize, shentsize and phentsize. + +2014-12-07 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * link_map.c (consider_executable): Use elf_getphdrnum. + (dwfl_link_map_report): Likewise. + +2014-11-18 Mark Wielaard <[email protected]> + + * dwfl_module_getdwarf.c (find_symtab): Sanity check the data buffer, + number of symbols and first_global before use. + +2014-11-14 Mark Wielaard <[email protected]> + + * dwfl_module_getdwarf.c (load_symtab): Don't use tables which have + a zero sh_entsize. + +2014-11-10 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> * linux-kernel-modules.c (check-suffix): Also TRY .ko.xz. diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c index 4ce63c4e..50031aed 100644 --- a/libdwfl/core-file.c +++ b/libdwfl/core-file.c @@ -451,7 +451,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 +470,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 +506,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)) { diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 40b0201c..5ce531bd 100644 --- a/libdwfl/cu.c +++ b/libdwfl/cu.c @@ -162,7 +162,9 @@ 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. */ diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c index 15550082..062aad1f 100644 --- a/libdwfl/dwfl_build_id_find_elf.c +++ b/libdwfl/dwfl_build_id_find_elf.c @@ -124,13 +124,12 @@ 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->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). */ + recorded executable file when MOD was identified as main executable + (which then triggers opening and reporting of the executable). */ int fd = open64 (mod->dwfl->executable_for_core, O_RDONLY); if (fd >= 0) { diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index 72599841..ab9bd48d 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -575,6 +575,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 +591,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 +625,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,10 +636,10 @@ 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; } @@ -718,113 +722,133 @@ 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. */ + /* Translate pointers into file offsets. ADJUST is either zero + in case the dynamic segment wasn't adjusted or mod->main_bias. */ + void translate_offs (GElf_Addr adjust) + { + GElf_Off offs[i_max] = { 0, }; + find_offsets (mod->main.elf, adjust, phnum, i_max, addrs, offs); - const struct + /* Figure out the size of the symbol table. */ + if (offs[i_hash] != 0) { - 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)); + /* 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. */ - 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 + const struct { - mod->symfile = &mod->main; - mod->symerr = DWFL_E_NOERROR; - } - return; - } + 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)); + + // 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; + } + } + } + + /* First try unadjusted, like ELF files from disk, vdso. + Then try for already adjusted dynamic section, like ELF + from remote memory. */ + translate_offs (0); + if (mod->symfile == NULL) + translate_offs (mod->main_bias); + + return; } } } @@ -1067,7 +1091,7 @@ find_symtab (Dwfl_Module *mod) mod->symstrdata = elf_getdata (elf_getscn (mod->symfile->elf, strshndx), NULL); - if (mod->symstrdata == NULL) + if (mod->symstrdata == NULL || mod->symstrdata->d_buf == NULL) goto elferr; if (xndxscn == NULL) @@ -1075,12 +1099,18 @@ find_symtab (Dwfl_Module *mod) else { mod->symxndxdata = elf_getdata (xndxscn, NULL); - if (mod->symxndxdata == NULL) + if (mod->symxndxdata == NULL || mod->symxndxdata->d_buf == NULL) 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. + GElf_Shdr shdr_mem, *shdr = gelf_getshdr (symscn, &shdr_mem); + if (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. */ @@ -1100,7 +1130,7 @@ find_symtab (Dwfl_Module *mod) mod->aux_symstrdata = elf_getdata (elf_getscn (mod->aux_sym.elf, aux_strshndx), NULL); - if (mod->aux_symstrdata == NULL) + if (mod->aux_symstrdata == NULL || mod->aux_symstrdata->d_buf == NULL) goto aux_cleanup; if (aux_xndxscn == NULL) @@ -1108,12 +1138,19 @@ find_symtab (Dwfl_Module *mod) else { 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; } 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 cf8dc0fc..f6d88390 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, + except with an end_sequence which can only be strictly equal. */ + Dwarf_Line *line = &lines->info[l]; + if (line->addr == addr + || (! line->end_sequence && line->addr < addr)) + return &cu->lines->idx[l]; + } error = DWFL_E_ADDR_OUTOFRANGE; } diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c index dfecb517..898457f1 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 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 "../libelf/libelfP.h" /* For NOTE_ALIGN. */ #undef _ #include "libdwflP.h" +#include "common.h" #include <elf.h> #include <gelf.h> @@ -38,6 +39,7 @@ #include <alloca.h> #include <endian.h> #include <unistd.h> +#include <fcntl.h> /* A good size for the initial read from memory, if it's not too costly. @@ -79,12 +81,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 +275,16 @@ 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; inline int finish (void) { release_buffer (&buffer, &buffer_available); + if (elf != NULL) + elf_end (elf); + if (fd != -1) + close (fd); return ndx; } @@ -161,6 +321,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 +347,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 +367,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; @@ -281,7 +448,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,10 +564,9 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, break; } } - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) + 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) @@ -411,8 +577,7 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, } 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) @@ -481,32 +646,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 +669,29 @@ 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 = open64 (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) + { + free (build_id); + return finish (); + } + } + /* Our return value now says to skip the segments contained within the module. */ ndx = addr_segndx (dwfl, segment, module_end, true); @@ -568,7 +733,7 @@ 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; @@ -587,18 +752,16 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, xlateto.d_buf = &dyn; xlateto.d_size = sizeof dyn; - if (ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32) + if (ei_class == ELFCLASS32) { - if (elf32_xlatetom (&xlateto, &xlatefrom, - ehdr.e32.e_ident[EI_DATA]) != NULL) + if (elf32_xlatetom (&xlateto, &xlatefrom, 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)) break; } else { - if (elf64_xlatetom (&xlateto, &xlatefrom, - ehdr.e32.e_ident[EI_DATA]) != NULL) + if (elf64_xlatetom (&xlateto, &xlatefrom, 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)) break; @@ -608,7 +771,7 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, /* 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 +809,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 +846,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,7 +879,7 @@ 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); @@ -742,6 +911,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/libdwflP.h b/libdwfl/libdwflP.h index 30c0f8a9..12ee116e 100644 --- a/libdwfl/libdwflP.h +++ b/libdwfl/libdwflP.h @@ -211,6 +211,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 @@ -659,6 +660,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 272f89ba..eaf43b57 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-2014 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -533,7 +533,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); @@ -813,7 +817,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); diff --git a/libdwfl/offline.c b/libdwfl/offline.c index 28d2782e..982ceab0 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. diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index 52b7b5eb..e102e1e4 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) @@ -200,7 +206,8 @@ resolve_symbol (Dwfl_Module *referer, struct reloc_symtab_cache *symtab, symtab->symstrdata = elf_getdata (elf_getscn (symtab->symelf, symtab->strtabndx), NULL); - if (unlikely (symtab->symstrdata == NULL)) + if (unlikely (symtab->symstrdata == NULL + || symtab->symstrdata->d_buf == NULL)) return DWFL_E_LIBELF; } if (unlikely (sym->st_name >= symtab->symstrdata->d_size)) @@ -297,6 +304,46 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr, 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; + } + /* Apply one relocation. Returns true for any invalid data. */ Dwfl_Error relocate (GElf_Addr offset, const GElf_Sxword *addend, int rtype, int symndx) @@ -365,7 +412,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; diff --git a/libebl/ChangeLog b/libebl/ChangeLog index fd4b77ab..998544f4 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,14 @@ +2014-11-22 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * ebldebugscnp.c (ebl_debugscn_p): Check name is not NULL. + 2014-06-17 Mark Wielaard <[email protected]> * eblinitreg.c (ebl_func_addr_mask): New function. diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h index e1186f86..2e314464 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/eblbsspltp.c b/libebl/eblbsspltp.c index 080e7c5c..95a5d8af 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,8 @@ bool -ebl_bss_plt_p (ebl, ehdr) +ebl_bss_plt_p (ebl) Ebl *ebl; - GElf_Ehdr *ehdr; { - 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/ebldebugscnp.c b/libebl/ebldebugscnp.c index f2351e23..01a56754 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 <[email protected]>, 2002. @@ -40,5 +40,5 @@ ebl_debugscn_p (ebl, name) Ebl *ebl; const char *name; { - return ebl->debugscn_p (name); + return name != NULL && ebl->debugscn_p (name); } diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index bd947599..3a22f53d 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -186,7 +186,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, @@ -693,8 +693,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/libebl.h b/libebl/libebl.h index bb993bf0..7c3c7647 100644 --- a/libebl/libebl.h +++ b/libebl/libebl.h @@ -201,7 +201,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); diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 1f5b4952..cb6cad52 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,108 @@ +2014-12-18 Ulrich Drepper <[email protected]> + + * Makefile.am: Suppress output of textrel_check command. + +2014-12-16 Mark Wielaard <[email protected]> + + * elf_begin.c (read_long_names): Make sure long_names len fits + in mapped ELF file. + +2014-12-15 Mark Wielaard <[email protected]> + + * elf_getarsym.c (elf_getarsym): Check index_size doesn't overflow. + +2014-12-15 Mark Wielaard <[email protected]> + + * elf_begin.c (read_long_names): Clear any garbage left in the + name table. + +2014-12-11 Mark Wielaard <[email protected]> + + * elf_begin.c (file_read_elf): Correct ELF64 section offset check. + +2014-12-11 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * elf_getarsym.c (elf_getarsym): Make sure n * w doesn't overflow. + +2014-11-27 Mark Wielaard <[email protected]> + + * Makefile.am (libelf.so): Use textrel_check. + +2014-11-23 Mark Wielaard <[email protected]> + + * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Change signed + overflow check to unsigned. + +2014-11-23 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * elf_getphdrnum.c (elf_getphdrnum): Sanity check the + __elf_getphdrnum_rdlock result. + +2014-11-18 Mark Wielaard <[email protected]> + + * version_xlate.h (elf_cvt_Verdef): Check for overflow. + (elf_cvt_Verneed): Likewise. + +2014-11-17 Mark Wielaard <[email protected]> + + * elf-knowledge.h (SECTION_STRIP_P): Check name is not NULL. + +2014-11-16 Mark Wielaard <[email protected]> + + * elf_getshdrstrndx.c: Check there are section headers before + handling SHN_XINDEX. + +2014-11-16 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * gelf_getnote.c (gelf_getnote): Check padding overflow. + +2014-11-16 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * gelf_getnote.c (gelf_getnote): Check offset overflow. + +2014-11-13 Mark Wielaard <[email protected]> + + * elf_getdata.c (__libelf_set_rawdata_wrlock): Fix unsigned overflow + check. + +2014-11-08 Mark Wielaard <[email protected]> + + * elf_begin.c (__libelf_next_arhdr_wrlock): Use mempcpy not __mempcpy. + +2014-11-07 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * elf_begin (read_unmmaped_file): Call __libelf_seterrno if the + file is unreadable. + 2014-07-07 Mark Wielaard <[email protected]> * elf.h: Update from glibc. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 493e4ec1..afcb2aa5 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -103,7 +103,7 @@ libelf.so$(EXEEXT): libelf_pic.a libelf.map $(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 + @$(textrel_check) ln -fs $@ $@.$(VERSION) install: install-am libelf.so diff --git a/libelf/elf-knowledge.h b/libelf/elf-knowledge.h index 99fb9107..24534b38 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 <[email protected]>, 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/elf32_getphdr.c b/libelf/elf32_getphdr.c index e74e63fd..1b82a480 100644 --- a/libelf/elf32_getphdr.c +++ b/libelf/elf32_getphdr.c @@ -76,15 +76,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); diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 1ef70ac3..30abe0bf 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -337,8 +337,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 @@ -412,8 +412,8 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, elf->state.elf64.ehdr = ehdr; if (unlikely (ehdr->e_shoff >= maxsize) - || unlikely (ehdr->e_shoff - + scncnt * sizeof (Elf32_Shdr) > maxsize)) + || unlikely (maxsize - ehdr->e_shoff + < scncnt * sizeof (Elf64_Shdr))) goto free_and_out; elf->state.elf64.shdr = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff); @@ -428,8 +428,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 @@ -550,9 +550,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 +673,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 +708,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 +724,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,10 +739,14 @@ 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'; @@ -764,8 +777,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 +811,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 +907,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 +924,12 @@ __libelf_next_arhdr_wrlock (elf) INT_FIELD (ar_mode); INT_FIELD (ar_size); + /* Truncated file? */ + size_t maxsize; + maxsize = 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; } diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c index 7325190a..40633aa8 100644 --- a/libelf/elf_getarsym.c +++ b/libelf/elf_getarsym.c @@ -182,11 +182,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. */ diff --git a/libelf/elf_getdata.c b/libelf/elf_getdata.c index bc9f26ae..0aeb9972 100644 --- a/libelf/elf_getdata.c +++ b/libelf/elf_getdata.c @@ -170,9 +170,9 @@ 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; int type; Elf *elf = scn->elf; @@ -243,8 +243,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); diff --git a/libelf/elf_getdata_rawchunk.c b/libelf/elf_getdata_rawchunk.c index f4fbe660..63a9914f 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -57,8 +57,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); diff --git a/libelf/elf_getphdrnum.c b/libelf/elf_getphdrnum.c index 99649bee..63c27fb1 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -62,10 +62,18 @@ __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; @@ -89,6 +97,39 @@ elf_getphdrnum (elf, dst) rwlock_rdlock (elf->lock); 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; + goto out; + } + + if (unlikely (off >= elf->maximum_size)) + { + __libelf_seterrno (ELF_E_INVALID_DATA); + result = -1; + goto out; + } + + /* 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); + result = -1; + goto out; + } + + /* 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; + +out: rwlock_unlock (elf->lock); return result; diff --git a/libelf/elf_getshdrstrndx.c b/libelf/elf_getshdrstrndx.c index 1dbed4c8..6f8d66e8 100644 --- a/libelf/elf_getshdrstrndx.c +++ b/libelf/elf_getshdrstrndx.c @@ -92,6 +92,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 +153,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/gelf_getnote.c b/libelf/gelf_getnote.c index 1a368553..7dc82156 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 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -62,7 +62,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 +73,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/note_xlate.h b/libelf/note_xlate.h index 8187e881..62c6f63d 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 935f77ab..16eaa19c 100644 --- a/libelf/version_xlate.h +++ b/libelf/version_xlate.h @@ -61,7 +61,7 @@ elf_cvt_Verdef (void *dest, const void *src, size_t len, int encode) 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 +90,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); @@ -155,7 +155,7 @@ elf_cvt_Verneed (void *dest, const void *src, size_t len, int encode) 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 +182,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/po/ChangeLog b/po/ChangeLog index ec4f3847..885cc587 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2014-12-18 Mark Wielaard <[email protected]> + + * *.po: Update for 0.161. + 2014-08-25 Mark Wielaard <[email protected]> * *.po: Update for 0.160. @@ -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-25 21:49+0200\n" +"POT-Creation-Date: 2014-12-18 22:59+0100\n" "PO-Revision-Date: 2009-06-29 15:15+0200\n" "Last-Translator: Michael Münch <[email protected]>\n" "Language-Team: German\n" @@ -22,8 +22,8 @@ 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/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3182 +#: src/readelf.c:3559 src/readelf.c:8285 src/unstrip.c:2127 src/unstrip.c:2335 #, c-format msgid "memory exhausted" msgstr "Kein Speicher mehr verfügbar" @@ -214,7 +214,12 @@ msgstr "ungültiger Abschnitt" msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:95 +#, fuzzy +msgid "invalid opcode" +msgstr "ungültiger Operand" + +#: libdwfl/argp-std.c:46 src/unstrip.c:2277 msgid "Input selection options:" msgstr "Eingabeauswahloptionen:" @@ -536,7 +541,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:5367 #, c-format msgid "invalid encoding" msgstr "ungültige Kodierung" @@ -619,8 +624,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:7235 src/readelf.c:7683 +#: src/readelf.c:7784 src/readelf.c:7954 #, c-format msgid "invalid data" msgstr "Ungültige Daten" @@ -714,7 +719,7 @@ msgstr "" msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 +#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:663 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 @@ -729,7 +734,7 @@ 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/addr2line.c:201 src/ar.c:294 src/elfcmp.c:668 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 @@ -1104,120 +1109,120 @@ msgstr "" msgid "cannot get symbol in '%s': %s" msgstr "" -#: src/elfcmp.c:372 +#: src/elfcmp.c:373 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "" -#: src/elfcmp.c:375 +#: src/elfcmp.c:376 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:422 src/elfcmp.c:491 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:429 +#: src/elfcmp.c:430 #, 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:440 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:447 +#: src/elfcmp.c:448 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:462 +#: src/elfcmp.c:463 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:470 +#: src/elfcmp.c:471 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:479 +#: src/elfcmp.c:480 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:519 +#: src/elfcmp.c:520 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:523 +#: src/elfcmp.c:524 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:538 +#: src/elfcmp.c:539 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:572 src/elfcmp.c:577 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:596 src/elfcmp.c:602 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:607 +#: src/elfcmp.c:608 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:631 +#: src/elfcmp.c:632 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:694 +#: src/elfcmp.c:695 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/elfcmp.c:723 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/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1923 +#: src/unstrip.c:1952 #, 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:727 src/findtextrel.c:228 src/ranlib.c:178 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:731 +#: src/elfcmp.c:732 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:749 +#: src/elfcmp.c:750 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:759 +#: src/elfcmp.c:760 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:770 src/elfcmp.c:784 #, c-format msgid "cannot get relocation: %s" msgstr "" @@ -2889,52 +2894,57 @@ 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: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:403 +#: src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %Zu: %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:529 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:576 +#: src/findtextrel.c:582 #, 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:589 src/findtextrel.c:609 #, 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:597 #, 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:617 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3342,7 +3352,7 @@ msgid "Warning: size of `%s' changed from %<PRIu64> in %s to %<PRIu64> in %s" msgstr "" #: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/readelf.c:829 src/strip.c:568 #, c-format msgid "cannot determine number of sections: %s" msgstr "" @@ -3573,7 +3583,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:1822 #, c-format msgid "cannot update ELF header: %s" msgstr "" @@ -3741,7 +3751,7 @@ msgid "%s: INTERNAL ERROR %d (%s-%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/strip.c:2160 #, c-format msgid "while closing '%s'" msgstr "beim Schliessen von '%s'" @@ -3785,12 +3795,12 @@ msgstr "%s%s%s: Dateiformat nicht erkannt" 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/nm.c:757 src/nm.c:1163 src/objdump.c:793 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/readelf.c:1785 src/readelf.c:1975 src/readelf.c:2202 src/readelf.c:2460 +#: src/readelf.c:2536 src/readelf.c:2623 src/readelf.c:3201 src/readelf.c:3237 +#: src/readelf.c:3300 src/readelf.c:8187 src/readelf.c:9273 src/readelf.c:9420 +#: src/readelf.c:9488 src/size.c:417 src/size.c:486 src/strip.c:503 #, c-format msgid "cannot get section header string table index" msgstr "" @@ -3873,15 +3883,15 @@ msgstr "Keine Operation angegeben.\n" msgid "while close `%s'" msgstr "" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2072 msgid "INVALID SYMBOL" msgstr "" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:394 src/readelf.c:1914 src/readelf.c:2108 msgid "INVALID SECTION" msgstr "" -#: src/objdump.c:510 +#: src/objdump.c:514 #, c-format msgid "" "\n" @@ -3889,21 +3899,21 @@ msgid "" "%-*s TYPE VALUE\n" msgstr "" -#: src/objdump.c:513 +#: src/objdump.c:517 msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:576 +#: src/objdump.c:582 #, c-format msgid "Contents of section %s:\n" msgstr "Inhalt des Abschnitts %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:703 #, c-format msgid "cannot disassemble" msgstr "Disassemblieren nicht möglich" -#: src/objdump.c:736 +#: src/objdump.c:742 #, fuzzy, c-format msgid "cannot allocate memory" msgstr "konnte Verzeichnis nicht erstellen: %s" @@ -4057,11 +4067,11 @@ msgstr "konnte Elf-Deskriptor nicht erzeugen: %s" 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:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9440 +#: src/unstrip.c:356 src/unstrip.c:387 src/unstrip.c:436 src/unstrip.c:544 +#: src/unstrip.c:561 src/unstrip.c:597 src/unstrip.c:795 src/unstrip.c:1063 +#: src/unstrip.c:1254 src/unstrip.c:1314 src/unstrip.c:1435 src/unstrip.c:1488 +#: src/unstrip.c:1595 src/unstrip.c:1784 #, c-format msgid "cannot get section header: %s" msgstr "" @@ -4071,8 +4081,8 @@ msgstr "" 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:571 src/readelf.c:5398 src/readelf.c:7671 src/readelf.c:7773 +#: src/readelf.c:7939 #, c-format msgid "cannot get %s content: %s" msgstr "" @@ -4354,7 +4364,7 @@ msgid "" " Segment Sections..." msgstr "" -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1258 src/unstrip.c:1843 src/unstrip.c:1886 src/unstrip.c:1893 #, c-format msgid "cannot get program header: %s" msgstr "" @@ -4389,8 +4399,8 @@ msgstr "" msgid "<INVALID SECTION>" 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:1585 src/readelf.c:2208 src/readelf.c:2466 src/readelf.c:2542 +#: src/readelf.c:2846 src/readelf.c:2920 src/readelf.c:4610 #, fuzzy, c-format msgid "invalid sh_link value in section %Zu" msgstr "ungültige .debug_line Sektion" @@ -4437,14 +4447,14 @@ msgstr "" msgid "%<PRId64> (bytes)\n" msgstr "" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1770 src/readelf.c:1960 #, c-format msgid "" "\n" "Invalid symbol table at offset %#0<PRIx64>\n" msgstr "" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1788 src/readelf.c:1978 #, c-format msgid "" "\n" @@ -4457,7 +4467,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1803 src/readelf.c:1993 #, c-format msgid "" "\n" @@ -4476,21 +4486,21 @@ msgstr "" 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:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1913 +#: src/readelf.c:1925 src/readelf.c:2059 src/readelf.c:2071 src/readelf.c:2085 +#: src/readelf.c:2107 src/readelf.c:2120 msgid "<INVALID RELOC>" msgstr "" -#: src/readelf.c:2000 +#: src/readelf.c:2003 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2002 +#: src/readelf.c:2005 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2210 +#: src/readelf.c:2216 #, c-format msgid "" "\n" @@ -4501,40 +4511,40 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2215 +#: src/readelf.c:2221 #, 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:2229 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2225 +#: src/readelf.c:2231 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2245 +#: src/readelf.c:2251 #, c-format msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" msgstr "" -#: src/readelf.c:2333 +#: src/readelf.c:2339 #, c-format msgid "bad dynamic symbol" msgstr "" -#: src/readelf.c:2415 +#: src/readelf.c:2421 msgid "none" msgstr "keine" -#: src/readelf.c:2432 +#: src/readelf.c:2438 msgid "| <unknown>" msgstr "| <unbekannt>" -#: src/readelf.c:2463 +#: src/readelf.c:2469 #, c-format msgid "" "\n" @@ -4547,17 +4557,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2484 +#: src/readelf.c:2490 #, 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:2503 #, 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:2546 #, c-format msgid "" "\n" @@ -4570,17 +4580,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2562 +#: src/readelf.c:2574 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr "" -#: src/readelf.c:2577 +#: src/readelf.c:2589 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" -#: src/readelf.c:2816 +#: src/readelf.c:2850 #, c-format msgid "" "\n" @@ -4593,15 +4603,15 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2844 +#: src/readelf.c:2878 msgid " 0 *local* " msgstr " 0 *lokal* " -#: src/readelf.c:2849 +#: src/readelf.c:2883 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:2890 +#: src/readelf.c:2925 #, c-format msgid "" "\n" @@ -4616,41 +4626,56 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2912 +#: src/readelf.c:2947 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr "" -#: src/readelf.c:2914 +#: src/readelf.c:2949 #, c-format msgid " 0 %6<PRIu32> %5.1f%%\n" msgstr " 0 %6<PRIu32> %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:2956 #, c-format msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:2969 #, 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:2987 src/readelf.c:3042 src/readelf.c:3098 #, c-format msgid "cannot get data for section %d: %s" msgstr "" -#: src/readelf.c:3089 +#: src/readelf.c:2995 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3050 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3106 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3173 #, c-format msgid "" " Symbol Bias: %u\n" " Bitmask Size: %zu bytes %<PRIuFAST32>%% bits set 2nd hash shift: %u\n" msgstr "" -#: src/readelf.c:3164 +#: src/readelf.c:3248 #, c-format msgid "" "\n" @@ -4661,13 +4686,13 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:3178 +#: src/readelf.c:3262 msgid "" " Library Time Stamp Checksum Version " "Flags" msgstr "" -#: src/readelf.c:3228 +#: src/readelf.c:3312 #, c-format msgid "" "\n" @@ -4675,140 +4700,140 @@ msgid "" "%#0<PRIx64>:\n" msgstr "" -#: src/readelf.c:3244 +#: src/readelf.c:3329 msgid " Owner Size\n" msgstr "" -#: src/readelf.c:3270 +#: src/readelf.c:3358 #, c-format msgid " %-13s %4<PRIu32>\n" msgstr " %-13s %4<PRIu32>\n" -#: src/readelf.c:3302 +#: src/readelf.c:3397 #, c-format msgid " %-4u %12<PRIu32>\n" msgstr " %-4u %12<PRIu32>\n" -#: src/readelf.c:3307 +#: src/readelf.c:3402 #, c-format msgid " File: %11<PRIu32>\n" msgstr " File: %11<PRIu32>\n" -#: src/readelf.c:3342 +#: src/readelf.c:3451 #, c-format msgid " %s: %<PRId64>, %s\n" msgstr " %s: %<PRId64>, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3454 #, c-format msgid " %s: %<PRId64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:3348 +#: src/readelf.c:3457 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3467 #, c-format msgid " %u: %<PRId64>\n" msgstr " %u: %<PRId64>\n" -#: src/readelf.c:3358 +#: src/readelf.c:3470 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3515 #, c-format msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3406 +#: src/readelf.c:3518 #, c-format msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3411 +#: src/readelf.c:3523 #, c-format msgid "%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3414 +#: src/readelf.c:3526 #, c-format msgid "%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3420 +#: src/readelf.c:3532 #, c-format msgid "%s+%#<PRIx64> <%s>" msgstr "%s+%#<PRIx64> <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3535 #, c-format msgid "%s+%#0*<PRIx64> <%s>" msgstr "%s+%#0*<PRIx64> <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3539 #, c-format msgid "%#<PRIx64> <%s>" msgstr "%#<PRIx64> <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3542 #, c-format msgid "%#0*<PRIx64> <%s>" msgstr "%#0*<PRIx64> <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3547 #, c-format msgid "%s+%#<PRIx64>" msgstr "%s+%#<PRIx64>" -#: src/readelf.c:3438 +#: src/readelf.c:3550 #, c-format msgid "%s+%#0*<PRIx64>" msgstr "%s+%#0*<PRIx64>" -#: src/readelf.c:3820 +#: src/readelf.c:3932 msgid "empty block" msgstr "" -#: src/readelf.c:3823 +#: src/readelf.c:3935 #, c-format msgid "%zu byte block:" msgstr "" -#: src/readelf.c:4217 +#: src/readelf.c:4332 #, c-format msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" msgstr "" -#: src/readelf.c:4274 +#: src/readelf.c:4389 #, c-format msgid "%s %#<PRIx64> used with different address sizes" msgstr "" -#: src/readelf.c:4281 +#: src/readelf.c:4396 #, c-format msgid "%s %#<PRIx64> used with different offset sizes" msgstr "" -#: src/readelf.c:4288 +#: src/readelf.c:4403 #, c-format msgid "%s %#<PRIx64> used with different base addresses" msgstr "" -#: src/readelf.c:4370 +#: src/readelf.c:4492 #, c-format msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n" msgstr "" -#: src/readelf.c:4378 +#: src/readelf.c:4500 #, c-format msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n" msgstr "" -#: src/readelf.c:4404 +#: src/readelf.c:4526 #, c-format msgid "" "\n" @@ -4816,37 +4841,37 @@ msgid "" " [ Code]\n" msgstr "" -#: src/readelf.c:4412 +#: src/readelf.c:4534 #, c-format msgid "" "\n" "Abbreviation section at offset %<PRIu64>:\n" msgstr "" -#: src/readelf.c:4425 +#: src/readelf.c:4547 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr "" -#: src/readelf.c:4441 +#: src/readelf.c:4563 #, c-format msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n" msgstr "" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "yes" msgstr "ja" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "no" msgstr "nein" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4600 src/readelf.c:4673 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "" -#: src/readelf.c:4493 +#: src/readelf.c:4615 #, c-format msgid "" "\n" @@ -4857,189 +4882,193 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:4524 +#: src/readelf.c:4646 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4648 #, c-format msgid "" " [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\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:4678 src/readelf.c:4832 src/readelf.c:5408 src/readelf.c:6362 +#: src/readelf.c:6894 src/readelf.c:7014 src/readelf.c:7177 src/readelf.c:7602 #, c-format msgid "" "\n" "DWARF section [%2zu] '%s' at offset %#<PRIx64>:\n" msgstr "" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4691 src/readelf.c:6388 #, c-format msgid "" "\n" "Table at offset %Zu:\n" msgstr "" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4695 src/readelf.c:5432 src/readelf.c:6399 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "" -#: src/readelf.c:4589 +#: src/readelf.c:4711 #, fuzzy, c-format msgid "" "\n" " Length: %6<PRIu64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4601 +#: src/readelf.c:4723 #, fuzzy, c-format msgid " DWARF version: %6<PRIuFAST16>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4605 +#: src/readelf.c:4727 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4738 #, fuzzy, c-format msgid " CU offset: %6<PRIx64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4622 +#: src/readelf.c:4744 #, c-format msgid " Address size: %6<PRIu64>\n" msgstr "" -#: src/readelf.c:4626 +#: src/readelf.c:4748 #, fuzzy, c-format msgid "unsupported address size" msgstr "Kein Adress-Wert" -#: src/readelf.c:4631 +#: src/readelf.c:4753 #, c-format msgid "" " Segment size: %6<PRIu64>\n" "\n" msgstr "" -#: src/readelf.c:4635 +#: src/readelf.c:4757 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4797 #, fuzzy, c-format msgid " %s..%s (%<PRIx64>)\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4678 +#: src/readelf.c:4800 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4809 #, c-format msgid " %Zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4827 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4857 src/readelf.c:6921 #, c-format msgid " [%6tx] <INVALID DATA>\n" msgstr "" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4879 src/readelf.c:6943 #, c-format msgid " [%6tx] base address %s\n" msgstr "" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4886 src/readelf.c:6950 #, fuzzy, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4775 +#: src/readelf.c:4897 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:4899 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5078 +msgid " <INVALID DATA>\n" +msgstr "" + +#: src/readelf.c:5387 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "ELF Kopf konnte nicht ausgelesen werden" -#: src/readelf.c:5227 +#: src/readelf.c:5404 #, c-format msgid "" "\n" "Call frame information section [%2zu] '%s' at offset %#<PRIx64>:\n" msgstr "" -#: src/readelf.c:5277 +#: src/readelf.c:5454 #, c-format msgid "" "\n" " [%6tx] Zero terminator\n" msgstr "" -#: src/readelf.c:5362 +#: src/readelf.c:5547 src/readelf.c:5702 #, fuzzy, c-format msgid "invalid augmentation length" msgstr "ungültige Abschnittsausrichtung" -#: src/readelf.c:5374 +#: src/readelf.c:5562 msgid "FDE address encoding: " msgstr "" -#: src/readelf.c:5380 +#: src/readelf.c:5568 msgid "LSDA pointer encoding: " msgstr "" -#: src/readelf.c:5491 +#: src/readelf.c:5679 #, c-format msgid " (offset: %#<PRIx64>)" msgstr "" -#: src/readelf.c:5498 +#: src/readelf.c:5686 #, c-format msgid " (end offset: %#<PRIx64>)" msgstr "" -#: src/readelf.c:5525 +#: src/readelf.c:5723 #, c-format msgid " %-26sLSDA pointer: %#<PRIx64>\n" msgstr "" -#: src/readelf.c:5577 +#: src/readelf.c:5778 #, c-format msgid "cannot get attribute code: %s" msgstr "" -#: src/readelf.c:5586 +#: src/readelf.c:5787 #, c-format msgid "cannot get attribute form: %s" msgstr "" -#: src/readelf.c:5601 +#: src/readelf.c:5802 #, c-format msgid "cannot get attribute value: %s" msgstr "" -#: src/readelf.c:5894 +#: src/readelf.c:6101 #, c-format msgid "" "\n" @@ -5047,7 +5076,7 @@ msgid "" " [Offset]\n" msgstr "" -#: src/readelf.c:5926 +#: src/readelf.c:6133 #, c-format msgid "" " Type unit at offset %<PRIu64>:\n" @@ -5056,7 +5085,7 @@ msgid "" " Type signature: %#<PRIx64>, Type offset: %#<PRIx64>\n" msgstr "" -#: src/readelf.c:5935 +#: src/readelf.c:6142 #, c-format msgid "" " Compilation unit at offset %<PRIu64>:\n" @@ -5064,32 +5093,32 @@ msgid "" "%<PRIu8>, Offset size: %<PRIu8>\n" msgstr "" -#: src/readelf.c:5960 +#: src/readelf.c:6167 #, c-format msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s" msgstr "" -#: src/readelf.c:5974 +#: src/readelf.c:6181 #, c-format msgid "cannot get DIE offset: %s" msgstr "" -#: src/readelf.c:5983 +#: src/readelf.c:6190 #, c-format msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s" msgstr "" -#: src/readelf.c:6015 +#: src/readelf.c:6222 #, c-format msgid "cannot get next DIE: %s\n" msgstr "" -#: src/readelf.c:6023 +#: src/readelf.c:6230 #, c-format msgid "cannot get next DIE: %s" msgstr "" -#: src/readelf.c:6059 +#: src/readelf.c:6266 #, c-format msgid "" "\n" @@ -5097,12 +5126,12 @@ msgid "" "\n" msgstr "" -#: src/readelf.c:6158 +#: src/readelf.c:6375 #, c-format msgid "cannot get line data section data: %s" msgstr "" -#: src/readelf.c:6226 +#: src/readelf.c:6445 #, c-format msgid "" "\n" @@ -5119,239 +5148,249 @@ msgid "" "Opcodes:\n" msgstr "" -#: src/readelf.c:6247 +#: src/readelf.c:6466 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "" -#: src/readelf.c:6262 +#: src/readelf.c:6481 #, c-format msgid " [%*<PRIuFAST8>] %hhu argument\n" msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6270 +#: src/readelf.c:6489 msgid "" "\n" "Directory table:" msgstr "" -#: src/readelf.c:6286 +#: src/readelf.c:6505 msgid "" "\n" "File name table:\n" " Entry Dir Time Size Name" msgstr "" -#: src/readelf.c:6315 +#: src/readelf.c:6540 msgid "" "\n" "Line number statements:" msgstr "" -#: src/readelf.c:6391 +#: src/readelf.c:6591 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "" + +#: src/readelf.c:6627 #, c-format msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6396 +#: src/readelf.c:6632 #, c-format msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6416 +#: src/readelf.c:6652 #, c-format msgid " extended opcode %u: " msgstr "" -#: src/readelf.c:6421 +#: src/readelf.c:6657 msgid " end of sequence" msgstr "" -#: src/readelf.c:6438 +#: src/readelf.c:6676 #, c-format msgid " set address to %s\n" msgstr "" -#: src/readelf.c:6459 +#: src/readelf.c:6703 #, c-format msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n" msgstr "" -#: src/readelf.c:6472 +#: src/readelf.c:6716 #, c-format msgid " set discriminator to %u\n" msgstr "" -#: src/readelf.c:6477 +#: src/readelf.c:6721 #, fuzzy msgid " unknown opcode" msgstr "unbekannter Typ" -#: src/readelf.c:6489 +#: src/readelf.c:6733 msgid " copy" msgstr "" -#: src/readelf.c:6500 +#: src/readelf.c:6744 #, c-format msgid " advance address by %u to %s, op_index to %u\n" msgstr "" -#: src/readelf.c:6504 +#: src/readelf.c:6748 #, c-format msgid " advance address by %u to %s\n" msgstr "" -#: src/readelf.c:6515 +#: src/readelf.c:6759 #, c-format msgid " advance line by constant %d to %<PRId64>\n" msgstr "" -#: src/readelf.c:6523 +#: src/readelf.c:6767 #, c-format msgid " set file to %<PRIu64>\n" msgstr "" -#: src/readelf.c:6533 +#: src/readelf.c:6777 #, c-format msgid " set column to %<PRIu64>\n" msgstr "" -#: src/readelf.c:6540 +#: src/readelf.c:6784 #, c-format msgid " set '%s' to %<PRIuFAST8>\n" msgstr "" -#: src/readelf.c:6546 +#: src/readelf.c:6790 msgid " set basic block flag" msgstr "" -#: src/readelf.c:6555 +#: src/readelf.c:6803 #, c-format msgid " advance address by constant %u to %s, op_index to %u\n" msgstr "" -#: src/readelf.c:6559 +#: src/readelf.c:6807 #, c-format msgid " advance address by constant %u to %s\n" msgstr "" -#: src/readelf.c:6577 +#: src/readelf.c:6825 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr "" -#: src/readelf.c:6586 +#: src/readelf.c:6834 msgid " set prologue end flag" msgstr "" -#: src/readelf.c:6591 +#: src/readelf.c:6839 msgid " set epilogue begin flag" msgstr "" -#: src/readelf.c:6600 +#: src/readelf.c:6848 #, c-format msgid " set isa to %u\n" msgstr "" -#: src/readelf.c:6609 +#: src/readelf.c:6857 #, c-format msgid " unknown opcode with %<PRIu8> parameter:" msgid_plural " unknown opcode with %<PRIu8> parameters:" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6641 +#: src/readelf.c:6889 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "" -#: src/readelf.c:6716 +#: src/readelf.c:6964 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:6966 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:6973 src/readelf.c:7858 msgid " <INVALID DATA>\n" msgstr "" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7025 src/readelf.c:7186 #, c-format msgid "cannot get macro information section data: %s" msgstr "" -#: src/readelf.c:6856 +#: src/readelf.c:7104 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "" -#: src/readelf.c:6972 +#: src/readelf.c:7127 +#, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "" + +#: src/readelf.c:7227 #, fuzzy, c-format msgid " Offset: 0x%<PRIx64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:6984 +#: src/readelf.c:7239 #, fuzzy, c-format msgid " Version: %<PRIu16>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7245 src/readelf.c:7968 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7252 #, fuzzy, c-format msgid " Flag: 0x%<PRIx8>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:7000 +#: src/readelf.c:7255 #, c-format msgid " Offset length: %<PRIu8>\n" msgstr "" -#: src/readelf.c:7008 +#: src/readelf.c:7263 #, c-format msgid " .debug_line offset: 0x%<PRIx64>\n" msgstr "" -#: src/readelf.c:7021 +#: src/readelf.c:7276 #, c-format msgid " extension opcode table, %<PRIu8> items:\n" msgstr "" -#: src/readelf.c:7028 +#: src/readelf.c:7283 #, c-format msgid " [%<PRIx8>]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7295 #, c-format msgid " %<PRIu8> arguments:" msgstr "" -#: src/readelf.c:7068 +#: src/readelf.c:7323 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7560 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7588 #, c-format msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n" msgstr "" -#: src/readelf.c:7372 +#: src/readelf.c:7629 #, c-format msgid "" "\n" @@ -5359,47 +5398,47 @@ msgid "" " %*s String\n" msgstr "" -#: src/readelf.c:7386 +#: src/readelf.c:7643 #, c-format msgid " *** error while reading strings: %s\n" msgstr "" -#: src/readelf.c:7406 +#: src/readelf.c:7663 #, c-format msgid "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" msgstr "" -#: src/readelf.c:7508 +#: src/readelf.c:7765 #, c-format msgid "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" msgstr "" -#: src/readelf.c:7531 +#: src/readelf.c:7788 #, c-format msgid " LPStart encoding: %#x " msgstr "" -#: src/readelf.c:7543 +#: src/readelf.c:7800 #, c-format msgid " TType encoding: %#x " msgstr "" -#: src/readelf.c:7557 +#: src/readelf.c:7815 #, c-format msgid " Call site encoding: %#x " msgstr "" -#: src/readelf.c:7570 +#: src/readelf.c:7828 msgid "" "\n" " Call site table:" msgstr "" -#: src/readelf.c:7584 +#: src/readelf.c:7842 #, c-format msgid "" " [%4u] Call site start: %#<PRIx64>\n" @@ -5408,193 +5447,193 @@ msgid "" " Action: %u\n" msgstr "" -#: src/readelf.c:7644 +#: src/readelf.c:7909 #, c-format msgid "invalid TType encoding" msgstr "" -#: src/readelf.c:7665 +#: src/readelf.c:7930 #, c-format msgid "" "\n" "GDB section [%2zu] '%s' at offset %#<PRIx64> contains %<PRId64> bytes :\n" msgstr "" -#: src/readelf.c:7694 +#: src/readelf.c:7959 #, fuzzy, c-format msgid " Version: %<PRId32>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:7712 +#: src/readelf.c:7977 #, c-format msgid " CU offset: %#<PRIx32>\n" msgstr "" -#: src/readelf.c:7719 +#: src/readelf.c:7984 #, c-format msgid " TU offset: %#<PRIx32>\n" msgstr "" -#: src/readelf.c:7726 +#: src/readelf.c:7991 #, c-format msgid " address offset: %#<PRIx32>\n" msgstr "" -#: src/readelf.c:7733 +#: src/readelf.c:7998 #, c-format msgid " symbol offset: %#<PRIx32>\n" msgstr "" -#: src/readelf.c:7740 +#: src/readelf.c:8005 #, c-format msgid " constant offset: %#<PRIx32>\n" msgstr "" -#: src/readelf.c:7747 +#: src/readelf.c:8012 #, c-format msgid "" "\n" " CU list at offset %#<PRIx32> contains %zu entries:\n" msgstr "" -#: src/readelf.c:7769 +#: src/readelf.c:8034 #, c-format msgid "" "\n" " TU list at offset %#<PRIx32> contains %zu entries:\n" msgstr "" -#: src/readelf.c:7795 +#: src/readelf.c:8060 #, c-format msgid "" "\n" " Address list at offset %#<PRIx32> contains %zu entries:\n" msgstr "" -#: src/readelf.c:7824 +#: src/readelf.c:8089 #, c-format msgid "" "\n" " Symbol table at offset %#<PRIx32> contains %zu slots:\n" msgstr "" -#: src/readelf.c:7909 +#: src/readelf.c:8176 #, 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:8336 src/readelf.c:8942 src/readelf.c:9053 src/readelf.c:9111 #, c-format msgid "cannot convert core note data: %s" msgstr "" -#: src/readelf.c:8416 +#: src/readelf.c:8683 #, c-format msgid "" "\n" "%*s... <repeats %u more times> ..." msgstr "" -#: src/readelf.c:8919 +#: src/readelf.c:9190 msgid " Owner Data size Type\n" msgstr "" -#: src/readelf.c:8937 +#: src/readelf.c:9208 #, c-format msgid " %-13.*s %9<PRId32> %s\n" msgstr "" -#: src/readelf.c:8987 +#: src/readelf.c:9258 #, c-format msgid "cannot get content of note section: %s" msgstr "" -#: src/readelf.c:9014 +#: src/readelf.c:9285 #, c-format msgid "" "\n" "Note section [%2zu] '%s' of %<PRIu64> bytes at offset %#0<PRIx64>:\n" msgstr "" -#: src/readelf.c:9037 +#: src/readelf.c:9308 #, c-format msgid "" "\n" "Note segment of %<PRIu64> bytes at offset %#0<PRIx64>:\n" msgstr "" -#: src/readelf.c:9083 +#: src/readelf.c:9354 #, c-format msgid "" "\n" "Section [%Zu] '%s' has no data to dump.\n" msgstr "" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9360 src/readelf.c:9383 #, c-format msgid "cannot get data for section [%Zu] '%s': %s" msgstr "" -#: src/readelf.c:9093 +#: src/readelf.c:9364 #, c-format msgid "" "\n" "Hex dump of section [%Zu] '%s', %<PRIu64> bytes at offset %#0<PRIx64>:\n" msgstr "" -#: src/readelf.c:9106 +#: src/readelf.c:9377 #, c-format msgid "" "\n" "Section [%Zu] '%s' has no strings to dump.\n" msgstr "" -#: src/readelf.c:9116 +#: src/readelf.c:9387 #, c-format msgid "" "\n" "String section [%Zu] '%s' contains %<PRIu64> bytes at offset %#0<PRIx64>:\n" msgstr "" -#: src/readelf.c:9164 +#: src/readelf.c:9435 #, c-format msgid "" "\n" "section [%lu] does not exist" msgstr "" -#: src/readelf.c:9193 +#: src/readelf.c:9464 #, c-format msgid "" "\n" "section '%s' does not exist" msgstr "" -#: src/readelf.c:9250 +#: src/readelf.c:9521 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "" -#: src/readelf.c:9253 +#: src/readelf.c:9524 #, c-format msgid "" "\n" "Archive '%s' has no symbol index\n" msgstr "" -#: src/readelf.c:9257 +#: src/readelf.c:9528 #, c-format msgid "" "\n" "Index of archive '%s' has %Zu entries:\n" msgstr "" -#: src/readelf.c:9275 +#: src/readelf.c:9546 #, c-format msgid "cannot extract member at offset %Zu in '%s': %s" msgstr "" -#: src/readelf.c:9280 +#: src/readelf.c:9551 #, c-format msgid "Archive member '%s' contains:\n" msgstr "" @@ -5656,12 +5695,12 @@ msgstr "" msgid "%s: file format not recognized" msgstr "" -#: src/size.c:438 src/size.c:571 +#: src/size.c:437 src/size.c:570 #, c-format msgid " (ex %s)" msgstr "" -#: src/size.c:596 +#: src/size.c:595 msgid "(TOTALS)\n" msgstr "" @@ -5817,82 +5856,87 @@ msgstr "" msgid "cannot open EBL backend" msgstr "" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:508 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "konnte Programm-Kopf nicht erstellen: %s" + +#: src/strip.c:523 src/strip.c:547 #, c-format msgid "cannot create new file '%s': %s" msgstr "" -#: src/strip.c:608 +#: src/strip.c:613 #, c-format msgid "illformed file '%s'" msgstr "" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:935 src/strip.c:1024 #, c-format msgid "while generating output file: %s" msgstr "" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:997 src/strip.c:1962 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "" -#: src/strip.c:1006 +#: src/strip.c:1011 #, c-format msgid "while preparing output for '%s'" msgstr "" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1062 src/strip.c:1119 #, c-format msgid "while create section header section: %s" msgstr "" -#: src/strip.c:1063 +#: src/strip.c:1068 #, c-format msgid "cannot allocate section data: %s" msgstr "" -#: src/strip.c:1123 +#: src/strip.c:1128 #, c-format msgid "while create section header string table: %s" msgstr "" -#: src/strip.c:1752 +#: src/strip.c:1757 #, fuzzy, c-format msgid "bad relocation" msgstr "Relocations anzeigen" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1874 src/strip.c:1984 #, c-format msgid "while writing '%s': %s" msgstr "" -#: src/strip.c:1880 +#: src/strip.c:1885 #, c-format msgid "while creating '%s'" msgstr "" -#: src/strip.c:1902 +#: src/strip.c:1907 #, c-format msgid "while computing checksum for debug information" msgstr "" -#: src/strip.c:1965 +#: src/strip.c:1970 #, c-format msgid "%s: error while reading the file: %s" msgstr "" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2009 src/strip.c:2029 #, fuzzy, c-format msgid "while writing '%s'" msgstr "beim Schliessen von '%s'" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2066 src/strip.c:2073 #, c-format msgid "error while finishing '%s': %s" msgstr "" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2096 src/strip.c:2153 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "" @@ -5978,239 +6022,244 @@ msgstr "" msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:262 src/unstrip.c:1832 src/unstrip.c:1876 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" + +#: src/unstrip.c:267 src/unstrip.c:1836 #, c-format msgid "cannot create program headers: %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:273 #, c-format msgid "cannot copy program header: %s" msgstr "konnte Programm-Kopf nicht kopieren: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:283 #, c-format msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:286 src/unstrip.c:1513 #, 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:288 src/unstrip.c:1515 #, c-format msgid "cannot copy section data: %s" msgstr "konnte Abschnittsdaten nicht kopieren: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:312 #, 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:352 src/unstrip.c:769 src/unstrip.c:1547 #, 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:368 src/unstrip.c:586 src/unstrip.c:607 src/unstrip.c:619 +#: src/unstrip.c:1568 src/unstrip.c:1698 src/unstrip.c:1722 #, c-format msgid "cannot update symbol table: %s" msgstr "konnte Symboltabelle nicht aktualisieren: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:378 #, c-format msgid "cannot update section header: %s" msgstr "" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:417 src/unstrip.c:428 #, c-format msgid "cannot update relocation: %s" msgstr "" -#: src/unstrip.c:511 +#: src/unstrip.c:515 #, c-format msgid "cannot get symbol version: %s" msgstr "" -#: src/unstrip.c:523 +#: src/unstrip.c:527 #, c-format msgid "unexpected section type in [%Zu] with sh_link to symtab" msgstr "" -#: src/unstrip.c:771 +#: src/unstrip.c:775 #, c-format msgid "invalid string offset in symbol [%Zu]" msgstr "" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:917 src/unstrip.c:1258 #, c-format msgid "cannot read section [%Zu] name: %s" msgstr "" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:958 src/unstrip.c:977 src/unstrip.c:1010 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:994 +#: src/unstrip.c:998 #, c-format msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1053 src/unstrip.c:1378 #, c-format msgid "cannot find matching section for [%Zu] '%s'" msgstr "" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1178 src/unstrip.c:1193 src/unstrip.c:1459 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1198 +#: src/unstrip.c:1202 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1229 src/unstrip.c:1233 #, 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:1237 src/unstrip.c:1241 src/unstrip.c:1474 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1240 +#: src/unstrip.c:1244 #, 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:1303 src/unstrip.c:1393 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1449 +#: src/unstrip.c:1453 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1551 +#: src/unstrip.c:1555 #, c-format msgid "symbol [%Zu] has invalid section index" msgstr "" -#: src/unstrip.c:1789 +#: src/unstrip.c:1793 #, fuzzy, c-format msgid "cannot read section data: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1814 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1838 +#: src/unstrip.c:1846 #, 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:1851 src/unstrip.c:1934 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:1891 +#: src/unstrip.c:1903 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1894 +#: src/unstrip.c:1906 #, 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:1925 src/unstrip.c:1976 src/unstrip.c:1988 src/unstrip.c:2074 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:1955 +#: src/unstrip.c:1967 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:1969 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:1992 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:1995 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:1998 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2001 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2031 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2023 +#: src/unstrip.c:2035 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2038 +#: src/unstrip.c:2050 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2042 +#: src/unstrip.c:2054 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2055 +#: src/unstrip.c:2067 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2086 +#: src/unstrip.c:2098 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2219 +#: src/unstrip.c:2231 #, c-format msgid "no matching modules found" msgstr "kein passendes Modul gefunden" -#: src/unstrip.c:2228 +#: src/unstrip.c:2240 #, c-format msgid "matched more than one module" msgstr "mehr als ein passendes Modul" -#: src/unstrip.c:2275 +#: src/unstrip.c:2287 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2276 +#: src/unstrip.c:2288 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" @@ -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-25 21:49+0200\n" +"POT-Creation-Date: 2014-12-18 22:59+0100\n" "PO-Revision-Date: 2011-01-10 15:17-0300\n" "Last-Translator: Claudio Rodrigo Pereyra Diaz <claudiorodrigo@pereyradiaz." "com.ar>\n" @@ -24,8 +24,8 @@ 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/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3182 +#: src/readelf.c:3559 src/readelf.c:8285 src/unstrip.c:2127 src/unstrip.c:2335 #, c-format msgid "memory exhausted" msgstr "memoria agotada" @@ -215,7 +215,12 @@ msgstr "sección CFI inválida" msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:95 +#, fuzzy +msgid "invalid opcode" +msgstr "operando inválido" + +#: libdwfl/argp-std.c:46 src/unstrip.c:2277 msgid "Input selection options:" msgstr "Opciones de selección de entrada:" @@ -533,7 +538,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:5367 #, c-format msgid "invalid encoding" msgstr "codificación inválida" @@ -614,8 +619,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:7235 src/readelf.c:7683 +#: src/readelf.c:7784 src/readelf.c:7954 #, c-format msgid "invalid data" msgstr "datos inválidos" @@ -715,7 +720,7 @@ msgstr "" msgid "[ADDR...]" msgstr "[DIREC...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 +#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:663 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 @@ -731,7 +736,7 @@ 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/addr2line.c:201 src/ar.c:294 src/elfcmp.c:668 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 @@ -1106,121 +1111,121 @@ msgstr "No se puede obtener contenido de sección %zu en '%s': %s" msgid "cannot get symbol in '%s': %s" msgstr "No se puede obtener símbolo en '%s': %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:373 #, 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:376 #, 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:422 src/elfcmp.c:491 #, 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:430 #, 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:440 #, 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:448 #, 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:463 #, fuzzy, c-format msgid "%s %s differ: build ID length" msgstr "%s %s differ: brecha" -#: src/elfcmp.c:470 +#: src/elfcmp.c:471 #, 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:480 #, 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:520 #, 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:524 #, 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:539 #, 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:572 src/elfcmp.c:577 #, 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:596 src/elfcmp.c:602 #, 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:608 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s differ: encabezamiento de programa %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:632 #, c-format msgid "%s %s differ: gap" msgstr "%s %s differ: brecha" -#: src/elfcmp.c:694 +#: src/elfcmp.c:695 #, 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/elfcmp.c:723 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/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1923 +#: src/unstrip.c:1952 #, 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:727 src/findtextrel.c:228 src/ranlib.c:178 #, 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:732 #, 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:750 #, 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:760 #, 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:770 src/elfcmp.c:784 #, c-format msgid "cannot get relocation: %s" msgstr "No se puede obtener reubicación: %s" @@ -3163,42 +3168,47 @@ 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 +#: src/findtextrel.c:409 #, 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:529 #, 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:582 #, 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:589 src/findtextrel.c:609 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3207,7 +3217,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:597 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3216,7 +3226,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:617 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3641,7 +3651,7 @@ msgstr "" "Advertencia: el tamaño de `%s' cambió de %<PRIu64> en %s a %<PRIu64> en %s" #: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/readelf.c:829 src/strip.c:568 #, c-format msgid "cannot determine number of sections: %s" msgstr "no se pudieron determinar el número de secciones: %s" @@ -3897,7 +3907,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:1822 #, c-format msgid "cannot update ELF header: %s" msgstr "No se puede actualizar encabezamiento ELF: %s" @@ -4068,7 +4078,7 @@ msgid "%s: INTERNAL ERROR %d (%s-%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/strip.c:2160 #, c-format msgid "while closing '%s'" msgstr "error al cerrar '%s'" @@ -4112,12 +4122,12 @@ msgstr "%s%s%s: no se reconoció el formato de fichero" 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/nm.c:757 src/nm.c:1163 src/objdump.c:793 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/readelf.c:1785 src/readelf.c:1975 src/readelf.c:2202 src/readelf.c:2460 +#: src/readelf.c:2536 src/readelf.c:2623 src/readelf.c:3201 src/readelf.c:3237 +#: src/readelf.c:3300 src/readelf.c:8187 src/readelf.c:9273 src/readelf.c:9420 +#: src/readelf.c:9488 src/size.c:417 src/size.c:486 src/strip.c:503 #, c-format msgid "cannot get section header string table index" msgstr "no se puede obtener índice de cadena de encabezamiento de sección" @@ -4203,15 +4213,15 @@ msgstr "No se especificó una operación.\n" msgid "while close `%s'" msgstr "mientras cierra `%s'" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2072 msgid "INVALID SYMBOL" msgstr "SÍMBOLO INVÁLIDO" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:394 src/readelf.c:1914 src/readelf.c:2108 msgid "INVALID SECTION" msgstr "SECCIÓN INVÁLIDA" -#: src/objdump.c:510 +#: src/objdump.c:514 #, c-format msgid "" "\n" @@ -4222,21 +4232,21 @@ msgstr "" "REUBICACIÓN DE REGISTROS PARA [%s]:\n" "%-*s TIPO VALOR\n" -#: src/objdump.c:513 +#: src/objdump.c:517 msgid "OFFSET" msgstr "COMPENSACIÓN" -#: src/objdump.c:576 +#: src/objdump.c:582 #, c-format msgid "Contents of section %s:\n" msgstr "Contenido de la sección %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:703 #, c-format msgid "cannot disassemble" msgstr "No se puede desensamblar" -#: src/objdump.c:736 +#: src/objdump.c:742 #, fuzzy, c-format msgid "cannot allocate memory" msgstr "No se puede asignar sección PLT: %s" @@ -4394,11 +4404,11 @@ msgstr "no se puede crear descriptor ELF: %s" 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:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9440 +#: src/unstrip.c:356 src/unstrip.c:387 src/unstrip.c:436 src/unstrip.c:544 +#: src/unstrip.c:561 src/unstrip.c:597 src/unstrip.c:795 src/unstrip.c:1063 +#: src/unstrip.c:1254 src/unstrip.c:1314 src/unstrip.c:1435 src/unstrip.c:1488 +#: src/unstrip.c:1595 src/unstrip.c:1784 #, c-format msgid "cannot get section header: %s" msgstr "No se puede obtener encabezamiento de sección: %s" @@ -4408,8 +4418,8 @@ msgstr "No se puede obtener encabezamiento de sección: %s" 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:571 src/readelf.c:5398 src/readelf.c:7671 src/readelf.c:7773 +#: src/readelf.c:7939 #, c-format msgid "cannot get %s content: %s" msgstr "No se puede obtener el contenido %s: %s" @@ -4712,7 +4722,7 @@ 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:1258 src/unstrip.c:1843 src/unstrip.c:1886 src/unstrip.c:1893 #, c-format msgid "cannot get program header: %s" msgstr "no se puede obtener memoria para encabezamiento del programa: %s" @@ -4755,8 +4765,8 @@ msgstr "<SÍMBOLO INVÁLIDO>" msgid "<INVALID SECTION>" msgstr "<SECCIÓN INVÁLIDA>" -#: 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:1585 src/readelf.c:2208 src/readelf.c:2466 src/readelf.c:2542 +#: src/readelf.c:2846 src/readelf.c:2920 src/readelf.c:4610 #, fuzzy, c-format msgid "invalid sh_link value in section %Zu" msgstr ".debug_line section inválida" @@ -4811,7 +4821,7 @@ msgstr "Ruta de ejecución de la biblioteca: [%s]\n" msgid "%<PRId64> (bytes)\n" msgstr "%<PRId64> (bytes)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1770 src/readelf.c:1960 #, c-format msgid "" "\n" @@ -4820,7 +4830,7 @@ msgstr "" "\n" "Tabla de símbolos inválida en compensación %#0<PRIx64>\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1788 src/readelf.c:1978 #, c-format msgid "" "\n" @@ -4839,7 +4849,7 @@ msgstr[1] "" "Sección de reubicación [%2zu] '%s' para sección [%2u] '%s' en compensación " "%#0<PRIx64> contiene entradas %d:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1803 src/readelf.c:1993 #, c-format msgid "" "\n" @@ -4864,21 +4874,21 @@ msgstr " Compensación Tipo Valor Nombre\n" 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:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1913 +#: src/readelf.c:1925 src/readelf.c:2059 src/readelf.c:2071 src/readelf.c:2085 +#: src/readelf.c:2107 src/readelf.c:2120 msgid "<INVALID RELOC>" msgstr "<REUBIC INVÁLIDA>" -#: src/readelf.c:2000 +#: src/readelf.c:2003 msgid " Offset Type Value Addend Name\n" msgstr " Compensación Tipo Valor Nombre Adend\n" -#: src/readelf.c:2002 +#: src/readelf.c:2005 msgid " Offset Type Value Addend Name\n" msgstr " Compensación Tipo Valor Nombre Adend\n" -#: src/readelf.c:2210 +#: src/readelf.c:2216 #, c-format msgid "" "\n" @@ -4893,40 +4903,40 @@ msgstr[1] "" "\n" "La tabla de símbolos [%2u] '%s' contiene entradas %u:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2221 #, 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:2229 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:2231 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:2251 #, c-format msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2339 #, c-format msgid "bad dynamic symbol" msgstr "símbolo dinámico erróneo" -#: src/readelf.c:2415 +#: src/readelf.c:2421 msgid "none" msgstr "nada" -#: src/readelf.c:2432 +#: src/readelf.c:2438 msgid "| <unknown>" msgstr "| <desconocido>" -#: src/readelf.c:2463 +#: src/readelf.c:2469 #, c-format msgid "" "\n" @@ -4947,17 +4957,17 @@ msgstr[1] "" " Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2484 +#: src/readelf.c:2490 #, 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:2503 #, 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:2546 #, c-format msgid "" "\n" @@ -4978,18 +4988,18 @@ msgstr[1] "" " Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2562 +#: src/readelf.c:2574 #, 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:2589 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Principal %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2850 #, c-format msgid "" "\n" @@ -5010,15 +5020,15 @@ msgstr[1] "" " Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: " "[%2u] '%s'" -#: src/readelf.c:2844 +#: src/readelf.c:2878 msgid " 0 *local* " msgstr " 0 *local* " -#: src/readelf.c:2849 +#: src/readelf.c:2883 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:2890 +#: src/readelf.c:2925 #, c-format msgid "" "\n" @@ -5043,22 +5053,22 @@ msgstr[1] "" " Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2912 +#: src/readelf.c:2947 #, 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:2949 #, c-format msgid " 0 %6<PRIu32> %5.1f%%\n" msgstr " 0 %6<PRIu32> %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:2956 #, c-format msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:2969 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -5067,12 +5077,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:2987 src/readelf.c:3042 src/readelf.c:3098 #, 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:2995 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3050 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3106 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3173 #, c-format msgid "" " Symbol Bias: %u\n" @@ -5082,7 +5107,7 @@ msgstr "" " Tamaño de Bitmask: %zu bytes %<PRIuFAST32>%% bits establecen segundo " "cambio de dispersión: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3248 #, c-format msgid "" "\n" @@ -5099,7 +5124,7 @@ msgstr[1] "" "Sección de lista de biblioteca [%2zu] '%s' en compensación %#0<PRIx64> " "contiene entradas %d:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3262 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -5107,7 +5132,7 @@ msgstr "" " Biblioteca Marca de tiempo Indicadores " "de versión de suma de verificación" -#: src/readelf.c:3228 +#: src/readelf.c:3312 #, c-format msgid "" "\n" @@ -5118,140 +5143,140 @@ msgstr "" "Sección de atributos de objeto [%2zu] '%s' de %<PRIu64> bytes con " "desplazamiento %#0<PRIx64>:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3329 msgid " Owner Size\n" msgstr " Propietario Tamaño\n" -#: src/readelf.c:3270 +#: src/readelf.c:3358 #, c-format msgid " %-13s %4<PRIu32>\n" msgstr " %-13s %4<PRIu32>\n" -#: src/readelf.c:3302 +#: src/readelf.c:3397 #, c-format msgid " %-4u %12<PRIu32>\n" msgstr " %-4u %12<PRIu32>\n" -#: src/readelf.c:3307 +#: src/readelf.c:3402 #, c-format msgid " File: %11<PRIu32>\n" msgstr " File: %11<PRIu32>\n" -#: src/readelf.c:3342 +#: src/readelf.c:3451 #, c-format msgid " %s: %<PRId64>, %s\n" msgstr " %s: %<PRId64>, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3454 #, c-format msgid " %s: %<PRId64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:3348 +#: src/readelf.c:3457 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3467 #, c-format msgid " %u: %<PRId64>\n" msgstr " %u: %<PRId64>\n" -#: src/readelf.c:3358 +#: src/readelf.c:3470 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3515 #, c-format msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3406 +#: src/readelf.c:3518 #, c-format msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3411 +#: src/readelf.c:3523 #, c-format msgid "%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3414 +#: src/readelf.c:3526 #, c-format msgid "%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3420 +#: src/readelf.c:3532 #, c-format msgid "%s+%#<PRIx64> <%s>" msgstr "%s+%#<PRIx64> <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3535 #, c-format msgid "%s+%#0*<PRIx64> <%s>" msgstr "%s+%#0*<PRIx64> <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3539 #, c-format msgid "%#<PRIx64> <%s>" msgstr "%#<PRIx64> <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3542 #, c-format msgid "%#0*<PRIx64> <%s>" msgstr "%#0*<PRIx64> <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3547 #, c-format msgid "%s+%#<PRIx64>" msgstr "%s+%#<PRIx64>" -#: src/readelf.c:3438 +#: src/readelf.c:3550 #, c-format msgid "%s+%#0*<PRIx64>" msgstr "%s+%#0*<PRIx64>" -#: src/readelf.c:3820 +#: src/readelf.c:3932 msgid "empty block" msgstr "bloque vacío" -#: src/readelf.c:3823 +#: src/readelf.c:3935 #, c-format msgid "%zu byte block:" msgstr "bloque de byte %zu:" -#: src/readelf.c:4217 +#: src/readelf.c:4332 #, c-format msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" msgstr "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" -#: src/readelf.c:4274 +#: src/readelf.c:4389 #, c-format msgid "%s %#<PRIx64> used with different address sizes" msgstr "%s %#<PRIx64> utilizado con direcciones de diferente tamaño" -#: src/readelf.c:4281 +#: src/readelf.c:4396 #, c-format msgid "%s %#<PRIx64> used with different offset sizes" msgstr "%s %#<PRIx64> utilizado con offsetr de diferente tamaño" -#: src/readelf.c:4288 +#: src/readelf.c:4403 #, fuzzy, c-format msgid "%s %#<PRIx64> used with different base addresses" msgstr "%s %#<PRIx64> utilizado con direcciones de diferente tamaño" -#: src/readelf.c:4370 +#: src/readelf.c:4492 #, c-format msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n" msgstr " [%6tx] <MATERIAL INUTIL SIN UTILIZAR EN EL RESTO DE LA SECCION>\n" -#: src/readelf.c:4378 +#: src/readelf.c:4500 #, c-format msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n" msgstr " [%6tx] <MATERIAL INUTIL NO UTILIZADO> ... %<PRIu64> bytes ...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4526 #, c-format msgid "" "\n" @@ -5262,7 +5287,7 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n" " [ Código]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4534 #, c-format msgid "" "\n" @@ -5271,30 +5296,30 @@ msgstr "" "\n" "Sección de abreviatura en compensación %<PRIu64>:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4547 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** error en lectura de abreviatura: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4563 #, c-format msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n" msgstr " [%5u] compensación: %<PRId64>, hijos: %s, etiqueta: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "yes" msgstr "sí" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "no" msgstr "no" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4600 src/readelf.c:4673 #, 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:4615 #, c-format msgid "" "\n" @@ -5309,12 +5334,12 @@ msgstr[1] "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entradas %zu:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4646 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4648 #, c-format msgid "" " [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n" @@ -5322,8 +5347,8 @@ msgstr "" " Inicio [%*zu]: %0#*<PRIx64>, longitud: %5<PRIu64>, compensación CU DIE: " "%6<PRId64>\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:4678 src/readelf.c:4832 src/readelf.c:5408 src/readelf.c:6362 +#: src/readelf.c:6894 src/readelf.c:7014 src/readelf.c:7177 src/readelf.c:7602 #, c-format msgid "" "\n" @@ -5332,7 +5357,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4691 src/readelf.c:6388 #, c-format msgid "" "\n" @@ -5341,106 +5366,111 @@ msgstr "" "\n" "Tabla en compensación %Zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4695 src/readelf.c:5432 src/readelf.c:6399 #, 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:4711 #, fuzzy, c-format msgid "" "\n" " Length: %6<PRIu64>\n" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:4601 +#: src/readelf.c:4723 #, fuzzy, c-format msgid " DWARF version: %6<PRIuFAST16>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4605 +#: src/readelf.c:4727 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4738 #, fuzzy, c-format msgid " CU offset: %6<PRIx64>\n" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:4622 +#: src/readelf.c:4744 #, fuzzy, c-format msgid " Address size: %6<PRIu64>\n" msgstr " (fin de compensación: %#<PRIx64>)" -#: src/readelf.c:4626 +#: src/readelf.c:4748 #, fuzzy, c-format msgid "unsupported address size" msgstr "no hay valor de dirección" -#: src/readelf.c:4631 +#: src/readelf.c:4753 #, fuzzy, c-format msgid "" " Segment size: %6<PRIu64>\n" "\n" msgstr " establecer archivo a %<PRIu64>\n" -#: src/readelf.c:4635 +#: src/readelf.c:4757 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4797 #, fuzzy, c-format msgid " %s..%s (%<PRIx64>)\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4678 +#: src/readelf.c:4800 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4809 #, c-format msgid " %Zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4827 #, 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:4857 src/readelf.c:6921 #, c-format msgid " [%6tx] <INVALID DATA>\n" msgstr " [%6tx] <DATOS INVÁLIDOS>\n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4879 src/readelf.c:6943 #, 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:4886 src/readelf.c:6950 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] lista vacía\n" -#: src/readelf.c:4775 +#: src/readelf.c:4897 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:4899 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5078 +#, fuzzy +msgid " <INVALID DATA>\n" +msgstr " <DATOS INVÁLIDOS>\n" + +#: src/readelf.c:5387 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "no se puede leer encabezamiento ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5404 #, c-format msgid "" "\n" @@ -5450,7 +5480,7 @@ msgstr "" "Sección de información de marco de llamada [%2zu] '%s' en compensación " "%#<PRIx64>:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5454 #, c-format msgid "" "\n" @@ -5459,50 +5489,50 @@ msgstr "" "\n" " [%6tx] Terminator cero\n" -#: src/readelf.c:5362 +#: src/readelf.c:5547 src/readelf.c:5702 #, c-format msgid "invalid augmentation length" msgstr "longitud de aumento inválida" -#: src/readelf.c:5374 +#: src/readelf.c:5562 msgid "FDE address encoding: " msgstr "Codificación de dirección FDE:" -#: src/readelf.c:5380 +#: src/readelf.c:5568 msgid "LSDA pointer encoding: " msgstr "Codificación de puntero LSDA:" -#: src/readelf.c:5491 +#: src/readelf.c:5679 #, c-format msgid " (offset: %#<PRIx64>)" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:5498 +#: src/readelf.c:5686 #, c-format msgid " (end offset: %#<PRIx64>)" msgstr " (fin de compensación: %#<PRIx64>)" -#: src/readelf.c:5525 +#: src/readelf.c:5723 #, c-format msgid " %-26sLSDA pointer: %#<PRIx64>\n" msgstr "Puntero %-26sLSDA: %#<PRIx64>\n" -#: src/readelf.c:5577 +#: src/readelf.c:5778 #, 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:5787 #, c-format msgid "cannot get attribute form: %s" msgstr "No se puede obtener forma de atributo: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5802 #, c-format msgid "cannot get attribute value: %s" msgstr "No se puede obtener valor: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6101 #, c-format msgid "" "\n" @@ -5513,7 +5543,7 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n" " [Offset]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6133 #, c-format msgid "" " Type unit at offset %<PRIu64>:\n" @@ -5526,7 +5556,7 @@ msgstr "" "Tamaño de dirección: %<PRIu8>, Tamaño de compensación: %<PRIu8>\n" " Tipo de firma: %#<PRIx64>, Tipo de compensación: %#<PRIx64>\n" -#: src/readelf.c:5935 +#: src/readelf.c:6142 #, c-format msgid "" " Compilation unit at offset %<PRIu64>:\n" @@ -5537,34 +5567,34 @@ msgstr "" " Versión: %<PRIu16>, Compensación de sección de abreviatura: %<PRIu64>, " "Tamaño de dirección: %<PRIu8>, Tamaño de compensación: %<PRIu8>\n" -#: src/readelf.c:5960 +#: src/readelf.c:6167 #, c-format msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s" msgstr "no se puede obtener DIE en compensación %<PRIu64> en sección '%s': %s" -#: src/readelf.c:5974 +#: src/readelf.c:6181 #, 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:6190 #, c-format msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s" msgstr "" "no se ha podido obtener etiqueta de DIE en compensación%<PRIu64> en sección " "'%s': %s" -#: src/readelf.c:6015 +#: src/readelf.c:6222 #, 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:6230 #, c-format msgid "cannot get next DIE: %s" msgstr "No se puede obtener próximo DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6266 #, fuzzy, c-format msgid "" "\n" @@ -5574,12 +5604,12 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n" -#: src/readelf.c:6158 +#: src/readelf.c:6375 #, 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:6445 #, c-format msgid "" "\n" @@ -5608,19 +5638,19 @@ msgstr "" "\n" "Códigos operativos:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6466 #, 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:6481 #, c-format msgid " [%*<PRIuFAST8>] %hhu argument\n" msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n" msgstr[0] " [%*<PRIuFAST8>] argumento %hhu \n" msgstr[1] " [%*<PRIuFAST8>] argumento %hhu\n" -#: src/readelf.c:6270 +#: src/readelf.c:6489 msgid "" "\n" "Directory table:" @@ -5628,7 +5658,7 @@ msgstr "" "\n" "Tabla de Directorio:" -#: src/readelf.c:6286 +#: src/readelf.c:6505 msgid "" "\n" "File name table:\n" @@ -5638,7 +5668,7 @@ msgstr "" "Tabla de nombre de archivo:\n" " Directorio de entrada Tiempo Tamaño Nombre" -#: src/readelf.c:6315 +#: src/readelf.c:6540 msgid "" "\n" "Line number statements:" @@ -5646,214 +5676,224 @@ msgstr "" "\n" " Declaraciones de número de Línea:" -#: src/readelf.c:6391 +#: src/readelf.c:6591 +#, 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:6627 #, 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:6632 #, 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:6652 #, c-format msgid " extended opcode %u: " msgstr " Código operativo extendido %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6657 #, fuzzy msgid " end of sequence" msgstr "Fin de secuencia" -#: src/readelf.c:6438 +#: src/readelf.c:6676 #, fuzzy, c-format msgid " set address to %s\n" msgstr "Establecer dirección a %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6703 #, fuzzy, c-format msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n" msgstr "" "definir nuevo archivo: dir=%u, mtime=%<PRIu64>, longitud=%<PRIu64>, nombre=" "%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6716 #, c-format msgid " set discriminator to %u\n" msgstr " establecer discriminador a %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6721 #, fuzzy msgid " unknown opcode" msgstr "código operativo desconocido " -#: src/readelf.c:6489 +#: src/readelf.c:6733 msgid " copy" msgstr "Copiar" -#: src/readelf.c:6500 +#: src/readelf.c:6744 #, 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:6748 #, 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:6759 #, c-format msgid " advance line by constant %d to %<PRId64>\n" msgstr " línea de avance por la constante %d a %<PRId64>\n" -#: src/readelf.c:6523 +#: src/readelf.c:6767 #, c-format msgid " set file to %<PRIu64>\n" msgstr " establecer archivo a %<PRIu64>\n" -#: src/readelf.c:6533 +#: src/readelf.c:6777 #, c-format msgid " set column to %<PRIu64>\n" msgstr " Establecer columna a %<PRIu64>\n" -#: src/readelf.c:6540 +#: src/readelf.c:6784 #, c-format msgid " set '%s' to %<PRIuFAST8>\n" msgstr "Establecer '%s' a %<PRIuFAST8>\n" -#: src/readelf.c:6546 +#: src/readelf.c:6790 msgid " set basic block flag" msgstr "Establecer bandera de bloque básico" -#: src/readelf.c:6555 +#: src/readelf.c:6803 #, 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:6807 #, 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:6825 #, 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:6834 msgid " set prologue end flag" msgstr " Establecer bandera prologue_end" -#: src/readelf.c:6591 +#: src/readelf.c:6839 msgid " set epilogue begin flag" msgstr " Establecer bandera epilogue_begin" -#: src/readelf.c:6600 +#: src/readelf.c:6848 #, c-format msgid " set isa to %u\n" msgstr " establecer isa para %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6857 #, c-format msgid " unknown opcode with %<PRIu8> parameter:" msgid_plural " unknown opcode with %<PRIu8> parameters:" msgstr[0] " opcódigo con parámetro %<PRIu8> desconocido:" msgstr[1] " opcódigo con parámetros %<PRIu8> desconocido:" -#: src/readelf.c:6641 +#: src/readelf.c:6889 #, 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:6964 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:6966 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:6973 src/readelf.c:7858 msgid " <INVALID DATA>\n" msgstr " <DATOS INVÁLIDOS>\n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7025 src/readelf.c:7186 #, 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:7104 #, 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:7127 +#, 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:7227 #, fuzzy, c-format msgid " Offset: 0x%<PRIx64>\n" msgstr " Propietario Tamaño\n" -#: src/readelf.c:6984 +#: src/readelf.c:7239 #, fuzzy, c-format msgid " Version: %<PRIu16>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7245 src/readelf.c:7968 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7252 #, fuzzy, c-format msgid " Flag: 0x%<PRIx8>\n" msgstr " Dirección de punto de entrada: %#<PRIx64>\n" -#: src/readelf.c:7000 +#: src/readelf.c:7255 #, fuzzy, c-format msgid " Offset length: %<PRIu8>\n" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:7008 +#: src/readelf.c:7263 #, fuzzy, c-format msgid " .debug_line offset: 0x%<PRIx64>\n" msgstr " (fin de compensación: %#<PRIx64>)" -#: src/readelf.c:7021 +#: src/readelf.c:7276 #, fuzzy, c-format msgid " extension opcode table, %<PRIu8> items:\n" msgstr " opcódigo con parámetro %<PRIu8> desconocido:" -#: src/readelf.c:7028 +#: src/readelf.c:7283 #, c-format msgid " [%<PRIx8>]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7295 #, fuzzy, c-format msgid " %<PRIu8> arguments:" msgstr " [%*<PRIuFAST8>] argumento %hhu \n" -#: src/readelf.c:7068 +#: src/readelf.c:7323 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7560 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7588 #, c-format msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n" msgstr "" " Compensación [%5d] DIE: %6<PRId64>, Compensación CU DIE: %6<PRId64>, " "nombre: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7629 #, c-format msgid "" "\n" @@ -5864,12 +5904,12 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n" " %*s String\n" -#: src/readelf.c:7386 +#: src/readelf.c:7643 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** error en lectura de cadenas: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7663 #, c-format msgid "" "\n" @@ -5878,7 +5918,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:7765 #, c-format msgid "" "\n" @@ -5887,22 +5927,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:7788 #, c-format msgid " LPStart encoding: %#x " msgstr "Codificación LPStart: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7800 #, c-format msgid " TType encoding: %#x " msgstr "Codificación TType: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7815 #, c-format msgid " Call site encoding: %#x " msgstr "Codificación de sitio de llamada: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7828 msgid "" "\n" " Call site table:" @@ -5910,7 +5950,7 @@ msgstr "" "\n" " Tabla de sitio de llamada:" -#: src/readelf.c:7584 +#: src/readelf.c:7842 #, c-format msgid "" " [%4u] Call site start: %#<PRIx64>\n" @@ -5923,12 +5963,12 @@ msgstr "" " Landing pad: %#<PRIx64>\n" " Action: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:7909 #, c-format msgid "invalid TType encoding" msgstr "Codificación TType inválida" -#: src/readelf.c:7665 +#: src/readelf.c:7930 #, fuzzy, c-format msgid "" "\n" @@ -5937,37 +5977,37 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n" -#: src/readelf.c:7694 +#: src/readelf.c:7959 #, fuzzy, c-format msgid " Version: %<PRId32>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:7712 +#: src/readelf.c:7977 #, fuzzy, c-format msgid " CU offset: %#<PRIx32>\n" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:7719 +#: src/readelf.c:7984 #, fuzzy, c-format msgid " TU offset: %#<PRIx32>\n" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:7726 +#: src/readelf.c:7991 #, fuzzy, c-format msgid " address offset: %#<PRIx32>\n" msgstr " (fin de compensación: %#<PRIx64>)" -#: src/readelf.c:7733 +#: src/readelf.c:7998 #, fuzzy, c-format msgid " symbol offset: %#<PRIx32>\n" msgstr " (compensación: %#<PRIx64>)" -#: src/readelf.c:7740 +#: src/readelf.c:8005 #, fuzzy, c-format msgid " constant offset: %#<PRIx32>\n" msgstr " (fin de compensación: %#<PRIx64>)" -#: src/readelf.c:7747 +#: src/readelf.c:8012 #, fuzzy, c-format msgid "" "\n" @@ -5976,7 +6016,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8034 #, fuzzy, c-format msgid "" "\n" @@ -5985,7 +6025,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8060 #, fuzzy, c-format msgid "" "\n" @@ -5994,7 +6034,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8089 #, fuzzy, c-format msgid "" "\n" @@ -6003,17 +6043,17 @@ msgstr "" "\n" "Tabla de símbolos inválida en compensación %#0<PRIx64>\n" -#: src/readelf.c:7909 +#: src/readelf.c:8176 #, 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:8336 src/readelf.c:8942 src/readelf.c:9053 src/readelf.c:9111 #, 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:8683 #, c-format msgid "" "\n" @@ -6022,21 +6062,21 @@ msgstr "" "\n" "%*s... <repeats %u more times> ..." -#: src/readelf.c:8919 +#: src/readelf.c:9190 msgid " Owner Data size Type\n" msgstr " Owner Data size Type\n" -#: src/readelf.c:8937 +#: src/readelf.c:9208 #, c-format msgid " %-13.*s %9<PRId32> %s\n" msgstr " %-13.*s %9<PRId32> %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9258 #, 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:9285 #, c-format msgid "" "\n" @@ -6045,7 +6085,7 @@ msgstr "" "\n" "Sección de nota [%2zu] '%s' de %<PRIu64> bytes en compensación %#0<PRIx64>:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9308 #, c-format msgid "" "\n" @@ -6054,7 +6094,7 @@ msgstr "" "\n" "Segmento de nota de %<PRIu64> bytes en compensación %#0<PRIx64>:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9354 #, c-format msgid "" "\n" @@ -6063,12 +6103,12 @@ msgstr "" "\n" "Sección [%Zu] '%s' no tiene datos para volcar.\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9360 src/readelf.c:9383 #, 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 +#: src/readelf.c:9364 #, c-format msgid "" "\n" @@ -6078,7 +6118,7 @@ msgstr "" "Volcado Hex de sección [%Zu] '%s', %<PRIu64> bytes en compensación " "%#0<PRIx64>:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9377 #, c-format msgid "" "\n" @@ -6087,7 +6127,7 @@ msgstr "" "\n" "Sección [%Zu] '%s' no tiene datos para volcar.\n" -#: src/readelf.c:9116 +#: src/readelf.c:9387 #, c-format msgid "" "\n" @@ -6097,7 +6137,7 @@ msgstr "" "Sección de cadena [%Zu] '%s' contiene %<PRIu64> bytes en compensación " "%#0<PRIx64>:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9435 #, c-format msgid "" "\n" @@ -6106,7 +6146,7 @@ msgstr "" "\n" "sección [%lu] no existe" -#: src/readelf.c:9193 +#: src/readelf.c:9464 #, c-format msgid "" "\n" @@ -6115,12 +6155,12 @@ msgstr "" "\n" "sección '%s' no existe" -#: src/readelf.c:9250 +#: src/readelf.c:9521 #, 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:9524 #, c-format msgid "" "\n" @@ -6129,7 +6169,7 @@ msgstr "" "\n" "Archivo '%s' no tiene índice de símbolo\n" -#: src/readelf.c:9257 +#: src/readelf.c:9528 #, c-format msgid "" "\n" @@ -6138,12 +6178,12 @@ msgstr "" "\n" "Índice de archivo '%s' tiene %Zu entradas:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9546 #, 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:9551 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Miembro de archivo contiene '%s':\n" @@ -6209,12 +6249,12 @@ msgstr "Radical inválido: %s" 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:437 src/size.c:570 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:595 msgid "(TOTALS)\n" msgstr "(TOTALES)\n" @@ -6372,82 +6412,87 @@ msgstr "%s: no puede utilizarse -o o -f cuando se extrae un archivo" 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:508 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "no se pudo determinar la cantidad de encabezados de programa: %s" + +#: src/strip.c:523 src/strip.c:547 #, 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:613 #, c-format msgid "illformed file '%s'" msgstr "Fichero illformed '%s'" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:935 src/strip.c:1024 #, 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:997 src/strip.c:1962 #, 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:1011 #, 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:1062 src/strip.c:1119 #, 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:1068 #, 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:1128 #, 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:1757 #, fuzzy, c-format msgid "bad relocation" msgstr "Mostrar reubicaciones" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1874 src/strip.c:1984 #, c-format msgid "while writing '%s': %s" msgstr "al escribir '%s': %s" -#: src/strip.c:1880 +#: src/strip.c:1885 #, c-format msgid "while creating '%s'" msgstr "al crear '%s'" -#: src/strip.c:1902 +#: src/strip.c:1907 #, 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:1970 #, 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:2009 src/strip.c:2029 #, c-format msgid "while writing '%s'" msgstr "al escribir '%s'" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2066 src/strip.c:2073 #, 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:2096 src/strip.c:2153 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "no es posible establecer acceso y fecha de modificación de '%s'" @@ -6535,166 +6580,171 @@ msgstr "no se puede crear el encabezamiento ELF: %s" 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:262 src/unstrip.c:1832 src/unstrip.c:1876 +#, 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:267 src/unstrip.c:1836 #, c-format msgid "cannot create program headers: %s" msgstr "No pueden crear encabezamientos de programa: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:273 #, c-format msgid "cannot copy program header: %s" msgstr "no puede copiar encabezamiento de programa: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:283 #, 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:286 src/unstrip.c:1513 #, 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:288 src/unstrip.c:1515 #, c-format msgid "cannot copy section data: %s" msgstr "no pueden copiar datos de sección: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:312 #, 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:352 src/unstrip.c:769 src/unstrip.c:1547 #, 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:368 src/unstrip.c:586 src/unstrip.c:607 src/unstrip.c:619 +#: src/unstrip.c:1568 src/unstrip.c:1698 src/unstrip.c:1722 #, 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:378 #, 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:417 src/unstrip.c:428 #, c-format msgid "cannot update relocation: %s" msgstr "no se puede actualizar reubicación: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:515 #, c-format msgid "cannot get symbol version: %s" msgstr "no se puede obtener versión de símbolo: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:527 #, 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 +#: src/unstrip.c:775 #, 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 +#: src/unstrip.c:917 src/unstrip.c:1258 #, 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:958 src/unstrip.c:977 src/unstrip.c:1010 #, 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:998 #, 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:1053 src/unstrip.c:1378 #, 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:1178 src/unstrip.c:1193 src/unstrip.c:1459 #, 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:1202 #, 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:1229 src/unstrip.c:1233 #, 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:1237 src/unstrip.c:1241 src/unstrip.c:1474 #, 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:1244 #, 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:1303 src/unstrip.c:1393 #, 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:1453 #, c-format msgid "cannot add new section: %s" msgstr "No se puede añadir nueva sección: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1555 #, 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:1793 #, 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:1814 #, c-format msgid "cannot get ELF header: %s" msgstr "no se puede leer encabezamiento ELF: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1846 #, 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:1851 src/unstrip.c:1934 #, 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:1903 #, 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:1906 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6702,77 +6752,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:1925 src/unstrip.c:1976 src/unstrip.c:1988 src/unstrip.c:2074 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "no se puede crear un descriptor ELF: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:1967 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:1969 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:1992 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:1995 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:1998 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2001 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2031 #, 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:2035 #, 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:2050 #, 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:2054 #, 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:2067 #, 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:2098 #, 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:2231 #, c-format msgid "no matching modules found" msgstr "No se encontraron módulos coincidentes" -#: src/unstrip.c:2228 +#: src/unstrip.c:2240 #, c-format msgid "matched more than one module" msgstr "coincidió con más de un módulo" -#: src/unstrip.c:2275 +#: src/unstrip.c:2287 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6780,7 +6830,7 @@ msgstr "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2288 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" @@ -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-25 21:49+0200\n" +"POT-Creation-Date: 2014-12-18 22:59+0100\n" "PO-Revision-Date: 2009-09-20 15:32+0900\n" "Last-Translator: Hyu_gabaru Ryu_ichi <[email protected]>\n" "Language-Team: Japanese <[email protected]>\n" @@ -19,8 +19,8 @@ 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/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3182 +#: src/readelf.c:3559 src/readelf.c:8285 src/unstrip.c:2127 src/unstrip.c:2335 #, c-format msgid "memory exhausted" msgstr "メモリー消費済み" @@ -210,7 +210,12 @@ msgstr "不当な CFI セクション" msgid "no alternative debug link found" msgstr "" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:95 +#, fuzzy +msgid "invalid opcode" +msgstr "不当なオペランド" + +#: libdwfl/argp-std.c:46 src/unstrip.c:2277 msgid "Input selection options:" msgstr "選択オプションを入力してください:" @@ -534,7 +539,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:5367 #, c-format msgid "invalid encoding" msgstr "無効なエンコード" @@ -616,8 +621,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:7235 src/readelf.c:7683 +#: src/readelf.c:7784 src/readelf.c:7954 #, c-format msgid "invalid data" msgstr "不当なデータ" @@ -713,7 +718,7 @@ msgstr "" msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 +#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:663 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 @@ -727,7 +732,7 @@ 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/addr2line.c:201 src/ar.c:294 src/elfcmp.c:668 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 @@ -1100,120 +1105,120 @@ msgstr "" msgid "cannot get symbol in '%s': %s" msgstr "" -#: src/elfcmp.c:372 +#: src/elfcmp.c:373 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "" -#: src/elfcmp.c:375 +#: src/elfcmp.c:376 #, c-format msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:421 src/elfcmp.c:490 +#: src/elfcmp.c:422 src/elfcmp.c:491 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:429 +#: src/elfcmp.c:430 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:440 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:447 +#: src/elfcmp.c:448 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:462 +#: src/elfcmp.c:463 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:470 +#: src/elfcmp.c:471 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:479 +#: src/elfcmp.c:480 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:519 +#: src/elfcmp.c:520 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:523 +#: src/elfcmp.c:524 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:538 +#: src/elfcmp.c:539 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:571 src/elfcmp.c:576 +#: src/elfcmp.c:572 src/elfcmp.c:577 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:596 src/elfcmp.c:602 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:607 +#: src/elfcmp.c:608 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:631 +#: src/elfcmp.c:632 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:694 +#: src/elfcmp.c:695 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/elfcmp.c:723 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/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1923 +#: src/unstrip.c:1952 #, c-format msgid "cannot open '%s'" msgstr "'%s' を開けません" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:727 src/findtextrel.c:228 src/ranlib.c:178 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:731 +#: src/elfcmp.c:732 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:749 +#: src/elfcmp.c:750 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:759 +#: src/elfcmp.c:760 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:770 src/elfcmp.c:784 #, c-format msgid "cannot get relocation: %s" msgstr "" @@ -2958,52 +2963,57 @@ 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:340 src/findtextrel.c:357 +#, fuzzy, c-format +msgid "cannot get program header index at offset %zd: %s" +msgstr "プログラムヘッダーを得られません: %s" -#: src/findtextrel.c:403 +#: src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %Zu: %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:529 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "" -#: src/findtextrel.c:576 +#: src/findtextrel.c:582 #, 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:589 src/findtextrel.c:609 #, 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:597 #, 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:617 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3418,7 +3428,7 @@ msgstr "" "れました" #: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/readelf.c:829 src/strip.c:568 #, c-format msgid "cannot determine number of sections: %s" msgstr "セクション数を決定できません: %s" @@ -3656,7 +3666,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:1822 #, c-format msgid "cannot update ELF header: %s" msgstr "ELF ヘッダーを更新できません: %s" @@ -3823,7 +3833,7 @@ msgid "%s: INTERNAL ERROR %d (%s-%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/strip.c:2160 #, c-format msgid "while closing '%s'" msgstr "'%s' を閉じている最中" @@ -3867,12 +3877,12 @@ msgstr "%s%s%s: ファイル形式を認識できません" msgid "cannot create search tree" msgstr "検索ツリーを生成できません" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 +#: src/nm.c:757 src/nm.c:1163 src/objdump.c:793 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/readelf.c:1785 src/readelf.c:1975 src/readelf.c:2202 src/readelf.c:2460 +#: src/readelf.c:2536 src/readelf.c:2623 src/readelf.c:3201 src/readelf.c:3237 +#: src/readelf.c:3300 src/readelf.c:8187 src/readelf.c:9273 src/readelf.c:9420 +#: src/readelf.c:9488 src/size.c:417 src/size.c:486 src/strip.c:503 #, c-format msgid "cannot get section header string table index" msgstr "セクションヘッダー文字列テーブル索引が得られません" @@ -3957,15 +3967,15 @@ msgstr "操作が指定されていません。\n" msgid "while close `%s'" msgstr "" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2072 msgid "INVALID SYMBOL" msgstr "不当なシンボル" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:394 src/readelf.c:1914 src/readelf.c:2108 msgid "INVALID SECTION" msgstr "不当なセクション" -#: src/objdump.c:510 +#: src/objdump.c:514 #, c-format msgid "" "\n" @@ -3973,21 +3983,21 @@ msgid "" "%-*s TYPE VALUE\n" msgstr "" -#: src/objdump.c:513 +#: src/objdump.c:517 msgid "OFFSET" msgstr "" -#: src/objdump.c:576 +#: src/objdump.c:582 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: src/objdump.c:697 +#: src/objdump.c:703 #, c-format msgid "cannot disassemble" msgstr "" -#: src/objdump.c:736 +#: src/objdump.c:742 #, fuzzy, c-format msgid "cannot allocate memory" msgstr "PLT セクションを割り当てられません: %s" @@ -4145,11 +4155,11 @@ msgstr "Elf 記述子を生成できません: %s" 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:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9440 +#: src/unstrip.c:356 src/unstrip.c:387 src/unstrip.c:436 src/unstrip.c:544 +#: src/unstrip.c:561 src/unstrip.c:597 src/unstrip.c:795 src/unstrip.c:1063 +#: src/unstrip.c:1254 src/unstrip.c:1314 src/unstrip.c:1435 src/unstrip.c:1488 +#: src/unstrip.c:1595 src/unstrip.c:1784 #, c-format msgid "cannot get section header: %s" msgstr "セクションヘッダーを得られません: %s" @@ -4159,8 +4169,8 @@ msgstr "セクションヘッダーを得られません: %s" 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:571 src/readelf.c:5398 src/readelf.c:7671 src/readelf.c:7773 +#: src/readelf.c:7939 #, c-format msgid "cannot get %s content: %s" msgstr "%s の内容を得られません: %s" @@ -4462,7 +4472,7 @@ msgstr "" " セクションからセグメントへのマッビング:\n" " セグメント セクション..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1258 src/unstrip.c:1843 src/unstrip.c:1886 src/unstrip.c:1893 #, c-format msgid "cannot get program header: %s" msgstr "プログラムヘッダーを得られません: %s" @@ -4501,8 +4511,8 @@ msgstr "<不当なシンボル>" msgid "<INVALID SECTION>" 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:1585 src/readelf.c:2208 src/readelf.c:2466 src/readelf.c:2542 +#: src/readelf.c:2846 src/readelf.c:2920 src/readelf.c:4610 #, fuzzy, c-format msgid "invalid sh_link value in section %Zu" msgstr "不当な .debug_line セクション" @@ -4552,7 +4562,7 @@ msgstr "ライブラリー run パス: [%s]\n" msgid "%<PRId64> (bytes)\n" msgstr "%<PRId64> (バイト)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1770 src/readelf.c:1960 #, c-format msgid "" "\n" @@ -4561,7 +4571,7 @@ msgstr "" "\n" "オフセット %#0<PRIx64> に不当なシンボルテーブル\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1788 src/readelf.c:1978 #, c-format msgid "" "\n" @@ -4576,7 +4586,7 @@ msgstr[0] "" "オフセット %5$#0<PRIx64> のセクション [%3$2u] '%4$s' 用のリロケーションセク" "ション [%1$2zu] '%2$s' には %6$d 個の項目があります:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1803 src/readelf.c:1993 #, c-format msgid "" "\n" @@ -4597,21 +4607,21 @@ msgstr " オフセット タイプ 値 名前\n" 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:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1913 +#: src/readelf.c:1925 src/readelf.c:2059 src/readelf.c:2071 src/readelf.c:2085 +#: src/readelf.c:2107 src/readelf.c:2120 msgid "<INVALID RELOC>" msgstr "<不当なRELOC>" -#: src/readelf.c:2000 +#: src/readelf.c:2003 msgid " Offset Type Value Addend Name\n" msgstr " オフセット タイプ 値 付加名\n" -#: src/readelf.c:2002 +#: src/readelf.c:2005 msgid " Offset Type Value Addend Name\n" msgstr " オフセット タイプ 値 付加名\n" -#: src/readelf.c:2210 +#: src/readelf.c:2216 #, c-format msgid "" "\n" @@ -4623,39 +4633,39 @@ msgstr[0] "" "\n" "シンボルテーブル [%2u] '%s' には %u 個の項目があります:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2221 #, 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:2229 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " 数 : 値 大き タイプ Bind Vis Ndx 名前\n" -#: src/readelf.c:2225 +#: src/readelf.c:2231 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " 数 : 値 大き タイプ Bind Vis Ndx 名前\n" -#: src/readelf.c:2245 +#: src/readelf.c:2251 #, c-format msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2339 #, c-format msgid "bad dynamic symbol" msgstr "不正な動的シンボル" -#: src/readelf.c:2415 +#: src/readelf.c:2421 msgid "none" msgstr "なし" -#: src/readelf.c:2432 +#: src/readelf.c:2438 msgid "| <unknown>" msgstr "| <不明>" -#: src/readelf.c:2463 +#: src/readelf.c:2469 #, c-format msgid "" "\n" @@ -4671,17 +4681,17 @@ msgstr[0] "" " アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2484 +#: src/readelf.c:2490 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: バージョン: %hu ファイル: %s 数: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2503 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: 名前: %s フラグ: %s バージョン: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2546 #, c-format msgid "" "\n" @@ -4697,17 +4707,17 @@ msgstr[0] "" " アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2562 +#: src/readelf.c:2574 #, 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:2589 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: 親 %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2850 #, c-format msgid "" "\n" @@ -4723,15 +4733,15 @@ msgstr[0] "" " アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションへのリンク: " "[%2u] '%s'" -#: src/readelf.c:2844 +#: src/readelf.c:2878 msgid " 0 *local* " msgstr " 0 *ローカル* " -#: src/readelf.c:2849 +#: src/readelf.c:2883 msgid " 1 *global* " msgstr " 1 *グローバル* " -#: src/readelf.c:2890 +#: src/readelf.c:2925 #, c-format msgid "" "\n" @@ -4749,22 +4759,22 @@ msgstr[0] "" " アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2912 +#: src/readelf.c:2947 #, fuzzy, no-c-format msgid " Length Number % of total Coverage\n" msgstr " 長さ 数 全体の% 範囲 \n" -#: src/readelf.c:2914 +#: src/readelf.c:2949 #, c-format msgid " 0 %6<PRIu32> %5.1f%%\n" msgstr " 0 %6<PRIu32> %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:2956 #, c-format msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:2969 #, fuzzy, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4773,12 +4783,27 @@ msgstr "" " テストの平均数: 検索成功: %f\n" " 検索失敗: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:2987 src/readelf.c:3042 src/readelf.c:3098 #, c-format msgid "cannot get data for section %d: %s" msgstr "セクションからデータを得られません %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:2995 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3050 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3106 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3173 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4788,7 +4813,7 @@ msgstr "" " ビットマスクの大きさ: %zu バイト %<PRIuFAST32>%% ビット設定 第2ハッシュシフ" "ト: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3248 #, c-format msgid "" "\n" @@ -4801,7 +4826,7 @@ msgstr[0] "" "オフセット %3$#0<PRIx64> のライブラリー一覧セクション [%1$2zu] '%2$s' には " "%4$d 個の項目があります:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3262 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4809,7 +4834,7 @@ msgstr "" " ライブラリー タイムスタンプ チェックサム バー" "ジョン フラグ" -#: src/readelf.c:3228 +#: src/readelf.c:3312 #, c-format msgid "" "\n" @@ -4820,140 +4845,140 @@ msgstr "" "オフセット %4$#0<PRIx64> の %3$<PRIu64> バイトのオブジェクト属性セクション " "[%1$2zu] '%2$s':\n" -#: src/readelf.c:3244 +#: src/readelf.c:3329 msgid " Owner Size\n" msgstr " 所有者 大きさ\n" -#: src/readelf.c:3270 +#: src/readelf.c:3358 #, c-format msgid " %-13s %4<PRIu32>\n" msgstr " %-13s %4<PRIu32>\n" -#: src/readelf.c:3302 +#: src/readelf.c:3397 #, c-format msgid " %-4u %12<PRIu32>\n" msgstr " %-4u %12<PRIu32>\n" -#: src/readelf.c:3307 +#: src/readelf.c:3402 #, c-format msgid " File: %11<PRIu32>\n" msgstr " ファイル: %11<PRIu32>\n" -#: src/readelf.c:3342 +#: src/readelf.c:3451 #, c-format msgid " %s: %<PRId64>, %s\n" msgstr " %s: %<PRId64>、%s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3454 #, c-format msgid " %s: %<PRId64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:3348 +#: src/readelf.c:3457 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3467 #, c-format msgid " %u: %<PRId64>\n" msgstr " %u: %<PRId64>\n" -#: src/readelf.c:3358 +#: src/readelf.c:3470 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3515 #, c-format msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3406 +#: src/readelf.c:3518 #, c-format msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3411 +#: src/readelf.c:3523 #, c-format msgid "%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3414 +#: src/readelf.c:3526 #, c-format msgid "%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3420 +#: src/readelf.c:3532 #, c-format msgid "%s+%#<PRIx64> <%s>" msgstr "%s+%#<PRIx64> <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3535 #, c-format msgid "%s+%#0*<PRIx64> <%s>" msgstr "%s+%#0*<PRIx64> <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3539 #, c-format msgid "%#<PRIx64> <%s>" msgstr "%#<PRIx64> <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3542 #, c-format msgid "%#0*<PRIx64> <%s>" msgstr "%#0*<PRIx64> <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3547 #, c-format msgid "%s+%#<PRIx64>" msgstr "%s+%#<PRIx64>" -#: src/readelf.c:3438 +#: src/readelf.c:3550 #, c-format msgid "%s+%#0*<PRIx64>" msgstr "%s+%#0*<PRIx64>" -#: src/readelf.c:3820 +#: src/readelf.c:3932 msgid "empty block" msgstr "空ブロック" -#: src/readelf.c:3823 +#: src/readelf.c:3935 #, c-format msgid "%zu byte block:" msgstr "%zu バイトのブロック:" -#: src/readelf.c:4217 +#: src/readelf.c:4332 #, c-format msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" msgstr "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" -#: src/readelf.c:4274 +#: src/readelf.c:4389 #, c-format msgid "%s %#<PRIx64> used with different address sizes" msgstr "" -#: src/readelf.c:4281 +#: src/readelf.c:4396 #, c-format msgid "%s %#<PRIx64> used with different offset sizes" msgstr "" -#: src/readelf.c:4288 +#: src/readelf.c:4403 #, c-format msgid "%s %#<PRIx64> used with different base addresses" msgstr "" -#: src/readelf.c:4370 +#: src/readelf.c:4492 #, c-format msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n" msgstr "" -#: src/readelf.c:4378 +#: src/readelf.c:4500 #, c-format msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n" msgstr "" -#: src/readelf.c:4404 +#: src/readelf.c:4526 #, c-format msgid "" "\n" @@ -4964,7 +4989,7 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s':\n" " [ コード]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4534 #, c-format msgid "" "\n" @@ -4973,30 +4998,30 @@ msgstr "" "\n" "オフセット %<PRIu64> の略語セクション:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4547 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** 略語を読んでいる間にエラー: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4563 #, c-format msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n" msgstr " [%5u] オフセット: %<PRId64>、子: %s、タグ: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "yes" msgstr "はい" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "no" msgstr "いいえ" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4600 src/readelf.c:4673 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr ".debug_aragnes の内容を得られません: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4615 #, c-format msgid "" "\n" @@ -5009,20 +5034,20 @@ msgstr[0] "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4646 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4648 #, c-format msgid "" " [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n" msgstr "" " [%*zu] 開始: %0#*<PRIx64>、長さ: %5<PRIu64>、CU DIE オフセット: %6<PRId64>\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:4678 src/readelf.c:4832 src/readelf.c:5408 src/readelf.c:6362 +#: src/readelf.c:6894 src/readelf.c:7014 src/readelf.c:7177 src/readelf.c:7602 #, c-format msgid "" "\n" @@ -5031,7 +5056,7 @@ msgstr "" "\n" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4691 src/readelf.c:6388 #, c-format msgid "" "\n" @@ -5040,108 +5065,113 @@ msgstr "" "\n" "オフセット %Zu のテーブル:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4695 src/readelf.c:5432 src/readelf.c:6399 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/readelf.c:4589 +#: src/readelf.c:4711 #, fuzzy, c-format msgid "" "\n" " Length: %6<PRIu64>\n" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:4601 +#: src/readelf.c:4723 #, fuzzy, c-format msgid " DWARF version: %6<PRIuFAST16>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4605 +#: src/readelf.c:4727 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4738 #, fuzzy, c-format msgid " CU offset: %6<PRIx64>\n" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:4622 +#: src/readelf.c:4744 #, fuzzy, c-format msgid " Address size: %6<PRIu64>\n" msgstr " (終了オフセット: %#<PRIx64>)" -#: src/readelf.c:4626 +#: src/readelf.c:4748 #, fuzzy, c-format msgid "unsupported address size" msgstr "アドレス値ではありません" -#: src/readelf.c:4631 +#: src/readelf.c:4753 #, fuzzy, c-format msgid "" " Segment size: %6<PRIu64>\n" "\n" msgstr " ファイルを %<PRIu64> に設定する\n" -#: src/readelf.c:4635 +#: src/readelf.c:4757 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4797 #, fuzzy, c-format msgid " %s..%s (%<PRIx64>)\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4678 +#: src/readelf.c:4800 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4809 #, c-format msgid " %Zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4827 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr ".degub_ranges の内容を得られません: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4857 src/readelf.c:6921 #, c-format msgid " [%6tx] <INVALID DATA>\n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4879 src/readelf.c:6943 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] ベースアドレス %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4886 src/readelf.c:6950 #, fuzzy, c-format msgid " [%6tx] empty list\n" msgstr "" "\n" " [%6tx] ゼロ終端\n" -#: src/readelf.c:4775 +#: src/readelf.c:4897 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:4899 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5078 +#, fuzzy +msgid " <INVALID DATA>\n" +msgstr " [%6tx] <不当なデータ>\n" + +#: src/readelf.c:5387 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "次の DIE を得られません: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5404 #, c-format msgid "" "\n" @@ -5150,7 +5180,7 @@ msgstr "" "\n" "オフセット %3$#<PRIx64> の フレーム情報呼出しセクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:5277 +#: src/readelf.c:5454 #, c-format msgid "" "\n" @@ -5159,50 +5189,50 @@ msgstr "" "\n" " [%6tx] ゼロ終端\n" -#: src/readelf.c:5362 +#: src/readelf.c:5547 src/readelf.c:5702 #, fuzzy, c-format msgid "invalid augmentation length" msgstr "不当な拡大エンコード" -#: src/readelf.c:5374 +#: src/readelf.c:5562 msgid "FDE address encoding: " msgstr "FDE アドレスエンコード" -#: src/readelf.c:5380 +#: src/readelf.c:5568 msgid "LSDA pointer encoding: " msgstr "LSDA ポインターエンコード:" -#: src/readelf.c:5491 +#: src/readelf.c:5679 #, c-format msgid " (offset: %#<PRIx64>)" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:5498 +#: src/readelf.c:5686 #, c-format msgid " (end offset: %#<PRIx64>)" msgstr " (終了オフセット: %#<PRIx64>)" -#: src/readelf.c:5525 +#: src/readelf.c:5723 #, c-format msgid " %-26sLSDA pointer: %#<PRIx64>\n" msgstr " %-26sLSDA ポインター: %#<PRIx64>\n" -#: src/readelf.c:5577 +#: src/readelf.c:5778 #, c-format msgid "cannot get attribute code: %s" msgstr "属性コードを得られません: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5787 #, c-format msgid "cannot get attribute form: %s" msgstr "属性様式を得られません: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5802 #, c-format msgid "cannot get attribute value: %s" msgstr "属性値を得られません: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6101 #, c-format msgid "" "\n" @@ -5213,7 +5243,7 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s':\n" " [オフセット]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6133 #, fuzzy, c-format msgid "" " Type unit at offset %<PRIu64>:\n" @@ -5225,7 +5255,7 @@ msgstr "" " バージョン: %2$<PRIu16>、略語セクションオフセット: %3$<PRIu64>、アドレスの大" "きさ: %4$<PRIu8>、オフセットの大きさ: %5$<PRIu8>\n" -#: src/readelf.c:5935 +#: src/readelf.c:6142 #, c-format msgid "" " Compilation unit at offset %<PRIu64>:\n" @@ -5236,35 +5266,35 @@ msgstr "" " バージョン: %2$<PRIu16>、略語セクションオフセット: %3$<PRIu64>、アドレスの大" "きさ: %4$<PRIu8>、オフセットの大きさ: %5$<PRIu8>\n" -#: src/readelf.c:5960 +#: src/readelf.c:6167 #, c-format msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s" msgstr "" "セクション '%2$s' の オフセット %1$<PRIu64> の DIE を得られません: %3$s" -#: src/readelf.c:5974 +#: src/readelf.c:6181 #, c-format msgid "cannot get DIE offset: %s" msgstr "DIE オフセットを得られません: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6190 #, c-format msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s" msgstr "" "セクション '%2$s' 中のオフセット %1$<PRIu64> の DIE のタグを得られません: " "%3$s" -#: src/readelf.c:6015 +#: src/readelf.c:6222 #, c-format msgid "cannot get next DIE: %s\n" msgstr "次の DIE を得られません: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6230 #, c-format msgid "cannot get next DIE: %s" msgstr "次の DIE を得られません: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6266 #, fuzzy, c-format msgid "" "\n" @@ -5274,12 +5304,12 @@ msgstr "" "\n" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:6158 +#: src/readelf.c:6375 #, c-format msgid "cannot get line data section data: %s" msgstr "ラインデータセクションデータを得られません: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6445 #, fuzzy, c-format msgid "" "\n" @@ -5307,18 +5337,18 @@ msgstr "" "\n" "命令コード:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6466 #, 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:6481 #, c-format msgid " [%*<PRIuFAST8>] %hhu argument\n" msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n" msgstr[0] " [%*<PRIuFAST8>] %hhu パラメーター\n" -#: src/readelf.c:6270 +#: src/readelf.c:6489 msgid "" "\n" "Directory table:" @@ -5326,7 +5356,7 @@ msgstr "" "\n" "ディレクトリーテーブル:" -#: src/readelf.c:6286 +#: src/readelf.c:6505 msgid "" "\n" "File name table:\n" @@ -5336,7 +5366,7 @@ msgstr "" "ファイル名テーブル:\n" " Entry Dir 時刻 大きさ 名前" -#: src/readelf.c:6315 +#: src/readelf.c:6540 msgid "" "\n" "Line number statements:" @@ -5344,205 +5374,215 @@ msgstr "" "\n" "行 番号 文:" -#: src/readelf.c:6391 +#: src/readelf.c:6591 +#, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "" + +#: src/readelf.c:6627 #, 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:6632 #, 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:6652 #, c-format msgid " extended opcode %u: " msgstr " 拡張命令コード %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6657 #, fuzzy msgid " end of sequence" msgstr "列の終わり" -#: src/readelf.c:6438 +#: src/readelf.c:6676 #, fuzzy, c-format msgid " set address to %s\n" msgstr "アドレスを %s に設定する\n" -#: src/readelf.c:6459 +#: src/readelf.c:6703 #, fuzzy, c-format msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n" msgstr "" "新ファイルを定義する: dir=%u、mtime=%<PRIu64>、長さh=%<PRIu64>、名前=%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6716 #, fuzzy, c-format msgid " set discriminator to %u\n" msgstr "カラムを %<PRIu64> に設定する\n" -#: src/readelf.c:6477 +#: src/readelf.c:6721 #, fuzzy msgid " unknown opcode" msgstr "不明な命令コード" -#: src/readelf.c:6489 +#: src/readelf.c:6733 msgid " copy" msgstr "複写" -#: src/readelf.c:6500 +#: src/readelf.c:6744 #, 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:6748 #, fuzzy, c-format msgid " advance address by %u to %s\n" msgstr "アドレスを %u だけ進めて %s にする\n" -#: src/readelf.c:6515 +#: src/readelf.c:6759 #, c-format msgid " advance line by constant %d to %<PRId64>\n" msgstr "行を定数 %d だけ進めて %<PRId64> にする\n" -#: src/readelf.c:6523 +#: src/readelf.c:6767 #, c-format msgid " set file to %<PRIu64>\n" msgstr " ファイルを %<PRIu64> に設定する\n" -#: src/readelf.c:6533 +#: src/readelf.c:6777 #, c-format msgid " set column to %<PRIu64>\n" msgstr "カラムを %<PRIu64> に設定する\n" -#: src/readelf.c:6540 +#: src/readelf.c:6784 #, c-format msgid " set '%s' to %<PRIuFAST8>\n" msgstr " '%s' を %<PRIuFAST8> に設定する\n" -#: src/readelf.c:6546 +#: src/readelf.c:6790 msgid " set basic block flag" msgstr "基本ブロックフラグを設定する" -#: src/readelf.c:6555 +#: src/readelf.c:6803 #, 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:6807 #, fuzzy, c-format msgid " advance address by constant %u to %s\n" msgstr "アドレスを定数 %u だけ済めて %s にする\n" -#: src/readelf.c:6577 +#: src/readelf.c:6825 #, fuzzy, c-format msgid " advance address by fixed value %u to %s\n" msgstr "アドレスを固定値 %u だけ進めて %s にする\n" -#: src/readelf.c:6586 +#: src/readelf.c:6834 msgid " set prologue end flag" msgstr "プロローグ終了フラグを設定する" -#: src/readelf.c:6591 +#: src/readelf.c:6839 msgid " set epilogue begin flag" msgstr "エピローグ開始フラグを設定する" -#: src/readelf.c:6600 +#: src/readelf.c:6848 #, fuzzy, c-format msgid " set isa to %u\n" msgstr " ファイルを %<PRIu64> に設定する\n" -#: src/readelf.c:6609 +#: src/readelf.c:6857 #, c-format msgid " unknown opcode with %<PRIu8> parameter:" msgid_plural " unknown opcode with %<PRIu8> parameters:" msgstr[0] " %<PRIu8> 個のパラメーターのある不明な命令コード:" -#: src/readelf.c:6641 +#: src/readelf.c:6889 #, c-format msgid "cannot get .debug_loc content: %s" msgstr ".debug_loc の内容を得られません: %s" -#: src/readelf.c:6716 +#: src/readelf.c:6964 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:6966 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:6973 src/readelf.c:7858 #, fuzzy msgid " <INVALID DATA>\n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7025 src/readelf.c:7186 #, c-format msgid "cannot get macro information section data: %s" msgstr "マクロ情報セクションのデータを得られません: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7104 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** 最後のセクションの終端していない文字列" -#: src/readelf.c:6972 +#: src/readelf.c:7127 +#, fuzzy, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** 最後のセクションの終端していない文字列" + +#: src/readelf.c:7227 #, fuzzy, c-format msgid " Offset: 0x%<PRIx64>\n" msgstr " 所有者 大きさ\n" -#: src/readelf.c:6984 +#: src/readelf.c:7239 #, fuzzy, c-format msgid " Version: %<PRIu16>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7245 src/readelf.c:7968 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:6997 +#: src/readelf.c:7252 #, fuzzy, c-format msgid " Flag: 0x%<PRIx8>\n" msgstr " 入口点アドレス : %#<PRIx64>\n" -#: src/readelf.c:7000 +#: src/readelf.c:7255 #, fuzzy, c-format msgid " Offset length: %<PRIu8>\n" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:7008 +#: src/readelf.c:7263 #, fuzzy, c-format msgid " .debug_line offset: 0x%<PRIx64>\n" msgstr " (終了オフセット: %#<PRIx64>)" -#: src/readelf.c:7021 +#: src/readelf.c:7276 #, fuzzy, c-format msgid " extension opcode table, %<PRIu8> items:\n" msgstr " %<PRIu8> 個のパラメーターのある不明な命令コード:" -#: src/readelf.c:7028 +#: src/readelf.c:7283 #, c-format msgid " [%<PRIx8>]" msgstr "" -#: src/readelf.c:7040 +#: src/readelf.c:7295 #, fuzzy, c-format msgid " %<PRIu8> arguments:" msgstr " [%*<PRIuFAST8>] %hhu パラメーター\n" -#: src/readelf.c:7068 +#: src/readelf.c:7323 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7303 +#: src/readelf.c:7560 #, c-format msgid "vendor opcode not verified?" msgstr "" -#: src/readelf.c:7331 +#: src/readelf.c:7588 #, c-format msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n" msgstr "" @@ -5550,7 +5590,7 @@ msgstr "" # # "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s':\n" # # " %4$*s 文字列\n" がエラーになるのは何故? 取り敢えず fuzzy扱い -#: src/readelf.c:7372 +#: src/readelf.c:7629 #, fuzzy, c-format msgid "" "\n" @@ -5561,12 +5601,12 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s':\n" " %4$*s 文字列\n" -#: src/readelf.c:7386 +#: src/readelf.c:7643 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** 文字列の読込み中にエラー: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7663 #, c-format msgid "" "\n" @@ -5575,7 +5615,7 @@ msgstr "" "\n" "呼出しフレーム検索テーブルセクション [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7765 #, c-format msgid "" "\n" @@ -5584,22 +5624,22 @@ msgstr "" "\n" "例外取扱いテーブルセクション [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7788 #, c-format msgid " LPStart encoding: %#x " msgstr " LPStart コード化: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7800 #, c-format msgid " TType encoding: %#x " msgstr "TType コード化: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7815 #, c-format msgid " Call site encoding: %#x " msgstr "呼出しサイトコード化: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7828 msgid "" "\n" " Call site table:" @@ -5607,7 +5647,7 @@ msgstr "" "\n" " 呼出しサイトテーブル:" -#: src/readelf.c:7584 +#: src/readelf.c:7842 #, c-format msgid "" " [%4u] Call site start: %#<PRIx64>\n" @@ -5620,12 +5660,12 @@ msgstr "" " 離着陸場: %#<PRIx64>\n" " 行動: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:7909 #, c-format msgid "invalid TType encoding" msgstr "不当な TType コード化" -#: src/readelf.c:7665 +#: src/readelf.c:7930 #, fuzzy, c-format msgid "" "\n" @@ -5635,37 +5675,37 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7694 +#: src/readelf.c:7959 #, fuzzy, c-format msgid " Version: %<PRId32>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:7712 +#: src/readelf.c:7977 #, fuzzy, c-format msgid " CU offset: %#<PRIx32>\n" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:7719 +#: src/readelf.c:7984 #, fuzzy, c-format msgid " TU offset: %#<PRIx32>\n" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:7726 +#: src/readelf.c:7991 #, fuzzy, c-format msgid " address offset: %#<PRIx32>\n" msgstr " (終了オフセット: %#<PRIx64>)" -#: src/readelf.c:7733 +#: src/readelf.c:7998 #, fuzzy, c-format msgid " symbol offset: %#<PRIx32>\n" msgstr " (オフセット: %#<PRIx64>)" -#: src/readelf.c:7740 +#: src/readelf.c:8005 #, fuzzy, c-format msgid " constant offset: %#<PRIx32>\n" msgstr " (終了オフセット: %#<PRIx64>)" -#: src/readelf.c:7747 +#: src/readelf.c:8012 #, fuzzy, c-format msgid "" "\n" @@ -5675,7 +5715,7 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8034 #, fuzzy, c-format msgid "" "\n" @@ -5685,7 +5725,7 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8060 #, fuzzy, c-format msgid "" "\n" @@ -5695,7 +5735,7 @@ msgstr "" "オフセット %3$#<PRIx64> の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8089 #, fuzzy, c-format msgid "" "\n" @@ -5704,17 +5744,17 @@ msgstr "" "\n" "オフセット %#0<PRIx64> に不当なシンボルテーブル\n" -#: src/readelf.c:7909 +#: src/readelf.c:8176 #, 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:8336 src/readelf.c:8942 src/readelf.c:9053 src/readelf.c:9111 #, c-format msgid "cannot convert core note data: %s" msgstr "コアノートデータの変換ができません: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8683 #, c-format msgid "" "\n" @@ -5723,21 +5763,21 @@ msgstr "" "\n" "%*s... < %u 回の繰返し> ..." -#: src/readelf.c:8919 +#: src/readelf.c:9190 msgid " Owner Data size Type\n" msgstr " 所有者 データ大きさタイプ\n" -#: src/readelf.c:8937 +#: src/readelf.c:9208 #, c-format msgid " %-13.*s %9<PRId32> %s\n" msgstr " %-13.*s %9<PRId32> %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9258 #, c-format msgid "cannot get content of note section: %s" msgstr "ノートセクションの内容を得られません: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9285 #, c-format msgid "" "\n" @@ -5747,7 +5787,7 @@ msgstr "" "オフセット %4$#0<PRIx64> の %3$<PRIu64> バイトのノートセクション [%1$2zu] " "'%2$s':\n" -#: src/readelf.c:9037 +#: src/readelf.c:9308 #, c-format msgid "" "\n" @@ -5756,7 +5796,7 @@ msgstr "" "\n" "オフセット %2$#0<PRIx64> の %1$<PRIu64> バイトのノートセグメント:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9354 #, c-format msgid "" "\n" @@ -5765,12 +5805,12 @@ msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9360 src/readelf.c:9383 #, c-format msgid "cannot get data for section [%Zu] '%s': %s" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/readelf.c:9093 +#: src/readelf.c:9364 #, c-format msgid "" "\n" @@ -5780,7 +5820,7 @@ msgstr "" "オフセット %4$#0<PRIx64> のセクション [%1$Zu] '%2$s' の16進ダン" "プ、%3$<PRIu64> バイト:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9377 #, fuzzy, c-format msgid "" "\n" @@ -5789,7 +5829,7 @@ msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/readelf.c:9116 +#: src/readelf.c:9387 #, c-format msgid "" "\n" @@ -5799,7 +5839,7 @@ msgstr "" "オフセット %4$#0<PRIx64> 文字列セクション [%1$Zu] '%2$s' には %3$<PRIu64> バ" "イトあります:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9435 #, c-format msgid "" "\n" @@ -5808,7 +5848,7 @@ msgstr "" "\n" "セクション [%lu] がありません" -#: src/readelf.c:9193 +#: src/readelf.c:9464 #, c-format msgid "" "\n" @@ -5817,12 +5857,12 @@ msgstr "" "\n" "セクション '%s' がありません" -#: src/readelf.c:9250 +#: src/readelf.c:9521 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "アーカイブのシンボル索引 '%s' を得られません: %s" -#: src/readelf.c:9253 +#: src/readelf.c:9524 #, c-format msgid "" "\n" @@ -5831,7 +5871,7 @@ msgstr "" "\n" "アーカイブ '%s' にはシンボル索引がありません\n" -#: src/readelf.c:9257 +#: src/readelf.c:9528 #, c-format msgid "" "\n" @@ -5840,12 +5880,12 @@ msgstr "" "\n" "アーカイブ '%s' の索引には %Zu 項目あります:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9546 #, 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:9551 #, c-format msgid "Archive member '%s' contains:\n" msgstr "アーカイブメンバー '%s' には以下があります:\n" @@ -5909,12 +5949,12 @@ msgstr "不当な基数: %s" msgid "%s: file format not recognized" msgstr "%s: ファイル形式を認識できません" -#: src/size.c:438 src/size.c:571 +#: src/size.c:437 src/size.c:570 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:595 msgid "(TOTALS)\n" msgstr "(合計)\n" @@ -6070,82 +6110,87 @@ msgstr "%s: アーカイブから抜き出している時は -o や -f は使え msgid "cannot open EBL backend" msgstr "EBL バックエンドを開けません" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:508 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "セクション数を決定できません: %s" + +#: src/strip.c:523 src/strip.c:547 #, c-format msgid "cannot create new file '%s': %s" msgstr "新しいファイル '%s' を生成できません: %s" -#: src/strip.c:608 +#: src/strip.c:613 #, c-format msgid "illformed file '%s'" msgstr "不適格なファイル '%s'" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:935 src/strip.c:1024 #, c-format msgid "while generating output file: %s" msgstr "出力ファイルを生成している間: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:997 src/strip.c:1962 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: ELF ヘッダーを生成している間にエラー: %s" -#: src/strip.c:1006 +#: src/strip.c:1011 #, c-format msgid "while preparing output for '%s'" msgstr "'%s' のための出力を準備している間" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1062 src/strip.c:1119 #, c-format msgid "while create section header section: %s" msgstr "セクションヘッダーセクションを生成している間: %s" -#: src/strip.c:1063 +#: src/strip.c:1068 #, c-format msgid "cannot allocate section data: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/strip.c:1123 +#: src/strip.c:1128 #, c-format msgid "while create section header string table: %s" msgstr "セクションヘッダー文字列テーブルを生成中: %s" -#: src/strip.c:1752 +#: src/strip.c:1757 #, fuzzy, c-format msgid "bad relocation" msgstr "リロケーションを表示" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1874 src/strip.c:1984 #, c-format msgid "while writing '%s': %s" msgstr "'%s' を書込み中: %s" -#: src/strip.c:1880 +#: src/strip.c:1885 #, c-format msgid "while creating '%s'" msgstr "'%s' を生成中" -#: src/strip.c:1902 +#: src/strip.c:1907 #, c-format msgid "while computing checksum for debug information" msgstr "デバッグ情報のチェックサムを計算中" -#: src/strip.c:1965 +#: src/strip.c:1970 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: ファイルを読込み中にエラー: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2009 src/strip.c:2029 #, fuzzy, c-format msgid "while writing '%s'" msgstr "'%s' を書込み中: %s" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2066 src/strip.c:2073 #, c-format msgid "error while finishing '%s': %s" msgstr "'%s' の終了中にエラー: %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2096 src/strip.c:2153 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "'%s' のアクセスと変更日付を設定できません" @@ -6231,239 +6276,244 @@ msgstr "" msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:262 src/unstrip.c:1832 src/unstrip.c:1876 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "セクション数を決定できません: %s" + +#: src/unstrip.c:267 src/unstrip.c:1836 #, c-format msgid "cannot create program headers: %s" msgstr "" -#: src/unstrip.c:269 +#: src/unstrip.c:273 #, c-format msgid "cannot copy program header: %s" msgstr "" -#: src/unstrip.c:279 +#: src/unstrip.c:283 #, c-format msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:286 src/unstrip.c:1513 #, c-format msgid "cannot get section data: %s" msgstr "" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:288 src/unstrip.c:1515 #, c-format msgid "cannot copy section data: %s" msgstr "" -#: src/unstrip.c:308 +#: src/unstrip.c:312 #, c-format msgid "cannot create directory '%s'" msgstr "" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:352 src/unstrip.c:769 src/unstrip.c:1547 #, 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:368 src/unstrip.c:586 src/unstrip.c:607 src/unstrip.c:619 +#: src/unstrip.c:1568 src/unstrip.c:1698 src/unstrip.c:1722 #, c-format msgid "cannot update symbol table: %s" msgstr "" -#: src/unstrip.c:374 +#: src/unstrip.c:378 #, c-format msgid "cannot update section header: %s" msgstr "" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:417 src/unstrip.c:428 #, c-format msgid "cannot update relocation: %s" msgstr "" -#: src/unstrip.c:511 +#: src/unstrip.c:515 #, c-format msgid "cannot get symbol version: %s" msgstr "" -#: src/unstrip.c:523 +#: src/unstrip.c:527 #, c-format msgid "unexpected section type in [%Zu] with sh_link to symtab" msgstr "" -#: src/unstrip.c:771 +#: src/unstrip.c:775 #, c-format msgid "invalid string offset in symbol [%Zu]" msgstr "" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:917 src/unstrip.c:1258 #, c-format msgid "cannot read section [%Zu] name: %s" msgstr "" -#: src/unstrip.c:954 src/unstrip.c:973 src/unstrip.c:1006 +#: src/unstrip.c:958 src/unstrip.c:977 src/unstrip.c:1010 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:994 +#: src/unstrip.c:998 #, c-format msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1053 src/unstrip.c:1378 #, c-format msgid "cannot find matching section for [%Zu] '%s'" msgstr "" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1178 src/unstrip.c:1193 src/unstrip.c:1459 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1198 +#: src/unstrip.c:1202 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1229 src/unstrip.c:1233 #, 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:1237 src/unstrip.c:1241 src/unstrip.c:1474 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1240 +#: src/unstrip.c:1244 #, 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:1303 src/unstrip.c:1393 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1449 +#: src/unstrip.c:1453 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1551 +#: src/unstrip.c:1555 #, c-format msgid "symbol [%Zu] has invalid section index" msgstr "" -#: src/unstrip.c:1789 +#: src/unstrip.c:1793 #, fuzzy, c-format msgid "cannot read section data: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1814 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1838 +#: src/unstrip.c:1846 #, c-format msgid "cannot update program header: %s" msgstr "" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1851 src/unstrip.c:1934 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:1891 +#: src/unstrip.c:1903 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:1894 +#: src/unstrip.c:1906 #, 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:1925 src/unstrip.c:1976 src/unstrip.c:1988 src/unstrip.c:2074 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:1955 +#: src/unstrip.c:1967 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:1969 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:1992 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:1995 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:1998 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2001 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2031 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2023 +#: src/unstrip.c:2035 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2038 +#: src/unstrip.c:2050 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2042 +#: src/unstrip.c:2054 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2055 +#: src/unstrip.c:2067 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2086 +#: src/unstrip.c:2098 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2219 +#: src/unstrip.c:2231 #, c-format msgid "no matching modules found" msgstr "" -#: src/unstrip.c:2228 +#: src/unstrip.c:2240 #, c-format msgid "matched more than one module" msgstr "" -#: src/unstrip.c:2275 +#: src/unstrip.c:2287 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2276 +#: src/unstrip.c:2288 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" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: pl\n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-25 21:49+0200\n" +"POT-Creation-Date: 2014-12-18 22:59+0100\n" "PO-Revision-Date: 2012-09-02 19:12+0200\n" "Last-Translator: Piotr Drąg <[email protected]>\n" "Language-Team: Polish <[email protected]>\n" @@ -17,8 +17,8 @@ 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/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3182 +#: src/readelf.c:3559 src/readelf.c:8285 src/unstrip.c:2127 src/unstrip.c:2335 #, c-format msgid "memory exhausted" msgstr "pamięć wyczerpana" @@ -208,7 +208,12 @@ msgstr "nieprawidłowa wersja CFI" 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:95 +#, fuzzy +msgid "invalid opcode" +msgstr "nieprawidłowy operand" + +#: libdwfl/argp-std.c:46 src/unstrip.c:2277 msgid "Input selection options:" msgstr "Opcje wyboru wejścia:" @@ -525,7 +530,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:5367 #, c-format msgid "invalid encoding" msgstr "nieprawidłowe kodowanie" @@ -606,8 +611,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:7235 src/readelf.c:7683 +#: src/readelf.c:7784 src/readelf.c:7954 #, c-format msgid "invalid data" msgstr "nieprawidłowe dane" @@ -706,7 +711,7 @@ msgstr "" msgid "[ADDR...]" msgstr "[ADRES...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 +#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:663 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 @@ -722,7 +727,7 @@ msgstr "" "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/addr2line.c:201 src/ar.c:294 src/elfcmp.c:668 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 @@ -1097,120 +1102,120 @@ msgstr "nie można uzyskać zawartości sekcji %zu w \"%s\": %s" msgid "cannot get symbol in '%s': %s" msgstr "nie można uzyskać symbolu w \"%s\": %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:373 #, 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:376 #, 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:422 src/elfcmp.c:491 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "%s %s różnią się: liczba notatek sekcji [%zu] \"%s\"" -#: src/elfcmp.c:429 +#: src/elfcmp.c:430 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "nie można odczytać notatki sekcji [%zu] \"%s\" w \"%s\": %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:440 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s różnią się: nazwa notatki sekcji [%zu] \"%s\"" -#: src/elfcmp.c:447 +#: src/elfcmp.c:448 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "%s %s różnią się: sekcja [%zu] \"%s\" notatka \"%s\" typ" -#: src/elfcmp.c:462 +#: src/elfcmp.c:463 #, 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:471 #, 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:480 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "%s %s różnią się: sekcja [%zu] \"%s\" notatka \"%s\" zawartość" -#: src/elfcmp.c:519 +#: src/elfcmp.c:520 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s różnią się: zawartość sekcji [%zu] \"%s\"" -#: src/elfcmp.c:523 +#: src/elfcmp.c:524 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s różnią się: zawartość sekcji [%zu,%zu] \"%s\"" -#: src/elfcmp.c:538 +#: src/elfcmp.c:539 #, 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:572 src/elfcmp.c:577 #, c-format msgid "cannot load data of '%s': %s" msgstr "nie można wczytać danych z \"%s\": %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:596 src/elfcmp.c:602 #, 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" -#: src/elfcmp.c:607 +#: src/elfcmp.c:608 #, 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:632 #, c-format msgid "%s %s differ: gap" msgstr "%s %s różnią się: luka" -#: src/elfcmp.c:694 +#: src/elfcmp.c:695 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Nieprawidłowa wartość \"%s\" dla parametru --gaps." -#: src/elfcmp.c:722 src/findtextrel.c:221 src/ldgeneric.c:1757 +#: src/elfcmp.c:723 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/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1923 +#: src/unstrip.c:1952 #, c-format msgid "cannot open '%s'" msgstr "nie można otworzyć \"%s\"" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:727 src/findtextrel.c:228 src/ranlib.c:178 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "nie można utworzyć deskryptora ELF dla \"%s\": %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:732 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "nie można utworzyć deskryptora EBL dla \"%s\"" -#: src/elfcmp.c:749 +#: src/elfcmp.c:750 #, 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:760 #, 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:770 src/elfcmp.c:784 #, c-format msgid "cannot get relocation: %s" msgstr "nie można uzyskać relokacji: %s" @@ -3115,39 +3120,44 @@ msgstr "brak relokacji tekstu w \"%s\"" msgid "while reading ELF file" msgstr "podczas odczytywania pliku 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 "nie można uzyskać nagłówka programu: %s" + +#: src/findtextrel.c:340 src/findtextrel.c:357 +#, fuzzy, c-format +msgid "cannot get program header index at offset %zd: %s" msgstr "nie można uzyskać indeksu nagłówka programu pod offsetem %d: %s" -#: src/findtextrel.c:403 +#: 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/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" -#: 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" -#: src/findtextrel.c:523 +#: src/findtextrel.c:529 #, 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:582 #, 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" -#: src/findtextrel.c:583 src/findtextrel.c:603 +#: src/findtextrel.c:589 src/findtextrel.c:609 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3155,7 +3165,7 @@ msgid "" msgstr "" "plik zawierający funkcję \"%s\" mógł nie zostać skompilowany z -fpic/-fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:597 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3164,7 +3174,7 @@ msgstr "" "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:617 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3580,7 +3590,7 @@ msgstr "" "Ostrzeżenie: rozmiar \"%s\" zmienił się z %<PRIu64> w %s na %<PRIu64> w %s" #: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/readelf.c:829 src/strip.c:568 #, c-format msgid "cannot determine number of sections: %s" msgstr "nie można określić liczby sekcji: %s" @@ -3819,7 +3829,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:1822 #, c-format msgid "cannot update ELF header: %s" msgstr "nie można zaktualizować nagłówka ELF: %s" @@ -3989,7 +3999,7 @@ msgid "%s: INTERNAL ERROR %d (%s-%s): %s" msgstr "%s: BŁĄD WEWNĘTRZNY %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/strip.c:2160 #, c-format msgid "while closing '%s'" msgstr "podczas zamykania \"%s\"" @@ -4032,12 +4042,12 @@ msgstr "%s%s%s: nie rozpoznano formatu pliku" 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/nm.c:757 src/nm.c:1163 src/objdump.c:793 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/readelf.c:1785 src/readelf.c:1975 src/readelf.c:2202 src/readelf.c:2460 +#: src/readelf.c:2536 src/readelf.c:2623 src/readelf.c:3201 src/readelf.c:3237 +#: src/readelf.c:3300 src/readelf.c:8187 src/readelf.c:9273 src/readelf.c:9420 +#: src/readelf.c:9488 src/size.c:417 src/size.c:486 src/strip.c:503 #, c-format msgid "cannot get section header string table index" msgstr "nie można uzyskać indeksu tabeli ciągów nagłówków sekcji" @@ -4121,15 +4131,15 @@ msgstr "Nie podano działania.\n" msgid "while close `%s'" msgstr "podczas zamykania \"%s\"" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2072 msgid "INVALID SYMBOL" msgstr "NIEPRAWIDŁOWY SYMBOL" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:394 src/readelf.c:1914 src/readelf.c:2108 msgid "INVALID SECTION" msgstr "NIEPRAWIDŁOWA SEKCJA" -#: src/objdump.c:510 +#: src/objdump.c:514 #, c-format msgid "" "\n" @@ -4140,21 +4150,21 @@ msgstr "" "PISY RELOKACJI DLA [%s]:\n" "%-*s TYP WARTOŚĆ\n" -#: src/objdump.c:513 +#: src/objdump.c:517 msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:576 +#: src/objdump.c:582 #, c-format msgid "Contents of section %s:\n" msgstr "Zawartość sekcji %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:703 #, c-format msgid "cannot disassemble" msgstr "nie można deasemblować" -#: src/objdump.c:736 +#: src/objdump.c:742 #, c-format msgid "cannot allocate memory" msgstr "nie można przydzielić pamięci" @@ -4308,11 +4318,11 @@ msgstr "nie można utworzyć deskryptora ELF: %s" 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:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9440 +#: src/unstrip.c:356 src/unstrip.c:387 src/unstrip.c:436 src/unstrip.c:544 +#: src/unstrip.c:561 src/unstrip.c:597 src/unstrip.c:795 src/unstrip.c:1063 +#: src/unstrip.c:1254 src/unstrip.c:1314 src/unstrip.c:1435 src/unstrip.c:1488 +#: src/unstrip.c:1595 src/unstrip.c:1784 #, c-format msgid "cannot get section header: %s" msgstr "nie można uzyskać nagłówka sekcji: %s" @@ -4322,8 +4332,8 @@ msgstr "nie można uzyskać nagłówka sekcji: %s" msgid "cannot get section name" msgstr "nie można uzyskać nagłówka sekcji\n" -#: src/readelf.c:571 src/readelf.c:5221 src/readelf.c:7414 src/readelf.c:7516 -#: src/readelf.c:7674 +#: src/readelf.c:571 src/readelf.c:5398 src/readelf.c:7671 src/readelf.c:7773 +#: src/readelf.c:7939 #, c-format msgid "cannot get %s content: %s" msgstr "nie można uzyskać zwartości %s: %s" @@ -4626,7 +4636,7 @@ msgstr "" " 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:1258 src/unstrip.c:1843 src/unstrip.c:1886 src/unstrip.c:1893 #, c-format msgid "cannot get program header: %s" msgstr "nie można uzyskać nagłówka programu: %s" @@ -4675,8 +4685,8 @@ msgstr "<NIEPRAWIDŁOWY SYMBOL>" msgid "<INVALID SECTION>" msgstr "<NIEPRAWIDŁOWY SEKCJA>" -#: 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:1585 src/readelf.c:2208 src/readelf.c:2466 src/readelf.c:2542 +#: src/readelf.c:2846 src/readelf.c:2920 src/readelf.c:4610 #, fuzzy, c-format msgid "invalid sh_link value in section %Zu" msgstr "nieprawidłowa sekcja .debug_line" @@ -4736,7 +4746,7 @@ msgstr "runpath biblioteki: [%s]\n" msgid "%<PRId64> (bytes)\n" msgstr "%<PRId64> (bajtów)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1770 src/readelf.c:1960 #, c-format msgid "" "\n" @@ -4745,7 +4755,7 @@ msgstr "" "\n" "Nieprawidłowa tabela symboli pod offsetem %#0<PRIx64>\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1788 src/readelf.c:1978 #, c-format msgid "" "\n" @@ -4768,7 +4778,7 @@ msgstr[2] "" "Sekcja relokacji [%2zu] \"%s\" dla sekcji [%2u] \"%s\" pod offsetem " "%#0<PRIx64> zawiera %d wpisów:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1803 src/readelf.c:1993 #, c-format msgid "" "\n" @@ -4794,22 +4804,22 @@ msgstr " Offset Typ Wartość Nazwa\n" 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:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1913 +#: src/readelf.c:1925 src/readelf.c:2059 src/readelf.c:2071 src/readelf.c:2085 +#: src/readelf.c:2107 src/readelf.c:2120 msgid "<INVALID RELOC>" msgstr "<NIEPRAWIDŁOWA RELOKACJA>" -#: src/readelf.c:2000 +#: src/readelf.c:2003 msgid " Offset Type Value Addend Name\n" msgstr " Offset Typ Wartość Koniec Nazwa\n" -#: src/readelf.c:2002 +#: src/readelf.c:2005 msgid " Offset Type Value Addend Name\n" msgstr "" " Offset Typ Wartość Koniec Nazwa\n" -#: src/readelf.c:2210 +#: src/readelf.c:2216 #, c-format msgid "" "\n" @@ -4827,7 +4837,7 @@ msgstr[2] "" "\n" "Tabela symboli [%2u] \"%s\" zawiera %u wpisów:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2221 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" @@ -4835,33 +4845,33 @@ 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:2229 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:2231 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:2251 #, c-format msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2339 #, c-format msgid "bad dynamic symbol" msgstr "błędny symbol dynamiczny" -#: src/readelf.c:2415 +#: src/readelf.c:2421 msgid "none" msgstr "brak" -#: src/readelf.c:2432 +#: src/readelf.c:2438 msgid "| <unknown>" msgstr "| <nieznany>" -#: src/readelf.c:2463 +#: src/readelf.c:2469 #, c-format msgid "" "\n" @@ -4887,17 +4897,17 @@ msgstr[2] "" " Adres: %#0*<PRIx64> Offset: %#08<PRIx64> Dowiązanie do sekcji: [%2u] \"%s" "\"\n" -#: src/readelf.c:2484 +#: src/readelf.c:2490 #, 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:2503 #, 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:2546 #, c-format msgid "" "\n" @@ -4923,18 +4933,18 @@ msgstr[2] "" " Adres: %#0*<PRIx64> Offset: %#08<PRIx64> Dowiązanie do sekcji: [%2u] \"%s" "\"\n" -#: src/readelf.c:2562 +#: src/readelf.c:2574 #, 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:2589 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Rodzic %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2850 #, c-format msgid "" "\n" @@ -4960,15 +4970,15 @@ msgstr[2] "" " Adres: %#0*<PRIx64> Offset: %#08<PRIx64> Dowiązanie do sekcji: [%2u] \"%s" "\"" -#: src/readelf.c:2844 +#: src/readelf.c:2878 msgid " 0 *local* " msgstr " 0 *lokalny* " -#: src/readelf.c:2849 +#: src/readelf.c:2883 msgid " 1 *global* " msgstr " 1 *globalny* " -#: src/readelf.c:2890 +#: src/readelf.c:2925 #, c-format msgid "" "\n" @@ -4999,22 +5009,22 @@ msgstr[2] "" " Adres: %#0*<PRIx64> Offset: %#08<PRIx64> Dowiązanie do sekcji: [%2u] \"%s" "\"\n" -#: src/readelf.c:2912 +#: src/readelf.c:2947 #, 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:2949 #, c-format msgid " 0 %6<PRIu32> %5.1f%%\n" msgstr " 0 %6<PRIu32> %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:2956 #, c-format msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:2969 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -5023,12 +5033,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:2987 src/readelf.c:3042 src/readelf.c:3098 #, 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:2995 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "nieprawidłowe dane w sekcji [%zu] \"%s\"" + +#: src/readelf.c:3050 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "nieprawidłowe dane w sekcji [%zu] \"%s\"" + +#: src/readelf.c:3106 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "nieprawidłowe dane w sekcji [%zu] \"%s\"" + +#: src/readelf.c:3173 #, c-format msgid "" " Symbol Bias: %u\n" @@ -5038,7 +5063,7 @@ msgstr "" " Rozmiar maski bitowej: %zu bajtów %<PRIuFAST32>%% bitów ustawionych " "drugie przesunięcie skrótu: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3248 #, c-format msgid "" "\n" @@ -5059,7 +5084,7 @@ msgstr[2] "" "Sekcja listy bibliotek [%2zu] \"%s\" pod offsetem %#0<PRIx64> zawiera %d " "wpisów:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3262 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -5067,7 +5092,7 @@ msgstr "" " Biblioteka Oznaczenie czasu Suma k. Wersja " "Flagi" -#: src/readelf.c:3228 +#: src/readelf.c:3312 #, c-format msgid "" "\n" @@ -5078,140 +5103,140 @@ msgstr "" "Sekcja atrybutów obiektu [%2zu] \"%s\" %<PRIu64> bajtów pod offsetem " "%#0<PRIx64>:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3329 msgid " Owner Size\n" msgstr " Właściciel Rozmiar\n" -#: src/readelf.c:3270 +#: src/readelf.c:3358 #, c-format msgid " %-13s %4<PRIu32>\n" msgstr " %-13s %4<PRIu32>\n" -#: src/readelf.c:3302 +#: src/readelf.c:3397 #, c-format msgid " %-4u %12<PRIu32>\n" msgstr " %-4u %12<PRIu32>\n" -#: src/readelf.c:3307 +#: src/readelf.c:3402 #, c-format msgid " File: %11<PRIu32>\n" msgstr " Plik: %11<PRIu32>\n" -#: src/readelf.c:3342 +#: src/readelf.c:3451 #, c-format msgid " %s: %<PRId64>, %s\n" msgstr " %s: %<PRId64>, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3454 #, c-format msgid " %s: %<PRId64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:3348 +#: src/readelf.c:3457 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3467 #, c-format msgid " %u: %<PRId64>\n" msgstr " %u: %<PRId64>\n" -#: src/readelf.c:3358 +#: src/readelf.c:3470 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3515 #, c-format msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3406 +#: src/readelf.c:3518 #, c-format msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3411 +#: src/readelf.c:3523 #, c-format msgid "%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3414 +#: src/readelf.c:3526 #, c-format msgid "%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3420 +#: src/readelf.c:3532 #, c-format msgid "%s+%#<PRIx64> <%s>" msgstr "%s+%#<PRIx64> <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3535 #, c-format msgid "%s+%#0*<PRIx64> <%s>" msgstr "%s+%#0*<PRIx64> <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3539 #, c-format msgid "%#<PRIx64> <%s>" msgstr "%#<PRIx64> <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3542 #, c-format msgid "%#0*<PRIx64> <%s>" msgstr "%#0*<PRIx64> <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3547 #, c-format msgid "%s+%#<PRIx64>" msgstr "%s+%#<PRIx64>" -#: src/readelf.c:3438 +#: src/readelf.c:3550 #, c-format msgid "%s+%#0*<PRIx64>" msgstr "%s+%#0*<PRIx64>" -#: src/readelf.c:3820 +#: src/readelf.c:3932 msgid "empty block" msgstr "pusty blok" -#: src/readelf.c:3823 +#: src/readelf.c:3935 #, c-format msgid "%zu byte block:" msgstr "%zu bajtowy blok:" -#: src/readelf.c:4217 +#: src/readelf.c:4332 #, c-format msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" msgstr "%*s[%4<PRIuMAX>] %s <SKRÓCONE>\n" -#: src/readelf.c:4274 +#: src/readelf.c:4389 #, c-format msgid "%s %#<PRIx64> used with different address sizes" msgstr "%s %#<PRIx64> zostało użyte z różnymi rozmiarami adresu" -#: src/readelf.c:4281 +#: src/readelf.c:4396 #, c-format msgid "%s %#<PRIx64> used with different offset sizes" msgstr "%s %#<PRIx64> zostało użyte z różnymi rozmiarami offsetu" -#: src/readelf.c:4288 +#: src/readelf.c:4403 #, fuzzy, c-format msgid "%s %#<PRIx64> used with different base addresses" msgstr "%s %#<PRIx64> zostało użyte z różnymi rozmiarami adresu" -#: src/readelf.c:4370 +#: src/readelf.c:4492 #, c-format msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n" msgstr " [%6tx] <NIEUŻYWANE ŚMIECIE W RESZCIE SEKCJI>\n" -#: src/readelf.c:4378 +#: src/readelf.c:4500 #, c-format msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n" msgstr " [%6tx] <NIEUŻYWANE ŚMIECIE>... %<PRIu64> bajtów...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4526 #, c-format msgid "" "\n" @@ -5222,7 +5247,7 @@ msgstr "" "Sekcja DWARF [%2zu] \"%s\" pod offsetem %#<PRIx64>:\n" " [ Kod]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4534 #, c-format msgid "" "\n" @@ -5231,30 +5256,30 @@ msgstr "" "\n" "Sekcja skrótów pod offsetem %<PRIu64>:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4547 #, 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:4563 #, c-format msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n" msgstr " [%5u] offset: %<PRId64>, potomek: %s, znacznik: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "yes" msgstr "tak" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "no" msgstr "nie" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4600 src/readelf.c:4673 #, 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:4615 #, c-format msgid "" "\n" @@ -5272,12 +5297,12 @@ msgstr[2] "" "\n" "Sekcja DWARF [%2zu] \"%s\" pod offsetem %#<PRIx64> zawiera %zu wpisów:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4646 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4648 #, c-format msgid "" " [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n" @@ -5285,8 +5310,8 @@ msgstr "" " [%*zu] początek: %0#*<PRIx64>, długość: %5<PRIu64>, offset CU DIE: " "%6<PRId64>\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:4678 src/readelf.c:4832 src/readelf.c:5408 src/readelf.c:6362 +#: src/readelf.c:6894 src/readelf.c:7014 src/readelf.c:7177 src/readelf.c:7602 #, c-format msgid "" "\n" @@ -5295,7 +5320,7 @@ msgstr "" "\n" "Sekcja DWARF [%2zu] \"%s\" pod offsetem %#<PRIx64>:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4691 src/readelf.c:6388 #, c-format msgid "" "\n" @@ -5304,106 +5329,111 @@ msgstr "" "\n" "Tabela pod offsetem %Zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4695 src/readelf.c:5432 src/readelf.c:6399 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "nieprawidłowe dane w sekcji [%zu] \"%s\"" -#: src/readelf.c:4589 +#: src/readelf.c:4711 #, fuzzy, c-format msgid "" "\n" " Length: %6<PRIu64>\n" msgstr " Długość offsetu: %<PRIu8>\n" -#: src/readelf.c:4601 +#: src/readelf.c:4723 #, fuzzy, c-format msgid " DWARF version: %6<PRIuFAST16>\n" msgstr " Wersja: %<PRIu16>\n" -#: src/readelf.c:4605 +#: src/readelf.c:4727 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4616 +#: src/readelf.c:4738 #, fuzzy, c-format msgid " CU offset: %6<PRIx64>\n" msgstr " offset CU: %#<PRIx32>\n" -#: src/readelf.c:4622 +#: src/readelf.c:4744 #, fuzzy, c-format msgid " Address size: %6<PRIu64>\n" msgstr " offset adresu: %#<PRIx32>\n" -#: src/readelf.c:4626 +#: src/readelf.c:4748 #, fuzzy, c-format msgid "unsupported address size" msgstr "brak wartości adresu" -#: src/readelf.c:4631 +#: src/readelf.c:4753 #, fuzzy, c-format msgid "" " Segment size: %6<PRIu64>\n" "\n" msgstr " ustawienie pliku na %<PRIu64>\n" -#: src/readelf.c:4635 +#: src/readelf.c:4757 #, c-format msgid "unsupported segment size" msgstr "" -#: src/readelf.c:4675 +#: src/readelf.c:4797 #, fuzzy, c-format msgid " %s..%s (%<PRIx64>)\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:4678 +#: src/readelf.c:4800 #, fuzzy, c-format msgid " %s..%s\n" msgstr " [%6tx] %s...%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4809 #, c-format msgid " %Zu padding bytes\n" msgstr "" -#: src/readelf.c:4705 +#: src/readelf.c:4827 #, 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:4857 src/readelf.c:6921 #, c-format msgid " [%6tx] <INVALID DATA>\n" msgstr " [%6tx] <NIEPRAWIDŁOWE DANE>\n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4879 src/readelf.c:6943 #, 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:4886 src/readelf.c:6950 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] pusta lista\n" -#: src/readelf.c:4775 +#: src/readelf.c:4897 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s...%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:4899 #, c-format msgid " %s..%s\n" msgstr " %s...%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5078 +#, fuzzy +msgid " <INVALID DATA>\n" +msgstr " <NIEPRAWIDŁOWE DANE>\n" + +#: src/readelf.c:5387 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "nie można uzyskać nagłówka ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5404 #, c-format msgid "" "\n" @@ -5412,7 +5442,7 @@ msgstr "" "\n" "Sekcja informacji o ramce wywołania [%2zu] \"%s\" pod offsetem %#0<PRIx64>:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5454 #, c-format msgid "" "\n" @@ -5421,50 +5451,50 @@ msgstr "" "\n" " [%6tx] Zerowy koniec\n" -#: src/readelf.c:5362 +#: src/readelf.c:5547 src/readelf.c:5702 #, c-format msgid "invalid augmentation length" msgstr "nieprawidłowa długość powiększenia" -#: src/readelf.c:5374 +#: src/readelf.c:5562 msgid "FDE address encoding: " msgstr "Kodowanie adresu FDE: " -#: src/readelf.c:5380 +#: src/readelf.c:5568 msgid "LSDA pointer encoding: " msgstr "Kodowanie wskaźnika LSDA: " -#: src/readelf.c:5491 +#: src/readelf.c:5679 #, c-format msgid " (offset: %#<PRIx64>)" msgstr " (offset: %#<PRIx64>)" -#: src/readelf.c:5498 +#: src/readelf.c:5686 #, c-format msgid " (end offset: %#<PRIx64>)" msgstr " (kończący offset: %#<PRIx64>)" -#: src/readelf.c:5525 +#: src/readelf.c:5723 #, c-format msgid " %-26sLSDA pointer: %#<PRIx64>\n" msgstr " %-26sWskaźnik LSDA: %#<PRIx64>\n" -#: src/readelf.c:5577 +#: src/readelf.c:5778 #, c-format msgid "cannot get attribute code: %s" msgstr "nie można uzyskać kodu atrybutu: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5787 #, c-format msgid "cannot get attribute form: %s" msgstr "nie można uzyskać formy atrybutu: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5802 #, c-format msgid "cannot get attribute value: %s" msgstr "nie można uzyskać wartości atrybutu: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6101 #, c-format msgid "" "\n" @@ -5475,7 +5505,7 @@ msgstr "" "Sekcja DWARF [%2zu] \"%s\" pod offsetem %#<PRIx64>:\n" " [Offset]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6133 #, c-format msgid "" " Type unit at offset %<PRIu64>:\n" @@ -5488,7 +5518,7 @@ msgstr "" "%<PRIu8>, rozmiar offsetu: %<PRIu8>\n" " Podpis typu: %#<PRIx64>, offset typu: %#<PRIx64>\n" -#: src/readelf.c:5935 +#: src/readelf.c:6142 #, c-format msgid "" " Compilation unit at offset %<PRIu64>:\n" @@ -5499,33 +5529,33 @@ msgstr "" " Wersja: %<PRIu16>, offset sekcji skrótów: %<PRIu64>, rozmiar adresu: " "%<PRIu8>, rozmiar offsetu: %<PRIu8>\n" -#: src/readelf.c:5960 +#: src/readelf.c:6167 #, c-format msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s" msgstr "nie można uzyskać DIE pod offsetem %<PRIu64> w sekcji \"%s\": %s" -#: src/readelf.c:5974 +#: src/readelf.c:6181 #, c-format msgid "cannot get DIE offset: %s" msgstr "nie można uzyskać offsetu DIE: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6190 #, c-format msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s" msgstr "" "nie można uzyskać znacznika DIE pod offsetem %<PRIu64> w sekcji \"%s\": %s" -#: src/readelf.c:6015 +#: src/readelf.c:6222 #, 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:6230 #, c-format msgid "cannot get next DIE: %s" msgstr "nie można uzyskać następnego DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6266 #, fuzzy, c-format msgid "" "\n" @@ -5535,12 +5565,12 @@ msgstr "" "\n" "Sekcja DWARF [%2zu] \"%s\" pod offsetem %#<PRIx64>:\n" -#: src/readelf.c:6158 +#: src/readelf.c:6375 #, 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:6445 #, c-format msgid "" "\n" @@ -5569,12 +5599,12 @@ msgstr "" "\n" "Instrukcje:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6466 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "nieprawidłowe dane pod offsetem %tu w sekcji [%zu] \"%s\"" -#: src/readelf.c:6262 +#: src/readelf.c:6481 #, c-format msgid " [%*<PRIuFAST8>] %hhu argument\n" msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n" @@ -5582,7 +5612,7 @@ msgstr[0] " [%*<PRIuFAST8>] %hhu parametr\n" msgstr[1] " [%*<PRIuFAST8>] %hhu parametry\n" msgstr[2] " [%*<PRIuFAST8>] %hhu parametrów\n" -#: src/readelf.c:6270 +#: src/readelf.c:6489 msgid "" "\n" "Directory table:" @@ -5590,7 +5620,7 @@ msgstr "" "\n" "Tabela katalogu:" -#: src/readelf.c:6286 +#: src/readelf.c:6505 msgid "" "\n" "File name table:\n" @@ -5600,7 +5630,7 @@ msgstr "" "Tabela nazw plików:\n" " Wpis Kat Czas Rozmiar Nazwa" -#: src/readelf.c:6315 +#: src/readelf.c:6540 msgid "" "\n" "Line number statements:" @@ -5608,114 +5638,119 @@ msgstr "" "\n" "Instrukcje numerów wierszy:" -#: src/readelf.c:6391 +#: src/readelf.c:6591 +#, fuzzy, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "nieprawidłowa minimalna długość dopasowanego rozmiaru ciągu" + +#: src/readelf.c:6627 #, 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:6632 #, 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:6652 #, c-format msgid " extended opcode %u: " msgstr " instrukcja rozszerzona %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6657 msgid " end of sequence" msgstr " koniec sekwencji" -#: src/readelf.c:6438 +#: src/readelf.c:6676 #, c-format msgid " set address to %s\n" msgstr " ustawienie adresu na %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6703 #, c-format msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n" msgstr "" " definicja nowego pliku: dir=%u, mtime=%<PRIu64>, długość=%<PRIu64>, nazwa=" "%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6716 #, c-format msgid " set discriminator to %u\n" msgstr " ustawienie dyskryminatora na %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6721 msgid " unknown opcode" msgstr " nieznana instrukcja" -#: src/readelf.c:6489 +#: src/readelf.c:6733 msgid " copy" msgstr " kopiowanie" -#: src/readelf.c:6500 +#: src/readelf.c:6744 #, 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:6748 #, 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:6759 #, c-format msgid " advance line by constant %d to %<PRId64>\n" msgstr " zwiększenie wiersza o stałą %d do %<PRId64>\n" -#: src/readelf.c:6523 +#: src/readelf.c:6767 #, c-format msgid " set file to %<PRIu64>\n" msgstr " ustawienie pliku na %<PRIu64>\n" -#: src/readelf.c:6533 +#: src/readelf.c:6777 #, c-format msgid " set column to %<PRIu64>\n" msgstr " ustawienie kolumny na %<PRIu64>\n" -#: src/readelf.c:6540 +#: src/readelf.c:6784 #, c-format msgid " set '%s' to %<PRIuFAST8>\n" msgstr " ustawienie \"%s\" na %<PRIuFAST8>\n" -#: src/readelf.c:6546 +#: src/readelf.c:6790 msgid " set basic block flag" msgstr " ustawienie podstawowej flagi bloku" -#: src/readelf.c:6555 +#: src/readelf.c:6803 #, 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:6807 #, 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:6825 #, 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:6834 msgid " set prologue end flag" msgstr " ustawienie flagi końca prologu" -#: src/readelf.c:6591 +#: src/readelf.c:6839 msgid " set epilogue begin flag" msgstr " ustawienie flagi początku epilogu" -#: src/readelf.c:6600 +#: src/readelf.c:6848 #, c-format msgid " set isa to %u\n" msgstr " ustawienie isa na %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6857 #, c-format msgid " unknown opcode with %<PRIu8> parameter:" msgid_plural " unknown opcode with %<PRIu8> parameters:" @@ -5723,96 +5758,101 @@ msgstr[0] " nieznana instrukcja z %<PRIu8> parametrem:" msgstr[1] " nieznana instrukcja z %<PRIu8> parametrami:" msgstr[2] " nieznana instrukcja z %<PRIu8> parametrami:" -#: src/readelf.c:6641 +#: src/readelf.c:6889 #, 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:6964 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s...%s" -#: src/readelf.c:6718 +#: src/readelf.c:6966 #, c-format msgid " %s..%s" msgstr " %s...%s" -#: src/readelf.c:6725 +#: src/readelf.c:6973 src/readelf.c:7858 msgid " <INVALID DATA>\n" msgstr " <NIEPRAWIDŁOWE DANE>\n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7025 src/readelf.c:7186 #, 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:7104 #, 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:7127 +#, fuzzy, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** niezakończony ciąg na końcu sekcji" + +#: src/readelf.c:7227 #, c-format msgid " Offset: 0x%<PRIx64>\n" msgstr " Offset: 0x%<PRIx64>\n" -#: src/readelf.c:6984 +#: src/readelf.c:7239 #, c-format msgid " Version: %<PRIu16>\n" msgstr " Wersja: %<PRIu16>\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7245 src/readelf.c:7968 #, 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:7252 #, c-format msgid " Flag: 0x%<PRIx8>\n" msgstr " Flaga: 0x%<PRIx8>\n" -#: src/readelf.c:7000 +#: src/readelf.c:7255 #, c-format msgid " Offset length: %<PRIu8>\n" msgstr " Długość offsetu: %<PRIu8>\n" -#: src/readelf.c:7008 +#: src/readelf.c:7263 #, c-format msgid " .debug_line offset: 0x%<PRIx64>\n" msgstr " Offset .debug_line: 0x%<PRIx64>\n" -#: src/readelf.c:7021 +#: src/readelf.c:7276 #, c-format msgid " extension opcode table, %<PRIu8> items:\n" msgstr " tablica instrukcji rozszerzenia, %<PRIu8> elementów:\n" -#: src/readelf.c:7028 +#: src/readelf.c:7283 #, c-format msgid " [%<PRIx8>]" msgstr " [%<PRIx8>]" -#: src/readelf.c:7040 +#: src/readelf.c:7295 #, c-format msgid " %<PRIu8> arguments:" msgstr " Parametry %<PRIu8>:" -#: src/readelf.c:7068 +#: src/readelf.c:7323 #, c-format msgid " no arguments." msgstr " brak parametrów." -#: src/readelf.c:7303 +#: src/readelf.c:7560 #, c-format msgid "vendor opcode not verified?" msgstr "instrukcja producenta nie została sprawdzona?" -#: src/readelf.c:7331 +#: src/readelf.c:7588 #, c-format msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n" msgstr " [%5d] offset DIE: %6<PRId64>, offset CU DIE: %6<PRId64>, nazwa: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7629 #, c-format msgid "" "\n" @@ -5823,12 +5863,12 @@ msgstr "" "Sekcja DWARF [%2zu] \"%s\" pod offsetem %#<PRIx64>:\n" " %*s Ciąg\n" -#: src/readelf.c:7386 +#: src/readelf.c:7643 #, 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:7663 #, c-format msgid "" "\n" @@ -5837,7 +5877,7 @@ msgstr "" "\n" "Sekcja tabeli wyszukiwania ramki wywołania [%2zu] \".eh_frame_hdr\":\n" -#: src/readelf.c:7508 +#: src/readelf.c:7765 #, c-format msgid "" "\n" @@ -5846,22 +5886,22 @@ msgstr "" "\n" "Sekcja tabeli obsługiwania wyjątków [%2zu] \".gcc_except_table\":\n" -#: src/readelf.c:7531 +#: src/readelf.c:7788 #, c-format msgid " LPStart encoding: %#x " msgstr " Kodowanie LPStart: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7800 #, c-format msgid " TType encoding: %#x " msgstr " Kodowanie TType: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7815 #, c-format msgid " Call site encoding: %#x " msgstr " Kodowanie strony wywołania: %#x " -#: src/readelf.c:7570 +#: src/readelf.c:7828 msgid "" "\n" " Call site table:" @@ -5869,7 +5909,7 @@ msgstr "" "\n" " Tabela strony wywołania:" -#: src/readelf.c:7584 +#: src/readelf.c:7842 #, c-format msgid "" " [%4u] Call site start: %#<PRIx64>\n" @@ -5882,12 +5922,12 @@ msgstr "" " Lądowisko: %#<PRIx64>\n" " Działanie: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:7909 #, c-format msgid "invalid TType encoding" msgstr "nieprawidłowe kodowanie TType" -#: src/readelf.c:7665 +#: src/readelf.c:7930 #, c-format msgid "" "\n" @@ -5896,37 +5936,37 @@ msgstr "" "\n" "Sekcja GDB [%2zu] \"%s\" pod offsetem %#<PRIx64> zawiera %<PRId64> bajtów:\n" -#: src/readelf.c:7694 +#: src/readelf.c:7959 #, c-format msgid " Version: %<PRId32>\n" msgstr " Wersja: %<PRId32>\n" -#: src/readelf.c:7712 +#: src/readelf.c:7977 #, c-format msgid " CU offset: %#<PRIx32>\n" msgstr " offset CU: %#<PRIx32>\n" -#: src/readelf.c:7719 +#: src/readelf.c:7984 #, c-format msgid " TU offset: %#<PRIx32>\n" msgstr " offset TU: %#<PRIx32>\n" -#: src/readelf.c:7726 +#: src/readelf.c:7991 #, c-format msgid " address offset: %#<PRIx32>\n" msgstr " offset adresu: %#<PRIx32>\n" -#: src/readelf.c:7733 +#: src/readelf.c:7998 #, c-format msgid " symbol offset: %#<PRIx32>\n" msgstr " offset symbolu: %#<PRIx32>\n" -#: src/readelf.c:7740 +#: src/readelf.c:8005 #, c-format msgid " constant offset: %#<PRIx32>\n" msgstr " offset stałej: %#<PRIx32>\n" -#: src/readelf.c:7747 +#: src/readelf.c:8012 #, c-format msgid "" "\n" @@ -5935,7 +5975,7 @@ msgstr "" "\n" " Lista CU pod offsetem %#<PRIx32> zawiera %zu wpisów:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8034 #, c-format msgid "" "\n" @@ -5944,7 +5984,7 @@ msgstr "" "\n" " Lista TU pod offsetem %#<PRIx32> zawiera %zu wpisów:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8060 #, c-format msgid "" "\n" @@ -5953,7 +5993,7 @@ msgstr "" "\n" " Lista adresów pod offsetem %#<PRIx32> zawiera %zu wpisów:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8089 #, c-format msgid "" "\n" @@ -5962,17 +6002,17 @@ msgstr "" "\n" " Tabela symboli pod offsetem %#<PRIx32> zawiera %zu gniazd:\n" -#: src/readelf.c:7909 +#: src/readelf.c:8176 #, 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:8336 src/readelf.c:8942 src/readelf.c:9053 src/readelf.c:9111 #, c-format msgid "cannot convert core note data: %s" msgstr "nie można przekonwertować danych notatki core: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8683 #, c-format msgid "" "\n" @@ -5981,21 +6021,21 @@ msgstr "" "\n" "%*s... <powtarza się jeszcze %u razy>..." -#: src/readelf.c:8919 +#: src/readelf.c:9190 msgid " Owner Data size Type\n" msgstr " Właściciel Rozmiar danych Typ\n" -#: src/readelf.c:8937 +#: src/readelf.c:9208 #, c-format msgid " %-13.*s %9<PRId32> %s\n" msgstr " %-13.*s %9<PRId32> %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9258 #, 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:9285 #, c-format msgid "" "\n" @@ -6005,7 +6045,7 @@ msgstr "" "Segment notatki [%2zu] \"%s\" o długości %<PRIu64> bajtów pod offsetem " "%#0<PRIx64>:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9308 #, c-format msgid "" "\n" @@ -6014,7 +6054,7 @@ msgstr "" "\n" "Segment notatki o długości %<PRIu64> bajtów pod offsetem %#0<PRIx64>:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9354 #, c-format msgid "" "\n" @@ -6023,12 +6063,12 @@ msgstr "" "\n" "Sekcja [%Zu] \"%s\" nie posiada danych do zrzucenia.\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9360 src/readelf.c:9383 #, c-format 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:9364 #, c-format msgid "" "\n" @@ -6038,7 +6078,7 @@ msgstr "" "Segment zrzutu szesnastkowego [%Zu] \"%s\", %<PRIu64> bajtów pod offsetem " "%#0<PRIx64>:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9377 #, c-format msgid "" "\n" @@ -6047,7 +6087,7 @@ msgstr "" "\n" "Sekcja [%Zu] \"%s\" nie posiada ciągów do zrzucenia.\n" -#: src/readelf.c:9116 +#: src/readelf.c:9387 #, c-format msgid "" "\n" @@ -6057,7 +6097,7 @@ msgstr "" "Sekcja ciągów [%Zu] \"%s\" zawiera %<PRIu64> bajtów pod offsetem " "%#0<PRIx64>:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9435 #, c-format msgid "" "\n" @@ -6066,7 +6106,7 @@ msgstr "" "\n" "sekcja [%lu] nie istnieje" -#: src/readelf.c:9193 +#: src/readelf.c:9464 #, c-format msgid "" "\n" @@ -6075,12 +6115,12 @@ msgstr "" "\n" "sekcja \"%s\" nie istnieje" -#: src/readelf.c:9250 +#: src/readelf.c:9521 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "nie można uzyskać indeksu symboli archiwum \"%s\": %s" -#: src/readelf.c:9253 +#: src/readelf.c:9524 #, c-format msgid "" "\n" @@ -6089,7 +6129,7 @@ msgstr "" "\n" "Archiwum \"%s\" nie posiada indeksu symboli\n" -#: src/readelf.c:9257 +#: src/readelf.c:9528 #, c-format msgid "" "\n" @@ -6098,12 +6138,12 @@ msgstr "" "\n" "Indeks archiwum \"%s\" posiada %Zu wpisów:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9546 #, 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" -#: src/readelf.c:9280 +#: src/readelf.c:9551 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Element archiwum \"%s\" zawiera:\n" @@ -6167,12 +6207,12 @@ msgstr "Nieprawidłowa baza: %s" msgid "%s: file format not recognized" msgstr "%s: nie rozpoznano formatu pliku" -#: src/size.c:438 src/size.c:571 +#: src/size.c:437 src/size.c:570 #, c-format msgid " (ex %s)" msgstr " (ex %s)" -#: src/size.c:596 +#: src/size.c:595 msgid "(TOTALS)\n" msgstr "(CAŁKOWITE)\n" @@ -6334,82 +6374,87 @@ msgstr "%s: nie można używać -o lub -f podczas okrajania archiwum" msgid "cannot open EBL backend" msgstr "nie można otworzyć zaplecza EBL" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:508 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "nie można określić liczby nagłówków programu: %s" + +#: src/strip.c:523 src/strip.c:547 #, c-format msgid "cannot create new file '%s': %s" msgstr "nie można utworzyć nowego pliku \"%s\": %s" -#: src/strip.c:608 +#: src/strip.c:613 #, c-format msgid "illformed file '%s'" msgstr "plik \"%s\" posiada błędny format" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:935 src/strip.c:1024 #, 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:997 src/strip.c:1962 #, 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:1011 #, c-format msgid "while preparing output for '%s'" msgstr "podczas przygotowywania wyjścia dla \"%s\"" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1062 src/strip.c:1119 #, c-format msgid "while create section header section: %s" msgstr "podczas tworzenia sekcji nagłówka sekcji: %s" -#: src/strip.c:1063 +#: src/strip.c:1068 #, c-format msgid "cannot allocate section data: %s" msgstr "nie można przydzielić danych sekcji: %s" -#: src/strip.c:1123 +#: src/strip.c:1128 #, 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:1757 #, c-format msgid "bad relocation" msgstr "błędna relokacja" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1874 src/strip.c:1984 #, c-format msgid "while writing '%s': %s" msgstr "podczas zapisywania \"%s\": %s" -#: src/strip.c:1880 +#: src/strip.c:1885 #, c-format msgid "while creating '%s'" msgstr "podczas tworzenia \"%s\"" -#: src/strip.c:1902 +#: src/strip.c:1907 #, c-format msgid "while computing checksum for debug information" msgstr "podczas obliczania sumy kontrolnej dla informacji debugowania" -#: src/strip.c:1965 +#: src/strip.c:1970 #, 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:2009 src/strip.c:2029 #, c-format msgid "while writing '%s'" msgstr "podczas zapisywania \"%s\"" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2066 src/strip.c:2073 #, c-format msgid "error while finishing '%s': %s" msgstr "błąd podczas kończenia \"%s\": %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2096 src/strip.c:2153 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "nie można ustawić czasu dostępu i modyfikacji \"%s\"" @@ -6497,162 +6542,167 @@ msgstr "nie można utworzyć nagłówka ELF: %s" 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:262 src/unstrip.c:1832 src/unstrip.c:1876 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "nie można określić liczby nagłówków programu: %s" + +#: src/unstrip.c:267 src/unstrip.c:1836 #, 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:273 #, c-format msgid "cannot copy program header: %s" msgstr "nie można skopiować nagłówka programu: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:283 #, 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:286 src/unstrip.c:1513 #, 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:288 src/unstrip.c:1515 #, c-format msgid "cannot copy section data: %s" msgstr "nie można skopiować danych sekcji: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:312 #, c-format msgid "cannot create directory '%s'" msgstr "nie można utworzyć katalogu \"%s\"" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:352 src/unstrip.c:769 src/unstrip.c:1547 #, 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:368 src/unstrip.c:586 src/unstrip.c:607 src/unstrip.c:619 +#: src/unstrip.c:1568 src/unstrip.c:1698 src/unstrip.c:1722 #, c-format msgid "cannot update symbol table: %s" msgstr "nie można zaktualizować tabeli symboli: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:378 #, 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:417 src/unstrip.c:428 #, c-format msgid "cannot update relocation: %s" msgstr "nie można zaktualizować relokacji: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:515 #, c-format msgid "cannot get symbol version: %s" msgstr "nie można uzyskać wersji symbolu: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:527 #, 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" -#: src/unstrip.c:771 +#: src/unstrip.c:775 #, c-format 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:917 src/unstrip.c:1258 #, c-format 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:958 src/unstrip.c:977 src/unstrip.c:1010 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "nie można odczytać sekcji \".gnu.prelink_undo\": %s" -#: src/unstrip.c:994 +#: src/unstrip.c:998 #, c-format msgid "invalid contents in '%s' section" msgstr "nieprawidłowa zawartość w sekcji \"%s\"" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1053 src/unstrip.c:1378 #, c-format msgid "cannot find matching section for [%Zu] '%s'" msgstr "nie można odnaleźć pasującej sekcji dla [%Zu] \"%s\"" -#: src/unstrip.c:1174 src/unstrip.c:1189 src/unstrip.c:1455 +#: src/unstrip.c:1178 src/unstrip.c:1193 src/unstrip.c:1459 #, 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:1202 #, 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:1229 src/unstrip.c:1233 #, 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:1237 src/unstrip.c:1241 src/unstrip.c:1474 #, c-format msgid "cannot get section count: %s" msgstr "nie można uzyskać licznika sekcji: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1244 #, 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 " "parametry?" -#: src/unstrip.c:1299 src/unstrip.c:1389 +#: src/unstrip.c:1303 src/unstrip.c:1393 #, 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:1453 #, c-format msgid "cannot add new section: %s" msgstr "nie można dodać nowej sekcji: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1555 #, c-format msgid "symbol [%Zu] has invalid section index" msgstr "symbol [%Zu] posiada nieprawidłowy indeks sekcji" -#: src/unstrip.c:1789 +#: src/unstrip.c:1793 #, c-format msgid "cannot read section data: %s" msgstr "nie można odczytać danych sekcji: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1814 #, c-format msgid "cannot get ELF header: %s" msgstr "nie można uzyskać nagłówka ELF: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1846 #, 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:1851 src/unstrip.c:1934 #, c-format msgid "cannot write output file: %s" msgstr "nie można zapisać pliku wyjściowego: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:1903 #, 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:1906 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6660,77 +6710,77 @@ msgstr "" "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:1925 src/unstrip.c:1976 src/unstrip.c:1988 src/unstrip.c:2074 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "nie można utworzyć deskryptora ELF: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:1967 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:1969 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:1992 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:1995 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:1998 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2001 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2031 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "nie można odnaleźć okrojonego pliku dla modułu \"%s\": %s" -#: src/unstrip.c:2023 +#: src/unstrip.c:2035 #, 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" -#: src/unstrip.c:2038 +#: src/unstrip.c:2050 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "nie można odnaleźć pliku debugowania dla modułu \"%s\": %s" -#: src/unstrip.c:2042 +#: src/unstrip.c:2054 #, 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" -#: src/unstrip.c:2055 +#: src/unstrip.c:2067 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "moduł \"%s\" pliku \"%s\" nie został okrojony" -#: src/unstrip.c:2086 +#: src/unstrip.c:2098 #, 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" -#: src/unstrip.c:2219 +#: src/unstrip.c:2231 #, c-format msgid "no matching modules found" msgstr "nie odnaleziono pasujących modułów" -#: src/unstrip.c:2228 +#: src/unstrip.c:2240 #, c-format msgid "matched more than one module" msgstr "pasuje więcej niż jeden moduł" -#: src/unstrip.c:2275 +#: src/unstrip.c:2287 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6738,7 +6788,7 @@ msgstr "" "OKROJONY-PLIK PLIK-DEBUGOWANIA\n" "[MODUŁ...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2288 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" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugzilla.redhat.com/\n" -"POT-Creation-Date: 2014-08-25 21:49+0200\n" +"POT-Creation-Date: 2014-12-18 22:59+0100\n" "PO-Revision-Date: 2013-10-09 17:50+0300\n" "Last-Translator: Yuri Chornoivan <[email protected]>\n" "Language-Team: Ukrainian <[email protected]>\n" @@ -19,8 +19,8 @@ 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/xmalloc.c:54 lib/xmalloc.c:68 lib/xmalloc.c:82 src/readelf.c:3182 +#: src/readelf.c:3559 src/readelf.c:8285 src/unstrip.c:2127 src/unstrip.c:2335 #, c-format msgid "memory exhausted" msgstr "пам’ять вичерпано" @@ -210,7 +210,12 @@ msgstr "некоректний розділ CFI" msgid "no alternative debug link found" msgstr "альтернативного діагностичного посилання не знайдено" -#: libdwfl/argp-std.c:46 src/unstrip.c:2265 +#: libdw/dwarf_error.c:95 +#, fuzzy +msgid "invalid opcode" +msgstr "некоректний параметр" + +#: libdwfl/argp-std.c:46 src/unstrip.c:2277 msgid "Input selection options:" msgstr "Вибір параметрів виведення даних:" @@ -528,7 +533,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:5367 #, c-format msgid "invalid encoding" msgstr "некоректне кодування" @@ -609,8 +614,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:7235 src/readelf.c:7683 +#: src/readelf.c:7784 src/readelf.c:7954 #, c-format msgid "invalid data" msgstr "некоректні дані" @@ -709,7 +714,7 @@ msgstr "Шукати АДРЕСИ у файлах кодів та даних п� msgid "[ADDR...]" msgstr "[АДРЕСА...]" -#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:662 src/elflint.c:235 +#: src/addr2line.c:196 src/ar.c:289 src/elfcmp.c:663 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 @@ -724,7 +729,7 @@ msgstr "" "початкових кодах. Умовами ліцензування програми НЕ передбачено жодних " "гарантій, зокрема гарантій працездатності або придатності для певної мети.\n" -#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:667 src/elflint.c:240 +#: src/addr2line.c:201 src/ar.c:294 src/elfcmp.c:668 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 @@ -1103,120 +1108,120 @@ msgstr "не вдалося отримати вміст розділу %zu у « msgid "cannot get symbol in '%s': %s" msgstr "не вдалося отримати символ у «%s»: %s" -#: src/elfcmp.c:372 +#: src/elfcmp.c:373 #, c-format msgid "%s %s differ: symbol table [%zu]" msgstr "%s %s diff: таблиця символів [%zu]" -#: src/elfcmp.c:375 +#: src/elfcmp.c:376 #, 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:422 src/elfcmp.c:491 #, 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:430 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "не вдалося прочитати розділ нотаток [%zu] «%s» у «%s»: %s" -#: src/elfcmp.c:439 +#: src/elfcmp.c:440 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s diff: розділ [%zu] назва нотатки «%s»" -#: src/elfcmp.c:447 +#: src/elfcmp.c:448 #, 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:463 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s diff: довжина ідентифікатора збирання" -#: src/elfcmp.c:470 +#: src/elfcmp.c:471 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s diff: вміст ідентифікатора збирання" -#: src/elfcmp.c:479 +#: src/elfcmp.c:480 #, 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:520 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s diff: розділ [%zu] «%s», вміст" -#: src/elfcmp.c:523 +#: src/elfcmp.c:524 #, 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:539 #, 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:572 src/elfcmp.c:577 #, c-format msgid "cannot load data of '%s': %s" msgstr "не вдалося завантажити дані «%s»: %s" -#: src/elfcmp.c:595 src/elfcmp.c:601 +#: src/elfcmp.c:596 src/elfcmp.c:602 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "не вдалося отримати запис заголовка програми %d «%s»: %s" -#: src/elfcmp.c:607 +#: src/elfcmp.c:608 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s diff: заголовок програми %d" -#: src/elfcmp.c:631 +#: src/elfcmp.c:632 #, c-format msgid "%s %s differ: gap" msgstr "%s %s diff: проміжок" -#: src/elfcmp.c:694 +#: src/elfcmp.c:695 #, 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/elfcmp.c:723 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/strings.c:182 src/strip.c:451 src/strip.c:488 src/unstrip.c:1923 +#: src/unstrip.c:1952 #, c-format msgid "cannot open '%s'" msgstr "не вдалося відкрити «%s»" -#: src/elfcmp.c:726 src/findtextrel.c:228 src/ranlib.c:178 +#: src/elfcmp.c:727 src/findtextrel.c:228 src/ranlib.c:178 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "не вдалося створити дескриптор ELF для «%s»: %s" -#: src/elfcmp.c:731 +#: src/elfcmp.c:732 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "не вдалося створити дескриптор EBL для «%s»" -#: src/elfcmp.c:749 +#: src/elfcmp.c:750 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "не вдалося отримати заголовок розділу %zu: %s" -#: src/elfcmp.c:759 +#: src/elfcmp.c:760 #, c-format msgid "cannot get content of section %zu: %s" msgstr "не вдалося отримати вміст розділу %zu: %s" -#: src/elfcmp.c:769 src/elfcmp.c:783 +#: src/elfcmp.c:770 src/elfcmp.c:784 #, c-format msgid "cannot get relocation: %s" msgstr "не вдалося отримати пересування: %s" @@ -3136,40 +3141,45 @@ msgstr "у «%s» не виявлено пересувань тексту" msgid "while reading ELF file" msgstr "під час спроби читання файла 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 "не вдалося отримати заголовок програми: %s" + +#: src/findtextrel.c:340 src/findtextrel.c:357 +#, fuzzy, c-format +msgid "cannot get program header index at offset %zd: %s" msgstr "не вдалося отримати індекс заголовка програми за зміщенням %d: %s" -#: src/findtextrel.c:403 +#: src/findtextrel.c:409 #, c-format msgid "cannot get section header of section %Zu: %s" msgstr "не вдалося отримати заголовок розділу %Zu: %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:529 #, c-format msgid "%s not compiled with -fpic/-fPIC\n" msgstr "%s не зібрано з -fpic/-fPIC\n" -#: src/findtextrel.c:576 +#: src/findtextrel.c:582 #, 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:589 src/findtextrel.c:609 #, c-format msgid "" "the file containing the function '%s' might not be compiled with -fpic/-" @@ -3178,7 +3188,7 @@ msgstr "" "файл, що містить функцію «%s», ймовірно, не було зібрано з параметрами -" "fpic/-fPIC\n" -#: src/findtextrel.c:591 +#: src/findtextrel.c:597 #, c-format msgid "" "either the file containing the function '%s' or the file containing the " @@ -3187,7 +3197,7 @@ msgstr "" "файл, що містить функцію «%s», або файл, що містить функцію «%s», зібрано " "без параметрів -fpic/-fPIC\n" -#: src/findtextrel.c:611 +#: src/findtextrel.c:617 #, c-format msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" @@ -3611,7 +3621,7 @@ msgid "Warning: size of `%s' changed from %<PRIu64> in %s to %<PRIu64> in %s" msgstr "Попередження: розмір «%s» змінено з %<PRIu64> у %s на %<PRIu64> у %s" #: src/ldgeneric.c:651 src/ldgeneric.c:1112 src/readelf.c:527 -#: src/readelf.c:829 src/strip.c:563 +#: src/readelf.c:829 src/strip.c:568 #, c-format msgid "cannot determine number of sections: %s" msgstr "не вдалося визначити кількість розділів: %s" @@ -3853,7 +3863,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:1822 #, c-format msgid "cannot update ELF header: %s" msgstr "не вдалося оновити заголовок ELF: %s" @@ -4020,7 +4030,7 @@ msgid "%s: INTERNAL ERROR %d (%s-%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/strip.c:2160 #, c-format msgid "while closing '%s'" msgstr "під час закриття «%s»" @@ -4063,12 +4073,12 @@ msgstr "%s%s%s: не вдалося розпізнати формат файла msgid "cannot create search tree" msgstr "не вдалося створити дерево пошуку" -#: src/nm.c:757 src/nm.c:1163 src/objdump.c:787 src/readelf.c:536 +#: src/nm.c:757 src/nm.c:1163 src/objdump.c:793 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/readelf.c:1785 src/readelf.c:1975 src/readelf.c:2202 src/readelf.c:2460 +#: src/readelf.c:2536 src/readelf.c:2623 src/readelf.c:3201 src/readelf.c:3237 +#: src/readelf.c:3300 src/readelf.c:8187 src/readelf.c:9273 src/readelf.c:9420 +#: src/readelf.c:9488 src/size.c:417 src/size.c:486 src/strip.c:503 #, c-format msgid "cannot get section header string table index" msgstr "не вдалося визначити індекс заголовка розділу у таблиці рядків" @@ -4152,15 +4162,15 @@ msgstr "Не вказано дії.\n" msgid "while close `%s'" msgstr "під час закриття «%s»" -#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2069 +#: src/objdump.c:379 src/readelf.c:1880 src/readelf.c:2072 msgid "INVALID SYMBOL" msgstr "НЕКОРЕКТНИЙ СИМВОЛ" -#: src/objdump.c:394 src/readelf.c:1911 src/readelf.c:2102 +#: src/objdump.c:394 src/readelf.c:1914 src/readelf.c:2108 msgid "INVALID SECTION" msgstr "НЕКОРЕКТНИЙ РОЗДІЛ" -#: src/objdump.c:510 +#: src/objdump.c:514 #, c-format msgid "" "\n" @@ -4171,21 +4181,21 @@ msgstr "" "ЗАПИСИ ПЕРЕМІЩЕННЯ ДЛЯ [%s]:\n" "%-*s ТИП ЗНАЧЕННЯ\n" -#: src/objdump.c:513 +#: src/objdump.c:517 msgid "OFFSET" msgstr "ЗМІЩЕННЯ" -#: src/objdump.c:576 +#: src/objdump.c:582 #, c-format msgid "Contents of section %s:\n" msgstr "Вміст розділу %s:\n" -#: src/objdump.c:697 +#: src/objdump.c:703 #, c-format msgid "cannot disassemble" msgstr "не вдалося дизасемблювати" -#: src/objdump.c:736 +#: src/objdump.c:742 #, c-format msgid "cannot allocate memory" msgstr "не вдалося розподілити пам’ять" @@ -4340,11 +4350,11 @@ msgstr "не вдалося створити дескриптор Elf: %s" 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:554 src/readelf.c:1106 src/readelf.c:1277 src/readelf.c:9440 +#: src/unstrip.c:356 src/unstrip.c:387 src/unstrip.c:436 src/unstrip.c:544 +#: src/unstrip.c:561 src/unstrip.c:597 src/unstrip.c:795 src/unstrip.c:1063 +#: src/unstrip.c:1254 src/unstrip.c:1314 src/unstrip.c:1435 src/unstrip.c:1488 +#: src/unstrip.c:1595 src/unstrip.c:1784 #, c-format msgid "cannot get section header: %s" msgstr "не вдалося отримати заголовок розділу: %s" @@ -4354,8 +4364,8 @@ msgstr "не вдалося отримати заголовок розділу: 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:571 src/readelf.c:5398 src/readelf.c:7671 src/readelf.c:7773 +#: src/readelf.c:7939 #, c-format msgid "cannot get %s content: %s" msgstr "не вдалося отримати дані %s: %s" @@ -4657,7 +4667,7 @@ msgstr "" " Відображення розділів на сегмент:\n" " Розділи сегмента..." -#: src/readelf.c:1258 src/unstrip.c:1835 src/unstrip.c:1874 src/unstrip.c:1881 +#: src/readelf.c:1258 src/unstrip.c:1843 src/unstrip.c:1886 src/unstrip.c:1893 #, c-format msgid "cannot get program header: %s" msgstr "не вдалося отримати заголовок програми: %s" @@ -4706,8 +4716,8 @@ msgstr "<НЕКОРЕКТНИЙ СИМВОЛ>" msgid "<INVALID SECTION>" 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:1585 src/readelf.c:2208 src/readelf.c:2466 src/readelf.c:2542 +#: src/readelf.c:2846 src/readelf.c:2920 src/readelf.c:4610 #, fuzzy, c-format msgid "invalid sh_link value in section %Zu" msgstr "некоректний розділ .debug_line" @@ -4764,7 +4774,7 @@ msgstr "Runpath бібліотеки: [%s]\n" msgid "%<PRId64> (bytes)\n" msgstr "%<PRId64> (байт)\n" -#: src/readelf.c:1770 src/readelf.c:1957 +#: src/readelf.c:1770 src/readelf.c:1960 #, c-format msgid "" "\n" @@ -4773,7 +4783,7 @@ msgstr "" "\n" "Некоректна таблиця символів за зміщенням %#0<PRIx64>\n" -#: src/readelf.c:1788 src/readelf.c:1975 +#: src/readelf.c:1788 src/readelf.c:1978 #, c-format msgid "" "\n" @@ -4796,7 +4806,7 @@ msgstr[2] "" "Розділ пересування [%2zu] «%s» для розділу [%2u] «%s» за зміщенням " "%#0<PRIx64> містить %d записів:\n" -#: src/readelf.c:1803 src/readelf.c:1990 +#: src/readelf.c:1803 src/readelf.c:1993 #, c-format msgid "" "\n" @@ -4822,22 +4832,22 @@ msgstr " Зміщення Тип Значення На� 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:1868 src/readelf.c:1879 src/readelf.c:1892 src/readelf.c:1913 +#: src/readelf.c:1925 src/readelf.c:2059 src/readelf.c:2071 src/readelf.c:2085 +#: src/readelf.c:2107 src/readelf.c:2120 msgid "<INVALID RELOC>" msgstr "<НЕКОРЕКТНЕ ПЕРЕМІЩЕННЯ>" -#: src/readelf.c:2000 +#: src/readelf.c:2003 msgid " Offset Type Value Addend Name\n" msgstr " Зміщення Тип Значення Назва додатка\n" -#: src/readelf.c:2002 +#: src/readelf.c:2005 msgid " Offset Type Value Addend Name\n" msgstr "" " Зміщення Тип Значення Назва додатка\n" -#: src/readelf.c:2210 +#: src/readelf.c:2216 #, c-format msgid "" "\n" @@ -4855,7 +4865,7 @@ msgstr[2] "" "\n" "Таблиця символів [%2u] «%s» містить %u записів:\n" -#: src/readelf.c:2215 +#: src/readelf.c:2221 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" @@ -4863,33 +4873,33 @@ msgstr[0] " %lu лок. символ Таблиця символів: [%2u] « msgstr[1] " %lu лок. символи Таблиця символів: [%2u] «%s»\n" msgstr[2] " %lu лок. символів Таблиця символів: [%2u] «%s»\n" -#: src/readelf.c:2223 +#: src/readelf.c:2229 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " №№ Знач. Роз. Тип Зв’яз Вид. Інд Назва\n" -#: src/readelf.c:2225 +#: src/readelf.c:2231 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " №№ Знач. Роз. Тип Зв’яз Вид. Інд Назва\n" -#: src/readelf.c:2245 +#: src/readelf.c:2251 #, c-format msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2333 +#: src/readelf.c:2339 #, c-format msgid "bad dynamic symbol" msgstr "помилковий динамічний символ" -#: src/readelf.c:2415 +#: src/readelf.c:2421 msgid "none" msgstr "немає" -#: src/readelf.c:2432 +#: src/readelf.c:2438 msgid "| <unknown>" msgstr "| <невідомо>" -#: src/readelf.c:2463 +#: src/readelf.c:2469 #, c-format msgid "" "\n" @@ -4912,17 +4922,17 @@ msgstr[2] "" "Розділ потреби у версіях [%2u] «%s», що містить %d записів:\n" " Адр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2484 +#: src/readelf.c:2490 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Версія: %hu Файл: %s Кть: %hu\n" -#: src/readelf.c:2497 +#: src/readelf.c:2503 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Назва: %s Прап: %s Версія: %hu\n" -#: src/readelf.c:2534 +#: src/readelf.c:2546 #, c-format msgid "" "\n" @@ -4945,17 +4955,17 @@ msgstr[2] "" "Розділ визначення версії [%2u] «%s», що містить %d записів:\n" " Адр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2562 +#: src/readelf.c:2574 #, 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:2589 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: батьківський %d: %s\n" -#: src/readelf.c:2816 +#: src/readelf.c:2850 #, c-format msgid "" "\n" @@ -4978,15 +4988,15 @@ msgstr[2] "" "Розділ символів версій [%2u] «%s», що містить %d записів:\n" " Адр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> Посилання на розділ: [%2u] «%s»" -#: src/readelf.c:2844 +#: src/readelf.c:2878 msgid " 0 *local* " msgstr " 0 *локальний* " -#: src/readelf.c:2849 +#: src/readelf.c:2883 msgid " 1 *global* " msgstr " 1 *загальний* " -#: src/readelf.c:2890 +#: src/readelf.c:2925 #, c-format msgid "" "\n" @@ -5014,22 +5024,22 @@ msgstr[2] "" "блоками):\n" " Адр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2912 +#: src/readelf.c:2947 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Довжина Номер % від загал. Покриття\n" -#: src/readelf.c:2914 +#: src/readelf.c:2949 #, c-format msgid " 0 %6<PRIu32> %5.1f%%\n" msgstr " 0 %6<PRIu32> %5.1f%%\n" -#: src/readelf.c:2921 +#: src/readelf.c:2956 #, c-format msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n" -#: src/readelf.c:2934 +#: src/readelf.c:2969 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -5038,12 +5048,27 @@ msgstr "" " Середня кількість тестів: успішний пошук: %f\n" "\t\t\t неуспішний пошук: %f\n" -#: src/readelf.c:2952 src/readelf.c:2994 src/readelf.c:3035 +#: src/readelf.c:2987 src/readelf.c:3042 src/readelf.c:3098 #, c-format msgid "cannot get data for section %d: %s" msgstr "не вдалося отримати дані для розділу %d: %s" -#: src/readelf.c:3089 +#: src/readelf.c:2995 +#, fuzzy, c-format +msgid "invalid data in sysv.hash section %d" +msgstr "некоректні дані у розділі [%zu] «%s»" + +#: src/readelf.c:3050 +#, fuzzy, c-format +msgid "invalid data in sysv.hash64 section %d" +msgstr "некоректні дані у розділі [%zu] «%s»" + +#: src/readelf.c:3106 +#, fuzzy, c-format +msgid "invalid data in gnu.hash section %d" +msgstr "некоректні дані у розділі [%zu] «%s»" + +#: src/readelf.c:3173 #, c-format msgid "" " Symbol Bias: %u\n" @@ -5053,7 +5078,7 @@ msgstr "" " Розмір бітової маски: %zu байтів %<PRIuFAST32>%% встановлених бітів зсув " "2-го хешу: %u\n" -#: src/readelf.c:3164 +#: src/readelf.c:3248 #, c-format msgid "" "\n" @@ -5074,7 +5099,7 @@ msgstr[2] "" "Розділ списку бібліотек [%2zu] «%s» за зміщенням %#0<PRIx64> містить %d " "записів:\n" -#: src/readelf.c:3178 +#: src/readelf.c:3262 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -5082,7 +5107,7 @@ msgstr "" " Бібліотека Часовий штамп Версія суми " "Прапорці" -#: src/readelf.c:3228 +#: src/readelf.c:3312 #, c-format msgid "" "\n" @@ -5093,140 +5118,140 @@ msgstr "" "Розділ атрибутів об’єктів [%2zu] «%s» з %<PRIu64> байтів за зміщенням " "%#0<PRIx64>:\n" -#: src/readelf.c:3244 +#: src/readelf.c:3329 msgid " Owner Size\n" msgstr " Власник Розмір\n" -#: src/readelf.c:3270 +#: src/readelf.c:3358 #, c-format msgid " %-13s %4<PRIu32>\n" msgstr " %-13s %4<PRIu32>\n" -#: src/readelf.c:3302 +#: src/readelf.c:3397 #, c-format msgid " %-4u %12<PRIu32>\n" msgstr " %-4u %12<PRIu32>\n" -#: src/readelf.c:3307 +#: src/readelf.c:3402 #, c-format msgid " File: %11<PRIu32>\n" msgstr " Файл: %11<PRIu32>\n" -#: src/readelf.c:3342 +#: src/readelf.c:3451 #, c-format msgid " %s: %<PRId64>, %s\n" msgstr " %s: %<PRId64>, %s\n" -#: src/readelf.c:3345 +#: src/readelf.c:3454 #, c-format msgid " %s: %<PRId64>\n" msgstr " %s: %<PRId64>\n" -#: src/readelf.c:3348 +#: src/readelf.c:3457 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3355 +#: src/readelf.c:3467 #, c-format msgid " %u: %<PRId64>\n" msgstr " %u: %<PRId64>\n" -#: src/readelf.c:3358 +#: src/readelf.c:3470 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3403 +#: src/readelf.c:3515 #, c-format msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3406 +#: src/readelf.c:3518 #, c-format msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3411 +#: src/readelf.c:3523 #, c-format msgid "%#<PRIx64> <%s+%#<PRIx64>>" msgstr "%#<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3414 +#: src/readelf.c:3526 #, c-format msgid "%#0*<PRIx64> <%s+%#<PRIx64>>" msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>" -#: src/readelf.c:3420 +#: src/readelf.c:3532 #, c-format msgid "%s+%#<PRIx64> <%s>" msgstr "%s+%#<PRIx64> <%s>" -#: src/readelf.c:3423 +#: src/readelf.c:3535 #, c-format msgid "%s+%#0*<PRIx64> <%s>" msgstr "%s+%#0*<PRIx64> <%s>" -#: src/readelf.c:3427 +#: src/readelf.c:3539 #, c-format msgid "%#<PRIx64> <%s>" msgstr "%#<PRIx64> <%s>" -#: src/readelf.c:3430 +#: src/readelf.c:3542 #, c-format msgid "%#0*<PRIx64> <%s>" msgstr "%#0*<PRIx64> <%s>" -#: src/readelf.c:3435 +#: src/readelf.c:3547 #, c-format msgid "%s+%#<PRIx64>" msgstr "%s+%#<PRIx64>" -#: src/readelf.c:3438 +#: src/readelf.c:3550 #, c-format msgid "%s+%#0*<PRIx64>" msgstr "%s+%#0*<PRIx64>" -#: src/readelf.c:3820 +#: src/readelf.c:3932 msgid "empty block" msgstr "порожній блок" -#: src/readelf.c:3823 +#: src/readelf.c:3935 #, c-format msgid "%zu byte block:" msgstr "%zu-байтовий блок:" -#: src/readelf.c:4217 +#: src/readelf.c:4332 #, c-format msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n" msgstr "%*s[%4<PRIuMAX>] %s <ОБРІЗАНО>\n" -#: src/readelf.c:4274 +#: src/readelf.c:4389 #, c-format msgid "%s %#<PRIx64> used with different address sizes" msgstr "%s %#<PRIx64> використано з різними розмірами адрес" -#: src/readelf.c:4281 +#: src/readelf.c:4396 #, c-format msgid "%s %#<PRIx64> used with different offset sizes" msgstr "%s %#<PRIx64> використано з різними розмірами зміщень" -#: src/readelf.c:4288 +#: src/readelf.c:4403 #, c-format msgid "%s %#<PRIx64> used with different base addresses" msgstr "%s %#<PRIx64> використано з різними базовими адресами" -#: src/readelf.c:4370 +#: src/readelf.c:4492 #, c-format msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n" msgstr " [%6tx] <НЕВИКОРИСТОВУВАНІ ДАНІ У РЕШТІ РОЗДІЛУ>\n" -#: src/readelf.c:4378 +#: src/readelf.c:4500 #, c-format msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n" msgstr " [%6tx] <НЕВИКОРИСТОВУВАНІ ДАНІ> ... %<PRIu64> байтів ...\n" -#: src/readelf.c:4404 +#: src/readelf.c:4526 #, c-format msgid "" "\n" @@ -5237,7 +5262,7 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#<PRIx64>:\n" " [ Код]\n" -#: src/readelf.c:4412 +#: src/readelf.c:4534 #, c-format msgid "" "\n" @@ -5246,30 +5271,30 @@ msgstr "" "\n" "Розділ скорочень за зміщенням %<PRIu64>:\n" -#: src/readelf.c:4425 +#: src/readelf.c:4547 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** помилка під час читання скорочення: %s\n" -#: src/readelf.c:4441 +#: src/readelf.c:4563 #, c-format msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n" msgstr " [%5u] зміщення: %<PRId64>, дочірній: %s, мітка: %s\n" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "yes" msgstr "так" -#: src/readelf.c:4444 +#: src/readelf.c:4566 msgid "no" msgstr "ні" -#: src/readelf.c:4478 src/readelf.c:4551 +#: src/readelf.c:4600 src/readelf.c:4673 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "не вдалося отримати дані get .debug_aranges: %s" -#: src/readelf.c:4493 +#: src/readelf.c:4615 #, c-format msgid "" "\n" @@ -5287,12 +5312,12 @@ msgstr[2] "" "\n" "Розділ DWARF [%2zu] «%s» за зміщенням %#<PRIx64> містить %zu записів:\n" -#: src/readelf.c:4524 +#: src/readelf.c:4646 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4526 +#: src/readelf.c:4648 #, c-format msgid "" " [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n" @@ -5300,8 +5325,8 @@ msgstr "" " [%*zu] початок: %0#*<PRIx64>, довжина: %5<PRIu64>, зміщення CU DIE: " "%6<PRId64>\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:4678 src/readelf.c:4832 src/readelf.c:5408 src/readelf.c:6362 +#: src/readelf.c:6894 src/readelf.c:7014 src/readelf.c:7177 src/readelf.c:7602 #, c-format msgid "" "\n" @@ -5310,7 +5335,7 @@ msgstr "" "\n" "Розділ DWARF [%2zu] «%s» зі зміщенням %#<PRIx64>:\n" -#: src/readelf.c:4569 src/readelf.c:6171 +#: src/readelf.c:4691 src/readelf.c:6388 #, c-format msgid "" "\n" @@ -5319,12 +5344,12 @@ msgstr "" "\n" "Таблиця за зміщенням %Zu:\n" -#: src/readelf.c:4573 src/readelf.c:5255 src/readelf.c:6180 +#: src/readelf.c:4695 src/readelf.c:5432 src/readelf.c:6399 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "некоректні дані у розділі [%zu] «%s»" -#: src/readelf.c:4589 +#: src/readelf.c:4711 #, c-format msgid "" "\n" @@ -5333,32 +5358,32 @@ msgstr "" "\n" " Довжина: %6<PRIu64>\n" -#: src/readelf.c:4601 +#: src/readelf.c:4723 #, c-format msgid " DWARF version: %6<PRIuFAST16>\n" msgstr " версія DWARF: %6<PRIuFAST16>\n" -#: src/readelf.c:4605 +#: src/readelf.c:4727 #, c-format msgid "unsupported aranges version" msgstr "непідтримувана версія aranges" -#: src/readelf.c:4616 +#: src/readelf.c:4738 #, c-format msgid " CU offset: %6<PRIx64>\n" msgstr " зміщення CU: %6<PRIx64>\n" -#: src/readelf.c:4622 +#: src/readelf.c:4744 #, c-format msgid " Address size: %6<PRIu64>\n" msgstr " Розмір адреси: %6<PRIu64>\n" -#: src/readelf.c:4626 +#: src/readelf.c:4748 #, c-format msgid "unsupported address size" msgstr "непідтримуваний розмір адреси" -#: src/readelf.c:4631 +#: src/readelf.c:4753 #, c-format msgid "" " Segment size: %6<PRIu64>\n" @@ -5367,62 +5392,67 @@ msgstr "" " Розмір сегмента: %6<PRIu64>\n" "\n" -#: src/readelf.c:4635 +#: src/readelf.c:4757 #, c-format msgid "unsupported segment size" msgstr "непідтримуваний розмір сегмента" -#: src/readelf.c:4675 +#: src/readelf.c:4797 #, c-format msgid " %s..%s (%<PRIx64>)\n" msgstr " %s..%s (%<PRIx64>)\n" -#: src/readelf.c:4678 +#: src/readelf.c:4800 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:4687 +#: src/readelf.c:4809 #, c-format msgid " %Zu padding bytes\n" msgstr " %Zu байтів доповнення\n" -#: src/readelf.c:4705 +#: src/readelf.c:4827 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "не вдалося отримати дані .debug_ranges: %s" -#: src/readelf.c:4735 src/readelf.c:6673 +#: src/readelf.c:4857 src/readelf.c:6921 #, c-format msgid " [%6tx] <INVALID DATA>\n" msgstr " [%6tx] <НЕКОРЕКТНІ ДАНІ>\n" -#: src/readelf.c:4757 src/readelf.c:6695 +#: src/readelf.c:4879 src/readelf.c:6943 #, c-format msgid " [%6tx] base address %s\n" msgstr " [%6tx] базова адреса %s\n" -#: src/readelf.c:4764 src/readelf.c:6702 +#: src/readelf.c:4886 src/readelf.c:6950 #, c-format msgid " [%6tx] empty list\n" msgstr " [%6tx] порожній список\n" -#: src/readelf.c:4775 +#: src/readelf.c:4897 #, c-format msgid " [%6tx] %s..%s\n" msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:4777 +#: src/readelf.c:4899 #, c-format msgid " %s..%s\n" msgstr " %s..%s\n" -#: src/readelf.c:5210 +#: src/readelf.c:5078 +#, fuzzy +msgid " <INVALID DATA>\n" +msgstr " <НЕКОРЕКТНІ ДАНІ>\n" + +#: src/readelf.c:5387 #, c-format msgid "cannot get ELF: %s" msgstr "не вдалося отримати ELF: %s" -#: src/readelf.c:5227 +#: src/readelf.c:5404 #, c-format msgid "" "\n" @@ -5431,7 +5461,7 @@ msgstr "" "\n" "Розділ відомостей щодо вікна викликів [%2zu] «%s» за зміщенням %#<PRIx64>:\n" -#: src/readelf.c:5277 +#: src/readelf.c:5454 #, c-format msgid "" "\n" @@ -5440,50 +5470,50 @@ msgstr "" "\n" " [%6tx] нульовий переривач\n" -#: src/readelf.c:5362 +#: src/readelf.c:5547 src/readelf.c:5702 #, c-format msgid "invalid augmentation length" msgstr "некоректна довжина збільшення" -#: src/readelf.c:5374 +#: src/readelf.c:5562 msgid "FDE address encoding: " msgstr "Кодування адреси FDE: " -#: src/readelf.c:5380 +#: src/readelf.c:5568 msgid "LSDA pointer encoding: " msgstr "Кодування вказівника LSDA: " -#: src/readelf.c:5491 +#: src/readelf.c:5679 #, c-format msgid " (offset: %#<PRIx64>)" msgstr " (зміщення: %#<PRIx64>)" -#: src/readelf.c:5498 +#: src/readelf.c:5686 #, c-format msgid " (end offset: %#<PRIx64>)" msgstr " (зміщення від кінця: %#<PRIx64>)" -#: src/readelf.c:5525 +#: src/readelf.c:5723 #, c-format msgid " %-26sLSDA pointer: %#<PRIx64>\n" msgstr " %-26sвказівник LSDA: %#<PRIx64>\n" -#: src/readelf.c:5577 +#: src/readelf.c:5778 #, c-format msgid "cannot get attribute code: %s" msgstr "не вдалося отримати код атрибута: %s" -#: src/readelf.c:5586 +#: src/readelf.c:5787 #, c-format msgid "cannot get attribute form: %s" msgstr "не вдалося отримати форму атрибута: %s" -#: src/readelf.c:5601 +#: src/readelf.c:5802 #, c-format msgid "cannot get attribute value: %s" msgstr "не вдалося отримати значення атрибута: %s" -#: src/readelf.c:5894 +#: src/readelf.c:6101 #, c-format msgid "" "\n" @@ -5494,7 +5524,7 @@ msgstr "" "Розділ DWARF [%2zu] «%s» за зміщенням %#<PRIx64>:\n" " [Зміщення]\n" -#: src/readelf.c:5926 +#: src/readelf.c:6133 #, c-format msgid "" " Type unit at offset %<PRIu64>:\n" @@ -5507,7 +5537,7 @@ msgstr "" "Зміщення: %<PRIu8>\n" " Підпис типу: %#<PRIx64>, Зміщення типу: %#<PRIx64>\n" -#: src/readelf.c:5935 +#: src/readelf.c:6142 #, c-format msgid "" " Compilation unit at offset %<PRIu64>:\n" @@ -5518,33 +5548,33 @@ msgstr "" " Версія: %<PRIu16>, Зміщення розділу скорочень: %<PRIu64>, Адреса: %<PRIu8>, " "Зміщення: %<PRIu8>\n" -#: src/readelf.c:5960 +#: src/readelf.c:6167 #, c-format msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s" msgstr "не вдалося отримати DIE за зміщенням %<PRIu64> у розділі «%s»: %s" -#: src/readelf.c:5974 +#: src/readelf.c:6181 #, c-format msgid "cannot get DIE offset: %s" msgstr "не вдалося отримати зміщення DIE: %s" -#: src/readelf.c:5983 +#: src/readelf.c:6190 #, c-format msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s" msgstr "" "не вдалося отримати мітку DIE за зміщенням %<PRIu64> у розділі «%s»: %s" -#: src/readelf.c:6015 +#: src/readelf.c:6222 #, c-format msgid "cannot get next DIE: %s\n" msgstr "не вдалося визначити наступний DIE: %s\n" -#: src/readelf.c:6023 +#: src/readelf.c:6230 #, c-format msgid "cannot get next DIE: %s" msgstr "не вдалося визначити наступний DIE: %s" -#: src/readelf.c:6059 +#: src/readelf.c:6266 #, c-format msgid "" "\n" @@ -5555,12 +5585,12 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#<PRIx64>:\n" "\n" -#: src/readelf.c:6158 +#: src/readelf.c:6375 #, c-format msgid "cannot get line data section data: %s" msgstr "не вдалося отримати дані розділу лінійних даних: %s" -#: src/readelf.c:6226 +#: src/readelf.c:6445 #, c-format msgid "" "\n" @@ -5589,12 +5619,12 @@ msgstr "" "\n" "Коди операцій:\n" -#: src/readelf.c:6247 +#: src/readelf.c:6466 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "некоректні дані зі зміщенням %tu у розділі [%zu] «%s»" -#: src/readelf.c:6262 +#: src/readelf.c:6481 #, c-format msgid " [%*<PRIuFAST8>] %hhu argument\n" msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n" @@ -5602,7 +5632,7 @@ msgstr[0] " [%*<PRIuFAST8>] %hhu аргумент\n" msgstr[1] " [%*<PRIuFAST8>] %hhu аргументи\n" msgstr[2] " [%*<PRIuFAST8>] %hhu аргументів\n" -#: src/readelf.c:6270 +#: src/readelf.c:6489 msgid "" "\n" "Directory table:" @@ -5610,7 +5640,7 @@ msgstr "" "\n" "Таблиця каталогу:" -#: src/readelf.c:6286 +#: src/readelf.c:6505 msgid "" "\n" "File name table:\n" @@ -5620,7 +5650,7 @@ msgstr "" "Таблиця назв файлів:\n" " Запис Кат Час Розмір Назва" -#: src/readelf.c:6315 +#: src/readelf.c:6540 msgid "" "\n" "Line number statements:" @@ -5628,115 +5658,120 @@ msgstr "" "\n" "Оператори номерів рядків:" -#: src/readelf.c:6391 +#: src/readelf.c:6591 +#, fuzzy, c-format +msgid "invalid maximum operations per instruction is zero" +msgstr "некоректна мінімальна довжина розмірності рядка для порівняння" + +#: src/readelf.c:6627 #, 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:6632 #, 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:6652 #, c-format msgid " extended opcode %u: " msgstr " розширений код операції %u: " -#: src/readelf.c:6421 +#: src/readelf.c:6657 msgid " end of sequence" msgstr " кінець послідовності" -#: src/readelf.c:6438 +#: src/readelf.c:6676 #, c-format msgid " set address to %s\n" msgstr " встановити адресу у значення %s\n" -#: src/readelf.c:6459 +#: src/readelf.c:6703 #, c-format msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n" msgstr "" " визначення нового файла: dir=%u, mtime=%<PRIu64>, довжина=%<PRIu64>, назва=" "%s\n" -#: src/readelf.c:6472 +#: src/readelf.c:6716 #, c-format msgid " set discriminator to %u\n" msgstr " встановити розрізнення для %u\n" -#: src/readelf.c:6477 +#: src/readelf.c:6721 msgid " unknown opcode" msgstr " невідомий код операції" -#: src/readelf.c:6489 +#: src/readelf.c:6733 msgid " copy" msgstr " копія" -#: src/readelf.c:6500 +#: src/readelf.c:6744 #, 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:6748 #, c-format msgid " advance address by %u to %s\n" msgstr " збільшення адреси на %u до %s\n" -#: src/readelf.c:6515 +#: src/readelf.c:6759 #, c-format msgid " advance line by constant %d to %<PRId64>\n" msgstr " просувати рядок на сталу %d до %<PRId64>\n" -#: src/readelf.c:6523 +#: src/readelf.c:6767 #, c-format msgid " set file to %<PRIu64>\n" msgstr " встановити файл у %<PRIu64>\n" -#: src/readelf.c:6533 +#: src/readelf.c:6777 #, c-format msgid " set column to %<PRIu64>\n" msgstr " встановити значення стовпчика %<PRIu64>\n" -#: src/readelf.c:6540 +#: src/readelf.c:6784 #, c-format msgid " set '%s' to %<PRIuFAST8>\n" msgstr " встановити «%s» у %<PRIuFAST8>\n" -#: src/readelf.c:6546 +#: src/readelf.c:6790 msgid " set basic block flag" msgstr " встановити прапорець базового блоку" -#: src/readelf.c:6555 +#: src/readelf.c:6803 #, 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:6807 #, c-format msgid " advance address by constant %u to %s\n" msgstr " збільшити адресу на сталу величину %u до %s\n" -#: src/readelf.c:6577 +#: src/readelf.c:6825 #, c-format msgid " advance address by fixed value %u to %s\n" msgstr " збільшити адресу на фіксовану величину %u до %s\n" -#: src/readelf.c:6586 +#: src/readelf.c:6834 msgid " set prologue end flag" msgstr " встановити прапорець кінця вступу" -#: src/readelf.c:6591 +#: src/readelf.c:6839 msgid " set epilogue begin flag" msgstr " встановити прапорець початку епілогу" -#: src/readelf.c:6600 +#: src/readelf.c:6848 #, c-format msgid " set isa to %u\n" msgstr " встановити isa у %u\n" -#: src/readelf.c:6609 +#: src/readelf.c:6857 #, c-format msgid " unknown opcode with %<PRIu8> parameter:" msgid_plural " unknown opcode with %<PRIu8> parameters:" @@ -5744,97 +5779,102 @@ msgstr[0] " невідомий код операції з %<PRIu8> параме� msgstr[1] " невідомий код операції з %<PRIu8> параметрами:" msgstr[2] " невідомий код операції з %<PRIu8> параметрами:" -#: src/readelf.c:6641 +#: src/readelf.c:6889 #, c-format msgid "cannot get .debug_loc content: %s" msgstr "не вдалося отримати вміст .debug_loc: %s" -#: src/readelf.c:6716 +#: src/readelf.c:6964 #, c-format msgid " [%6tx] %s..%s" msgstr " [%6tx] %s..%s" -#: src/readelf.c:6718 +#: src/readelf.c:6966 #, c-format msgid " %s..%s" msgstr " %s..%s" -#: src/readelf.c:6725 +#: src/readelf.c:6973 src/readelf.c:7858 msgid " <INVALID DATA>\n" msgstr " <НЕКОРЕКТНІ ДАНІ>\n" -#: src/readelf.c:6777 src/readelf.c:6931 +#: src/readelf.c:7025 src/readelf.c:7186 #, c-format msgid "cannot get macro information section data: %s" msgstr "не вдалося отримати дані розділу відомостей щодо макросів: %s" -#: src/readelf.c:6856 +#: src/readelf.c:7104 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** незавершений рядок наприкінці розділу" -#: src/readelf.c:6972 +#: src/readelf.c:7127 +#, fuzzy, c-format +msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" +msgstr "%*s*** незавершений рядок наприкінці розділу" + +#: src/readelf.c:7227 #, c-format msgid " Offset: 0x%<PRIx64>\n" msgstr " Зміщення: 0x%<PRIx64>\n" -#: src/readelf.c:6984 +#: src/readelf.c:7239 #, c-format msgid " Version: %<PRIu16>\n" msgstr " Версія: %<PRIu16>\n" -#: src/readelf.c:6990 src/readelf.c:7703 +#: src/readelf.c:7245 src/readelf.c:7968 #, c-format msgid " unknown version, cannot parse section\n" msgstr " невідома версія, не вдалося обробити розділ\n" -#: src/readelf.c:6997 +#: src/readelf.c:7252 #, c-format msgid " Flag: 0x%<PRIx8>\n" msgstr " Прапорець: 0x%<PRIx8>\n" -#: src/readelf.c:7000 +#: src/readelf.c:7255 #, c-format msgid " Offset length: %<PRIu8>\n" msgstr " Довжина зміщення: %<PRIu8>\n" -#: src/readelf.c:7008 +#: src/readelf.c:7263 #, c-format msgid " .debug_line offset: 0x%<PRIx64>\n" msgstr " зміщення .debug_line: 0x%<PRIx64>\n" -#: src/readelf.c:7021 +#: src/readelf.c:7276 #, c-format msgid " extension opcode table, %<PRIu8> items:\n" msgstr " таблиця кодів операцій розширень, записів — %<PRIu8>:\n" -#: src/readelf.c:7028 +#: src/readelf.c:7283 #, c-format msgid " [%<PRIx8>]" msgstr " [%<PRIx8>]" -#: src/readelf.c:7040 +#: src/readelf.c:7295 #, c-format msgid " %<PRIu8> arguments:" msgstr " %<PRIu8> аргументів:" -#: src/readelf.c:7068 +#: src/readelf.c:7323 #, c-format msgid " no arguments." msgstr " немає аргументів." -#: src/readelf.c:7303 +#: src/readelf.c:7560 #, c-format msgid "vendor opcode not verified?" msgstr "код операції постачальника не перевірено?" -#: src/readelf.c:7331 +#: src/readelf.c:7588 #, c-format msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n" msgstr "" " [%5d] зміщення DIE: %6<PRId64>, зміщення CU DIE: %6<PRId64>, назва: %s\n" -#: src/readelf.c:7372 +#: src/readelf.c:7629 #, c-format msgid "" "\n" @@ -5845,12 +5885,12 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#<PRIx64>:\n" " %*s Рядок\n" -#: src/readelf.c:7386 +#: src/readelf.c:7643 #, c-format msgid " *** error while reading strings: %s\n" msgstr " *** помилка під час читання рядків: %s\n" -#: src/readelf.c:7406 +#: src/readelf.c:7663 #, c-format msgid "" "\n" @@ -5859,7 +5899,7 @@ msgstr "" "\n" "Розділ таблиці пошуку вікон виклику [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7508 +#: src/readelf.c:7765 #, c-format msgid "" "\n" @@ -5868,22 +5908,22 @@ msgstr "" "\n" "Розділ таблиці обробки виключень [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7531 +#: src/readelf.c:7788 #, c-format msgid " LPStart encoding: %#x " msgstr " Кодування LPStart: %#x " -#: src/readelf.c:7543 +#: src/readelf.c:7800 #, c-format msgid " TType encoding: %#x " msgstr " Кодування TType: %#x " -#: src/readelf.c:7557 +#: src/readelf.c:7815 #, c-format msgid " Call site encoding: %#x " msgstr " Кодування місця виклику:%#x " -#: src/readelf.c:7570 +#: src/readelf.c:7828 msgid "" "\n" " Call site table:" @@ -5891,7 +5931,7 @@ msgstr "" "\n" " Таблиця місця виклику:" -#: src/readelf.c:7584 +#: src/readelf.c:7842 #, c-format msgid "" " [%4u] Call site start: %#<PRIx64>\n" @@ -5904,12 +5944,12 @@ msgstr "" " Місце застосування: %#<PRIx64>\n" " Дія: %u\n" -#: src/readelf.c:7644 +#: src/readelf.c:7909 #, c-format msgid "invalid TType encoding" msgstr "некоректне кодування TType" -#: src/readelf.c:7665 +#: src/readelf.c:7930 #, c-format msgid "" "\n" @@ -5918,37 +5958,37 @@ msgstr "" "\n" "Розділ GDB [%2zu] «%s» за зміщенням %#<PRIx64> містить %<PRId64> байтів:\n" -#: src/readelf.c:7694 +#: src/readelf.c:7959 #, c-format msgid " Version: %<PRId32>\n" msgstr " Версія: %<PRId32>\n" -#: src/readelf.c:7712 +#: src/readelf.c:7977 #, c-format msgid " CU offset: %#<PRIx32>\n" msgstr " зміщення CU: %#<PRIx32>\n" -#: src/readelf.c:7719 +#: src/readelf.c:7984 #, c-format msgid " TU offset: %#<PRIx32>\n" msgstr " зміщення TU: %#<PRIx32>\n" -#: src/readelf.c:7726 +#: src/readelf.c:7991 #, c-format msgid " address offset: %#<PRIx32>\n" msgstr " зміщення адреси: %#<PRIx32>\n" -#: src/readelf.c:7733 +#: src/readelf.c:7998 #, c-format msgid " symbol offset: %#<PRIx32>\n" msgstr " зміщення символу: %#<PRIx32>\n" -#: src/readelf.c:7740 +#: src/readelf.c:8005 #, c-format msgid " constant offset: %#<PRIx32>\n" msgstr " стале зміщення: %#<PRIx32>\n" -#: src/readelf.c:7747 +#: src/readelf.c:8012 #, c-format msgid "" "\n" @@ -5957,7 +5997,7 @@ msgstr "" "\n" " Список CU зі зміщенням %#<PRIx32> містить %zu записів:\n" -#: src/readelf.c:7769 +#: src/readelf.c:8034 #, c-format msgid "" "\n" @@ -5966,7 +6006,7 @@ msgstr "" "\n" " Список TU зі зміщенням %#<PRIx32> містить %zu записів:\n" -#: src/readelf.c:7795 +#: src/readelf.c:8060 #, c-format msgid "" "\n" @@ -5975,7 +6015,7 @@ msgstr "" "\n" " Список адрес зі зміщенням %#<PRIx32> містить %zu записів:\n" -#: src/readelf.c:7824 +#: src/readelf.c:8089 #, c-format msgid "" "\n" @@ -5984,17 +6024,17 @@ msgstr "" "\n" " Таблиця символів за зміщенням %#<PRIx32> містить %zu позицій:\n" -#: src/readelf.c:7909 +#: src/readelf.c:8176 #, 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:8336 src/readelf.c:8942 src/readelf.c:9053 src/readelf.c:9111 #, c-format msgid "cannot convert core note data: %s" msgstr "не вдалося перетворити дані запису ядра: %s" -#: src/readelf.c:8416 +#: src/readelf.c:8683 #, c-format msgid "" "\n" @@ -6003,21 +6043,21 @@ msgstr "" "\n" "%*s... <повторюється %u разів> ..." -#: src/readelf.c:8919 +#: src/readelf.c:9190 msgid " Owner Data size Type\n" msgstr " Власник Розм. даних Тип\n" -#: src/readelf.c:8937 +#: src/readelf.c:9208 #, c-format msgid " %-13.*s %9<PRId32> %s\n" msgstr " %-13.*s %9<PRId32> %s\n" -#: src/readelf.c:8987 +#: src/readelf.c:9258 #, c-format msgid "cannot get content of note section: %s" msgstr "не вдалося отримати вміст розділу записів: %s" -#: src/readelf.c:9014 +#: src/readelf.c:9285 #, c-format msgid "" "\n" @@ -6027,7 +6067,7 @@ msgstr "" "Розділ записів (note) [%2zu] «%s» з %<PRIu64> байтів за зміщенням " "%#0<PRIx64>:\n" -#: src/readelf.c:9037 +#: src/readelf.c:9308 #, c-format msgid "" "\n" @@ -6036,7 +6076,7 @@ msgstr "" "\n" "Сегмент записів з %<PRIu64> байтів за зміщенням %#0<PRIx64>:\n" -#: src/readelf.c:9083 +#: src/readelf.c:9354 #, c-format msgid "" "\n" @@ -6045,12 +6085,12 @@ msgstr "" "\n" "У розділі [%Zu] «%s» не міститься даних для створення дампу.\n" -#: src/readelf.c:9089 src/readelf.c:9112 +#: src/readelf.c:9360 src/readelf.c:9383 #, c-format msgid "cannot get data for section [%Zu] '%s': %s" msgstr "не вдалося отримати дані для розділу [%Zu] «%s»: %s" -#: src/readelf.c:9093 +#: src/readelf.c:9364 #, c-format msgid "" "\n" @@ -6059,7 +6099,7 @@ msgstr "" "\n" "Шіст. дамп розділу [%Zu] «%s», %<PRIu64> байтів за зміщенням %#0<PRIx64>:\n" -#: src/readelf.c:9106 +#: src/readelf.c:9377 #, c-format msgid "" "\n" @@ -6068,7 +6108,7 @@ msgstr "" "\n" "У розділі [%Zu] «%s» не міститься рядків для створення дампу.\n" -#: src/readelf.c:9116 +#: src/readelf.c:9387 #, c-format msgid "" "\n" @@ -6077,7 +6117,7 @@ msgstr "" "\n" "Розділ рядків [%Zu] «%s» містить %<PRIu64> байтів за зміщенням %#0<PRIx64>:\n" -#: src/readelf.c:9164 +#: src/readelf.c:9435 #, c-format msgid "" "\n" @@ -6086,7 +6126,7 @@ msgstr "" "\n" "розділу [%lu] не існує" -#: src/readelf.c:9193 +#: src/readelf.c:9464 #, c-format msgid "" "\n" @@ -6095,12 +6135,12 @@ msgstr "" "\n" "розділу «%s» не існує" -#: src/readelf.c:9250 +#: src/readelf.c:9521 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "не вдалося отримати покажчик символів архіву «%s»: %s" -#: src/readelf.c:9253 +#: src/readelf.c:9524 #, c-format msgid "" "\n" @@ -6109,7 +6149,7 @@ msgstr "" "\n" "У архіві «%s» немає покажчика символів\n" -#: src/readelf.c:9257 +#: src/readelf.c:9528 #, c-format msgid "" "\n" @@ -6118,12 +6158,12 @@ msgstr "" "\n" "Покажчик архіву «%s» містить %Zu записів:\n" -#: src/readelf.c:9275 +#: src/readelf.c:9546 #, c-format msgid "cannot extract member at offset %Zu in '%s': %s" msgstr "не вдалося видобути елемент за зміщенням %Zu у «%s»: %s" -#: src/readelf.c:9280 +#: src/readelf.c:9551 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Елемент архіву «%s» містить:\n" @@ -6189,12 +6229,12 @@ msgstr "Некоректна основа числення: %s" msgid "%s: file format not recognized" msgstr "%s: не вдалося розпізнати формат файла" -#: src/size.c:438 src/size.c:571 +#: src/size.c:437 src/size.c:570 #, c-format msgid " (ex %s)" msgstr " (прикл. %s)" -#: src/size.c:596 +#: src/size.c:595 msgid "(TOTALS)\n" msgstr "(ЗАГАЛОМ)\n" @@ -6361,82 +6401,87 @@ msgstr "" msgid "cannot open EBL backend" msgstr "не вдалося відкрити канал сервера EBL" -#: src/strip.c:518 src/strip.c:542 +#: src/strip.c:508 +#, fuzzy, c-format +msgid "cannot get number of phdrs" +msgstr "не вдалося визначити кількість заголовків програми: %s" + +#: src/strip.c:523 src/strip.c:547 #, c-format msgid "cannot create new file '%s': %s" msgstr "не вдалося створити файл «%s»: %s" -#: src/strip.c:608 +#: src/strip.c:613 #, c-format msgid "illformed file '%s'" msgstr "помилкове форматування файла «%s»" -#: src/strip.c:930 src/strip.c:1019 +#: src/strip.c:935 src/strip.c:1024 #, c-format msgid "while generating output file: %s" msgstr "під час спроби створення файла з виведеними даними: %s" -#: src/strip.c:992 src/strip.c:1957 +#: src/strip.c:997 src/strip.c:1962 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: помилка під час створення заголовка ELF: %s" -#: src/strip.c:1006 +#: src/strip.c:1011 #, c-format msgid "while preparing output for '%s'" msgstr "під час приготування виведених даних для «%s»" -#: src/strip.c:1057 src/strip.c:1114 +#: src/strip.c:1062 src/strip.c:1119 #, c-format msgid "while create section header section: %s" msgstr "під час створення розділу заголовка розділу: %s" -#: src/strip.c:1063 +#: src/strip.c:1068 #, c-format msgid "cannot allocate section data: %s" msgstr "не вдалося розмістити дані розділу: %s" -#: src/strip.c:1123 +#: src/strip.c:1128 #, c-format msgid "while create section header string table: %s" msgstr "під час створення таблиці рядків заголовка розділу: %s" -#: src/strip.c:1752 +#: src/strip.c:1757 #, c-format msgid "bad relocation" msgstr "помилкове пересування" -#: src/strip.c:1869 src/strip.c:1979 +#: src/strip.c:1874 src/strip.c:1984 #, c-format msgid "while writing '%s': %s" msgstr "під час запису «%s»: %s" -#: src/strip.c:1880 +#: src/strip.c:1885 #, c-format msgid "while creating '%s'" msgstr "під час спроби створення «%s»" -#: src/strip.c:1902 +#: src/strip.c:1907 #, c-format msgid "while computing checksum for debug information" msgstr "під час обчислення контрольної суми для діагностичних даних" -#: src/strip.c:1965 +#: src/strip.c:1970 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: помилка під час читання файла: %s" -#: src/strip.c:2004 src/strip.c:2024 +#: src/strip.c:2009 src/strip.c:2029 #, c-format msgid "while writing '%s'" msgstr "під час спроби запису «%s»" -#: src/strip.c:2061 src/strip.c:2068 +#: src/strip.c:2066 src/strip.c:2073 #, c-format msgid "error while finishing '%s': %s" msgstr "помилка під час завершення «%s»: %s" -#: src/strip.c:2091 src/strip.c:2148 +#: src/strip.c:2096 src/strip.c:2153 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "не вдалося встановити права доступу та дату зміни «%s»" @@ -6527,163 +6572,168 @@ msgstr "не вдалося створити заголовок ELF: %s" msgid "cannot copy ELF header: %s" msgstr "не вдалося скопіювати заголовок ELF: %s" -#: src/unstrip.c:263 src/unstrip.c:1828 +#: src/unstrip.c:262 src/unstrip.c:1832 src/unstrip.c:1876 +#, fuzzy, c-format +msgid "cannot get number of program headers: %s" +msgstr "не вдалося визначити кількість заголовків програми: %s" + +#: src/unstrip.c:267 src/unstrip.c:1836 #, c-format msgid "cannot create program headers: %s" msgstr "не вдалося створити заголовки програми: %s" -#: src/unstrip.c:269 +#: src/unstrip.c:273 #, c-format msgid "cannot copy program header: %s" msgstr "не вдалося скопіювати заголовок програми: %s" -#: src/unstrip.c:279 +#: src/unstrip.c:283 #, c-format msgid "cannot copy section header: %s" msgstr "не вдалося скопіювати заголовок розділу: %s" -#: src/unstrip.c:282 src/unstrip.c:1509 +#: src/unstrip.c:286 src/unstrip.c:1513 #, c-format msgid "cannot get section data: %s" msgstr "не вдалося отримати дані розділу: %s" -#: src/unstrip.c:284 src/unstrip.c:1511 +#: src/unstrip.c:288 src/unstrip.c:1515 #, c-format msgid "cannot copy section data: %s" msgstr "не вдалося скопіювати дані розділу: %s" -#: src/unstrip.c:308 +#: src/unstrip.c:312 #, c-format msgid "cannot create directory '%s'" msgstr "не вдалося створити каталог «%s»" -#: src/unstrip.c:348 src/unstrip.c:765 src/unstrip.c:1543 +#: src/unstrip.c:352 src/unstrip.c:769 src/unstrip.c:1547 #, 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:368 src/unstrip.c:586 src/unstrip.c:607 src/unstrip.c:619 +#: src/unstrip.c:1568 src/unstrip.c:1698 src/unstrip.c:1722 #, c-format msgid "cannot update symbol table: %s" msgstr "не вдалося оновити таблицю символів: %s" -#: src/unstrip.c:374 +#: src/unstrip.c:378 #, c-format msgid "cannot update section header: %s" msgstr "не вдалося оновити заголовок розділу: %s" -#: src/unstrip.c:413 src/unstrip.c:424 +#: src/unstrip.c:417 src/unstrip.c:428 #, c-format msgid "cannot update relocation: %s" msgstr "не вдалося оновити пересування: %s" -#: src/unstrip.c:511 +#: src/unstrip.c:515 #, c-format msgid "cannot get symbol version: %s" msgstr "не вдалося отримати версію символу: %s" -#: src/unstrip.c:523 +#: src/unstrip.c:527 #, c-format msgid "unexpected section type in [%Zu] with sh_link to symtab" msgstr "неочікуваний тип розділу у [%Zu] з посиланням sh_link на symtab" -#: src/unstrip.c:771 +#: src/unstrip.c:775 #, c-format msgid "invalid string offset in symbol [%Zu]" msgstr "некоректне зміщення рядка у символі [%Zu]" -#: src/unstrip.c:913 src/unstrip.c:1254 +#: src/unstrip.c:917 src/unstrip.c:1258 #, c-format 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:958 src/unstrip.c:977 src/unstrip.c:1010 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "не вдалося прочитати розділ «.gnu.prelink_undo»: %s" -#: src/unstrip.c:994 +#: src/unstrip.c:998 #, c-format msgid "invalid contents in '%s' section" msgstr "некоректний вміст розділу «%s»" -#: src/unstrip.c:1049 src/unstrip.c:1374 +#: src/unstrip.c:1053 src/unstrip.c:1378 #, 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:1178 src/unstrip.c:1193 src/unstrip.c:1459 #, c-format msgid "cannot add section name to string table: %s" msgstr "не вдалося додати назву розділу до таблиці рядків: %s" -#: src/unstrip.c:1198 +#: src/unstrip.c:1202 #, c-format msgid "cannot update section header string table data: %s" msgstr "не вдалося оновити дані заголовка розділу у таблиці рядків: %s" -#: src/unstrip.c:1225 src/unstrip.c:1229 +#: src/unstrip.c:1229 src/unstrip.c:1233 #, 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:1237 src/unstrip.c:1241 src/unstrip.c:1474 #, c-format msgid "cannot get section count: %s" msgstr "не вдалося отримати кількість розділів: %s" -#: src/unstrip.c:1240 +#: src/unstrip.c:1244 #, 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:1303 src/unstrip.c:1393 #, c-format msgid "cannot read section header string table: %s" msgstr "не вдалося прочитати таблицю рядків заголовка розділу: %s" -#: src/unstrip.c:1449 +#: src/unstrip.c:1453 #, c-format msgid "cannot add new section: %s" msgstr "не вдалося додати новий розділ: %s" -#: src/unstrip.c:1551 +#: src/unstrip.c:1555 #, c-format msgid "symbol [%Zu] has invalid section index" msgstr "символ [%Zu] має некоректний індекс розділу" -#: src/unstrip.c:1789 +#: src/unstrip.c:1793 #, c-format msgid "cannot read section data: %s" msgstr "не вдалося прочитати дані розділу: %s" -#: src/unstrip.c:1810 +#: src/unstrip.c:1814 #, c-format msgid "cannot get ELF header: %s" msgstr "не вдалося отримати заголовок ELF: %s" -#: src/unstrip.c:1838 +#: src/unstrip.c:1846 #, c-format msgid "cannot update program header: %s" msgstr "не вдалося оновити заголовок програми: %s" -#: src/unstrip.c:1843 src/unstrip.c:1922 +#: src/unstrip.c:1851 src/unstrip.c:1934 #, c-format msgid "cannot write output file: %s" msgstr "не вдалося записати файл виведених даних: %s" -#: src/unstrip.c:1891 +#: src/unstrip.c:1903 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" "Дані DWARF не скориговано відповідно до відхилення перед компонуванням; " "спробуйте виправити це командою prelink -u" -#: src/unstrip.c:1894 +#: src/unstrip.c:1906 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6691,76 +6741,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:1925 src/unstrip.c:1976 src/unstrip.c:1988 src/unstrip.c:2074 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "не вдалося створити дескриптор ELF: %s" -#: src/unstrip.c:1955 +#: src/unstrip.c:1967 msgid "WARNING: " msgstr "" -#: src/unstrip.c:1957 +#: src/unstrip.c:1969 msgid ", use --force" msgstr "" -#: src/unstrip.c:1980 +#: src/unstrip.c:1992 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:1983 +#: src/unstrip.c:1995 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:1986 +#: src/unstrip.c:1998 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:1989 +#: src/unstrip.c:2001 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2019 +#: src/unstrip.c:2031 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "не вдалося знайти очищений файл для модуля «%s»: %s" -#: src/unstrip.c:2023 +#: src/unstrip.c:2035 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "не вдалося відкрити очищений файл «%s» для модуля «%s»: %s" -#: src/unstrip.c:2038 +#: src/unstrip.c:2050 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "не вдалося знайти файл діагностичних даних для модуля «%s»: %s" -#: src/unstrip.c:2042 +#: src/unstrip.c:2054 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "не вдалося відкрити файл діагностичних даних «%s» для модуля «%s»: %s" -#: src/unstrip.c:2055 +#: src/unstrip.c:2067 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "у модулі «%s» файл «%s» не очищено strip" -#: src/unstrip.c:2086 +#: src/unstrip.c:2098 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "не вдалося кешувати адреси розділів для модуля «%s»: %s" -#: src/unstrip.c:2219 +#: src/unstrip.c:2231 #, c-format msgid "no matching modules found" msgstr "відповідних модулів не виявлено" -#: src/unstrip.c:2228 +#: src/unstrip.c:2240 #, c-format msgid "matched more than one module" msgstr "встановлено відповідність декількох модулів" -#: src/unstrip.c:2275 +#: src/unstrip.c:2287 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6768,7 +6818,7 @@ msgstr "" "ОЧИЩЕНИЙ-ФАЙЛ ФАЙЛ-DEBUG\n" "[МОДУЛЬ...]" -#: src/unstrip.c:2276 +#: src/unstrip.c:2288 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" diff --git a/src/ChangeLog b/src/ChangeLog index 2c065d17..1162f6e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,219 @@ +2014-12-18 Ulrich Drepper <[email protected]> + + * Makefile.am: Suppress output of textrel_check command. + +2014-12-17 Mark Wielaard <[email protected]> + + * readelf.c (print_cfa_program): Add bounds check before each op that + takes at least one argument. + +2014-12-16 Mark Wielaard <[email protected]> + + * readelf.c (print_decoded_line_section): Print dwarf_errmsg if + dwarf_onesrcline or dwarf_linesrc fails. + +2014-12-16 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * readelf.c (print_gdb_index_section): Add more bounds checks. + +2014-12-15 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * elfcmp.c (compare_Elf32_Word): Make sure (unsigned) Elf32_Word + difference doesn't wrap around before returning as int. + +2014-12-11 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_exception_table): Check TType base offset + and Action table are sane. + +2014-12-11 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_frame_section): Check number of augmentation + chars to print. + +2014-12-09 Mark Wielaard <[email protected]> + + * readelf.c (handle_file_note): Check count fits data section and + doesn't overflow fptr. + +2014-12-08 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_exception_table): Report invalid data if + action table doesn't immediately follow call site table. + +2014-12-10 Josh Stone <[email protected]> + + * 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 <[email protected]> + + * addr2line.c (handle_address): Find the proper inline parents. + +2014-12-07 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_line_section): max_ops_per_instr cannot + be zero. + +2014-12-07 Mark Wielaard <[email protected]> + + * readelf.c (print_ops): Handle zero ref_size for DW_OP_call_ref + and DW_OP_GNU_implicit_pointer. + +2014-12-04 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * readelf.c (handle_sysv_hash64): Fix overflow check. + +2014-11-28 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * readelf.c (print_debug_aranges_section): Cast Dwarf_Word length + to ptrdiff_t for comparison. + +2014-11-24 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_line_section): Check line_range is not zero + before usage. + +2014-11-23 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_aranges_section): Check length to catch + nexthdr overflow. + +2014-11-21 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * readelf.c (print_cfa_program): Fix sanity check of DW_FORM_block + length. + +2014-11-17 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * readelf.c (print_cfa_program): Check block len before calling + print_ops. + +2014-11-14 Mark Wielaard <[email protected]> + + * readelf.c (print_debug_frame_section): Sanity Check CIE + unit_length and augmentationlen. + +2014-11-14 Mark Wielaard <[email protected]> + + * readelf.c (handle_versym): Check def == NULL before use. + +2014-11-08 Mark Wielaard <[email protected]> + + * readelf.c (handle_versym): Initialize vername and filename array + elements. + +2014-11-07 Mark Wielaard <[email protected]> + + * readelf.c (handle_sysv_hash): Sanity check section contents. + (handle_sysv_hash64): Likewise. + (handle_gnu_hash): Likewise. + +2014-09-14 Petr Machata <[email protected]> + + * readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly. + +2014-09-12 Petr Machata <[email protected]> + + * 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 <[email protected]> * Makefile.am: Prevent premature @AR@ replacement in a sed expression. diff --git a/src/Makefile.am b/src/Makefile.am index 835db6c3..e84c7a59 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -132,7 +132,7 @@ libld_elf_i386.so: libld_elf_i386_pic.a libld_elf_i386.map $(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. diff --git a/src/addr2line.c b/src/addr2line.c index 2a0e408b..e982982d 100644 --- a/src/addr2line.c +++ b/src/addr2line.c @@ -258,6 +258,23 @@ parse_opt (int key, char *arg, struct argp_state *state) } +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) { @@ -274,7 +291,7 @@ print_dwarf_function (Dwfl_Module *mod, Dwarf_Addr addr) { 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); @@ -283,7 +300,7 @@ print_dwarf_function (Dwfl_Module *mod, Dwarf_Addr addr) 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); @@ -395,23 +412,6 @@ print_addrsym (Dwfl_Module *mod, GElf_Addr addr) } } -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)), @@ -672,7 +672,23 @@ handle_address (const char *string, Dwfl *dwfl) continue; 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) + { + puts (get_diename (parent)); + break; + } + } + } src = NULL; lineno = 0; diff --git a/src/elfcmp.c b/src/elfcmp.c index 2d85f0b2..d1008b3c 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 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2005. @@ -355,7 +355,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) @@ -810,8 +811,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/elflint.c b/src/elflint.c index d6a47748..7e732531 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -3266,7 +3266,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) { @@ -3321,13 +3321,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 ("\ @@ -3532,7 +3532,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. diff --git a/src/findtextrel.c b/src/findtextrel.c index 9913b82c..d7de202b 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 <[email protected]>, 2005. @@ -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; diff --git a/src/objdump.c b/src/objdump.c index ebad25d5..87290ccb 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 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2005. @@ -389,7 +389,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 +418,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 +439,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 +462,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 +508,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 +526,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/readelf.c b/src/readelf.c index 0787e862..772cfcaa 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -1157,7 +1157,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; @@ -1894,12 +1894,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 +1924,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) buf, sizeof (buf)) + 2 : gettext ("<INVALID RELOC>"), 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 +2088,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 +2120,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) : gettext ("<INVALID RELOC>"), 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)); } } } @@ -2500,10 +2506,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; } } @@ -2578,10 +2590,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 +2677,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 +2723,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 +2739,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 +2767,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 +2820,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; } } @@ -2853,10 +2887,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; @@ -2954,8 +2989,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 +3044,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]; @@ -3037,18 +3100,37 @@ 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: + 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]; + /* 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; + uint32_t *lengths = (uint32_t *) xcalloc (nbucket, sizeof (uint32_t)); Elf32_Word *bitmask = &((Elf32_Word *) data->d_buf)[4]; @@ -3068,6 +3150,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); } @@ -3233,11 +3317,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 +3333,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 +3346,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 +3381,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 +3393,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 +3405,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 +3459,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); @@ -3869,11 +3981,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 +3998,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 +4112,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 +4122,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 +4138,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 +4147,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 +4189,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 +4202,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 +4225,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 +4240,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 +4259,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 +4275,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 +4294,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", @@ -4313,7 +4428,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) @@ -4339,8 +4455,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 @@ -4594,7 +4716,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) @@ -4854,54 +4976,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; @@ -4912,86 +5050,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 (" <INVALID DATA>\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); @@ -5000,8 +5175,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: @@ -5014,8 +5190,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); } @@ -5031,15 +5208,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; } @@ -5152,12 +5331,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) @@ -5283,6 +5460,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; @@ -5326,21 +5507,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" @@ -5361,14 +5545,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 = ""; @@ -5460,9 +5648,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 @@ -5510,14 +5698,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') { @@ -5547,9 +5745,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; } } @@ -5698,23 +5899,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 ? "" : " <WARNING offset too big>"); + } 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 ? "" : " <WARNING offset too big>"); + } return DWARF_CB_OK; case DW_AT_language: @@ -6092,9 +6299,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); @@ -6175,6 +6392,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, 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)) @@ -6191,8 +6410,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; @@ -6301,15 +6520,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); @@ -6365,6 +6590,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; @@ -6378,6 +6611,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 @@ -6434,6 +6670,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 @@ -6455,11 +6693,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"), @@ -6473,7 +6717,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; @@ -6497,7 +6741,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); @@ -6515,7 +6759,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"), @@ -6524,7 +6768,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; @@ -6534,7 +6778,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; @@ -6553,6 +6797,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); @@ -6601,7 +6849,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; } @@ -6617,7 +6865,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); @@ -6853,7 +7101,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)) @@ -6878,8 +7126,15 @@ 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; @@ -7090,8 +7345,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 = "???"; @@ -7123,7 +7380,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; @@ -7133,7 +7390,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; @@ -7143,7 +7400,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) @@ -7155,7 +7412,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) @@ -7225,17 +7482,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; @@ -7551,9 +7808,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)) @@ -7562,7 +7820,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)) @@ -7584,7 +7842,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" @@ -7592,13 +7850,20 @@ 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:"); + if ((size_t) (dataend - action_table) < max_action + 1) + { + fputs (gettext (" <INVALID DATA>\n"), stdout); + return; + } + const unsigned char *const action_table_end = action_table + max_action + 1; @@ -7606,11 +7871,11 @@ 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); + get_sleb128 (ar_disp, readp, action_table_end); printf (" [%4u] ar_filter: % d\n" " ar_disp: % -5d", @@ -7626,7 +7891,7 @@ 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) { puts ("\n TType table:"); @@ -7842,21 +8107,23 @@ 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)) + if (unlikely (sym > dataend + || 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)) + if (unlikely (readcus + 4 > dataend)) 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; @@ -8860,9 +9127,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); @@ -427,10 +427,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 +600,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/strip.c b/src/strip.c index ebe18a92..1b34eeea 100644 --- a/src/strip.c +++ b/src/strip.c @@ -518,6 +518,11 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, 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) + 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 dropped. */ @@ -529,7 +534,7 @@ 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)); @@ -538,7 +543,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); @@ -553,7 +558,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)); @@ -562,7 +567,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); diff --git a/src/unstrip.c b/src/unstrip.c index f6af4500..989ac5ff 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -241,7 +241,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 +257,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")); @@ -1823,12 +1827,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); @@ -1863,11 +1871,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); diff --git a/tests/ChangeLog b/tests/ChangeLog index 1f01f2d3..5865940d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,103 @@ +2014-12-18 Mark Wielaard <[email protected]> + + * Makefile.am (EXTRA_DIST): Add testfile-macros-0xff.bz2. + +2014-12-12 Mark Wielaard <[email protected]> + + * Makefile.am (deleted_lib_so_CFLAGS): Add + -fasynchronous-unwind-tables. + +2014-12-11 Josh Stone <[email protected]> + + * 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 <[email protected]> + + * run-addr2line-i-test.sh: Test 0x5f0 to make sure linkage_name is + preferred over the plain die name. + +2014-12-02 Petr Machata <[email protected]> + + * 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 <[email protected]> + + * vdsosyms.c (main): Call dwfl_linux_proc_attach. + +2014-11-21 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + * vdsosyms.c: New test. + * Makefile.am (check_PROGRAMS): Add vdsosyms. + (TESTS): Likewise. + (vdsosyms_LDADD): New variable. + +2014-09-10 Petr Machata <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + * run-deleted.sh: Unset VALGRIND_CMD before running deleted. + +2014-10-02 Mark Wielaard <[email protected]> + + * 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 <[email protected]> + + 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 <[email protected]> + + * 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 <[email protected]> * backtrace.c (frame_callback): Error on seeing more than 16 frames. diff --git a/tests/Makefile.am b/tests/Makefile.am index 71039a84..b6f47125 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -50,7 +50,7 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \ 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 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ asm-tst6 asm-tst7 asm-tst8 asm-tst9 @@ -101,7 +101,8 @@ 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-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 \ @@ -109,7 +110,8 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ run-backtrace-core-aarch64.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-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \ + run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh if !BIARCH export ELFUTILS_DISABLE_BIARCH = 1 @@ -187,6 +189,7 @@ 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 \ @@ -242,6 +245,7 @@ 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 \ testfileppc32.bz2 testfileppc64.bz2 \ testfiles390.bz2 testfiles390x.bz2 \ testfilearm.bz2 testfileaarch64.bz2 \ @@ -271,7 +275,12 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile-backtrace-demangle.core.bz2 \ run-stack-d-test.sh run-stack-i-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-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 if USE_VALGRIND valgrind_cmd='valgrind -q --error-exitcode=1 --run-libc-freeres=no' @@ -407,6 +416,11 @@ 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) +vdsosyms_LDADD = $(libdw) $(libelf) if GCOV check: check-am coverage diff --git a/tests/aggregate_size.c b/tests/aggregate_size.c new file mode 100644 index 00000000..930eafa7 --- /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 <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <assert.h> +#include <argp.h> +#include <inttypes.h> +#include <fcntl.h> +#include ELFUTILS_HEADER(dw) +#include ELFUTILS_HEADER(dwfl) +#include <stdio.h> +#include <unistd.h> +#include <dwarf.h> + +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/deleted-lib.c b/tests/deleted-lib.c new file mode 100644 index 00000000..1ff411b7 --- /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 <http://www.gnu.org/licenses/>. */ + +#include <config.h> +#include <unistd.h> + +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 00000000..32a310b6 --- /dev/null +++ b/tests/deleted.c @@ -0,0 +1,50 @@ +/* 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 <http://www.gnu.org/licenses/>. */ + +#include <config.h> +#include <locale.h> +#include <stdlib.h> +#include <unistd.h> +#include <assert.h> +#include <stdio.h> +#include <error.h> +#include <errno.h> + +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); + libfunc (); + abort (); + } + printf ("%d\n", pid); + return EXIT_SUCCESS; +} diff --git a/tests/dwarf-getmacros.c b/tests/dwarf-getmacros.c index 7972edc9..92e093ca 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 <stdio.h> #include <stdint.h> #include <stdlib.h> +#include <assert.h> +#include <inttypes.h> + +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/linkmap-cut-lib.so.bz2 b/tests/linkmap-cut-lib.so.bz2 Binary files differnew file mode 100644 index 00000000..a1bda5c0 --- /dev/null +++ b/tests/linkmap-cut-lib.so.bz2 diff --git a/tests/linkmap-cut.bz2 b/tests/linkmap-cut.bz2 Binary files differnew file mode 100644 index 00000000..f2ccd7ca --- /dev/null +++ b/tests/linkmap-cut.bz2 diff --git a/tests/linkmap-cut.core.bz2 b/tests/linkmap-cut.core.bz2 Binary files differnew file mode 100644 index 00000000..b55b2f21 --- /dev/null +++ b/tests/linkmap-cut.core.bz2 diff --git a/tests/run-addr2line-i-lex-test.sh b/tests/run-addr2line-i-lex-test.sh new file mode 100755 index 00000000..c391fd99 --- /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 <http://www.gnu.org/licenses/>. + +. $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 e98adda3..183916c7 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,6 +132,8 @@ 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 diff --git a/tests/run-aggregate-size.sh b/tests/run-aggregate-size.sh new file mode 100755 index 00000000..42b0742b --- /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 <http://www.gnu.org/licenses/>. + +. $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-deleted.sh b/tests/run-deleted.sh new file mode 100755 index 00000000..8c4d928e --- /dev/null +++ b/tests/run-deleted.sh @@ -0,0 +1,41 @@ +#! /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 <http://www.gnu.org/licenses/>. + +. $srcdir/test-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 + +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 >bt || true +cat bt +kill -9 $pid +wait +grep -qw libfunc bt +grep -qw main bt diff --git a/tests/run-dwarf-getmacros.sh b/tests/run-dwarf-getmacros.sh index ddb58e83..0a488fa3 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-linkmap-cut.sh b/tests/run-linkmap-cut.sh new file mode 100755 index 00000000..de2bc7cc --- /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 <http://www.gnu.org/licenses/>. + +. $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 00000000..6ca9be89 --- /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 <http://www.gnu.org/licenses/>. + +. $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-unstrip-n.sh b/tests/run-unstrip-n.sh index 12c38229..37cbd607 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 - <<EOF 0x400000+0x202038 - test-core.exec - test-core.exec -0x7f67f2aaf000+0x202000 - . - test-core-lib.so +0x7f67f2aaf000+0x202000 - . - /home/jkratoch/redhat/elfutils-libregr/test-core-lib.so 0x7fff1596c000+0x1000 a9cf37f53897b5468ee018655760be61b8633d3c@0x7fff1596c340 . - linux-vdso.so.1 EOF diff --git a/tests/testfile-lex-inlines.bz2 b/tests/testfile-lex-inlines.bz2 Binary files differnew file mode 100755 index 00000000..716e7927 --- /dev/null +++ b/tests/testfile-lex-inlines.bz2 diff --git a/tests/testfile-macros-0xff.bz2 b/tests/testfile-macros-0xff.bz2 Binary files differnew file mode 100755 index 00000000..a19662a3 --- /dev/null +++ b/tests/testfile-macros-0xff.bz2 diff --git a/tests/testfile-macros-0xff.s b/tests/testfile-macros-0xff.s new file mode 100644 index 00000000..7fdd35c2 --- /dev/null +++ b/tests/testfile-macros-0xff.s @@ -0,0 +1,153 @@ + .file "x.c" + .text +.Ltext0: + .globl main + .type main, @function +main: +.LFB0: + .file 1 "x.c" + .loc 1 3 0 + .cfi_startproc + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + movq %rsp, %rbp + .cfi_def_cfa_register 6 + .loc 1 3 0 + movl $0, %eax + popq %rbp + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE0: + .size main, .-main +.Letext0: + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x52 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x8 + .uleb128 0x1 + .long .LASF244 + .byte 0x4 + .string "x.c" + .long .LASF245 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .long .Ldebug_line0 + .long .Ldebug_macro0 + .uleb128 0x2 + .long .LASF246 + .byte 0x1 + .byte 0x3 + .long 0x4e + .quad .LFB0 + .quad .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x3 + .byte 0x4 + .byte 0x5 + .string "int" + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x10 + .uleb128 0x17 + .uleb128 0x2119 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x2e + .byte 0 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x2c + .value 0x2 + .long .Ldebug_info0 + .byte 0x8 + .byte 0 + .value 0 + .value 0 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .quad 0 + .quad 0 + .section .debug_macro,"",@progbits +.Ldebug_macro0: + .value 0x4 + .byte 0x6 + .long .Ldebug_line0 + .byte 0x1 + .byte 0xff + .uleb128 0 + .byte 0xff + .byte 0x3 + .uleb128 0 + .uleb128 0x1 + .byte 0x5 + .uleb128 0x1 + .long .LASF243 + .byte 0x4 + .byte 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF245: + .string "/home/petr/proj/elfutils/master/elfutils" +.LASF244: + .string "GNU C++ 4.9.0 20140422 (Red Hat 4.9.0-1) -mtune=generic -march=x86-64 -g3" +.LASF243: + .string "FOO 0" +.LASF246: + .string "main" + .ident "GCC: (GNU) 4.9.0 20140422 (Red Hat 4.9.0-1)" + .section .note.GNU-stack,"",@progbits diff --git a/tests/testfile-sizes1.o.bz2 b/tests/testfile-sizes1.o.bz2 Binary files differnew file mode 100644 index 00000000..479ecb20 --- /dev/null +++ b/tests/testfile-sizes1.o.bz2 diff --git a/tests/testfile-sizes2.o.bz2 b/tests/testfile-sizes2.o.bz2 Binary files differnew file mode 100644 index 00000000..7bd7b47f --- /dev/null +++ b/tests/testfile-sizes2.o.bz2 diff --git a/tests/testfile-sizes3.o.bz2 b/tests/testfile-sizes3.o.bz2 Binary files differnew file mode 100644 index 00000000..7fa6a8a5 --- /dev/null +++ b/tests/testfile-sizes3.o.bz2 diff --git a/tests/testfileppc32attrs.o.bz2 b/tests/testfileppc32attrs.o.bz2 Binary files differnew file mode 100644 index 00000000..c8d80a99 --- /dev/null +++ b/tests/testfileppc32attrs.o.bz2 diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c new file mode 100644 index 00000000..d04f36a1 --- /dev/null +++ b/tests/vdsosyms.c @@ -0,0 +1,108 @@ +/* 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 <http://www.gnu.org/licenses/>. */ + +#include <config.h> +#include <assert.h> +#include <errno.h> +#include <error.h> +#include <inttypes.h> +#include <stdio.h> +#include <string.h> +#include <sys/types.h> +#include <unistd.h> +#include ELFUTILS_HEADER(dwfl) + +#ifndef __linux__ +int +main (int argc __attribute__ ((unused)), char **argv) +{ + printf ("Getting the vdso is unsupported.\n"); + return 77; +} +#else /* __linux__ */ +static bool vdso_seen = false; + +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". */ + if (strncmp ("[vdso: ", name, 7) == 0) + { + int syms = dwfl_module_getsymtab (mod); + printf ("vdso syms: %d\n", syms); + if (syms < 0) + error (2, 0, "dwfl_module_getsymtab: %s", dwfl_errmsg (-1)); + vdso_seen = true; + + for (int i = 0; i < 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 our parent as "arbitrary" process to inspect. */ + pid_t pid = getppid(); + + 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)); + + return vdso_seen ? 0 : -1; +} + +#endif /* ! __linux__ */ |
